| 66 | * Data types. |
| 67 | */ |
| 68 | #if __BSD_VISIBLE |
| 69 | #ifndef _GID_T_DECLARED |
| 70 | typedef __gid_t gid_t; |
| 71 | #define _GID_T_DECLARED |
| 72 | #endif |
| 73 | |
| 74 | #ifndef _OFF_T_DECLARED |
| 75 | typedef __off_t off_t; |
| 76 | #define _OFF_T_DECLARED |
| 77 | #endif |
| 78 | |
| 79 | #ifndef _PID_T_DECLARED |
| 80 | typedef __pid_t pid_t; |
| 81 | #define _PID_T_DECLARED |
| 82 | #endif |
| 83 | #endif |
| 84 | |
| 85 | #ifndef _SA_FAMILY_T_DECLARED |
| 86 | typedef __sa_family_t sa_family_t; |
| 87 | #define _SA_FAMILY_T_DECLARED |
| 88 | #endif |
| 89 | |
| 90 | #ifndef _SOCKLEN_T_DECLARED |
| 91 | typedef __socklen_t socklen_t; |
| 92 | #define _SOCKLEN_T_DECLARED |
| 93 | #endif |
| 94 | |
| 95 | #ifndef _SSIZE_T_DECLARED |
| 96 | typedef __ssize_t ssize_t; |
| 97 | #define _SSIZE_T_DECLARED |
| 98 | #endif |
| 99 | |
| 100 | #if __BSD_VISIBLE |
| 101 | #ifndef _UID_T_DECLARED |
| 102 | typedef __uid_t uid_t; |
| 103 | #define _UID_T_DECLARED |
| 104 | #endif |
| 105 | #endif |
| 106 | |
| 107 | /* |
| 250 | * RFC 2553: protocol-independent placeholder for socket addresses |
| 251 | */ |
| 252 | #define _SS_MAXSIZE 128U |
| 253 | #define _SS_ALIGNSIZE (sizeof(__int64_t)) |
| 254 | #define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) - \ |
| 255 | sizeof(sa_family_t)) |
| 256 | #define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) - \ |
| 257 | sizeof(sa_family_t) - _SS_PAD1SIZE - _SS_ALIGNSIZE) |
| 258 | |
| 259 | struct sockaddr_storage { |
| 260 | unsigned char ss_len; /* address length */ |
| 261 | sa_family_t ss_family; /* address family */ |
| 262 | char __ss_pad1[_SS_PAD1SIZE]; |
| 263 | __int64_t __ss_align; /* force desired struct alignment */ |
| 264 | char __ss_pad2[_SS_PAD2SIZE]; |
| 265 | }; |
| 266 | |
| 267 | /* |