Add two Netd binder calls to set/get resolver config.
setResolverConfiguration() sets the name servers, search domains,
and resolver parameters.
getResolverInfo() returns the configured information and also the
statistics for each server.
Also includes tests for the new functionality.
BUG: 25731675
Change-Id: Idde486f36bb731f9edd240d62dc1795f8e621fe6
diff --git a/server/NetdNativeService.h b/server/NetdNativeService.h
index 22c81fc..b5c8f69 100644
--- a/server/NetdNativeService.h
+++ b/server/NetdNativeService.h
@@ -42,6 +42,11 @@
override;
binder::Status socketDestroy(const std::vector<UidRange>& uids,
const std::vector<int32_t>& skipUids) override;
+ binder::Status setResolverConfiguration(int32_t netId, const std::vector<std::string>& servers,
+ const std::vector<std::string>& domains, const std::vector<int32_t>& params) override;
+ binder::Status getResolverInfo(int32_t netId, std::vector<std::string>* servers,
+ std::vector<std::string>* domains, std::vector<int32_t>* params,
+ std::vector<int32_t>* stats) override;
};
} // namespace net