/packages/modules/DnsResolver/ |
D | res_send.cpp | 159 int* terrno, size_t* ns, int* v_circuit, int* gotsomewhere, int* rcode); 161 int* terrno, size_t ns, int* rcode); 163 int* rcode); 170 static int res_private_dns_send(ResState*, const Slice query, const Slice answer, int* rcode, 173 const Slice answer, int* rcode, PrivateDnsMode mode); 174 static ssize_t res_doh_send(ResState*, const Slice query, const Slice answer, int* rcode); 439 int res_nsend(ResState* statp, span<const uint8_t> msg, span<uint8_t> ans, int* rcode, in res_nsend() argument 457 *rcode = hp->rcode; in res_nsend() 474 *rcode = RCODE_INTERNAL_ERROR; in res_nsend() 476 resplen = send_mdns(statp, msg, ans, &terrno, rcode); in res_nsend() [all …]
|
D | DnsStats.cpp | 40 std::string rcodeToName(int rcode) { in rcodeToName() argument 42 switch (rcode) { in rcodeToName() 56 default: return fmt::format("UNKNOWN({})", rcode); in rcodeToName() 89 for (const auto& [rcode, counts] : rcodeCounts) { in toString() 91 buf += fmt::format("{}:{} ", rcodeToName(rcode), counts); in toString() 125 const int rcode = record.rcode; in updateStatsData() local 128 mStatsData.rcodeCounts[rcode] += 1; in updateStatsData() 132 mStatsData.rcodeCounts[rcode] -= 1; in updateStatsData() 139 switch (record.rcode) { in updatePenalty() 204 .rcode = record.rcode(), in addStats()
|
D | res_query.cpp | 111 int rcode = NOERROR; in res_nquery() local 115 hp->rcode = NOERROR; // default in res_nquery() 129 n = res_nsend(statp, std::span(buf, n), answer, &rcode, 0); in res_nquery() 156 switch (rcode) { in res_nquery() 168 if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { in res_nquery() 169 LOG(INFO) << __func__ << ": rcode = (" << p_rcode(hp->rcode) in res_nquery() 173 switch (hp->rcode) { in res_nquery() 281 if (hp->rcode == SERVFAIL) { in res_nsearch()
|
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(DEBUG) << __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 | 48 DnsQueryEvent makeDnsQueryEvent(const Protocol protocol, const NsRcode rcode, in makeDnsQueryEvent() argument 52 event.set_rcode(rcode); in makeDnsQueryEvent() 76 .rcode = NS_R_NO_ERROR, in TEST_F() 81 .rcode = NS_R_TIMEOUT, in TEST_F() 418 const NsRcode rcode = static_cast<NsRcode>(rcodes[i % rcodeNum]); in TEST_F() local 419 const auto eventTcp = makeDnsQueryEvent(PROTO_TCP, rcode, milliseconds(i)); in TEST_F() 420 const auto eventUdp = makeDnsQueryEvent(PROTO_UDP, rcode, milliseconds(i)); in TEST_F() 421 const auto eventDot = makeDnsQueryEvent(PROTO_DOT, rcode, milliseconds(i)); in TEST_F() 428 const auto eventMdns = makeDnsQueryEvent(PROTO_MDNS, rcode, milliseconds(i)); in TEST_F() 436 for (const auto& rcode : rcodes) { in TEST_F() local [all …]
|
D | getaddrinfo.cpp | 1573 int getHerrnoFromRcode(int rcode) { in getHerrnoFromRcode() argument 1574 switch (rcode) { in getHerrnoFromRcode() 1596 int rcode; member 1608 hp->rcode = NOERROR; // default in doQuery() 1629 .rcode = -1, in doQuery() 1638 int rcode = NOERROR; in doQuery() local 1639 n = res_nsend(&res_temp, std::span(buf, n), std::span(t->answer.data(), anslen), &rcode, 0, in doQuery() 1641 if (n < 0 || hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { in doQuery() 1642 if (rcode != RCODE_TIMEOUT) rcode = hp->rcode; in doQuery() 1649 n = res_nsend(&res_temp, std::span(buf, n), std::span(t->answer.data(), anslen), &rcode, in doQuery() [all …]
|
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 | res_debug.cpp | 254 uint32_t opcode, rcode, id; in res_pquery() local 261 rcode = ns_msg_getflag(handle, ns_f_rcode); in res_pquery() 272 _res_opcodes[opcode], p_rcode((int)rcode), id); in res_pquery() 488 const char* p_rcode(int rcode) { in p_rcode() argument 489 return (sym_ntos(p_rcode_syms, rcode, (int*) 0)); in p_rcode()
|
D | DnsProxyListener.cpp | 230 int rcodeToAiError(int rcode) { in rcodeToAiError() argument 231 switch (rcode) { in rcodeToAiError() 241 int resNSendToAiError(int err, int rcode) { in resNSendToAiError() argument 243 return rcodeToAiError(rcode); in resNSendToAiError() 376 if (query.cache_hit() != CS_FOUND && query.rcode() == NS_R_NO_ERROR) { 1128 int rcode = ns_r_noerror; in run() local 1138 ansLen = resolv_res_nsend(&mNetContext, std::span(msg.data(), msgLen), ansBuf, &rcode, in run() 1164 resNSendToAiError(ansLen, rcode), event, rr_name, isUidBlocked); in run() 1170 if (!sendBE32(mClient, rcode)) { in run() 1194 resNSendToAiError(ansLen, rcode), event, rr_name, /*skipStats=*/false, in run()
|
D | res_send.h | 26 std::span<uint8_t> ans, int* rcode, uint32_t flags,
|
D | res_debug.h | 29 const char* p_rcode(int rcode);
|
/packages/modules/Connectivity/tests/cts/net/native/dns/ |
D | NativeDnsAsyncTest.cpp | 38 int getAsyncResponse(int fd, int timeoutMs, int* rcode, uint8_t* buf, size_t bufLen) { in getAsyncResponse() argument 47 int n = android_res_nresult(fd, rcode, buf, bufLen); in getAsyncResponse() 80 int rcode = -1; in expectAnswersValid() local 82 int res = getAsyncResponse(fd, TIMEOUT_MS, &rcode, buf, MAXPACKET); in expectAnswersValid() 84 EXPECT_EQ(rcode, expectedRcode); in expectAnswersValid() 97 int rcode = -1; in expectAnswersNotValid() local 99 int res = getAsyncResponse(fd, TIMEOUT_MS, &rcode, buf, MAXPACKET); in expectAnswersNotValid()
|
/packages/modules/Connectivity/framework/src/android/net/ |
D | DnsResolver.java | 151 void onAnswer(@NonNull T answer, int rcode); in onAnswer() argument 296 public void onAnswer(@NonNull byte[] answer, int rcode) { in onAnswer() argument 299 if (mReceivedAnswerCount == 0 || rcode == 0) { in onAnswer() 300 mRcode = rcode; in onAnswer() 478 public final int rcode; field in DnsResolver.DnsResponse 479 public DnsResponse(@NonNull byte[] answerbuf, int rcode) { in DnsResponse() argument 481 this.rcode = rcode; in DnsResponse() 520 answerCallback.onAnswer(resp.answerbuf, resp.rcode); in registerFDListener()
|
/packages/services/Iwlan/src/com/google/android/iwlan/epdg/ |
D | SrvDnsResolver.java | 243 @NonNull final List<InetAddress> answer, final int rcode) { in queryDns() 244 if (rcode != 0) { in queryDns() 245 Log.e(TAG, "queryDNS Response Code = " + rcode); in queryDns() 317 public void onAnswer(@NonNull byte[] answer, int rcode) { in onAnswer() argument 321 mUserExecutor.execute(() -> mUserCallback.onAnswer(result, rcode)); in onAnswer()
|
D | EpdgSelector.java | 302 public void onAnswer(@NonNull final List<InetAddress> answer, final int rcode) { in submitDnsResolverQuery() 303 if (rcode != 0) { in submitDnsResolverQuery() 307 + rcode in submitDnsResolverQuery() 518 @NonNull final List<InetAddress> answer, final int rcode) { in getIP() 519 if (rcode != 0) { in getIP() 520 Log.e(TAG, "DnsResolver Response Code = " + rcode); in getIP() 1205 public void onAnswer(@NonNull final List<NaptrTarget> answer, final int rcode) { in resolutionMethodVisitedCountry() 1206 if (rcode == 0 && answer.size() != 0) { in resolutionMethodVisitedCountry()
|
D | NaptrDnsResolver.java | 247 public void onAnswer(@NonNull byte[] answer, int rcode) { in onAnswer() argument 252 mUserExecutor.execute(() -> mUserCallback.onAnswer(result, rcode)); in onAnswer()
|
/packages/modules/Connectivity/tests/cts/net/jni/ |
D | NativeMultinetworkJni.cpp | 91 int getAsyncResponse(JNIEnv* env, int fd, int timeoutMs, int* rcode, uint8_t* buf, size_t bufLen) { in getAsyncResponse() argument 96 int n = android_res_nresult(fd, rcode, buf, bufLen); in getAsyncResponse() 147 int rcode = -1; in expectAnswersValid() local 149 int res = getAsyncResponse(env, fd, TIMEOUT_MS, &rcode, buf, MAXPACKET); in expectAnswersValid() 154 EXPECT_EQ(env, expectedRcode, rcode, "rcode is not expected"); in expectAnswersValid() 163 int rcode = -1; in expectAnswersNotValid() local 165 int res = getAsyncResponse(env, fd, TIMEOUT_MS, &rcode, buf, MAXPACKET); in expectAnswersNotValid()
|
/packages/modules/Connectivity/framework/jni/ |
D | android_net_NetworkUtils.cpp | 162 int rcode; in android_net_utils_resNetworkResult() local 165 int res = android_res_nresult(fd, &rcode, buf, MAXPACKETSIZE); in android_net_utils_resNetworkResult() 183 return env->NewObject(class_DnsResponse, ctor, answer, rcode); in android_net_utils_resNetworkResult()
|
/packages/modules/DnsResolver/tests/dns_responder/ |
D | dns_responder.h | 88 uint8_t rcode; member 261 bool generateErrorResponse(DNSHeader* header, ns_rcode rcode, char* response, 269 bool makeErrorResponse(DNSHeader* header, ns_rcode rcode, char* response,
|
/packages/modules/DnsResolver/tests/ |
D | resolv_stats_test_utils.h | 42 ::testing::Property("rcode", &DnsQueryEvent::rcode, 43 ::testing::Eq(other.rcode())),
|
D | resolv_cache_unit_test.cpp | 114 return std::tie(a.at, a.rtt, a.rcode) == std::tie(b.at, b.rtt, b.rcode); in operator ==() 773 res_sample sample = {.at = time(NULL), .rtt = 100, .rcode = ns_r_noerror}; in TEST_F() 874 const res_sample sample1 = {.at = time(nullptr), .rtt = 100, .rcode = ns_r_noerror}; in TEST_F() 875 const res_sample sample2 = {.at = time(nullptr), .rtt = 200, .rcode = ns_r_noerror}; in TEST_F() 876 const res_sample sample3 = {.at = time(nullptr), .rtt = 300, .rcode = ns_r_noerror}; in TEST_F()
|
D | resolv_private_dns_test.cpp | 65 int getAsyncResponse(int fd, int* rcode, uint8_t* buf, int bufLen) { in getAsyncResponse() argument 77 return resNetworkResult(fd, rcode, buf, bufLen); in getAsyncResponse() 99 int rcode = -1; in expectAnswersValid() local 102 int res = getAsyncResponse(fd, &rcode, buf, MAXPACKET); in expectAnswersValid() 344 int rcode; in expectQueriesAreBlocked() local 345 EXPECT_EQ(-ECONNREFUSED, getAsyncResponse(fd, &rcode, buf, MAXPACKET)); in expectQueriesAreBlocked()
|
/packages/services/Iwlan/test/com/google/android/iwlan/epdg/ |
D | NaptrDnsResolverTest.java | 89 public void onAnswer(@NonNull final List<NaptrTarget> answer, final int rcode) { in NaptrDnsResolverTest() 90 if (rcode == 0 && answer.size() != 0) { in NaptrDnsResolverTest()
|
D | SrvDnsResolverTest.java | 115 @NonNull final List<SrvRecordInetAddress> answer, final int rcode) { in SrvDnsResolverTest() 116 if (rcode == 0 && answer.size() != 0) { in SrvDnsResolverTest()
|
/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()
|