7 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE
8 #define _SS_MAXSIZE 128 /* Implementation specific max size */
9 #define _SS_ALIGNSIZE (sizeof(int))
10 #define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(u_short))
11 #define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof(u_short) + \
12 _SS_PAD1SIZE + _SS_ALIGNSIZE))
14 struct sockaddr_storage {
16 char __ss_pad1[_SS_PAD1SIZE];
18 char __ss_pad2[_SS_PAD2SIZE];
20 #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
22 #ifndef IN6_IS_ADDR_LOOPBACK
23 #define IN6_IS_ADDR_LOOPBACK(a) \
24 (((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \
25 ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1))
26 #endif /* !IN6_IS_ADDR_LOOPBACK */
28 #ifndef HAVE_STRUCT_IN6_ADDR
32 #endif /* !HAVE_STRUCT_IN6_ADDR */
34 #ifndef HAVE_STRUCT_SOCKADDR_IN6
36 unsigned short sin6_family;
38 u_int32_t sin6_flowinfo;
39 struct in6_addr sin6_addr;
41 #endif /* !HAVE_STRUCT_SOCKADDR_IN6 */
44 /* Define it to something that should never appear */
45 #define AF_INET6 AF_MAX
48 #endif /* !_FAKE_SOCKET_H */