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

Function in_pcbwild_add

freebsd/netinet/in_pcbgroup.c:325–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323}
324
325static void
326in_pcbwild_add(struct inpcb *inp)
327{
328 struct inpcbinfo *pcbinfo;
329 struct inpcbhead *head;
330 u_int pgn;
331
332 INP_WLOCK_ASSERT(inp);
333 KASSERT(!(inp->inp_flags2 & INP_PCBGROUPWILD),
334 ("%s: is wild",__func__));
335
336 pcbinfo = inp->inp_pcbinfo;
337 for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++)
338 INP_GROUP_LOCK(&pcbinfo->ipi_pcbgroups[pgn]);
339 head = &pcbinfo->ipi_wildbase[INP_PCBHASH(INADDR_ANY, inp->inp_lport,
340 0, pcbinfo->ipi_wildmask)];
341 CK_LIST_INSERT_HEAD(head, inp, inp_pcbgroup_wild);
342 inp->inp_flags2 |= INP_PCBGROUPWILD;
343 for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++)
344 INP_GROUP_UNLOCK(&pcbinfo->ipi_pcbgroups[pgn]);
345}
346
347static void
348in_pcbwild_remove(struct inpcb *inp)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected