• Home
  • Raw
  • Download

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()
221 if (nh->nlmsg_type == RTM_DELROUTE) { in read_route()
259 if (nh->nlmsg_type == RTM_DELROUTE) { in read_route()
315 struct nlmsghdr *nh; in get_route_table() local
367 nh = (struct nlmsghdr *)buf; in get_route_table()
368 read_route(nh, nll); in get_route_table()
377 static void read_arp(struct nlmsghdr *nh, int nll) in read_arp() argument
394 if (nh->nlmsg_type == RTM_GETNEIGH) in read_arp()
397 for (; NLMSG_OK(nh, nll); nh = NLMSG_NEXT(nh, nll)) { in read_arp()
398 rt_msg = (struct ndmsg *)NLMSG_DATA(nh); in read_arp()
401 rtl = RTM_PAYLOAD(nh); in read_arp()
423 if (nh->nlmsg_type == RTM_DELNEIGH) { in read_arp()
426 } else if (nh->nlmsg_type == RTM_NEWNEIGH) { in read_arp()
436 if (nh->nlmsg_type == RTM_DELNEIGH) { in read_arp()
439 } else if (nh->nlmsg_type == RTM_NEWNEIGH) { in read_arp()
455 struct nlmsghdr *nh; in get_arp_table() local
505 nh = (struct nlmsghdr *)buf; in get_arp_table()
506 read_arp(nh, nll); in get_arp_table()
523 struct nlmsghdr *nh; in monitor_route() local
593 nh = (struct nlmsghdr *)buf; in monitor_route()
595 read_route(nh, nll); in monitor_route()
606 nh = (struct nlmsghdr *)buf; in monitor_route()
607 read_arp(nh, nll); in monitor_route()