Lines Matching refs:rtnh

657 static int fib_count_nexthops(struct rtnexthop *rtnh, int remaining,  in fib_count_nexthops()  argument
662 while (rtnh_ok(rtnh, remaining)) { in fib_count_nexthops()
664 rtnh = rtnh_next(rtnh, &remaining); in fib_count_nexthops()
691 static int fib_get_nhs(struct fib_info *fi, struct rtnexthop *rtnh, in fib_get_nhs() argument
705 if (!rtnh_ok(rtnh, remaining)) { in fib_get_nhs()
711 if (rtnh->rtnh_flags & (RTNH_F_DEAD | RTNH_F_LINKDOWN)) { in fib_get_nhs()
717 fib_cfg.fc_flags = (cfg->fc_flags & ~0xFF) | rtnh->rtnh_flags; in fib_get_nhs()
718 fib_cfg.fc_oif = rtnh->rtnh_ifindex; in fib_get_nhs()
720 attrlen = rtnh_attrlen(rtnh); in fib_get_nhs()
722 struct nlattr *nla, *nlav, *attrs = rtnh_attrs(rtnh); in fib_get_nhs()
764 rtnh->rtnh_hops + 1, extack); in fib_get_nhs()
768 rtnh = rtnh_next(rtnh, &remaining); in fib_get_nhs()
842 static int fib_get_nhs(struct fib_info *fi, struct rtnexthop *rtnh, in fib_get_nhs() argument
881 struct rtnexthop *rtnh; in fib_nh_match() local
934 rtnh = cfg->fc_mp; in fib_nh_match()
940 if (!rtnh_ok(rtnh, remaining)) in fib_nh_match()
943 if (rtnh->rtnh_ifindex && rtnh->rtnh_ifindex != nh->fib_nh_oif) in fib_nh_match()
946 attrlen = rtnh_attrlen(rtnh); in fib_nh_match()
948 struct nlattr *nla, *nlav, *attrs = rtnh_attrs(rtnh); in fib_nh_match()
1004 rtnh = rtnh_next(rtnh, &remaining); in fib_nh_match()
1710 struct rtnexthop *rtnh; in fib_add_nexthop() local
1713 rtnh = nla_reserve_nohdr(skb, sizeof(*rtnh)); in fib_add_nexthop()
1714 if (!rtnh) in fib_add_nexthop()
1717 rtnh->rtnh_hops = nh_weight - 1; in fib_add_nexthop()
1718 rtnh->rtnh_ifindex = dev ? dev->ifindex : 0; in fib_add_nexthop()
1723 rtnh->rtnh_flags = flags; in fib_add_nexthop()
1729 rtnh->rtnh_len = nlmsg_get_pos(skb) - (void *)rtnh; in fib_add_nexthop()