summaryrefslogtreecommitdiff
path: root/ares.h
diff options
context:
space:
mode:
authorDominick Meglio <dcm5151@esu.edu>2005-09-18 16:44:49 +0000
committerDominick Meglio <dcm5151@esu.edu>2005-09-18 16:44:49 +0000
commit6afd5c16d3f7377d47ee3d9bb3237b636cfe2f35 (patch)
tree7ed1eb594f2bb960952d69586063567769b8f767 /ares.h
parent8df407ed7d946341302de0e5493a9636743b60ae (diff)
downloadc-ares-6afd5c16d3f7377d47ee3d9bb3237b636cfe2f35.tar.gz
c-ares-6afd5c16d3f7377d47ee3d9bb3237b636cfe2f35.tar.bz2
c-ares-6afd5c16d3f7377d47ee3d9bb3237b636cfe2f35.zip
Added constants that will be used by ares_getaddrinfo. Made ares_getnameinfo use the reentrant getservbyport (getservbyport_r) if it isavailable to ensure it works properly in a threaded environment
Diffstat (limited to 'ares.h')
-rw-r--r--ares.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/ares.h b/ares.h
index 4fca986..fd01474 100644
--- a/ares.h
+++ b/ares.h
@@ -69,6 +69,10 @@ extern "C" {
/* ares_getnameinfo error codes */
#define ARES_EBADFLAGS 18
+/* ares_getaddrinfo error codes */
+#define ARES_ENONAME 19
+#define ARES_EBADHINTS 20
+
/* Flag values */
#define ARES_FLAG_USEVC (1 << 0)
#define ARES_FLAG_PRIMARY (1 << 1)
@@ -104,9 +108,27 @@ extern "C" {
#define ARES_NI_LOOKUPHOST (1 << 8)
#define ARES_NI_LOOKUPSERVICE (1 << 9)
/* Reserved for future use */
-#define ARES_NI_IDN (1 << 10)
-#define ARES_NI_ALLOW_UNASSIGNED (1 << 11)
-#define ARES_NI_USE_STD3_ASCII_RULES (1 << 12)
+#define ARES_NI_IDN (1 << 10)
+#define ARES_NI_IDN_ALLOW_UNASSIGNED (1 << 11)
+#define ARES_NI_IDN_USE_STD3_ASCII_RULES (1 << 12)
+
+/* Addrinfo flag values */
+#define ARES_AI_CANONNAME (1 << 0)
+#define ARES_AI_NUMERICHOST (1 << 1)
+#define ARES_AI_PASSIVE (1 << 2)
+#define ARES_AI_NUMERICSERV (1 << 3)
+#define ARES_AI_V4MAPPED (1 << 4)
+#define ARES_AI_ALL (1 << 5)
+#define ARES_AI_ADDRCONFIG (1 << 6)
+/* Reserved for future use */
+#define ARES_AI_IDN (1 << 10)
+#define ARES_AI_IDN_ALLOW_UNASSIGNED (1 << 11)
+#define ARES_AI_IDN_USE_STD3_ASCII_RULES (1 << 12)
+#define ARES_AI_CANONIDN (1 << 13)
+
+#define ARES_AI_MASK (ARES_AI_CANONNAME|ARES_AI_NUMERICHOST|ARES_AI_PASSIVE| \
+ ARES_AI_NUMERICSERV|ARES_AI_V4MAPPED|ARES_AI_ALL| \
+ ARES_AI_ADDRCONFIG)
struct ares_options {
int flags;