Lines Matching defs:default_route
42 struct default_route_data *default_route = data;
47 if(default_route->reply_found_route) { // we already found our route
55 if((rt_p->rtm_family != default_route->request_family) || (rt_p->rtm_table != RT_TABLE_MAIN)) { // not a route we care about
75 if(this_interface_id == default_route->request_interface_id) {
76 default_route->reply_found_route = 1;
78 memcpy(&default_route->reply_gateway, this_gateway, this_gateway_size);
79 default_route->reply_has_gateway = 1;
81 default_route->reply_has_gateway = 0;
103 * default_route - requested family and interface, and response storage
105 int get_default_route(struct default_route_data *default_route) {
111 default_route->reply_has_gateway = 0;
112 default_route->reply_found_route = 0;
115 msg.rtm_family = default_route->request_family;
125 // get_default_route_cb sets the response fields in default_route
126 nl_cb_set(callbacks, NL_CB_VALID, NL_CB_CUSTOM, get_default_route_cb, default_route);