Lines Matching refs:ifscope

334 			__uint32_t	ifscope;
337 #define sin_scope_id un._in_index.ifscope
360 unsigned int ifscope; /* interface scope */
414 * Set the ifscope of the primary interface; caller holds rnh_lock.
417 set_primary_ifscope(int af, unsigned int ifscope)
420 primary_ifscope = ifscope;
422 primary6_ifscope = ifscope;
426 * Return the ifscope of the primary interface; caller holds rnh_lock.
438 sin_set_ifscope(struct sockaddr *sa, unsigned int ifscope)
443 SINIFSCOPE(sa)->sin_scope_id = ifscope;
450 sin6_set_ifscope(struct sockaddr *sa, unsigned int ifscope)
455 SIN6IFSCOPE(sa)->sin6_scope_id = ifscope;
483 sin6_set_embedded_ifscope(struct sockaddr *sa, unsigned int ifscope)
489 SIN6(sa)->sin6_addr.s6_addr16[1] = htons(ifscope);
505 * in a non-NULL pifscope with non-zero ifscope. Otherwise if pifscope is
506 * non-NULL and ifscope is IFSCOPE_NONE, the existing scope ID is left intact.
515 unsigned int ifscope = (pifscope != NULL) ? *pifscope : IFSCOPE_NONE;
523 if (pifscope == NULL || ifscope != IFSCOPE_NONE)
524 sin_set_ifscope(SA(dst), ifscope);
537 if (eifscope != IFSCOPE_NONE && ifscope == IFSCOPE_NONE)
538 ifscope = eifscope;
539 sin6_set_ifscope(SA(dst), ifscope);
544 if (ifscope != IFSCOPE_NONE && eifscope != ifscope)
545 sin6_set_embedded_ifscope(SA(dst), ifscope);
546 } else if (pifscope == NULL || ifscope != IFSCOPE_NONE) {
547 sin6_set_ifscope(SA(dst), ifscope);
564 unsigned int ifscope)
573 * to cover the additional {sin,sin6}_ifscope field; when ifscope
581 SINIFSCOPE(dst)->sin_scope_id = ifscope;
586 SIN6IFSCOPE(dst)->sin6_scope_id = ifscope;
723 (SINIFSCOPE(rt_key(rt))->sin_scope_id == ma->ifscope) :
724 (SIN6IFSCOPE(rt_key(rt))->sin6_scope_id == ma->ifscope));
795 rtalloc_scoped(struct route *ro, unsigned int ifscope)
797 rtalloc_scoped_ign(ro, 0, ifscope);
802 unsigned int ifscope)
817 ro->ro_rt = rtalloc1_common_locked(&ro->ro_dst, 1, ignore, ifscope);
834 rtalloc_scoped_ign(struct route *ro, uint32_t ignore, unsigned int ifscope)
838 rtalloc_ign_common_locked(ro, ignore, ifscope);
850 unsigned int ifscope)
852 return (rtalloc1_common_locked(dst, report, ignflags, ifscope));
861 unsigned int ifscope)
876 rt = rt_lookup(FALSE, dst, NULL, rnh, ifscope);
953 unsigned int ifscope)
958 entry = rtalloc1_scoped_locked(dst, report, ignflags, ifscope);
1238 unsigned int ifscope = (ifp != NULL) ? ifp->if_index : IFSCOPE_NONE;
1254 src = sa_copy(src, &ss, &ifscope);
1261 if ((ifa = ifa_ifwithnet_scoped(gateway, ifscope)) == NULL) {
1267 rt = rtalloc1_scoped_locked(dst, 0, RTF_CLONING|RTF_PRCLONING, ifscope);
1329 gateway, netmask, flags, NULL, ifscope);
1416 const struct sockaddr *gateway, unsigned int ifscope)
1418 if (ifscope != IFSCOPE_NONE)
1423 return (ifa_ifwithroute_common_locked(flags, dst, gateway, ifscope));
1428 const struct sockaddr *gw, unsigned int ifscope)
1471 ifa = ifa_ifwithaddr_scoped(gw, ifscope);
1481 ifa = ifa_ifwithnet_scoped(gw, ifscope);
1485 0, 0, ifscope);
1524 0, 0, ifscope)) != NULL) {
1543 ifa != NULL && ifa->ifa_ifp->if_index != ifscope) {
1570 struct rtentry **ret_nrt, unsigned int ifscope)
1572 if (ifscope != IFSCOPE_NONE)
1578 flags, ret_nrt, ifscope));
1599 struct rtentry **ret_nrt, unsigned int ifscope)
1648 dst = sa_copy(dst, &ss, &ifscope);
1652 netmask = ma_copy(af, netmask, &mask, ifscope);
1654 if (ifscope != IFSCOPE_NONE)
1666 ifscope = IFSCOPE_NONE;
1669 if (ifscope == IFSCOPE_NONE)
1754 * the interface index used for the primary ifscope.
1829 ifscope = IFSCOPE_NONE;
1833 ifscope = (af == AF_INET) ?
1837 ifscope = rt->rt_ifp->if_index;
1840 VERIFY(ifscope != IFSCOPE_NONE);
1845 * clearing out the scope ID field if ifscope isn't set.
1847 dst = sa_copy(dst, &ss, (ifscope == IFSCOPE_NONE) ?
1848 NULL : &ifscope);
1852 netmask = ma_copy(af, netmask, &mask, ifscope);
1862 gateway, ifscope);
1928 RTF_CLONING | RTF_PRCLONING, ifscope);
2019 * the interface index used for the primary ifscope.
2080 unsigned int ifscope)
2086 ret_nrt, ifscope);
2306 unsigned int ifscope;
2309 ifscope = sin_get_ifscope(dst);
2311 ifscope = sin6_get_ifscope(dst);
2313 ifscope = IFSCOPE_NONE;
2321 gwrt = rtalloc1_scoped_locked(gate, 1, RTF_PRCLONING, ifscope);
2352 if (ifscope != IFSCOPE_NONE && (rt->rt_flags & RTF_IFSCOPE) &&
2354 gwrt->rt_ifp->if_index != ifscope) {
2377 * primary ifscope. Also done in rt_setif() to take care
2557 * ifscope value passed in by the caller (IFSCOPE_NONE implies non-scoped).
2561 unsigned int ifscope)
2567 struct matchleaf_arg ma = { ifscope };
2578 * clearing out the scope ID field if ifscope isn't set.
2580 dst = sa_copy(dst, &ss, (ifscope == IFSCOPE_NONE) ? NULL : &ifscope);
2584 netmask = ma_copy(af, netmask, &mask, ifscope);
2586 if (ifscope == IFSCOPE_NONE)
2636 struct radix_node_head *rnh, unsigned int ifscope)
2681 dst = sa_copy(dst, &dst_ss, &ifscope);
2683 netmask = ma_copy(af, netmask, &mask_ss, ifscope);
2684 dontcare = (ifscope == IFSCOPE_NONE);
2699 * any reason, there is no primary interface, ifscope will be
2705 ifscope = get_primary_ifscope(af);
2721 if (rt->rt_ifp->if_index != ifscope) {
2731 ifscope = rt->rt_ifp->if_index;
2753 rn = node_lookup(dst, netmask, ifscope);
2776 RT(rn)->rt_ifp->if_index != ifscope)
3543 * local copies to get rid of any ifscope association.