Lines Matching defs:gateway
822 * destination to go through the given gateway.
829 rtredirect(const struct sockaddr *dst, const struct sockaddr *gateway,
840 /* verify the gateway is directly reachable */
841 if ((ifa = ifa_ifwithnet_psref(gateway, &psref)) == NULL) {
859 _ifa = ifa_ifwithaddr(gateway);
890 info.rti_info[RTAX_GATEWAY] = gateway;
903 * Smash the current notion of the gateway to
913 error = rt_setgate(rt, gateway);
947 info.rti_info[RTAX_GATEWAY] = gateway;
984 const struct sockaddr *gateway, struct psref *psref)
996 if ((flags & RTF_HOST) && gateway->sa_family != AF_LINK)
999 ifa = ifa_ifwithaddr_psref(gateway, psref);
1003 * or host, the gateway may still be on the
1006 ifa = ifa_ifwithdstaddr_psref(gateway, psref);
1009 ifa = ifa_ifwithnet_psref(gateway, psref);
1014 rt = rtalloc1_locked(gateway, 0, true, true);
1058 rtrequest(int req, const struct sockaddr *dst, const struct sockaddr *gateway,
1066 info.rti_info[RTAX_GATEWAY] = gateway;
1101 const struct sockaddr *gateway = info->rti_info[RTAX_GATEWAY];
1113 (gateway != NULL ? gateway : dst);
1116 else if (dst != NULL && gateway != NULL)
1117 ifa = ifa_ifwithroute_psref(flags, dst, gateway, psref);
1150 const struct sockaddr *gateway = info->rti_info[RTAX_GATEWAY];
1240 rt_setgate(rt, gateway) != 0) {
1349 * gateway route if the current MTU, if the current MTU is
1350 * greater than the MTU of gateway.
1351 * Note that, if the MTU of gateway is 0, we will reset the
1442 * New gateway could require new ifaddr, ifp;
1473 * New gateway could require new ifaddr, ifp;
1573 struct sockaddr *gateway = rt->rt_gateway;
1575 if (gateway == NULL)
1578 switch(gateway->sa_family) {
1601 info.rti_info[RTAX_GATEWAY] = gateway;