Lines Matching refs:rtnh
836 static u8 mpls_count_nexthops(struct rtnexthop *rtnh, int len, in mpls_count_nexthops() argument
846 while (rtnh_ok(rtnh, remaining)) { in mpls_count_nexthops()
847 struct nlattr *nla, *attrs = rtnh_attrs(rtnh); in mpls_count_nexthops()
851 attrlen = rtnh_attrlen(rtnh); in mpls_count_nexthops()
878 rtnh = rtnh_next(rtnh, &remaining); in mpls_count_nexthops()
889 struct rtnexthop *rtnh = cfg->rc_mp; in mpls_nh_build_multi() local
902 if (!rtnh_ok(rtnh, remaining)) in mpls_nh_build_multi()
908 if (rtnh->rtnh_hops || rtnh->rtnh_flags) in mpls_nh_build_multi()
911 attrlen = rtnh_attrlen(rtnh); in mpls_nh_build_multi()
913 struct nlattr *attrs = rtnh_attrs(rtnh); in mpls_nh_build_multi()
920 rtnh->rtnh_ifindex, nla_via, nla_newdst, in mpls_nh_build_multi()
928 rtnh = rtnh_next(rtnh, &remaining); in mpls_nh_build_multi()
2025 struct rtnexthop *rtnh; in mpls_dump_route() local
2039 rtnh = nla_reserve_nohdr(skb, sizeof(*rtnh)); in mpls_dump_route()
2040 if (!rtnh) in mpls_dump_route()
2043 rtnh->rtnh_ifindex = dev->ifindex; in mpls_dump_route()
2045 rtnh->rtnh_flags |= RTNH_F_LINKDOWN; in mpls_dump_route()
2049 rtnh->rtnh_flags |= RTNH_F_DEAD; in mpls_dump_route()
2064 rtnh->rtnh_len = nlmsg_get_pos(skb) - (void *)rtnh; in mpls_dump_route()