* Destroy an inpcbinfo. */
| 553 | * Destroy an inpcbinfo. |
| 554 | */ |
| 555 | void |
| 556 | in_pcbinfo_destroy(struct inpcbinfo *pcbinfo) |
| 557 | { |
| 558 | |
| 559 | KASSERT(pcbinfo->ipi_count == 0, |
| 560 | ("%s: ipi_count = %u", __func__, pcbinfo->ipi_count)); |
| 561 | |
| 562 | hashdestroy(pcbinfo->ipi_hashbase, M_PCB, pcbinfo->ipi_hashmask); |
| 563 | hashdestroy(pcbinfo->ipi_porthashbase, M_PCB, |
| 564 | pcbinfo->ipi_porthashmask); |
| 565 | hashdestroy(pcbinfo->ipi_lbgrouphashbase, M_PCB, |
| 566 | pcbinfo->ipi_lbgrouphashmask); |
| 567 | #ifdef PCBGROUP |
| 568 | in_pcbgroup_destroy(pcbinfo); |
| 569 | #endif |
| 570 | uma_zdestroy(pcbinfo->ipi_zone); |
| 571 | INP_LIST_LOCK_DESTROY(pcbinfo); |
| 572 | INP_HASH_LOCK_DESTROY(pcbinfo); |
| 573 | INP_INFO_LOCK_DESTROY(pcbinfo); |
| 574 | } |
| 575 | |
| 576 | /* |
| 577 | * Allocate a PCB and associate it with the socket. |
no test coverage detected