Lines Matching defs:rtnh
46 #include <net/rtnh.h>
657 static int fib_count_nexthops(struct rtnexthop *rtnh, int remaining,
662 while (rtnh_ok(rtnh, remaining)) {
664 rtnh = rtnh_next(rtnh, &remaining);
691 static int fib_get_nhs(struct fib_info *fi, struct rtnexthop *rtnh,
705 if (!rtnh_ok(rtnh, remaining)) {
711 if (rtnh->rtnh_flags & (RTNH_F_DEAD | RTNH_F_LINKDOWN)) {
717 fib_cfg.fc_flags = (cfg->fc_flags & ~0xFF) | rtnh->rtnh_flags;
718 fib_cfg.fc_oif = rtnh->rtnh_ifindex;
720 attrlen = rtnh_attrlen(rtnh);
722 struct nlattr *nla, *nlav, *attrs = rtnh_attrs(rtnh);
764 rtnh->rtnh_hops + 1, extack);
768 rtnh = rtnh_next(rtnh, &remaining);
842 static int fib_get_nhs(struct fib_info *fi, struct rtnexthop *rtnh,
881 struct rtnexthop *rtnh;
934 rtnh = cfg->fc_mp;
940 if (!rtnh_ok(rtnh, remaining))
943 if (rtnh->rtnh_ifindex && rtnh->rtnh_ifindex != nh->fib_nh_oif)
946 attrlen = rtnh_attrlen(rtnh);
948 struct nlattr *nla, *nlav, *attrs = rtnh_attrs(rtnh);
1004 rtnh = rtnh_next(rtnh, &remaining);
1711 struct rtnexthop *rtnh;
1714 rtnh = nla_reserve_nohdr(skb, sizeof(*rtnh));
1715 if (!rtnh)
1718 rtnh->rtnh_hops = nh_weight - 1;
1719 rtnh->rtnh_ifindex = dev ? dev->ifindex : 0;
1724 rtnh->rtnh_flags = flags;
1730 rtnh->rtnh_len = nlmsg_get_pos(skb) - (void *)rtnh;