diff options
author | Yang Tse <yangsita@gmail.com> | 2008-11-25 16:26:58 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-11-25 16:26:58 +0000 |
commit | 3b0c5ae46774e8523cb02d6ecb7c2c25ec21e97b (patch) | |
tree | 18e028d5f704f0cbeaf00ebcc41f0f4635636cb9 /ares/ares_private.h | |
parent | 0fa14c8662d29a0b6c8274da452df2cb2843ebcf (diff) |
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/ares_private.h')
-rw-r--r-- | ares/ares_private.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/ares/ares_private.h b/ares/ares_private.h index a883e50f1..a7be3f0ea 100644 --- a/ares/ares_private.h +++ b/ares/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; |