1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-30 12:04:07 +00:00
freebsd/sys/netnatm
Robert Watson a152f8a361 Change semantics of socket close and detach. Add a new protocol switch
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
2006-07-21 17:11:15 +00:00
..
natm_pcb.c Update natm PCB debugging code: 2006-04-23 15:23:31 +00:00
natm_proto.c Use sparse initializers for "struct domain" and "struct protosw", 2005-11-09 13:29:16 +00:00
natm.c Change semantics of socket close and detach. Add a new protocol switch 2006-07-21 17:11:15 +00:00
natm.h Remove FreeBSD 2.2 protocol usrreq compatibility code. 2005-07-19 13:36:39 +00:00