* in_pcbdetach() is responsibe for disassociating a socket from an inpcb. * For most protocols, this will be invoked immediately prior to calling * in_pcbfree(). However, with TCP the inpcb may significantly outlive the * socket, in which case in_pcbfree() is deferred. */
| 1617 | * socket, in which case in_pcbfree() is deferred. |
| 1618 | */ |
| 1619 | void |
| 1620 | in_pcbdetach(struct inpcb *inp) |
| 1621 | { |
| 1622 | |
| 1623 | KASSERT(inp->inp_socket != NULL, ("%s: inp_socket == NULL", __func__)); |
| 1624 | |
| 1625 | #ifdef RATELIMIT |
| 1626 | if (inp->inp_snd_tag != NULL) |
| 1627 | in_pcbdetach_txrtlmt(inp); |
| 1628 | #endif |
| 1629 | inp->inp_socket->so_pcb = NULL; |
| 1630 | inp->inp_socket = NULL; |
| 1631 | } |
| 1632 | |
| 1633 | /* |
| 1634 | * in_pcbref() bumps the reference count on an inpcb in order to maintain |
no test coverage detected