Lines Matching full:route

119 /* Function to parse the route entry returned by netlink
120 * Updates the route entry related map entries
136 } route; in read_route() local
149 printf("DELETING Route entry\n"); in read_route()
151 printf("READING Route entry\n"); in read_route()
153 printf("NEW Route entry\n"); in read_route()
157 memset(&route, 0, sizeof(route)); in read_route()
190 route.dst = atoi(dsts); in read_route()
191 route.dst_len = atoi(dsts_len); in read_route()
192 route.gw = atoi(gws); in read_route()
193 route.iface = atoi(ifs); in read_route()
194 route.metric = atoi(metrics); in read_route()
195 route.iface_name = alloca(sizeof(char *) * IFNAMSIZ); in read_route()
196 route.iface_name = if_indextoname(route.iface, route.iface_name); in read_route()
197 route.mac = getmac(route.iface_name); in read_route()
198 if (route.mac == -1) in read_route()
201 &route.iface, &route.iface, 0) == 0); in read_route()
215 prefix_key->prefixlen = route.dst_len; in read_route()
216 direct_entry.mac = route.mac & 0xffffffffffff; in read_route()
217 direct_entry.ifindex = route.iface; in read_route()
220 if (route.dst_len == 32) { in read_route()
223 &route.dst) == 0); in read_route()
226 &route.dst, in read_route()
228 direct_entry.arp.dst = route.dst; in read_route()
230 &route.dst, in read_route()
235 prefix_key->data[i] = (route.dst >> i * 8) & 0xff; in read_route()
242 route.gw, route.dst_len, in read_route()
243 route.metric, in read_route()
244 route.iface_name); in read_route()
249 prefix_value->value = route.mac & 0xffffffffffff; in read_route()
250 prefix_value->ifindex = route.iface; in read_route()
251 prefix_value->gw = route.gw; in read_route()
252 prefix_value->metric = route.metric; in read_route()
270 /* Rereading the route table to check if in read_route()
284 route.metric >= prefix_value->metric) { in read_route()
291 route.mac & 0xffffffffffff; in read_route()
292 prefix_value->ifindex = route.iface; in read_route()
293 prefix_value->gw = route.gw; in read_route()
294 prefix_value->metric = route.metric; in read_route()
302 memset(&route, 0, sizeof(route)); in read_route()
307 memset(&route, 0, sizeof(route)); in read_route()
311 /* Function to read the existing route table when the process is launched*/
512 /* Function to keep track and update changes in route and arp table
731 printf("*******************ROUTE TABLE*************************\n\n\n"); in main()
736 printf("Error in receiving route update"); in main()