• Home
  • Raw
  • Download

Lines Matching refs:rtnh

655 static int fib_count_nexthops(struct rtnexthop *rtnh, int remaining,  in fib_count_nexthops()  argument
660 while (rtnh_ok(rtnh, remaining)) { in fib_count_nexthops()
662 rtnh = rtnh_next(rtnh, &remaining); in fib_count_nexthops()
689 static int fib_get_nhs(struct fib_info *fi, struct rtnexthop *rtnh, in fib_get_nhs() argument
703 if (!rtnh_ok(rtnh, remaining)) { in fib_get_nhs()
709 if (rtnh->rtnh_flags & (RTNH_F_DEAD | RTNH_F_LINKDOWN)) { in fib_get_nhs()
715 fib_cfg.fc_flags = (cfg->fc_flags & ~0xFF) | rtnh->rtnh_flags; in fib_get_nhs()
716 fib_cfg.fc_oif = rtnh->rtnh_ifindex; in fib_get_nhs()
718 attrlen = rtnh_attrlen(rtnh); in fib_get_nhs()
720 struct nlattr *nla, *nlav, *attrs = rtnh_attrs(rtnh); in fib_get_nhs()
762 rtnh->rtnh_hops + 1, extack); in fib_get_nhs()
766 rtnh = rtnh_next(rtnh, &remaining); in fib_get_nhs()
840 static int fib_get_nhs(struct fib_info *fi, struct rtnexthop *rtnh, in fib_get_nhs() argument
879 struct rtnexthop *rtnh; in fib_nh_match() local
932 rtnh = cfg->fc_mp; in fib_nh_match()
938 if (!rtnh_ok(rtnh, remaining)) in fib_nh_match()
941 if (rtnh->rtnh_ifindex && rtnh->rtnh_ifindex != nh->fib_nh_oif) in fib_nh_match()
944 attrlen = rtnh_attrlen(rtnh); in fib_nh_match()
946 struct nlattr *nla, *nlav, *attrs = rtnh_attrs(rtnh); in fib_nh_match()
1002 rtnh = rtnh_next(rtnh, &remaining); in fib_nh_match()
1728 struct rtnexthop *rtnh; in fib_add_nexthop() local
1731 rtnh = nla_reserve_nohdr(skb, sizeof(*rtnh)); in fib_add_nexthop()
1732 if (!rtnh) in fib_add_nexthop()
1735 rtnh->rtnh_hops = nh_weight - 1; in fib_add_nexthop()
1736 rtnh->rtnh_ifindex = dev ? dev->ifindex : 0; in fib_add_nexthop()
1741 rtnh->rtnh_flags = flags; in fib_add_nexthop()
1747 rtnh->rtnh_len = nlmsg_get_pos(skb) - (void *)rtnh; in fib_add_nexthop()