Home
last modified time | relevance | path

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

1234

/linux/include/net/netfilter/
A Dnf_queue.h64 if ((__force u32)ip6h->saddr.s6_addr32[3] < in hash_v6()
65 (__force u32)ip6h->daddr.s6_addr32[3]) { in hash_v6()
66 a = (__force u32) ip6h->saddr.s6_addr32[3]; in hash_v6()
67 b = (__force u32) ip6h->daddr.s6_addr32[3]; in hash_v6()
69 b = (__force u32) ip6h->saddr.s6_addr32[3]; in hash_v6()
73 if ((__force u32)ip6h->saddr.s6_addr32[1] < in hash_v6()
74 (__force u32)ip6h->daddr.s6_addr32[1]) in hash_v6()
84 struct ipv6hdr *ip6h, _ip6h; in hash_bridge() local
96 sizeof(*ip6h), &_ip6h); in hash_bridge()
97 if (ip6h) in hash_bridge()
[all …]
A Dnf_tables_ipv6.h31 struct ipv6hdr *ip6h, _ip6h; in __nft_set_pktinfo_ipv6_validate() local
38 sizeof(*ip6h), &_ip6h); in __nft_set_pktinfo_ipv6_validate()
39 if (!ip6h) in __nft_set_pktinfo_ipv6_validate()
42 if (ip6h->version != 6) in __nft_set_pktinfo_ipv6_validate()
45 pkt_len = ntohs(ip6h->payload_len); in __nft_set_pktinfo_ipv6_validate()
46 if (pkt_len + sizeof(*ip6h) > pkt->skb->len) in __nft_set_pktinfo_ipv6_validate()
77 struct ipv6hdr *ip6h; in nft_set_pktinfo_ipv6_ingress() local
81 if (!pskb_may_pull(pkt->skb, sizeof(*ip6h))) in nft_set_pktinfo_ipv6_ingress()
84 ip6h = ipv6_hdr(pkt->skb); in nft_set_pktinfo_ipv6_ingress()
85 if (ip6h->version != 6) in nft_set_pktinfo_ipv6_ingress()
[all …]
/linux/samples/bpf/
A Dxdp_tx_iptunnel_kern.c164 if (ip6h + 1 > data_end) in handle_ipv6()
167 dport = get_dport(ip6h + 1, data_end, ip6h->nexthdr); in handle_ipv6()
171 vip.protocol = ip6h->nexthdr; in handle_ipv6()
191 ip6h = data + sizeof(*new_eth); in handle_ipv6()
196 ip6h + 1 > data_end) in handle_ipv6()
201 ip6h->version = 6; in handle_ipv6()
202 ip6h->priority = 0; in handle_ipv6()
203 memset(ip6h->flow_lbl, 0, sizeof(ip6h->flow_lbl)); in handle_ipv6()
204 ip6h->payload_len = htons(ntohs(payload_len) + sizeof(*ip6h)); in handle_ipv6()
205 ip6h->nexthdr = IPPROTO_IPV6; in handle_ipv6()
[all …]
A Dxdp_fwd_kern.c49 struct ipv6hdr *ip6h; in xdp_fwd_flags() local
83 ip6h = data + nh_off; in xdp_fwd_flags()
84 if (ip6h + 1 > data_end) in xdp_fwd_flags()
87 if (ip6h->hop_limit <= 1) in xdp_fwd_flags()
91 fib_params.flowinfo = *(__be32 *)ip6h & IPV6_FLOWINFO_MASK; in xdp_fwd_flags()
92 fib_params.l4_protocol = ip6h->nexthdr; in xdp_fwd_flags()
95 fib_params.tot_len = ntohs(ip6h->payload_len); in xdp_fwd_flags()
96 *src = ip6h->saddr; in xdp_fwd_flags()
97 *dst = ip6h->daddr; in xdp_fwd_flags()
136 ip6h->hop_limit--; in xdp_fwd_flags()
A Dtc_l2_redirect_kern.c91 struct ipv6hdr *ip6h = data + sizeof(*eth); in _l2_to_iptun_ingress_forward() local
93 if (data + sizeof(*eth) + sizeof(*ip6h) > data_end) in _l2_to_iptun_ingress_forward()
96 if (ip6h->nexthdr != IPPROTO_IPIP && in _l2_to_iptun_ingress_forward()
97 ip6h->nexthdr != IPPROTO_IPV6) in _l2_to_iptun_ingress_forward()
101 _htonl(ip6h->daddr.s6_addr32[0]), in _l2_to_iptun_ingress_forward()
102 _htonl(ip6h->daddr.s6_addr32[3])); in _l2_to_iptun_ingress_forward()
180 struct ipv6hdr *ip6h = data + sizeof(*eth); in _l2_to_ip6tun_ingress_redirect() local
182 if (data + sizeof(*eth) + sizeof(*ip6h) > data_end) in _l2_to_ip6tun_ingress_redirect()
189 _htonl(ip6h->daddr.s6_addr32[0]), *ifindex); in _l2_to_ip6tun_ingress_redirect()
225 struct ipv6hdr *ip6h = data + sizeof(*eth); in _drop_non_tun_vip() local
[all …]
A Dparse_varlen.c80 struct ipv6hdr *ip6h; in parse_ipv6() local
85 ip6h = data + nh_off; in parse_ipv6()
86 if (ip6h + 1 > data_end) in parse_ipv6()
89 nexthdr = ip6h->nexthdr; in parse_ipv6()
98 ip6h = data + nh_off + ihl_len; in parse_ipv6()
99 if (ip6h + 1 > data_end) in parse_ipv6()
102 nexthdr = ip6h->nexthdr; in parse_ipv6()
A Dxdp_redirect_cpu.bpf.c135 struct ipv6hdr *ip6h = data + nh_off; in get_proto_ipv6() local
137 if (ip6h + 1 > data_end) in get_proto_ipv6()
139 return ip6h->nexthdr; in get_proto_ipv6()
420 struct ipv6hdr *ip6h = data + nh_off; in get_ipv6_hash_ip_pair() local
423 if (ip6h + 1 > data_end) in get_ipv6_hash_ip_pair()
426 cpu_hash = ip6h->saddr.in6_u.u6_addr32[0] + ip6h->daddr.in6_u.u6_addr32[0]; in get_ipv6_hash_ip_pair()
427 cpu_hash += ip6h->saddr.in6_u.u6_addr32[1] + ip6h->daddr.in6_u.u6_addr32[1]; in get_ipv6_hash_ip_pair()
428 cpu_hash += ip6h->saddr.in6_u.u6_addr32[2] + ip6h->daddr.in6_u.u6_addr32[2]; in get_ipv6_hash_ip_pair()
429 cpu_hash += ip6h->saddr.in6_u.u6_addr32[3] + ip6h->daddr.in6_u.u6_addr32[3]; in get_ipv6_hash_ip_pair()
430 cpu_hash = SuperFastHash((char *)&cpu_hash, 4, INITVAL + ip6h->nexthdr); in get_ipv6_hash_ip_pair()
/linux/tools/testing/selftests/bpf/progs/
A Dtest_xdp.c163 if (ip6h + 1 > data_end) in handle_ipv6()
166 dport = get_dport(ip6h + 1, data_end, ip6h->nexthdr); in handle_ipv6()
170 vip.protocol = ip6h->nexthdr; in handle_ipv6()
188 ip6h = data + sizeof(*new_eth); in handle_ipv6()
192 ip6h + 1 > data_end) in handle_ipv6()
197 ip6h->version = 6; in handle_ipv6()
198 ip6h->priority = 0; in handle_ipv6()
199 memset(ip6h->flow_lbl, 0, sizeof(ip6h->flow_lbl)); in handle_ipv6()
200 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + sizeof(*ip6h)); in handle_ipv6()
201 ip6h->nexthdr = IPPROTO_IPV6; in handle_ipv6()
[all …]
A Dtest_xdp_loop.c159 if (ip6h + 1 > data_end) in handle_ipv6()
162 dport = get_dport(ip6h + 1, data_end, ip6h->nexthdr); in handle_ipv6()
166 vip.protocol = ip6h->nexthdr; in handle_ipv6()
184 ip6h = data + sizeof(*new_eth); in handle_ipv6()
188 ip6h + 1 > data_end) in handle_ipv6()
193 ip6h->version = 6; in handle_ipv6()
194 ip6h->priority = 0; in handle_ipv6()
195 memset(ip6h->flow_lbl, 0, sizeof(ip6h->flow_lbl)); in handle_ipv6()
196 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + sizeof(*ip6h)); in handle_ipv6()
197 ip6h->nexthdr = IPPROTO_IPV6; in handle_ipv6()
[all …]
A Dtest_btf_skc_cls_ingress.c47 mss_cookie = bpf_tcp_gen_syncookie(tp, ip6h, sizeof(*ip6h), in test_syncookie_helper()
57 int ret = bpf_tcp_check_syncookie(tp, ip6h, sizeof(*ip6h), in test_syncookie_helper()
69 static int handle_ip6_tcp(struct ipv6hdr *ip6h, struct __sk_buff *skb) in handle_ip6_tcp() argument
79 th = (struct tcphdr *)(ip6h + 1); in handle_ip6_tcp()
88 tuple = (struct bpf_sock_tuple *)&ip6h->saddr; in handle_ip6_tcp()
135 test_syncookie_helper(ip6h, th, tp, skb); in handle_ip6_tcp()
151 struct ipv6hdr *ip6h; in cls_ingress() local
164 ip6h = (struct ipv6hdr *)(eth + 1); in cls_ingress()
165 if (ip6h + 1 > data_end) in cls_ingress()
168 if (ip6h->nexthdr == IPPROTO_TCP) in cls_ingress()
[all …]
A Dcgroup_skb_sk_lookup_kern.c30 const struct ipv6hdr *ip6h, in set_tuple() argument
33 set_ip(tuple->ipv6.saddr, &ip6h->daddr); in set_tuple()
34 set_ip(tuple->ipv6.daddr, &ip6h->saddr); in set_tuple()
40 const struct ipv6hdr *ip6h, in is_allowed_peer_cg() argument
48 set_tuple(&tuple, ip6h, tcph); in is_allowed_peer_cg()
70 struct ipv6hdr ip6h; in ingress_lookup() local
80 if (bpf_skb_load_bytes(skb, 0, &ip6h, sizeof(ip6h))) in ingress_lookup()
83 if (ip6h.nexthdr != IPPROTO_TCP) in ingress_lookup()
86 if (bpf_skb_load_bytes(skb, sizeof(ip6h), &tcph, sizeof(tcph))) in ingress_lookup()
95 return is_allowed_peer_cg(skb, &ip6h, &tcph); in ingress_lookup()
A Dtest_xdp_noinline.c284 struct ipv6hdr *ip6h; in encap_v6() local
302 ip6h->version = 6; in encap_v6()
303 ip6h->priority = 0; in encap_v6()
304 memset(ip6h->flow_lbl, 0, sizeof(ip6h->flow_lbl)); in encap_v6()
308 ip6h->payload_len = in encap_v6()
310 ip6h->hop_limit = 4; in encap_v6()
471 ip6h = data + off; in send_icmp6_reply()
476 ip6h->hop_limit = 4; in send_icmp6_reply()
478 memcpy(ip6h->saddr.in6_u.u6_addr32, ip6h->daddr.in6_u.u6_addr32, 16); in send_icmp6_reply()
498 ip6h = data + off; in parse_icmpv6()
[all …]
A Dbpf_flow.c312 struct ipv6hdr *ip6h, _ip6h; in PROG() local
314 ip6h = bpf_flow_dissect_get_header(skb, sizeof(*ip6h), &_ip6h); in PROG()
315 if (!ip6h) in PROG()
319 memcpy(&keys->ipv6_src, &ip6h->saddr, 2*sizeof(ip6h->saddr)); in PROG()
322 keys->ip_proto = ip6h->nexthdr; in PROG()
323 keys->flow_label = ip6_flowlabel(ip6h); in PROG()
334 struct ipv6_opt_hdr *ip6h, _ip6h; in PROG() local
336 ip6h = bpf_flow_dissect_get_header(skb, sizeof(*ip6h), &_ip6h); in PROG()
337 if (!ip6h) in PROG()
343 keys->thoff += (1 + ip6h->hdrlen) << 3; in PROG()
[all …]
A Dtest_tc_neigh_fib.c57 struct ipv6hdr *ip6h; in fill_fib_params_v6() local
62 ip6h = (struct ipv6hdr *)(data + sizeof(struct ethhdr)); in fill_fib_params_v6()
63 if ((void *)(ip6h + 1) > data_end) in fill_fib_params_v6()
68 fib_params->l4_protocol = ip6h->nexthdr; in fill_fib_params_v6()
71 fib_params->tot_len = bpf_ntohs(ip6h->payload_len); in fill_fib_params_v6()
72 *src = ip6h->saddr; in fill_fib_params_v6()
73 *dst = ip6h->daddr; in fill_fib_params_v6()
/linux/net/netfilter/
A Dnf_flow_table_ip.c444 switch (ip6h->nexthdr) { in nf_flow_nat_ipv6_l4proto()
463 addr = ip6h->saddr; in nf_flow_snat_ipv6()
465 ip6h->saddr = new_addr; in nf_flow_snat_ipv6()
468 addr = ip6h->daddr; in nf_flow_snat_ipv6()
470 ip6h->daddr = new_addr; in nf_flow_snat_ipv6()
486 addr = ip6h->daddr; in nf_flow_dnat_ipv6()
491 addr = ip6h->saddr; in nf_flow_dnat_ipv6()
522 struct ipv6hdr *ip6h; in nf_flow_tuple_ipv6() local
576 struct ipv6hdr *ip6h; in nf_flow_offload_ipv6_hook() local
610 ip6h = ipv6_hdr(skb); in nf_flow_offload_ipv6_hook()
[all …]
A Dxt_HL.c68 struct ipv6hdr *ip6h; in hl_tg6() local
72 if (skb_ensure_writable(skb, sizeof(*ip6h))) in hl_tg6()
75 ip6h = ipv6_hdr(skb); in hl_tg6()
82 new_hl = ip6h->hop_limit + info->hop_limit; in hl_tg6()
87 new_hl = ip6h->hop_limit - info->hop_limit; in hl_tg6()
92 new_hl = ip6h->hop_limit; in hl_tg6()
96 ip6h->hop_limit = new_hl; in hl_tg6()
/linux/net/ipv6/netfilter/
A Dnf_reject_ipv6.c20 u8 proto = ip6h->nexthdr; in nf_reject_v6_csum_ok()
25 if (ip6h->payload_len && in nf_reject_v6_csum_ok()
26 pskb_trim_rcsum(skb, ntohs(ip6h->payload_len) + sizeof(*ip6h))) in nf_reject_v6_csum_ok()
29 ip6h = ipv6_hdr(skb); in nf_reject_v6_csum_ok()
201 struct ipv6hdr *ip6h; in nf_reject_ip6hdr_put() local
208 ip6h = ipv6_hdr(nskb); in nf_reject_ip6hdr_put()
210 ip6h->hop_limit = hoplimit; in nf_reject_ip6hdr_put()
211 ip6h->nexthdr = protocol; in nf_reject_ip6hdr_put()
217 return ip6h; in nf_reject_ip6hdr_put()
287 struct ipv6hdr *ip6h; in nf_send_reset6() local
[all …]
/linux/net/ipv6/
A Dmcast_snoop.c16 const struct ipv6hdr *ip6h; in ipv6_mc_check_ip6hdr() local
18 unsigned int offset = skb_network_offset(skb) + sizeof(*ip6h); in ipv6_mc_check_ip6hdr()
23 ip6h = ipv6_hdr(skb); in ipv6_mc_check_ip6hdr()
25 if (ip6h->version != 6) in ipv6_mc_check_ip6hdr()
28 len = offset + ntohs(ip6h->payload_len); in ipv6_mc_check_ip6hdr()
39 const struct ipv6hdr *ip6h; in ipv6_mc_check_exthdrs() local
44 ip6h = ipv6_hdr(skb); in ipv6_mc_check_exthdrs()
46 if (ip6h->nexthdr != IPPROTO_HOPOPTS) in ipv6_mc_check_exthdrs()
49 nexthdr = ip6h->nexthdr; in ipv6_mc_check_exthdrs()
50 offset = skb_network_offset(skb) + sizeof(*ip6h); in ipv6_mc_check_exthdrs()
A Dip6_udp_tunnel.c84 struct ipv6hdr *ip6h; in udp_tunnel6_xmit_skb() local
99 __skb_push(skb, sizeof(*ip6h)); in udp_tunnel6_xmit_skb()
101 ip6h = ipv6_hdr(skb); in udp_tunnel6_xmit_skb()
102 ip6_flow_hdr(ip6h, prio, label); in udp_tunnel6_xmit_skb()
103 ip6h->payload_len = htons(skb->len); in udp_tunnel6_xmit_skb()
104 ip6h->nexthdr = IPPROTO_UDP; in udp_tunnel6_xmit_skb()
105 ip6h->hop_limit = ttl; in udp_tunnel6_xmit_skb()
106 ip6h->daddr = *daddr; in udp_tunnel6_xmit_skb()
107 ip6h->saddr = *saddr; in udp_tunnel6_xmit_skb()
/linux/lib/
A Dtest_blackhole_dev.c30 struct ipv6hdr *ip6h; in test_blackholedev_init() local
56 ip6h = (struct ipv6hdr *)skb_push(skb, sizeof(struct ipv6hdr)); in test_blackholedev_init()
58 ip6h->hop_limit = 32; in test_blackholedev_init()
59 ip6h->payload_len = data_len + sizeof(struct udphdr); in test_blackholedev_init()
60 ip6h->nexthdr = IPPROTO_UDP; in test_blackholedev_init()
61 ip6h->saddr = in6addr_loopback; in test_blackholedev_init()
62 ip6h->daddr = in6addr_loopback; in test_blackholedev_init()
/linux/net/ipv6/ila/
A Dila_common.c35 static __wsum get_csum_diff(struct ipv6hdr *ip6h, struct ila_params *p) in get_csum_diff() argument
37 return get_csum_diff_iaddr(ila_a2i(&ip6h->daddr), p); in get_csum_diff()
78 struct ipv6hdr *ip6h = ipv6_hdr(skb); in ila_csum_adjust_transport() local
81 switch (ip6h->nexthdr) { in ila_csum_adjust_transport()
87 diff = get_csum_diff(ip6h, p); in ila_csum_adjust_transport()
98 diff = get_csum_diff(ip6h, p); in ila_csum_adjust_transport()
112 diff = get_csum_diff(ip6h, p); in ila_csum_adjust_transport()
123 struct ipv6hdr *ip6h = ipv6_hdr(skb); in ila_update_ipv6_locator() local
124 struct ila_addr *iaddr = ila_a2i(&ip6h->daddr); in ila_update_ipv6_locator()
/linux/net/sched/
A Dact_csum.c187 const struct ipv6hdr *ip6h; in tcf_csum_ipv6_icmp() local
193 ip6h = ipv6_hdr(skb); in tcf_csum_ipv6_icmp()
196 icmp6h->icmp6_cksum = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in tcf_csum_ipv6_icmp()
242 ip6h = ipv6_hdr(skb); in tcf_csum_ipv6_tcp()
245 tcph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in tcf_csum_ipv6_tcp()
331 ip6h = ipv6_hdr(skb); in tcf_csum_ipv6_udp()
352 udph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, ul, in tcf_csum_ipv6_udp()
486 struct ipv6hdr *ip6h; in tcf_csum_ipv6() local
495 hl = sizeof(*ip6h); in tcf_csum_ipv6()
500 ip6h = ipv6_hdr(skb); in tcf_csum_ipv6()
[all …]
/linux/drivers/net/ipvlan/
A Dipvlan_core.c172 struct ipv6hdr *ip6h; in ipvlan_get_L3_hdr() local
177 ip6h = ipv6_hdr(skb); in ipvlan_get_L3_hdr()
178 if (ip6h->version != 6) in ipvlan_get_L3_hdr()
182 lyr3h = ip6h; in ipvlan_get_L3_hdr()
191 ip6h = ipv6_hdr(skb); in ipvlan_get_L3_hdr()
200 ip6h = ipv6_hdr(skb); in ipvlan_get_L3_hdr()
362 struct ipv6hdr *ip6h; in ipvlan_addr_lookup() local
366 i6addr = use_dest ? &ip6h->daddr : &ip6h->saddr; in ipvlan_addr_lookup()
463 .daddr = ip6h->daddr, in ipvlan_process_v6_outbound()
464 .saddr = ip6h->saddr, in ipvlan_process_v6_outbound()
[all …]
/linux/drivers/infiniband/core/
A Dlag.c15 struct ipv6hdr *ip6h; in rdma_build_skb() local
59 ip6h = ipv6_hdr(skb); in rdma_build_skb()
60 ip6h->version = 6; in rdma_build_skb()
61 ip6h->nexthdr = IPPROTO_UDP; in rdma_build_skb()
62 memcpy(&ip6h->flow_lbl, &ah_attr->grh.flow_label, in rdma_build_skb()
63 sizeof(*ip6h->flow_lbl)); in rdma_build_skb()
64 memcpy(&ip6h->saddr, ah_attr->grh.sgid_attr->gid.raw, in rdma_build_skb()
66 memcpy(&ip6h->daddr, ah_attr->grh.dgid.raw, in rdma_build_skb()
/linux/drivers/net/ethernet/qualcomm/rmnet/
A Drmnet_map_data.c112 struct ipv6hdr *ip6h = (struct ipv6hdr *)skb->data; in rmnet_map_ipv6_dl_csum_trailer() local
113 void *txporthdr = skb->data + sizeof(*ip6h); in rmnet_map_ipv6_dl_csum_trailer()
121 csum_field = rmnet_map_get_csum_field(ip6h->nexthdr, txporthdr); in rmnet_map_ipv6_dl_csum_trailer()
133 ip_header_csum = (__force __be16)ip_fast_csum(ip6h, sizeof(*ip6h) / 4); in rmnet_map_ipv6_dl_csum_trailer()
136 pseudo_csum = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in rmnet_map_ipv6_dl_csum_trailer()
137 ntohs(ip6h->payload_len), in rmnet_map_ipv6_dl_csum_trailer()
138 ip6h->nexthdr, 0); in rmnet_map_ipv6_dl_csum_trailer()
201 rmnet_map_complement_ipv6_txporthdr_csum_field(struct ipv6hdr *ip6h) in rmnet_map_complement_ipv6_txporthdr_csum_field() argument
206 txphdr = ip6h + 1; in rmnet_map_complement_ipv6_txporthdr_csum_field()
208 if (ip6h->nexthdr == IPPROTO_TCP || ip6h->nexthdr == IPPROTO_UDP) { in rmnet_map_complement_ipv6_txporthdr_csum_field()
[all …]

Completed in 36 milliseconds

1234