Home
last modified time | relevance | path

Searched refs:nhoff (Results 1 – 25 of 53) sorted by relevance

123

/linux-6.3-rc2/samples/bpf/
A Dsockex2_kern.c79 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 Dsockex3_kern.c127 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 Dparse_ldabs.c21 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-6.3-rc2/net/netfilter/
A Dxt_HMARK.c141 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 Dnft_inner.c56 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 Dnf_conntrack_core.c274 unsigned int nhoff, in nf_ct_get_tuple() argument
290 nhoff += offsetof(struct iphdr, saddr); in nf_ct_get_tuple()
294 nhoff += offsetof(struct ipv6hdr, saddr); in nf_ct_get_tuple()
301 ap = skb_header_pointer(skb, nhoff, size, _addrs); in nf_ct_get_tuple()
367 dataoff = nhoff + (iph->ihl << 2); in ipv4_get_l4proto()
373 nhoff, iph->ihl << 2, skb->len); in ipv4_get_l4proto()
384 unsigned int extoff = nhoff + sizeof(struct ipv6hdr); in ipv6_get_l4proto()
409 unsigned int nhoff, u8 pf, u8 *l4num) in get_l4proto() argument
413 return ipv4_get_l4proto(skb, nhoff, l4num); in get_l4proto()
416 return ipv6_get_l4proto(skb, nhoff, l4num); in get_l4proto()
[all …]
/linux-6.3-rc2/net/ipv6/
A Dip6_offload.c86 int nhoff; in ipv6_gso_segment() local
93 nhoff = skb_network_header(skb) - skb_mac_header(skb); in ipv6_gso_segment()
136 payload_len = skb->len - nhoff - sizeof(*ipv6h); in ipv6_gso_segment()
329 skb_set_inner_network_header(skb, nhoff); in ipv6_gro_complete()
332 payload_len = skb->len - nhoff - sizeof(*iph); in ipv6_gro_complete()
344 iph = (struct ipv6hdr *)(skb->data + nhoff); in ipv6_gro_complete()
357 iph = (struct ipv6hdr *)(skb->data + nhoff); in ipv6_gro_complete()
366 udp6_gro_complete, skb, nhoff); in ipv6_gro_complete()
376 return ipv6_gro_complete(skb, nhoff); in sit_gro_complete()
383 return ipv6_gro_complete(skb, nhoff); in ip6ip6_gro_complete()
[all …]
A Dudp_offload.c162 INDIRECT_CALLABLE_SCOPE int udp6_gro_complete(struct sk_buff *skb, int nhoff) in udp6_gro_complete() argument
165 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp6_gro_complete()
169 uh->len = htons(skb->len - nhoff); in udp6_gro_complete()
186 uh->check = ~udp_v6_check(skb->len - nhoff, &ipv6h->saddr, in udp6_gro_complete()
189 return udp_gro_complete(skb, nhoff, udp6_lib_lookup_skb); in udp6_gro_complete()
A Dreassembly.c107 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 Dip6_input.c261 IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); in ip6_rcv_core()
367 unsigned int nhoff; in ip6_protocol_deliver_rcu() local
377 nhoff = IP6CB(skb)->nhoff; in ip6_protocol_deliver_rcu()
381 nexthdr = skb_network_header(skb)[nhoff]; in ip6_protocol_deliver_rcu()
462 ICMPV6_UNK_NEXTHDR, nhoff); in ip6_protocol_deliver_rcu()
A Desp6_offload.c58 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 Dxfrm6_input.c46 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()
/linux-6.3-rc2/net/core/
A Dflow_dissector.c902 flow_keys->nhoff = nhoff; in bpf_flow_dissect()
915 flow_keys->nhoff = clamp_t(u16, flow_keys->nhoff, nhoff, hlen); in bpf_flow_dissect()
989 nhoff += offset; in __skb_flow_dissect()
1097 nhoff += iph->ihl * 4; in __skb_flow_dissect()
1203 nhoff += sizeof(*vlan); in __skb_flow_dissect()
1273 nhoff += PPPOE_SES_HLEN; in __skb_flow_dissect()
1353 nhoff, hlen); in __skb_flow_dissect()
1388 nhoff += HSR_HLEN; in __skb_flow_dissect()
1466 nhoff += sizeof(_fh); in __skb_flow_dissect()
1528 data, nhoff, hlen); in __skb_flow_dissect()
[all …]
/linux-6.3-rc2/net/ipv6/ila/
A Dila_common.c77 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-6.3-rc2/tools/testing/selftests/bpf/prog_tests/
A Dflow_dissector.c32 got.nhoff, expected.nhoff, \
124 .nhoff = ETH_HLEN,
145 .nhoff = ETH_HLEN,
216 .nhoff = ETH_HLEN,
242 .nhoff = ETH_HLEN,
265 .nhoff = ETH_HLEN,
291 .nhoff = ETH_HLEN,
314 .nhoff = ETH_HLEN,
338 .nhoff = ETH_HLEN,
365 .nhoff = ETH_HLEN,
[all …]
/linux-6.3-rc2/Documentation/bpf/
A Dprog_flow_dissector.rst26 * ``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-6.3-rc2/net/nsh/
A Dnsh.c82 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-6.3-rc2/net/bridge/netfilter/
A Dnf_conntrack_bridge.c207 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-6.3-rc2/net/ipv4/
A Dgre_offload.c235 static int gre_gro_complete(struct sk_buff *skb, int nhoff) in gre_gro_complete() argument
237 struct gre_base_hdr *greh = (struct gre_base_hdr *)(skb->data + nhoff); in gre_gro_complete()
255 err = ptype->callbacks.gro_complete(skb, nhoff + grehlen); in gre_gro_complete()
257 skb_set_inner_mac_header(skb, nhoff + grehlen); in gre_gro_complete()
A Dudp_offload.c662 int udp_gro_complete(struct sk_buff *skb, int nhoff, in udp_gro_complete() argument
665 __be16 newlen = htons(skb->len - nhoff); in udp_gro_complete()
666 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp_gro_complete()
688 nhoff + sizeof(struct udphdr)); in udp_gro_complete()
700 INDIRECT_CALLABLE_SCOPE int udp4_gro_complete(struct sk_buff *skb, int nhoff) in udp4_gro_complete() argument
703 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp4_gro_complete()
707 uh->len = htons(skb->len - nhoff); in udp4_gro_complete()
724 uh->check = ~udp_v4_check(skb->len - nhoff, iph->saddr, in udp4_gro_complete()
727 return udp_gro_complete(skb, nhoff, udp4_lib_lookup_skb); in udp4_gro_complete()
A Daf_inet.c1354 int nhoff; in inet_gso_segment() local
1408 iph = (struct iphdr *)(skb_mac_header(skb) + nhoff); in inet_gso_segment()
1413 offset += skb->len - nhoff - ihl; in inet_gso_segment()
1414 tot_len = skb->len - nhoff; in inet_gso_segment()
1426 tot_len = skb->len - nhoff; in inet_gso_segment()
1430 tot_len = skb->len - nhoff; in inet_gso_segment()
1618 int inet_gro_complete(struct sk_buff *skb, int nhoff) in inet_gro_complete() argument
1628 skb_set_inner_network_header(skb, nhoff); in inet_gro_complete()
1631 iph_set_totlen(iph, skb->len - nhoff); in inet_gro_complete()
1644 skb, nhoff + sizeof(*iph)); in inet_gro_complete()
[all …]
A Dfou_core.c263 int nhoff) in fou_gro_complete() argument
275 err = ops->callbacks.gro_complete(skb, nhoff); in fou_gro_complete()
277 skb_set_inner_mac_header(skb, nhoff); in fou_gro_complete()
448 static int gue_gro_complete(struct sock *sk, struct sk_buff *skb, int nhoff) in gue_gro_complete() argument
450 struct guehdr *guehdr = (struct guehdr *)(skb->data + nhoff); in gue_gro_complete()
483 err = ops->callbacks.gro_complete(skb, nhoff + guehlen); in gue_gro_complete()
485 skb_set_inner_mac_header(skb, nhoff + guehlen); in gue_gro_complete()
/linux-6.3-rc2/net/ipv6/netfilter/
A Dnf_conntrack_reasm.c166 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-6.3-rc2/net/ethernet/
A Deth.c456 int eth_gro_complete(struct sk_buff *skb, int nhoff) in eth_gro_complete() argument
458 struct ethhdr *eh = (struct ethhdr *)(skb->data + nhoff); in eth_gro_complete()
464 skb_set_inner_mac_header(skb, nhoff); in eth_gro_complete()
470 skb, nhoff + sizeof(*eh)); in eth_gro_complete()
/linux-6.3-rc2/net/8021q/
A Dvlan_core.c506 static int vlan_gro_complete(struct sk_buff *skb, int nhoff) in vlan_gro_complete() argument
508 struct vlan_hdr *vhdr = (struct vlan_hdr *)(skb->data + nhoff); in vlan_gro_complete()
517 skb, nhoff + sizeof(*vhdr)); in vlan_gro_complete()

Completed in 52 milliseconds

123