/linux/samples/bpf/ |
A D | sockex2_kern.c | 79 nhoff += 20; in parse_ip() 83 return nhoff; in parse_ip() 97 return nhoff; in parse_ipv6() 121 nhoff = parse_ip(skb, nhoff, &ip_proto, flow); in flow_dissector() 123 nhoff = parse_ipv6(skb, nhoff, &ip_proto, flow); in flow_dissector() 143 nhoff += 4; in flow_dissector() 145 nhoff += 4; in flow_dissector() 159 nhoff = parse_ip(skb, nhoff, &ip_proto, flow); in flow_dissector() 161 nhoff = parse_ipv6(skb, nhoff, &ip_proto, flow); in flow_dissector() 167 nhoff = parse_ip(skb, nhoff, &ip_proto, flow); in flow_dissector() [all …]
|
A D | sockex3_kern.c | 162 nhoff += 4; in parse_ip_proto() 164 nhoff += 4; in parse_ip_proto() 166 nhoff += 4; in parse_ip_proto() 168 nhoff += 4; in parse_ip_proto() 200 nhoff = skb->cb[0]; in PROG() 215 skb->cb[0] = nhoff; in PROG() 228 nhoff = skb->cb[0]; in PROG() 238 skb->cb[0] = nhoff; in PROG() 245 __u32 nhoff, proto; in PROG() local 247 nhoff = skb->cb[0]; in PROG() [all …]
|
A D | parse_ldabs.c | 21 static inline int ip_is_fragment(struct __sk_buff *ctx, __u64 nhoff) in ip_is_fragment() argument 23 return load_half(ctx, nhoff + offsetof(struct iphdr, frag_off)) in ip_is_fragment()
|
/linux/net/netfilter/ |
A D | xt_HMARK.c | 141 nhoff += protoff; in hmark_set_tuple_ports() 170 unsigned int nhoff = 0; in hmark_pkt_set_htuple_ipv6() local 175 nexthdr = ipv6_find_hdr(skb, &nhoff, -1, &fragoff, &flag); in hmark_pkt_set_htuple_ipv6() 182 if (get_inner6_hdr(skb, &nhoff)) { in hmark_pkt_set_htuple_ipv6() 183 ip6 = skb_header_pointer(skb, nhoff, sizeof(_ip6), &_ip6); in hmark_pkt_set_htuple_ipv6() 206 hmark_set_tuple_ports(skb, nhoff, t, info); in hmark_pkt_set_htuple_ipv6() 245 *nhoff += iphsz + sizeof(_ih); in get_inner_hdr() 254 int nhoff = skb_network_offset(skb); in hmark_pkt_set_htuple_ipv4() local 256 ip = (struct iphdr *) (skb->data + nhoff); in hmark_pkt_set_htuple_ipv4() 259 if (get_inner_hdr(skb, ip->ihl * 4, &nhoff)) { in hmark_pkt_set_htuple_ipv4() [all …]
|
A D | nf_conntrack_core.c | 262 unsigned int nhoff, in nf_ct_get_tuple() argument 278 nhoff += offsetof(struct iphdr, saddr); in nf_ct_get_tuple() 282 nhoff += offsetof(struct ipv6hdr, saddr); in nf_ct_get_tuple() 289 ap = skb_header_pointer(skb, nhoff, size, _addrs); in nf_ct_get_tuple() 357 dataoff = nhoff + (iph->ihl << 2); in ipv4_get_l4proto() 363 nhoff, iph->ihl << 2, skb->len); in ipv4_get_l4proto() 374 unsigned int extoff = nhoff + sizeof(struct ipv6hdr); in ipv6_get_l4proto() 399 unsigned int nhoff, u8 pf, u8 *l4num) in get_l4proto() argument 403 return ipv4_get_l4proto(skb, nhoff, l4num); in get_l4proto() 406 return ipv6_get_l4proto(skb, nhoff, l4num); in get_l4proto() [all …]
|
/linux/net/ipv6/ |
A D | ip6_offload.c | 86 int nhoff; in ipv6_gso_segment() local 90 nhoff = skb_network_header(skb) - skb_mac_header(skb); in ipv6_gso_segment() 125 ipv6h = (struct ipv6hdr *)(skb_mac_header(skb) + nhoff); in ipv6_gso_segment() 131 payload_len = skb->len - nhoff - sizeof(*ipv6h); in ipv6_gso_segment() 329 skb_set_inner_network_header(skb, nhoff); in ipv6_gro_complete() 332 iph->payload_len = htons(skb->len - nhoff - sizeof(*iph)); in ipv6_gro_complete() 336 nhoff += sizeof(*iph) + ipv6_exthdrs_len(iph, &ops); in ipv6_gro_complete() 341 udp6_gro_complete, skb, nhoff); in ipv6_gro_complete() 353 return ipv6_gro_complete(skb, nhoff); in sit_gro_complete() 360 return ipv6_gro_complete(skb, nhoff); in ip6ip6_gro_complete() [all …]
|
A D | udp_offload.c | 161 INDIRECT_CALLABLE_SCOPE int udp6_gro_complete(struct sk_buff *skb, int nhoff) in udp6_gro_complete() argument 164 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp6_gro_complete() 168 uh->len = htons(skb->len - nhoff); in udp6_gro_complete() 185 uh->check = ~udp_v6_check(skb->len - nhoff, &ipv6h->saddr, in udp6_gro_complete() 188 return udp_gro_complete(skb, nhoff, udp6_lib_lookup_skb); in udp6_gro_complete()
|
A D | reassembly.c | 107 struct frag_hdr *fhdr, int nhoff, in ip6_frag_queue() argument 209 fq->nhoffset = nhoff; in ip6_frag_queue() 254 unsigned int nhoff; in ip6_frag_reasm() local 277 nhoff = fq->nhoffset; in ip6_frag_reasm() 278 skb_network_header(skb)[nhoff] = skb_transport_header(skb)[0]; in ip6_frag_reasm() 292 IP6CB(skb)->nhoff = nhoff; in ip6_frag_reasm() 352 IP6CB(skb)->nhoff = (u8 *)fhdr - skb_network_header(skb); in ipv6_frag_rcv() 382 ret = ip6_frag_queue(fq, skb, fhdr, IP6CB(skb)->nhoff, in ipv6_frag_rcv()
|
A D | ip6_input.c | 249 IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); in ip6_rcv_core() 355 unsigned int nhoff; in ip6_protocol_deliver_rcu() local 364 nhoff = IP6CB(skb)->nhoff; in ip6_protocol_deliver_rcu() 368 nexthdr = skb_network_header(skb)[nhoff]; in ip6_protocol_deliver_rcu() 445 ICMPV6_UNK_NEXTHDR, nhoff); in ip6_protocol_deliver_rcu()
|
A D | esp6_offload.c | 57 int nhoff; in esp6_gro_receive() local 94 nhoff = esp6_nexthdr_esp_offset(ipv6_hdr(skb), offset); in esp6_gro_receive() 95 if (!nhoff) in esp6_gro_receive() 98 IP6CB(skb)->nhoff = nhoff; in esp6_gro_receive()
|
A D | xfrm6_input.c | 46 skb_network_header(skb)[IP6CB(skb)->nhoff] = in xfrm6_transport_finish() 165 return xfrm6_rcv_spi(skb, skb_network_header(skb)[IP6CB(skb)->nhoff], in xfrm6_rcv_tnl()
|
A D | exthdrs.c | 323 opt->nhoff = dstbuf; in ipv6_destopt_rcv() 325 opt->nhoff = opt->dst1; in ipv6_destopt_rcv() 421 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_srh_rcv() 538 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_rpl_srh_rcv() 745 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_rthdr_rcv() 1090 opt->nhoff = sizeof(struct ipv6hdr); in ipv6_parse_hopopts()
|
/linux/net/core/ |
A D | flow_dissector.c | 472 int nhoff, int hlen) in __skb_flow_dissect_arp() argument 876 flow_keys->nhoff = nhoff; in bpf_flow_dissect() 889 flow_keys->nhoff = clamp_t(u16, flow_keys->nhoff, nhoff, hlen); in bpf_flow_dissect() 956 nhoff += offset; in __skb_flow_dissect() 1050 nhoff += iph->ihl * 4; in __skb_flow_dissect() 1156 nhoff += sizeof(*vlan); in __skb_flow_dissect() 1200 nhoff += PPPOE_SES_HLEN; in __skb_flow_dissect() 1253 nhoff += FCOE_HEADER_LEN; in __skb_flow_dissect() 1261 nhoff, hlen); in __skb_flow_dissect() 1357 nhoff += sizeof(_fh); in __skb_flow_dissect() [all …]
|
/linux/net/ipv6/ila/ |
A D | ila_common.c | 77 size_t nhoff = sizeof(struct ipv6hdr); in ila_csum_adjust_transport() local 83 if (likely(pskb_may_pull(skb, nhoff + sizeof(struct tcphdr)))) { in ila_csum_adjust_transport() 85 (skb_network_header(skb) + nhoff); in ila_csum_adjust_transport() 93 if (likely(pskb_may_pull(skb, nhoff + sizeof(struct udphdr)))) { in ila_csum_adjust_transport() 95 (skb_network_header(skb) + nhoff); in ila_csum_adjust_transport() 108 nhoff + sizeof(struct icmp6hdr)))) { in ila_csum_adjust_transport() 110 (skb_network_header(skb) + nhoff); in ila_csum_adjust_transport()
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
A D | flow_dissector.c | 29 got.nhoff, expected.nhoff, \ 120 .nhoff = ETH_HLEN, 140 .nhoff = ETH_HLEN, 208 .nhoff = ETH_HLEN, 233 .nhoff = ETH_HLEN, 255 .nhoff = ETH_HLEN, 280 .nhoff = ETH_HLEN, 302 .nhoff = ETH_HLEN, 325 .nhoff = ETH_HLEN, 351 .nhoff = ETH_HLEN, [all …]
|
/linux/Documentation/bpf/ |
A D | prog_flow_dissector.rst | 26 * ``nhoff`` - initial offset of the networking header 27 * ``thoff`` - initial offset of the transport header, initialized to nhoff 32 bpf_flow_keys`` fields. Input arguments ``nhoff/thoff/n_proto`` should be 54 skb->data + flow_keys->nhoff point to the first byte of L3_HEADER 55 flow_keys->thoff = nhoff 71 skb->data + flow_keys->nhoff point the to first byte of TCI 72 flow_keys->thoff = nhoff 90 skb->data + flow_keys->nhoff point the to first byte of L3_HEADER 91 flow_keys->thoff = nhoff
|
/linux/net/nsh/ |
A D | nsh.c | 82 int nhoff; in nsh_gso_segment() local 86 nhoff = skb->network_header - skb->mac_header; in nsh_gso_segment() 111 skb->network_header - nhoff, in nsh_gso_segment() 119 skb_set_mac_header(skb, -nhoff); in nsh_gso_segment()
|
/linux/net/bridge/netfilter/ |
A D | nf_conntrack_bridge.c | 206 int nhoff, len; in nf_ct_br_ip_check() local 208 nhoff = skb_network_offset(skb); in nf_ct_br_ip_check() 215 if (skb->len < nhoff + len || in nf_ct_br_ip_check() 225 int nhoff, len; in nf_ct_br_ipv6_check() local 227 nhoff = skb_network_offset(skb); in nf_ct_br_ipv6_check() 232 len = ntohs(hdr->payload_len) + sizeof(struct ipv6hdr) + nhoff; in nf_ct_br_ipv6_check()
|
/linux/net/ipv4/ |
A D | udp_offload.c | 634 int udp_gro_complete(struct sk_buff *skb, int nhoff, in udp_gro_complete() argument 637 __be16 newlen = htons(skb->len - nhoff); in udp_gro_complete() 638 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp_gro_complete() 661 nhoff + sizeof(struct udphdr)); in udp_gro_complete() 674 INDIRECT_CALLABLE_SCOPE int udp4_gro_complete(struct sk_buff *skb, int nhoff) in udp4_gro_complete() argument 677 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp4_gro_complete() 681 uh->len = htons(skb->len - nhoff); in udp4_gro_complete() 698 uh->check = ~udp_v4_check(skb->len - nhoff, iph->saddr, in udp4_gro_complete() 701 return udp_gro_complete(skb, nhoff, udp4_lib_lookup_skb); in udp4_gro_complete()
|
A D | gre_offload.c | 240 static int gre_gro_complete(struct sk_buff *skb, int nhoff) in gre_gro_complete() argument 242 struct gre_base_hdr *greh = (struct gre_base_hdr *)(skb->data + nhoff); in gre_gro_complete() 261 err = ptype->callbacks.gro_complete(skb, nhoff + grehlen); in gre_gro_complete() 265 skb_set_inner_mac_header(skb, nhoff + grehlen); in gre_gro_complete()
|
A D | af_inet.c | 1338 int nhoff; in inet_gso_segment() local 1389 iph = (struct iphdr *)(skb_mac_header(skb) + nhoff); in inet_gso_segment() 1394 offset += skb->len - nhoff - ihl; in inet_gso_segment() 1395 tot_len = skb->len - nhoff; in inet_gso_segment() 1407 tot_len = skb->len - nhoff; in inet_gso_segment() 1411 tot_len = skb->len - nhoff; in inet_gso_segment() 1605 int inet_gro_complete(struct sk_buff *skb, int nhoff) in inet_gro_complete() argument 1607 __be16 newlen = htons(skb->len - nhoff); in inet_gro_complete() 1615 skb_set_inner_network_header(skb, nhoff); in inet_gro_complete() 1632 skb, nhoff + sizeof(*iph)); in inet_gro_complete() [all …]
|
A D | fou.c | 264 int nhoff) in fou_gro_complete() argument 277 err = ops->callbacks.gro_complete(skb, nhoff); in fou_gro_complete() 279 skb_set_inner_mac_header(skb, nhoff); in fou_gro_complete() 458 static int gue_gro_complete(struct sock *sk, struct sk_buff *skb, int nhoff) in gue_gro_complete() argument 460 struct guehdr *guehdr = (struct guehdr *)(skb->data + nhoff); in gue_gro_complete() 494 err = ops->callbacks.gro_complete(skb, nhoff + guehlen); in gue_gro_complete() 496 skb_set_inner_mac_header(skb, nhoff + guehlen); in gue_gro_complete()
|
/linux/net/ipv6/netfilter/ |
A D | nf_conntrack_reasm.c | 167 const struct frag_hdr *fhdr, int nhoff) in nf_ct_frag6_queue() argument 277 fq->nhoffset = nhoff; in nf_ct_frag6_queue() 441 int fhoff, nhoff, ret; in nf_ct_frag6_gather() local 453 if (find_prev_fhdr(skb, &prevhdr, &nhoff, &fhoff) < 0) in nf_ct_frag6_gather() 481 ret = nf_ct_frag6_queue(fq, skb, fhdr, nhoff); in nf_ct_frag6_gather()
|
/linux/net/ethernet/ |
A D | eth.c | 462 int eth_gro_complete(struct sk_buff *skb, int nhoff) in eth_gro_complete() argument 464 struct ethhdr *eh = (struct ethhdr *)(skb->data + nhoff); in eth_gro_complete() 470 skb_set_inner_mac_header(skb, nhoff); in eth_gro_complete() 477 skb, nhoff + sizeof(*eh)); in eth_gro_complete()
|
/linux/net/8021q/ |
A D | vlan_core.c | 512 static int vlan_gro_complete(struct sk_buff *skb, int nhoff) in vlan_gro_complete() argument 514 struct vlan_hdr *vhdr = (struct vlan_hdr *)(skb->data + nhoff); in vlan_gro_complete() 524 skb, nhoff + sizeof(*vhdr)); in vlan_gro_complete()
|