From 71cc03392bbc78f93765e5550fc35f98c373df04 Mon Sep 17 00:00:00 2001 From: rwatson Date: Sat, 1 Apr 2006 16:04:42 +0000 Subject: 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 --- sys/netinet/in_pcb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/netinet/in_pcb.h') 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 *, -- cgit v1.1