| 323 | } |
| 324 | |
| 325 | static void |
| 326 | in_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 | |
| 347 | static void |
| 348 | in_pcbwild_remove(struct inpcb *inp) |
no outgoing calls
no test coverage detected