Lines Matching refs:res
152 addrinfo** res);
155 static int res_queryN(const char* name, res_target* target, res_state res, int* herrno);
156 static int res_searchN(const char* name, res_target* target, res_state res, int* herrno);
157 static int res_querydomainN(const char* name, const char* domain, res_target* target, res_state res,
325 addrinfo** res, NetworkDnsEventReported* event) { in android_getaddrinfofornetcontext() argument
329 assert(res != nullptr); in android_getaddrinfofornetcontext()
398 return resolv_getaddrinfo(hostname, servname, hints, netcontext, res, event); in android_getaddrinfofornetcontext()
403 *res = nullptr; in android_getaddrinfofornetcontext()
405 *res = sentinel.ai_next; in android_getaddrinfofornetcontext()
411 const android_net_context* _Nonnull netcontext, addrinfo** _Nonnull res, in resolv_getaddrinfo() argument
418 assert(res != nullptr); in resolv_getaddrinfo()
424 *res = nullptr; in resolv_getaddrinfo()
453 if ((*res = sentinel.ai_next)) return 0; in resolv_getaddrinfo()
457 *res = nullptr; in resolv_getaddrinfo()
463 addrinfo** res, const android_net_context* netcontext, in explore_fqdn() argument
468 assert(res != nullptr); in explore_fqdn()
491 *res = result; in explore_fqdn()
500 static int explore_null(const struct addrinfo* pai, const char* servname, struct addrinfo** res) { in explore_null() argument
511 assert(res != NULL); in explore_null()
513 *res = NULL; in explore_null()
544 *res = sentinel.ai_next; in explore_null()
556 struct addrinfo** res, const char* canonname) { in explore_numeric() argument
566 assert(res != NULL); in explore_numeric()
568 *res = NULL; in explore_numeric()
601 *res = sentinel.ai_next; in explore_numeric()
613 const char* servname, struct addrinfo** res) { in explore_numeric_scope() argument
625 assert(res != NULL); in explore_numeric_scope()
635 if (!afd->a_scoped) return explore_numeric(pai, hostname, servname, res, hostname); in explore_numeric_scope()
638 if (cp == NULL) return explore_numeric(pai, hostname, servname, res, hostname); in explore_numeric_scope()
650 error = explore_numeric(pai, addr, servname, res, hostname); in explore_numeric_scope()
654 for (cur = *res; cur; cur = cur->ai_next) { in explore_numeric_scope()
1439 ResState res; in dns_getaddrinfo() local
1440 res_init(&res, netcontext, event); in dns_getaddrinfo()
1443 if (res_searchN(name, &q, &res, &he) < 0) { in dns_getaddrinfo()
1490 struct addrinfo *res0, *res; in _gethtent() local
1524 for (res = res0; res; res = res->ai_next) { in _gethtent()
1526 res->ai_flags = pai->ai_flags; in _gethtent()
1529 if (get_canonname(pai, res, cname) != 0) { in _gethtent()
1541 struct addrinfo *res0, *res; in getCustomHosts() local
1542 res = &sentinel; in getCustomHosts()
1547 res->ai_next = res0; in getCustomHosts()
1548 res = res0; in getCustomHosts()
1556 addrinfo** res) { in files_getaddrinfo() argument
1573 *res = sentinel.ai_next; in files_getaddrinfo()
1611 QueryResult doQuery(const char* name, res_target* t, res_state res, in doQuery() argument
1626 res->netcontext_flags); in doQuery()
1629 (res->netcontext_flags & (NET_CONTEXT_FLAG_USE_DNS_OVER_TLS | NET_CONTEXT_FLAG_USE_EDNS))) { in doQuery()
1630 n = res_nopt(res, n, buf, sizeof(buf), anslen); in doQuery()
1645 ResState res_temp = fromResState(*res, &event); in doQuery()
1656 sizeof(buf), res->netcontext_flags); in doQuery()
1673 static int res_queryN_parallel(const char* name, res_target* target, res_state res, int* herrno) { in res_queryN_parallel() argument
1678 results.emplace_back(std::async(std::launch::async, doQuery, name, t, res, sleepTimeMs)); in res_queryN_parallel()
1698 res->event->MergeFrom(r.event); in res_queryN_parallel()
1711 static int res_queryN_wrapper(const char* name, res_target* target, res_state res, int* herrno) { in res_queryN_wrapper() argument
1714 if (parallel_lookup) return res_queryN_parallel(name, target, res, herrno); in res_queryN_wrapper()
1716 return res_queryN(name, target, res, herrno); in res_queryN_wrapper()
1729 static int res_queryN(const char* name, res_target* target, res_state res, int* herrno) { in res_queryN() argument
1756 res->netcontext_flags); in res_queryN()
1758 (res->netcontext_flags & in res_queryN()
1761 n = res_nopt(res, n, buf, sizeof(buf), anslen); in res_queryN()
1768 n = res_nsend(res, buf, n, t->answer.data(), anslen, &rcode, 0); in res_queryN()
1776 if ((res->netcontext_flags & in res_queryN()
1778 (res->_flags & RES_F_EDNS0ERR) && !retried) { in res_queryN()
1805 static int res_searchN(const char* name, res_target* target, res_state res, int* herrno) { in res_searchN() argument
1828 if (dots >= res->ndots) { in res_searchN()
1829 ret = res_querydomainN(name, NULL, target, res, herrno); in res_searchN()
1847 resolv_populate_res_for_net(res); in res_searchN()
1849 for (const auto& domain : res->search_domains) { in res_searchN()
1850 ret = res_querydomainN(name, domain.c_str(), target, res, herrno); in res_searchN()
1898 ret = res_querydomainN(name, NULL, target, res, herrno); in res_searchN()
1921 static int res_querydomainN(const char* name, const char* domain, res_target* target, res_state res, in res_querydomainN() argument
1950 return res_queryN_wrapper(longname, target, res, herrno); in res_querydomainN()