Loading Android.bp +11 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ aidl_interface { srcs: [ "binder/android/net/IDnsResolver.aidl", "binder/android/net/ResolverHostsParcel.aidl", "binder/android/net/ResolverExperimentalOptionsParcel.aidl", "binder/android/net/ResolverOptionsParcel.aidl", "binder/android/net/ResolverParamsParcel.aidl", ], imports: [ Loading @@ -37,6 +37,7 @@ aidl_interface { "1", "2", "3", "4", ], } Loading Loading @@ -217,11 +218,18 @@ filegroup { // TODO: Move this test to tests/ cc_test { name: "resolv_unit_test", test_suites: ["device-tests", "mts"], test_suites: [ "device-tests", "mts", ], require_root: true, // TODO: Drop root privileges and make it be an real unit test. // TODO: Remove resolv_test_mts_coverage_defaults after mts coverage switched to 64-bit device. defaults: ["netd_defaults", "resolv_test_defaults", "resolv_test_mts_coverage_defaults"], defaults: [ "netd_defaults", "resolv_test_defaults", "resolv_test_mts_coverage_defaults", ], srcs: [ "resolv_cache_unit_test.cpp", "resolv_callback_unit_test.cpp", Loading ResolverController.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -231,9 +231,9 @@ int ResolverController::setResolverConfiguration(const ResolverParamsParcel& res res_params.base_timeout_msec = resolverParams.baseTimeoutMsec; res_params.retry_count = resolverParams.retryCount; return resolv_set_nameservers( resolverParams.netId, resolverParams.servers, resolverParams.domains, res_params, resolverParams.experimentalOptions, resolverParams.transportTypes); return resolv_set_nameservers(resolverParams.netId, resolverParams.servers, resolverParams.domains, res_params, resolverParams.resolverOptions, resolverParams.transportTypes); } int ResolverController::getResolverInfo(int32_t netId, std::vector<std::string>* servers, Loading aidl_api/dnsresolver_aidl_interface/4/.hash 0 → 100644 +1 −0 Original line number Diff line number Diff line 012d220dd2a6736ed40b8653351386cece8458f7 aidl_api/dnsresolver_aidl_interface/4/android/net/IDnsResolver.aidl 0 → 100644 +63 −0 Original line number Diff line number Diff line /////////////////////////////////////////////////////////////////////////////// // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // /////////////////////////////////////////////////////////////////////////////// // This file is a snapshot of an AIDL interface (or parcelable). Do not try to // edit this file. It looks like you are doing that because you have modified // an AIDL interface in a backward-incompatible way, e.g., deleting a function // from an interface or a field from a parcelable and it broke the build. That // breakage is intended. // // You must not make a backward incompatible changes to the AIDL files built // with the aidl_interface module type with versions property set. The module // type is used to build AIDL files in a way that they can be used across // independently updatable components of the system. If a device is shipped // with such a backward incompatible change, it has a high risk of breaking // later when a module using the interface is updated, e.g., Mainline modules. package android.net; /* @hide */ interface IDnsResolver { boolean isAlive(); void registerEventListener(android.net.metrics.INetdEventListener listener); void setResolverConfiguration(in android.net.ResolverParamsParcel resolverParams); void getResolverInfo(int netId, out @utf8InCpp String[] servers, out @utf8InCpp String[] domains, out @utf8InCpp String[] tlsServers, out int[] params, out int[] stats, out int[] wait_for_pending_req_timeout_count); void startPrefix64Discovery(int netId); void stopPrefix64Discovery(int netId); @utf8InCpp String getPrefix64(int netId); void createNetworkCache(int netId); void destroyNetworkCache(int netId); void setLogSeverity(int logSeverity); void flushNetworkCache(int netId); const int RESOLVER_PARAMS_SAMPLE_VALIDITY = 0; const int RESOLVER_PARAMS_SUCCESS_THRESHOLD = 1; const int RESOLVER_PARAMS_MIN_SAMPLES = 2; const int RESOLVER_PARAMS_MAX_SAMPLES = 3; const int RESOLVER_PARAMS_BASE_TIMEOUT_MSEC = 4; const int RESOLVER_PARAMS_RETRY_COUNT = 5; const int RESOLVER_PARAMS_COUNT = 6; const int RESOLVER_STATS_SUCCESSES = 0; const int RESOLVER_STATS_ERRORS = 1; const int RESOLVER_STATS_TIMEOUTS = 2; const int RESOLVER_STATS_INTERNAL_ERRORS = 3; const int RESOLVER_STATS_RTT_AVG = 4; const int RESOLVER_STATS_LAST_SAMPLE_TIME = 5; const int RESOLVER_STATS_USABLE = 6; const int RESOLVER_STATS_COUNT = 7; const int DNS_RESOLVER_LOG_VERBOSE = 0; const int DNS_RESOLVER_LOG_DEBUG = 1; const int DNS_RESOLVER_LOG_INFO = 2; const int DNS_RESOLVER_LOG_WARNING = 3; const int DNS_RESOLVER_LOG_ERROR = 4; const int TC_MODE_DEFAULT = 0; const int TC_MODE_UDP_TCP = 1; const int TRANSPORT_UNKNOWN = -1; const int TRANSPORT_CELLULAR = 0; const int TRANSPORT_WIFI = 1; const int TRANSPORT_BLUETOOTH = 2; const int TRANSPORT_ETHERNET = 3; const int TRANSPORT_VPN = 4; const int TRANSPORT_WIFI_AWARE = 5; const int TRANSPORT_LOWPAN = 6; const int TRANSPORT_TEST = 7; } aidl_api/dnsresolver_aidl_interface/4/android/net/ResolverHostsParcel.aidl 0 → 100644 +23 −0 Original line number Diff line number Diff line /////////////////////////////////////////////////////////////////////////////// // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // /////////////////////////////////////////////////////////////////////////////// // This file is a snapshot of an AIDL interface (or parcelable). Do not try to // edit this file. It looks like you are doing that because you have modified // an AIDL interface in a backward-incompatible way, e.g., deleting a function // from an interface or a field from a parcelable and it broke the build. That // breakage is intended. // // You must not make a backward incompatible changes to the AIDL files built // with the aidl_interface module type with versions property set. The module // type is used to build AIDL files in a way that they can be used across // independently updatable components of the system. If a device is shipped // with such a backward incompatible change, it has a high risk of breaking // later when a module using the interface is updated, e.g., Mainline modules. package android.net; /* @hide */ parcelable ResolverHostsParcel { @utf8InCpp String ipAddr; @utf8InCpp String hostName = ""; } Loading
Android.bp +11 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ aidl_interface { srcs: [ "binder/android/net/IDnsResolver.aidl", "binder/android/net/ResolverHostsParcel.aidl", "binder/android/net/ResolverExperimentalOptionsParcel.aidl", "binder/android/net/ResolverOptionsParcel.aidl", "binder/android/net/ResolverParamsParcel.aidl", ], imports: [ Loading @@ -37,6 +37,7 @@ aidl_interface { "1", "2", "3", "4", ], } Loading Loading @@ -217,11 +218,18 @@ filegroup { // TODO: Move this test to tests/ cc_test { name: "resolv_unit_test", test_suites: ["device-tests", "mts"], test_suites: [ "device-tests", "mts", ], require_root: true, // TODO: Drop root privileges and make it be an real unit test. // TODO: Remove resolv_test_mts_coverage_defaults after mts coverage switched to 64-bit device. defaults: ["netd_defaults", "resolv_test_defaults", "resolv_test_mts_coverage_defaults"], defaults: [ "netd_defaults", "resolv_test_defaults", "resolv_test_mts_coverage_defaults", ], srcs: [ "resolv_cache_unit_test.cpp", "resolv_callback_unit_test.cpp", Loading
ResolverController.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -231,9 +231,9 @@ int ResolverController::setResolverConfiguration(const ResolverParamsParcel& res res_params.base_timeout_msec = resolverParams.baseTimeoutMsec; res_params.retry_count = resolverParams.retryCount; return resolv_set_nameservers( resolverParams.netId, resolverParams.servers, resolverParams.domains, res_params, resolverParams.experimentalOptions, resolverParams.transportTypes); return resolv_set_nameservers(resolverParams.netId, resolverParams.servers, resolverParams.domains, res_params, resolverParams.resolverOptions, resolverParams.transportTypes); } int ResolverController::getResolverInfo(int32_t netId, std::vector<std::string>* servers, Loading
aidl_api/dnsresolver_aidl_interface/4/.hash 0 → 100644 +1 −0 Original line number Diff line number Diff line 012d220dd2a6736ed40b8653351386cece8458f7
aidl_api/dnsresolver_aidl_interface/4/android/net/IDnsResolver.aidl 0 → 100644 +63 −0 Original line number Diff line number Diff line /////////////////////////////////////////////////////////////////////////////// // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // /////////////////////////////////////////////////////////////////////////////// // This file is a snapshot of an AIDL interface (or parcelable). Do not try to // edit this file. It looks like you are doing that because you have modified // an AIDL interface in a backward-incompatible way, e.g., deleting a function // from an interface or a field from a parcelable and it broke the build. That // breakage is intended. // // You must not make a backward incompatible changes to the AIDL files built // with the aidl_interface module type with versions property set. The module // type is used to build AIDL files in a way that they can be used across // independently updatable components of the system. If a device is shipped // with such a backward incompatible change, it has a high risk of breaking // later when a module using the interface is updated, e.g., Mainline modules. package android.net; /* @hide */ interface IDnsResolver { boolean isAlive(); void registerEventListener(android.net.metrics.INetdEventListener listener); void setResolverConfiguration(in android.net.ResolverParamsParcel resolverParams); void getResolverInfo(int netId, out @utf8InCpp String[] servers, out @utf8InCpp String[] domains, out @utf8InCpp String[] tlsServers, out int[] params, out int[] stats, out int[] wait_for_pending_req_timeout_count); void startPrefix64Discovery(int netId); void stopPrefix64Discovery(int netId); @utf8InCpp String getPrefix64(int netId); void createNetworkCache(int netId); void destroyNetworkCache(int netId); void setLogSeverity(int logSeverity); void flushNetworkCache(int netId); const int RESOLVER_PARAMS_SAMPLE_VALIDITY = 0; const int RESOLVER_PARAMS_SUCCESS_THRESHOLD = 1; const int RESOLVER_PARAMS_MIN_SAMPLES = 2; const int RESOLVER_PARAMS_MAX_SAMPLES = 3; const int RESOLVER_PARAMS_BASE_TIMEOUT_MSEC = 4; const int RESOLVER_PARAMS_RETRY_COUNT = 5; const int RESOLVER_PARAMS_COUNT = 6; const int RESOLVER_STATS_SUCCESSES = 0; const int RESOLVER_STATS_ERRORS = 1; const int RESOLVER_STATS_TIMEOUTS = 2; const int RESOLVER_STATS_INTERNAL_ERRORS = 3; const int RESOLVER_STATS_RTT_AVG = 4; const int RESOLVER_STATS_LAST_SAMPLE_TIME = 5; const int RESOLVER_STATS_USABLE = 6; const int RESOLVER_STATS_COUNT = 7; const int DNS_RESOLVER_LOG_VERBOSE = 0; const int DNS_RESOLVER_LOG_DEBUG = 1; const int DNS_RESOLVER_LOG_INFO = 2; const int DNS_RESOLVER_LOG_WARNING = 3; const int DNS_RESOLVER_LOG_ERROR = 4; const int TC_MODE_DEFAULT = 0; const int TC_MODE_UDP_TCP = 1; const int TRANSPORT_UNKNOWN = -1; const int TRANSPORT_CELLULAR = 0; const int TRANSPORT_WIFI = 1; const int TRANSPORT_BLUETOOTH = 2; const int TRANSPORT_ETHERNET = 3; const int TRANSPORT_VPN = 4; const int TRANSPORT_WIFI_AWARE = 5; const int TRANSPORT_LOWPAN = 6; const int TRANSPORT_TEST = 7; }
aidl_api/dnsresolver_aidl_interface/4/android/net/ResolverHostsParcel.aidl 0 → 100644 +23 −0 Original line number Diff line number Diff line /////////////////////////////////////////////////////////////////////////////// // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // /////////////////////////////////////////////////////////////////////////////// // This file is a snapshot of an AIDL interface (or parcelable). Do not try to // edit this file. It looks like you are doing that because you have modified // an AIDL interface in a backward-incompatible way, e.g., deleting a function // from an interface or a field from a parcelable and it broke the build. That // breakage is intended. // // You must not make a backward incompatible changes to the AIDL files built // with the aidl_interface module type with versions property set. The module // type is used to build AIDL files in a way that they can be used across // independently updatable components of the system. If a device is shipped // with such a backward incompatible change, it has a high risk of breaking // later when a module using the interface is updated, e.g., Mainline modules. package android.net; /* @hide */ parcelable ResolverHostsParcel { @utf8InCpp String ipAddr; @utf8InCpp String hostName = ""; }