Lines Matching refs:gw
1650 const struct sockaddr *gw, unsigned int ifscope) in ifa_ifwithroute_common_locked() argument
1665 const struct sockaddr_in6 *gw_addr = (const struct sockaddr_in6*)(const void*)gw; in ifa_ifwithroute_common_locked()
1693 if (gw != NULL && in ifa_ifwithroute_common_locked()
1694 ((gw->sa_family == AF_INET) || in ifa_ifwithroute_common_locked()
1695 (gw->sa_family == AF_INET6))) { in ifa_ifwithroute_common_locked()
1696 gw = sa_copy(SA((uintptr_t)gw), &gw_ss, IN6_NULL_IF_EMBEDDED_SCOPE(&ifscope)); in ifa_ifwithroute_common_locked()
1711 ifa = ifa_ifwithaddr_scoped(gw, ifscope); in ifa_ifwithroute_common_locked()
1719 ifa = ifa_ifwithdstaddr(gw); in ifa_ifwithroute_common_locked()
1722 ifa = ifa_ifwithnet_scoped(gw, ifscope); in ifa_ifwithroute_common_locked()
1763 if ((ifa == NULL || (gw != NULL && in ifa_ifwithroute_common_locked()
1764 !equal(ifa->ifa_addr, (struct sockaddr *)(size_t)gw))) && in ifa_ifwithroute_common_locked()
1765 (rt = rtalloc1_scoped_locked((struct sockaddr *)(size_t)gw, in ifa_ifwithroute_common_locked()
4173 struct sockaddr *gw = (struct sockaddr *)&ss; in route_to_gwroute() local
4180 bcopy(rt->rt_gateway, gw, MIN(sizeof(ss), in route_to_gwroute()
4182 gw->sa_len = MIN(sizeof(ss), rt->rt_gateway->sa_len); in route_to_gwroute()
4198 bcopy(rt->rt_gateway, gw, MIN(sizeof(ss), in route_to_gwroute()
4200 gw->sa_len = MIN(sizeof(ss), rt->rt_gateway->sa_len); in route_to_gwroute()
4205 gwrt = rtalloc1_scoped_locked(gw, 1, 0, ifindex); in route_to_gwroute()
4214 gwrt == rt || !equal(gw, rt->rt_gateway)) { in route_to_gwroute()