[PATCH] ipfwpcap(8)

Vadim Goncharov vadim_nuclight at mail.ru
Tue Dec 18 01:51:31 PST 2007


Hi,

I've recently found a patch (also available at  
http://antigreen.org/vadim/freebsd/ipfwpcap/) made by me and my friend in  
January to ipfwpcap(8) introduced in 7.0. Now it have more features, some  
of which were already present in pflogd(8) counterpart. Patched version  
were tested in about to 200 parallel processes, on both 5.5 and 6.2 for  
half a year, without any bugs.

If possible, could it be committed to ongoing 7.0-RELEASE ? It would be  
nice to not break POLA after release is being stable and widely available  
(some option meaning were changed (to be more consistent with pflogd and  
overall FreeBSD-ish, though), but I forgot to post it earlier, before  
7.0-STABLE fork, sorry). Please.

List of changes:

1. Program now daemonizes itself by defaul, and -d option not only enables  
debug, but cancels daemonizing too.
2. Log is now re-opened on SIGHUP; if log pathname was not absolute, will  
not do chdir("/") after daemonizing.
3. Log is now flushed on SIGALRM, new option -i can be used to specify  
flush interval (using alarm(3)), default is 60 seconds.
4. Added option -z, which resets log-limiting counters to zero on each log  
re-open.
5. Added pid-file checking - if exists, check if process with it's value  
still exists (ignore signal 0 ourselves), if not, rewrite stale pid-file  
and begin working.
6. Signal handlers now do only variable setting, all work is done in main  
loop, changed from for(;;) to while(!quit).
7. Minor changes - less global variables, changed strcpy() -> strlcpy(),  
added some macros, less output from usage (as we now have manpage), most  
exit codes changed from custom ones to sysexits(3).
8. More style(9), and new features are documented in man page, some old  
statements in man were made more detailed.

-- 
WBR, Vadim Goncharov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipfwpcap.patch
Type: application/octet-stream
Size: 17679 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20071218/d876c8c3/ipfwpcap.obj


More information about the freebsd-net mailing list