Searched refs:nhp (Results 1 - 4 of 4) sorted by relevance

/linux-4.4.14/net/decnet/
H A Ddn_table.c229 struct rtnexthop *nhp; dn_fib_nh_match() local
246 nhp = nla_data(attrs[RTA_MULTIPATH]); dn_fib_nh_match()
253 if (attrlen < 0 || (nhlen -= nhp->rtnh_len) < 0) for_nexthops()
255 if (nhp->rtnh_ifindex && nhp->rtnh_ifindex != nh->nh_oif) for_nexthops()
260 gw_attr = nla_find((struct nlattr *) (nhp + 1), attrlen, RTA_GATEWAY); for_nexthops()
266 nhp = RTNH_NEXT(nhp); for_nexthops()
346 struct rtnexthop *nhp; dn_fib_dump_info() local
353 if (!(nhp = nla_reserve_nohdr(skb, sizeof(*nhp)))) for_nexthops()
356 nhp->rtnh_flags = nh->nh_flags & 0xFF; for_nexthops()
357 nhp->rtnh_hops = nh->nh_weight - 1; for_nexthops()
358 nhp->rtnh_ifindex = nh->nh_oif; for_nexthops()
364 nhp->rtnh_len = skb_tail_pointer(skb) - (unsigned char *)nhp; for_nexthops()
H A Ddn_fib.c150 struct rtnexthop *nhp = nla_data(attr); dn_fib_count_nhs() local
154 if ((nhlen -= nhp->rtnh_len) < 0) dn_fib_count_nhs()
157 nhp = RTNH_NEXT(nhp); dn_fib_count_nhs()
166 struct rtnexthop *nhp = nla_data(attr); dn_fib_get_nhs() local
171 if (attrlen < 0 || (nhlen -= nhp->rtnh_len) < 0) change_nexthops()
174 nh->nh_flags = (r->rtm_flags&~0xFF) | nhp->rtnh_flags; change_nexthops()
175 nh->nh_oif = nhp->rtnh_ifindex; change_nexthops()
176 nh->nh_weight = nhp->rtnh_hops + 1; change_nexthops()
181 gw_attr = nla_find((struct nlattr *) (nhp + 1), attrlen, RTA_GATEWAY); change_nexthops()
184 nhp = RTNH_NEXT(nhp); change_nexthops()
/linux-4.4.14/net/ipv6/
H A Dip6mr.c2236 struct rtnexthop *nhp; __ip6mr_fill_mroute() local
2253 nhp = nla_reserve_nohdr(skb, sizeof(*nhp)); __ip6mr_fill_mroute()
2254 if (!nhp) { __ip6mr_fill_mroute()
2259 nhp->rtnh_flags = 0; __ip6mr_fill_mroute()
2260 nhp->rtnh_hops = c->mfc_un.res.ttls[ct]; __ip6mr_fill_mroute()
2261 nhp->rtnh_ifindex = mrt->vif6_table[ct].dev->ifindex; __ip6mr_fill_mroute()
2262 nhp->rtnh_len = sizeof(*nhp); __ip6mr_fill_mroute()
/linux-4.4.14/net/ipv4/
H A Dipmr.c2150 struct rtnexthop *nhp; __ipmr_fill_mroute() local
2167 if (!(nhp = nla_reserve_nohdr(skb, sizeof(*nhp)))) { __ipmr_fill_mroute()
2172 nhp->rtnh_flags = 0; __ipmr_fill_mroute()
2173 nhp->rtnh_hops = c->mfc_un.res.ttls[ct]; __ipmr_fill_mroute()
2174 nhp->rtnh_ifindex = mrt->vif_table[ct].dev->ifindex; __ipmr_fill_mroute()
2175 nhp->rtnh_len = sizeof(*nhp); __ipmr_fill_mroute()

Completed in 253 milliseconds