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

Function in_pcbgroup_destroy

freebsd/netinet/in_pcbgroup.c:199–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199void
200in_pcbgroup_destroy(struct inpcbinfo *pcbinfo)
201{
202 struct inpcbgroup *pcbgroup;
203 u_int pgn;
204
205 if (pcbinfo->ipi_npcbgroups == 0)
206 return;
207
208 for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++) {
209 pcbgroup = &pcbinfo->ipi_pcbgroups[pgn];
210 KASSERT(CK_LIST_EMPTY(pcbinfo->ipi_listhead),
211 ("in_pcbinfo_destroy: listhead not empty"));
212 INP_GROUP_LOCK_DESTROY(pcbgroup);
213 hashdestroy(pcbgroup->ipg_hashbase, M_PCB,
214 pcbgroup->ipg_hashmask);
215 }
216 hashdestroy(pcbinfo->ipi_wildbase, M_PCB, pcbinfo->ipi_wildmask);
217 free(pcbinfo->ipi_pcbgroups, M_PCB);
218 pcbinfo->ipi_pcbgroups = NULL;
219 pcbinfo->ipi_npcbgroups = 0;
220 pcbinfo->ipi_hashfields = 0;
221}
222
223/*
224 * Given a hash of whatever the covered tuple might be, return a pcbgroup

Callers 1

in_pcbinfo_destroyFunction · 0.85

Calls 2

hashdestroyFunction · 0.50
freeFunction · 0.50

Tested by

no test coverage detected