1769 dladm show-link truncates OVER field
[unleashed.git] / usr / src / cmd / ssh / include / fake-socket.h
blob30444dd91c9dc5b73f9c40175b79fa9a021f5894
1 /* $Id: fake-socket.h,v 1.3 2002/04/12 03:35:40 tim Exp $ */
3 #ifndef _FAKE_SOCKET_H
4 #define _FAKE_SOCKET_H
6 #pragma ident "%Z%%M% %I% %E% SMI"
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
12 #include "includes.h"
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
33 struct in6_addr {
34 u_int8_t s6_addr[16];
36 #endif /* !HAVE_STRUCT_IN6_ADDR */
38 #ifndef HAVE_STRUCT_SOCKADDR_IN6
39 struct sockaddr_in6 {
40 unsigned short sin6_family;
41 u_int16_t sin6_port;
42 u_int32_t sin6_flowinfo;
43 struct in6_addr sin6_addr;
45 #endif /* !HAVE_STRUCT_SOCKADDR_IN6 */
47 #ifndef AF_INET6
48 /* Define it to something that should never appear */
49 #define AF_INET6 AF_MAX
50 #endif
52 #ifdef __cplusplus
54 #endif
56 #endif /* _FAKE_SOCKET_H */