summaryrefslogtreecommitdiff
path: root/lib/README.hostip
blob: 03d8966684e33b6f174f5154e8a820b3a2779c57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 hostip.c explained
 ==================

 The main COMPILE-TIME DEFINES to keep in mind when reading the host*.c
 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
 name resolves. This can be Windows or *nix.

 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.

 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.

 The host*.c sources files are split up like this:

 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

 The hostip.h is the single united header file for all this. It defines the
 CURLRES_* defines based on the config*.h and curl_setup.h defines.