Lines Matching refs: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_set_tunnel_no_key() local
90 __builtin_memset(&key, 0x0, sizeof(key)); in gre_set_tunnel_no_key()
91 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in gre_set_tunnel_no_key()
92 key.tunnel_ttl = 64; in gre_set_tunnel_no_key()
94 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in gre_set_tunnel_no_key()
109 struct bpf_tunnel_key key; in gre_get_tunnel() local
111 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in gre_get_tunnel()
117 bpf_printk("key %d remote ip 0x%x\n", key.tunnel_id, key.remote_ipv4); in gre_get_tunnel()
124 struct bpf_tunnel_key key; in ip6gretap_set_tunnel() local
127 __builtin_memset(&key, 0x0, sizeof(key)); in ip6gretap_set_tunnel()
128 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ip6gretap_set_tunnel()
129 key.tunnel_id = 2; in ip6gretap_set_tunnel()
130 key.tunnel_tos = 0; in ip6gretap_set_tunnel()
131 key.tunnel_ttl = 64; in ip6gretap_set_tunnel()
132 key.tunnel_label = 0xabcde; in ip6gretap_set_tunnel()
134 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip6gretap_set_tunnel()
148 struct bpf_tunnel_key key; in ip6gretap_get_tunnel() local
151 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ip6gretap_get_tunnel()
159 key.tunnel_id, key.remote_ipv6[3], key.tunnel_label); in ip6gretap_get_tunnel()
167 struct bpf_tunnel_key key; in erspan_set_tunnel() local
171 __builtin_memset(&key, 0x0, sizeof(key)); in erspan_set_tunnel()
172 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in erspan_set_tunnel()
173 key.tunnel_id = 2; in erspan_set_tunnel()
174 key.tunnel_tos = 0; in erspan_set_tunnel()
175 key.tunnel_ttl = 64; in erspan_set_tunnel()
177 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in erspan_set_tunnel()
210 struct bpf_tunnel_key key; in erspan_get_tunnel() local
215 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in erspan_get_tunnel()
228 key.tunnel_id, key.remote_ipv4, md.version); in erspan_get_tunnel()
246 struct bpf_tunnel_key key; in ip4ip6erspan_set_tunnel() local
250 __builtin_memset(&key, 0x0, sizeof(key)); in ip4ip6erspan_set_tunnel()
251 key.remote_ipv6[3] = bpf_htonl(0x11); in ip4ip6erspan_set_tunnel()
252 key.tunnel_id = 2; in ip4ip6erspan_set_tunnel()
253 key.tunnel_tos = 0; in ip4ip6erspan_set_tunnel()
254 key.tunnel_ttl = 64; in ip4ip6erspan_set_tunnel()
256 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip4ip6erspan_set_tunnel()
290 struct bpf_tunnel_key key; in ip4ip6erspan_get_tunnel() local
295 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ip4ip6erspan_get_tunnel()
309 key.tunnel_id, key.remote_ipv4, md.version); in ip4ip6erspan_get_tunnel()
328 struct bpf_tunnel_key key; in vxlan_set_tunnel_dst() local
339 __builtin_memset(&key, 0x0, sizeof(key)); in vxlan_set_tunnel_dst()
340 key.local_ipv4 = 0xac100164; /* 172.16.1.100 */ in vxlan_set_tunnel_dst()
341 key.remote_ipv4 = *local_ip; in vxlan_set_tunnel_dst()
342 key.tunnel_id = 2; in vxlan_set_tunnel_dst()
343 key.tunnel_tos = 0; in vxlan_set_tunnel_dst()
344 key.tunnel_ttl = 64; in vxlan_set_tunnel_dst()
346 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in vxlan_set_tunnel_dst()
367 struct bpf_tunnel_key key; in vxlan_set_tunnel_src() local
378 __builtin_memset(&key, 0x0, sizeof(key)); in vxlan_set_tunnel_src()
379 key.local_ipv4 = *local_ip; in vxlan_set_tunnel_src()
380 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in vxlan_set_tunnel_src()
381 key.tunnel_id = 2; in vxlan_set_tunnel_src()
382 key.tunnel_tos = 0; in vxlan_set_tunnel_src()
383 key.tunnel_ttl = 64; in vxlan_set_tunnel_src()
385 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in vxlan_set_tunnel_src()
406 struct bpf_tunnel_key key; in vxlan_get_tunnel_src() local
411 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in vxlan_get_tunnel_src()
424 if (key.local_ipv4 != ASSIGNED_ADDR_VETH1 || md.gbp != 0x800FF || in vxlan_get_tunnel_src()
425 !(key.tunnel_flags & TUNNEL_KEY) || in vxlan_get_tunnel_src()
426 (key.tunnel_flags & TUNNEL_CSUM)) { in vxlan_get_tunnel_src()
428 key.tunnel_id, key.local_ipv4, in vxlan_get_tunnel_src()
429 key.remote_ipv4, md.gbp, in vxlan_get_tunnel_src()
430 bpf_ntohs(key.tunnel_flags)); in vxlan_get_tunnel_src()
496 struct bpf_tunnel_key key; in ip6vxlan_set_tunnel_dst() local
507 __builtin_memset(&key, 0x0, sizeof(key)); in ip6vxlan_set_tunnel_dst()
508 key.local_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ip6vxlan_set_tunnel_dst()
509 key.remote_ipv6[3] = bpf_htonl(*local_ip); in ip6vxlan_set_tunnel_dst()
510 key.tunnel_id = 22; in ip6vxlan_set_tunnel_dst()
511 key.tunnel_tos = 0; in ip6vxlan_set_tunnel_dst()
512 key.tunnel_ttl = 64; in ip6vxlan_set_tunnel_dst()
514 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip6vxlan_set_tunnel_dst()
527 struct bpf_tunnel_key key; in ip6vxlan_set_tunnel_src() local
538 __builtin_memset(&key, 0x0, sizeof(key)); in ip6vxlan_set_tunnel_src()
539 key.local_ipv6[3] = bpf_htonl(*local_ip); in ip6vxlan_set_tunnel_src()
540 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ip6vxlan_set_tunnel_src()
541 key.tunnel_id = 22; in ip6vxlan_set_tunnel_src()
542 key.tunnel_tos = 0; in ip6vxlan_set_tunnel_src()
543 key.tunnel_ttl = 64; in ip6vxlan_set_tunnel_src()
545 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip6vxlan_set_tunnel_src()
558 struct bpf_tunnel_key key; in ip6vxlan_get_tunnel_src() local
569 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ip6vxlan_get_tunnel_src()
576 if (bpf_ntohl(key.local_ipv6[3]) != *local_ip || in ip6vxlan_get_tunnel_src()
577 !(key.tunnel_flags & TUNNEL_KEY) || in ip6vxlan_get_tunnel_src()
578 !(key.tunnel_flags & TUNNEL_CSUM)) { in ip6vxlan_get_tunnel_src()
580 key.tunnel_id, bpf_ntohl(key.local_ipv6[3]), in ip6vxlan_get_tunnel_src()
581 bpf_ntohl(key.remote_ipv6[3]), key.tunnel_label, in ip6vxlan_get_tunnel_src()
582 bpf_ntohs(key.tunnel_flags)); in ip6vxlan_get_tunnel_src()
595 struct bpf_tunnel_key key; in geneve_set_tunnel() local
598 __builtin_memset(&key, 0x0, sizeof(key)); in geneve_set_tunnel()
599 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in geneve_set_tunnel()
600 key.tunnel_id = 2; in geneve_set_tunnel()
601 key.tunnel_tos = 0; in geneve_set_tunnel()
602 key.tunnel_ttl = 64; in geneve_set_tunnel()
613 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in geneve_set_tunnel()
633 struct bpf_tunnel_key key; in geneve_get_tunnel() local
636 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in geneve_get_tunnel()
647 key.tunnel_id, key.remote_ipv4, gopt.opt_class); in geneve_get_tunnel()
654 struct bpf_tunnel_key key; in ip6geneve_set_tunnel() local
658 __builtin_memset(&key, 0x0, sizeof(key)); in ip6geneve_set_tunnel()
659 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ip6geneve_set_tunnel()
660 key.tunnel_id = 22; in ip6geneve_set_tunnel()
661 key.tunnel_tos = 0; in ip6geneve_set_tunnel()
662 key.tunnel_ttl = 64; in ip6geneve_set_tunnel()
664 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip6geneve_set_tunnel()
692 struct bpf_tunnel_key key; in ip6geneve_get_tunnel() local
696 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ip6geneve_get_tunnel()
708 key.tunnel_id, key.remote_ipv4, gopt.opt_class); in ip6geneve_get_tunnel()
716 struct bpf_tunnel_key key = {}; in ipip_set_tunnel() local
728 key.tunnel_ttl = 64; in ipip_set_tunnel()
730 key.remote_ipv4 = 0xac100164; /* 172.16.1.100 */ in ipip_set_tunnel()
733 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), 0); in ipip_set_tunnel()
746 struct bpf_tunnel_key key; in ipip_get_tunnel() local
748 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in ipip_get_tunnel()
754 bpf_printk("remote ip 0x%x\n", key.remote_ipv4); in ipip_get_tunnel()
761 struct bpf_tunnel_key key = {}; in ipip6_set_tunnel() local
773 __builtin_memset(&key, 0x0, sizeof(key)); in ipip6_set_tunnel()
774 key.tunnel_ttl = 64; in ipip6_set_tunnel()
776 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ipip6_set_tunnel()
779 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ipip6_set_tunnel()
793 struct bpf_tunnel_key key; in ipip6_get_tunnel() local
795 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ipip6_get_tunnel()
802 bpf_printk("remote ip6 %x::%x\n", bpf_htonl(key.remote_ipv6[0]), in ipip6_get_tunnel()
803 bpf_htonl(key.remote_ipv6[3])); in ipip6_get_tunnel()
810 struct bpf_tunnel_key key = {}; in ip6ip6_set_tunnel() local
822 key.tunnel_ttl = 64; in ip6ip6_set_tunnel()
824 key.remote_ipv6[3] = bpf_htonl(0x11); /* ::11 */ in ip6ip6_set_tunnel()
827 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in ip6ip6_set_tunnel()
841 struct bpf_tunnel_key key; in ip6ip6_get_tunnel() local
843 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), in ip6ip6_get_tunnel()
850 bpf_printk("remote ip6 %x::%x\n", bpf_htonl(key.remote_ipv6[0]), in ip6ip6_get_tunnel()
851 bpf_htonl(key.remote_ipv6[3])); in ip6ip6_get_tunnel()