/linux-master/tools/testing/selftests/bpf/progs/ |
H A D | cgroup_skb_sk_lookup_kern.c | 30 const struct ipv6hdr *ip6h, 33 set_ip(tuple->ipv6.saddr, &ip6h->daddr); 34 set_ip(tuple->ipv6.daddr, &ip6h->saddr); 40 const struct ipv6hdr *ip6h, 48 set_tuple(&tuple, ip6h, tcph); 69 struct ipv6hdr ip6h; local 79 if (bpf_skb_load_bytes(skb, 0, &ip6h, sizeof(ip6h))) 82 if (ip6h.nexthdr != IPPROTO_TCP) 85 if (bpf_skb_load_bytes(skb, sizeof(ip6h), 29 set_tuple(struct bpf_sock_tuple *tuple, const struct ipv6hdr *ip6h, const struct tcphdr *tcph) argument 39 is_allowed_peer_cg(struct __sk_buff *skb, const struct ipv6hdr *ip6h, const struct tcphdr *tcph) argument [all...] |
H A D | decap_sanity.c | 35 struct ipv6hdr ip6h; local 42 if (bpf_skb_load_bytes(skb, ETH_HLEN, &ip6h, sizeof(ip6h))) 45 if (ip6h.nexthdr != IPPROTO_UDP) 48 if (bpf_skb_load_bytes(skb, ETH_HLEN + sizeof(ip6h), &udph, sizeof(udph))) 56 err = bpf_skb_adjust_room(skb, -(s32)(ETH_HLEN + sizeof(ip6h) + sizeof(udph)),
|
H A D | test_btf_skc_cls_ingress.c | 27 static void test_syncookie_helper(struct ipv6hdr *ip6h, struct tcphdr *th, argument 47 mss_cookie = bpf_tcp_gen_syncookie(tp, ip6h, sizeof(*ip6h), 57 int ret = bpf_tcp_check_syncookie(tp, ip6h, sizeof(*ip6h), 69 static int handle_ip6_tcp(struct ipv6hdr *ip6h, struct __sk_buff *skb) argument 79 th = (struct tcphdr *)(ip6h + 1); 88 tuple = (struct bpf_sock_tuple *)&ip6h->saddr; 135 test_syncookie_helper(ip6h, th, tp, skb); 151 struct ipv6hdr *ip6h; local [all...] |
H A D | test_xdp.c | 159 struct ipv6hdr *ip6h = data + sizeof(struct ethhdr); local 164 if (ip6h + 1 > data_end) 167 dport = get_dport(ip6h + 1, data_end, ip6h->nexthdr); 171 vip.protocol = ip6h->nexthdr; 173 memcpy(vip.daddr.v6, ip6h->daddr.s6_addr32, sizeof(vip.daddr)); 175 payload_len = ip6h->payload_len; 189 ip6h = data + sizeof(*new_eth); 190 old_eth = data + sizeof(*ip6h); 193 ip6h [all...] |
H A D | test_xdp_loop.c | 155 struct ipv6hdr *ip6h = data + sizeof(struct ethhdr); local 160 if (ip6h + 1 > data_end) 163 dport = get_dport(ip6h + 1, data_end, ip6h->nexthdr); 167 vip.protocol = ip6h->nexthdr; 169 memcpy(vip.daddr.v6, ip6h->daddr.s6_addr32, sizeof(vip.daddr)); 171 payload_len = ip6h->payload_len; 185 ip6h = data + sizeof(*new_eth); 186 old_eth = data + sizeof(*ip6h); 189 ip6h [all...] |
H A D | ip_check_defrag.c | 35 static bool is_frag_v6(struct ipv6hdr *ip6h) argument 42 return ip6h->nexthdr == NEXTHDR_FRAGMENT; 70 struct ipv6hdr *ip6h; local 76 ip6h = bpf_dynptr_slice(&ptr, 0, ip6h_buf, sizeof(ip6h_buf)); 77 if (!ip6h) 81 if (is_frag_v6(ip6h)) {
|
H A D | test_xdp_dynptr.c | 168 struct ipv6hdr *ip6h; local 178 ip6h = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, ip6h_buffer_udp, sizeof(ip6h_buffer_udp)); 180 ip6h = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, ip6h_buffer_tcp, sizeof(ip6h_buffer_tcp)); 182 if (!ip6h) 185 dport = get_dport(ip6h + 1, ip6h->nexthdr); 189 vip.protocol = ip6h->nexthdr; 191 memcpy(vip.daddr.v6, ip6h->daddr.s6_addr32, sizeof(vip.daddr)); 193 payload_len = ip6h->payload_len; 208 ip6h [all...] |
H A D | test_pkt_access.c | 124 struct ipv6hdr *ip6h = (struct ipv6hdr *)(eth + 1); local 126 if (ip6h + 1 > data_end) 128 ihl_len = sizeof(*ip6h); 129 proto = ip6h->nexthdr; 130 tcp = (struct tcphdr *)((void *)(ip6h) + ihl_len);
|
H A D | xdp_hw_metadata.c | 31 struct ipv6hdr *ip6h = NULL; local 56 ip6h = (void *)(eth + 1); 57 if (ip6h + 1 < data_end && ip6h->nexthdr == IPPROTO_UDP) 58 udp = (void *)(ip6h + 1);
|
H A D | xdp_metadata.c | 34 struct ipv6hdr *ip6h = NULL; local 52 ip6h = (void *)(eth + 1); 53 if (ip6h + 1 < data_end && ip6h->nexthdr == IPPROTO_UDP) 54 udp = (void *)(ip6h + 1);
|
H A D | test_tc_neigh_fib.c | 57 struct ipv6hdr *ip6h; local 62 ip6h = (struct ipv6hdr *)(data + sizeof(struct ethhdr)); 63 if ((void *)(ip6h + 1) > data_end) 68 fib_params->l4_protocol = ip6h->nexthdr; 71 fib_params->tot_len = bpf_ntohs(ip6h->payload_len); 72 *src = ip6h->saddr; 73 *dst = ip6h->daddr;
|
/linux-master/include/net/netfilter/ |
H A D | nf_tables_ipv6.h | 31 struct ipv6hdr *ip6h, _ip6h; local 37 ip6h = skb_header_pointer(pkt->skb, skb_network_offset(pkt->skb), 38 sizeof(*ip6h), &_ip6h); 39 if (!ip6h) 42 if (ip6h->version != 6) 45 pkt_len = ntohs(ip6h->payload_len); 46 if (pkt_len + sizeof(*ip6h) > pkt->skb->len) 77 struct ipv6hdr *ip6h; local 81 if (!pskb_may_pull(pkt->skb, sizeof(*ip6h))) 84 ip6h [all...] |
H A D | nf_queue.h | 59 static inline u32 hash_v6(const struct ipv6hdr *ip6h, u32 initval) argument 63 if ((__force u32)ip6h->saddr.s6_addr32[3] < 64 (__force u32)ip6h->daddr.s6_addr32[3]) { 65 a = (__force u32) ip6h->saddr.s6_addr32[3]; 66 b = (__force u32) ip6h->daddr.s6_addr32[3]; 68 b = (__force u32) ip6h->saddr.s6_addr32[3]; 69 a = (__force u32) ip6h->daddr.s6_addr32[3]; 72 if ((__force u32)ip6h->saddr.s6_addr32[1] < 73 (__force u32)ip6h->daddr.s6_addr32[1]) 74 c = (__force u32) ip6h 83 struct ipv6hdr *ip6h, _ip6h; local [all...] |
/linux-master/samples/bpf/ |
H A D | test_cgrp2_tc.bpf.c | 32 struct ipv6hdr *ip6h = data + sizeof(*eth); local 39 if (data + sizeof(*eth) + sizeof(*ip6h) > data_end) 43 ip6h->nexthdr != IPPROTO_ICMPV6) { 45 eth->h_proto, ip6h->nexthdr);
|
H A D | xdp_tx_iptunnel_kern.c | 159 struct ipv6hdr *ip6h = data + sizeof(struct ethhdr); local 164 if (ip6h + 1 > data_end) 167 dport = get_dport(ip6h + 1, data_end, ip6h->nexthdr); 171 vip.protocol = ip6h->nexthdr; 173 memcpy(vip.daddr.v6, ip6h->daddr.s6_addr32, sizeof(vip.daddr)); 175 payload_len = ip6h->payload_len; 191 ip6h = data + sizeof(*new_eth); 192 old_eth = data + sizeof(*ip6h); 196 ip6h [all...] |
H A D | xdp_fwd_kern.c | 49 struct ipv6hdr *ip6h; local 83 ip6h = data + nh_off; 84 if (ip6h + 1 > data_end) 87 if (ip6h->hop_limit <= 1) 91 fib_params.flowinfo = *(__be32 *)ip6h & IPV6_FLOWINFO_MASK; 92 fib_params.l4_protocol = ip6h->nexthdr; 95 fib_params.tot_len = ntohs(ip6h->payload_len); 96 *src = ip6h->saddr; 97 *dst = ip6h->daddr; 136 ip6h [all...] |
H A D | tc_l2_redirect_kern.c | 91 struct ipv6hdr *ip6h = data + sizeof(*eth); local 93 if (data + sizeof(*eth) + sizeof(*ip6h) > data_end) 96 if (ip6h->nexthdr != IPPROTO_IPIP && 97 ip6h->nexthdr != IPPROTO_IPV6) 101 _htonl(ip6h->daddr.s6_addr32[0]), 102 _htonl(ip6h->daddr.s6_addr32[3])); 180 struct ipv6hdr *ip6h = data + sizeof(*eth); local 182 if (data + sizeof(*eth) + sizeof(*ip6h) > data_end) 185 if (!is_vip_addr(eth->h_proto, ip6h->daddr.s6_addr32[0])) 189 _htonl(ip6h 225 struct ipv6hdr *ip6h = data + sizeof(*eth); local [all...] |
H A D | parse_varlen.c | 80 struct ipv6hdr *ip6h; local 85 ip6h = data + nh_off; 86 if (ip6h + 1 > data_end) 89 nexthdr = ip6h->nexthdr; 98 ip6h = data + nh_off + ihl_len; 99 if (ip6h + 1 > data_end) 102 nexthdr = ip6h->nexthdr;
|
/linux-master/net/ipv6/ |
H A D | mcast_snoop.c | 16 const struct ipv6hdr *ip6h; local 18 unsigned int offset = skb_network_offset(skb) + sizeof(*ip6h); 23 ip6h = ipv6_hdr(skb); 25 if (ip6h->version != 6) 28 len = offset + ntohs(ip6h->payload_len); 39 const struct ipv6hdr *ip6h; local 44 ip6h = ipv6_hdr(skb); 46 if (ip6h->nexthdr != IPPROTO_HOPOPTS) 49 nexthdr = ip6h->nexthdr; 50 offset = skb_network_offset(skb) + sizeof(*ip6h); [all...] |
/linux-master/lib/ |
H A D | test_blackhole_dev.c | 30 struct ipv6hdr *ip6h; local 55 ip6h = (struct ipv6hdr *)skb_push(skb, sizeof(struct ipv6hdr)); 57 ip6h->hop_limit = 32; 58 ip6h->payload_len = data_len + sizeof(struct udphdr); 59 ip6h->nexthdr = IPPROTO_UDP; 60 ip6h->saddr = in6addr_loopback; 61 ip6h->daddr = in6addr_loopback;
|
/linux-master/net/netfilter/ |
H A D | xt_HL.c | 68 struct ipv6hdr *ip6h; local 72 if (skb_ensure_writable(skb, sizeof(*ip6h))) 75 ip6h = ipv6_hdr(skb); 82 new_hl = ip6h->hop_limit + info->hop_limit; 87 new_hl = ip6h->hop_limit - info->hop_limit; 92 new_hl = ip6h->hop_limit; 96 ip6h->hop_limit = new_hl;
|
H A D | xt_hl.c | 47 const struct ipv6hdr *ip6h = ipv6_hdr(skb); local 51 return ip6h->hop_limit == info->hop_limit; 53 return ip6h->hop_limit != info->hop_limit; 55 return ip6h->hop_limit < info->hop_limit; 57 return ip6h->hop_limit > info->hop_limit;
|
/linux-master/net/ipv6/ila/ |
H A D | ila_common.c | 35 static __wsum get_csum_diff(struct ipv6hdr *ip6h, struct ila_params *p) argument 37 return get_csum_diff_iaddr(ila_a2i(&ip6h->daddr), p); 78 struct ipv6hdr *ip6h = ipv6_hdr(skb); local 81 switch (ip6h->nexthdr) { 87 diff = get_csum_diff(ip6h, p); 98 diff = get_csum_diff(ip6h, p); 112 diff = get_csum_diff(ip6h, p); 123 struct ipv6hdr *ip6h = ipv6_hdr(skb); local 124 struct ila_addr *iaddr = ila_a2i(&ip6h->daddr);
|
/linux-master/drivers/infiniband/core/ |
H A D | lag.c | 14 struct ipv6hdr *ip6h; local 58 ip6h = ipv6_hdr(skb); 59 ip6h->version = 6; 60 ip6h->nexthdr = IPPROTO_UDP; 61 memcpy(&ip6h->flow_lbl, &ah_attr->grh.flow_label, 62 sizeof(*ip6h->flow_lbl)); 63 memcpy(&ip6h->saddr, ah_attr->grh.sgid_attr->gid.raw, 65 memcpy(&ip6h->daddr, ah_attr->grh.dgid.raw,
|
/linux-master/net/ipv6/netfilter/ |
H A D | nf_reject_ipv6.c | 17 const struct ipv6hdr *ip6h = ipv6_hdr(skb); local 20 u8 proto = ip6h->nexthdr; 25 if (ip6h->payload_len && 26 pskb_trim_rcsum(skb, ntohs(ip6h->payload_len) + sizeof(*ip6h))) 29 ip6h = ipv6_hdr(skb); 30 thoff = ipv6_skip_exthdr(skb, ((u8*)(ip6h+1) - skb->data), &proto, &fo); 201 struct ipv6hdr *ip6h; local 208 ip6h = ipv6_hdr(nskb); 209 ip6_flow_hdr(ip6h, tclas 286 struct ipv6hdr *ip6h; local 383 const struct ipv6hdr *ip6h = ipv6_hdr(skb); local [all...] |