README.hostip 1.5 KB

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