• Home
  • Raw
  • Download

Lines Matching refs:gw

49 static struct ip_addr *dst, *gw, *rhost;  variable
132 gw_len = save_item((void **)&gw, g_opt, save_ip); in setup()
179 struct sockaddr *dst, struct sockaddr *gw, int type) in brk_on_route_error() argument
183 if (gw) in brk_on_route_error()
184 tst_sock_addr(gw, sizeof(gw), gw_str, sizeof(gw_str)); in brk_on_route_error()
188 iface, dst_str, gw ? gw_str : "null"); in brk_on_route_error()
192 static void rtnl_route(int iface, struct addrinfo *dst, struct addrinfo *gw, in rtnl_route() argument
221 rtm->rtm_scope = gw ? RT_SCOPE_UNIVERSE : RT_SCOPE_LINK; in rtnl_route()
234 if (gw) { in rtnl_route()
236 gw_in6 = ((struct sockaddr_in6 *)gw->ai_addr)->sin6_addr; in rtnl_route()
239 gw_ip = ((struct sockaddr_in *)gw->ai_addr)->sin_addr.s_addr; in rtnl_route()
246 brk_on_route_error("mnl_socket_open", iface, dst->ai_addr, gw ? in rtnl_route()
247 gw->ai_addr : NULL, type); in rtnl_route()
250 brk_on_route_error("mnl_socket_bind", iface, dst->ai_addr, gw ? in rtnl_route()
251 gw->ai_addr : NULL, type); in rtnl_route()
256 brk_on_route_error("mnl_socket_sendto", iface, dst->ai_addr, gw in rtnl_route()
257 ? gw->ai_addr : NULL, type); in rtnl_route()
262 gw ? gw->ai_addr : NULL, type); in rtnl_route()
266 brk_on_route_error("mnl_cb_run", iface, dst->ai_addr, gw ? in rtnl_route()
267 gw->ai_addr : NULL, type); in rtnl_route()
286 struct ip_addr *p_dst = dst, *p_gw = gw, *p_rhost = rhost; in run()
290 rtnl_route(p_iface->index, p_dst->ip, gw ? p_gw->ip : NULL, in run()
293 rtnl_route(p_iface->index, p_dst->ip, gw ? p_gw->ip : NULL, in run()
296 if (gw) in run()
297 p_gw = p_gw->next ?: gw; in run()