Lines Matching defs:inp
223 struct inpcb *inp;
242 LIST_FOREACH(inp, &tcb, inp_list) {
244 so = inp->inp_socket;
249 if (in_pcb_checkstate(inp, WNT_ACQUIRE, 0) == WNT_STOPUSING)
254 if ((in_pcb_checkstate(inp, WNT_RELEASE,1) == WNT_STOPUSING) && so->so_usecount == 1) {
259 tp = intotcpcb(inp);
304 tcp_garbage_collect(inp, istimewait)
305 struct inpcb *inp;
312 if (inp->inp_socket == &tcbinfo.nat_dummy_socket)
316 if (!lck_mtx_try_lock(inp->inpcb_mtx)) /* skip if still in use */
319 so = inp->inp_socket;
320 tp = intotcpcb(inp);
324 in_pcbdetach(inp);
326 lck_mtx_unlock(inp->inpcb_mtx);
330 if (inp->inp_wantcnt != WNT_STOPUSING) {
331 lck_mtx_unlock(inp->inpcb_mtx);
338 in_pcbdispose(inp);
349 in_pcbdispose(inp);
351 lck_mtx_unlock(inp->inpcb_mtx);
361 struct inpcb *inp, *nxt;
381 LIST_FOREACH(inp, &tcb, inp_list) {
383 so = inp->inp_socket;
388 if (in_pcb_checkstate(inp, WNT_ACQUIRE, 0) == WNT_STOPUSING)
393 if ((in_pcb_checkstate(inp, WNT_RELEASE,1) == WNT_STOPUSING) && so->so_usecount == 1) {
397 tp = intotcpcb(inp);
403 tp = intotcpcb(inp);
505 LIST_FOREACH(inp, &time_wait_slots[cur_tw_slot], inp_list) {
510 if (in_pcb_checkstate(inp, WNT_ACQUIRE, 0) == WNT_STOPUSING)
513 tcp_lock(inp->inp_socket, 1, 0);
515 if (in_pcb_checkstate(inp, WNT_RELEASE, 1) == WNT_STOPUSING)
518 tp = intotcpcb(inp);
536 tcp_unlock(inp->inp_socket, 1, 0);
540 LIST_FOREACH_SAFE(inp, &tcb, inp_list, nxt) {
541 tcp_garbage_collect(inp, 0);
545 LIST_FOREACH_SAFE(inp, &time_wait_slots[cur_tw_slot], inp_list, nxt) {
546 tcp_garbage_collect(inp, 1);