Searched refs:nhoff (Results 1 - 25 of 50) sorted by relevance

12

/linux-master/samples/bpf/
H A Dsockex2_kern.c46 static inline int ip_is_fragment(struct __sk_buff *ctx, __u64 nhoff) argument
48 return load_half(ctx, nhoff + offsetof(struct iphdr, frag_off))
62 static inline __u64 parse_ip(struct __sk_buff *skb, __u64 nhoff, __u64 *ip_proto, argument
67 if (unlikely(ip_is_fragment(skb, nhoff)))
70 *ip_proto = load_byte(skb, nhoff + offsetof(struct iphdr, protocol));
73 flow->src = load_word(skb, nhoff + offsetof(struct iphdr, saddr));
74 flow->dst = load_word(skb, nhoff + offsetof(struct iphdr, daddr));
77 verlen = load_byte(skb, nhoff + 0/*offsetof(struct iphdr, ihl)*/);
79 nhoff += 20;
81 nhoff
86 parse_ipv6(struct __sk_buff *skb, __u64 nhoff, __u64 *ip_proto, struct flow_key_record *flow) argument
103 __u64 nhoff = ETH_HLEN; local
[all...]
H A Dsockex3_kern.c42 static inline int ip_is_fragment(struct __sk_buff *ctx, __u64 nhoff) argument
44 return load_half(ctx, nhoff + offsetof(struct iphdr, frag_off))
109 __u32 nhoff = skb->cb[0]; local
120 nhoff + offsetof(struct gre_hdr, flags));
122 nhoff + offsetof(struct gre_hdr, proto));
127 nhoff += 4;
129 nhoff += 4;
131 nhoff += 4;
133 nhoff += 4;
135 skb->cb[0] = nhoff;
161 __u32 nhoff, verlen, ip_proto; local
190 __u32 nhoff, ip_proto; local
213 __u32 nhoff, proto; local
230 __u32 nhoff, label; local
296 __u32 nhoff = ETH_HLEN; local
[all...]
H A Dparse_ldabs.c21 static inline int ip_is_fragment(struct __sk_buff *ctx, __u64 nhoff) argument
23 return load_half(ctx, nhoff + offsetof(struct iphdr, frag_off))
/linux-master/net/netfilter/
H A Dxt_HMARK.c132 hmark_set_tuple_ports(const struct sk_buff *skb, unsigned int nhoff, argument
141 nhoff += protoff;
142 if (skb_copy_bits(skb, nhoff, &t->uports, sizeof(t->uports)) < 0)
170 unsigned int nhoff = 0; local
175 nexthdr = ipv6_find_hdr(skb, &nhoff, -1, &fragoff, &flag);
182 if (get_inner6_hdr(skb, &nhoff)) {
183 ip6 = skb_header_pointer(skb, nhoff, sizeof(_ip6), &_ip6);
188 nexthdr = ipv6_find_hdr(skb, &nhoff, -1, &fragoff, &flag);
206 hmark_set_tuple_ports(skb, nhoff, t, info);
231 static int get_inner_hdr(const struct sk_buff *skb, int iphsz, int *nhoff) argument
254 int nhoff = skb_network_offset(skb); local
[all...]
H A Dnft_inner.c56 u32 nhoff, thoff; local
113 nhoff = off;
119 iph = skb_header_pointer(pkt->skb, nhoff, sizeof(_iph), &_iph);
126 ctx->inner_nhoff = nhoff;
129 thoff = nhoff + (iph->ihl * 4);
143 ip6h = skb_header_pointer(pkt->skb, nhoff, sizeof(_ip6h), &_ip6h);
150 ctx->inner_nhoff = nhoff;
153 thoff = nhoff;
159 thoff = nhoff + sizeof(_ip6h);
H A Dnf_conntrack_core.c268 unsigned int nhoff,
284 nhoff += offsetof(struct iphdr, saddr);
288 nhoff += offsetof(struct ipv6hdr, saddr);
295 ap = skb_header_pointer(skb, nhoff, size, _addrs);
344 static int ipv4_get_l4proto(const struct sk_buff *skb, unsigned int nhoff, argument
351 iph = skb_header_pointer(skb, nhoff, sizeof(_iph), &_iph);
361 dataoff = nhoff + (iph->ihl << 2);
366 pr_debug("bogus IPv4 packet: nhoff %u, ihl %u, skblen %u\n",
367 nhoff, iph->ihl << 2, skb->len);
374 static int ipv6_get_l4proto(const struct sk_buff *skb, unsigned int nhoff, argument
267 nf_ct_get_tuple(const struct sk_buff *skb, unsigned int nhoff, unsigned int dataoff, u_int16_t l3num, u_int8_t protonum, struct net *net, struct nf_conntrack_tuple *tuple) argument
402 get_l4proto(const struct sk_buff *skb, unsigned int nhoff, u8 pf, u8 *l4num) argument
419 nf_ct_get_tuplepr(const struct sk_buff *skb, unsigned int nhoff, u_int16_t l3num, struct net *net, struct nf_conntrack_tuple *tuple) argument
[all...]
/linux-master/net/ipv6/ila/
H A Dila_common.c77 size_t nhoff = sizeof(struct ipv6hdr); local
83 if (likely(pskb_may_pull(skb, nhoff + sizeof(struct tcphdr)))) {
85 (skb_network_header(skb) + nhoff);
93 if (likely(pskb_may_pull(skb, nhoff + sizeof(struct udphdr)))) {
95 (skb_network_header(skb) + nhoff);
108 nhoff + sizeof(struct icmp6hdr)))) {
110 (skb_network_header(skb) + nhoff);
/linux-master/net/ipv6/
H A Dip6_offload.c119 int nhoff; local
126 nhoff = skb_network_header(skb) - skb_mac_header(skb);
154 skb->network_header = skb_mac_header(skb) + nhoff - skb->head;
163 ipv6h = (struct ipv6hdr *)(skb_mac_header(skb) + nhoff);
169 payload_len = skb->len - nhoff - sizeof(*ipv6h);
349 INDIRECT_CALLABLE_SCOPE int ipv6_gro_complete(struct sk_buff *skb, int nhoff) argument
358 skb_set_inner_network_header(skb, nhoff);
361 payload_len = skb->len - nhoff - sizeof(*iph);
373 iph = (struct ipv6hdr *)(skb->data + nhoff);
386 iph = (struct ipv6hdr *)(skb->data + nhoff);
401 sit_gro_complete(struct sk_buff *skb, int nhoff) argument
408 ip6ip6_gro_complete(struct sk_buff *skb, int nhoff) argument
415 ip4ip6_gro_complete(struct sk_buff *skb, int nhoff) argument
[all...]
H A Dudp_offload.c165 INDIRECT_CALLABLE_SCOPE int udp6_gro_complete(struct sk_buff *skb, int nhoff) argument
168 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff);
172 uh->len = htons(skb->len - nhoff);
183 uh->check = ~udp_v6_check(skb->len - nhoff, &ipv6h->saddr,
186 return udp_gro_complete(skb, nhoff, udp6_lib_lookup_skb);
H A Dreassembly.c107 struct frag_hdr *fhdr, int nhoff,
214 fq->nhoffset = nhoff;
260 unsigned int nhoff; local
283 nhoff = fq->nhoffset;
284 skb_network_header(skb)[nhoff] = skb_transport_header(skb)[0];
298 IP6CB(skb)->nhoff = nhoff;
358 IP6CB(skb)->nhoff = (u8 *)fhdr - skb_network_header(skb);
388 ret = ip6_frag_queue(fq, skb, fhdr, IP6CB(skb)->nhoff,
106 ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb, struct frag_hdr *fhdr, int nhoff, u32 *prob_offset) argument
H A Desp6_offload.c62 int nhoff; local
101 nhoff = esp6_nexthdr_esp_offset(ipv6_hdr(skb), offset);
102 if (!nhoff)
105 IP6CB(skb)->nhoff = nhoff;
H A Dip6_input.c262 IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr);
368 unsigned int nhoff; local
378 nhoff = IP6CB(skb)->nhoff;
382 nexthdr = skb_network_header(skb)[nhoff];
444 * protocol not nhoff (which presumably is
461 ICMPV6_UNK_NEXTHDR, nhoff);
H A Dxfrm6_input.c48 skb_network_header(skb)[IP6CB(skb)->nhoff] =
229 return xfrm6_rcv_spi(skb, skb_network_header(skb)[IP6CB(skb)->nhoff],
H A Doutput_core.c132 IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr);
/linux-master/net/core/
H A Dflow_dissector.c211 int nhoff, int hlen)
219 hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), data, hlen, &_hdr);
233 int nhoff, int hlen)
241 hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), data, hlen, &_hdr);
255 int nhoff, int hlen)
265 hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), data, hlen, &_hdr);
493 void *target_container, const void *data, int nhoff,
507 hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), data,
552 int nhoff, int hlen)
567 arp = __skb_header_pointer(skb, nhoff, sizeo
208 __skb_flow_dissect_ah(const struct sk_buff *skb, struct flow_dissector *flow_dissector, void *target_container, const void *data, int nhoff, int hlen) argument
230 __skb_flow_dissect_esp(const struct sk_buff *skb, struct flow_dissector *flow_dissector, void *target_container, const void *data, int nhoff, int hlen) argument
252 __skb_flow_dissect_l2tpv3(const struct sk_buff *skb, struct flow_dissector *flow_dissector, void *target_container, const void *data, int nhoff, int hlen) argument
491 __skb_flow_dissect_mpls(const struct sk_buff *skb, struct flow_dissector *flow_dissector, void *target_container, const void *data, int nhoff, int hlen, int lse_index, bool *entropy_label) argument
549 __skb_flow_dissect_arp(const struct sk_buff *skb, struct flow_dissector *flow_dissector, void *target_container, const void *data, int nhoff, int hlen) argument
605 __skb_flow_dissect_cfm(const struct sk_buff *skb, struct flow_dissector *flow_dissector, void *target_container, const void *data, int nhoff, int hlen) argument
827 __skb_flow_dissect_ports(const struct sk_buff *skb, struct flow_dissector *flow_dissector, void *target_container, const void *data, int nhoff, u8 ip_proto, int hlen) argument
971 bpf_flow_dissect(struct bpf_prog *prog, struct bpf_flow_dissector *ctx, __be16 proto, int nhoff, int hlen, unsigned int flags) argument
1024 __skb_flow_dissect(const struct net *net, const struct sk_buff *skb, struct flow_dissector *flow_dissector, void *target_container, const void *data, __be16 proto, int nhoff, int hlen, unsigned int flags) argument
[all...]
/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dflow_dissector.c21 "nhoff=%u/%u " \
32 got.nhoff, expected.nhoff, \
124 .nhoff = ETH_HLEN,
145 .nhoff = ETH_HLEN,
168 .nhoff = ETH_HLEN + VLAN_HLEN,
191 .nhoff = ETH_HLEN + VLAN_HLEN * 2,
216 .nhoff = ETH_HLEN,
242 .nhoff = ETH_HLEN,
265 .nhoff
[all...]
/linux-master/net/ipv4/
H A Dgre_offload.c236 static int gre_gro_complete(struct sk_buff *skb, int nhoff) argument
238 struct gre_base_hdr *greh = (struct gre_base_hdr *)(skb->data + nhoff);
256 err = ptype->callbacks.gro_complete(skb, nhoff + grehlen);
258 skb_set_inner_mac_header(skb, nhoff + grehlen);
H A Dudp_offload.c681 int udp_gro_complete(struct sk_buff *skb, int nhoff, argument
684 __be16 newlen = htons(skb->len - nhoff);
685 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff);
707 nhoff + sizeof(struct udphdr));
719 INDIRECT_CALLABLE_SCOPE int udp4_gro_complete(struct sk_buff *skb, int nhoff) argument
722 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff);
726 uh->len = htons(skb->len - nhoff);
737 uh->check = ~udp_v4_check(skb->len - nhoff, iph->saddr,
740 return udp_gro_complete(skb, nhoff, udp4_lib_lookup_skb);
H A Daf_inet.c1377 int nhoff; local
1382 nhoff = skb_network_header(skb) - skb_mac_header(skb);
1421 skb->network_header = skb_mac_header(skb) + nhoff - skb->head;
1431 iph = (struct iphdr *)(skb_mac_header(skb) + nhoff);
1436 offset += skb->len - nhoff - ihl;
1437 tot_len = skb->len - nhoff;
1449 tot_len = skb->len - nhoff;
1453 tot_len = skb->len - nhoff;
1644 int inet_gro_complete(struct sk_buff *skb, int nhoff) argument
1646 struct iphdr *iph = (struct iphdr *)(skb->data + nhoff);
1676 ipip_gro_complete(struct sk_buff *skb, int nhoff) argument
[all...]
/linux-master/net/bridge/netfilter/
H A Dnf_conntrack_bridge.c207 int nhoff, len; local
209 nhoff = skb_network_offset(skb);
216 if (skb->len < nhoff + len ||
226 int nhoff, len; local
228 nhoff = skb_network_offset(skb);
233 len = ntohs(hdr->payload_len) + sizeof(struct ipv6hdr) + nhoff;
/linux-master/net/ethernet/
H A Deth.c456 int eth_gro_complete(struct sk_buff *skb, int nhoff) argument
458 struct ethhdr *eh = (struct ethhdr *)(skb->data + nhoff);
464 skb_set_inner_mac_header(skb, nhoff);
470 skb, nhoff + sizeof(*eh));
/linux-master/include/net/
H A Dinet_common.h67 int inet_gro_complete(struct sk_buff *skb, int nhoff);
/linux-master/net/ipv6/netfilter/
H A Dnf_conntrack_reasm.c167 const struct frag_hdr *fhdr, int nhoff)
278 fq->nhoffset = nhoff;
443 int fhoff, nhoff, ret; local
455 if (find_prev_fhdr(skb, &prevhdr, &nhoff, &fhoff) < 0)
482 ret = nf_ct_frag6_queue(fq, skb, fhdr, nhoff);
166 nf_ct_frag6_queue(struct frag_queue *fq, struct sk_buff *skb, const struct frag_hdr *fhdr, int nhoff) argument
/linux-master/net/8021q/
H A Dvlan_core.c513 static int vlan_gro_complete(struct sk_buff *skb, int nhoff) argument
515 struct vlan_hdr *vhdr = (struct vlan_hdr *)(skb->data + nhoff);
524 skb, nhoff + sizeof(*vhdr));
/linux-master/include/linux/
H A Dudp.h85 int nhoff);

Completed in 632 milliseconds

12