Base code merged to SPIN 2.4
[platform/upstream/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. This can be Windows or *nix.
14
15  CURLRES_THREADED - is defined if libcurl is built to use threading for
16  asynchronous name resolves. The name resolve will be done in a new thread,
17  and the supported asynch API will be the same as for ares-builds. This is
18  the default under (native) Windows.
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  asyn-ares.c   - functions for asynchronous name resolves using c-ares
30  asyn-thread.c - functions for asynchronous name resolves using threads
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 curl_setup.h defines.