1 /* $Id: fake-socket.h,v 1.3 2002/04/12 03:35:40 tim Exp $ */
9 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE
10 # define _SS_MAXSIZE 128 /* Implementation specific max size */
11 # define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
13 struct sockaddr_storage {
14 struct sockaddr ss_sa;
15 char __ss_pad2[_SS_PADSIZE];
17 # define ss_family ss_sa.sa_family
18 #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
20 #ifndef IN6_IS_ADDR_LOOPBACK
21 # define IN6_IS_ADDR_LOOPBACK(a) \
22 (((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \
23 ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1))
24 #endif /* !IN6_IS_ADDR_LOOPBACK */
26 #ifndef HAVE_STRUCT_IN6_ADDR
30 #endif /* !HAVE_STRUCT_IN6_ADDR */
32 #ifndef HAVE_STRUCT_SOCKADDR_IN6
34 unsigned short sin6_family;
36 u_int32_t sin6_flowinfo;
37 struct in6_addr sin6_addr;
39 #endif /* !HAVE_STRUCT_SOCKADDR_IN6 */
42 /* Define it to something that should never appear */
43 #define AF_INET6 AF_MAX
46 #endif /* !_FAKE_SOCKET_H */