/packages/modules/DnsResolver/ |
D | res_send.cpp | 150 uint8_t* ans, int anssiz, int* terrno, size_t ns, time_t* at, int* rcode, 154 int* gotsomewhere, time_t* at, int* rcode, int* delay); 162 static int res_tls_send(res_state, const Slice query, const Slice answer, int* rcode, 423 int res_nsend(res_state statp, const uint8_t* buf, int buflen, uint8_t* ans, int anssiz, int* rcode, in res_nsend() argument 442 *rcode = hp->rcode; in res_nsend() 473 Slice(ans, anssiz), rcode, &fallback); in res_nsend() 519 *rcode = RCODE_INTERNAL_ERROR; in res_nsend() 541 &query_time, rcode, &delay); in res_nsend() 553 &useTcp, &gotsomewhere, &query_time, rcode, &delay); in res_nsend() 571 dnsQueryEvent->set_rcode(static_cast<NsRcode>(*rcode)); in res_nsend() [all …]
|
D | DnsStats.cpp | 41 std::string rcodeToName(int rcode) { in rcodeToName() argument 43 switch (rcode) { in rcodeToName() 57 default: return StringPrintf("UNKNOWN(%d)", rcode); in rcodeToName() 87 for (const auto& [rcode, counts] : rcodeCounts) { in toString() 89 buf += StringPrintf("%s:%d ", rcodeToName(rcode).c_str(), counts); in toString() 110 const int rcode = record.rcode; in updateStatsData() local 113 mStatsData.rcodeCounts[rcode] += 1; in updateStatsData() 117 mStatsData.rcodeCounts[rcode] -= 1; in updateStatsData() 153 .rcode = record.rcode(), in addStats()
|
D | res_query.cpp | 112 int rcode = NOERROR; in res_nquery() local 116 hp->rcode = NOERROR; // default in res_nquery() 132 n = res_nsend(statp, buf, n, answer, anslen, &rcode, 0); in res_nquery() 159 switch (rcode) { in res_nquery() 171 if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { in res_nquery() 172 LOG(DEBUG) << __func__ << ": rcode = (" << p_rcode(hp->rcode) in res_nquery() 176 switch (hp->rcode) { in res_nquery() 287 if (hp->rcode == SERVFAIL) { in res_nsearch()
|
D | getaddrinfo.cpp | 1583 int getHerrnoFromRcode(int rcode) { in getHerrnoFromRcode() argument 1584 switch (rcode) { in getHerrnoFromRcode() 1606 int rcode; member 1615 hp->rcode = NOERROR; // default in doQuery() 1639 .rcode = -1, in doQuery() 1647 int rcode = NOERROR; in doQuery() local 1648 n = res_nsend(&res_temp, buf, n, t->answer.data(), anslen, &rcode, 0, sleepTimeMs); in doQuery() 1649 if (n < 0 || hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { in doQuery() 1657 n = res_nsend(&res_temp, buf, n, t->answer.data(), anslen, &rcode, 0); in doQuery() 1661 LOG(DEBUG) << __func__ << ": rcode=" << hp->rcode << ", ancount=" << ntohs(hp->ancount); in doQuery() [all …]
|
D | res_stats.cpp | 35 void res_stats_set_sample(res_sample* sample, time_t now, int rcode, int rtt) { in res_stats_set_sample() argument 36 LOG(INFO) << __func__ << ": rcode = " << rcode << ", sec = " << rtt; in res_stats_set_sample() 38 sample->rcode = rcode; in res_stats_set_sample() 65 switch (stats->samples[i].rcode) { in android_net_res_stats_aggregate()
|
D | DnsStatsTest.cpp | 35 DnsQueryEvent makeDnsQueryEvent(const Protocol protocol, const NsRcode rcode, in makeDnsQueryEvent() argument 39 event.set_rcode(rcode); in makeDnsQueryEvent() 353 const NsRcode rcode = static_cast<NsRcode>(rcodes[i % rcodeNum]); in TEST_F() local 354 const auto eventTcp = makeDnsQueryEvent(PROTO_TCP, rcode, 10ms); in TEST_F() 355 const auto eventUdp = makeDnsQueryEvent(PROTO_UDP, rcode, 10ms); in TEST_F() 356 const auto eventDot = makeDnsQueryEvent(PROTO_DOT, rcode, 10ms); in TEST_F() 366 for (const auto& rcode : rcodes) { in TEST_F() local 367 expectedRcodeCounts.try_emplace(rcode, 32); in TEST_F()
|
D | res_debug.cpp | 244 uint32_t opcode, rcode, id; in res_pquery() local 251 rcode = ns_msg_getflag(handle, ns_f_rcode); in res_pquery() 263 p_rcode((int)rcode), id); in res_pquery() 478 const char* p_rcode(int rcode) { in p_rcode() argument 479 return (sym_ntos(p_rcode_syms, rcode, (int*) 0)); in p_rcode()
|
D | stats.h | 32 uint8_t rcode; // the DNS rcode or RCODE_XXX defined above member 63 void res_stats_set_sample(res_sample* sample, time_t now, int rcode, int rtt);
|
D | DnsProxyListener.cpp | 235 int rcodeToAiError(int rcode) { in rcodeToAiError() argument 236 switch (rcode) { in rcodeToAiError() 246 int resNSendToAiError(int err, int rcode) { in resNSendToAiError() argument 248 return rcodeToAiError(rcode); in resNSendToAiError() 940 int rcode = ns_r_noerror; in run() local 947 &rcode, static_cast<ResNsendFlags>(mFlags), &event); in run() 971 resNSendToAiError(nsendAns, rcode), event, rr_name); in run() 977 if (!sendBE32(mClient, rcode)) { in run() 996 resNSendToAiError(nsendAns, rcode), event, rr_name, ip_addrs, in run()
|
D | resolv_cache_unit_test.cpp | 109 return std::tie(a.at, a.rtt, a.rcode) == std::tie(b.at, b.rtt, b.rcode); in operator ==() 751 res_sample sample = {.at = time(NULL), .rtt = 100, .rcode = ns_r_noerror}; in TEST_F() 852 const res_sample sample1 = {.at = time(nullptr), .rtt = 100, .rcode = ns_r_noerror}; in TEST_F() 853 const res_sample sample2 = {.at = time(nullptr), .rtt = 200, .rcode = ns_r_noerror}; in TEST_F() 854 const res_sample sample3 = {.at = time(nullptr), .rtt = 300, .rcode = ns_r_noerror}; in TEST_F()
|
D | resolv_unit_test.cpp | 620 ns_rcode rcode; in TEST_F() member 636 SCOPED_TRACE(StringPrintf("rcode: %d", config.rcode)); in TEST_F() 638 test::DNSResponder dns(config.rcode); in TEST_F() 1290 ns_rcode rcode; in TEST_F() member 1308 SCOPED_TRACE(StringPrintf("rcode: %d", config.rcode)); in TEST_F() 1310 test::DNSResponder dns(config.rcode); in TEST_F()
|
D | res_debug.h | 29 const char* p_rcode(int rcode);
|
D | res_send.h | 24 uint8_t* ans, int ansLen, int* rcode, uint32_t flags,
|
D | stats.proto | 66 // Define rcode=12~15(UNASSIGNED) in rcode enum type. 350 optional NsRcode rcode = 1; field
|
D | DnsStats.h | 70 int rcode; member
|
D | resolv_private.h | 144 int res_nsend(res_state statp, const uint8_t* buf, int buflen, uint8_t* ans, int anssiz, int* rcode,
|
D | res_mkquery.cpp | 126 hp->rcode = NOERROR; in res_nmkquery()
|
D | DnsTlsDispatcher.cpp | 121 static_cast<NsRcode>(reinterpret_cast<HEADER*>(ans.base())->rcode)); in query()
|
/packages/modules/DnsResolver/tests/ |
D | resolv_integration_test.cpp | 1944 int getAsyncResponse(int fd, int* rcode, uint8_t* buf, int bufLen) { in getAsyncResponse() argument 1954 int n = resNetworkResult(fd, rcode, buf, bufLen); in getAsyncResponse() 2005 int rcode = -1; in expectAnswersValid() local 2008 int res = getAsyncResponse(fd, &rcode, buf, MAXPACKET); in expectAnswersValid() 2014 int rcode = -1; in expectAnswersNotValid() local 2017 int res = getAsyncResponse(fd, &rcode, buf, MAXPACKET); in expectAnswersNotValid() 2042 int rcode; in TEST_F() local 2043 int res = getAsyncResponse(fd2, &rcode, buf, MAXPACKET); in TEST_F() 2047 res = getAsyncResponse(fd1, &rcode, buf, MAXPACKET); in TEST_F() 2060 res = getAsyncResponse(fd2, &rcode, buf, MAXPACKET); in TEST_F() [all …]
|
D | resolv_stats_test_utils.h | 39 ::testing::Property("rcode", &DnsQueryEvent::rcode, 40 ::testing::Eq(other.rcode())),
|
D | resolv_test_utils.h | 148 .rcode = ns_r_noerror, // no error
|
D | resolv_stats_test_utils.cpp | 149 *os << " rcode: " << event.rcode() << "\n"; in PrintTo()
|
/packages/modules/DnsResolver/tests/dns_responder/ |
D | dns_responder.h | 88 uint8_t rcode; member 245 bool generateErrorResponse(DNSHeader* header, ns_rcode rcode, char* response, 253 bool makeErrorResponse(DNSHeader* header, ns_rcode rcode, char* response,
|
D | dns_responder.cpp | 393 header.flags1 = (ad << 5) | rcode; in write() 448 rcode = header.flags1 & 0xF; in readHeader() 874 bool DNSResponder::makeErrorResponse(DNSHeader* header, ns_rcode rcode, char* response, in makeErrorResponse() argument 879 header->rcode = rcode; in makeErrorResponse()
|
/packages/modules/NetworkStack/src/com/android/networkstack/util/ |
D | DnsUtils.java | 108 public void onAnswer(List<InetAddress> answer, int rcode) { in getAllByName() 109 if (rcode == 0 && answer != null && answer.size() != 0) { in getAllByName()
|