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/netinet6/in6_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/netinet6/in6_pcb.h')
-rw-r--r-- | sys/netinet6/in6_pcb.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet6/in6_pcb.h b/sys/netinet6/in6_pcb.h index 45b46f1..52e566a 100644 --- a/sys/netinet6/in6_pcb.h +++ b/sys/netinet6/in6_pcb.h @@ -76,6 +76,7 @@ int in6_pcbbind __P((struct inpcb *, struct sockaddr *, struct ucred *)); int in6_pcbconnect __P((struct inpcb *, struct sockaddr *, struct ucred *)); void in6_pcbdetach __P((struct inpcb *)); void in6_pcbdisconnect __P((struct inpcb *)); +void in6_pcbfree __P((struct inpcb *)); int in6_pcbladdr __P((struct inpcb *, struct sockaddr *, struct in6_addr **)); struct inpcb * |