Imported Upstream version 3.25.0
[platform/upstream/cmake.git] / Utilities / cmcurl / lib / hostsyn.c
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
25 #include "curl_setup.h"
26
27 /***********************************************************************
28  * Only for builds using synchronous name resolves
29  **********************************************************************/
30 #ifdef CURLRES_SYNCH
31
32 #ifdef HAVE_NETINET_IN_H
33 #include <netinet/in.h>
34 #endif
35 #ifdef HAVE_NETDB_H
36 #include <netdb.h>
37 #endif
38 #ifdef HAVE_ARPA_INET_H
39 #include <arpa/inet.h>
40 #endif
41 #ifdef __VMS
42 #include <in.h>
43 #include <inet.h>
44 #endif
45
46 #ifdef HAVE_PROCESS_H
47 #include <process.h>
48 #endif
49
50 #include "urldata.h"
51 #include "sendf.h"
52 #include "hostip.h"
53 #include "hash.h"
54 #include "share.h"
55 #include "url.h"
56 #include "curl_memory.h"
57 /* The last #include file should be: */
58 #include "memdebug.h"
59
60 /*
61  * Function provided by the resolver backend to set DNS servers to use.
62  */
63 CURLcode Curl_set_dns_servers(struct Curl_easy *data,
64                               char *servers)
65 {
66   (void)data;
67   (void)servers;
68   return CURLE_NOT_BUILT_IN;
69
70 }
71
72 /*
73  * Function provided by the resolver backend to set
74  * outgoing interface to use for DNS requests
75  */
76 CURLcode Curl_set_dns_interface(struct Curl_easy *data,
77                                 const char *interf)
78 {
79   (void)data;
80   (void)interf;
81   return CURLE_NOT_BUILT_IN;
82 }
83
84 /*
85  * Function provided by the resolver backend to set
86  * local IPv4 address to use as source address for DNS requests
87  */
88 CURLcode Curl_set_dns_local_ip4(struct Curl_easy *data,
89                                 const char *local_ip4)
90 {
91   (void)data;
92   (void)local_ip4;
93   return CURLE_NOT_BUILT_IN;
94 }
95
96 /*
97  * Function provided by the resolver backend to set
98  * local IPv6 address to use as source address for DNS requests
99  */
100 CURLcode Curl_set_dns_local_ip6(struct Curl_easy *data,
101                                 const char *local_ip6)
102 {
103   (void)data;
104   (void)local_ip6;
105   return CURLE_NOT_BUILT_IN;
106 }
107
108 #endif /* truly sync */