Lines Matching full:ares
30 * Only for ares-enabled builds
65 #include <ares.h>
66 #include <ares_version.h> /* really old c-ares did not include this by
72 * ares. The caller must make sure that this function is only called when we
73 * have a working ares channel.
95 * 1) Ask ares what sockets it currently plays with, then
96 * 2) wait for the timeout period to check for action on ares' sockets.
97 * 3) tell ares to act on all the sockets marked as "with action"
141 above, as otherwise the ares name resolve will not timeout! */ in Curl_ares_perform()
158 /* c-ares 1.5.0 or later, the callback proto is modified */
196 obtaining a "definitive" one. For old c-ares without getaddrinfo.
198 This is intended to equal the c-ares default timeout. cURL always uses that
199 default value. Unfortunately, c-ares does not expose its default timeout in
213 * environment. Initializes ares library.
230 * Deinitializes ares library.
266 if c ares < 1.20.0: curl set timeout to CARES_TIMEOUT_PER_ATTEMPT (2s) in Curl_resolver_init()
268 if c-ares >= 1.20.0 it already has the timeout to 2s, curl does not need in Curl_resolver_init()
271 if c-ares >= 1.24.0, user can set the timeout via /etc/resolv.conf to in Curl_resolver_init()
272 overwrite c-ares' timeout. in Curl_resolver_init()
289 ares channel before returning error! */ in Curl_resolver_init()
297 * structure). Destroys the ares channel.
309 * 'from' ares channel and passes the resulting channel to the 'to' pointer.
336 * We are equivalent to Curl_resolver_cancel() for the c-ares resolver. We
410 /* Cancel the raw c-ares request, which will fire query_completed_cb() with in Curl_resolver_is_resolved()
494 /* use the timeout period ares returned to us above if less than one in Curl_resolver_wait_resolv()
527 /* failure, so we cancel the ares operation */ in Curl_resolver_wait_resolv()
538 connclose(data->conn, "c-ares resolve failed"); in Curl_resolver_wait_resolv()
577 * ares_query_completed_cb() is the callback that ares will call when
579 * when using ares, is completed either successfully or with failure.
596 /* when this ares handle is getting destroyed, the 'arg' pointer may not in query_completed_cb()
620 /* Only these c-ares status values count as "definitive" for these in query_completed_cb()
651 the first place. Without modifying c-ares, we cannot know exactly in query_completed_cb()
658 c-ares query timeout. That is enough time for a typical parallel in query_completed_cb()
662 c-ares timeout (5 seconds) plus the round trip time for the successful in query_completed_cb()
663 request, which seems bearable. The downside is that c-ares might race in query_completed_cb()
667 c-ares retry cycle each request is. in query_completed_cb()
676 /* c-ares 1.16.0 or later */
679 * ares2addr() converts an address list provided by c-ares to an internal
769 * Curl_resolver_getaddrinfo() - when using ares
818 * accordingly to save a call to getservbyname in inside C-Ares in Curl_resolver_getaddrinfo()
871 /* If server is NULL, this purges all DNS servers from c-ares. Reset it to in Curl_set_dns_servers()
878 /* this now needs to restore the other options set to c-ares */ in Curl_set_dns_servers()
914 #else /* too old c-ares version! */ in Curl_set_dns_servers()
931 #else /* c-ares version too old! */ in Curl_set_dns_interface()
958 #else /* c-ares version too old! */ in Curl_set_dns_local_ip4()
985 #else /* c-ares version too old! */ in Curl_set_dns_local_ip6()