| /* $Id: fake-socket.h,v 1.3 2002/04/12 03:35:40 tim Exp $ */ |
| #ifndef HAVE_STRUCT_SOCKADDR_STORAGE |
| # define _SS_MAXSIZE 128 /* Implementation specific max size */ |
| # define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr)) |
| struct sockaddr_storage { |
| char __ss_pad2[_SS_PADSIZE]; |
| # define ss_family ss_sa.sa_family |
| #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */ |
| #ifndef IN6_IS_ADDR_LOOPBACK |
| # define IN6_IS_ADDR_LOOPBACK(a) \ |
| (((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \ |
| ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1)) |
| #endif /* !IN6_IS_ADDR_LOOPBACK */ |
| #ifndef HAVE_STRUCT_IN6_ADDR |
| #endif /* !HAVE_STRUCT_IN6_ADDR */ |
| #ifndef HAVE_STRUCT_SOCKADDR_IN6 |
| unsigned short sin6_family; |
| struct in6_addr sin6_addr; |
| #endif /* !HAVE_STRUCT_SOCKADDR_IN6 */ |
| /* Define it to something that should never appear */ |
| #endif /* !_FAKE_SOCKET_H */ |