diff options
author | rwatson <rwatson@FreeBSD.org> | 2006-04-01 16:04:42 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2006-04-01 16:04:42 +0000 |
commit | 71cc03392bbc78f93765e5550fc35f98c373df04 (patch) | |
tree | 84f123a9e4ae49f3aeb4718b6d6dfdba595ac39c /sys/netinet/in_pcb.h | |
parent | 173781a39a4623af3173bfdc1e69f3a3fe4166f2 (diff) | |
download | FreeBSD-src-71cc03392bbc78f93765e5550fc35f98c373df04.zip FreeBSD-src-71cc03392bbc78f93765e5550fc35f98c373df04.tar.gz |
Break out in_pcbdetach() into two functions:
- in_pcbdetach(), which removes the link between an inpcb and its
socket.
- in_pcbfree(), which frees a detached pcb.
Unlike the previous in_pcbdetach(), neither of these functions will
attempt to conditionally free the socket, as they are responsible only
for managing in_pcb memory. Mirror these changes into in6_pcbdetach()
by breaking it into in6_pcbdetach() and in6_pcbfree().
While here, eliminate undesired checks for NULL inpcb pointers in
sockets, as we will now have as an invariant that sockets will always
have valid so_pcb pointers.
MFC after: 3 months
Diffstat (limited to 'sys/netinet/in_pcb.h')
-rw-r--r-- | sys/netinet/in_pcb.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index ffdcad1..1500c18 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -352,6 +352,7 @@ int in_pcbconnect_setup(struct inpcb *, struct sockaddr *, in_addr_t *, struct ucred *); void in_pcbdetach(struct inpcb *); void in_pcbdisconnect(struct inpcb *); +void in_pcbfree(struct inpcb *); int in_pcbinshash(struct inpcb *); struct inpcb * in_pcblookup_local(struct inpcbinfo *, |