Home
last modified time | relevance | path

Searched refs:Global_Clatd_Config (Results 1 – 7 of 7) sorted by relevance

/external/android-clat/
Dconfig.c37 struct clat_config Global_Clatd_Config; variable
157 if (Global_Clatd_Config.plat_from_dns64_hostname) { in free_config()
158 free(Global_Clatd_Config.plat_from_dns64_hostname); in free_config()
159 Global_Clatd_Config.plat_from_dns64_hostname = NULL; in free_config()
183 status = plat_prefix(Global_Clatd_Config.plat_from_dns64_hostname, net_id, &tmp_ptr); in dns64_detection()
185 memcpy(&Global_Clatd_Config.plat_subnet, &tmp_ptr, sizeof(struct in6_addr)); in dns64_detection()
289 if (Global_Clatd_Config.use_dynamic_iid) { in config_generate_local_ipv6_subnet()
291 gen_random_iid(interface_ip, &Global_Clatd_Config.ipv4_local_subnet, in config_generate_local_ipv6_subnet()
292 &Global_Clatd_Config.plat_subnet); in config_generate_local_ipv6_subnet()
296 interface_ip->s6_addr32[i] = Global_Clatd_Config.ipv6_host_id.s6_addr32[i]; in config_generate_local_ipv6_subnet()
[all …]
Dclatd.c74 .sll_ifindex = if_nametoindex(Global_Clatd_Config.default_pdp_interface), in configure_packet_socket()
82 uint32_t *ipv6 = Global_Clatd_Config.ipv6_local_subnet.s6_addr32; in configure_packet_socket()
124 in_addr_t localaddr = config_select_ipv4_address(&Global_Clatd_Config.ipv4_local_subnet, in ipv4_address_generate()
125 Global_Clatd_Config.ipv4_local_prefixlen); in ipv4_address_generate()
128 inet_ntoa(Global_Clatd_Config.ipv4_local_subnet), in ipv4_address_generate()
129 Global_Clatd_Config.ipv4_local_prefixlen); in ipv4_address_generate()
155 Global_Clatd_Config.ipv4_local_subnet.s_addr = ipv4_address_from_cmdline(v4_addr); in configure_tun_ip()
157 Global_Clatd_Config.ipv4_local_subnet.s_addr = ipv4_address_generate(); in configure_tun_ip()
161 inet_ntop(AF_INET, &Global_Clatd_Config.ipv4_local_subnet, addrstr, sizeof(addrstr)); in configure_tun_ip()
166 int status = add_address(tunnel->device4, AF_INET, &Global_Clatd_Config.ipv4_local_subnet, 32, in configure_tun_ip()
[all …]
Dclatd_test.cpp578 struct clat_config Global_Clatd_Config; variable
585 inet_pton(AF_INET, kIPv4LocalAddr, &Global_Clatd_Config.ipv4_local_subnet); in SetUp()
586 inet_pton(AF_INET6, kIPv6PlatSubnet, &Global_Clatd_Config.plat_subnet); in SetUp()
587 memset(&Global_Clatd_Config.ipv6_local_subnet, 0, sizeof(in6_addr)); in SetUp()
588 Global_Clatd_Config.ipv6_host_id = in6addr_any; in SetUp()
589 Global_Clatd_Config.use_dynamic_iid = 1; in SetUp()
590 Global_Clatd_Config.default_pdp_interface = const_cast<char *>(sTun.name().c_str()); in SetUp()
616 EXPECT_TRUE(ipv6_prefix_equal(&Global_Clatd_Config.plat_subnet, in TEST_F()
617 &Global_Clatd_Config.plat_subnet)); in TEST_F()
618 EXPECT_FALSE(ipv6_prefix_equal(&Global_Clatd_Config.plat_subnet, in TEST_F()
[all …]
Dtranslate.c69 return (addr6 != NULL) && (memcmp(addr6, &Global_Clatd_Config.plat_subnet, 12) == 0); in is_in_plat_subnet()
81 } else if (IN6_ARE_ADDR_EQUAL(addr6, &Global_Clatd_Config.ipv6_local_subnet)) { in ipv6_addr_to_ipv4_addr()
83 return Global_Clatd_Config.ipv4_local_subnet.s_addr; in ipv6_addr_to_ipv4_addr()
98 if (addr4 == Global_Clatd_Config.ipv4_local_subnet.s_addr) { in ipv4_addr_to_ipv6_addr()
99 return Global_Clatd_Config.ipv6_local_subnet; in ipv4_addr_to_ipv6_addr()
102 addr6 = Global_Clatd_Config.plat_subnet; in ipv4_addr_to_ipv6_addr()
Dipv6.c106 IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &Global_Clatd_Config.ipv6_local_subnet)) && in ipv6_packet()
108 IN6_ARE_ADDR_EQUAL(&ip6->ip6_src, &Global_Clatd_Config.ipv6_local_subnet)) && in ipv6_packet()
Dconfig.h40 extern struct clat_config Global_Clatd_Config;
Dmain.c159 del_anycast_address(tunnel.write_fd6, &Global_Clatd_Config.ipv6_local_subnet); in main()