| /linux/samples/bpf/ |
| H A D | sockex2_kern.c | 45 static inline int ip_is_fragment(struct __sk_buff *ctx, __u64 nhoff) 47 return load_half(ctx, nhoff + offsetof(struct iphdr, frag_off)) in ip_is_fragment() 61 static inline __u64 parse_ip(struct __sk_buff *skb, __u64 nhoff, __u64 *ip_proto, 66 if (unlikely(ip_is_fragment(skb, nhoff))) in parse_ip() 69 *ip_proto = load_byte(skb, nhoff + offsetof(struct iphdr, protocol)); in parse_ip() 72 flow->src = load_word(skb, nhoff + offsetof(struct iphdr, saddr)); in parse_ip() 73 flow->dst = load_word(skb, nhoff + offsetof(struct iphdr, daddr)); in parse_ip() 76 verlen = load_byte(skb, nhoff + 0/*offsetof(struct iphdr, ihl)*/); in parse_ip() 78 nhoff += 20; in parse_ip() 80 nhoff in parse_ip() 46 ip_is_fragment(struct __sk_buff * ctx,__u64 nhoff) ip_is_fragment() argument 62 parse_ip(struct __sk_buff * skb,__u64 nhoff,__u64 * ip_proto,struct flow_key_record * flow) parse_ip() argument 86 parse_ipv6(struct __sk_buff * skb,__u64 nhoff,__u64 * ip_proto,struct flow_key_record * flow) parse_ipv6() argument 103 __u64 nhoff = ETH_HLEN; flow_dissector() local [all...] |
| H A D | sockex3_kern.c | 42 static inline int ip_is_fragment(struct __sk_buff *ctx, __u64 nhoff) in ip_is_fragment() argument 44 return load_half(ctx, nhoff + offsetof(struct iphdr, frag_off)) in ip_is_fragment() 109 __u32 nhoff = skb->cb[0]; in parse_ip_proto() local 120 nhoff + offsetof(struct gre_hdr, flags)); in parse_ip_proto() 122 nhoff + offsetof(struct gre_hdr, proto)); in parse_ip_proto() 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() 135 skb->cb[0] = nhoff; in parse_ip_proto() [all …]
|
| H 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/ |
| H A D | xt_HMARK.c | 132 hmark_set_tuple_ports(const struct sk_buff *skb, unsigned int nhoff, in hmark_set_tuple_ports() argument 141 nhoff += protoff; in hmark_set_tuple_ports() 142 if (skb_copy_bits(skb, nhoff, &t->uports, sizeof(t->uports)) < 0) 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() 188 nexthdr = ipv6_find_hdr(skb, &nhoff, -1, &fragoff, &flag); in hmark_pkt_set_htuple_ipv6() 206 hmark_set_tuple_ports(skb, nhoff, t, info); in hmark_pkt_set_htuple_ipv6() 231 static int get_inner_hdr(const struct sk_buff *skb, int iphsz, int *nhoff) in get_inner_hdr() argument [all …]
|
| /linux/Documentation/bpf/ |
| H 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/tools/testing/selftests/bpf/prog_tests/ |
| H A D | flow_dissector.c | 111 .nhoff = ETH_HLEN, 132 .nhoff = ETH_HLEN, 155 .nhoff = ETH_HLEN + VLAN_HLEN, 178 .nhoff = ETH_HLEN + VLAN_HLEN * 2, 203 .nhoff = ETH_HLEN, 229 .nhoff = ETH_HLEN, 252 .nhoff = ETH_HLEN, 278 .nhoff = ETH_HLEN, 301 .nhoff = ETH_HLEN, 325 .nhoff = ETH_HLEN, [all …]
|
| /linux/net/ipv4/ |
| H 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()
|
| H A D | udp_offload.c | 915 int udp_gro_complete(struct sk_buff *skb, int nhoff, in udp_gro_complete() argument 918 __be16 newlen = htons(skb->len - nhoff); in udp_gro_complete() 919 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp_gro_complete() 941 nhoff + sizeof(struct udphdr)); in udp_gro_complete() 952 INDIRECT_CALLABLE_SCOPE int udp4_gro_complete(struct sk_buff *skb, int nhoff) in udp4_gro_complete() argument 956 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp4_gro_complete() 960 uh->len = htons(skb->len - nhoff); in udp4_gro_complete() 971 uh->check = ~udp_v4_check(skb->len - nhoff, iph->saddr, in udp4_gro_complete() 974 return udp_gro_complete(skb, nhoff, udp4_lib_lookup_skb); in udp4_gro_complete()
|
| H A D | icmp.c | 734 int nhoff; in icmp_ext_append() local 757 nhoff = skb_network_offset(skb); in icmp_ext_append() 758 payload_len = min(skb->len - nhoff, ICMP_EXT_ORIG_DGRAM_MIN_LEN); in icmp_ext_append() 763 if (pskb_trim(skb, nhoff + ICMP_EXT_ORIG_DGRAM_MIN_LEN) || in icmp_ext_append() 764 __skb_put_padto(skb, nhoff + ICMP_EXT_ORIG_DGRAM_MIN_LEN, false)) in icmp_ext_append()
|
| /linux/net/ipv6/ |
| H 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()
|
| H A D | ip6_input.c | 303 IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); in ip6_rcv_core() 409 unsigned int nhoff; in ip6_protocol_deliver_rcu() local 419 nhoff = IP6CB(skb)->nhoff; in ip6_protocol_deliver_rcu() 423 nexthdr = skb_network_header(skb)[nhoff]; in ip6_protocol_deliver_rcu() 506 ICMPV6_UNK_NEXTHDR, nhoff); in ip6_protocol_deliver_rcu()
|
| H A D | icmp.c | 569 int nhoff; in icmp6_ext_append() local 599 nhoff = skb_network_offset(skb); in icmp6_ext_append() 600 payload_len = min(skb->len - nhoff, ICMP_EXT_ORIG_DGRAM_MIN_LEN); in icmp6_ext_append() 605 if (pskb_trim(skb, nhoff + ICMP_EXT_ORIG_DGRAM_MIN_LEN) || in icmp6_ext_append() 606 __skb_put_padto(skb, nhoff + ICMP_EXT_ORIG_DGRAM_MIN_LEN, false)) in icmp6_ext_append()
|
| H A D | xfrm6_tunnel.c | 219 return skb_network_header(skb)[IP6CB(skb)->nhoff]; in xfrm6_tunnel_input()
|
| /linux/net/ipv6/netfilter/ |
| H A D | nf_conntrack_reasm.c | 171 const struct frag_hdr *fhdr, int nhoff, in nf_ct_frag6_queue() argument 283 fq->nhoffset = nhoff; in nf_ct_frag6_queue() 449 int fhoff, nhoff, ret; in nf_ct_frag6_gather() local 462 if (find_prev_fhdr(skb, &prevhdr, &nhoff, &fhoff) < 0) in nf_ct_frag6_gather() 491 ret = nf_ct_frag6_queue(fq, skb, fhdr, nhoff, &refs); in nf_ct_frag6_gather()
|
| /linux/net/ethernet/ |
| H A D | eth.c | 441 int eth_gro_complete(struct sk_buff *skb, int nhoff) in eth_gro_complete() argument 443 struct ethhdr *eh = (struct ethhdr *)(skb->data + nhoff); in eth_gro_complete() 449 skb_set_inner_mac_header(skb, nhoff); in eth_gro_complete() 455 skb, nhoff + sizeof(*eh)); in eth_gro_complete()
|
| /linux/net/8021q/ |
| H 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()
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | bpf_flow.c | 418 keys->nhoff += sizeof(*vlan); in PROG() 426 keys->nhoff += sizeof(*vlan); in PROG()
|
| /linux/include/linux/ |
| H A D | ipv6.h | 163 __u16 nhoff; member
|
| H A D | etherdevice.h | 68 int eth_gro_complete(struct sk_buff *skb, int nhoff);
|
| /linux/include/net/netfilter/ |
| H A D | nf_tables.h | 36 u16 nhoff; member 89 pkt->nhoff = 0; in nft_set_pktinfo_unspec()
|
| /linux/net/xfrm/ |
| H A D | xfrm_interface_core.c | 344 return xfrmi_input(skb, skb_network_header(skb)[IP6CB(skb)->nhoff], in xfrmi6_rcv()
|
| /linux/drivers/net/ethernet/mellanox/mlx4/ |
| H A D | en_netdev.c | 375 int nhoff = skb_network_offset(skb); in mlx4_en_filter_rfs() local 384 ip = (const struct iphdr *)(skb->data + nhoff); in mlx4_en_filter_rfs() 390 ports = (const __be16 *)(skb->data + nhoff + 4 * ip->ihl); in mlx4_en_filter_rfs()
|
| /linux/tools/include/uapi/linux/ |
| H A D | bpf.h | 7459 __u16 nhoff; 7392 __u16 nhoff; global() member
|