Lines Matching refs:nh
238 print_nhop_entry_sysctl(const char *name, struct rt_msghdr *rtm, struct nhop_external *nh)
250 //xo_emit("{t:index/%-lu} ", wid_nhidx, nh->nh_idx);
251 xo_emit(buffer, nh->nh_idx);
254 char *cp = nh_types[nh->nh_type];
258 if (nh->ifindex < (uint32_t)ifmap_size) {
259 strlcpy(iface_name, ifmap[nh->ifindex].ifname,
265 na = (struct nhop_addrs *)((char *)nh + nh->nh_len);
266 //inet_ntop(nh->nh_family, &nh->nh_src, src_addr, sizeof(src_addr));
272 if (nh->nh_flags & NHF_GATEWAY) {
280 nhop_map_update(&global_nhop_map, nh->nh_idx, gw_addr, iface_name);
285 //p_nhflags(nh->nh_flags, buffer);
289 xo_emit("{t:use/%*lu} ", wid_pksent, nh->nh_pksent);
290 xo_emit("{t:mtu/%*lu} ", wid_mtu, nh->nh_mtu);
300 if (nh->aifindex < (uint32_t)ifmap_size && nh->ifindex != nh->aifindex) {
301 strlcpy(iface_name, ifmap[nh->aifindex].ifname,
309 xo_emit("{t:refcount/%*lu} ", wid_refcnt, nh->nh_refcount);
310 if (Wflag && nh->prepend_len) {
311 int max_bytes = MIN(nh->prepend_len, sizeof(buffer) / 2 - 1);
313 snprintf(&buffer[i * 2], 3, "%02X", nh->nh_prepend[i]);
343 struct nhop_external *nh;
380 nh = (struct nhop_external *)(rtm + 1);
381 nh_map[nh_count].idx = nh->nh_idx;
397 struct nhop_external *nh;
406 nh = (struct nhop_external *)(nd.nh_map[0].rtm + 1);
407 fam = nh->nh_family;
420 xo_open_list("nh-entry");
426 nh = (struct nhop_external *)(rtm + 1);
427 print_nhop_entry_sysctl("nh-entry", rtm, nh);
430 xo_close_list("nh-entry");