Loading dns_responder/dns_responder_client.cpp +4 −0 Original line number Original line Diff line number Diff line Loading @@ -15,11 +15,15 @@ */ */ #define LOG_TAG "dns_responder_client" #define LOG_TAG "dns_responder_client" #include "dns_responder_client.h" #include "dns_responder_client.h" #include <android-base/stringprintf.h> #include <android-base/stringprintf.h> #include <utils/Log.h> #include <utils/Log.h> #include "NetdClient.h" #include "binder/IServiceManager.h" // TODO: make this dynamic and stop depending on implementation details. // TODO: make this dynamic and stop depending on implementation details. #define TEST_OEM_NETWORK "oem29" #define TEST_OEM_NETWORK "oem29" #define TEST_NETID 30 #define TEST_NETID 30 Loading dns_responder/dns_responder_client.h +0 −7 Original line number Original line Diff line number Diff line Loading @@ -22,15 +22,8 @@ #include <string> #include <string> #include <vector> #include <vector> #include <cutils/sockets.h> #include <private/android_filesystem_config.h> #include <utils/StrongPointer.h> #include "NetdClient.h" #include "android/net/IDnsResolver.h" #include "android/net/IDnsResolver.h" #include "android/net/INetd.h" #include "android/net/INetd.h" #include "binder/IServiceManager.h" #include "dns_responder.h" #include "dns_responder.h" inline const std::vector<std::string> kDefaultServers = {"127.0.0.3"}; inline const std::vector<std::string> kDefaultServers = {"127.0.0.3"}; Loading resolver_test.cpp +16 −19 Original line number Original line Diff line number Diff line Loading @@ -17,17 +17,27 @@ #define LOG_TAG "resolv_integration_test" #define LOG_TAG "resolv_integration_test" #include <android-base/parseint.h> #include <android-base/stringprintf.h> #include <android-base/unique_fd.h> #include <android/multinetwork.h> // ResNsendFlags #include <arpa/inet.h> #include <arpa/inet.h> #include <arpa/nameser.h> #include <arpa/nameser.h> #include <cutils/sockets.h> #include <gmock/gmock-matchers.h> #include <gtest/gtest.h> #include <netdb.h> #include <netdb.h> #include <netinet/in.h> #include <netinet/in.h> #include <openssl/base64.h> #include <poll.h> /* poll */ #include <poll.h> /* poll */ #include <private/android_filesystem_config.h> #include <resolv.h> #include <resolv.h> #include <stdarg.h> #include <stdarg.h> #include <stdlib.h> #include <stdlib.h> #include <sys/socket.h> #include <sys/socket.h> #include <sys/un.h> #include <sys/un.h> #include <unistd.h> #include <unistd.h> #include <utils/Log.h> #include <algorithm> #include <algorithm> #include <chrono> #include <chrono> Loading @@ -35,31 +45,18 @@ #include <numeric> #include <numeric> #include <thread> #include <thread> #include <android-base/parseint.h> #include "NetdClient.h" #include <android-base/stringprintf.h> #include <android-base/unique_fd.h> #include <android/multinetwork.h> // ResNsendFlags #include <cutils/sockets.h> #include <gmock/gmock-matchers.h> #include <gtest/gtest.h> #include <openssl/base64.h> #include <private/android_filesystem_config.h> #include <utils/Log.h> #include "netd_resolv/params.h" // MAXNS #include "netid_client.h" // NETID_UNSET #include "dns_responder/dns_responder.h" #include "dns_responder/dns_responder_client.h" #include "dns_responder/dns_tls_frontend.h" #include "NetdConstants.h" #include "NetdConstants.h" #include "ResolverStats.h" #include "ResolverStats.h" #include "android/net/IDnsResolver.h" #include "android/net/IDnsResolver.h" #include "binder/IServiceManager.h" #include "binder/IServiceManager.h" #include "dns_responder/dns_responder.h" #include "dns_responder/dns_responder_client.h" #include "dns_responder/dns_tls_frontend.h" #include "netd_resolv/params.h" // MAXNS #include "netdutils/ResponseCode.h" #include "netdutils/ResponseCode.h" #include "netdutils/SocketOption.h" #include "netdutils/SocketOption.h" #include "netid_client.h" // NETID_UNSET #include "tests/resolv_test_utils.h" #include "tests/resolv_test_utils.h" // Valid VPN netId range is 100 ~ 65535 // Valid VPN netId range is 100 ~ 65535 Loading Loading
dns_responder/dns_responder_client.cpp +4 −0 Original line number Original line Diff line number Diff line Loading @@ -15,11 +15,15 @@ */ */ #define LOG_TAG "dns_responder_client" #define LOG_TAG "dns_responder_client" #include "dns_responder_client.h" #include "dns_responder_client.h" #include <android-base/stringprintf.h> #include <android-base/stringprintf.h> #include <utils/Log.h> #include <utils/Log.h> #include "NetdClient.h" #include "binder/IServiceManager.h" // TODO: make this dynamic and stop depending on implementation details. // TODO: make this dynamic and stop depending on implementation details. #define TEST_OEM_NETWORK "oem29" #define TEST_OEM_NETWORK "oem29" #define TEST_NETID 30 #define TEST_NETID 30 Loading
dns_responder/dns_responder_client.h +0 −7 Original line number Original line Diff line number Diff line Loading @@ -22,15 +22,8 @@ #include <string> #include <string> #include <vector> #include <vector> #include <cutils/sockets.h> #include <private/android_filesystem_config.h> #include <utils/StrongPointer.h> #include "NetdClient.h" #include "android/net/IDnsResolver.h" #include "android/net/IDnsResolver.h" #include "android/net/INetd.h" #include "android/net/INetd.h" #include "binder/IServiceManager.h" #include "dns_responder.h" #include "dns_responder.h" inline const std::vector<std::string> kDefaultServers = {"127.0.0.3"}; inline const std::vector<std::string> kDefaultServers = {"127.0.0.3"}; Loading
resolver_test.cpp +16 −19 Original line number Original line Diff line number Diff line Loading @@ -17,17 +17,27 @@ #define LOG_TAG "resolv_integration_test" #define LOG_TAG "resolv_integration_test" #include <android-base/parseint.h> #include <android-base/stringprintf.h> #include <android-base/unique_fd.h> #include <android/multinetwork.h> // ResNsendFlags #include <arpa/inet.h> #include <arpa/inet.h> #include <arpa/nameser.h> #include <arpa/nameser.h> #include <cutils/sockets.h> #include <gmock/gmock-matchers.h> #include <gtest/gtest.h> #include <netdb.h> #include <netdb.h> #include <netinet/in.h> #include <netinet/in.h> #include <openssl/base64.h> #include <poll.h> /* poll */ #include <poll.h> /* poll */ #include <private/android_filesystem_config.h> #include <resolv.h> #include <resolv.h> #include <stdarg.h> #include <stdarg.h> #include <stdlib.h> #include <stdlib.h> #include <sys/socket.h> #include <sys/socket.h> #include <sys/un.h> #include <sys/un.h> #include <unistd.h> #include <unistd.h> #include <utils/Log.h> #include <algorithm> #include <algorithm> #include <chrono> #include <chrono> Loading @@ -35,31 +45,18 @@ #include <numeric> #include <numeric> #include <thread> #include <thread> #include <android-base/parseint.h> #include "NetdClient.h" #include <android-base/stringprintf.h> #include <android-base/unique_fd.h> #include <android/multinetwork.h> // ResNsendFlags #include <cutils/sockets.h> #include <gmock/gmock-matchers.h> #include <gtest/gtest.h> #include <openssl/base64.h> #include <private/android_filesystem_config.h> #include <utils/Log.h> #include "netd_resolv/params.h" // MAXNS #include "netid_client.h" // NETID_UNSET #include "dns_responder/dns_responder.h" #include "dns_responder/dns_responder_client.h" #include "dns_responder/dns_tls_frontend.h" #include "NetdConstants.h" #include "NetdConstants.h" #include "ResolverStats.h" #include "ResolverStats.h" #include "android/net/IDnsResolver.h" #include "android/net/IDnsResolver.h" #include "binder/IServiceManager.h" #include "binder/IServiceManager.h" #include "dns_responder/dns_responder.h" #include "dns_responder/dns_responder_client.h" #include "dns_responder/dns_tls_frontend.h" #include "netd_resolv/params.h" // MAXNS #include "netdutils/ResponseCode.h" #include "netdutils/ResponseCode.h" #include "netdutils/SocketOption.h" #include "netdutils/SocketOption.h" #include "netid_client.h" // NETID_UNSET #include "tests/resolv_test_utils.h" #include "tests/resolv_test_utils.h" // Valid VPN netId range is 100 ~ 65535 // Valid VPN netId range is 100 ~ 65535 Loading