113498266Sopenharmony_ci/***************************************************************************
213498266Sopenharmony_ci *                                  _   _ ____  _
313498266Sopenharmony_ci *  Project                     ___| | | |  _ \| |
413498266Sopenharmony_ci *                             / __| | | | |_) | |
513498266Sopenharmony_ci *                            | (__| |_| |  _ <| |___
613498266Sopenharmony_ci *                             \___|\___/|_| \_\_____|
713498266Sopenharmony_ci *
813498266Sopenharmony_ci * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
913498266Sopenharmony_ci *
1013498266Sopenharmony_ci * This software is licensed as described in the file COPYING, which
1113498266Sopenharmony_ci * you should have received as part of this distribution. The terms
1213498266Sopenharmony_ci * are also available at https://curl.se/docs/copyright.html.
1313498266Sopenharmony_ci *
1413498266Sopenharmony_ci * You may opt to use, copy, modify, merge, publish, distribute and/or sell
1513498266Sopenharmony_ci * copies of the Software, and permit persons to whom the Software is
1613498266Sopenharmony_ci * furnished to do so, under the terms of the COPYING file.
1713498266Sopenharmony_ci *
1813498266Sopenharmony_ci * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
1913498266Sopenharmony_ci * KIND, either express or implied.
2013498266Sopenharmony_ci *
2113498266Sopenharmony_ci * SPDX-License-Identifier: curl
2213498266Sopenharmony_ci *
2313498266Sopenharmony_ci ***************************************************************************/
2413498266Sopenharmony_ci
2513498266Sopenharmony_ci#include "curl_setup.h"
2613498266Sopenharmony_ci
2713498266Sopenharmony_ci/***********************************************************************
2813498266Sopenharmony_ci * Only for builds using synchronous name resolves
2913498266Sopenharmony_ci **********************************************************************/
3013498266Sopenharmony_ci#ifdef CURLRES_SYNCH
3113498266Sopenharmony_ci
3213498266Sopenharmony_ci#ifdef HAVE_NETINET_IN_H
3313498266Sopenharmony_ci#include <netinet/in.h>
3413498266Sopenharmony_ci#endif
3513498266Sopenharmony_ci#ifdef HAVE_NETDB_H
3613498266Sopenharmony_ci#include <netdb.h>
3713498266Sopenharmony_ci#endif
3813498266Sopenharmony_ci#ifdef HAVE_ARPA_INET_H
3913498266Sopenharmony_ci#include <arpa/inet.h>
4013498266Sopenharmony_ci#endif
4113498266Sopenharmony_ci#ifdef __VMS
4213498266Sopenharmony_ci#include <in.h>
4313498266Sopenharmony_ci#include <inet.h>
4413498266Sopenharmony_ci#endif
4513498266Sopenharmony_ci
4613498266Sopenharmony_ci#include "urldata.h"
4713498266Sopenharmony_ci#include "sendf.h"
4813498266Sopenharmony_ci#include "hostip.h"
4913498266Sopenharmony_ci#include "hash.h"
5013498266Sopenharmony_ci#include "share.h"
5113498266Sopenharmony_ci#include "url.h"
5213498266Sopenharmony_ci#include "curl_memory.h"
5313498266Sopenharmony_ci/* The last #include file should be: */
5413498266Sopenharmony_ci#include "memdebug.h"
5513498266Sopenharmony_ci
5613498266Sopenharmony_ci/*
5713498266Sopenharmony_ci * Function provided by the resolver backend to set DNS servers to use.
5813498266Sopenharmony_ci */
5913498266Sopenharmony_ciCURLcode Curl_set_dns_servers(struct Curl_easy *data,
6013498266Sopenharmony_ci                              char *servers)
6113498266Sopenharmony_ci{
6213498266Sopenharmony_ci  (void)data;
6313498266Sopenharmony_ci  (void)servers;
6413498266Sopenharmony_ci  return CURLE_NOT_BUILT_IN;
6513498266Sopenharmony_ci
6613498266Sopenharmony_ci}
6713498266Sopenharmony_ci
6813498266Sopenharmony_ci/*
6913498266Sopenharmony_ci * Function provided by the resolver backend to set
7013498266Sopenharmony_ci * outgoing interface to use for DNS requests
7113498266Sopenharmony_ci */
7213498266Sopenharmony_ciCURLcode Curl_set_dns_interface(struct Curl_easy *data,
7313498266Sopenharmony_ci                                const char *interf)
7413498266Sopenharmony_ci{
7513498266Sopenharmony_ci  (void)data;
7613498266Sopenharmony_ci  (void)interf;
7713498266Sopenharmony_ci  return CURLE_NOT_BUILT_IN;
7813498266Sopenharmony_ci}
7913498266Sopenharmony_ci
8013498266Sopenharmony_ci/*
8113498266Sopenharmony_ci * Function provided by the resolver backend to set
8213498266Sopenharmony_ci * local IPv4 address to use as source address for DNS requests
8313498266Sopenharmony_ci */
8413498266Sopenharmony_ciCURLcode Curl_set_dns_local_ip4(struct Curl_easy *data,
8513498266Sopenharmony_ci                                const char *local_ip4)
8613498266Sopenharmony_ci{
8713498266Sopenharmony_ci  (void)data;
8813498266Sopenharmony_ci  (void)local_ip4;
8913498266Sopenharmony_ci  return CURLE_NOT_BUILT_IN;
9013498266Sopenharmony_ci}
9113498266Sopenharmony_ci
9213498266Sopenharmony_ci/*
9313498266Sopenharmony_ci * Function provided by the resolver backend to set
9413498266Sopenharmony_ci * local IPv6 address to use as source address for DNS requests
9513498266Sopenharmony_ci */
9613498266Sopenharmony_ciCURLcode Curl_set_dns_local_ip6(struct Curl_easy *data,
9713498266Sopenharmony_ci                                const char *local_ip6)
9813498266Sopenharmony_ci{
9913498266Sopenharmony_ci  (void)data;
10013498266Sopenharmony_ci  (void)local_ip6;
10113498266Sopenharmony_ci  return CURLE_NOT_BUILT_IN;
10213498266Sopenharmony_ci}
10313498266Sopenharmony_ci
10413498266Sopenharmony_ci#endif /* truly sync */
105