Ed Schouten
1a874a126a
Add RFC 5424 syslog message output to syslogd.
...
- Move all of the code responsible for transmitting log messages into a
separate function, fprintlog_write().
- Instead of manually modifying a list of iovecs, add a structure
iovlist with some helper functions.
- Alter the F_FORW (UDP message forwarding) case to also use iovecs like
the other cases. Use sendmsg() instead of sendto().
- In the case of F_FORW, truncate the message to a size dependent on the
address family (AF_INET, AF_INET6), as proposed by RFC 5426.
- Move all traditional message formatting into fprintlog_bsd(). Get rid
of some of the string copying and snprintf()'ing. Simply emit more
iovecs to get the job done.
- Increase ttymsg()'s limit of 7 iovecs to 32. Add a definition for this
limit, so it can be reused by iovlist.
- Add fprintlog_rfc5424() to emit RFC 5424 formatted log entries.
- Add a "-O" command line option to enable RFC 5424 formatting. It would
have been nicer if we supported "-o rfc5424", just like on NetBSD.
Unfortunately, the "-o" flag is already used for a different purpose
on FreeBSD.
- Don't truncate hostnames in the RFC 5424 case, as suggested by that
specific RFC.
For people interested in using this, this feature can be enabled by
adding the following line to /etc/rc.conf:
syslogd_flags="-s -O rfc5424"
Differential Revision: https://reviews.freebsd.org/D15011
2018-04-15 08:34:16 +00:00
..
2017-10-31 00:07:04 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2017-11-27 15:37:16 +00:00
2017-12-08 17:15:20 +00:00
2017-10-31 00:07:04 +00:00
2018-01-29 14:15:44 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2018-03-02 01:53:50 +00:00
2017-11-27 15:37:16 +00:00
2018-01-24 14:24:17 +00:00
2017-11-27 15:37:16 +00:00
2017-10-31 00:07:04 +00:00
2017-10-31 00:07:04 +00:00
2017-11-27 15:37:16 +00:00
2017-11-27 15:37:16 +00:00
2017-10-31 00:07:04 +00:00
2018-03-30 13:37:33 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-10-31 00:07:04 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 19:49:47 +00:00
2018-04-11 18:39:47 +00:00
2017-11-27 15:37:16 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2017-11-20 19:49:47 +00:00
2017-12-28 05:33:44 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-11-27 15:37:16 +00:00
2017-10-31 00:07:04 +00:00
2018-03-29 02:54:50 +00:00
2017-11-27 15:37:16 +00:00
2017-11-20 19:49:47 +00:00
2017-12-11 14:54:42 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-12-07 02:08:55 +00:00
2017-12-13 16:09:00 +00:00
2017-10-31 00:04:07 +00:00
2017-11-20 19:49:47 +00:00
2018-03-14 19:09:06 +00:00
2017-10-31 00:07:04 +00:00
2018-04-13 18:04:51 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-11-27 15:37:16 +00:00
2017-10-31 00:07:04 +00:00
2017-11-27 15:37:16 +00:00
2017-10-31 00:07:04 +00:00
2017-11-27 15:37:16 +00:00
2018-04-12 17:00:36 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2017-10-31 00:07:04 +00:00
2017-10-31 00:07:04 +00:00
2018-02-06 15:41:26 +00:00
2017-11-27 15:37:16 +00:00
2017-12-01 21:44:23 +00:00
2017-11-27 20:01:58 +00:00
2018-01-27 17:43:09 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2017-11-27 15:37:16 +00:00
2017-10-31 00:07:04 +00:00
2017-11-27 15:37:16 +00:00
2017-11-30 15:10:11 +00:00
2017-10-31 00:07:04 +00:00
2017-10-31 00:07:04 +00:00
2017-11-27 15:37:16 +00:00
2017-10-31 00:07:04 +00:00
2017-11-27 12:37:14 +00:00
2017-10-31 00:07:04 +00:00
2017-12-03 02:23:29 +00:00
2017-12-12 06:56:21 +00:00
2018-04-10 14:44:07 +00:00
2018-01-20 15:37:47 +00:00
2017-10-31 00:07:04 +00:00
2017-11-27 15:37:16 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-11-27 15:37:16 +00:00
2018-03-02 23:31:55 +00:00
2018-02-16 18:07:04 +00:00
2018-03-10 14:33:00 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 19:49:47 +00:00
2018-01-03 07:43:04 +00:00
2017-10-31 00:07:04 +00:00
2017-10-31 00:07:04 +00:00
2017-11-27 15:37:16 +00:00
2017-11-25 04:49:12 +00:00
2017-11-27 15:37:16 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2017-12-23 19:48:57 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 08:52:33 +00:00
2017-10-31 00:07:04 +00:00
2017-10-31 00:07:04 +00:00
2018-02-07 17:09:12 +00:00
2018-01-21 08:48:26 +00:00
2017-11-27 15:37:16 +00:00
2017-12-27 03:23:01 +00:00
2017-11-27 15:37:16 +00:00
2018-02-11 13:35:31 +00:00
2017-11-27 15:37:16 +00:00
2017-12-06 17:50:10 +00:00
2017-11-27 15:37:16 +00:00
2017-11-27 15:37:16 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-10-31 00:07:04 +00:00
2018-01-24 07:01:44 +00:00
2017-12-27 06:23:50 +00:00
2017-12-31 00:35:11 +00:00
2018-04-13 09:04:31 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2018-02-21 15:54:23 +00:00
2017-11-27 15:37:16 +00:00
2017-10-31 00:07:04 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2017-10-31 00:07:04 +00:00
2017-11-20 19:49:47 +00:00
2018-04-12 17:16:13 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2017-11-27 15:37:16 +00:00
2018-01-06 15:52:28 +00:00
2017-12-28 05:33:49 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-11-27 15:37:16 +00:00
2018-03-22 09:43:15 +00:00
2017-11-27 15:37:16 +00:00
2017-10-31 00:07:04 +00:00
2018-01-30 09:59:52 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2017-10-31 00:07:04 +00:00
2017-11-20 19:49:47 +00:00
2018-01-12 22:48:23 +00:00
2017-10-31 00:07:04 +00:00
2017-10-31 00:07:04 +00:00
2017-10-31 00:07:04 +00:00
2017-10-31 00:07:04 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-11-27 15:37:16 +00:00
2017-11-20 19:49:47 +00:00
2018-01-11 15:01:48 +00:00
2017-11-27 15:37:16 +00:00
2017-11-27 15:37:16 +00:00
2017-10-31 00:07:04 +00:00
2017-12-01 03:22:40 +00:00
2017-10-31 00:07:04 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2018-01-23 20:07:51 +00:00
2017-11-27 15:37:16 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2018-02-26 18:04:17 +00:00
2017-10-31 00:07:04 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2017-12-28 05:33:34 +00:00
2017-10-31 00:07:04 +00:00
2017-11-27 20:01:58 +00:00
2017-11-18 14:26:50 +00:00
2017-11-20 19:49:47 +00:00
2017-11-18 14:26:50 +00:00
2017-11-18 14:26:50 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 19:49:47 +00:00
2017-12-06 20:10:05 +00:00
2017-12-08 15:57:29 +00:00
2017-11-20 19:49:47 +00:00
2018-02-27 22:01:40 +00:00
2017-11-27 15:37:16 +00:00
2017-11-20 19:49:47 +00:00
2017-12-28 05:34:34 +00:00
2017-10-31 00:07:04 +00:00
2017-10-31 00:07:04 +00:00
2018-01-23 14:33:19 +00:00
2017-10-31 00:07:04 +00:00
2018-02-07 20:36:37 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2017-11-27 15:37:16 +00:00
2017-11-27 15:37:16 +00:00
2017-10-31 00:07:04 +00:00
2017-12-05 07:11:56 +00:00
2018-03-02 22:32:53 +00:00
2018-04-10 08:19:14 +00:00
2017-11-27 15:37:16 +00:00
2018-04-10 14:42:24 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-12-28 05:33:39 +00:00
2017-12-06 02:47:46 +00:00
2017-10-31 00:07:04 +00:00
2018-03-09 23:25:18 +00:00
2018-01-24 17:12:34 +00:00
2018-03-29 02:13:58 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2018-03-29 00:12:50 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 19:49:47 +00:00
2017-11-18 14:26:50 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2017-11-20 19:49:47 +00:00
2018-01-15 17:27:43 +00:00
2017-10-31 00:07:04 +00:00
2017-11-27 15:37:16 +00:00
2017-11-27 15:37:16 +00:00
2017-11-27 15:37:16 +00:00
2017-10-31 00:07:04 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-10-31 00:07:04 +00:00
2018-02-08 05:18:30 +00:00
2018-04-03 18:43:00 +00:00
2017-11-20 19:49:47 +00:00
2018-04-15 08:34:16 +00:00
2017-12-10 17:56:03 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2017-11-27 15:37:16 +00:00
2017-11-27 15:37:16 +00:00
2017-11-20 19:49:47 +00:00
2017-11-20 19:49:47 +00:00
2017-12-27 03:23:01 +00:00
2018-01-16 21:43:46 +00:00
2017-10-31 00:07:04 +00:00
2017-10-29 08:03:21 +00:00
2017-06-16 06:29:21 +00:00
2017-06-16 06:29:21 +00:00
2017-11-20 19:49:47 +00:00
2017-10-31 00:07:04 +00:00
2017-10-31 00:07:04 +00:00
2017-10-31 00:07:04 +00:00
2017-11-20 19:49:47 +00:00
2017-11-27 15:37:16 +00:00
2017-11-27 15:37:16 +00:00
2017-11-27 15:37:16 +00:00
2017-11-14 05:03:38 +00:00
2018-04-03 21:08:10 +00:00