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

Lines Matching defs:ifscope

212 			__uint32_t	ifscope;
215 #define sin_ifscope un._in_index.ifscope
232 unsigned int ifscope; /* interface scope */
268 * Set the ifscope of the primary interface; caller holds rt_mtx.
271 set_primary_ifscope(unsigned int ifscope)
273 primary_ifscope = ifscope;
277 * Return the ifscope of the primary interface; caller holds rt_mtx.
286 * Embed ifscope into a given a sockaddr_in.
289 sa_set_ifscope(struct sockaddr *sa, unsigned int ifscope)
294 SINIFSCOPE(sa)->sin_ifscope = ifscope;
298 * Given a sockaddr_in, return the embedded ifscope to the caller.
310 * Copy a sockaddr_in src to dst and embed ifscope into dst.
313 sin_copy(struct sockaddr_in *src, struct sockaddr_in *dst, unsigned int ifscope)
316 sa_set_ifscope(SA(dst), ifscope);
322 * Copy a mask from src to a sockaddr_in dst and embed ifscope into dst.
325 mask_copy(struct sockaddr *src, struct sockaddr_in *dst, unsigned int ifscope)
333 * to cover the additional sin_ifscope field; when ifscope is
334 * IFSCOPE_NONE, we'd end up clearing the embedded ifscope on
340 SINIFSCOPE(dst)->sin_ifscope = ifscope;
361 return (SINIFSCOPE(rt_key(rt))->sin_ifscope == ma->ifscope);
430 rtalloc_scoped_ign_locked(struct route *ro, u_long ignore, unsigned int ifscope)
432 return (rtalloc_ign_common_locked(ro, ignore, ifscope));
437 unsigned int ifscope)
447 ro->ro_rt = rtalloc1_common_locked(&ro->ro_dst, 1, ignore, ifscope);
468 unsigned int ifscope)
470 return (rtalloc1_common_locked(dst, report, ignflags, ifscope));
479 unsigned int ifscope)
494 rt = rt_lookup(FALSE, dst, NULL, rnh, ifscope);
811 unsigned int ifscope = (ifp != NULL) ? ifp->if_index : IFSCOPE_NONE;
822 if ((ifa = ifa_ifwithnet_scoped(gateway, ifscope)) == NULL) {
828 rt = rtalloc1_scoped_locked(dst, 0, RTF_CLONING|RTF_PRCLONING, ifscope);
832 src = sin_copy(SIN(src), &sin, ifscope);
883 gateway, netmask, flags, NULL, ifscope);
965 const struct sockaddr *gateway, unsigned int ifscope)
967 if (ifscope != IFSCOPE_NONE)
972 return (ifa_ifwithroute_common_locked(flags, dst, gateway, ifscope));
977 const struct sockaddr *gateway, unsigned int ifscope)
1009 ifa = ifa_ifwithaddr_scoped(gateway, ifscope);
1019 ifa = ifa_ifwithnet_scoped(gateway, ifscope);
1023 0, 0UL, ifscope);
1052 0, 0UL, ifscope)) != NULL) {
1066 ifa != NULL && ifa->ifa_ifp->if_index != ifscope) {
1095 struct rtentry **ret_nrt, unsigned int ifscope)
1097 if (ifscope != IFSCOPE_NONE)
1103 flags, ret_nrt, ifscope));
1124 struct rtentry **ret_nrt, unsigned int ifscope)
1166 if (ifscope == IFSCOPE_NONE) {
1169 /* Embed ifscope into the key (local copy) */
1170 dst = sin_copy(SIN(dst), &sin, ifscope);
1172 /* Embed ifscope into netmask (local copy) */
1174 netmask = mask_copy(netmask, &mask, ifscope);
1242 * the interface index used for the primary ifscope.
1283 ifscope = sa_get_ifscope(rt_key(rt));
1285 ifscope = rt->rt_ifp->if_index;
1289 ifscope = IFSCOPE_NONE;
1293 /* Embed or clear ifscope into/from the key (local copy) */
1294 dst = sin_copy(SIN(dst), &sin, ifscope);
1296 /* Embed or clear ifscope into/from netmask (local copy) */
1298 netmask = mask_copy(netmask, &mask, ifscope);
1308 gateway, ifscope);
1365 RTF_CLONING | RTF_PRCLONING, ifscope);
1439 * the interface index used for the primary ifscope.
1599 unsigned int ifscope;
1601 ifscope = (dst->sa_family == AF_INET) ?
1604 gwrt = rtalloc1_scoped_locked(gate, 1, RTF_PRCLONING, ifscope);
1626 if (ifscope != IFSCOPE_NONE && (rt->rt_flags & RTF_IFSCOPE) &&
1628 gwrt->rt_ifp->if_index != ifscope) {
1641 * primary ifscope. Also done in rt_setif() to take care
1745 * Lookup an AF_INET scoped or non-scoped route depending on the ifscope
1750 unsigned int ifscope)
1755 struct matchleaf_arg ma = { ifscope };
1763 * Embed ifscope into the search key; for a non-scoped
1766 dst = sin_copy(SIN(dst), &sin, ifscope);
1768 /* Embed (or clear) ifscope into netmask */
1770 netmask = mask_copy(netmask, &mask, ifscope);
1772 if (ifscope == IFSCOPE_NONE)
1817 struct radix_node_head *rnh, unsigned int ifscope)
1820 boolean_t dontcare = (ifscope == IFSCOPE_NONE);
1853 if (dontcare && (ifscope = get_primary_ifscope()) == IFSCOPE_NONE)
1869 if (rt->rt_ifp->if_index != ifscope) {
1879 ifscope = rt->rt_ifp->if_index;
1901 rn = node_lookup(dst, netmask, ifscope);
1924 RT(rn)->rt_ifp->if_index != ifscope)