MCPcopy Create free account
hub / github.com/F-Stack/f-stack / in_pcbinfo_destroy

Function in_pcbinfo_destroy

freebsd/netinet/in_pcb.c:555–574  ·  view source on GitHub ↗

* Destroy an inpcbinfo. */

Source from the content-addressed store, hash-verified

553 * Destroy an inpcbinfo.
554 */
555void
556in_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.

Callers 5

udp_destroyFunction · 0.85
udplite_destroyFunction · 0.85
div_destroyFunction · 0.85
tcp_destroyFunction · 0.85
rip_destroyFunction · 0.85

Calls 3

in_pcbgroup_destroyFunction · 0.85
uma_zdestroyFunction · 0.85
hashdestroyFunction · 0.50

Tested by

no test coverage detected