Lines Matching refs:rtnh
835 static u8 mpls_count_nexthops(struct rtnexthop *rtnh, int len, in mpls_count_nexthops() argument
845 while (rtnh_ok(rtnh, remaining)) { in mpls_count_nexthops()
846 struct nlattr *nla, *attrs = rtnh_attrs(rtnh); in mpls_count_nexthops()
850 attrlen = rtnh_attrlen(rtnh); in mpls_count_nexthops()
877 rtnh = rtnh_next(rtnh, &remaining); in mpls_count_nexthops()
888 struct rtnexthop *rtnh = cfg->rc_mp; in mpls_nh_build_multi() local
901 if (!rtnh_ok(rtnh, remaining)) in mpls_nh_build_multi()
907 if (rtnh->rtnh_hops || rtnh->rtnh_flags) in mpls_nh_build_multi()
910 attrlen = rtnh_attrlen(rtnh); in mpls_nh_build_multi()
912 struct nlattr *attrs = rtnh_attrs(rtnh); in mpls_nh_build_multi()
919 rtnh->rtnh_ifindex, nla_via, nla_newdst, in mpls_nh_build_multi()
927 rtnh = rtnh_next(rtnh, &remaining); in mpls_nh_build_multi()
2035 struct rtnexthop *rtnh; in mpls_dump_route() local
2049 rtnh = nla_reserve_nohdr(skb, sizeof(*rtnh)); in mpls_dump_route()
2050 if (!rtnh) in mpls_dump_route()
2053 rtnh->rtnh_ifindex = dev->ifindex; in mpls_dump_route()
2055 rtnh->rtnh_flags |= RTNH_F_LINKDOWN; in mpls_dump_route()
2059 rtnh->rtnh_flags |= RTNH_F_DEAD; in mpls_dump_route()
2074 rtnh->rtnh_len = nlmsg_get_pos(skb) - (void *)rtnh; in mpls_dump_route()