/net/decnet/ |
H A D | dn_fib.c | 51 #define for_nexthops(fi) { int nhsel; const struct dn_fib_nh *nh;\ 52 for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++) 54 #define change_nexthops(fi) { int nhsel; struct dn_fib_nh *nh;\ 55 for(nhsel = 0, nh = (struct dn_fib_nh *)((fi)->fib_nh); nhsel < (fi)->fib_nhs; nh++, nhsel++) 93 if (nh->nh_dev) 94 dev_put(nh->nh_dev); 95 nh->nh_dev = NULL; 121 if (nh 191 dn_fib_check_nh(const struct rtmsg *r, struct dn_fib_info *fi, struct dn_fib_nh *nh) argument 324 struct dn_fib_nh *nh = fi->fib_nh; local 355 struct dn_fib_nh *nh = fi->fib_nh; local [all...] |
H A D | dn_table.c | 62 #define for_nexthops(fi) { int nhsel; const struct dn_fib_nh *nh;\ 63 for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++) 254 if (nhp->rtnh_ifindex && nhp->rtnh_ifindex != nh->nh_oif) 262 if (gw && gw != nh->nh_gw) 354 nhp->rtnh_flags = nh->nh_flags & 0xFF; 355 nhp->rtnh_hops = nh->nh_weight - 1; 356 nhp->rtnh_ifindex = nh->nh_oif; 358 if (nh->nh_gw && 359 nla_put_le16(skb, RTA_GATEWAY, nh [all...] |
/net/ipv4/ |
H A D | fib_semantics.c | 63 int nhsel; const struct fib_nh *nh; \ 64 for (nhsel = 0, nh = (fi)->fib_nh; \ 66 nh++, nhsel++) 79 int nhsel; const struct fib_nh *nh = (fi)->fib_nh; \ 158 static void free_nh_exceptions(struct fib_nh *nh) argument 163 hash = rcu_dereference_protected(nh->nh_exceptions, 1); 261 if (nh->nh_oif != onh->nh_oif || 262 nh->nh_gw != onh->nh_gw || 263 nh->nh_scope != onh->nh_scope || 265 nh 336 struct fib_nh *nh; local 603 fib_check_nh(struct fib_config *cfg, struct fib_info *fi, struct fib_nh *nh) argument 768 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh) argument 889 struct fib_nh *nh = fi->fib_nh; local 925 struct fib_nh *nh = fi->fib_nh; local 1125 struct fib_nh *nh; local 1236 struct fib_nh *nh; local [all...] |
H A D | route.c | 621 static void update_or_create_fnhe(struct fib_nh *nh, __be32 daddr, __be32 gw, argument 633 hash = rcu_dereference(nh->nh_exceptions); 638 rcu_assign_pointer(nh->nh_exceptions, hash); 676 fnhe->fnhe_genid = fnhe_genid(dev_net(nh->nh_dev)); 686 rt = rcu_dereference(nh->nh_rth_input); 692 prt = per_cpu_ptr(nh->nh_pcpu_rth_output, i); 756 struct fib_nh *nh = &FIB_RES_NH(res); local 758 update_or_create_fnhe(nh, fl4->daddr, new_gw, 980 struct fib_nh *nh = &FIB_RES_NH(res); local 982 update_or_create_fnhe(nh, fl 1245 find_exception(struct fib_nh *nh, __be32 daddr) argument 1308 rt_cache_route(struct fib_nh *nh, struct rtable *rt) argument 1384 struct fib_nh *nh = &FIB_RES_NH(*res); local 1932 struct fib_nh *nh = &FIB_RES_NH(*res); local [all...] |
H A D | icmp.c | 952 int nh; local 961 nh = skb_network_offset(skb); 967 skb_set_network_header(skb, nh);
|
H A D | fib_frontend.c | 277 struct fib_nh *nh = &res.fi->fib_nh[ret]; local 279 if (nh->nh_dev == dev) {
|
H A D | fib_trie.c | 1366 const struct fib_nh *nh = &fi->fib_nh[nhsel]; local 1368 if (nh->nh_flags & RTNH_F_DEAD) 1370 if (flp->flowi4_oif && flp->flowi4_oif != nh->nh_oif)
|
/net/ipv6/ |
H A D | xfrm6_policy.c | 136 const unsigned char *nh = skb_network_header(skb); local 137 u8 nexthdr = nh[IP6CB(skb)->nhoff]; 150 while (nh + offset + 1 < skb->data || 151 pskb_may_pull(skb, nh + offset + 1 - skb->data)) { 152 nh = skb_network_header(skb); 153 exthdr = (struct ipv6_opt_hdr *)(nh + offset); 163 exthdr = (struct ipv6_opt_hdr *)(nh + offset); 171 if (!onlyproto && (nh + offset + 4 < skb->data || 172 pskb_may_pull(skb, nh + offset + 4 - skb->data))) { 175 nh [all...] |
H A D | exthdrs_core.c | 117 const unsigned char *nh = skb_network_header(skb); local 124 hdr = (struct ipv6_opt_hdr *)(nh + offset); 134 int opttype = nh[offset]; 145 optlen = nh[offset + 1] + 2;
|
H A D | exthdrs.c | 100 const unsigned char *nh = skb_network_header(skb); local 112 int optlen = nh[off + 1] + 2; 115 switch (nh[off]) { 137 if (nh[off + i] != 0) 146 if (curr->type == nh[off]) { 547 const unsigned char *nh = skb_network_header(skb); local 549 if (nh[optoff + 1] == 2) { 551 memcpy(&IP6CB(skb)->ra, nh + optoff + 2, sizeof(IP6CB(skb)->ra)); 555 nh[optoff + 1]); 564 const unsigned char *nh local [all...] |
H A D | mip6.c | 269 const unsigned char *nh = skb_network_header(skb); local 305 exthdr = (struct ipv6_opt_hdr *)(nh + offset); 405 const unsigned char *nh = skb_network_header(skb); local 420 rt = (struct ipv6_rt_hdr *)(nh + offset); 440 exthdr = (struct ipv6_opt_hdr *)(nh + offset);
|
H A D | datagram.c | 364 const unsigned char *nh = skb_network_header(skb); local 369 const struct ipv6hdr *ip6h = container_of((struct in6_addr *)(nh + serr->addr_offset), 378 ipv6_addr_set_v4mapped(*(__be32 *)(nh + serr->addr_offset), 504 unsigned char *nh = skb_network_header(skb); local 517 __be32 flowinfo = ip6_flowinfo((struct ipv6hdr *)nh); 524 u8 *ptr = nh + opt->hop; 544 u8 *ptr = nh + off; 586 u8 *ptr = nh + opt->hop; 590 u8 *ptr = nh + opt->dst0; 594 struct ipv6_rt_hdr *rthdr = (struct ipv6_rt_hdr *)(nh [all...] |
H A D | icmp.c | 685 int nh; local 694 nh = skb_network_offset(skb); 700 skb_set_network_header(skb, nh);
|
H A D | reassembly.c | 233 const unsigned char *nh = skb_network_header(skb); local 235 csum_partial(nh, (u8 *)(fhdr + 1) - nh,
|
/net/openvswitch/ |
H A D | actions.c | 217 static void set_ip_addr(struct sk_buff *skb, struct iphdr *nh, argument 222 if (nh->protocol == IPPROTO_TCP) { 226 } else if (nh->protocol == IPPROTO_UDP) { 239 csum_replace4(&nh->check, *addr, new_addr); 282 static void set_ipv6_tc(struct ipv6hdr *nh, u8 tc) argument 284 nh->priority = tc >> 4; 285 nh->flow_lbl[0] = (nh->flow_lbl[0] & 0x0F) | ((tc & 0x0F) << 4); 288 static void set_ipv6_fl(struct ipv6hdr *nh, u32 fl) argument 290 nh 295 set_ip_ttl(struct sk_buff *skb, struct iphdr *nh, u8 new_ttl) argument 303 struct iphdr *nh; local 330 struct ipv6hdr *nh; local [all...] |
H A D | flow.c | 248 struct ipv6hdr *nh; local 253 err = check_header(skb, nh_ofs + sizeof(*nh)); 257 nh = ipv6_hdr(skb); 258 nexthdr = nh->nexthdr; 259 payload_ofs = (u8 *)(nh + 1) - skb->data; 262 key->ip.tos = ipv6_get_dsfield(nh); 263 key->ip.ttl = nh->hop_limit; 264 key->ipv6.label = *(__be32 *)nh & htonl(IPV6_FLOWINFO_FLOWLABEL); 265 key->ipv6.addr.src = nh->saddr; 266 key->ipv6.addr.dst = nh 487 struct iphdr *nh; local [all...] |
/net/ipv4/netfilter/ |
H A D | nf_nat_masquerade_ipv4.c | 35 __be32 newsrc, nh; local 52 nh = rt_nexthop(rt, ip_hdr(skb)->daddr); 53 newsrc = inet_select_addr(out, nh, RT_SCOPE_UNIVERSE);
|
H A D | ipt_rpfilter.c | 53 struct fib_nh *nh = &res.fi->fib_nh[ret]; local 55 if (nh->nh_dev == dev) {
|
/net/bridge/ |
H A D | br_netfilter.c | 475 const unsigned char *nh = skb_network_header(skb); local 476 int off = raw - nh; 486 int optlen = nh[off + 1] + 2; 488 switch (nh[off]) { 497 if (nh[off + 1] != 4 || (off & 3) != 2) 499 pkt_len = ntohl(*(__be32 *) (nh + off + 2)); 508 nh = skb_network_header(skb);
|
/net/ipv6/netfilter/ |
H A D | nf_conntrack_reasm.c | 245 const unsigned char *nh = skb_network_header(skb); local 247 csum_partial(nh, (u8 *)(fhdr + 1) - nh,
|