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

Lines Matching defs:inp

531 	register struct inpcb *inp;
805 inp = in_pcblookup_hash(&tcbinfo, ip->ip_src, th->th_sport,
807 if (!inp) {
812 inp = in_pcblookup_hash(&tcbinfo, ip->ip_src,
816 inp = in_pcblookup_hash(&tcbinfo,
828 inp = in6_pcblookup_hash(&tcbinfo, &ip6->ip6_src, th->th_sport,
833 inp = in_pcblookup_hash(&tcbinfo, ip->ip_src, th->th_sport,
843 if (inp != NULL && (inp->inp_flags & INP_BOUND_IF))
844 ifscope = inp->inp_boundif;
849 if (inp != NULL && ipsec6_in_reject_so(m, inp->inp_socket)) {
855 if (inp != NULL && ipsec4_in_reject_so(m, inp->inp_socket)) {
868 if (inp == NULL) {
937 so = inp->inp_socket;
939 if (in_pcb_checkstate(inp, WNT_RELEASE, 1) == WNT_STOPUSING)
940 inp = NULL; // pretend we didn't find it
942 printf("tcp_input: no more socket for inp=%x\n", inp);
957 if (in_pcb_checkstate(inp, WNT_RELEASE, 1) == WNT_STOPUSING) {
959 inp = NULL; // pretend we didn't find it
963 tp = intotcpcb(inp);
978 if (mac_inpcb_check_deliver(inp, m, AF_INET, SOCK_STREAM))
1008 head_ifscope = (inp->inp_flags & INP_BOUND_IF) ?
1009 inp->inp_boundif : IFSCOPE_NONE;
1135 inp = (struct inpcb *)so->so_pcb;
1148 inp->inp_flags |= INP_BOUND_IF;
1149 inp->inp_boundif = head_ifscope;
1153 inp->in6p_laddr = ip6->ip6_dst;
1155 inp->inp_vflag &= ~INP_IPV6;
1156 inp->inp_vflag |= INP_IPV4;
1158 inp->inp_laddr = ip->ip_dst;
1162 inp->inp_lport = th->th_dport;
1163 if (in_pcbinshash(inp, 0) != 0) {
1170 inp->in6p_laddr = in6addr_any;
1173 inp->inp_laddr.s_addr = INADDR_ANY;
1174 inp->inp_lport = 0;
1218 inp->inp_flags |=
1221 inp->in6p_outputopts =
1226 inp->inp_options = ip_srcroute();
1234 if (inp->inp_sp != NULL)
1235 error = ipsec_init_policy(so, &inp->inp_sp);
1236 if (error != 0 || ipsec_copy_policy(sotoinpcb(oso)->inp_sp, inp->inp_sp))
1241 tp = intotcpcb(inp);
1246 if (inp->inp_pcbinfo->ipi_count < tcp_sockthreshold) {
1313 inet_ntop(AF_INET6, &inp->in6p_faddr, ipstrbuf,
1316 inet_ntop(AF_INET, &inp->inp_faddr, ipstrbuf,
1318 inp->inp_fport,
1713 laddr6 = inp->in6p_laddr;
1714 if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr))
1715 inp->in6p_laddr = ip6->ip6_dst;
1716 if (in6_pcbconnect(inp, (struct sockaddr *)sin6,
1718 inp->in6p_laddr = laddr6;
1738 laddr = inp->inp_laddr;
1739 if (inp->inp_laddr.s_addr == INADDR_ANY)
1740 inp->inp_laddr = ip->ip_dst;
1741 if (in_pcbconnect(inp, (struct sockaddr *)sin, proc0)) {
1742 inp->inp_laddr = laddr;
3121 if ((inp != NULL) && (nosock == 0))
3422 struct inpcb *inp;
3433 inp = tp->t_inpcb;
3435 isipv6 = ((inp->inp_vflag & INP_IPV6) != 0) ? 1 : 0;
3444 rt = tcp_rtlookup6(inp);
3445 if (rt && (IN6_IS_ADDR_LOOPBACK(&inp->in6p_faddr) || IN6_IS_ADDR_LINKLOCAL(&inp->in6p_faddr) || rt->rt_gateway->sa_family == AF_LINK))
3451 rt = tcp_rtlookup(inp, input_ifscope);
3476 so = inp->inp_socket;
3760 struct inpcb *inp = NULL;
3788 inp = (struct inpcb *)so->so_pcb;
3792 if (in_pcb_checkstate(inp, WNT_ACQUIRE, 0) != WNT_STOPUSING) {
3797 if (lck_mtx_try_lock(inp->inpcb_mtx)) {
3802 in_pcb_checkstate(inp, WNT_RELEASE, 1);
3818 if (in_pcb_checkstate(inp, WNT_RELEASE, 1) == WNT_STOPUSING) {