7 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE
8 # define _SS_MAXSIZE 128 /* Implementation specific max size */
9 # define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
11 struct sockaddr_storage {
12 struct sockaddr ss_sa;
13 char __ss_pad2[_SS_PADSIZE];
15 # define ss_family ss_sa.sa_family
16 #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
18 #ifndef IN6_IS_ADDR_LOOPBACK
19 # define IN6_IS_ADDR_LOOPBACK(a) \
20 (((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \
21 ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1))
22 #endif /* !IN6_IS_ADDR_LOOPBACK */
24 #ifndef HAVE_STRUCT_IN6_ADDR
28 #endif /* !HAVE_STRUCT_IN6_ADDR */
30 #ifndef HAVE_STRUCT_SOCKADDR_IN6
32 unsigned short sin6_family;
34 u_int32_t sin6_flowinfo;
35 struct in6_addr sin6_addr;
37 #endif /* !HAVE_STRUCT_SOCKADDR_IN6 */
40 /* Define it to something that should never appear */
41 #define AF_INET6 AF_MAX
44 #endif /* !_FAKE_SOCKET_H */