summaryrefslogtreecommitdiff
path: root/ares_private.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-11-25 16:26:58 +0000
committerYang Tse <yangsita@gmail.com>2008-11-25 16:26:58 +0000
commitaa1534eb200edb08adcc987db7ea5d3588e43051 (patch)
tree98a737d50df59776ebe724bd087be843e3034ca5 /ares_private.h
parente3d86772c41259e8512268b3ffe545385e0f034f (diff)
downloadc-ares-aa1534eb200edb08adcc987db7ea5d3588e43051.tar.gz
c-ares-aa1534eb200edb08adcc987db7ea5d3588e43051.tar.bz2
c-ares-aa1534eb200edb08adcc987db7ea5d3588e43051.zip
In preparation for the upcomming IPv6 nameservers patch, the internal
ares_addr union is now changed into an internal struct which also holds the address family.
Diffstat (limited to 'ares_private.h')
-rw-r--r--ares_private.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/ares_private.h b/ares_private.h
index a883e50..a7be3f0 100644
--- a/ares_private.h
+++ b/ares_private.h
@@ -115,6 +115,16 @@
# define writev(s,ptr,cnt) ares_writev(s,ptr,cnt)
#endif
+struct ares_addr {
+ int family;
+ union {
+ struct in_addr addr4;
+ struct in6_addr addr6;
+ } addr;
+};
+#define addrV4 addr.addr4
+#define addrV6 addr.addr6
+
struct query;
struct send_request {
@@ -213,17 +223,17 @@ struct query_server_info {
#define PATTERN_MASK 0x1
#define PATTERN_CIDR 0x2
-union ares_addr {
- struct in_addr addr4;
- struct in6_addr addr6;
-};
-
struct apattern {
- union ares_addr addr;
union
{
- union ares_addr addr;
- unsigned short bits;
+ struct in_addr addr4;
+ struct in6_addr addr6;
+ } addr;
+ union
+ {
+ struct in_addr addr4;
+ struct in6_addr addr6;
+ unsigned short bits;
} mask;
int family;
unsigned short type;