hostsyn.c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /***************************************************************************
  2. * _ _ ____ _
  3. * Project ___| | | | _ \| |
  4. * / __| | | | |_) | |
  5. * | (__| |_| | _ <| |___
  6. * \___|\___/|_| \_\_____|
  7. *
  8. * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
  9. *
  10. * This software is licensed as described in the file COPYING, which
  11. * you should have received as part of this distribution. The terms
  12. * are also available at http://curl.haxx.se/docs/copyright.html.
  13. *
  14. * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. * copies of the Software, and permit persons to whom the Software is
  16. * furnished to do so, under the terms of the COPYING file.
  17. *
  18. * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. * KIND, either express or implied.
  20. *
  21. ***************************************************************************/
  22. #include "curl_setup.h"
  23. #ifdef HAVE_NETINET_IN_H
  24. #include <netinet/in.h>
  25. #endif
  26. #ifdef HAVE_NETDB_H
  27. #include <netdb.h>
  28. #endif
  29. #ifdef HAVE_ARPA_INET_H
  30. #include <arpa/inet.h>
  31. #endif
  32. #ifdef __VMS
  33. #include <in.h>
  34. #include <inet.h>
  35. #endif
  36. #ifdef HAVE_PROCESS_H
  37. #include <process.h>
  38. #endif
  39. #include "urldata.h"
  40. #include "sendf.h"
  41. #include "hostip.h"
  42. #include "hash.h"
  43. #include "share.h"
  44. #include "strerror.h"
  45. #include "url.h"
  46. #define _MPRINTF_REPLACE /* use our functions only */
  47. #include <curl/mprintf.h>
  48. #include "curl_memory.h"
  49. /* The last #include file should be: */
  50. #include "memdebug.h"
  51. /***********************************************************************
  52. * Only for builds using synchronous name resolves
  53. **********************************************************************/
  54. #ifdef CURLRES_SYNCH
  55. /*
  56. * Function provided by the resolver backend to set DNS servers to use.
  57. */
  58. CURLcode Curl_set_dns_servers(struct SessionHandle *data,
  59. char *servers)
  60. {
  61. (void)data;
  62. (void)servers;
  63. return CURLE_NOT_BUILT_IN;
  64. }
  65. /*
  66. * Function provided by the resolver backend to set
  67. * outgoing interface to use for DNS requests
  68. */
  69. CURLcode Curl_set_dns_interface(struct SessionHandle *data,
  70. const char *interf)
  71. {
  72. (void)data;
  73. (void)interf;
  74. return CURLE_NOT_BUILT_IN;
  75. }
  76. /*
  77. * Function provided by the resolver backend to set
  78. * local IPv4 address to use as source address for DNS requests
  79. */
  80. CURLcode Curl_set_dns_local_ip4(struct SessionHandle *data,
  81. const char *local_ip4)
  82. {
  83. (void)data;
  84. (void)local_ip4;
  85. return CURLE_NOT_BUILT_IN;
  86. }
  87. /*
  88. * Function provided by the resolver backend to set
  89. * local IPv6 address to use as source address for DNS requests
  90. */
  91. CURLcode Curl_set_dns_local_ip6(struct SessionHandle *data,
  92. const char *local_ip6)
  93. {
  94. (void)data;
  95. (void)local_ip6;
  96. return CURLE_NOT_BUILT_IN;
  97. }
  98. #endif /* truly sync */