Git init
[external/curl.git] / lib / README.hostip
1  hostip.c explained
2  ==================
3
4  The main COMPILE-TIME DEFINES to keep in mind when reading the host*.c
5  source file are these:
6
7  CURLRES_IPV6 - this host has getaddrinfo() and family, and thus we use
8  that. The host may not be able to resolve IPv6, but we don't really have to
9  take that into account. Hosts that aren't IPv6-enabled have CURLRES_IPV4
10  defined.
11
12  CURLRES_ARES - is defined if libcurl is built to use c-ares for asynchronous
13  name resolves. It cannot have ENABLE_IPV6 defined at the same time, as c-ares
14  has no ipv6 support. This can be Windows or *nix.
15
16  CURLRES_THREADED - is defined if libcurl is built to run under (native)
17  Windows, and then the name resolve will be done in a new thread, and the
18  supported asynch API will be the same as for ares-builds.
19
20  If any of the two previous are defined, CURLRES_ASYNCH is defined too. If
21  libcurl is not built to use an asynchronous resolver, CURLRES_SYNCH is
22  defined.
23
24  The host*.c sources files are split up like this:
25
26  hostip.c   - method-independent resolver functions and utility functions
27  hostasyn.c - functions for asynchronous name resolves
28  hostsyn.c  - functions for synchronous name resolves
29  hostares.c - functions for ares-using name resolves
30  hostthre.c - functions for threaded name resolves
31  hostip4.c  - ipv4-specific functions
32  hostip6.c  - ipv6-specific functions
33
34  The hostip.h is the single united header file for all this. It defines the
35  CURLRES_* defines based on the config*.h and setup.h defines.