Searched refs:nhp (Results 1 – 4 of 4) sorted by relevance
229 struct rtnexthop *nhp; in dn_fib_nh_match() local246 nhp = nla_data(attrs[RTA_MULTIPATH]); in dn_fib_nh_match()253 if (attrlen < 0 || (nhlen -= nhp->rtnh_len) < 0) in dn_fib_nh_match()255 if (nhp->rtnh_ifindex && nhp->rtnh_ifindex != nh->nh_oif) in dn_fib_nh_match()260 gw_attr = nla_find((struct nlattr *) (nhp + 1), attrlen, RTA_GATEWAY); in dn_fib_nh_match()266 nhp = RTNH_NEXT(nhp); in dn_fib_nh_match()346 struct rtnexthop *nhp; in dn_fib_dump_info() local353 if (!(nhp = nla_reserve_nohdr(skb, sizeof(*nhp)))) in dn_fib_dump_info()356 nhp->rtnh_flags = nh->nh_flags & 0xFF; in dn_fib_dump_info()357 nhp->rtnh_hops = nh->nh_weight - 1; in dn_fib_dump_info()[all …]
150 struct rtnexthop *nhp = nla_data(attr); in dn_fib_count_nhs() local154 if ((nhlen -= nhp->rtnh_len) < 0) in dn_fib_count_nhs()157 nhp = RTNH_NEXT(nhp); in dn_fib_count_nhs()166 struct rtnexthop *nhp = nla_data(attr); in dn_fib_get_nhs() local171 if (attrlen < 0 || (nhlen -= nhp->rtnh_len) < 0) in dn_fib_get_nhs()174 nh->nh_flags = (r->rtm_flags&~0xFF) | nhp->rtnh_flags; in dn_fib_get_nhs()175 nh->nh_oif = nhp->rtnh_ifindex; in dn_fib_get_nhs()176 nh->nh_weight = nhp->rtnh_hops + 1; in dn_fib_get_nhs()181 gw_attr = nla_find((struct nlattr *) (nhp + 1), attrlen, RTA_GATEWAY); in dn_fib_get_nhs()184 nhp = RTNH_NEXT(nhp); in dn_fib_get_nhs()
2241 struct rtnexthop *nhp; in __ip6mr_fill_mroute() local2258 nhp = nla_reserve_nohdr(skb, sizeof(*nhp)); in __ip6mr_fill_mroute()2259 if (!nhp) { in __ip6mr_fill_mroute()2264 nhp->rtnh_flags = 0; in __ip6mr_fill_mroute()2265 nhp->rtnh_hops = c->mfc_un.res.ttls[ct]; in __ip6mr_fill_mroute()2266 nhp->rtnh_ifindex = mrt->vif6_table[ct].dev->ifindex; in __ip6mr_fill_mroute()2267 nhp->rtnh_len = sizeof(*nhp); in __ip6mr_fill_mroute()
2158 struct rtnexthop *nhp; in __ipmr_fill_mroute() local2175 if (!(nhp = nla_reserve_nohdr(skb, sizeof(*nhp)))) { in __ipmr_fill_mroute()2180 nhp->rtnh_flags = 0; in __ipmr_fill_mroute()2181 nhp->rtnh_hops = c->mfc_un.res.ttls[ct]; in __ipmr_fill_mroute()2182 nhp->rtnh_ifindex = mrt->vif_table[ct].dev->ifindex; in __ipmr_fill_mroute()2183 nhp->rtnh_len = sizeof(*nhp); in __ipmr_fill_mroute()