hostsyn.c 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /***************************************************************************
  2. * _ _ ____ _
  3. * Project ___| | | | _ \| |
  4. * / __| | | | |_) | |
  5. * | (__| |_| | _ <| |___
  6. * \___|\___/|_| \_\_____|
  7. *
  8. * Copyright (C) 1998 - 2021, 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 https://curl.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. /***********************************************************************
  24. * Only for builds using synchronous name resolves
  25. **********************************************************************/
  26. #ifdef CURLRES_SYNCH
  27. #ifdef HAVE_NETINET_IN_H
  28. #include <netinet/in.h>
  29. #endif
  30. #ifdef HAVE_NETDB_H
  31. #include <netdb.h>
  32. #endif
  33. #ifdef HAVE_ARPA_INET_H
  34. #include <arpa/inet.h>
  35. #endif
  36. #ifdef __VMS
  37. #include <in.h>
  38. #include <inet.h>
  39. #endif
  40. #ifdef HAVE_PROCESS_H
  41. #include <process.h>
  42. #endif
  43. #include "urldata.h"
  44. #include "sendf.h"
  45. #include "hostip.h"
  46. #include "hash.h"
  47. #include "share.h"
  48. #include "url.h"
  49. #include "curl_memory.h"
  50. /* The last #include file should be: */
  51. #include "memdebug.h"
  52. /*
  53. * Function provided by the resolver backend to set DNS servers to use.
  54. */
  55. CURLcode Curl_set_dns_servers(struct Curl_easy *data,
  56. char *servers)
  57. {
  58. (void)data;
  59. (void)servers;
  60. return CURLE_NOT_BUILT_IN;
  61. }
  62. /*
  63. * Function provided by the resolver backend to set
  64. * outgoing interface to use for DNS requests
  65. */
  66. CURLcode Curl_set_dns_interface(struct Curl_easy *data,
  67. const char *interf)
  68. {
  69. (void)data;
  70. (void)interf;
  71. return CURLE_NOT_BUILT_IN;
  72. }
  73. /*
  74. * Function provided by the resolver backend to set
  75. * local IPv4 address to use as source address for DNS requests
  76. */
  77. CURLcode Curl_set_dns_local_ip4(struct Curl_easy *data,
  78. const char *local_ip4)
  79. {
  80. (void)data;
  81. (void)local_ip4;
  82. return CURLE_NOT_BUILT_IN;
  83. }
  84. /*
  85. * Function provided by the resolver backend to set
  86. * local IPv6 address to use as source address for DNS requests
  87. */
  88. CURLcode Curl_set_dns_local_ip6(struct Curl_easy *data,
  89. const char *local_ip6)
  90. {
  91. (void)data;
  92. (void)local_ip6;
  93. return CURLE_NOT_BUILT_IN;
  94. }
  95. #endif /* truly sync */