Lines Matching defs:gateway
179 * @gateway: gateway to go via
188 rib_add_redirect(u_int fibnum, struct sockaddr *dst, struct sockaddr *gateway,
207 /* Get the best ifa for the given interface and gateway. */
208 if ((ifa = ifaof_ifpforaddr(gateway, ifp)) == NULL)
214 info.rti_info[RTAX_GATEWAY] = gateway;
239 info.rti_info[RTAX_GATEWAY] = gateway;
269 const struct sockaddr *gateway, u_int fibnum)
286 ifa = ifa_ifwithaddr(gateway);
290 * or host, the gateway may still be on the
293 ifa = ifa_ifwithdstaddr(gateway, fibnum);
296 ifa = ifa_ifwithnet(gateway, 0, fibnum);
300 nh = rib_lookup(fibnum, gateway, NHR_NONE, 0);
303 * dismiss a gateway that is reachable only
368 /* Copy gateway is set && dst is non-zero */
515 const struct sockaddr *dst, *gateway, *ifpaddr, *ifaaddr;
520 gateway = info->rti_info[RTAX_GATEWAY];
556 * 2) gateway address
557 * Note: for interface routes link-level gateway address
559 * specifying RTF_GATEWAY. In this case, ignore gateway
560 * Note: gateway AF may be different from dst AF. In this case,
561 * ignore gateway
565 * try to lookup gateway or dst in the routing table to get ifa
570 gateway->sa_family == dst->sa_family)
571 sa = gateway;
577 if (info->rti_ifa == NULL && gateway != NULL)
578 info->rti_ifa = ifaof_ifpforaddr(gateway, info->rti_ifp);
579 } else if (dst != NULL && gateway != NULL)
580 info->rti_ifa = ifa_ifwithroute(flags, dst, gateway,