Lines Matching refs:inp

217  *    inp is locked, and is unlocked before returning.
223 struct inpcb *inp = tp->t_inpcb;
227 int isipv6 = inp->inp_inc.inc_flags & INC_ISIPV6;
231 INP_WLOCK_ASSERT(inp);
237 error = in6_localaddr(&inp->in6p_faddr);
243 error = in_localip(inp->inp_faddr);
248 INP_WUNLOCK(inp);
274 INP_WUNLOCK(inp);
282 tw->tw_inpcb = inp;
283 in_pcbref(inp); /* Reference from tw */
328 so = inp->inp_socket;
336 inp->inp_ppcb = tw;
337 inp->inp_flags |= INP_TIMEWAIT;
344 if (inp->inp_flags & INP_SOCKREF) {
347 inp->inp_flags &= ~INP_SOCKREF;
348 INP_WUNLOCK(inp);
354 INP_WUNLOCK(inp);
395 tcp_twcheck(struct inpcb *inp, struct tcpopt *to __unused, struct tcphdr *th,
403 INP_WLOCK_ASSERT(inp);
411 tw = intotw(inp);
480 INP_WUNLOCK(inp);
489 struct inpcb *inp;
500 inp = tw->tw_inpcb;
501 KASSERT((inp->inp_flags & INP_TIMEWAIT), ("tcp_twclose: !timewait"));
502 KASSERT(intotw(inp) == tw, ("tcp_twclose: inp_ppcb != tw"));
504 INP_WLOCK_ASSERT(inp);
507 inp->inp_ppcb = NULL;
508 in_pcbdrop(inp);
510 so = inp->inp_socket;
518 if (inp->inp_flags & INP_SOCKREF) {
519 inp->inp_flags &= ~INP_SOCKREF;
520 INP_WUNLOCK(inp);
533 INP_WUNLOCK(inp);
540 in_pcbfree(inp);
548 struct inpcb *inp = tw->tw_inpcb;
561 int isipv6 = inp->inp_inc.inc_flags & INC_ISIPV6;
565 INP_WLOCK_ASSERT(inp);
573 mac_inpcb_create_mbuf(inp, m);
581 tcpip_fillheaders(inp, ip6, th);
592 tcpip_fillheaders(inp, ip, th);
625 ip6->ip6_hlim = in6_selecthlim(inp, NULL);
626 error = ip6_output(m, inp->in6p_outputopts, NULL,
627 (tw->tw_so_options & SO_DONTROUTE), NULL, NULL, inp);
641 error = ip_output(m, inp->inp_options, NULL,
643 NULL, inp);
673 struct inpcb *inp;
679 inp = tw->tw_inpcb;
690 released = in_pcbrele_wlocked(inp);
691 KASSERT(!released, ("%s: inp should not be released here", __func__));
701 struct inpcb *inp;
726 inp = tw->tw_inpcb;
727 in_pcbref(inp);
732 INP_WLOCK(inp);
733 tw = intotw(inp);
734 if (in_pcbrele_wlocked(inp)) {
735 KASSERT(tw == NULL, ("%s: held last inp "
743 INP_WUNLOCK(inp);
754 INP_WLOCK(inp);
755 if (!in_pcbrele_wlocked(inp))
756 INP_WUNLOCK(inp);