aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hostip.h')
-rw-r--r--lib/hostip.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/hostip.h b/lib/hostip.h
index 53093c169..a7e0988a2 100644
--- a/lib/hostip.h
+++ b/lib/hostip.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, 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
@@ -125,11 +125,19 @@ struct hostent;
struct SessionHandle;
struct connectdata;
-void Curl_global_host_cache_init(void);
+/*
+ * Curl_global_host_cache_init() initializes and sets up a global DNS cache.
+ * Global DNS cache is general badness. Do not use. This will be removed in
+ * a future version. Use the share interface instead!
+ *
+ * Returns 0 on success, 1 on failure.
+ */
+int Curl_global_host_cache_init(void);
void Curl_global_host_cache_dtor(void);
struct curl_hash *Curl_global_host_cache_get(void);
-#define Curl_global_host_cache_use(__p) ((__p)->set.global_dns_cache)
+#define Curl_global_host_cache_use(__p) \
+ ((__p)->dns.hostcachetype == HCACHE_GLOBAL)
struct Curl_dns_entry {
Curl_addrinfo *addr;