Lines Matching refs:rtnh
833 static u8 mpls_count_nexthops(struct rtnexthop *rtnh, int len, in mpls_count_nexthops() argument
843 while (rtnh_ok(rtnh, remaining)) { in mpls_count_nexthops()
844 struct nlattr *nla, *attrs = rtnh_attrs(rtnh); in mpls_count_nexthops()
848 attrlen = rtnh_attrlen(rtnh); in mpls_count_nexthops()
875 rtnh = rtnh_next(rtnh, &remaining); in mpls_count_nexthops()
886 struct rtnexthop *rtnh = cfg->rc_mp; in mpls_nh_build_multi() local
899 if (!rtnh_ok(rtnh, remaining)) in mpls_nh_build_multi()
905 if (rtnh->rtnh_hops || rtnh->rtnh_flags) in mpls_nh_build_multi()
908 attrlen = rtnh_attrlen(rtnh); in mpls_nh_build_multi()
910 struct nlattr *attrs = rtnh_attrs(rtnh); in mpls_nh_build_multi()
917 rtnh->rtnh_ifindex, nla_via, nla_newdst, in mpls_nh_build_multi()
925 rtnh = rtnh_next(rtnh, &remaining); in mpls_nh_build_multi()
2055 struct rtnexthop *rtnh; in mpls_dump_route() local
2069 rtnh = nla_reserve_nohdr(skb, sizeof(*rtnh)); in mpls_dump_route()
2070 if (!rtnh) in mpls_dump_route()
2073 rtnh->rtnh_ifindex = dev->ifindex; in mpls_dump_route()
2075 rtnh->rtnh_flags |= RTNH_F_LINKDOWN; in mpls_dump_route()
2079 rtnh->rtnh_flags |= RTNH_F_DEAD; in mpls_dump_route()
2094 rtnh->rtnh_len = nlmsg_get_pos(skb) - (void *)rtnh; in mpls_dump_route()