diff options
Diffstat (limited to 'Utilities/cmcurl/lib/hostip.h')
-rw-r--r-- | Utilities/cmcurl/lib/hostip.h | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/Utilities/cmcurl/lib/hostip.h b/Utilities/cmcurl/lib/hostip.h index 374b06c855..c495c21e02 100644 --- a/Utilities/cmcurl/lib/hostip.h +++ b/Utilities/cmcurl/lib/hostip.h @@ -7,11 +7,11 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. + * are also available at https://curl.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is @@ -59,13 +59,13 @@ struct connectdata; * Global DNS cache is general badness. Do not use. This will be removed in * a future version. Use the share interface instead! * - * Returns a struct curl_hash pointer on success, NULL on failure. + * Returns a struct Curl_hash pointer on success, NULL on failure. */ -struct curl_hash *Curl_global_host_cache_init(void); +struct Curl_hash *Curl_global_host_cache_init(void); struct Curl_dns_entry { struct Curl_addrinfo *addr; - /* timestamp == 0 -- CURLOPT_RESOLVE entry, doesn't timeout */ + /* timestamp == 0 -- permanent CURLOPT_RESOLVE entry (doesn't time out) */ time_t timestamp; /* use-counter, use Curl_resolv_unlock to release reference */ long inuse; @@ -85,12 +85,12 @@ enum resolve_t { CURLRESOLV_RESOLVED = 0, CURLRESOLV_PENDING = 1 }; -enum resolve_t Curl_resolv(struct connectdata *conn, +enum resolve_t Curl_resolv(struct Curl_easy *data, const char *hostname, int port, bool allowDOH, struct Curl_dns_entry **dnsentry); -enum resolve_t Curl_resolv_timeout(struct connectdata *conn, +enum resolve_t Curl_resolv_timeout(struct Curl_easy *data, const char *hostname, int port, struct Curl_dns_entry **dnsentry, timediff_t timeoutms); @@ -99,7 +99,7 @@ enum resolve_t Curl_resolv_timeout(struct connectdata *conn, /* * Curl_ipv6works() returns TRUE if IPv6 seems to work. */ -bool Curl_ipv6works(struct connectdata *conn); +bool Curl_ipv6works(struct Curl_easy *data); #else #define Curl_ipv6works(x) FALSE #endif @@ -108,7 +108,7 @@ bool Curl_ipv6works(struct connectdata *conn); * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've * been set and returns TRUE if they are OK. */ -bool Curl_ipvalid(struct connectdata *conn); +bool Curl_ipvalid(struct Curl_easy *data, struct connectdata *conn); /* @@ -117,7 +117,7 @@ bool Curl_ipvalid(struct connectdata *conn); * name resolve layers (selected at build-time). They all take this same set * of arguments */ -struct Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, +struct Curl_addrinfo *Curl_getaddrinfo(struct Curl_easy *data, const char *hostname, int port, int *waitp); @@ -128,7 +128,7 @@ void Curl_resolv_unlock(struct Curl_easy *data, struct Curl_dns_entry *dns); /* init a new dns cache and return success */ -int Curl_mk_dnscache(struct curl_hash *hash); +int Curl_mk_dnscache(struct Curl_hash *hash); /* prune old entries from the DNS cache */ void Curl_hostcache_prune(struct Curl_easy *data); @@ -148,7 +148,7 @@ int curl_dogetnameinfo(GETNAMEINFO_QUAL_ARG1 GETNAMEINFO_TYPE_ARG1 sa, /* IPv4 threadsafe resolve function used for synch and asynch builds */ struct Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, int port); -CURLcode Curl_once_resolved(struct connectdata *conn, bool *protocol_connect); +CURLcode Curl_once_resolved(struct Curl_easy *data, bool *protocol_connect); /* * Curl_addrinfo_callback() is used when we build with any asynch specialty. @@ -156,7 +156,7 @@ CURLcode Curl_once_resolved(struct connectdata *conn, bool *protocol_connect); * status is CURL_ASYNC_SUCCESS. Twiddles fields in conn to indicate async * request completed whether successful or failed. */ -CURLcode Curl_addrinfo_callback(struct connectdata *conn, +CURLcode Curl_addrinfo_callback(struct Curl_easy *data, int status, struct Curl_addrinfo *ai); @@ -177,7 +177,7 @@ void Curl_printable_address(const struct Curl_addrinfo *ip, * use, or we'll leak memory! */ struct Curl_dns_entry * -Curl_fetch_addr(struct connectdata *conn, +Curl_fetch_addr(struct Curl_easy *data, const char *hostname, int port); @@ -234,16 +234,15 @@ CURLcode Curl_set_dns_local_ip6(struct Curl_easy *data, /* * Clean off entries from the cache */ -void Curl_hostcache_clean(struct Curl_easy *data, struct curl_hash *hash); +void Curl_hostcache_clean(struct Curl_easy *data, struct Curl_hash *hash); /* * Populate the cache with specified entries from CURLOPT_RESOLVE. */ CURLcode Curl_loadhostpairs(struct Curl_easy *data); - -CURLcode Curl_resolv_check(struct connectdata *conn, +CURLcode Curl_resolv_check(struct Curl_easy *data, struct Curl_dns_entry **dns); -int Curl_resolv_getsock(struct connectdata *conn, +int Curl_resolv_getsock(struct Curl_easy *data, curl_socket_t *socks); #endif /* HEADER_CURL_HOSTIP_H */ |