| /xnu-11215/bsd/net/ |
| H A D | route.c | 613 ifscope = eifscope; in sa_copy() 626 if (ifscope != IFSCOPE_NONE && eifscope != ifscope) { in sa_copy() 647 unsigned int ifscope) in ma_copy() argument 896 unsigned int ifscope) in rtalloc_ign_common_locked() argument 942 unsigned int ifscope) in rtalloc1_scoped_locked() argument 1739 0, 0, ifscope); in ifa_ifwithroute_common_locked() 2209 NULL : &ifscope); in rtrequest_common_locked() 2512 ret_nrt, ifscope); in rtrequest_scoped() 2752 unsigned int ifscope; in rt_setgate() local 3031 struct matchleaf_arg ma = { .ifscope = ifscope }; in node_lookup() [all …]
|
| H A D | rtsock.c | 335 unsigned int ifscope = IFSCOPE_NONE; in route_output() local 477 ifscope = RTM->rtm_index; in route_output() 482 if (ifscope != IFSCOPE_NONE) { in route_output() 504 if (IF_INDEX_IN_RANGE(ifscope)) { in route_output() 505 ifp = ifindex2ifnet[ifscope]; in route_output() 555 ifscope); in route_output() 587 info.rti_info[RTAX_GATEWAY], ifscope); in route_output() 602 ifscope); in route_output() 763 info.rti_info[RTAX_GATEWAY], ifscope); in route_output() 967 struct sockaddr *Gate, unsigned int ifscope) in rt_setif() argument [all …]
|
| H A D | if.c | 1175 if (ifscope == IFSCOPE_NONE) { in ifa_ifwithdstaddr_scoped() 1179 if (ifscope <= (unsigned int)if_index) { in ifa_ifwithdstaddr_scoped() 1180 ifp = ifindex2ifnet[ifscope]; in ifa_ifwithdstaddr_scoped() 1198 if (ifscope == IFSCOPE_NONE) { in ifa_ifwithaddr_scoped_locked() 1202 if (ifscope > (unsigned int)if_index) { in ifa_ifwithaddr_scoped_locked() 1206 ifp = ifindex2ifnet[ifscope]; in ifa_ifwithaddr_scoped_locked() 1270 return ifa_ifwithnet_common(addr, ifscope); in ifa_ifwithnet_scoped() 1288 ifscope = IFSCOPE_NONE; in ifa_ifwithnet_common() 1312 VERIFY(ifscope != IFSCOPE_NONE); in ifa_ifwithnet_common() 1336 if (ifscope != IFSCOPE_NONE && in ifa_ifwithnet_common() [all …]
|
| /xnu-11215/bsd/netinet6/ |
| H A D | in6_src.c | 749 ip6oa.ip6oa_boundif = ifscope; in in6_selectsrc() 981 if (ifscope != IFSCOPE_NONE && in selectroute() 1022 ifscope = pi->ipi6_ifindex; in selectroute() 1026 ((ifscope <= if_index) ? ifindex2ifnet[ifscope] : NULL); in selectroute() 1063 if (ifscope == IFSCOPE_NONE) { in selectroute() 1095 unsigned int scope = ifscope; in selectroute() 1140 s_src, s_dst, ifscope, in selectroute() 1181 s_src, s_dst, ifscope); in selectroute() 1359 ifscope, if_name(ifp), in selectroute() 1366 ifscope, if_name(ifp)); in selectroute() [all …]
|
| H A D | ip6_forward.c | 161 unsigned int ifscope = IFSCOPE_NONE; in ip6_forward() local 179 ifscope = rt->rt_ifp->if_index; in ip6_forward() 184 adjust_scope_and_pktlen(m, &ifscope, &mpktlen); in ip6_forward() 191 if (ifscope != IFSCOPE_NONE && (rt = ip6forward_rt->ro_rt) != NULL) { in ip6_forward() 193 if (rt->rt_ifp->if_index != ifscope) { in ip6_forward() 259 proxy = nd6_prproxy_isours(m, ip6, ip6forward_rt, ifscope); in ip6_forward() 437 RTF_PRCLONING, ifscope); in ip6_forward() 471 RTF_PRCLONING, ifscope); in ip6_forward()
|
| H A D | in6_pcb.c | 630 unsigned int ifscope; in in6_pcbladdr() local 663 ifscope = (inp->inp_flags & INP_BOUND_IF) ? in in6_pcbladdr() 676 &inp->in6p_route, outif, &src_storage, ifscope, &error); in in6_pcbladdr() 948 in6_sockaddr(in_port_t port, struct in6_addr *addr_p, uint32_t ifscope) in in6_sockaddr() argument 961 sin6->sin6_scope_id = ifscope; in in6_sockaddr() 963 in6_verify_ifscope(&sin6->sin6_addr, ifscope); in in6_sockaddr() 978 struct sockaddr_in6 *sin6, uint32_t ifscope) in in6_sockaddr_s() argument 988 sin6->sin6_scope_id = ifscope; in in6_sockaddr_s() 990 in6_verify_ifscope(&sin6->sin6_addr, ifscope); in in6_sockaddr_s() 1233 u_int lport_arg, uint32_t ifscope, int wild_okay) in in6_pcblookup_local() argument [all …]
|
| H A D | nd6_rtr.c | 928 unsigned int ifscope; in defrouter_addreq() local 1027 rtflags, &newrt, ifscope); in defrouter_addreq() 1036 if (ifscope != IFSCOPE_NONE) { in defrouter_addreq() 1105 unsigned int ifscope; in defrouter_delreq() local 1155 ifscope = IFSCOPE_NONE; in defrouter_delreq() 1177 if (ifscope != IFSCOPE_NONE) { in defrouter_delreq() 3639 unsigned int ifscope) in nd6_prefix_onlink_common() argument 3686 ifscope = IFSCOPE_NONE; in nd6_prefix_onlink_common() 3784 rtflags, &rt, ifscope); in nd6_prefix_onlink_common() 3890 unsigned int ifscope; in nd6_prefix_offlink() local [all …]
|
| H A D | in6_pcb.h | 114 extern struct sockaddr *in6_sockaddr(in_port_t port, struct in6_addr *addr_p, uint32_t ifscope);
|
| H A D | scope6.c | 499 in6_verify_ifscope(const struct in6_addr *in6, uint32_t ifscope) in in6_verify_ifscope() argument 506 VERIFY(ntohs(in6->s6_addr16[1]) == ifscope); in in6_verify_ifscope()
|
| H A D | raw_ip6.c | 1074 uint32_t ifscope = IFSCOPE_NONE; in rip6_bind() local 1096 if ((error = sa6_embedscope(&sin6, ip6_use_defzone, &ifscope)) != 0) { in rip6_bind() 1126 inp->inp_lifscope = ifscope; in rip6_bind() 1142 unsigned int ifscope; in rip6_connect() local 1181 ifscope = (inp->inp_flags & INP_BOUND_IF) ? in rip6_connect() 1187 &src_ifp, &storage, ifscope, &error); in rip6_connect()
|
| H A D | in6_mcast.c | 374 &gsin6->sin6_addr, pinm->ifscope, gsin6->sin6_scope_id)) { in im6o_match_group() 536 VERIFY(in6_are_addr_equal_scoped(&inm->in6m_addr, group, inm->ifscope, ifp->if_index)); in in6_mc_get() 582 inm->ifscope = in6_addr2scopeid(ifp, &inm->in6m_addr); in in6_mc_get() 1929 unsigned int ifscope = IFSCOPE_NONE; in in6p_lookup_mcast_ifp() local 1940 ifscope = in6p->inp_boundifp->if_index; in in6p_lookup_mcast_ifp() 1946 rtalloc_scoped_ign((struct route *)&ro6, 0, ifscope); in in6p_lookup_mcast_ifp() 3140 uint32_t ifscope = IFSCOPE_NONE; variable 3141 (void)in6_setscope(&mcaddr, ifp, &ifscope); 3151 if (!in6_are_addr_equal_scoped(&inm->in6m_addr, &mcaddr, inm->ifscope, ifscope)) { 3207 in6m->ifscope = IFSCOPE_NONE; in in6_multi_alloc()
|
| H A D | ipsec.h | 429 struct in6_addr *ip6, u_int16_t port, uint32_t ifscope);
|
| H A D | in6_var.h | 1001 uint32_t ifscope; /* IP6 address scope */ member 1245 extern void in6_ip6_to_sockaddr(const struct in6_addr *ip6, u_int16_t port, uint32_t ifscope,
|
| /xnu-11215/bsd/netinet/ |
| H A D | mp_pcb.c | 326 uint32_t ifscope; in mp_getaddr_v6() local 331 ifscope = mpte->__mpte_src_v6.sin6_scope_id; in mp_getaddr_v6() 335 ifscope = mpte->__mpte_dst_v6.sin6_scope_id; in mp_getaddr_v6() 338 *nam = in6_sockaddr(port, &addr, ifscope); in mp_getaddr_v6()
|
| H A D | ip_output.c | 308 unsigned int ifscope = IFSCOPE_NONE; in ip_output_list() local 447 ifscope = ipoa->ipoa_boundif; in ip_output_list() 460 ifscope = IFSCOPE_NONE; in ip_output_list() 705 ia0 = in_selectsrcif(ip, ro, ifscope); in ip_output_list() 756 if (ifscope == IFSCOPE_NONE) { in ip_output_list() 757 ifscope = ia0->ifa_ifp->if_index; in ip_output_list() 806 if (ifscope == lo_ifp->if_index) { in ip_output_list() 3130 unsigned int scope = ifscope; in in_selectsrcif() 3163 ifscope = IFSCOPE_NONE; in in_selectsrcif() 3175 s_src, s_dst, ifscope, scope, in in_selectsrcif() [all …]
|
| H A D | in_private.h | 106 __uint32_t ifscope; member 109 #define sin_scope_id un._in_index.ifscope
|
| H A D | in_pcb.c | 1573 unsigned int ifscope, struct ifnet **outif, int raw) in in_pcbladdr() argument 1634 if (ifscope == IFSCOPE_NONE && (inp->inp_flags & INP_BOUND_IF)) { in in_pcbladdr() 1635 ifscope = inp->inp_boundifp->if_index; in in_pcbladdr() 1666 rtalloc_scoped(ro, ifscope); in in_pcbladdr() 1687 ia = ifatoia(ifa_ifwithnet_scoped(SA(&sin), ifscope)); in in_pcbladdr() 1753 ia = ifatoia(ifa_ifwithaddr_scoped(SA(&sin), ifscope)); in in_pcbladdr() 1756 ia = ifatoia(ifa_ifwithnet_scoped(SA(&sin), ifscope)); in in_pcbladdr() 1868 unsigned int ifscope, struct ifnet **outif) in in_pcbconnect() argument 3241 if ((ifscope > (unsigned)if_index) || (ifscope != IFSCOPE_NONE && in inp_bindif() 3242 (ifp = ifindex2ifnet[ifscope]) == NULL)) { in inp_bindif() [all …]
|
| H A D | tcp_subr.c | 954 ip6oa.ip6oa_boundif = tra->ifscope; in tcp_respond() 959 if (tra->ifscope != IFSCOPE_NONE) { in tcp_respond() 1022 ipoa.ipoa_boundif = tra->ifscope; in tcp_respond() 1027 if (tra->ifscope != IFSCOPE_NONE) { in tcp_respond() 2326 u_short ifscope = IFSCOPE_NONE; in tcp_handle_msgsize() local 2370 ifscope = (rt->rt_ifp != NULL) ? in tcp_handle_msgsize() 2373 ifscope = (inp->inp_last_outifp != NULL) ? in tcp_handle_msgsize() 3019 unsigned int ifscope; in tcp_rtlookup() local 3032 ifscope = (inp->inp_flags & INP_BOUND_IF) ? in tcp_rtlookup() 3035 rtalloc_scoped(ro, ifscope); in tcp_rtlookup() [all …]
|
| H A D | tcp_usrreq.c | 686 struct proc *p, uint32_t ifscope, sae_associd_t aid, sae_connid_t *pcid, in tcp_usr_connectx_common() argument 705 inp_update_necp_policy(inp, src, dst, ifscope); in tcp_usr_connectx_common() 714 if (ifscope != IFSCOPE_NONE && in tcp_usr_connectx_common() 715 (error = inp_bindif(inp, ifscope, NULL)) != 0) { in tcp_usr_connectx_common() 785 struct sockaddr *dst, struct proc *p, uint32_t ifscope, in tcp_usr_connectx() argument 789 return tcp_usr_connectx_common(so, AF_INET, src, dst, p, ifscope, aid, in tcp_usr_connectx() 846 struct sockaddr *dst, struct proc *p, uint32_t ifscope, in tcp6_usr_connectx() argument 850 return tcp_usr_connectx_common(so, AF_INET6, src, dst, p, ifscope, aid, in tcp6_usr_connectx()
|
| H A D | udp_usrreq.c | 2394 struct proc *p, uint32_t ifscope, sae_associd_t aid, sae_connid_t *pcid, in udp_connectx_common() argument 2413 inp_update_necp_policy(inp, src, dst, ifscope); in udp_connectx_common() 2417 if (ifscope != IFSCOPE_NONE && in udp_connectx_common() 2418 (error = inp_bindif(inp, ifscope, NULL)) != 0) { in udp_connectx_common() 2486 struct sockaddr *dst, struct proc *p, uint32_t ifscope, in udp_connectx() argument 2491 p, ifscope, aid, pcid, flags, arg, arglen, uio, bytes_written); in udp_connectx()
|
| H A D | mptcp_usrreq.c | 272 struct sockaddr *dst, uint32_t ifscope, sae_connid_t *pcid) in mptcp_connectx() argument 279 error = mptcp_subflow_add(mpte, src, dst, ifscope, pcid); in mptcp_connectx() 289 struct sockaddr *dst, struct proc *p, uint32_t ifscope, in mptcp_usr_connectx() argument 384 error = mptcp_connectx(mpte, src, dst, ifscope, pcid); in mptcp_usr_connectx()
|
| H A D | in_arp.c | 1133 route_t *route, unsigned int ifscope) in arp_lookup_route() argument 1151 ifscope = IFSCOPE_NONE; in arp_lookup_route() 1154 rt = rtalloc1_scoped(SA(&sin), create, 0, ifscope); in arp_lookup_route() 1176 __func__, ifscope, inet_ntop(AF_INET, addr, tmp, in arp_lookup_route()
|
| H A D | tcp_input.c | 2038 unsigned int ifscope; in tcp_input() local 2260 ifscope = IFSCOPE_NONE; in tcp_input() 2262 ifscope = m->m_pkthdr.rcvif->if_index; in tcp_input() 2301 ifscope = inp->inp_boundifp->if_index; in tcp_input() 3077 tcp_finalize_options(tp, &to, ifscope); in tcp_input() 3572 tcp_finalize_options(tp, &to, ifscope); in tcp_input() 6059 tra.ifscope = ifscope; in tcp_input() 6263 tcp_finalize_options(struct tcpcb *tp, struct tcpopt *to, unsigned int ifscope) in tcp_finalize_options() argument 6271 tcp_mss(tp, to->to_mss, ifscope); in tcp_finalize_options()
|
| /xnu-11215/tests/skywalk/ |
| H A D | skt_filter.c | 1136 int fd, remain, bytes, ifscope, error = 0; in sender_socket_thread() local 1143 ifscope = if_nametoindex(FETH1_NAME); in sender_socket_thread() 1144 assert(ifscope != 0); in sender_socket_thread() 1145 error = setsockopt(fd, IPPROTO_IP, IP_BOUND_IF, &ifscope, in sender_socket_thread() 1146 sizeof(ifscope)); in sender_socket_thread()
|
| /xnu-11215/bsd/kern/ |
| H A D | netboot.c | 482 struct in_addr m, uint32_t more_flags, unsigned int ifscope) in route_cmd() argument 511 (struct sockaddr *)&gw, (struct sockaddr *)&mask, flags, NULL, ifscope); in route_cmd()
|