Home | History | Annotate | Download | only in ip

Lines Matching refs:nh

65 	fprintf(stderr, "INFO_SPEC := NH OPTIONS FLAGS [ nexthop NH ]...\n");
66 fprintf(stderr, "NH := [ via ADDRESS ] [ dev STRING ] [ weight NUMBER ] NHFLAGS\n");
537 struct rtnexthop *nh = RTA_DATA(tb[RTA_MULTIPATH]);
543 if (len < sizeof(*nh))
545 if (nh->rtnh_len > len)
554 if (nh->rtnh_len > sizeof(*nh)) {
555 parse_rtattr(tb, RTA_MAX, RTNH_DATA(nh), nh->rtnh_len - sizeof(*nh));
577 fprintf(fp, " %s", ll_index_to_name(nh->rtnh_ifindex));
578 if (nh->rtnh_hops != 1)
579 fprintf(fp, "(ttl>%d)", nh->rtnh_hops);
581 fprintf(fp, " dev %s", ll_index_to_name(nh->rtnh_ifindex));
582 fprintf(fp, " weight %d", nh->rtnh_hops+1);
584 if (nh->rtnh_flags & RTNH_F_DEAD)
586 if (nh->rtnh_flags & RTNH_F_ONLINK)
588 if (nh->rtnh_flags & RTNH_F_PERVASIVE)
590 len -= NLMSG_ALIGN(nh->rtnh_len);
591 nh = RTNH_NEXT(nh);