Lines Matching refs:res
406 const struct addrinfo *hints, struct addrinfo **res, unsigned netid) in android_getaddrinfo_proxy() argument
413 *res = NULL; in android_getaddrinfo_proxy()
461 struct addrinfo** nextres = res; in android_getaddrinfo_proxy()
552 if (*res) { in android_getaddrinfo_proxy()
553 freeaddrinfo(*res); in android_getaddrinfo_proxy()
554 *res = NULL; in android_getaddrinfo_proxy()
561 const struct addrinfo *hints, struct addrinfo **res) in getaddrinfo() argument
563 return android_getaddrinfofornet(hostname, servname, hints, NETID_UNSET, MARK_UNSET, res); in getaddrinfo()
568 const struct addrinfo *hints, unsigned netid, unsigned mark, struct addrinfo **res) in android_getaddrinfofornet() argument
577 return android_getaddrinfofornetcontext(hostname, servname, hints, &netcontext, res); in android_getaddrinfofornet()
583 struct addrinfo **res) in android_getaddrinfofornetcontext() argument
596 assert(res != NULL); in android_getaddrinfofornetcontext()
729 hostname, servname, hints, res, netcontext->app_netid); in android_getaddrinfofornetcontext()
777 *res = sentinel.ai_next; in android_getaddrinfofornetcontext()
786 *res = NULL; in android_getaddrinfofornetcontext()
795 const char *servname, struct addrinfo **res, in explore_fqdn() argument
811 assert(res != NULL); in explore_fqdn()
841 *res = result; in explore_fqdn()
858 struct addrinfo **res) in explore_null() argument
868 assert(res != NULL); in explore_null()
870 *res = NULL; in explore_null()
910 *res = sentinel.ai_next; in explore_null()
924 const char *servname, struct addrinfo **res, const char *canonname) in explore_numeric() argument
935 assert(res != NULL); in explore_numeric()
937 *res = NULL; in explore_numeric()
996 *res = sentinel.ai_next; in explore_numeric()
1011 const char *servname, struct addrinfo **res) in explore_numeric_scope() argument
1014 return explore_numeric(pai, hostname, servname, res, hostname); in explore_numeric_scope()
1025 assert(res != NULL); in explore_numeric_scope()
1038 return explore_numeric(pai, hostname, servname, res, hostname); in explore_numeric_scope()
1042 return explore_numeric(pai, hostname, servname, res, hostname); in explore_numeric_scope()
1055 error = explore_numeric(pai, addr, servname, res, hostname); in explore_numeric_scope()
1059 for (cur = *res; cur; cur = cur->ai_next) { in explore_numeric_scope()
1893 res_state res; in _dns_getaddrinfo() local
1968 res = __res_get_state(); in _dns_getaddrinfo()
1969 if (res == NULL) { in _dns_getaddrinfo()
1980 res_setnetid(res, netcontext->dns_netid); in _dns_getaddrinfo()
1981 res_setmark(res, netcontext->dns_mark); in _dns_getaddrinfo()
1982 if (res_searchN(name, &q, res) < 0) { in _dns_getaddrinfo()
1983 __res_put_state(res); in _dns_getaddrinfo()
2002 __res_put_state(res); in _dns_getaddrinfo()
2015 __res_put_state(res); in _dns_getaddrinfo()
2046 struct addrinfo hints, *res0, *res; in _gethtent() local
2093 for (res = res0; res; res = res->ai_next) { in _gethtent()
2095 res->ai_flags = pai->ai_flags; in _gethtent()
2098 if (get_canonname(pai, res, cname) != 0) { in _gethtent()
2152 res_state res) in res_queryN() argument
2181 if (res->options & RES_DEBUG) in res_queryN()
2185 n = res_nmkquery(res, QUERY, name, class, type, NULL, 0, NULL, in res_queryN()
2188 if (n > 0 && (res->options & RES_USE_EDNS0) != 0) in res_queryN()
2189 n = res_nopt(res, n, buf, sizeof(buf), anslen); in res_queryN()
2193 if (res->options & RES_DEBUG) in res_queryN()
2199 n = res_nsend(res, buf, n, answer, anslen); in res_queryN()
2203 if (res->options & RES_DEBUG) in res_queryN()
2214 if (res->options & RES_DEBUG) in res_queryN()
2256 res_searchN(const char *name, struct res_target *target, res_state res) in res_searchN() argument
2285 ret = res_queryN(cp, target, res); in res_searchN()
2294 if (dots >= res->ndots) { in res_searchN()
2295 ret = res_querydomainN(name, NULL, target, res); in res_searchN()
2308 if ((!dots && (res->options & RES_DEFNAMES)) || in res_searchN()
2309 (dots && !trailing_dot && (res->options & RES_DNSRCH))) { in res_searchN()
2316 _resolv_populate_res_for_net(res); in res_searchN()
2318 for (domain = (const char * const *)res->dnsrch; in res_searchN()
2322 ret = res_querydomainN(name, *domain, target, res); in res_searchN()
2366 if (!(res->options & RES_DNSRCH)) in res_searchN()
2377 ret = res_querydomainN(name, NULL, target, res); in res_searchN()
2405 struct res_target *target, res_state res) in res_querydomainN() argument
2415 if (res->options & RES_DEBUG) in res_querydomainN()
2443 return res_queryN(longname, target, res); in res_querydomainN()