I'll remove freebsd3/sys/netkey/keysock.c.
as much as possible. we are able to share ipsec.c without too much troubles. will try to do it for other platforms, and other portions (like inet6.c).
generated to syslog, with proper priority (for example, sequence number cycle will be logged with LOG_WARNING). you can suppress/enable logs by setting net.inet.ipsec.debug (or net.inet6.ipsec6.debug). even if you supress logs, you can check "netstat -sn" to understand what was happend to ipsec stack.
compilable on fbsd3 (not tested. could someone try to compile this on fbsd3?)
- don't use kernel printf, use kernel log() with appropriate priority. - add stat items for ENOBUFS, and ipcomp. TODO: netstat update for all platforms... yikes.
From: Hajimu UMEMOTO <firstname.lastname@example.org>
(tested on freebsd2/freebsd3)
NetBSD PR: 9199 From: email@example.com
NetBSD PR: 9199 From: firstname.lastname@example.org TODO: use getnameinfo, not inet_ntop