Lines Matching defs:rtnh
45 #include <net/rtnh.h>
656 static int fib_count_nexthops(struct rtnexthop *rtnh, int remaining,
661 while (rtnh_ok(rtnh, remaining)) {
663 rtnh = rtnh_next(rtnh, &remaining);
690 static int fib_get_nhs(struct fib_info *fi, struct rtnexthop *rtnh,
704 if (!rtnh_ok(rtnh, remaining)) {
710 if (rtnh->rtnh_flags & (RTNH_F_DEAD | RTNH_F_LINKDOWN)) {
716 fib_cfg.fc_flags = (cfg->fc_flags & ~0xFF) | rtnh->rtnh_flags;
717 fib_cfg.fc_oif = rtnh->rtnh_ifindex;
719 attrlen = rtnh_attrlen(rtnh);
721 struct nlattr *nla, *nlav, *attrs = rtnh_attrs(rtnh);
763 rtnh->rtnh_hops + 1, extack);
767 rtnh = rtnh_next(rtnh, &remaining);
841 static int fib_get_nhs(struct fib_info *fi, struct rtnexthop *rtnh,
880 struct rtnexthop *rtnh;
933 rtnh = cfg->fc_mp;
939 if (!rtnh_ok(rtnh, remaining))
942 if (rtnh->rtnh_ifindex && rtnh->rtnh_ifindex != nh->fib_nh_oif)
945 attrlen = rtnh_attrlen(rtnh);
947 struct nlattr *nla, *nlav, *attrs = rtnh_attrs(rtnh);
1003 rtnh = rtnh_next(rtnh, &remaining);
1730 struct rtnexthop *rtnh;
1733 rtnh = nla_reserve_nohdr(skb, sizeof(*rtnh));
1734 if (!rtnh)
1737 rtnh->rtnh_hops = nh_weight - 1;
1738 rtnh->rtnh_ifindex = dev ? dev->ifindex : 0;
1743 rtnh->rtnh_flags = flags;
1749 rtnh->rtnh_len = nlmsg_get_pos(skb) - (void *)rtnh;