Lines Matching refs:rtnh
629 static int mpls_count_nexthops(struct rtnexthop *rtnh, int len, in mpls_count_nexthops() argument
635 if (!rtnh) { in mpls_count_nexthops()
642 while (rtnh_ok(rtnh, remaining)) { in mpls_count_nexthops()
643 struct nlattr *nla, *attrs = rtnh_attrs(rtnh); in mpls_count_nexthops()
646 attrlen = rtnh_attrlen(rtnh); in mpls_count_nexthops()
659 rtnh = rtnh_next(rtnh, &remaining); in mpls_count_nexthops()
669 struct rtnexthop *rtnh = cfg->rc_mp; in mpls_nh_build_multi() local
682 if (!rtnh_ok(rtnh, remaining)) in mpls_nh_build_multi()
688 if (rtnh->rtnh_hops || rtnh->rtnh_flags) in mpls_nh_build_multi()
691 attrlen = rtnh_attrlen(rtnh); in mpls_nh_build_multi()
693 struct nlattr *attrs = rtnh_attrs(rtnh); in mpls_nh_build_multi()
700 rtnh->rtnh_ifindex, nla_via, in mpls_nh_build_multi()
705 rtnh = rtnh_next(rtnh, &remaining); in mpls_nh_build_multi()
1259 struct rtnexthop *rtnh; in mpls_dump_route() local
1267 rtnh = nla_reserve_nohdr(skb, sizeof(*rtnh)); in mpls_dump_route()
1268 if (!rtnh) in mpls_dump_route()
1273 rtnh->rtnh_ifindex = dev->ifindex; in mpls_dump_route()
1285 rtnh->rtnh_len = nlmsg_get_pos(skb) - (void *)rtnh; in mpls_dump_route()