diff options
author | Daniel Stenberg <daniel@haxx.se> | 2011-03-23 11:10:55 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-03-23 11:10:55 +0100 |
commit | 67eb679264b9b6ebd1b123275ac729c8092fce10 (patch) | |
tree | bbd7dcc2da53336f8eba7a4a66277c6df0cdfeca /lib/hostip.h | |
parent | 9680df4807be3a33640611a79d2e113335e3fc69 (diff) | |
download | curl-67eb679264b9b6ebd1b123275ac729c8092fce10.tar.gz |
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.h | 11 |
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. |