Lines Matching refs:nh

94 	struct nlmsghdr *nh;  in recv_msg()  local
104 nh = (struct nlmsghdr *)buf_ptr; in recv_msg()
106 if (nh->nlmsg_type == NLMSG_DONE) in recv_msg()
122 static void read_route(struct nlmsghdr *nh, int nll) in read_route() argument
148 if (nh->nlmsg_type == RTM_DELROUTE) in read_route()
150 else if (nh->nlmsg_type == RTM_GETROUTE) in read_route()
152 else if (nh->nlmsg_type == RTM_NEWROUTE) in read_route()
155 printf("%d\n", nh->nlmsg_type); in read_route()
159 for (; NLMSG_OK(nh, nll); nh = NLMSG_NEXT(nh, nll)) { in read_route()
160 rt_msg = (struct rtmsg *)NLMSG_DATA(nh); in read_route()
166 rtl = RTM_PAYLOAD(nh); in read_route()
222 if (nh->nlmsg_type == RTM_DELROUTE) { in read_route()
263 if (nh->nlmsg_type == RTM_DELROUTE) { in read_route()
319 struct nlmsghdr *nh; in get_route_table() local
371 nh = (struct nlmsghdr *)buf; in get_route_table()
372 read_route(nh, nll); in get_route_table()
381 static void read_arp(struct nlmsghdr *nh, int nll) in read_arp() argument
398 if (nh->nlmsg_type == RTM_GETNEIGH) in read_arp()
401 for (; NLMSG_OK(nh, nll); nh = NLMSG_NEXT(nh, nll)) { in read_arp()
406 rt_msg = (struct ndmsg *)NLMSG_DATA(nh); in read_arp()
409 rtl = RTM_PAYLOAD(nh); in read_arp()
438 if (nh->nlmsg_type == RTM_DELNEIGH) { in read_arp()
441 } else if (nh->nlmsg_type == RTM_NEWNEIGH) { in read_arp()
451 if (nh->nlmsg_type == RTM_DELNEIGH) { in read_arp()
454 } else if (nh->nlmsg_type == RTM_NEWNEIGH) { in read_arp()
470 struct nlmsghdr *nh; in get_arp_table() local
520 nh = (struct nlmsghdr *)buf; in get_arp_table()
521 read_arp(nh, nll); in get_arp_table()
538 struct nlmsghdr *nh; in monitor_route() local
608 nh = (struct nlmsghdr *)buf; in monitor_route()
610 read_route(nh, nll); in monitor_route()
621 nh = (struct nlmsghdr *)buf; in monitor_route()
622 read_arp(nh, nll); in monitor_route()