Lines Matching refs:netid
986 explicit NetConfig(unsigned netId) : netid(netId) { in NetConfig()
992 const unsigned netid; member
1013 static Cache* find_named_cache_locked(unsigned netid) REQUIRES(cache_mutex);
1061 void _resolv_cache_query_failed(unsigned netid, const void* query, int querylen, uint32_t flags) { in _resolv_cache_query_failed() argument
1072 Cache* cache = find_named_cache_locked(netid); in _resolv_cache_query_failed()
1188 static NetConfig* find_netconfig_locked(unsigned netid) REQUIRES(cache_mutex);
1190 ResolvCacheStatus resolv_cache_lookup(unsigned netid, const void* query, int querylen, void* answer, in resolv_cache_lookup() argument
1216 Cache* cache = find_named_cache_locked(netid); in resolv_cache_lookup()
1239 [netid, &cache, &key]() REQUIRES(cache_mutex) { in resolv_cache_lookup()
1241 cache = find_named_cache_locked(netid); in resolv_cache_lookup()
1248 NetConfig* info = find_netconfig_locked(netid); in resolv_cache_lookup()
1290 int resolv_cache_add(unsigned netid, const void* query, int querylen, const void* answer, in resolv_cache_add() argument
1307 cache = find_named_cache_locked(netid); in resolv_cache_add()
1352 bool resolv_gethostbyaddr_from_cache(unsigned netid, char domain_name[], size_t domain_name_size, in resolv_gethostbyaddr_from_cache() argument
1378 cache = find_named_cache_locked(netid); in resolv_gethostbyaddr_from_cache()
1446 bool resolv_has_nameservers(unsigned netid) { in resolv_has_nameservers() argument
1448 NetConfig* info = find_netconfig_locked(netid); in resolv_has_nameservers()
1452 int resolv_create_cache_for_net(unsigned netid) { in resolv_create_cache_for_net() argument
1454 if (sNetConfigMap.find(netid) != sNetConfigMap.end()) { in resolv_create_cache_for_net()
1455 LOG(ERROR) << __func__ << ": Cache is already created, netId: " << netid; in resolv_create_cache_for_net()
1459 sNetConfigMap[netid] = std::make_unique<NetConfig>(netid); in resolv_create_cache_for_net()
1463 void resolv_delete_cache_for_net(unsigned netid) { in resolv_delete_cache_for_net() argument
1465 sNetConfigMap.erase(netid); in resolv_delete_cache_for_net()
1468 int resolv_flush_cache_for_net(unsigned netid) { in resolv_flush_cache_for_net() argument
1471 NetConfig* netconfig = find_netconfig_locked(netid); in resolv_flush_cache_for_net()
1492 static Cache* find_named_cache_locked(unsigned netid) { in find_named_cache_locked() argument
1493 NetConfig* info = find_netconfig_locked(netid); in find_named_cache_locked()
1498 static NetConfig* find_netconfig_locked(unsigned netid) { in find_netconfig_locked() argument
1499 if (auto it = sNetConfigMap.find(netid); it != sNetConfigMap.end()) { in find_netconfig_locked()
1516 android::net::NetworkType resolv_get_network_types_for_net(unsigned netid) { in resolv_get_network_types_for_net() argument
1518 NetConfig* netconfig = find_netconfig_locked(netid); in resolv_get_network_types_for_net()
1568 std::vector<std::string> getCustomizedTableByName(const size_t netid, const char* hostname) { in getCustomizedTableByName() argument
1570 NetConfig* netconfig = find_netconfig_locked(netid); in getCustomizedTableByName()
1582 int resolv_set_nameservers(unsigned netid, const std::vector<std::string>& servers, in resolv_set_nameservers() argument
1589 LOG(INFO) << __func__ << ": netId = " << netid << ", numservers = " << numservers; in resolv_set_nameservers()
1601 NetConfig* netconfig = find_netconfig_locked(netid); in resolv_set_nameservers()
1613 LOG(INFO) << __func__ << ": netid = " << netid in resolv_set_nameservers()
1635 LOG(WARNING) << __func__ << ": netid = " << netid << ", failed to set dns stats"; in resolv_set_nameservers()
1646 LOG(WARNING) << __func__ << ": netid = " << netid in resolv_set_nameservers()
1681 LOG(INFO) << __func__ << ": netid=" << statp->netid; in resolv_populate_res_for_net()
1684 NetConfig* info = find_netconfig_locked(statp->netid); in resolv_populate_res_for_net()
1726 int android_net_res_stats_get_info_for_net(unsigned netid, int* nscount, in android_net_res_stats_get_info_for_net() argument
1732 NetConfig* info = find_netconfig_locked(netid); 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() argument
1762 NetConfig* netconfig = find_netconfig_locked(netid); in resolv_cache_dump_subsampling_map()
1779 uint32_t resolv_cache_get_subsampling_denom(unsigned netid, int return_code) { in resolv_cache_get_subsampling_denom() argument
1781 NetConfig* netconfig = find_netconfig_locked(netid); in resolv_cache_get_subsampling_denom()
1795 int resolv_cache_get_resolver_stats(unsigned netid, res_params* params, res_stats stats[MAXNS], in resolv_cache_get_resolver_stats() argument
1798 NetConfig* info = find_netconfig_locked(netid); in resolv_cache_get_resolver_stats()
1824 void resolv_cache_add_resolver_stats_sample(unsigned netid, int revision_id, in resolv_cache_add_resolver_stats_sample() argument
1830 NetConfig* info = find_netconfig_locked(netid); in resolv_cache_add_resolver_stats_sample()
1843 bool has_named_cache(unsigned netid) { in has_named_cache() argument
1845 return find_named_cache_locked(netid) != nullptr; in has_named_cache()
1848 int resolv_cache_get_expiration(unsigned netid, const std::vector<char>& query, in resolv_cache_get_expiration() argument
1862 if (cache = find_named_cache_locked(netid); cache == nullptr) { in resolv_cache_get_expiration()
1863 LOG(WARNING) << __func__ << ": cache not created in the network " << netid; 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() argument
1884 const auto info = find_netconfig_locked(netid); in resolv_stats_set_servers_for_dot()
1895 LOG(WARNING) << __func__ << ": netid = " << netid << ", failed to set dns stats"; in resolv_stats_set_servers_for_dot()
1902 bool resolv_stats_add(unsigned netid, const android::netdutils::IPSockAddr& server, in resolv_stats_add() argument
1907 if (const auto info = find_netconfig_locked(netid); info != nullptr) { in resolv_stats_add()
2006 void resolv_netconfig_dump(DumpWriter& dw, unsigned netid) { in resolv_netconfig_dump() argument
2008 if (const auto info = find_netconfig_locked(netid); info != nullptr) { in resolv_netconfig_dump()