Home
last modified time | relevance | path

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

/linux/tools/testing/selftests/net/lib/
H A Dxdp_native.bpf.c107 struct ipv6hdr *ipv6h; in filter_udphdr() local
109 err = bpf_xdp_pull_data(ctx, sizeof(*eth) + sizeof(*ipv6h) + in filter_udphdr()
117 ipv6h = data + sizeof(*eth); in filter_udphdr()
119 if (ipv6h + 1 > (struct ipv6hdr *)data_end || in filter_udphdr()
120 ipv6h->nexthdr != IPPROTO_UDP) in filter_udphdr()
123 udph = data + sizeof(*ipv6h) + sizeof(*eth); in filter_udphdr()
231 struct ipv6hdr *ipv6h; in xdp_mode_tx_handler() local
233 err = bpf_xdp_pull_data(ctx, sizeof(*eth) + sizeof(*ipv6h) + in xdp_mode_tx_handler()
241 ipv6h = data + sizeof(*eth); in xdp_mode_tx_handler()
243 if (ipv6h + 1 > (struct ipv6hdr *)data_end || in xdp_mode_tx_handler()
[all …]
/linux/include/net/
H A Ddsfield.h22 static inline __u8 ipv6_get_dsfield(const struct ipv6hdr *ipv6h) in ipv6_get_dsfield() argument
24 return ntohs(*(__force const __be16 *)ipv6h) >> 4; in ipv6_get_dsfield()
44 static inline void ipv6_change_dsfield(struct ipv6hdr *ipv6h,__u8 mask, in ipv6_change_dsfield() argument
47 __be16 *p = (__force __be16 *)ipv6h; in ipv6_change_dsfield()
/linux/net/ipv6/
H A Dudp_offload.c37 const struct ipv6hdr *ipv6h; in udp6_ufo_fragment() local
58 ipv6h = ipv6_hdr(skb); in udp6_ufo_fragment()
62 uh->check = udp_v6_check(skb->len, &ipv6h->saddr, in udp6_ufo_fragment()
63 &ipv6h->daddr, csum); in udp6_ufo_fragment()
169 const struct ipv6hdr *ipv6h = (struct ipv6hdr *)(skb->data + offset); in udp6_gro_complete() local
185 uh->check = ~udp_v6_check(skb->len - nhoff, &ipv6h->saddr, in udp6_gro_complete()
186 &ipv6h->daddr, 0); in udp6_gro_complete()
H A Dip6_tunnel.c398 const struct ipv6hdr *ipv6h = (const struct ipv6hdr *)raw; in ip6_tnl_parse_tlv_enc_lim() local
400 unsigned int off = nhoff + sizeof(*ipv6h); in ip6_tnl_parse_tlv_enc_lim()
401 u8 nexthdr = ipv6h->nexthdr; in ip6_tnl_parse_tlv_enc_lim()
473 const struct ipv6hdr *ipv6h = (const struct ipv6hdr *)skb->data; in ip6_tnl_err() local
489 t = ip6_tnl_lookup(dev_net(skb->dev), skb->dev->ifindex, &ipv6h->daddr, &ipv6h->saddr); in ip6_tnl_err()
541 len = sizeof(*ipv6h) + ntohs(ipv6h->payload_len); in ip6_tnl_err()
726 const struct ipv6hdr *ipv6h, in ip4ip6_dscp_ecn_decapsulate() argument
729 __u8 dsfield = ipv6_get_dsfield(ipv6h) & ~INET_ECN_MASK; in ip4ip6_dscp_ecn_decapsulate()
734 return IP6_ECN_decapsulate(ipv6h, skb); in ip4ip6_dscp_ecn_decapsulate()
738 const struct ipv6hdr *ipv6h, in ip6ip6_dscp_ecn_decapsulate() argument
[all …]
H A Dip6_gre.c391 const struct ipv6hdr *ipv6h; in ip6gre_err() local
399 ipv6h = (const struct ipv6hdr *)skb->data; in ip6gre_err()
400 t = ip6gre_tunnel_lookup(skb->dev, &ipv6h->daddr, &ipv6h->saddr, in ip6gre_err()
459 const struct ipv6hdr *ipv6h; in ip6gre_rcv() local
462 ipv6h = ipv6_hdr(skb); in ip6gre_rcv()
464 &ipv6h->saddr, &ipv6h->daddr, tpi->key, in ip6gre_rcv()
495 const struct ipv6hdr *ipv6h; in ip6erspan_rcv() local
503 ipv6h = ipv6_hdr(skb); in ip6erspan_rcv()
508 &ipv6h->saddr, &ipv6h->daddr, tpi->key, in ip6erspan_rcv()
638 struct ipv6hdr *ipv6h; in prepare_ip6gre_xmit_ipv6() local
[all …]
H A Dip6_vti.c300 const struct ipv6hdr *ipv6h = ipv6_hdr(skb); in vti6_input_proto() local
303 t = vti6_tnl_lookup(dev_net(skb->dev), &ipv6h->saddr, &ipv6h->daddr); in vti6_input_proto()
315 ipv6h = ipv6_hdr(skb); in vti6_input_proto()
316 if (!ip6_tnl_rcv_ctl(t, &ipv6h->daddr, &ipv6h->saddr)) { in vti6_input_proto()
H A Dsit.c647 const struct ipv6hdr *ipv6h; in packet_is_spoofed() local
659 ipv6h = ipv6_hdr(skb); in packet_is_spoofed()
661 if (unlikely(is_spoofed_6rd(tunnel, iph->saddr, &ipv6h->saddr))) { in packet_is_spoofed()
663 &iph->saddr, &ipv6h->saddr, in packet_is_spoofed()
664 &iph->daddr, &ipv6h->daddr); in packet_is_spoofed()
668 if (likely(!is_spoofed_6rd(tunnel, iph->daddr, &ipv6h->daddr))) in packet_is_spoofed()
671 if (only_dnatted(tunnel, &ipv6h->daddr)) in packet_is_spoofed()
675 &iph->saddr, &ipv6h->saddr, in packet_is_spoofed()
676 &iph->daddr, &ipv6h->daddr); in packet_is_spoofed()
H A Dtcp_ipv6.c1009 struct ipv6hdr *ipv6h = ipv6_hdr(skb); in tcp_v6_send_reset() local
1051 key.md5_key = tcp_v6_md5_do_lookup(sk, &ipv6h->saddr, l3index); in tcp_v6_send_reset()
1066 sk1 = inet6_lookup_listener(net, NULL, 0, &ipv6h->saddr, th->source, in tcp_v6_send_reset()
1067 &ipv6h->daddr, ntohs(th->source), in tcp_v6_send_reset()
1077 key.md5_key = tcp_v6_md5_do_lookup(sk1, &ipv6h->saddr, l3index); in tcp_v6_send_reset()
1112 label = ip6_flowlabel(ipv6h); in tcp_v6_send_reset()
1124 label = ip6_flowlabel(ipv6h); in tcp_v6_send_reset()
1130 ipv6_get_dsfield(ipv6h) & ~INET_ECN_MASK, in tcp_v6_send_reset()
/linux/net/netfilter/
H A Dxt_TCPMSS.c221 struct ipv6hdr *ipv6h = ipv6_hdr(skb); in tcpmss_tg6() local
227 nexthdr = ipv6h->nexthdr; in tcpmss_tg6()
228 tcphoff = ipv6_skip_exthdr(skb, sizeof(*ipv6h), &nexthdr, &frag_off); in tcpmss_tg6()
234 sizeof(*ipv6h) + sizeof(struct tcphdr)); in tcpmss_tg6()
238 ipv6h = ipv6_hdr(skb); in tcpmss_tg6()
239 oldlen = ipv6h->payload_len; in tcpmss_tg6()
244 ipv6h->payload_len = newlen; in tcpmss_tg6()
H A Dnf_nat_proto.c325 struct ipv6hdr *ipv6h; in nf_nat_ipv6_manip_pkt() local
330 if (skb_ensure_writable(skb, iphdroff + sizeof(*ipv6h))) in nf_nat_ipv6_manip_pkt()
333 ipv6h = (void *)skb->data + iphdroff; in nf_nat_ipv6_manip_pkt()
334 nexthdr = ipv6h->nexthdr; in nf_nat_ipv6_manip_pkt()
335 hdroff = ipv6_skip_exthdr(skb, iphdroff + sizeof(*ipv6h), in nf_nat_ipv6_manip_pkt()
345 ipv6h = (void *)skb->data + iphdroff; in nf_nat_ipv6_manip_pkt()
349 ipv6h->saddr = target->src.u3.in6; in nf_nat_ipv6_manip_pkt()
351 ipv6h->daddr = target->dst.u3.in6; in nf_nat_ipv6_manip_pkt()
407 const struct ipv6hdr *ipv6h = (struct ipv6hdr *)(skb->data + iphdroff); in nf_nat_ipv6_csum_update() local
411 oldip = &ipv6h->saddr; in nf_nat_ipv6_csum_update()
[all …]
H A Dxt_TCPOPTSTRIP.c98 struct ipv6hdr *ipv6h = ipv6_hdr(skb); 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()
/linux/net/psp/
H A Dpsp_main.c333 struct ipv6hdr *ipv6h = (struct ipv6hdr *)(skb->data + l2_hlen); in psp_dev_rcv() local
335 is_udp = ipv6h->nexthdr == IPPROTO_UDP; in psp_dev_rcv()
388 struct ipv6hdr *ipv6h = (struct ipv6hdr *)(skb->data + l2_hlen); in psp_dev_rcv() local
390 if (unlikely(ntohs(ipv6h->payload_len) < encap)) in psp_dev_rcv()
393 ipv6h->nexthdr = psph->nexthdr; in psp_dev_rcv()
394 ipv6h->payload_len = htons(ntohs(ipv6h->payload_len) - encap); in psp_dev_rcv()
/linux/net/tls/
H A Dtls_device_fallback.c156 const struct ipv6hdr *ipv6h; in update_chksum()
170 ipv6h = ipv6_hdr(skb); in update_chksum()
171 th->check = ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, in update_chksum()
159 const struct ipv6hdr *ipv6h; update_chksum() local
/linux/drivers/net/
H A Dgeneve.c501 struct ipv6hdr *ipv6h = nested_nh; in geneve_opt_gro_hint_validate() local
505 if (ipv6h->nexthdr == IPPROTO_UDP) in geneve_opt_gro_hint_validate()
508 offset = sizeof(*ipv6h) + gro_hint->nested_nh_offset; in geneve_opt_gro_hint_validate()
546 struct ipv6hdr *ipv6h; in geneve_opt_gro_hint_validate_csum() local
567 ipv6h = nested + gro_hint->nested_nh_offset; in geneve_opt_gro_hint_validate_csum()
568 iph = (struct iphdr *)ipv6h; in geneve_opt_gro_hint_validate_csum()
570 ~csum_unfold(csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, in geneve_opt_gro_hint_validate_csum()
584 struct ipv6hdr *ipv6h; in geneve_post_decap_hint() local
624 ipv6h = (void *)skb->data + gro_hint->nested_nh_offset; in geneve_post_decap_hint()
625 iph = (struct iphdr *)ipv6h; in geneve_post_decap_hint()
[all …]
/linux/net/sched/
H A Dsch_cake.c971 const struct ipv6hdr *ipv6h; in cake_get_tcphdr() local
977 ipv6h = skb_header_pointer(skb, offset, sizeof(_ipv6h), &_ipv6h); in cake_get_tcphdr()
979 if (!ipv6h) in cake_get_tcphdr()
982 if (ipv6h->version == 4) { in cake_get_tcphdr()
983 iph = (struct iphdr *)ipv6h; in cake_get_tcphdr()
990 ipv6h = skb_header_pointer(skb, offset, in cake_get_tcphdr()
993 if (!ipv6h || ipv6h->nexthdr != IPPROTO_TCP) in cake_get_tcphdr()
1002 } else if (ipv6h->version == 6) { in cake_get_tcphdr()
1003 if (ipv6h in cake_get_tcphdr()
1223 const struct ipv6hdr *ipv6h, *ipv6h_check; cake_ack_filter() local
[all...]
H A Dsch_taprio.c422 const struct ipv6hdr *ipv6h; in get_tcp_tstamp() local
426 ipv6h = skb_header_pointer(skb, offset, sizeof(_ipv6h), &_ipv6h); in get_tcp_tstamp()
427 if (!ipv6h) in get_tcp_tstamp()
430 if (ipv6h->version == 4) { in get_tcp_tstamp()
431 iph = (struct iphdr *)ipv6h; in get_tcp_tstamp()
438 ipv6h = skb_header_pointer(skb, offset, in get_tcp_tstamp()
441 if (!ipv6h || ipv6h->nexthdr != IPPROTO_TCP) in get_tcp_tstamp()
446 } else if (ipv6h->version == 6 && ipv6h->nexthdr != IPPROTO_TCP) { in get_tcp_tstamp()
/linux/net/ipv6/netfilter/
H A Dnf_conntrack_reasm.c129 static inline u8 ip6_frag_ecn(const struct ipv6hdr *ipv6h) in ip6_frag_ecn() argument
131 return 1 << (ipv6_get_dsfield(ipv6h) & INET_ECN_MASK); in ip6_frag_ecn()
/linux/drivers/net/ethernet/mellanox/mlx4/
H A Den_rx.c573 struct ipv6hdr *ipv6h) in get_fixed_ipv6_csum() argument
575 __u8 nexthdr = ipv6h->nexthdr; in get_fixed_ipv6_csum()
584 temp = csum_add(hw_checksum, *(__wsum *)ipv6h); in get_fixed_ipv6_csum()
586 skb->csum = csum_add(temp, (__force __wsum)*(__be16 *)&ipv6h->nexthdr); in get_fixed_ipv6_csum()
/linux/drivers/net/ethernet/qlogic/qlcnic/
H A Dqlcnic_io.c1270 struct ipv6hdr *ipv6h; in qlcnic_process_lro() local
1322 ipv6h = (struct ipv6hdr *)skb->data; in qlcnic_process_lro()
1325 ipv6h->payload_len = htons(length); in qlcnic_process_lro()
1791 struct ipv6hdr *ipv6h; in qlcnic_83xx_process_lro() local
1843 ipv6h = (struct ipv6hdr *)skb->data; in qlcnic_83xx_process_lro()
1847 ipv6h->payload_len = htons(length); in qlcnic_83xx_process_lro()
/linux/drivers/net/wireless/intel/iwlwifi/mld/
H A Dtx.c243 struct ipv6hdr *ipv6h = in iwl_mld_get_offload_assist() local
245 unsigned int off = sizeof(*ipv6h); in iwl_mld_get_offload_assist()
247 protocol = ipv6h->nexthdr; in iwl_mld_get_offload_assist()
/linux/drivers/net/ethernet/wangxun/libwx/
H A Dwx_lib.c1353 struct ipv6hdr *ipv6h; in wx_tso() local
1383 ipv6h = enc ? inner_ipv6_hdr(skb) : ipv6_hdr(skb); in wx_tso()
1385 ipv6h->payload_len = 0; in wx_tso()
1386 tcph->check = ~csum_ipv6_magic(&ipv6h->saddr, in wx_tso()
1387 &ipv6h->daddr, 0, in wx_tso()
/linux/drivers/net/wireless/intel/iwlwifi/mvm/
H A Dtx.c72 struct ipv6hdr *ipv6h = in iwl_mvm_tx_csum() local
74 unsigned int off = sizeof(*ipv6h); in iwl_mvm_tx_csum()
76 protocol = ipv6h->nexthdr; in iwl_mvm_tx_csum()
/linux/drivers/net/ethernet/freescale/dpaa/
H A Ddpaa_eth.c1479 struct ipv6hdr *ipv6h = NULL; in dpaa_enable_tx_csum() local
1512 ipv6h = ipv6_hdr(skb); in dpaa_enable_tx_csum()
1513 WARN_ON(!ipv6h); in dpaa_enable_tx_csum()
1514 l4_proto = ipv6h->nexthdr; in dpaa_enable_tx_csum()
/linux/drivers/net/vmxnet3/
H A Dvmxnet3_drv.c994 const struct ipv6hdr *ipv6h; in vmxnet3_parse_hdr() local
996 ipv6h = inner_ipv6_hdr(skb); in vmxnet3_parse_hdr()
997 protocol = ipv6h->nexthdr; in vmxnet3_parse_hdr()
1005 const struct ipv6hdr *ipv6h; in vmxnet3_parse_hdr() local
1007 ipv6h = ipv6_hdr(skb); in vmxnet3_parse_hdr()
1008 protocol = ipv6h->nexthdr; in vmxnet3_parse_hdr()
/linux/drivers/net/ethernet/intel/idpf/
H A Didpf_txrx.c3339 struct ipv6hdr *ipv6h = ipv6_hdr(skb); in idpf_rx_rsc() local
3345 ~tcp_v6_check(len, &ipv6h->saddr, &ipv6h->daddr, 0); in idpf_rx_rsc()