summaryrefslogtreecommitdiff
path: root/lib/hostip.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-01-30 01:00:52 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-04-25 19:47:16 +0200
commit24d84da0731f680a9b19653a450d4843f190d6b8 (patch)
treeb6a554ace49210a949d623bf7c97c8564bb9e41d /lib/hostip.h
parentca015f1a45c68aa1d641678cfc13ce0df0c58fe0 (diff)
downloadcurl-24d84da0731f680a9b19653a450d4843f190d6b8.tar.gz
asynch resolvers: cleanup
Fixed indents, coding conventions and white space edits. Modified the c-ares completion callback function to again NOT read the conn data when the ares handle is being taken down as then it may have been freed already.
Diffstat (limited to 'lib/hostip.h')
-rw-r--r--lib/hostip.h40
1 files changed, 24 insertions, 16 deletions
diff --git a/lib/hostip.h b/lib/hostip.h
index 70ce7cd74..5c9250991 100644
--- a/lib/hostip.h
+++ b/lib/hostip.h
@@ -104,45 +104,53 @@ bool Curl_ipv6works(void);
*/
bool Curl_ipvalid(struct connectdata *conn);
+/********* functions in the internal asynch resolver interface ****** */
+
/*
- * Curl_resolver_global_init() - the generic low-level name resolver API.
+ * Curl_resolver_global_init()
+ *
* Called from curl_global_init() to initialize global resolver environment.
* Returning anything else than CURLE_OK fails curl_global_init().
*/
int Curl_resolver_global_init(void);
/*
- * Curl_resolver_global_cleanup() - the generic low-level name resolver API.
+ * Curl_resolver_global_cleanup()
* Called from curl_global_cleanup() to destroy global resolver environment.
*/
void Curl_resolver_global_cleanup(void);
/*
- * Curl_resolver_init() - the generic low-level name resolve API.
- * Called from curl_easy_init() -> Curl_open() to initialize resolver URL-state specific environment
- * ('resolver' member of the UrlState structure).
- * Should fill the passed pointer by the initialized handler.
- * Returning anything else than CURLE_OK fails curl_easy_init() with the correspondent code.
+ * Curl_resolver_init()
+ * Called from curl_easy_init() -> Curl_open() to initialize resolver
+ * URL-state specific environment ('resolver' member of the UrlState
+ * structure). Should fill the passed pointer by the initialized handler.
+ * Returning anything else than CURLE_OK fails curl_easy_init() with the
+ * correspondent code.
*/
int Curl_resolver_init(void **resolver);
/*
- * Curl_resolver_cleanup() - the generic low-level name resolve API.
- * Called from curl_easy_cleanup() -> Curl_close() to cleanup resolver URL-state specific environment
- * ('resolver' member of the UrlState structure).
- * Should destroy the handler and free all resources connected to it.
+ * Curl_resolver_cleanup()
+ * Called from curl_easy_cleanup() -> Curl_close() to cleanup resolver
+ * URL-state specific environment ('resolver' member of the UrlState
+ * structure). Should destroy the handler and free all resources connected to
+ * it.
*/
void Curl_resolver_cleanup(void *resolver);
/*
- * Curl_resolver_duphandle() - the generic low-level name resolve API.
- * Called from curl_easy_duphandle() to duplicate resolver URL-state specific environment
- * ('resolver' member of the UrlState structure).
- * Should duplicate the 'from' handle and pass the resulting handle to the 'to' pointer.
- * Returning anything else than CURLE_OK causes failed curl_easy_duphandle() call.
+ * Curl_resolver_duphandle()
+ * Called from curl_easy_duphandle() to duplicate resolver URL-state specific
+ * environment ('resolver' member of the UrlState structure). Should
+ * duplicate the 'from' handle and pass the resulting handle to the 'to'
+ * pointer. Returning anything else than CURLE_OK causes failed
+ * curl_easy_duphandle() call.
*/
int Curl_resolver_duphandle(void **to, void *from);
+/********** end of generic resolver interface functions *****************/
+
/*
* Curl_getaddrinfo() is the generic low-level name resolve API within this
* source file. There are several versions of this function - for different