2013-01-04 02:50:28 +01:00
|
|
|
hostip.c explained
|
2005-01-14 14:43:29 +01:00
|
|
|
==================
|
|
|
|
|
2013-01-04 02:50:28 +01:00
|
|
|
The main COMPILE-TIME DEFINES to keep in mind when reading the host*.c
|
2005-01-14 14:43:29 +01:00
|
|
|
source file are these:
|
|
|
|
|
|
|
|
CURLRES_IPV6 - this host has getaddrinfo() and family, and thus we use
|
|
|
|
that. The host may not be able to resolve IPv6, but we don't really have to
|
|
|
|
take that into account. Hosts that aren't IPv6-enabled have CURLRES_IPV4
|
|
|
|
defined.
|
|
|
|
|
|
|
|
CURLRES_ARES - is defined if libcurl is built to use c-ares for asynchronous
|
2014-06-18 11:04:22 +02:00
|
|
|
name resolves. This can be Windows or *nix.
|
2005-01-14 14:43:29 +01:00
|
|
|
|
2014-06-18 11:04:22 +02:00
|
|
|
CURLRES_THREADED - is defined if libcurl is built to use threading for
|
|
|
|
asynchronous name resolves. The name resolve will be done in a new thread,
|
|
|
|
and the supported asynch API will be the same as for ares-builds. This is
|
|
|
|
the default under (native) Windows.
|
2005-01-14 14:43:29 +01:00
|
|
|
|
|
|
|
If any of the two previous are defined, CURLRES_ASYNCH is defined too. If
|
|
|
|
libcurl is not built to use an asynchronous resolver, CURLRES_SYNCH is
|
|
|
|
defined.
|
|
|
|
|
2013-01-04 02:50:28 +01:00
|
|
|
The host*.c sources files are split up like this:
|
2005-01-14 14:43:29 +01:00
|
|
|
|
2014-06-18 11:04:22 +02:00
|
|
|
hostip.c - method-independent resolver functions and utility functions
|
|
|
|
hostasyn.c - functions for asynchronous name resolves
|
|
|
|
hostsyn.c - functions for synchronous name resolves
|
|
|
|
asyn-ares.c - functions for asynchronous name resolves using c-ares
|
|
|
|
asyn-thread.c - functions for asynchronous name resolves using threads
|
|
|
|
hostip4.c - ipv4-specific functions
|
|
|
|
hostip6.c - ipv6-specific functions
|
2005-01-14 14:43:29 +01:00
|
|
|
|
2013-01-04 02:50:28 +01:00
|
|
|
The hostip.h is the single united header file for all this. It defines the
|
2013-01-06 19:06:49 +01:00
|
|
|
CURLRES_* defines based on the config*.h and curl_setup.h defines.
|