Home
last modified time | relevance | path

Searched refs:DNSResponder (Results 1 – 14 of 14) sorted by relevance

/packages/modules/DnsResolver/tests/dns_responder/
Ddns_responder.cpp489 DNSResponder::DNSResponder(std::string listen_address, std::string listen_service, in DNSResponder() function in test::DNSResponder
496 DNSResponder::~DNSResponder() { in ~DNSResponder()
500 void DNSResponder::addMapping(const std::string& name, ns_type type, const std::string& addr) { in addMapping()
505 void DNSResponder::addMappingDnsHeader(const std::string& name, ns_type type, in addMappingDnsHeader()
511 void DNSResponder::addMappingBinaryPacket(const std::vector<uint8_t>& query, in addMappingBinaryPacket()
517 void DNSResponder::removeMapping(const std::string& name, ns_type type) { in removeMapping()
525 void DNSResponder::removeMappingDnsHeader(const std::string& name, ns_type type) { in removeMappingDnsHeader()
533 void DNSResponder::removeMappingBinaryPacket(const std::vector<uint8_t>& query) { in removeMappingBinaryPacket()
544 void DNSResponder::setResponseProbability(double response_probability) { in setResponseProbability()
549 void DNSResponder::setResponseDelayMs(unsigned timeMs) { in setResponseDelayMs()
[all …]
Ddns_responder.h128 class DNSResponder {
152 DNSResponder(std::string listen_address = kDefaultListenAddr,
155 DNSResponder::MappingType mapping_type = MappingType::ADDRESS_OR_HOSTNAME);
157 DNSResponder(ns_rcode error_rcode) in DNSResponder() function
158 : DNSResponder(kDefaultListenAddr, kDefaultListenService, error_rcode){}; in DNSResponder()
160 DNSResponder(MappingType mapping_type) in DNSResponder() function
161 : DNSResponder(kDefaultListenAddr, kDefaultListenService, kDefaultErrorCode, in DNSResponder()
164 DNSResponder(unsigned netId, std::string listen_address) : DNSResponder(listen_address) { in DNSResponder() function
168 ~DNSResponder();
Ddns_responder_client_ndk.cpp157 std::vector<std::unique_ptr<test::DNSResponder>>* dns, in SetupDNSServers()
166 d = std::make_unique<test::DNSResponder>(server, listenSrv, ns_rcode::ns_r_servfail); in SetupDNSServers()
Ddns_responder_client_ndk.h124 std::vector<std::unique_ptr<test::DNSResponder>>* dns,
/packages/modules/DnsResolver/tests/
Dresolv_integration_test.cpp257 void StartDns(test::DNSResponder& dns, const std::vector<DnsRecord>& records) { in StartDns()
442 test::DNSResponder dns; in TEST_F()
478 test::DNSResponder dns; in TEST_F()
532 test::DNSResponder dns; in TEST_F()
555 test::DNSResponder dns; in TEST_F()
604 test::DNSResponder dns; in TEST_F()
666 std::vector<std::unique_ptr<test::DNSResponder>> dns; in TEST_F()
725 test::DNSResponder dns(listen_addr); in TEST_F()
726 test::DNSResponder dns2(listen_addr2); in TEST_F()
772 test::DNSResponder dns; in TEST_F()
[all …]
Dresolv_unit_test.cpp77 EXPECT_TRUE(test::DNSResponder::fillRdata(rdata, record)); in MakeAnswerRecord()
118 void StartDns(test::DNSResponder& dns, const std::vector<DnsMessage>& messages) { in StartDns()
460 test::DNSResponder dns; in TEST_F()
545 test::DNSResponder dns; in TEST_F()
579 test::DNSResponder dns; in TEST_F()
640 test::DNSResponder dns(config.rcode); in TEST_F()
846 test::DNSResponder dns(static_cast<ns_rcode>(-1) /*no response*/); in TEST_F()
864 test::DNSResponder dns; in TEST_F()
899 test::DNSResponder dns; in TEST_F()
951 test::DNSResponder dns; in TEST_F()
[all …]
Dresolv_test_utils.cpp106 size_t GetNumQueries(const test::DNSResponder& dns, const char* name) { in GetNumQueries()
107 std::vector<test::DNSResponder::QueryInfo> queries = dns.queries(); in GetNumQueries()
117 size_t GetNumQueriesForProtocol(const test::DNSResponder& dns, const int protocol, in GetNumQueriesForProtocol()
119 std::vector<test::DNSResponder::QueryInfo> queries = dns.queries(); in GetNumQueriesForProtocol()
129 size_t GetNumQueriesForType(const test::DNSResponder& dns, ns_type type, const char* name) { in GetNumQueriesForType()
130 std::vector<test::DNSResponder::QueryInfo> queries = dns.queries(); in GetNumQueriesForType()
Dresolv_gold_test.cpp156 void SetupMappings(const android::net::GoldTest& goldtest, test::DNSResponder& dns) { in SetupMappings()
222 void VerifyResolver(const android::net::GoldTest& goldtest, const test::DNSResponder& dns, in VerifyResolver()
285 test::DNSResponder dns(test::DNSResponder::MappingType::BINARY_PACKET); in TEST_F()
311 test::DNSResponder dns(test::DNSResponder::MappingType::BINARY_PACKET); in TEST_F()
362 test::DNSResponder dns; in TEST_F()
431 test::DNSResponder dns(test::DNSResponder::MappingType::BINARY_PACKET); in TEST_P()
Dresolv_test_utils.h184 size_t GetNumQueries(const test::DNSResponder& dns, const char* name);
185 size_t GetNumQueriesForProtocol(const test::DNSResponder& dns, const int protocol,
187 size_t GetNumQueriesForType(const test::DNSResponder& dns, ns_type type, const char* name);
Dresolv_callback_unit_test.cpp147 test::DNSResponder dns; in TEST_F()
Dresolv_stress_test.cpp45 std::vector<std::unique_ptr<test::DNSResponder>> dns; in RunGetAddrInfoStressTest()
Ddnsresolver_binder_test.cpp365 test::DNSResponder dns(listen_addr, listen_srv, ns_rcode::ns_r_servfail); in TEST_F()
Dresolv_cache_unit_test.cpp92 test::DNSResponder::fillRdata(rdata_str, record); in makeAnswer()
/packages/modules/DnsResolver/
DPrivateDnsConfigurationTest.cpp136 inline static test::DNSResponder backend{kBackend, "53"};
137 inline static test::DNSResponder backend1ForUdpProbe{kServer1, "53"};
138 inline static test::DNSResponder backend2ForUdpProbe{kServer2, "53"};