Lines Matching refs:res
408 const struct addrinfo *hints, struct addrinfo **res, unsigned netid) in android_getaddrinfo_proxy() argument
415 *res = NULL; in android_getaddrinfo_proxy()
462 struct addrinfo** nextres = res; in android_getaddrinfo_proxy()
553 if (*res) { in android_getaddrinfo_proxy()
554 freeaddrinfo(*res); in android_getaddrinfo_proxy()
555 *res = NULL; in android_getaddrinfo_proxy()
564 const struct addrinfo *hints, struct addrinfo **res) in getaddrinfo() argument
566 return android_getaddrinfofornet(hostname, servname, hints, NETID_UNSET, MARK_UNSET, res); in getaddrinfo()
572 const struct addrinfo *hints, unsigned netid, unsigned mark, struct addrinfo **res) in android_getaddrinfofornet() argument
581 return android_getaddrinfofornetcontext(hostname, servname, hints, &netcontext, res); in android_getaddrinfofornet()
588 struct addrinfo **res) in android_getaddrinfofornetcontext() argument
601 assert(res != NULL); in android_getaddrinfofornetcontext()
734 hostname, servname, hints, res, netcontext->app_netid); in android_getaddrinfofornetcontext()
782 *res = sentinel.ai_next; in android_getaddrinfofornetcontext()
791 *res = NULL; in android_getaddrinfofornetcontext()
800 const char *servname, struct addrinfo **res, in explore_fqdn() argument
816 assert(res != NULL); in explore_fqdn()
846 *res = result; in explore_fqdn()
863 struct addrinfo **res) in explore_null() argument
873 assert(res != NULL); in explore_null()
875 *res = NULL; in explore_null()
915 *res = sentinel.ai_next; in explore_null()
929 const char *servname, struct addrinfo **res, const char *canonname) in explore_numeric() argument
940 assert(res != NULL); in explore_numeric()
942 *res = NULL; in explore_numeric()
1001 *res = sentinel.ai_next; in explore_numeric()
1016 const char *servname, struct addrinfo **res) in explore_numeric_scope() argument
1019 return explore_numeric(pai, hostname, servname, res, hostname); in explore_numeric_scope()
1030 assert(res != NULL); in explore_numeric_scope()
1043 return explore_numeric(pai, hostname, servname, res, hostname); in explore_numeric_scope()
1047 return explore_numeric(pai, hostname, servname, res, hostname); in explore_numeric_scope()
1060 error = explore_numeric(pai, addr, servname, res, hostname); in explore_numeric_scope()
1064 for (cur = *res; cur; cur = cur->ai_next) { in explore_numeric_scope()
1902 res_state res; in _dns_getaddrinfo() local
1977 res = __res_get_state(); in _dns_getaddrinfo()
1978 if (res == NULL) { in _dns_getaddrinfo()
1989 res_setnetcontext(res, netcontext); in _dns_getaddrinfo()
1990 if (res_searchN(name, &q, res) < 0) { in _dns_getaddrinfo()
1991 __res_put_state(res); in _dns_getaddrinfo()
2010 __res_put_state(res); in _dns_getaddrinfo()
2023 __res_put_state(res); in _dns_getaddrinfo()
2054 struct addrinfo hints, *res0, *res; in _gethtent() local
2101 for (res = res0; res; res = res->ai_next) { in _gethtent()
2103 res->ai_flags = pai->ai_flags; in _gethtent()
2106 if (get_canonname(pai, res, cname) != 0) { in _gethtent()
2160 res_state res) in res_queryN() argument
2182 oflags = res->_flags; in res_queryN()
2193 if (res->options & RES_DEBUG) in res_queryN()
2197 n = res_nmkquery(res, QUERY, name, class, type, NULL, 0, NULL, in res_queryN()
2200 if (n > 0 && (res->_flags & RES_F_EDNS0ERR) == 0 && in res_queryN()
2201 (res->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0) in res_queryN()
2202 n = res_nopt(res, n, buf, sizeof(buf), anslen); in res_queryN()
2206 if (res->options & RES_DEBUG) in res_queryN()
2212 n = res_nsend(res, buf, n, answer, anslen); in res_queryN()
2216 if (res->options & RES_DEBUG) in res_queryN()
2228 if ((res->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0 && in res_queryN()
2229 ((oflags ^ res->_flags) & RES_F_EDNS0ERR) != 0) { in res_queryN()
2230 res->_flags |= RES_F_EDNS0ERR; in res_queryN()
2232 if (res->options & RES_DEBUG) in res_queryN()
2239 if (res->options & RES_DEBUG) in res_queryN()
2281 res_searchN(const char *name, struct res_target *target, res_state res) in res_searchN() argument
2310 ret = res_queryN(cp, target, res); in res_searchN()
2319 if (dots >= res->ndots) { in res_searchN()
2320 ret = res_querydomainN(name, NULL, target, res); in res_searchN()
2333 if ((!dots && (res->options & RES_DEFNAMES)) || in res_searchN()
2334 (dots && !trailing_dot && (res->options & RES_DNSRCH))) { in res_searchN()
2341 _resolv_populate_res_for_net(res); in res_searchN()
2343 for (domain = (const char * const *)res->dnsrch; in res_searchN()
2347 ret = res_querydomainN(name, *domain, target, res); in res_searchN()
2391 if (!(res->options & RES_DNSRCH)) in res_searchN()
2402 ret = res_querydomainN(name, NULL, target, res); in res_searchN()
2430 struct res_target *target, res_state res) in res_querydomainN() argument
2440 if (res->options & RES_DEBUG) in res_querydomainN()
2468 return res_queryN(longname, target, res); in res_querydomainN()