3 #ifndef __UNITTEST_RESOLVER_COMMON_INCLUDED__
4 #define __UNITTEST_RESOLVER_COMMON_INCLUDED__
16 const char *expected_addr_,
17 uint16_t expected_port_ = 0,
18 uint16_t expected_zone_ = 0,
19 const char *expected_addr_v4_failover_ =
NULL)
21 #if defined ZMQ_HAVE_WINDOWS
22 if (family == AF_INET6 && expected_addr_v4_failover_ !=
NULL
23 && addr_->
family () == AF_INET) {
27 expected_addr_ = expected_addr_v4_failover_;
30 (
void) expected_addr_v4_failover_;
35 if (family == AF_INET6) {
36 struct in6_addr expected_addr;
37 const sockaddr_in6 *ip6_addr = &addr_->
ipv6;
42 int neq = memcmp (&ip6_addr->sin6_addr, &expected_addr,
43 sizeof (expected_addr_));
49 struct in_addr expected_addr;
50 const sockaddr_in *ip4_addr = &addr_->
ipv4;
60 #endif // __UNITTEST_RESOLVER_COMMON_INCLUDED__