• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/bsd/netinet/

Lines Matching defs:inp

256 		struct	inpcb inp;
388 struct inpcb *inp = tp->t_inpcb;
392 if ((inp->inp_vflag & INP_IPV6) != 0) {
397 (inp->in6p_flowinfo & IPV6_FLOWINFO_MASK);
402 ip6->ip6_src = inp->in6p_laddr;
403 ip6->ip6_dst = inp->in6p_faddr;
418 ip->ip_src = inp->inp_laddr;
419 ip->ip_dst = inp->inp_faddr;
424 tcp_hdr->th_sport = inp->inp_lport;
425 tcp_hdr->th_dport = inp->inp_fport;
674 * protocol control block. The `inp' parameter must have
678 tcp_newtcpcb(inp)
679 struct inpcb *inp;
683 register struct socket *so = inp->inp_socket;
685 int isipv6 = (inp->inp_vflag & INP_IPV6) != 0;
689 it = (struct inp_tp *)inp;
693 tp = (struct tcpcb *) inp->inp_saved_ppcb;
707 tp->t_inpcb = inp; /* XXX */
728 inp->inp_ip_ttl = ip_defttl;
729 inp->inp_ppcb = (caddr_t)tp;
767 struct inpcb *inp = tp->t_inpcb;
768 struct socket *so = inp->inp_socket;
770 int isipv6 = (inp->inp_vflag & INP_IPV6) != 0;
775 if ( inp->inp_ppcb == NULL) /* tcp_close was called previously, bail */
833 if ((rt = inp->in6p_route.ro_rt) == NULL)
841 rt = inp->inp_route.ro_rt;
924 rt = inp->inp_route.ro_rt;
951 inp->inp_saved_ppcb = (caddr_t) tp;
957 in6_pcbdetach(inp);
960 in_pcbdetach(inp);
1030 tcp_notify(inp, error)
1031 struct inpcb *inp;
1036 if (inp == NULL || (inp->inp_state == INPCB_STATE_DEAD))
1039 tp = (struct tcpcb *)inp->inp_ppcb;
1069 struct inpcb *inp, **inp_list;
1122 for (inp = LIST_FIRST(tcbinfo.listhead), i = 0; inp && i < n;
1123 inp = LIST_NEXT(inp, inp_list)) {
1125 if (inp->inp_gencnt <= gencnt && inp->inp_state != INPCB_STATE_DEAD)
1127 if (inp->inp_gencnt <= gencnt && !prison_xinpcb(req->p, inp))
1129 inp_list[i++] = inp;
1135 for (inp = time_wait_slots[slot].lh_first; inp && i < n; inp = inpnxt) {
1136 inpnxt = inp->inp_list.le_next;
1137 if (inp->inp_gencnt <= gencnt && inp->inp_state != INPCB_STATE_DEAD)
1138 inp_list[i++] = inp;
1146 inp = inp_list[i];
1147 if (inp->inp_gencnt <= gencnt && inp->inp_state != INPCB_STATE_DEAD) {
1154 inpcb_to_compat(inp, &xt.xt_inp);
1155 inp_ppcb = inp->inp_ppcb;
1161 if (inp->inp_socket)
1162 sotoxsocket(inp->inp_socket, &xt.xt_socket);
1194 struct inpcb *inp;
1204 inp = in_pcblookup_hash(&tcbinfo, addrs[1].sin_addr, addrs[1].sin_port,
1206 if (inp == NULL || inp->inp_socket == NULL) {
1210 error = SYSCTL_OUT(req, inp->inp_socket->so_cred, sizeof(*(kauth_cred_t)0);
1224 struct inpcb *inp;
1241 inp = in_pcblookup_hash(&tcbinfo,
1248 inp = in6_pcblookup_hash(&tcbinfo, &addrs[1].sin6_addr,
1252 if (inp == NULL || inp->inp_socket == NULL) {
1256 error = SYSCTL_OUT(req, inp->inp_socket->so_cred,
1278 struct inpcb *inp;
1304 inp = in_pcblookup_hash(&tcbinfo, faddr, th->th_dport,
1306 if (inp != NULL && inp->inp_socket != NULL) {
1307 tcp_lock(inp->inp_socket, 1, 0);
1308 if (in_pcb_checkstate(inp, WNT_RELEASE, 1) == WNT_STOPUSING) {
1309 tcp_unlock(inp->inp_socket, 1, 0);
1313 tp = intotcpcb(inp);
1316 (*notify)(inp, inetctlerrmap[cmd]);
1317 tcp_unlock(inp->inp_socket, 1, 0);
1501 struct inpcb *inp,
1505 struct tcpcb *tp = intotcpcb(inp);
1519 tcp_drop_syn_sent(inp, errno)
1520 struct inpcb *inp;
1523 struct tcpcb *tp = intotcpcb(inp);
1537 struct inpcb *inp,
1541 struct tcpcb *tp = intotcpcb(inp);
1544 struct socket *so = inp->inp_socket;
1555 rt = tcp_rtlookup6(inp);
1558 rt = tcp_rtlookup(inp, IFSCOPE_NONE);
1628 tcp_rtlookup(inp, input_ifscope)
1629 struct inpcb *inp;
1636 ro = &inp->inp_route;
1645 if (inp->inp_faddr.s_addr != INADDR_ANY) {
1651 inp->inp_faddr;
1660 ifscope = (inp->inp_flags & INP_BOUND_IF) ?
1661 inp->inp_boundif : input_ifscope;
1668 somultipages(inp->inp_socket,
1679 tp = intotcpcb(inp);
1701 tcp_rtlookup6(inp)
1702 struct inpcb *inp;
1710 ro6 = &inp->in6p_route;
1714 if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) {
1720 dst6->sin6_addr = inp->in6p_faddr;
1726 somultipages(inp->inp_socket,
1737 tp = intotcpcb(inp);
1763 struct inpcb *inp;
1772 if ((tp == NULL) || ((inp = tp->t_inpcb) == NULL))
1779 if ((inp->inp_vflag & INP_IPV6) != 0) {
1785 hdrsiz = ipsec6_hdrsiz(m, IPSEC_DIR_OUTBOUND, inp);
1793 hdrsiz = ipsec4_hdrsiz(m, IPSEC_DIR_OUTBOUND, inp);
1806 tcp_gettaocache(inp)
1807 struct inpcb *inp;
1814 if ((inp->inp_vflag & INP_IPV6) != 0)
1815 rt = tcp_rtlookup6(inp);
1818 rt = tcp_rtlookup(inp, IFSCOPE_NONE);
1911 struct inpcb *inp = sotoinpcb(so);
1916 return(inp->inpcb_mtx);