summaryrefslogtreecommitdiff
path: root/lib/hostip.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-03-23 11:10:55 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-03-23 11:10:55 +0100
commit67eb679264b9b6ebd1b123275ac729c8092fce10 (patch)
treebbd7dcc2da53336f8eba7a4a66277c6df0cdfeca /lib/hostip.h
parent9680df4807be3a33640611a79d2e113335e3fc69 (diff)
downloadgnurl-67eb679264b9b6ebd1b123275ac729c8092fce10.tar.gz
gnurl-67eb679264b9b6ebd1b123275ac729c8092fce10.tar.bz2
gnurl-67eb679264b9b6ebd1b123275ac729c8092fce10.zip
ipv6: only probe once
Move ipv6-functional-probe into a single function that is used from all places that need to know. Make the probe function store the result in a static variable so that subsequent invokes just returns the previous result and won't have to probe again.
Diffstat (limited to 'lib/hostip.h')
-rw-r--r--lib/hostip.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/hostip.h b/lib/hostip.h
index 3f27a2b87..c1f4486a6 100644
--- a/lib/hostip.h
+++ b/lib/hostip.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -113,6 +113,15 @@ int Curl_resolv_timeout(struct connectdata *conn, const char *hostname,
int port, struct Curl_dns_entry **dnsentry,
long timeoutms);
+#ifdef CURLRES_IPV6
+/*
+ * Curl_ipv6works() returns TRUE if ipv6 seems to work.
+ */
+bool Curl_ipv6works(void);
+#else
+#define Curl_ipv6works() FALSE
+#endif
+
/*
* Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've
* been set and returns TRUE if they are OK.