/packages/modules/DnsResolver/ |
D | PrivateDnsConfiguration.cpp | 75 int PrivateDnsConfiguration::set(int32_t netId, uint32_t mark, in set() argument 78 LOG(DEBUG) << "PrivateDnsConfiguration::set(" << netId << ", 0x" << std::hex << mark << std::dec in set() 99 mPrivateDnsModes[netId] = PrivateDnsMode::STRICT; in set() 101 mPrivateDnsModes[netId] = PrivateDnsMode::OPPORTUNISTIC; in set() 103 mPrivateDnsModes[netId] = PrivateDnsMode::OFF; in set() 104 mPrivateDnsTransports.erase(netId); in set() 105 resolv_stats_set_servers_for_dot(netId, {}); in set() 106 mPrivateDnsValidateThreads.erase(netId); in set() 115 auto netPair = mPrivateDnsTransports.find(netId); in set() 119 std::tie(netPair, added) = mPrivateDnsTransports.emplace(netId, PrivateDnsTracker()); in set() [all …]
|
D | Dns64Configuration.cpp | 53 void Dns64Configuration::startPrefixDiscovery(unsigned netId) { in startPrefixDiscovery() argument 60 removeDns64Config(netId); in startPrefixDiscovery() 62 Dns64Config cfg(getNextId(), netId); in startPrefixDiscovery() 64 mDns64Configs.emplace(std::make_pair(netId, cfg)); in startPrefixDiscovery() 67 std::thread discovery_thread([this, cfg, netId] { in startPrefixDiscovery() 68 setThreadName(StringPrintf("Nat64Pfx_%u", netId).c_str()); in startPrefixDiscovery() 83 mGetNetworkContextCallback(evalCfg.netId, 0, &netcontext); in startPrefixDiscovery() 108 void Dns64Configuration::stopPrefixDiscovery(unsigned netId) { in stopPrefixDiscovery() argument 110 removeDns64Config(netId); in stopPrefixDiscovery() 114 IPPrefix Dns64Configuration::getPrefix64Locked(unsigned netId) const REQUIRES(mMutex) { in getPrefix64Locked() [all …]
|
D | ResolverController.cpp | 91 it->onNat64PrefixEvent(args.netId, args.added, args.prefixString, args.prefixLength); in sendNat64PrefixEvent() 95 int getDnsInfo(unsigned netId, std::vector<std::string>* servers, std::vector<std::string>* domains, in getDnsInfo() argument 122 netId, &nscount, res_servers, &dcount, res_domains, params, res_stats, in getDnsInfo() 177 [](uint32_t netId, uint32_t uid, android_net_context* netcontext) { in ResolverController() argument 178 gResNetdCallbacks.get_network_context(netId, uid, netcontext); in ResolverController() 182 void ResolverController::destroyNetworkCache(unsigned netId) { in destroyNetworkCache() argument 183 LOG(VERBOSE) << __func__ << ": netId = " << netId; in destroyNetworkCache() 185 resolv_delete_cache_for_net(netId); in destroyNetworkCache() 186 mDns64Configuration.stopPrefixDiscovery(netId); in destroyNetworkCache() 187 gPrivateDnsConfiguration.clear(netId); in destroyNetworkCache() [all …]
|
D | DnsResolverService.cpp | 115 for (auto netId : resolv_list_caches()) { in dump() local 116 dw.println("NetId: %u", netId); in dump() 117 gDnsResolv->resolverCtrl.dump(dw, netId); in dump() 194 .args(resolverParams.netId, resolverParams.servers, resolverParams.domains, in setResolverConfiguration() 207 int32_t netId, std::vector<std::string>* servers, std::vector<std::string>* domains, in getResolverInfo() argument 213 int res = gDnsResolv->resolverCtrl.getResolverInfo(netId, servers, domains, tlsServers, params, in getResolverInfo() 219 ::ndk::ScopedAStatus DnsResolverService::startPrefix64Discovery(int32_t netId) { in startPrefix64Discovery() argument 223 gDnsResolv->resolverCtrl.startPrefix64Discovery(netId); in startPrefix64Discovery() 228 ::ndk::ScopedAStatus DnsResolverService::stopPrefix64Discovery(int32_t netId) { in stopPrefix64Discovery() argument 232 gDnsResolv->resolverCtrl.stopPrefix64Discovery(netId); in stopPrefix64Discovery() [all …]
|
D | Dns64Configuration.h | 55 unsigned netId; member 81 void startPrefixDiscovery(unsigned netId); 82 void stopPrefixDiscovery(unsigned netId); 83 netdutils::IPPrefix getPrefix64(unsigned netId) const; 85 int setPrefix64(unsigned netId, const netdutils::IPPrefix& pfx) EXCLUDES(mMutex); 86 int clearPrefix64(unsigned netId) EXCLUDES(mMutex); 88 void dump(netdutils::DumpWriter& dw, unsigned netId); 93 : discoveryId(pseudoRandomId), netId(network) {} in Dns64Config() 98 const unsigned int netId; member 113 netdutils::IPPrefix getPrefix64Locked(unsigned netId) const REQUIRES(mMutex); [all …]
|
D | ResolverController.h | 47 int getResolverInfo(int32_t netId, std::vector<std::string>* servers, 53 void startPrefix64Discovery(int32_t netId); 54 void stopPrefix64Discovery(int32_t netId); 57 int setPrefix64(unsigned netId, const netdutils::IPPrefix& prefix) { in setPrefix64() argument 58 return mDns64Configuration.setPrefix64(netId, prefix); in setPrefix64() 61 int clearPrefix64(unsigned netId) { return mDns64Configuration.clearPrefix64(netId); } in clearPrefix64() argument 64 int getPrefix64(unsigned netId, netdutils::IPPrefix* prefix); 66 void dump(netdutils::DumpWriter& dw, unsigned netId);
|
D | DnsResolverService.h | 47 int32_t netId, std::vector<std::string>* servers, std::vector<std::string>* domains, 51 ::ndk::ScopedAStatus destroyNetworkCache(int32_t netId) override; 52 ::ndk::ScopedAStatus createNetworkCache(int32_t netId) override; 53 ::ndk::ScopedAStatus flushNetworkCache(int32_t netId) override; 56 ::ndk::ScopedAStatus startPrefix64Discovery(int32_t netId) override; 57 ::ndk::ScopedAStatus stopPrefix64Discovery(int32_t netId) override; 59 ::ndk::ScopedAStatus getPrefix64(int32_t netId, std::string* stringPrefix) override; 60 ::ndk::ScopedAStatus setPrefix64(int32_t netId, const std::string& stringPrefix) override;
|
D | PrivateDnsConfiguration.h | 55 int set(int32_t netId, uint32_t mark, const std::vector<std::string>& servers, 58 PrivateDnsStatus getStatus(unsigned netId) EXCLUDES(mPrivateDnsLock); 60 void clear(unsigned netId) EXCLUDES(mPrivateDnsLock); 67 unsigned netId, uint32_t mark) REQUIRES(mPrivateDnsLock); 69 bool recordPrivateDnsValidation(const DnsTlsServer& server, unsigned netId, bool success); 71 bool needValidateThread(const DnsTlsServer& server, unsigned netId) REQUIRES(mPrivateDnsLock); 72 void cleanValidateThreadTracker(const DnsTlsServer& server, unsigned netId);
|
D | resolv_cache_unit_test.cpp | 157 [[nodiscard]] bool cacheLookup(ResolvCacheStatus expectedCacheStatus, uint32_t netId, in cacheLookup() argument 161 const auto cacheStatus = resolv_cache_lookup(netId, ce.query.data(), ce.query.size(), in cacheLookup() 179 int cacheCreate(uint32_t netId) { in cacheCreate() argument 180 return resolv_create_cache_for_net(netId); in cacheCreate() 183 void cacheDelete(uint32_t netId) { in cacheDelete() argument 184 resolv_delete_cache_for_net(netId); in cacheDelete() 187 int cacheAdd(uint32_t netId, const CacheEntry& ce) { in cacheAdd() argument 188 return resolv_cache_add(netId, ce.query.data(), ce.query.size(), ce.answer.data(), in cacheAdd() 192 int cacheAdd(uint32_t netId, const std::vector<char>& query, const std::vector<char>& answer) { in cacheAdd() argument 193 return resolv_cache_add(netId, query.data(), query.size(), answer.data(), answer.size()); in cacheAdd() [all …]
|
D | DnsProxyListener.cpp | 296 PrivateDnsModes getPrivateDnsModeForMetrics(uint32_t netId) { in getPrivateDnsModeForMetrics() argument 297 switch (gPrivateDnsConfiguration.getStatus(netId).mode) { in getPrivateDnsModeForMetrics() 547 bool getDns64Prefix(unsigned netId, netdutils::IPPrefix* prefix) { in getDns64Prefix() argument 548 return !gDnsResolv->resolverCtrl.getPrefix64(netId, prefix); in getDns64Prefix() 551 std::string makeThreadName(unsigned netId, uint32_t uid) { in makeThreadName() argument 553 return android::base::StringPrintf("Dns_%u_%u", netId, multiuser_get_app_id(uid)); in makeThreadName() 824 unsigned netId = strtoul(argv[7], nullptr, 10); in runCommand() local 825 const bool useLocalNameservers = checkAndClearUseLocalNameserversFlag(&netId); in runCommand() 829 gResNetdCallbacks.get_network_context(netId, uid, &netcontext); in runCommand() 866 unsigned netId; in runCommand() local [all …]
|
D | DnsQueryLog.h | 35 Record(uint32_t netId, uid_t uid, pid_t pid, const std::string& hostname, in Record() 37 : netId(netId), in Record() 43 const uint32_t netId; member
|
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/connectivity/ |
D | ConnectivityFragment.java | 186 public void requestNetworkById(int netId) { in requestNetworkById() argument 187 if (mNetworkCallbacks.get(netId) != null) { in requestNetworkById() 191 Network network = mNetworks.get(netId); in requestNetworkById() 198 mNetworkCallbacks.put(netId, cb); in requestNetworkById() 200 showToast("Requesting Network " + netId); in requestNetworkById() 203 public void releaseNetworkById(int netId) { in releaseNetworkById() argument 204 NetworkByIdCallback cb = mNetworkCallbacks.get(netId); in releaseNetworkById() 207 mNetworkCallbacks.remove(netId); in releaseNetworkById() 208 showToast("Released Network " + netId); in releaseNetworkById() 218 public void bindToNetwork(int netId) { in bindToNetwork() argument [all …]
|
/packages/modules/DnsResolver/tests/dns_metrics_listener/ |
D | dns_metrics_listener.cpp | 35 return std::tie(netId, eventType, returnCode, hostname, ipAddresses, ipAddressesCount) == in operator ==() 36 std::tie(o.netId, o.eventType, o.returnCode, o.hostname, o.ipAddresses, in operator ==() 41 return os << fmt::format("[{}, {}, {}, {}, [{}], {}]", data.netId, data.eventType, in operator <<() 46 ::ndk::ScopedAStatus DnsMetricsListener::onNat64PrefixEvent(int32_t netId, bool added, in onNat64PrefixEvent() argument 51 if (netId == mNetId) mNat64Prefix = added ? prefixString : ""; in onNat64PrefixEvent() 56 int32_t netId, const std::string& ipAddress, const std::string& /*hostname*/, in onPrivateDnsValidationEvent() argument 61 mValidationRecords.insert_or_assign({netId, ipAddress}, validated); in onPrivateDnsValidationEvent() 67 ::ndk::ScopedAStatus DnsMetricsListener::onDnsEvent(int32_t netId, int32_t eventType, in onDnsEvent() argument 73 if (netId == mNetId) { in onDnsEvent() 75 {netId, eventType, returnCode, hostname, ipAddresses, ipAddressesCount}); in onDnsEvent()
|
D | dns_metrics_listener.h | 43 int32_t netId; member 57 DnsMetricsListener(int32_t netId) : mNetId(netId){}; in DnsMetricsListener() argument 60 ::ndk::ScopedAStatus onNat64PrefixEvent(int32_t netId, bool added, 64 ::ndk::ScopedAStatus onPrivateDnsValidationEvent(int32_t netId, const std::string& ipAddress, 68 ::ndk::ScopedAStatus onDnsEvent(int32_t netId, int32_t eventType, int32_t returnCode,
|
D | test_metrics.cpp | 36 ::ndk::ScopedAStatus TestOnDnsEvent::onDnsEvent(int32_t netId, int32_t eventType, in onDnsEvent() argument 58 if (netId != result.netId) continue; in onDnsEvent()
|
/packages/modules/DnsResolver/aidl_api/dnsresolver_aidl_interface/5/android/net/ |
D | IDnsResolver.aidl | 24 …void getResolverInfo(int netId, out @utf8InCpp String[] servers, out @utf8InCpp String[] domains, … in getResolverInfo() argument 25 void startPrefix64Discovery(int netId); in startPrefix64Discovery() argument 26 void stopPrefix64Discovery(int netId); in stopPrefix64Discovery() argument 27 @utf8InCpp String getPrefix64(int netId); in getPrefix64() argument 28 void createNetworkCache(int netId); in createNetworkCache() argument 29 void destroyNetworkCache(int netId); in destroyNetworkCache() argument 31 void flushNetworkCache(int netId); in flushNetworkCache() argument 32 void setPrefix64(int netId, @utf8InCpp String prefix); in setPrefix64() argument
|
/packages/modules/DnsResolver/aidl_api/dnsresolver_aidl_interface/current/android/net/ |
D | IDnsResolver.aidl | 24 …void getResolverInfo(int netId, out @utf8InCpp String[] servers, out @utf8InCpp String[] domains, … in getResolverInfo() argument 25 void startPrefix64Discovery(int netId); in startPrefix64Discovery() argument 26 void stopPrefix64Discovery(int netId); in stopPrefix64Discovery() argument 27 @utf8InCpp String getPrefix64(int netId); in getPrefix64() argument 28 void createNetworkCache(int netId); in createNetworkCache() argument 29 void destroyNetworkCache(int netId); in destroyNetworkCache() argument 31 void flushNetworkCache(int netId); in flushNetworkCache() argument 32 void setPrefix64(int netId, @utf8InCpp String prefix); in setPrefix64() argument
|
/packages/modules/DnsResolver/binder/android/net/ |
D | IDnsResolver.aidl | 100 void getResolverInfo(int netId, out @utf8InCpp String[] servers, in getResolverInfo() argument 109 void startPrefix64Discovery(int netId); in startPrefix64Discovery() argument 116 void stopPrefix64Discovery(int netId); in stopPrefix64Discovery() argument 130 @utf8InCpp String getPrefix64(int netId); in getPrefix64() argument 139 void createNetworkCache(int netId); in createNetworkCache() argument 146 void destroyNetworkCache(int netId); in destroyNetworkCache() argument 172 void flushNetworkCache(int netId); in flushNetworkCache() argument 216 void setPrefix64(int netId, @utf8InCpp String prefix); in setPrefix64() argument
|
/packages/modules/DnsResolver/aidl_api/dnsresolver_aidl_interface/6/android/net/ |
D | IDnsResolver.aidl | 24 …void getResolverInfo(int netId, out @utf8InCpp String[] servers, out @utf8InCpp String[] domains, … in getResolverInfo() argument 25 void startPrefix64Discovery(int netId); in startPrefix64Discovery() argument 26 void stopPrefix64Discovery(int netId); in stopPrefix64Discovery() argument 27 @utf8InCpp String getPrefix64(int netId); in getPrefix64() argument 28 void createNetworkCache(int netId); in createNetworkCache() argument 29 void destroyNetworkCache(int netId); in destroyNetworkCache() argument 31 void flushNetworkCache(int netId); in flushNetworkCache() argument 32 void setPrefix64(int netId, @utf8InCpp String prefix); in setPrefix64() argument
|
/packages/modules/DnsResolver/aidl_api/dnsresolver_aidl_interface/4/android/net/ |
D | IDnsResolver.aidl | 24 …void getResolverInfo(int netId, out @utf8InCpp String[] servers, out @utf8InCpp String[] domains, … in getResolverInfo() argument 25 void startPrefix64Discovery(int netId); in startPrefix64Discovery() argument 26 void stopPrefix64Discovery(int netId); in stopPrefix64Discovery() argument 27 @utf8InCpp String getPrefix64(int netId); in getPrefix64() argument 28 void createNetworkCache(int netId); in createNetworkCache() argument 29 void destroyNetworkCache(int netId); in destroyNetworkCache() argument 31 void flushNetworkCache(int netId); in flushNetworkCache() argument
|
/packages/modules/DnsResolver/aidl_api/dnsresolver_aidl_interface/1/android/net/ |
D | IDnsResolver.aidl | 6 …void getResolverInfo(int netId, out @utf8InCpp String[] servers, out @utf8InCpp String[] domains, … in getResolverInfo() argument 7 void startPrefix64Discovery(int netId); in startPrefix64Discovery() argument 8 void stopPrefix64Discovery(int netId); in stopPrefix64Discovery() argument 9 @utf8InCpp String getPrefix64(int netId); in getPrefix64() argument 10 void createNetworkCache(int netId); in createNetworkCache() argument 11 void destroyNetworkCache(int netId); in destroyNetworkCache() argument
|
/packages/modules/DnsResolver/aidl_api/dnsresolver_aidl_interface/2/android/net/ |
D | IDnsResolver.aidl | 23 …void getResolverInfo(int netId, out @utf8InCpp String[] servers, out @utf8InCpp String[] domains, … in getResolverInfo() argument 24 void startPrefix64Discovery(int netId); in startPrefix64Discovery() argument 25 void stopPrefix64Discovery(int netId); in stopPrefix64Discovery() argument 26 @utf8InCpp String getPrefix64(int netId); in getPrefix64() argument 27 void createNetworkCache(int netId); in createNetworkCache() argument 28 void destroyNetworkCache(int netId); in destroyNetworkCache() argument
|
/packages/modules/DnsResolver/aidl_api/dnsresolver_aidl_interface/3/android/net/ |
D | IDnsResolver.aidl | 6 …void getResolverInfo(int netId, out @utf8InCpp String[] servers, out @utf8InCpp String[] domains, … in getResolverInfo() argument 7 void startPrefix64Discovery(int netId); in startPrefix64Discovery() argument 8 void stopPrefix64Discovery(int netId); in stopPrefix64Discovery() argument 9 @utf8InCpp String getPrefix64(int netId); in getPrefix64() argument 10 void createNetworkCache(int netId); in createNetworkCache() argument 11 void destroyNetworkCache(int netId); in destroyNetworkCache() argument
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/ |
D | AddWifiNetworkTask.java | 133 int netId = tryAddingNetwork(wifiConf); in connectToProvidedNetwork() local 135 if (netId == ADD_NETWORK_FAIL) { in connectToProvidedNetwork() 142 mWifiManager.enableNetwork(netId, true); in connectToProvidedNetwork() 159 int netId = mWifiManager.addNetwork(wifiConf); in tryAddingNetwork() local 163 while(netId == -1 && retriesLeft > 0) { in tryAddingNetwork() 172 netId = mWifiManager.addNetwork(wifiConf); in tryAddingNetwork() 174 return netId; in tryAddingNetwork()
|
/packages/modules/DnsResolver/tests/dns_responder/ |
D | dns_responder_client_ndk.cpp | 58 int netId, const std::vector<int>& params, const std::vector<std::string>& servers, in makeResolverParamsParcel() argument 63 paramsParcel.netId = netId; in makeResolverParamsParcel() 94 unsigned netId, std::vector<std::string>* servers, in GetResolverInfo() argument 103 auto rv = dnsResolverService->getResolverInfo(netId, servers, domains, tlsServers, ¶ms32, in GetResolverInfo()
|