hostsyn.c 2.8 KB

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