1 #ifndef WIN32_LEAN_AND_MEAN 2 #define WIN32_LEAN_AND_MEAN 3 #endif 4 #undef __CRT__NO_INLINE 5 #define __CRT__NO_INLINE 6 #include <winsock2.h> 7 #include <ws2tcpip.h> 8 9 #undef IN6_IS_ADDR_UNSPECIFIED 10 #define IN6_IS_ADDR_UNSPECIFIED(a) ( ((a)->s6_words[0] == 0) && \ 11 ((a)->s6_words[1] == 0) && \ 12 ((a)->s6_words[2] == 0) && \ 13 ((a)->s6_words[3] == 0) && \ 14 ((a)->s6_words[4] == 0) && \ 15 ((a)->s6_words[5] == 0) && \ 16 ((a)->s6_words[6] == 0) && \ 17 ((a)->s6_words[7] == 0) ) 18 IN6ADDR_ISANY(const struct sockaddr_in6 * a)19int IN6ADDR_ISANY(const struct sockaddr_in6 *a) 20 { 21 return ((a->sin6_family == AF_INET6) && 22 IN6_IS_ADDR_UNSPECIFIED(&a->sin6_addr)); 23 } 24