summaryrefslogtreecommitdiff
path: root/ares.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-05-17 17:11:28 (GMT)
committerYang Tse <yangsita@gmail.com>2009-05-17 17:11:28 (GMT)
commitb7c7bab713e3bfba6626050806c4f4584207be6d (patch)
tree187cb4e2b9cc48c6588a38cfb3b8a6974f994920 /ares.h
parentc03c7251c9822de3989513a7b927550f6d7bb757 (diff)
downloadc-ares-b7c7bab713e3bfba6626050806c4f4584207be6d.zip
c-ares-b7c7bab713e3bfba6626050806c4f4584207be6d.tar.gz
c-ares-b7c7bab713e3bfba6626050806c4f4584207be6d.tar.bz2
Introduction of ares_library_init() and ares_library_cleanup()
Diffstat (limited to 'ares.h')
-rw-r--r--ares.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/ares.h b/ares.h
index 38750fe..e942d2d 100644
--- a/ares.h
+++ b/ares.h
@@ -93,6 +93,12 @@ extern "C" {
#define ARES_ENONAME 19
#define ARES_EBADHINTS 20
+/* ares_library_init error codes */
+#define ARES_ELOADIPHLPAPI 21
+#define ARES_ELOADADVAPI32 22
+#define ARES_EADDRGetNetworkParams 23
+#define ARES_EADDRSYSTEMFUNCTION036 24
+
/* Flag values */
#define ARES_FLAG_USEVC (1 << 0)
#define ARES_FLAG_PRIMARY (1 << 1)
@@ -161,6 +167,11 @@ extern "C" {
#define ARES_GETSOCK_WRITABLE(bits,num) (bits & (1 << ((num) + \
ARES_GETSOCK_MAXNUM)))
+/* c-ares library initialization flag values */
+#define ARES_LIB_INIT_NONE (0)
+#define ARES_LIB_INIT_WIN32 (1 << 0)
+#define ARES_LIB_INIT_ALL (ARES_LIB_INIT_WIN32)
+
/*
* Typedef our socket type
@@ -235,6 +246,9 @@ typedef void (*ares_nameinfo_callback)(void *arg, int status, int timeouts,
typedef int (*ares_sock_create_callback)(ares_socket_t socket_fd,
int type, void *data);
+int ares_library_init(int flags);
+void ares_library_cleanup(void);
+
int ares_init(ares_channel *channelptr);
int ares_init_options(ares_channel *channelptr, struct ares_options *options,
int optmask);