diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2021-04-08 00:30:11 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2021-04-08 00:30:11 +0000 |
commit | 1953d973c94b01623d3e3f507926f2b1d652717f (patch) | |
tree | f51299313d4220c06f6060d3f0ff803a75856854 | |
parent | 2b5d4ac41afe929f3d6adc5cc591cadbdb385f73 (diff) | |
parent | 12849103c0422b3fad0e1bbe793f236e8d6754a5 (diff) | |
download | DnsResolver-1953d973c94b01623d3e3f507926f2b1d652717f.tar.gz |
Snap for 7266504 from 12849103c0422b3fad0e1bbe793f236e8d6754a5 to mainline-tethering-release
Change-Id: I6c2275d25705e3b8491770e5edd10d095c4a0aed
13 files changed, 279 insertions, 3 deletions
@@ -30,6 +30,10 @@ license { ], } +// Whether to enable the targets in this file that require rust toolchain. +// Set to false in branches like mainline-prod where rust toolchain isn't supported. +support_rust_toolchain = false + cc_library_headers { name: "libnetd_resolv_headers", export_include_dirs: ["include"], @@ -51,7 +55,7 @@ cc_library_headers { ], } -dnsresolver_aidl_interface_lateststable_version = "V7" +dnsresolver_aidl_interface_lateststable_version = "V8" cc_library_static { name: "dnsresolver_aidl_interface-lateststable-ndk_platform", @@ -102,7 +106,11 @@ aidl_interface { "5", "6", "7", + "8", ], + dumpapi: { + no_license: true, + }, } cc_defaults { diff --git a/aidl_api/dnsresolver_aidl_interface/8/.hash b/aidl_api/dnsresolver_aidl_interface/8/.hash new file mode 100644 index 00000000..535f6f78 --- /dev/null +++ b/aidl_api/dnsresolver_aidl_interface/8/.hash @@ -0,0 +1 @@ +e6ef3246f1613151e9196c283abe55a544514c21 diff --git a/aidl_api/dnsresolver_aidl_interface/8/android/net/IDnsResolver.aidl b/aidl_api/dnsresolver_aidl_interface/8/android/net/IDnsResolver.aidl new file mode 100644 index 00000000..a8b3b86d --- /dev/null +++ b/aidl_api/dnsresolver_aidl_interface/8/android/net/IDnsResolver.aidl @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m <name>-update-api`. +// +// You must not make a backward incompatible change to any AIDL file 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); + void setPrefix64(int netId, @utf8InCpp String prefix); + void registerUnsolicitedEventListener(android.net.resolv.aidl.IDnsResolverUnsolicitedEventListener listener); + 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; + const int TRANSPORT_USB = 8; +} diff --git a/aidl_api/dnsresolver_aidl_interface/8/android/net/ResolverHostsParcel.aidl b/aidl_api/dnsresolver_aidl_interface/8/android/net/ResolverHostsParcel.aidl new file mode 100644 index 00000000..c24eb619 --- /dev/null +++ b/aidl_api/dnsresolver_aidl_interface/8/android/net/ResolverHostsParcel.aidl @@ -0,0 +1,24 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m <name>-update-api`. +// +// You must not make a backward incompatible change to any AIDL file 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 = ""; +} diff --git a/aidl_api/dnsresolver_aidl_interface/8/android/net/ResolverOptionsParcel.aidl b/aidl_api/dnsresolver_aidl_interface/8/android/net/ResolverOptionsParcel.aidl new file mode 100644 index 00000000..e806d040 --- /dev/null +++ b/aidl_api/dnsresolver_aidl_interface/8/android/net/ResolverOptionsParcel.aidl @@ -0,0 +1,25 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m <name>-update-api`. +// +// You must not make a backward incompatible change to any AIDL file 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 ResolverOptionsParcel { + android.net.ResolverHostsParcel[] hosts = {}; + int tcMode = 0; + boolean enforceDnsUid = false; +} diff --git a/aidl_api/dnsresolver_aidl_interface/8/android/net/ResolverParamsParcel.aidl b/aidl_api/dnsresolver_aidl_interface/8/android/net/ResolverParamsParcel.aidl new file mode 100644 index 00000000..8fec710c --- /dev/null +++ b/aidl_api/dnsresolver_aidl_interface/8/android/net/ResolverParamsParcel.aidl @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m <name>-update-api`. +// +// You must not make a backward incompatible change to any AIDL file 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 ResolverParamsParcel { + int netId; + int sampleValiditySeconds; + int successThreshold; + int minSamples; + int maxSamples; + int baseTimeoutMsec; + int retryCount; + @utf8InCpp String[] servers; + @utf8InCpp String[] domains; + @utf8InCpp String tlsName; + @utf8InCpp String[] tlsServers; + @utf8InCpp String[] tlsFingerprints = {}; + @utf8InCpp String caCertificate = ""; + int tlsConnectTimeoutMs = 0; + android.net.ResolverOptionsParcel resolverOptions; + int[] transportTypes = {}; +} diff --git a/aidl_api/dnsresolver_aidl_interface/8/android/net/resolv/aidl/DnsHealthEventParcel.aidl b/aidl_api/dnsresolver_aidl_interface/8/android/net/resolv/aidl/DnsHealthEventParcel.aidl new file mode 100644 index 00000000..d32be919 --- /dev/null +++ b/aidl_api/dnsresolver_aidl_interface/8/android/net/resolv/aidl/DnsHealthEventParcel.aidl @@ -0,0 +1,26 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m <name>-update-api`. +// +// You must not make a backward incompatible change to any AIDL file 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.resolv.aidl; +/* @hide */ +@JavaDerive(toString=true) +parcelable DnsHealthEventParcel { + int netId; + int healthResult; + int[] successRttMicros; +} diff --git a/aidl_api/dnsresolver_aidl_interface/8/android/net/resolv/aidl/IDnsResolverUnsolicitedEventListener.aidl b/aidl_api/dnsresolver_aidl_interface/8/android/net/resolv/aidl/IDnsResolverUnsolicitedEventListener.aidl new file mode 100644 index 00000000..d8accd1f --- /dev/null +++ b/aidl_api/dnsresolver_aidl_interface/8/android/net/resolv/aidl/IDnsResolverUnsolicitedEventListener.aidl @@ -0,0 +1,31 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m <name>-update-api`. +// +// You must not make a backward incompatible change to any AIDL file 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.resolv.aidl; +/* @hide */ +interface IDnsResolverUnsolicitedEventListener { + oneway void onDnsHealthEvent(in android.net.resolv.aidl.DnsHealthEventParcel dnsHealthEvent); + oneway void onNat64PrefixEvent(in android.net.resolv.aidl.Nat64PrefixEventParcel nat64PrefixEvent); + oneway void onPrivateDnsValidationEvent(in android.net.resolv.aidl.PrivateDnsValidationEventParcel privateDnsValidationEvent); + const int DNS_HEALTH_RESULT_OK = 0; + const int DNS_HEALTH_RESULT_TIMEOUT = 255; + const int PREFIX_OPERATION_ADDED = 1; + const int PREFIX_OPERATION_REMOVED = 2; + const int VALIDATION_RESULT_SUCCESS = 1; + const int VALIDATION_RESULT_FAILURE = 2; +} diff --git a/aidl_api/dnsresolver_aidl_interface/8/android/net/resolv/aidl/Nat64PrefixEventParcel.aidl b/aidl_api/dnsresolver_aidl_interface/8/android/net/resolv/aidl/Nat64PrefixEventParcel.aidl new file mode 100644 index 00000000..2daccb0e --- /dev/null +++ b/aidl_api/dnsresolver_aidl_interface/8/android/net/resolv/aidl/Nat64PrefixEventParcel.aidl @@ -0,0 +1,27 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m <name>-update-api`. +// +// You must not make a backward incompatible change to any AIDL file 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.resolv.aidl; +/* @hide */ +@JavaDerive(toString=true) +parcelable Nat64PrefixEventParcel { + int netId; + int prefixOperation; + @utf8InCpp String prefixAddress; + int prefixLength; +} diff --git a/aidl_api/dnsresolver_aidl_interface/8/android/net/resolv/aidl/PrivateDnsValidationEventParcel.aidl b/aidl_api/dnsresolver_aidl_interface/8/android/net/resolv/aidl/PrivateDnsValidationEventParcel.aidl new file mode 100644 index 00000000..e66e21c1 --- /dev/null +++ b/aidl_api/dnsresolver_aidl_interface/8/android/net/resolv/aidl/PrivateDnsValidationEventParcel.aidl @@ -0,0 +1,27 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m <name>-update-api`. +// +// You must not make a backward incompatible change to any AIDL file 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.resolv.aidl; +/* @hide */ +@JavaDerive(toString=true) +parcelable PrivateDnsValidationEventParcel { + int netId; + @utf8InCpp String ipAddress; + @utf8InCpp String hostname; + int validation; +} diff --git a/aidl_api/dnsresolver_aidl_interface/current/android/net/IDnsResolver.aidl b/aidl_api/dnsresolver_aidl_interface/current/android/net/IDnsResolver.aidl index 1f80545f..a8b3b86d 100644 --- a/aidl_api/dnsresolver_aidl_interface/current/android/net/IDnsResolver.aidl +++ b/aidl_api/dnsresolver_aidl_interface/current/android/net/IDnsResolver.aidl @@ -63,4 +63,5 @@ interface IDnsResolver { const int TRANSPORT_WIFI_AWARE = 5; const int TRANSPORT_LOWPAN = 6; const int TRANSPORT_TEST = 7; + const int TRANSPORT_USB = 8; } diff --git a/binder/android/net/IDnsResolver.aidl b/binder/android/net/IDnsResolver.aidl index 33316e3d..8ac13482 100644 --- a/binder/android/net/IDnsResolver.aidl +++ b/binder/android/net/IDnsResolver.aidl @@ -196,6 +196,7 @@ interface IDnsResolver { const int TRANSPORT_WIFI_AWARE = 5; const int TRANSPORT_LOWPAN = 6; const int TRANSPORT_TEST = 7; + const int TRANSPORT_USB = 8; /** * Sets the NAT64 prefix for the given network. diff --git a/tests/Android.bp b/tests/Android.bp index b6e82a38..41ea74d1 100644 --- a/tests/Android.bp +++ b/tests/Android.bp @@ -98,7 +98,6 @@ cc_test { ], shared_libs: [ "libbinder_ndk", - "libssl", ], static_libs: [ "dnsresolver_aidl_interface-lateststable-ndk_platform", @@ -110,6 +109,7 @@ cc_test { "libnetd_test_resolv_utils", "libnetdutils", "libprotobuf-cpp-lite", + "libssl", "netd_aidl_interface-lateststable-ndk_platform", "netd_event_listener_interface-lateststable-ndk_platform", "server_configurable_flags", @@ -225,7 +225,6 @@ cc_test { ], shared_libs: [ "libbinder_ndk", - "libssl", ], static_libs: [ "dnsresolver_aidl_interface-lateststable-ndk_platform", @@ -239,6 +238,7 @@ cc_test { "libnetd_test_resolv_utils", "libnetdutils", "libprotobuf-cpp-lite", + "libssl", "libstatslog_resolv", "libstatspush_compat", "libsysutils", |