Home
last modified time | relevance | path

Searched refs:nexthdr (Results 1 – 25 of 266) sorted by relevance

1234567891011

/linux-6.6.21/net/ipv6/
Dexthdrs_core.c13 bool ipv6_ext_hdr(u8 nexthdr) in ipv6_ext_hdr() argument
18 return (nexthdr == NEXTHDR_HOP) || in ipv6_ext_hdr()
19 (nexthdr == NEXTHDR_ROUTING) || in ipv6_ext_hdr()
20 (nexthdr == NEXTHDR_FRAGMENT) || in ipv6_ext_hdr()
21 (nexthdr == NEXTHDR_AUTH) || in ipv6_ext_hdr()
22 (nexthdr == NEXTHDR_NONE) || in ipv6_ext_hdr()
23 (nexthdr == NEXTHDR_DEST); in ipv6_ext_hdr()
75 u8 nexthdr = *nexthdrp; in ipv6_skip_exthdr() local
79 while (ipv6_ext_hdr(nexthdr)) { in ipv6_skip_exthdr()
83 if (nexthdr == NEXTHDR_NONE) in ipv6_skip_exthdr()
[all …]
Doutput_core.c58 int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr) in ip6_find_1stfragopt() argument
64 *nexthdr = &ipv6_hdr(skb)->nexthdr; in ip6_find_1stfragopt()
69 switch (**nexthdr) { in ip6_find_1stfragopt()
96 *nexthdr = &exthdr->nexthdr; in ip6_find_1stfragopt()
132 IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); in __ip6_local_out()
Dip6_input.c53 switch (ipv6_hdr(skb)->nexthdr) { in ip6_rcv_finish_core()
262 IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); in ip6_rcv_core()
267 if (pkt_len || hdr->nexthdr != NEXTHDR_HOP) { in ip6_rcv_core()
279 if (hdr->nexthdr == NEXTHDR_HOP) { in ip6_rcv_core()
363 void ip6_protocol_deliver_rcu(struct net *net, struct sk_buff *skb, int nexthdr, in ip6_protocol_deliver_rcu() argument
382 nexthdr = skb_network_header(skb)[nhoff]; in ip6_protocol_deliver_rcu()
386 raw = raw6_local_deliver(skb, nexthdr); in ip6_protocol_deliver_rcu()
387 ipprot = rcu_dereference(inet6_protos[nexthdr]); in ip6_protocol_deliver_rcu()
425 !ipv6_is_mld(skb, nexthdr, skb_network_header_len(skb))) { in ip6_protocol_deliver_rcu()
447 nexthdr = ret; in ip6_protocol_deliver_rcu()
[all …]
Dmcast_snoop.c41 u8 nexthdr; in ipv6_mc_check_exthdrs() local
46 if (ip6h->nexthdr != IPPROTO_HOPOPTS) in ipv6_mc_check_exthdrs()
49 nexthdr = ip6h->nexthdr; in ipv6_mc_check_exthdrs()
51 offset = ipv6_skip_exthdr(skb, offset, &nexthdr, &frag_off); in ipv6_mc_check_exthdrs()
56 if (nexthdr != IPPROTO_ICMPV6) in ipv6_mc_check_exthdrs()
Dmip6.c123 int err = destopt->nexthdr; in mip6_destopt_input()
143 u8 nexthdr; in mip6_destopt_output() local
149 nexthdr = *skb_mac_header(skb); in mip6_destopt_output()
153 dstopt->nexthdr = nexthdr; in mip6_destopt_output()
292 int err = rt2->rt_hdr.nexthdr; in mip6_rthdr_input()
310 u8 nexthdr; in mip6_rthdr_output() local
315 nexthdr = *skb_mac_header(skb); in mip6_rthdr_output()
319 rt2->rt_hdr.nexthdr = nexthdr; in mip6_rthdr_output()
Dah6.c250 int nexthdr = iph->nexthdr; in ipv6_clear_mutable_options() local
255 switch (nexthdr) { in ipv6_clear_mutable_options()
263 nexthdr == NEXTHDR_HOP ? in ipv6_clear_mutable_options()
277 nexthdr = exthdr.opth->nexthdr; in ipv6_clear_mutable_options()
326 u8 nexthdr; in ah6_output() local
376 nexthdr = *skb_mac_header(skb); in ah6_output()
398 ah->nexthdr = nexthdr; in ah6_output()
477 err = ah->nexthdr; in ah6_input_done()
522 int nexthdr; in ah6_input() local
545 nexthdr = ah->nexthdr; in ah6_input()
[all …]
Dip6_offload.c68 proto = opth->nexthdr; in ipv6_gso_pull_exthdrs()
107 proto = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); in ipv6_gso_segment()
172 proto = iph->nexthdr; in ipv6_exthdrs_len()
184 proto = opth->nexthdr; in ipv6_exthdrs_len()
214 proto = iph->nexthdr; in ipv6_gro_receive()
255 iph->nexthdr != iph2->nexthdr) { in ipv6_gro_receive()
349 hop_jumbo->nexthdr = iph->nexthdr; in ipv6_gro_complete()
355 iph->nexthdr = NEXTHDR_HOP; in ipv6_gro_complete()
Drpl.c38 outhdr->nexthdr = inhdr->nexthdr; in ipv6_rpl_srh_decompress()
98 outhdr->nexthdr = inhdr->nexthdr; in ipv6_rpl_srh_compress()
/linux-6.6.21/net/ipv6/netfilter/
Dip6t_ipv6header.c32 u8 nexthdr; in ipv6header_mt6() local
38 nexthdr = ipv6_hdr(skb)->nexthdr; in ipv6header_mt6()
45 while (nf_ip6_ext_hdr(nexthdr)) { in ipv6header_mt6()
51 if (nexthdr == NEXTHDR_NONE) { in ipv6header_mt6()
59 if (nexthdr == NEXTHDR_ESP) { in ipv6header_mt6()
71 if (nexthdr == NEXTHDR_FRAGMENT) in ipv6header_mt6()
73 else if (nexthdr == NEXTHDR_AUTH) in ipv6header_mt6()
79 switch (nexthdr) { in ipv6header_mt6()
99 nexthdr = hp->nexthdr; in ipv6header_mt6()
106 if (nexthdr != NEXTHDR_NONE && nexthdr != NEXTHDR_ESP) in ipv6header_mt6()
Dnf_conntrack_reasm.c391 u8 nexthdr = ipv6_hdr(skb)->nexthdr; in find_prev_fhdr() local
393 u8 prev_nhoff = netoff + offsetof(struct ipv6hdr, nexthdr); in find_prev_fhdr()
398 while (nexthdr != NEXTHDR_FRAGMENT) { in find_prev_fhdr()
402 if (!ipv6_ext_hdr(nexthdr)) { in find_prev_fhdr()
405 if (nexthdr == NEXTHDR_NONE) { in find_prev_fhdr()
415 if (nexthdr == NEXTHDR_AUTH) in find_prev_fhdr()
420 prevhdr = nexthdr; in find_prev_fhdr()
423 nexthdr = hdr.nexthdr; in find_prev_fhdr()
441 u8 nexthdr = NEXTHDR_FRAGMENT; in nf_ct_frag6_gather() local
460 if (ipv6frag_thdr_truncated(skb, fhoff, &nexthdr)) { in nf_ct_frag6_gather()
/linux-6.6.21/samples/bpf/
Dparse_varlen.c83 uint64_t nexthdr; in parse_ipv6() local
89 nexthdr = ip6h->nexthdr; in parse_ipv6()
91 if (nexthdr == IPPROTO_IPIP) { in parse_ipv6()
96 nexthdr = iph->protocol; in parse_ipv6()
97 } else if (nexthdr == IPPROTO_IPV6) { in parse_ipv6()
102 nexthdr = ip6h->nexthdr; in parse_ipv6()
105 if (nexthdr == IPPROTO_TCP) in parse_ipv6()
107 else if (nexthdr == IPPROTO_UDP) in parse_ipv6()
/linux-6.6.21/net/6lowpan/
Dnhc.c49 nhc = lowpan_nexthdr_nhcs[hdr->nexthdr]; in lowpan_nhc_check_compression()
66 nhc = lowpan_nexthdr_nhcs[hdr->nexthdr]; in lowpan_nhc_do_compression()
131 hdr->nexthdr = nhc->nexthdr; in lowpan_nhc_do_uncompression()
147 if (lowpan_nexthdr_nhcs[nhc->nexthdr]) { in lowpan_nhc_add()
152 lowpan_nexthdr_nhcs[nhc->nexthdr] = nhc; in lowpan_nhc_add()
163 lowpan_nexthdr_nhcs[nhc->nexthdr] = NULL; in lowpan_nhc_del()
Dnhc.h29 .nexthdr = _nexthdr, \
62 u8 nexthdr; member
76 struct lowpan_nhc *lowpan_nhc_by_nexthdr(u8 nexthdr);
/linux-6.6.21/include/linux/
Dnetfilter_ipv6.h15 nf_ip6_ext_hdr(u8 nexthdr) in nf_ip6_ext_hdr() argument
16 { return (nexthdr == IPPROTO_HOPOPTS) || in nf_ip6_ext_hdr()
17 (nexthdr == IPPROTO_ROUTING) || in nf_ip6_ext_hdr()
18 (nexthdr == IPPROTO_FRAGMENT) || in nf_ip6_ext_hdr()
19 (nexthdr == IPPROTO_ESP) || in nf_ip6_ext_hdr()
20 (nexthdr == IPPROTO_AH) || in nf_ip6_ext_hdr()
21 (nexthdr == IPPROTO_NONE) || in nf_ip6_ext_hdr()
22 (nexthdr == IPPROTO_DSTOPTS); in nf_ip6_ext_hdr()
/linux-6.6.21/net/netfilter/
Dnf_conntrack_ovs.c41 u8 nexthdr = ipv6_hdr(skb)->nexthdr; in nf_ct_helper() local
45 ofs = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr, in nf_ct_helper()
52 proto = nexthdr; in nf_ct_helper()
125 if (ipv6_hdr(skb)->nexthdr == NEXTHDR_HOP) { in nf_ct_skb_network_trim()
172 *proto = ipv6_hdr(skb)->nexthdr; in nf_ct_handle_fragments()
Dxt_AUDIT.c50 u8 nexthdr; in audit_ip6() local
57 nexthdr = ih->nexthdr; in audit_ip6()
58 ipv6_skip_exthdr(skb, skb_network_offset(skb) + sizeof(_ip6h), &nexthdr, &frag_off); in audit_ip6()
61 &ih->saddr, &ih->daddr, nexthdr); in audit_ip6()
Dnf_nat_ovs.c35 u8 nexthdr = ipv6_hdr(skb)->nexthdr; in nf_ct_nat_execute() local
38 &nexthdr, &frag_off); in nf_ct_nat_execute()
40 if (hdrlen >= 0 && nexthdr == IPPROTO_ICMPV6) { in nf_ct_nat_execute()
Dxt_TCPOPTSTRIP.c100 u_int8_t nexthdr; in tcpoptstrip_tg6() local
103 nexthdr = ipv6h->nexthdr; in tcpoptstrip_tg6()
104 tcphoff = ipv6_skip_exthdr(skb, sizeof(*ipv6h), &nexthdr, &frag_off); in tcpoptstrip_tg6()
Dxt_HMARK.c172 int nexthdr; in hmark_pkt_set_htuple_ipv6() local
175 nexthdr = ipv6_find_hdr(skb, &nhoff, -1, &fragoff, &flag); in hmark_pkt_set_htuple_ipv6()
176 if (nexthdr < 0) in hmark_pkt_set_htuple_ipv6()
179 if ((flag & IP6_FH_F_FRAG) || (nexthdr != IPPROTO_ICMPV6)) in hmark_pkt_set_htuple_ipv6()
188 nexthdr = ipv6_find_hdr(skb, &nhoff, -1, &fragoff, &flag); in hmark_pkt_set_htuple_ipv6()
189 if (nexthdr < 0) in hmark_pkt_set_htuple_ipv6()
199 t->proto = nexthdr; in hmark_pkt_set_htuple_ipv6()
/linux-6.6.21/net/netfilter/ipset/
Dip_set_getport.c136 u8 nexthdr; in ip_set_get_ip6_port() local
139 nexthdr = ipv6_hdr(skb)->nexthdr; in ip_set_get_ip6_port()
142 sizeof(struct ipv6hdr), &nexthdr, in ip_set_get_ip6_port()
147 return get_port(skb, nexthdr, protoff, src, port, proto); in ip_set_get_ip6_port()
/linux-6.6.21/net/xfrm/
Dxfrm_input.c142 int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 *seq) in xfrm_parse_spi() argument
147 switch (nexthdr) { in xfrm_parse_spi()
199 XFRM_MODE_SKB_CB(skb)->protocol = ph->nexthdr; in xfrm4_remove_beet_encap()
447 int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type) in xfrm_input() argument
520 if (xfrm_parse_spi(skb, nexthdr, &spi, &seq)) { in xfrm_input()
550 if (!spi && xfrm_parse_spi(skb, nexthdr, &spi, &seq)) { in xfrm_input()
567 x = xfrm_state_lookup(net, mark, daddr, spi, nexthdr, family); in xfrm_input()
627 nexthdr = x->type_offload->input_tail(x, skb); in xfrm_input()
629 nexthdr = x->type->input(x, skb); in xfrm_input()
631 if (nexthdr == -EINPROGRESS) in xfrm_input()
[all …]
Dxfrm_output.c82 static int mip6_rthdr_offset(struct sk_buff *skb, u8 **nexthdr, int type) in mip6_rthdr_offset() argument
90 *nexthdr = &ipv6_hdr(skb)->nexthdr; in mip6_rthdr_offset()
95 switch (**nexthdr) { in mip6_rthdr_offset()
134 *nexthdr = &exthdr->nexthdr; in mip6_rthdr_offset()
255 ph->nexthdr = top_iph->protocol; in xfrm4_beet_encap_add()
330 offsetof(struct ipv6hdr, nexthdr); in xfrm6_tunnel_encap_add()
338 top_iph->nexthdr = xfrm_af2proto(skb_dst(skb)->ops->family); in xfrm6_tunnel_encap_add()
369 offsetof(struct ipv6hdr, nexthdr); in xfrm6_beet_encap_add()
382 ph->nexthdr = top_iph->nexthdr; in xfrm6_beet_encap_add()
386 top_iph->nexthdr = IPPROTO_BEETPH; in xfrm6_beet_encap_add()
[all …]
/linux-6.6.21/net/bridge/netfilter/
Debt_log.c118 uint8_t nexthdr; in ebt_log_packet() local
128 &ih->saddr, &ih->daddr, ih->priority, ih->nexthdr); in ebt_log_packet()
129 nexthdr = ih->nexthdr; in ebt_log_packet()
130 offset_ph = ipv6_skip_exthdr(skb, sizeof(_iph), &nexthdr, &frag_off); in ebt_log_packet()
133 print_ports(skb, nexthdr, offset_ph); in ebt_log_packet()
/linux-6.6.21/tools/testing/selftests/bpf/progs/
Dbpf_flow.c55 __u8 nexthdr; member
256 static __always_inline int parse_ipv6_proto(struct __sk_buff *skb, __u8 nexthdr) in parse_ipv6_proto() argument
260 switch (nexthdr) { in parse_ipv6_proto()
269 return parse_ip_proto(skb, nexthdr); in parse_ipv6_proto()
337 keys->ip_proto = ip6h->nexthdr; in PROG()
343 return parse_ipv6_proto(skb, ip6h->nexthdr); in PROG()
359 keys->ip_proto = ip6h->nexthdr; in PROG()
361 return parse_ipv6_proto(skb, ip6h->nexthdr); in PROG()
375 keys->ip_proto = fragh->nexthdr; in PROG()
389 return parse_ipv6_proto(skb, fragh->nexthdr); in PROG()
/linux-6.6.21/include/uapi/linux/
Dipv6.h51 __u8 nexthdr; member
64 __u8 nexthdr; member
131 __u8 nexthdr; member

1234567891011