1 /* $Id: fake-socket.h,v 1.3 2002/04/12 03:35:40 tim Exp $ */
6 #pragma ident "%Z%%M% %I% %E% SMI"
13 #include "sys/types.h"
15 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE
16 # define _SS_MAXSIZE 128 /* Implementation specific max size */
17 # define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
19 struct sockaddr_storage
{
20 struct sockaddr ss_sa
;
21 char __ss_pad2
[_SS_PADSIZE
];
23 # define ss_family ss_sa.sa_family
24 #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
26 #ifndef IN6_IS_ADDR_LOOPBACK
27 # define IN6_IS_ADDR_LOOPBACK(a) \
28 (((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \
29 ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1))
30 #endif /* !IN6_IS_ADDR_LOOPBACK */
32 #ifndef HAVE_STRUCT_IN6_ADDR
36 #endif /* !HAVE_STRUCT_IN6_ADDR */
38 #ifndef HAVE_STRUCT_SOCKADDR_IN6
40 unsigned short sin6_family
;
42 u_int32_t sin6_flowinfo
;
43 struct in6_addr sin6_addr
;
45 #endif /* !HAVE_STRUCT_SOCKADDR_IN6 */
48 /* Define it to something that should never appear */
49 #define AF_INET6 AF_MAX
56 #endif /* _FAKE_SOCKET_H */