function, pru_close, to notify protocols that the file descriptor or
other consumer of a socket is closing the socket. pru_abort is now a
notification of close also, and no longer detaches. pru_detach is no
longer used to notify of close, and will be called during socket
tear-down by sofree() when all references to a socket evaporate after
an earlier call to abort or close the socket. This means detach is now
an unconditional teardown of a socket, whereas previously sockets could
persist after detach of the protocol retained a reference.
This faciliates sharing mutexes between layers of the network stack as
the mutex is required during the checking and removal of references at
the head of sofree(). With this change, pru_detach can now assume that
the mutex will no longer be required by the socket layer after
completion, whereas before this was not necessarily true.
Reviewed by: gnn
a note to committers about KAME tree
$FreeBSD$
KAME project
FreeBSD IPv6/IPsec tree is from KAMEproject (http://www.kame.net/).
To synchronize KAME tree and FreeBSD better today and in the future,
please understand the following:
- DO NOT MAKE COSTMETIC CHANGES.
"Cosmetic changes" here includes tabify, untabify, removal of space at EOL,
minor KNF items, and whatever adds more output lines on "diff freebsd kame".
To make future synchronization easier. it is critical to preserve certain
statements in the code. Also, as KAME tree supports all 4 BSDs (Free, Open,
Net, BSD/OS) in single shared tree, it is not always possible to backport
FreeBSD changes into KAME tree. So again, please do not make cosmetic
changes. Even if you think it a right thing, that will bite KAME guys badly
during upgrade attempts, and prevent us from synchronizing two trees.
(you don't usually make cosmetic changes against third-party code, do you?)
- REPORT CHANGES/BUGS TO KAME GUYS.
It is not always possible for KAME guys to watch all the freebsd mailing
list traffic, as the traffic is HUGE. So if possible, please, inform
kame guys of changes you made in IPv6/IPsec related portion. Contact
path would be snap-users@kame.net or KAME PR database on www.kame.net.
(or to core@kame.net if it is necessary to make it confidential)
Thank you for your cooperation and have a happy IPv6 life!
Note: KAME-origin code is in the following locations.
The above notice applies to corresponding manpages too.
The list may not be complete. If you see $KAME$ in the code, it is from
KAME distribution. If you see some file that is IPv6/IPsec related, it is
highly possible that the file is from KAME distribution.
include/ifaddrs.h
lib/libc/net
lib/libc/net/getaddrinfo.c
lib/libc/net/getifaddrs.c
lib/libc/net/getnameinfo.c
lib/libc/net/ifname.c
lib/libc/net/ip6opt.c
lib/libc/net/map_v4v6.c
lib/libc/net/name6.c
lib/libftpio
lib/libipsec
sbin/ip6fw
sbin/ping6
sbin/rtsol
share/doc/IPv6
share/man/man4/ip6.4
share/man/man4/inet6.4
sys/crypto (except sys/crypto/rc4)
sys/kern/uipc_mbuf2.c
sys/net/if_faith.[ch]
sys/net/if_gif.[ch]
sys/net/if_stf.[ch]
sys/net/pfkeyv2.h
sys/netinet/icmp6.h
sys/netinet/in_gif.[ch]
sys/netinet/ip6.h
sys/netinet/ip_encap.[ch]
sys/netinet6
sys/netkey
usr.sbin/faithd
usr.sbin/ifmcstat
usr.sbin/mld6query
usr.sbin/ndp
usr.sbin/rip6query
usr.sbin/route6d
usr.sbin/rrenumd
usr.sbin/rtadvd
usr.sbin/rtsold
usr.sbin/setkey
usr.sbin/traceroute6