From 2d64cd55a1069ff7fc7e6d8caf5c67353f1ec55f Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 17 May 2009 17:11:28 +0000 Subject: Introduction of ares_library_init() and ares_library_cleanup() --- ares/ares.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ares/ares.h') diff --git a/ares/ares.h b/ares/ares.h index 38750fed7..e942d2def 100644 --- a/ares/ares.h +++ b/ares/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); -- cgit v1.2.3