FreeBSD/sys/net/raw_cb.c
/*
 * Detach the raw connection block and discard socket resources.
 */
Detach the raw connection block and discard socket resources.
Detach the raw connection block and discard socket resources .
void
raw_detach(struct rawcb *rp)
{
	struct socket *so = rp->rcb_socket;
	KASSERT(so->so_pcb == rp, ("raw_detach: so_pcb != rp"));
	so->so_pcb = NULL;
	mtx_lock(&rawcb_mtx);
	LIST_REMOVE(rp, list);
	mtx_unlock(&rawcb_mtx);
	free((caddr_t)(rp), M_PCB);
}
void raw_detach ( struct rawcb * rp ) { struct socket * so = rp -> rcb_socket ; KASSERT ( so -> so_pcb == rp , ( " " ) ) ; so -> so_pcb = NULL ; mtx_lock ( & rawcb_mtx ) ; LIST_REMOVE ( rp , list ) ; mtx_unlock ( & rawcb_mtx ) ; free ( ( caddr_t ) ( rp ) , M_PCB ) ; }
Detach the raw connection block and discard socket resources.
Detach the raw connection block and discard socket resources .