| /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 | 127 nhoff += 4; in parse_ip_proto() 129 nhoff += 4; in parse_ip_proto() 131 nhoff += 4; in parse_ip_proto() 133 nhoff += 4; in parse_ip_proto() 166 nhoff = skb->cb[0]; in bpf_func_ip() 181 skb->cb[0] = nhoff; in bpf_func_ip() 195 nhoff = skb->cb[0]; in bpf_func_ipv6() 205 skb->cb[0] = nhoff; in bpf_func_ipv6() 213 __u32 nhoff, proto; in bpf_func_vlan() local 215 nhoff = skb->cb[0]; in bpf_func_vlan() [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 | nft_inner.c | 56 u32 nhoff, thoff; in nft_inner_parse_l2l3() local 113 nhoff = off; in nft_inner_parse_l2l3() 119 iph = skb_header_pointer(pkt->skb, nhoff, sizeof(_iph), &_iph); in nft_inner_parse_l2l3() 126 ctx->inner_nhoff = nhoff; in nft_inner_parse_l2l3() 129 thoff = nhoff + (iph->ihl * 4); in nft_inner_parse_l2l3() 143 ip6h = skb_header_pointer(pkt->skb, nhoff, sizeof(_ip6h), &_ip6h); in nft_inner_parse_l2l3() 150 ctx->inner_nhoff = nhoff; in nft_inner_parse_l2l3() 153 thoff = nhoff; in nft_inner_parse_l2l3() 159 thoff = nhoff + sizeof(_ip6h); in nft_inner_parse_l2l3()
|
| A D | nf_conntrack_core.c | 268 unsigned int nhoff, in nf_ct_get_tuple() argument 284 nhoff += offsetof(struct iphdr, saddr); in nf_ct_get_tuple() 288 nhoff += offsetof(struct ipv6hdr, saddr); in nf_ct_get_tuple() 295 ap = skb_header_pointer(skb, nhoff, size, _addrs); in nf_ct_get_tuple() 361 dataoff = nhoff + (iph->ihl << 2); in ipv4_get_l4proto() 367 nhoff, iph->ihl << 2, skb->len); in ipv4_get_l4proto() 378 unsigned int extoff = nhoff + sizeof(struct ipv6hdr); in ipv6_get_l4proto() 403 unsigned int nhoff, u8 pf, u8 *l4num) in get_l4proto() argument 407 return ipv4_get_l4proto(skb, nhoff, l4num); in get_l4proto() 410 return ipv6_get_l4proto(skb, nhoff, l4num); in get_l4proto() [all …]
|
| /linux/net/core/ |
| A D | flow_dissector.c | 211 int nhoff, int hlen) in __skb_flow_dissect_ah() argument 233 int nhoff, int hlen) in __skb_flow_dissect_esp() argument 1004 flow_keys->nhoff = nhoff; in bpf_flow_dissect() 1017 flow_keys->nhoff = clamp_t(u16, flow_keys->nhoff, nhoff, hlen); in bpf_flow_dissect() 1091 nhoff += offset; in __skb_flow_dissect() 1199 nhoff += iph->ihl * 4; in __skb_flow_dissect() 1455 nhoff, hlen); in __skb_flow_dissect() 1490 nhoff += HSR_HLEN; in __skb_flow_dissect() 1498 nhoff, hlen); in __skb_flow_dissect() 1574 nhoff += sizeof(_fh); in __skb_flow_dissect() [all …]
|
| /linux/net/ipv6/ |
| A D | ip6_offload.c | 119 int nhoff; in ipv6_gso_segment() local 126 nhoff = skb_network_header(skb) - skb_mac_header(skb); in ipv6_gso_segment() 169 payload_len = skb->len - nhoff - sizeof(*ipv6h); in ipv6_gso_segment() 347 skb_set_inner_network_header(skb, nhoff); in ipv6_gro_complete() 350 payload_len = skb->len - nhoff - sizeof(*iph); in ipv6_gro_complete() 362 iph = (struct ipv6hdr *)(skb->data + nhoff); in ipv6_gro_complete() 375 iph = (struct ipv6hdr *)(skb->data + nhoff); in ipv6_gro_complete() 384 udp6_gro_complete, skb, nhoff); in ipv6_gro_complete() 394 return ipv6_gro_complete(skb, nhoff); in sit_gro_complete() 401 return ipv6_gro_complete(skb, nhoff); in ip6ip6_gro_complete() [all …]
|
| A D | udp_offload.c | 165 INDIRECT_CALLABLE_SCOPE int udp6_gro_complete(struct sk_buff *skb, int nhoff) in udp6_gro_complete() argument 169 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp6_gro_complete() 173 uh->len = htons(skb->len - nhoff); in udp6_gro_complete() 184 uh->check = ~udp_v6_check(skb->len - nhoff, &ipv6h->saddr, in udp6_gro_complete() 187 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 214 fq->nhoffset = nhoff; in ip6_frag_queue() 260 unsigned int nhoff; in ip6_frag_reasm() local 283 nhoff = fq->nhoffset; in ip6_frag_reasm() 284 skb_network_header(skb)[nhoff] = skb_transport_header(skb)[0]; in ip6_frag_reasm() 298 IP6CB(skb)->nhoff = nhoff; in ip6_frag_reasm() 358 IP6CB(skb)->nhoff = (u8 *)fhdr - skb_network_header(skb); in ipv6_frag_rcv() 388 ret = ip6_frag_queue(fq, skb, fhdr, IP6CB(skb)->nhoff, in ipv6_frag_rcv()
|
| A D | ip6_input.c | 261 IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); in ip6_rcv_core() 366 unsigned int nhoff; in ip6_protocol_deliver_rcu() local 376 nhoff = IP6CB(skb)->nhoff; in ip6_protocol_deliver_rcu() 380 nexthdr = skb_network_header(skb)[nhoff]; in ip6_protocol_deliver_rcu() 459 ICMPV6_UNK_NEXTHDR, nhoff); in ip6_protocol_deliver_rcu()
|
| A D | esp6_offload.c | 62 int nhoff; in esp6_gro_receive() local 108 nhoff = esp6_nexthdr_esp_offset(ipv6_hdr(skb), offset); in esp6_gro_receive() 109 if (!nhoff) in esp6_gro_receive() 112 IP6CB(skb)->nhoff = nhoff; in esp6_gro_receive()
|
| A D | xfrm6_input.c | 48 skb_network_header(skb)[IP6CB(skb)->nhoff] = in xfrm6_transport_finish() 220 return xfrm6_rcv_spi(skb, skb_network_header(skb)[IP6CB(skb)->nhoff], in xfrm6_rcv_tnl()
|
| A D | exthdrs.c | 329 opt->nhoff = dstbuf; in ipv6_destopt_rcv() 331 opt->nhoff = opt->dst1; in ipv6_destopt_rcv() 422 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_srh_rcv() 532 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_rpl_srh_rcv() 717 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); in ipv6_rthdr_rcv() 1061 opt->nhoff = sizeof(struct ipv6hdr); in ipv6_parse_hopopts()
|
| /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 | 31 got.nhoff, expected.nhoff, \ 123 .nhoff = ETH_HLEN, 144 .nhoff = ETH_HLEN, 215 .nhoff = ETH_HLEN, 241 .nhoff = ETH_HLEN, 264 .nhoff = ETH_HLEN, 290 .nhoff = ETH_HLEN, 313 .nhoff = ETH_HLEN, 337 .nhoff = ETH_HLEN, 360 .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/bridge/netfilter/ |
| A D | nf_conntrack_bridge.c | 207 int nhoff, len; in nf_ct_br_ip_check() local 209 nhoff = skb_network_offset(skb); in nf_ct_br_ip_check() 216 if (skb->len < nhoff + len || in nf_ct_br_ip_check() 226 int nhoff, len; in nf_ct_br_ipv6_check() local 228 nhoff = skb_network_offset(skb); in nf_ct_br_ipv6_check() 233 len = ntohs(hdr->payload_len) + sizeof(struct ipv6hdr) + nhoff; in nf_ct_br_ipv6_check()
|
| /linux/net/ipv4/ |
| A D | gre_offload.c | 236 static int gre_gro_complete(struct sk_buff *skb, int nhoff) in gre_gro_complete() argument 238 struct gre_base_hdr *greh = (struct gre_base_hdr *)(skb->data + nhoff); in gre_gro_complete() 256 err = ptype->callbacks.gro_complete(skb, nhoff + grehlen); in gre_gro_complete() 258 skb_set_inner_mac_header(skb, nhoff + grehlen); in gre_gro_complete()
|
| A D | udp_offload.c | 694 int udp_gro_complete(struct sk_buff *skb, int nhoff, in udp_gro_complete() argument 697 __be16 newlen = htons(skb->len - nhoff); in udp_gro_complete() 698 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp_gro_complete() 720 nhoff + sizeof(struct udphdr)); in udp_gro_complete() 732 INDIRECT_CALLABLE_SCOPE int udp4_gro_complete(struct sk_buff *skb, int nhoff) in udp4_gro_complete() argument 736 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp4_gro_complete() 740 uh->len = htons(skb->len - nhoff); in udp4_gro_complete() 751 uh->check = ~udp_v4_check(skb->len - nhoff, iph->saddr, in udp4_gro_complete() 754 return udp_gro_complete(skb, nhoff, udp4_lib_lookup_skb); in udp4_gro_complete()
|
| A D | af_inet.c | 1380 int nhoff; in inet_gso_segment() local 1434 iph = (struct iphdr *)(skb_mac_header(skb) + nhoff); in inet_gso_segment() 1439 offset += skb->len - nhoff - ihl; in inet_gso_segment() 1440 tot_len = skb->len - nhoff; in inet_gso_segment() 1452 tot_len = skb->len - nhoff; in inet_gso_segment() 1456 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 1615 skb_set_inner_network_header(skb, nhoff); in inet_gro_complete() 1618 iph_set_totlen(iph, skb->len - nhoff); in inet_gro_complete() 1631 skb, nhoff + sizeof(*iph)); in inet_gro_complete() [all …]
|
| A D | fou_core.c | 269 int nhoff) in fou_gro_complete() argument 291 err = ops->callbacks.gro_complete(skb, nhoff); in fou_gro_complete() 293 skb_set_inner_mac_header(skb, nhoff); in fou_gro_complete() 467 static int gue_gro_complete(struct sock *sk, struct sk_buff *skb, int nhoff) in gue_gro_complete() argument 469 struct guehdr *guehdr = (struct guehdr *)(skb->data + nhoff); in gue_gro_complete() 502 err = ops->callbacks.gro_complete(skb, nhoff + guehlen); in gue_gro_complete() 504 skb_set_inner_mac_header(skb, nhoff + guehlen); in gue_gro_complete()
|
| /linux/net/ethernet/ |
| A D | eth.c | 444 int eth_gro_complete(struct sk_buff *skb, int nhoff) in eth_gro_complete() argument 446 struct ethhdr *eh = (struct ethhdr *)(skb->data + nhoff); in eth_gro_complete() 452 skb_set_inner_mac_header(skb, nhoff); in eth_gro_complete() 458 skb, nhoff + sizeof(*eh)); in eth_gro_complete()
|
| /linux/net/ipv6/netfilter/ |
| A D | nf_conntrack_reasm.c | 170 const struct frag_hdr *fhdr, int nhoff) in nf_ct_frag6_queue() argument 281 fq->nhoffset = nhoff; in nf_ct_frag6_queue() 446 int fhoff, nhoff, ret; in nf_ct_frag6_gather() local 458 if (find_prev_fhdr(skb, &prevhdr, &nhoff, &fhoff) < 0) in nf_ct_frag6_gather() 485 ret = nf_ct_frag6_queue(fq, skb, fhdr, nhoff); in nf_ct_frag6_gather()
|
| /linux/net/8021q/ |
| A D | vlan_core.c | 515 static int vlan_gro_complete(struct sk_buff *skb, int nhoff) in vlan_gro_complete() argument 517 struct vlan_hdr *vhdr = (struct vlan_hdr *)(skb->data + nhoff); in vlan_gro_complete() 526 skb, nhoff + sizeof(*vhdr)); in vlan_gro_complete()
|