Lines Matching refs:ifscope

347 	unsigned int	ifscope;	/* interface scope */
468 * Set the ifscope of the primary interface; caller holds rnh_lock.
471 set_primary_ifscope(int af, unsigned int ifscope)
474 primary_ifscope = ifscope;
476 primary6_ifscope = ifscope;
480 * Return the ifscope of the primary interface; caller holds rnh_lock.
492 sin_set_ifscope(struct sockaddr *sa, unsigned int ifscope)
497 SINIFSCOPE(sa)->sin_scope_id = ifscope;
504 sin6_set_ifscope(struct sockaddr *sa, unsigned int ifscope)
509 SIN6IFSCOPE(sa)->sin6_scope_id = ifscope;
537 sin6_set_embedded_ifscope(struct sockaddr *sa, unsigned int ifscope)
543 SIN6(sa)->sin6_addr.s6_addr16[1] = htons(ifscope);
559 * in a non-NULL pifscope with non-zero ifscope. Otherwise if pifscope is
560 * non-NULL and ifscope is IFSCOPE_NONE, the existing scope ID is left intact.
569 unsigned int ifscope = (pifscope != NULL) ? *pifscope : IFSCOPE_NONE;
577 if (pifscope == NULL || ifscope != IFSCOPE_NONE)
578 sin_set_ifscope(SA(dst), ifscope);
591 if (eifscope != IFSCOPE_NONE && ifscope == IFSCOPE_NONE)
592 ifscope = eifscope;
593 sin6_set_ifscope(SA(dst), ifscope);
598 if (ifscope != IFSCOPE_NONE && eifscope != ifscope)
599 sin6_set_embedded_ifscope(SA(dst), ifscope);
600 } else if (pifscope == NULL || ifscope != IFSCOPE_NONE) {
601 sin6_set_ifscope(SA(dst), ifscope);
618 unsigned int ifscope)
627 * to cover the additional {sin,sin6}_ifscope field; when ifscope
635 SINIFSCOPE(dst)->sin_scope_id = ifscope;
640 SIN6IFSCOPE(dst)->sin6_scope_id = ifscope;
805 (SINIFSCOPE(rt_key(rt))->sin_scope_id == ma->ifscope) :
806 (SIN6IFSCOPE(rt_key(rt))->sin6_scope_id == ma->ifscope));
845 rtalloc_scoped(struct route *ro, unsigned int ifscope)
847 rtalloc_scoped_ign(ro, 0, ifscope);
852 unsigned int ifscope)
865 ro->ro_rt = rtalloc1_common_locked(&ro->ro_dst, 1, ignore, ifscope);
882 rtalloc_scoped_ign(struct route *ro, uint32_t ignore, unsigned int ifscope)
886 rtalloc_ign_common_locked(ro, ignore, ifscope);
898 unsigned int ifscope)
900 return (rtalloc1_common_locked(dst, report, ignflags, ifscope));
909 unsigned int ifscope)
924 rt = rt_lookup(FALSE, dst, NULL, rnh, ifscope);
1001 unsigned int ifscope)
1006 entry = rtalloc1_scoped_locked(dst, report, ignflags, ifscope);
1312 unsigned int ifscope = (ifp != NULL) ? ifp->if_index : IFSCOPE_NONE;
1329 src = sa_copy(src, &ss, &ifscope);
1336 if ((ifa = ifa_ifwithnet_scoped(gateway, ifscope)) == NULL) {
1342 rt = rtalloc1_scoped_locked(dst, 0, RTF_CLONING|RTF_PRCLONING, ifscope);
1404 gateway, netmask, flags, NULL, ifscope);
1496 const struct sockaddr *gateway, unsigned int ifscope)
1498 if (ifscope != IFSCOPE_NONE)
1503 return (ifa_ifwithroute_common_locked(flags, dst, gateway, ifscope));
1508 const struct sockaddr *gw, unsigned int ifscope)
1551 ifa = ifa_ifwithaddr_scoped(gw, ifscope);
1561 ifa = ifa_ifwithnet_scoped(gw, ifscope);
1565 0, 0, ifscope);
1604 0, 0, ifscope)) != NULL) {
1623 ifa != NULL && ifa->ifa_ifp->if_index != ifscope) {
1650 struct rtentry **ret_nrt, unsigned int ifscope)
1652 if (ifscope != IFSCOPE_NONE)
1658 flags, ret_nrt, ifscope));
1679 struct rtentry **ret_nrt, unsigned int ifscope)
1728 dst = sa_copy(dst, &ss, &ifscope);
1732 netmask = ma_copy(af, netmask, &mask, ifscope);
1734 if (ifscope != IFSCOPE_NONE)
1746 ifscope = IFSCOPE_NONE;
1749 if (ifscope == IFSCOPE_NONE)
1841 * the interface index used for the primary ifscope.
1921 ifscope = IFSCOPE_NONE;
1930 ifscope = (af == AF_INET) ?
1934 ifscope = rt->rt_ifp->if_index;
1937 VERIFY(ifscope != IFSCOPE_NONE);
1942 * clearing out the scope ID field if ifscope isn't set.
1944 dst = sa_copy(dst, &ss, (ifscope == IFSCOPE_NONE) ?
1945 NULL : &ifscope);
1949 netmask = ma_copy(af, netmask, &mask, ifscope);
1960 gateway, ifscope);
2042 RTF_CLONING | RTF_PRCLONING, ifscope);
2124 * the interface index used for the primary ifscope.
2194 unsigned int ifscope)
2200 ret_nrt, ifscope);
2420 unsigned int ifscope;
2423 ifscope = sin_get_ifscope(dst);
2425 ifscope = sin6_get_ifscope(dst);
2427 ifscope = IFSCOPE_NONE;
2435 gwrt = rtalloc1_scoped_locked(gate, 1, RTF_PRCLONING, ifscope);
2466 if (ifscope != IFSCOPE_NONE && (rt->rt_flags & RTF_IFSCOPE) &&
2468 gwrt->rt_ifp->if_index != ifscope) {
2491 * primary ifscope. Also done in rt_setif() to take care
2671 * ifscope value passed in by the caller (IFSCOPE_NONE implies non-scoped).
2675 unsigned int ifscope)
2681 struct matchleaf_arg ma = { ifscope };
2692 * clearing out the scope ID field if ifscope isn't set.
2694 dst = sa_copy(dst, &ss, (ifscope == IFSCOPE_NONE) ? NULL : &ifscope);
2698 netmask = ma_copy(af, netmask, &mask, ifscope);
2700 if (ifscope == IFSCOPE_NONE)
2750 struct sockaddr *netmask, struct radix_node_head *rnh, unsigned int ifscope)
2757 VERIFY(!coarse || ifscope == IFSCOPE_NONE);
2804 dst = sa_copy(dst, &dst_ss, &ifscope);
2806 netmask = ma_copy(af, netmask, &mask_ss, ifscope);
2807 dontcare = (ifscope == IFSCOPE_NONE);
2822 * any reason, there is no primary interface, ifscope will be
2828 ifscope = get_primary_ifscope(af);
2844 if (rt->rt_ifp->if_index != ifscope) {
2854 ifscope = rt->rt_ifp->if_index;
2876 rn = node_lookup(dst, netmask, ifscope);
2900 RT(rn)->rt_ifp->if_index != ifscope)
2926 struct radix_node_head *rnh, unsigned int ifscope)
2929 rnh, ifscope));
3805 * local copies to get rid of any ifscope association.