Lines Matching full:route
88 /* Function to parse the route entry returned by netlink
89 * Updates the route entry related map entries
104 } route; in read_route() local
116 memset(&route, 0, sizeof(route)); in read_route()
148 route.dst = atoi(dsts); in read_route()
149 route.dst_len = atoi(dsts_len); in read_route()
150 route.gw = atoi(gws); in read_route()
151 route.iface = atoi(ifs); in read_route()
152 route.metric = atoi(metrics); in read_route()
153 assert(get_mac_addr(route.iface, &route.mac) == 0); in read_route()
155 &route.iface, &route.iface, 0) == 0); in read_route()
169 prefix_key->prefixlen = route.dst_len; in read_route()
170 direct_entry.mac = route.mac & 0xffffffffffff; in read_route()
171 direct_entry.ifindex = route.iface; in read_route()
174 if (route.dst_len == 32) { in read_route()
177 &route.dst) == 0); in read_route()
180 &route.dst, in read_route()
182 direct_entry.arp.dst = route.dst; in read_route()
184 &route.dst, in read_route()
189 prefix_key->data[i] = (route.dst >> i * 8) & 0xff; in read_route()
195 prefix_value->value = route.mac & 0xffffffffffff; in read_route()
196 prefix_value->ifindex = route.iface; in read_route()
197 prefix_value->gw = route.gw; in read_route()
198 prefix_value->metric = route.metric; in read_route()
209 /* Rereading the route table to check if in read_route()
223 route.metric >= prefix_value->metric) { in read_route()
230 route.mac & 0xffffffffffff; in read_route()
231 prefix_value->ifindex = route.iface; in read_route()
232 prefix_value->gw = route.gw; in read_route()
233 prefix_value->metric = route.metric; in read_route()
241 memset(&route, 0, sizeof(route)); in read_route()
246 memset(&route, 0, sizeof(route)); in read_route()
250 /* Function to read the existing route table when the process is launched*/
448 /* Function to keep track and update changes in route and arp table
496 /* dump route and arp tables */ in monitor_routes_thread()
503 fprintf(stderr, "Failed reading route table\n"); in monitor_routes_thread()