Home
last modified time | relevance | path

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

/linux-4.4.14/net/decnet/
Ddn_table.c229 struct rtnexthop *nhp; in dn_fib_nh_match() local
246 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() local
353 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 …]
Ddn_fib.c150 struct rtnexthop *nhp = nla_data(attr); in dn_fib_count_nhs() local
154 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() local
171 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()
/linux-4.4.14/net/ipv6/
Dip6mr.c2236 struct rtnexthop *nhp; in __ip6mr_fill_mroute() local
2253 nhp = nla_reserve_nohdr(skb, sizeof(*nhp)); in __ip6mr_fill_mroute()
2254 if (!nhp) { in __ip6mr_fill_mroute()
2259 nhp->rtnh_flags = 0; in __ip6mr_fill_mroute()
2260 nhp->rtnh_hops = c->mfc_un.res.ttls[ct]; in __ip6mr_fill_mroute()
2261 nhp->rtnh_ifindex = mrt->vif6_table[ct].dev->ifindex; in __ip6mr_fill_mroute()
2262 nhp->rtnh_len = sizeof(*nhp); in __ip6mr_fill_mroute()
/linux-4.4.14/net/ipv4/
Dipmr.c2150 struct rtnexthop *nhp; in __ipmr_fill_mroute() local
2167 if (!(nhp = nla_reserve_nohdr(skb, sizeof(*nhp)))) { in __ipmr_fill_mroute()
2172 nhp->rtnh_flags = 0; in __ipmr_fill_mroute()
2173 nhp->rtnh_hops = c->mfc_un.res.ttls[ct]; in __ipmr_fill_mroute()
2174 nhp->rtnh_ifindex = mrt->vif_table[ct].dev->ifindex; in __ipmr_fill_mroute()
2175 nhp->rtnh_len = sizeof(*nhp); in __ipmr_fill_mroute()