• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_SET_ADDR_LOOPBACK
10 #define IN6_SET_ADDR_LOOPBACK(a)				\
11 	do {							\
12 		memset((a)->s6_bytes,0,sizeof(struct in6_addr));\
13 		(a)->s6_bytes[15] = 1;				\
14 	} while (0)
15 
IN6ADDR_SETLOOPBACK(struct sockaddr_in6 * a)16 void IN6ADDR_SETLOOPBACK(struct sockaddr_in6 *a)
17 {
18 	a->sin6_family = AF_INET6;
19 	a->sin6_port = 0;
20 	a->sin6_flowinfo = 0;
21 	IN6_SET_ADDR_LOOPBACK(&a->sin6_addr);
22 	a->sin6_scope_id = 0;
23 }
24