Lines Matching full:gateway

181  * @gateway: gateway to go via
190 rib_add_redirect(u_int fibnum, struct sockaddr *dst, struct sockaddr *gateway, in rib_add_redirect() argument
208 /* Get the best ifa for the given interface and gateway. */ in rib_add_redirect()
209 if ((ifa = ifaof_ifpforaddr(gateway, ifp)) == NULL) in rib_add_redirect()
216 nhop_set_gw(nh, gateway, flags & RTF_GATEWAY); in rib_add_redirect()
239 .rti_info[RTAX_GATEWAY] = gateway, in rib_add_redirect()
270 const struct sockaddr *gateway, u_int fibnum) in ifa_ifwithroute() argument
287 ifa = ifa_ifwithaddr(gateway); in ifa_ifwithroute()
291 * or host, the gateway may still be on the in ifa_ifwithroute()
294 ifa = ifa_ifwithdstaddr(gateway, fibnum); in ifa_ifwithroute()
297 ifa = ifa_ifwithnet(gateway, 0, fibnum); in ifa_ifwithroute()
301 nh = rib_lookup(fibnum, gateway, NHR_NONE, 0); in ifa_ifwithroute()
304 * dismiss a gateway that is reachable only in ifa_ifwithroute()
394 * Calculates proper ifa/ifp for the cases when gateway AF is different
437 const struct sockaddr *dst, *gateway, *ifaaddr; in rt_getifa_fib() local
441 gateway = info->rti_info[RTAX_GATEWAY]; in rt_getifa_fib()
461 (gateway->sa_family != dst->sa_family)) in rt_getifa_fib()
473 * 2) gateway address in rt_getifa_fib()
474 * Note: for interface routes link-level gateway address in rt_getifa_fib()
476 * specifying RTF_GATEWAY. In this case, ignore gateway in rt_getifa_fib()
477 * Note: gateway AF may be different from dst AF. In this case, in rt_getifa_fib()
478 * ignore gateway in rt_getifa_fib()
482 * try to lookup gateway or dst in the routing table to get ifa in rt_getifa_fib()
487 gateway->sa_family == dst->sa_family) in rt_getifa_fib()
488 sa = gateway; in rt_getifa_fib()
494 if (info->rti_ifa == NULL && gateway != NULL) in rt_getifa_fib()
495 info->rti_ifa = ifaof_ifpforaddr(gateway, info->rti_ifp); in rt_getifa_fib()
496 } else if (dst != NULL && gateway != NULL) in rt_getifa_fib()
497 info->rti_ifa = ifa_ifwithroute(flags, dst, gateway, in rt_getifa_fib()