Rework logging.
authorjca <jca@openbsd.org>
Fri, 5 Aug 2016 11:32:28 +0000 (11:32 +0000)
committerjca <jca@openbsd.org>
Fri, 5 Aug 2016 11:32:28 +0000 (11:32 +0000)
commitb034567a10eb5cedc00a2a80e5fe37da53640078
tree5e9cfa3fa837220aaa96a233f4196a56e573aaa5
parent65d4b721abed173498406dc3cad4c1f242b1aff8
Rework logging.

Use log.c like in many other daemons, with small additions to maintain
a log queue (useful to dump a single log line with several logging
statements).  Use log.c to dump the internal state, and remove the -R
option (a similar feature will be implemented differently soon).

The end goal is to avoid touching the filesystem and use much tighter
pledge(2) restrictions.

Tested by Freddy Dissaux.
usr.sbin/route6d/Makefile
usr.sbin/route6d/log.c [new file with mode: 0644]
usr.sbin/route6d/log.h [new file with mode: 0644]
usr.sbin/route6d/route6d.8
usr.sbin/route6d/route6d.c