Lines Matching full:key
58 __type(key, __u32);
66 struct bpf_tunnel_key key; in gre_set_tunnel() local
68 __builtin_memset(&key, 0x0, sizeof(key)); in gre_set_tunnel()
69 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in gre_set_tunnel()
70 key.tunnel_id = 2; in gre_set_tunnel()
71 key.tunnel_tos = 0; in gre_set_tunnel()
72 key.tunnel_ttl = 64; in gre_set_tunnel()
74 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in gre_set_tunnel()
88 struct bpf_tunnel_key key; in gre_get_tunnel() local
90 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in gre_get_tunnel()
96 bpf_printk("key %d remote ip 0x%x\n", key.tunnel_id, key.remote_ipv4); in gre_get_tunnel()
103 struct bpf_tunnel_key key; in ip6gretap_set_tunnel() local
106 __builtin_memset(&key, 0x0, sizeof(key)); in ip6gretap_set_tunnel()
107 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ip6gretap_set_tunnel()
108 key.tunnel_id = 2; in ip6gretap_set_tunnel()
109 key.tunnel_tos = 0; in ip6gretap_set_tunnel()
110 key.tunnel_ttl = 64; in ip6gretap_set_tunnel()
111 key.tunnel_label = 0xabcde; in ip6gretap_set_tunnel()
113 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip6gretap_set_tunnel()
127 struct bpf_tunnel_key key; in ip6gretap_get_tunnel() local
130 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ip6gretap_get_tunnel()
137 bpf_printk("key %d remote ip6 ::%x label %x\n", in ip6gretap_get_tunnel()
138 key.tunnel_id, key.remote_ipv6[3], key.tunnel_label); in ip6gretap_get_tunnel()
146 struct bpf_tunnel_key key; in erspan_set_tunnel() local
150 __builtin_memset(&key, 0x0, sizeof(key)); in erspan_set_tunnel()
151 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in erspan_set_tunnel()
152 key.tunnel_id = 2; in erspan_set_tunnel()
153 key.tunnel_tos = 0; in erspan_set_tunnel()
154 key.tunnel_ttl = 64; in erspan_set_tunnel()
156 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in erspan_set_tunnel()
189 struct bpf_tunnel_key key; in erspan_get_tunnel() local
194 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in erspan_get_tunnel()
206 bpf_printk("key %d remote ip 0x%x erspan version %d\n", in erspan_get_tunnel()
207 key.tunnel_id, key.remote_ipv4, md.version); in erspan_get_tunnel()
225 struct bpf_tunnel_key key; in ip4ip6erspan_set_tunnel() local
229 __builtin_memset(&key, 0x0, sizeof(key)); in ip4ip6erspan_set_tunnel()
230 key.remote_ipv6[3] = bpf_htonl(0x11); in ip4ip6erspan_set_tunnel()
231 key.tunnel_id = 2; in ip4ip6erspan_set_tunnel()
232 key.tunnel_tos = 0; in ip4ip6erspan_set_tunnel()
233 key.tunnel_ttl = 64; in ip4ip6erspan_set_tunnel()
235 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip4ip6erspan_set_tunnel()
269 struct bpf_tunnel_key key; in ip4ip6erspan_get_tunnel() local
274 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ip4ip6erspan_get_tunnel()
287 bpf_printk("ip6erspan get key %d remote ip6 ::%x erspan version %d\n", in ip4ip6erspan_get_tunnel()
288 key.tunnel_id, key.remote_ipv4, md.version); in ip4ip6erspan_get_tunnel()
307 struct bpf_tunnel_key key; in vxlan_set_tunnel_dst() local
318 __builtin_memset(&key, 0x0, sizeof(key)); in vxlan_set_tunnel_dst()
319 key.local_ipv4 = 0xac100164; /* 172.16.1.100 */ in vxlan_set_tunnel_dst()
320 key.remote_ipv4 = *local_ip; in vxlan_set_tunnel_dst()
321 key.tunnel_id = 2; in vxlan_set_tunnel_dst()
322 key.tunnel_tos = 0; in vxlan_set_tunnel_dst()
323 key.tunnel_ttl = 64; in vxlan_set_tunnel_dst()
325 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in vxlan_set_tunnel_dst()
346 struct bpf_tunnel_key key; in vxlan_set_tunnel_src() local
357 __builtin_memset(&key, 0x0, sizeof(key)); in vxlan_set_tunnel_src()
358 key.local_ipv4 = *local_ip; in vxlan_set_tunnel_src()
359 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in vxlan_set_tunnel_src()
360 key.tunnel_id = 2; in vxlan_set_tunnel_src()
361 key.tunnel_tos = 0; in vxlan_set_tunnel_src()
362 key.tunnel_ttl = 64; in vxlan_set_tunnel_src()
364 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in vxlan_set_tunnel_src()
385 struct bpf_tunnel_key key; in vxlan_get_tunnel_src() local
390 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in vxlan_get_tunnel_src()
403 if (key.local_ipv4 != ASSIGNED_ADDR_VETH1 || md.gbp != 0x800FF || in vxlan_get_tunnel_src()
404 !(key.tunnel_flags & TUNNEL_KEY) || in vxlan_get_tunnel_src()
405 (key.tunnel_flags & TUNNEL_CSUM)) { in vxlan_get_tunnel_src()
406 bpf_printk("vxlan key %d local ip 0x%x remote ip 0x%x gbp 0x%x flags 0x%x\n", in vxlan_get_tunnel_src()
407 key.tunnel_id, key.local_ipv4, in vxlan_get_tunnel_src()
408 key.remote_ipv4, md.gbp, in vxlan_get_tunnel_src()
409 bpf_ntohs(key.tunnel_flags)); in vxlan_get_tunnel_src()
475 struct bpf_tunnel_key key; in ip6vxlan_set_tunnel_dst() local
486 __builtin_memset(&key, 0x0, sizeof(key)); in ip6vxlan_set_tunnel_dst()
487 key.local_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ip6vxlan_set_tunnel_dst()
488 key.remote_ipv6[3] = bpf_htonl(*local_ip); in ip6vxlan_set_tunnel_dst()
489 key.tunnel_id = 22; in ip6vxlan_set_tunnel_dst()
490 key.tunnel_tos = 0; in ip6vxlan_set_tunnel_dst()
491 key.tunnel_ttl = 64; in ip6vxlan_set_tunnel_dst()
493 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip6vxlan_set_tunnel_dst()
506 struct bpf_tunnel_key key; in ip6vxlan_set_tunnel_src() local
517 __builtin_memset(&key, 0x0, sizeof(key)); in ip6vxlan_set_tunnel_src()
518 key.local_ipv6[3] = bpf_htonl(*local_ip); in ip6vxlan_set_tunnel_src()
519 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ip6vxlan_set_tunnel_src()
520 key.tunnel_id = 22; in ip6vxlan_set_tunnel_src()
521 key.tunnel_tos = 0; in ip6vxlan_set_tunnel_src()
522 key.tunnel_ttl = 64; in ip6vxlan_set_tunnel_src()
524 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip6vxlan_set_tunnel_src()
537 struct bpf_tunnel_key key; in ip6vxlan_get_tunnel_src() local
548 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ip6vxlan_get_tunnel_src()
555 if (bpf_ntohl(key.local_ipv6[3]) != *local_ip || in ip6vxlan_get_tunnel_src()
556 !(key.tunnel_flags & TUNNEL_KEY) || in ip6vxlan_get_tunnel_src()
557 !(key.tunnel_flags & TUNNEL_CSUM)) { in ip6vxlan_get_tunnel_src()
558 bpf_printk("ip6vxlan key %d local ip6 ::%x remote ip6 ::%x label 0x%x flags 0x%x\n", in ip6vxlan_get_tunnel_src()
559 key.tunnel_id, bpf_ntohl(key.local_ipv6[3]), in ip6vxlan_get_tunnel_src()
560 bpf_ntohl(key.remote_ipv6[3]), key.tunnel_label, in ip6vxlan_get_tunnel_src()
561 bpf_ntohs(key.tunnel_flags)); in ip6vxlan_get_tunnel_src()
574 struct bpf_tunnel_key key; in geneve_set_tunnel() local
577 __builtin_memset(&key, 0x0, sizeof(key)); in geneve_set_tunnel()
578 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in geneve_set_tunnel()
579 key.tunnel_id = 2; in geneve_set_tunnel()
580 key.tunnel_tos = 0; in geneve_set_tunnel()
581 key.tunnel_ttl = 64; in geneve_set_tunnel()
592 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in geneve_set_tunnel()
612 struct bpf_tunnel_key key; in geneve_get_tunnel() local
615 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in geneve_get_tunnel()
625 bpf_printk("key %d remote ip 0x%x geneve class 0x%x\n", in geneve_get_tunnel()
626 key.tunnel_id, key.remote_ipv4, gopt.opt_class); in geneve_get_tunnel()
633 struct bpf_tunnel_key key; in ip6geneve_set_tunnel() local
637 __builtin_memset(&key, 0x0, sizeof(key)); in ip6geneve_set_tunnel()
638 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ip6geneve_set_tunnel()
639 key.tunnel_id = 22; in ip6geneve_set_tunnel()
640 key.tunnel_tos = 0; in ip6geneve_set_tunnel()
641 key.tunnel_ttl = 64; in ip6geneve_set_tunnel()
643 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip6geneve_set_tunnel()
671 struct bpf_tunnel_key key; in ip6geneve_get_tunnel() local
675 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ip6geneve_get_tunnel()
686 bpf_printk("key %d remote ip 0x%x geneve class 0x%x\n", in ip6geneve_get_tunnel()
687 key.tunnel_id, key.remote_ipv4, gopt.opt_class); in ip6geneve_get_tunnel()
695 struct bpf_tunnel_key key = {}; in ipip_set_tunnel() local
707 key.tunnel_ttl = 64; in ipip_set_tunnel()
709 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in ipip_set_tunnel()
712 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), 0); in ipip_set_tunnel()
725 struct bpf_tunnel_key key; in ipip_get_tunnel() local
727 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in ipip_get_tunnel()
733 bpf_printk("remote ip 0x%x\n", key.remote_ipv4); in ipip_get_tunnel()
740 struct bpf_tunnel_key key = {}; in ipip6_set_tunnel() local
752 __builtin_memset(&key, 0x0, sizeof(key)); in ipip6_set_tunnel()
753 key.tunnel_ttl = 64; in ipip6_set_tunnel()
755 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ipip6_set_tunnel()
758 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ipip6_set_tunnel()
772 struct bpf_tunnel_key key; in ipip6_get_tunnel() local
774 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ipip6_get_tunnel()
781 bpf_printk("remote ip6 %x::%x\n", bpf_htonl(key.remote_ipv6[0]), in ipip6_get_tunnel()
782 bpf_htonl(key.remote_ipv6[3])); in ipip6_get_tunnel()
789 struct bpf_tunnel_key key = {}; in ip6ip6_set_tunnel() local
801 key.tunnel_ttl = 64; in ip6ip6_set_tunnel()
803 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ip6ip6_set_tunnel()
806 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip6ip6_set_tunnel()
820 struct bpf_tunnel_key key; in ip6ip6_get_tunnel() local
822 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ip6ip6_get_tunnel()
829 bpf_printk("remote ip6 %x::%x\n", bpf_htonl(key.remote_ipv6[0]), in ip6ip6_get_tunnel()
830 bpf_htonl(key.remote_ipv6[3])); in ip6ip6_get_tunnel()