freebsd-nq/sys/netatalk
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
..
aarp.c - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
aarp.h /* -> /*- for license, minor formatting changes, insert COPYRIGHT into files 2005-01-07 02:35:34 +00:00
at_control.c Convert the aa_ifaddr timeout to a callout, and run the aarprobe callout 2005-02-22 14:20:29 +00:00
at_extern.h Convert the aa_ifaddr timeout to a callout, and run the aarprobe callout 2005-02-22 14:20:29 +00:00
at_proto.c Use sparse initializers for "struct domain" and "struct protosw", 2005-11-09 13:29:16 +00:00
at_rmx.c /* -> /*- for license, minor formatting changes, insert COPYRIGHT into files 2005-01-07 02:35:34 +00:00
at_var.h Convert the aa_ifaddr timeout to a callout, and run the aarprobe callout 2005-02-22 14:20:29 +00:00
at.h /* -> /*- for license, minor formatting changes, insert COPYRIGHT into files 2005-01-07 02:35:34 +00:00
COPYRIGHT Update global copyright statement for netatalk, as I claim copyright 2006-06-08 22:13:52 +00:00
ddp_input.c /* -> /*- for license, minor formatting changes, insert COPYRIGHT into files 2005-01-07 02:35:34 +00:00
ddp_output.c Use the correct mbuf type for MGET(). 2005-08-30 16:28:46 +00:00
ddp_pcb.c Modify netatalk to ensure, and assert, that pcb's remain attached to 2006-03-17 20:40:17 +00:00
ddp_pcb.h /* -> /*- for license, minor formatting changes, insert COPYRIGHT into files 2005-01-07 02:35:34 +00:00
ddp_usrreq.c Change semantics of socket close and detach. Add a new protocol switch 2006-07-21 17:11:15 +00:00
ddp_var.h /* -> /*- for license, minor formatting changes, insert COPYRIGHT into files 2005-01-07 02:35:34 +00:00
ddp.h /* -> /*- for license, minor formatting changes, insert COPYRIGHT into files 2005-01-07 02:35:34 +00:00
endian.h /* -> /*- for license, minor formatting changes, insert COPYRIGHT into files 2005-01-07 02:35:34 +00:00
phase2.h /* -> /*- for license, minor formatting changes, insert COPYRIGHT into files 2005-01-07 02:35:34 +00:00