Lines Matching refs:std

882 static std::mutex cache_mutex;
883 static std::condition_variable cv;
893 std::unordered_map<int, uint32_t> resolv_get_dns_event_subsampling_map() { in resolv_get_dns_event_subsampling_map()
898 std::unordered_map<int, uint32_t> sampling_rate_map{}; in resolv_get_dns_event_subsampling_map()
899 std::vector<std::string> subsampling_vector = in resolv_get_dns_event_subsampling_map()
904 std::vector<std::string> rate_denom = Split(pair, ":"); in resolv_get_dns_event_subsampling_map()
976 std::vector<Entry> entries;
987 cache = std::make_unique<Cache>(); in NetConfig()
993 std::unique_ptr<Cache> cache;
994 std::vector<std::string> nameservers;
995 std::vector<IPSockAddr> nameserverSockAddrs;
999 std::vector<std::string> search_domains;
1002 std::unordered_map<int, uint32_t> dns_event_subsampling_map;
1009 std::vector<int32_t> transportTypes;
1070 std::lock_guard guard(cache_mutex); in _resolv_cache_query_failed()
1080 std::string buf; in cache_dump_mru_locked()
1214 std::unique_lock lock(cache_mutex); in resolv_cache_lookup()
1238 bool ret = cv.wait_for(lock, std::chrono::seconds(PENDING_REQUEST_TIMEOUT), in resolv_cache_lookup()
1305 std::lock_guard guard(cache_mutex); in resolv_cache_add()
1376 std::lock_guard guard(cache_mutex); in resolv_gethostbyaddr_from_cache()
1434 static std::unordered_map<unsigned, std::unique_ptr<NetConfig>> sNetConfigMap
1440 static bool resolv_is_nameservers_equal(const std::vector<std::string>& oldServers,
1441 const std::vector<std::string>& newServers);
1447 std::lock_guard guard(cache_mutex); in resolv_has_nameservers()
1453 std::lock_guard guard(cache_mutex); in resolv_create_cache_for_net()
1459 sNetConfigMap[netid] = std::make_unique<NetConfig>(netid); in resolv_create_cache_for_net()
1464 std::lock_guard guard(cache_mutex); in resolv_delete_cache_for_net()
1469 std::lock_guard guard(cache_mutex); in resolv_flush_cache_for_net()
1482 std::vector<unsigned> resolv_list_caches() { in resolv_list_caches()
1483 std::lock_guard guard(cache_mutex); in resolv_list_caches()
1484 std::vector<unsigned> result; in resolv_list_caches()
1517 std::lock_guard guard(cache_mutex); in resolv_get_network_types_for_net()
1526 std::vector<std::string> filter_domains(const std::vector<std::string>& domains) { in filter_domains()
1527 std::set<std::string> tmp_set; in filter_domains()
1528 std::vector<std::string> res; in filter_domains()
1530 std::copy_if(domains.begin(), domains.end(), std::back_inserter(res), in filter_domains()
1531 [&tmp_set](const std::string& str) { in filter_domains()
1542 std::vector<std::string> filter_nameservers(const std::vector<std::string>& servers) { in filter_nameservers()
1543 std::vector<std::string> res = servers; in filter_nameservers()
1551 bool isValidServer(const std::string& server) { in isValidServer()
1568 std::vector<std::string> getCustomizedTableByName(const size_t netid, const char* hostname) { in getCustomizedTableByName()
1569 std::lock_guard guard(cache_mutex); in getCustomizedTableByName()
1572 std::vector<std::string> result; in getCustomizedTableByName()
1582 int resolv_set_nameservers(unsigned netid, const std::vector<std::string>& servers, in resolv_set_nameservers()
1583 const std::vector<std::string>& domains, const res_params& params, in resolv_set_nameservers()
1585 const std::vector<int32_t>& transportTypes) { in resolv_set_nameservers()
1586 std::vector<std::string> nameservers = filter_nameservers(servers); in resolv_set_nameservers()
1593 std::vector<IPSockAddr> ipSockAddrs; in resolv_set_nameservers()
1600 std::lock_guard guard(cache_mutex); in resolv_set_nameservers()
1611 netconfig->nameservers = std::move(nameservers); in resolv_set_nameservers()
1616 netconfig->nameserverSockAddrs = std::move(ipSockAddrs); in resolv_set_nameservers()
1658 static bool resolv_is_nameservers_equal(const std::vector<std::string>& oldServers, in resolv_is_nameservers_equal()
1659 const std::vector<std::string>& newServers) { in resolv_is_nameservers_equal()
1660 const std::set<std::string> olds(oldServers.begin(), oldServers.end()); in resolv_is_nameservers_equal()
1661 const std::set<std::string> news(newServers.begin(), newServers.end()); in resolv_is_nameservers_equal()
1683 std::lock_guard guard(cache_mutex); in resolv_populate_res_for_net()
1731 std::lock_guard guard(cache_mutex); in android_net_res_stats_get_info_for_net()
1759 std::vector<std::string> resolv_cache_dump_subsampling_map(unsigned netid) { in resolv_cache_dump_subsampling_map()
1761 std::lock_guard guard(cache_mutex); in resolv_cache_dump_subsampling_map()
1764 std::vector<std::string> result; in resolv_cache_dump_subsampling_map()
1769 : std::to_string(pair.first).c_str(), in resolv_cache_dump_subsampling_map()
1780 std::lock_guard guard(cache_mutex); in resolv_cache_get_subsampling_denom()
1796 const std::vector<IPSockAddr>& serverSockAddrs) { in resolv_cache_get_resolver_stats()
1797 std::lock_guard guard(cache_mutex); in resolv_cache_get_resolver_stats()
1829 std::lock_guard guard(cache_mutex); in resolv_cache_add_resolver_stats_sample()
1833 const int serverNum = std::min(MAXNS, static_cast<int>(info->nameserverSockAddrs.size())); in resolv_cache_add_resolver_stats_sample()
1844 std::lock_guard guard(cache_mutex); in has_named_cache()
1848 int resolv_cache_get_expiration(unsigned netid, const std::vector<char>& query, in resolv_cache_get_expiration()
1861 std::lock_guard guard(cache_mutex); in resolv_cache_get_expiration()
1882 int resolv_stats_set_servers_for_dot(unsigned netid, const std::vector<std::string>& servers) { in resolv_stats_set_servers_for_dot()
1883 std::lock_guard guard(cache_mutex); in resolv_stats_set_servers_for_dot()
1888 std::vector<IPSockAddr> serverSockAddrs; in resolv_stats_set_servers_for_dot()
1906 std::lock_guard guard(cache_mutex); in resolv_stats_add()
1945 android::net::NetworkType convert_network_type(const std::vector<int32_t>& transportTypes) { in convert_network_type()
1952 std::vector<int32_t> sortedTransTypes = transportTypes; in convert_network_type()
1953 std::sort(sortedTransTypes.begin(), sortedTransTypes.end()); in convert_network_type()
1954 if (sortedTransTypes != std::vector<int32_t>{IDnsResolver::TRANSPORT_CELLULAR, in convert_network_type()
1975 static const char* transport_type_to_str(const std::vector<int32_t>& transportTypes) { in transport_type_to_str()
2007 std::lock_guard guard(cache_mutex); in resolv_netconfig_dump()