Lines Matching refs:key
73 __type(key, __u32);
81 struct bpf_tunnel_key key; in gre_set_tunnel() local
83 __builtin_memset(&key, 0x0, sizeof(key)); in gre_set_tunnel()
84 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in gre_set_tunnel()
85 key.tunnel_id = 2; in gre_set_tunnel()
86 key.tunnel_tos = 0; in gre_set_tunnel()
87 key.tunnel_ttl = 64; in gre_set_tunnel()
89 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in gre_set_tunnel()
103 struct bpf_tunnel_key key; in gre_set_tunnel_no_key() local
105 __builtin_memset(&key, 0x0, sizeof(key)); in gre_set_tunnel_no_key()
106 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in gre_set_tunnel_no_key()
107 key.tunnel_ttl = 64; in gre_set_tunnel_no_key()
109 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in gre_set_tunnel_no_key()
124 struct bpf_tunnel_key key; in gre_get_tunnel() local
126 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in gre_get_tunnel()
132 bpf_printk("key %d remote ip 0x%x\n", key.tunnel_id, key.remote_ipv4); in gre_get_tunnel()
139 struct bpf_tunnel_key key; in ip6gretap_set_tunnel() local
142 __builtin_memset(&key, 0x0, sizeof(key)); in ip6gretap_set_tunnel()
143 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ip6gretap_set_tunnel()
144 key.tunnel_id = 2; in ip6gretap_set_tunnel()
145 key.tunnel_tos = 0; in ip6gretap_set_tunnel()
146 key.tunnel_ttl = 64; in ip6gretap_set_tunnel()
147 key.tunnel_label = 0xabcde; in ip6gretap_set_tunnel()
149 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip6gretap_set_tunnel()
163 struct bpf_tunnel_key key; in ip6gretap_get_tunnel() local
166 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ip6gretap_get_tunnel()
174 key.tunnel_id, key.remote_ipv6[3], key.tunnel_label); in ip6gretap_get_tunnel()
182 struct bpf_tunnel_key key; in erspan_set_tunnel() local
186 __builtin_memset(&key, 0x0, sizeof(key)); in erspan_set_tunnel()
187 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in erspan_set_tunnel()
188 key.tunnel_id = 2; in erspan_set_tunnel()
189 key.tunnel_tos = 0; in erspan_set_tunnel()
190 key.tunnel_ttl = 64; in erspan_set_tunnel()
192 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in erspan_set_tunnel()
225 struct bpf_tunnel_key key; in erspan_get_tunnel() local
229 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in erspan_get_tunnel()
242 key.tunnel_id, key.remote_ipv4, md.version); in erspan_get_tunnel()
260 struct bpf_tunnel_key key; in ip4ip6erspan_set_tunnel() local
264 __builtin_memset(&key, 0x0, sizeof(key)); in ip4ip6erspan_set_tunnel()
265 key.remote_ipv6[3] = bpf_htonl(0x11); in ip4ip6erspan_set_tunnel()
266 key.tunnel_id = 2; in ip4ip6erspan_set_tunnel()
267 key.tunnel_tos = 0; in ip4ip6erspan_set_tunnel()
268 key.tunnel_ttl = 64; in ip4ip6erspan_set_tunnel()
270 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip4ip6erspan_set_tunnel()
304 struct bpf_tunnel_key key; in ip4ip6erspan_get_tunnel() local
308 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ip4ip6erspan_get_tunnel()
322 key.tunnel_id, key.remote_ipv4, md.version); in ip4ip6erspan_get_tunnel()
340 struct bpf_tunnel_key key; in vxlan_set_tunnel_dst() local
352 __builtin_memset(&key, 0x0, sizeof(key)); in vxlan_set_tunnel_dst()
353 key.local_ipv4 = 0xac100164; /* 172.16.1.100 */ in vxlan_set_tunnel_dst()
354 key.remote_ipv4 = *local_ip; in vxlan_set_tunnel_dst()
355 key.tunnel_id = 2; in vxlan_set_tunnel_dst()
356 key.tunnel_tos = 0; in vxlan_set_tunnel_dst()
357 key.tunnel_ttl = 64; in vxlan_set_tunnel_dst()
359 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in vxlan_set_tunnel_dst()
379 struct bpf_tunnel_key key; in vxlan_set_tunnel_src() local
391 __builtin_memset(&key, 0x0, sizeof(key)); in vxlan_set_tunnel_src()
392 key.local_ipv4 = *local_ip; in vxlan_set_tunnel_src()
393 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in vxlan_set_tunnel_src()
394 key.tunnel_id = 2; in vxlan_set_tunnel_src()
395 key.tunnel_tos = 0; in vxlan_set_tunnel_src()
396 key.tunnel_ttl = 64; in vxlan_set_tunnel_src()
398 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in vxlan_set_tunnel_src()
419 struct bpf_tunnel_key key; in vxlan_get_tunnel_src() local
422 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in vxlan_get_tunnel_src()
435 if (key.local_ipv4 != ASSIGNED_ADDR_VETH1 || md.gbp != 0x800FF || in vxlan_get_tunnel_src()
436 !(key.tunnel_flags & TUNNEL_KEY) || in vxlan_get_tunnel_src()
437 (key.tunnel_flags & TUNNEL_CSUM)) { in vxlan_get_tunnel_src()
439 key.tunnel_id, key.local_ipv4, in vxlan_get_tunnel_src()
440 key.remote_ipv4, md.gbp, in vxlan_get_tunnel_src()
441 bpf_ntohs(key.tunnel_flags)); in vxlan_get_tunnel_src()
505 struct bpf_tunnel_key key; in ip6vxlan_set_tunnel_dst() local
516 __builtin_memset(&key, 0x0, sizeof(key)); in ip6vxlan_set_tunnel_dst()
517 key.local_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ip6vxlan_set_tunnel_dst()
518 key.remote_ipv6[3] = bpf_htonl(*local_ip); in ip6vxlan_set_tunnel_dst()
519 key.tunnel_id = 22; in ip6vxlan_set_tunnel_dst()
520 key.tunnel_tos = 0; in ip6vxlan_set_tunnel_dst()
521 key.tunnel_ttl = 64; in ip6vxlan_set_tunnel_dst()
523 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip6vxlan_set_tunnel_dst()
536 struct bpf_tunnel_key key; in ip6vxlan_set_tunnel_src() local
547 __builtin_memset(&key, 0x0, sizeof(key)); in ip6vxlan_set_tunnel_src()
548 key.local_ipv6[3] = bpf_htonl(*local_ip); in ip6vxlan_set_tunnel_src()
549 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ip6vxlan_set_tunnel_src()
550 key.tunnel_id = 22; in ip6vxlan_set_tunnel_src()
551 key.tunnel_tos = 0; in ip6vxlan_set_tunnel_src()
552 key.tunnel_ttl = 64; in ip6vxlan_set_tunnel_src()
554 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip6vxlan_set_tunnel_src()
567 struct bpf_tunnel_key key; in ip6vxlan_get_tunnel_src() local
578 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ip6vxlan_get_tunnel_src()
585 if (bpf_ntohl(key.local_ipv6[3]) != *local_ip || in ip6vxlan_get_tunnel_src()
586 !(key.tunnel_flags & TUNNEL_KEY) || in ip6vxlan_get_tunnel_src()
587 !(key.tunnel_flags & TUNNEL_CSUM)) { in ip6vxlan_get_tunnel_src()
589 key.tunnel_id, bpf_ntohl(key.local_ipv6[3]), in ip6vxlan_get_tunnel_src()
590 bpf_ntohl(key.remote_ipv6[3]), key.tunnel_label, in ip6vxlan_get_tunnel_src()
591 bpf_ntohs(key.tunnel_flags)); in ip6vxlan_get_tunnel_src()
609 struct bpf_tunnel_key key; in geneve_set_tunnel() local
613 __builtin_memset(&key, 0x0, sizeof(key)); in geneve_set_tunnel()
614 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in geneve_set_tunnel()
615 key.tunnel_id = 2; in geneve_set_tunnel()
616 key.tunnel_tos = 0; in geneve_set_tunnel()
617 key.tunnel_ttl = 64; in geneve_set_tunnel()
628 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in geneve_set_tunnel()
648 struct bpf_tunnel_key key; in geneve_get_tunnel() local
651 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in geneve_get_tunnel()
662 key.tunnel_id, key.remote_ipv4, gopt.opt_class); in geneve_get_tunnel()
669 struct bpf_tunnel_key key; in ip6geneve_set_tunnel() local
674 __builtin_memset(&key, 0x0, sizeof(key)); in ip6geneve_set_tunnel()
675 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ip6geneve_set_tunnel()
676 key.tunnel_id = 22; in ip6geneve_set_tunnel()
677 key.tunnel_tos = 0; in ip6geneve_set_tunnel()
678 key.tunnel_ttl = 64; in ip6geneve_set_tunnel()
680 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip6geneve_set_tunnel()
708 struct bpf_tunnel_key key; in ip6geneve_get_tunnel() local
712 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ip6geneve_get_tunnel()
724 key.tunnel_id, key.remote_ipv4, gopt.opt_class); in ip6geneve_get_tunnel()
732 struct bpf_tunnel_key key = {}; in ipip_set_tunnel() local
744 key.tunnel_ttl = 64; in ipip_set_tunnel()
746 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in ipip_set_tunnel()
749 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), 0); in ipip_set_tunnel()
762 struct bpf_tunnel_key key; in ipip_get_tunnel() local
764 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in ipip_get_tunnel()
770 bpf_printk("remote ip 0x%x\n", key.remote_ipv4); in ipip_get_tunnel()
777 struct bpf_tunnel_key key = {}; in ipip_gue_set_tunnel() local
789 key.tunnel_ttl = 64; in ipip_gue_set_tunnel()
791 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in ipip_gue_set_tunnel()
793 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), 0); in ipip_gue_set_tunnel()
814 struct bpf_tunnel_key key = {}; in ipip_fou_set_tunnel() local
826 key.tunnel_ttl = 64; in ipip_fou_set_tunnel()
828 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in ipip_fou_set_tunnel()
830 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), 0); in ipip_fou_set_tunnel()
852 struct bpf_tunnel_key key = {}; in ipip_encap_get_tunnel() local
855 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in ipip_encap_get_tunnel()
871 key.remote_ipv4, bpf_ntohs(encap.sport), in ipip_encap_get_tunnel()
879 struct bpf_tunnel_key key = {}; in ipip6_set_tunnel() local
891 __builtin_memset(&key, 0x0, sizeof(key)); in ipip6_set_tunnel()
892 key.tunnel_ttl = 64; in ipip6_set_tunnel()
894 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ipip6_set_tunnel()
897 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ipip6_set_tunnel()
911 struct bpf_tunnel_key key; in ipip6_get_tunnel() local
913 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ipip6_get_tunnel()
920 bpf_printk("remote ip6 %x::%x\n", bpf_htonl(key.remote_ipv6[0]), in ipip6_get_tunnel()
921 bpf_htonl(key.remote_ipv6[3])); in ipip6_get_tunnel()
928 struct bpf_tunnel_key key = {}; in ip6ip6_set_tunnel() local
940 key.tunnel_ttl = 64; in ip6ip6_set_tunnel()
942 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ip6ip6_set_tunnel()
945 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip6ip6_set_tunnel()
959 struct bpf_tunnel_key key; in ip6ip6_get_tunnel() local
961 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ip6ip6_get_tunnel()
968 bpf_printk("remote ip6 %x::%x\n", bpf_htonl(key.remote_ipv6[0]), in ip6ip6_get_tunnel()
969 bpf_htonl(key.remote_ipv6[3])); in ip6ip6_get_tunnel()