1 # Generated by h2py from /boot/develop/headers/be/net/netinet/in.h 2 3 # Included from socket.h 4 5 # Included from BeBuild.h 6 B_BEOS_VERSION_4 = 0x0400 7 B_BEOS_VERSION_4_5 = 0x0450 8 B_BEOS_VERSION_5 = 0x0500 9 B_BEOS_VERSION = B_BEOS_VERSION_5 10 B_BEOS_VERSION_MAUI = B_BEOS_VERSION_5 11 _PR2_COMPATIBLE_ = 1 12 _PR3_COMPATIBLE_ = 1 13 _R4_COMPATIBLE_ = 1 14 _R4_5_COMPATIBLE_ = 1 15 _PR2_COMPATIBLE_ = 0 16 _PR3_COMPATIBLE_ = 0 17 _R4_COMPATIBLE_ = 1 18 _R4_5_COMPATIBLE_ = 1 19 def _UNUSED(x): return x 20 21 22 # Included from sys/types.h 23 24 # Included from time.h 25 26 # Included from be_setup.h 27 def __std(ref): return ref 28 29 __be_os = 2 30 __dest_os = __be_os 31 __MSL__ = 0x4011 32 __GLIBC__ = -2 33 __GLIBC_MINOR__ = 1 34 35 # Included from null.h 36 NULL = (0) 37 NULL = 0L 38 39 # Included from size_t.h 40 41 # Included from stddef.h 42 43 # Included from wchar_t.h 44 CLOCKS_PER_SEC = 1000 45 CLK_TCK = CLOCKS_PER_SEC 46 MAX_TIMESTR = 70 47 48 # Included from sys/time.h 49 50 # Included from ByteOrder.h 51 52 # Included from endian.h 53 __LITTLE_ENDIAN = 1234 54 LITTLE_ENDIAN = __LITTLE_ENDIAN 55 __BYTE_ORDER = __LITTLE_ENDIAN 56 BYTE_ORDER = __BYTE_ORDER 57 __BIG_ENDIAN = 0 58 BIG_ENDIAN = 0 59 __BIG_ENDIAN = 4321 60 BIG_ENDIAN = __BIG_ENDIAN 61 __BYTE_ORDER = __BIG_ENDIAN 62 BYTE_ORDER = __BYTE_ORDER 63 __LITTLE_ENDIAN = 0 64 LITTLE_ENDIAN = 0 65 __PDP_ENDIAN = 3412 66 PDP_ENDIAN = __PDP_ENDIAN 67 68 # Included from SupportDefs.h 69 70 # Included from Errors.h 71 72 # Included from limits.h 73 74 # Included from float.h 75 FLT_ROUNDS = 1 76 FLT_RADIX = 2 77 FLT_MANT_DIG = 24 78 FLT_DIG = 6 79 FLT_MIN_EXP = (-125) 80 FLT_MIN_10_EXP = (-37) 81 FLT_MAX_EXP = 128 82 FLT_MAX_10_EXP = 38 83 DBL_MANT_DIG = 53 84 DBL_DIG = 15 85 DBL_MIN_EXP = (-1021) 86 DBL_MIN_10_EXP = (-308) 87 DBL_MAX_EXP = 1024 88 DBL_MAX_10_EXP = 308 89 LDBL_MANT_DIG = DBL_MANT_DIG 90 LDBL_DIG = DBL_DIG 91 LDBL_MIN_EXP = DBL_MIN_EXP 92 LDBL_MIN_10_EXP = DBL_MIN_10_EXP 93 LDBL_MAX_EXP = DBL_MAX_EXP 94 LDBL_MAX_10_EXP = DBL_MAX_10_EXP 95 CHAR_BIT = (8) 96 SCHAR_MIN = (-127-1) 97 SCHAR_MAX = (127) 98 CHAR_MIN = SCHAR_MIN 99 CHAR_MAX = SCHAR_MAX 100 MB_LEN_MAX = (1) 101 SHRT_MIN = (-32767-1) 102 SHRT_MAX = (32767) 103 LONG_MIN = (-2147483647L-1) 104 LONG_MAX = (2147483647L) 105 INT_MIN = LONG_MIN 106 INT_MAX = LONG_MAX 107 ARG_MAX = (32768) 108 ATEXIT_MAX = (32) 109 CHILD_MAX = (1024) 110 IOV_MAX = (256) 111 FILESIZEBITS = (64) 112 LINK_MAX = (1) 113 LOGIN_NAME_MAX = (32) 114 MAX_CANON = (255) 115 MAX_INPUT = (255) 116 NAME_MAX = (256) 117 NGROUPS_MAX = (32) 118 OPEN_MAX = (128) 119 PATH_MAX = (1024) 120 PIPE_MAX = (512) 121 SSIZE_MAX = (2147483647L) 122 TTY_NAME_MAX = (256) 123 TZNAME_MAX = (32) 124 SYMLINKS_MAX = (16) 125 _POSIX_ARG_MAX = (32768) 126 _POSIX_CHILD_MAX = (1024) 127 _POSIX_LINK_MAX = (1) 128 _POSIX_LOGIN_NAME_MAX = (9) 129 _POSIX_MAX_CANON = (255) 130 _POSIX_MAX_INPUT = (255) 131 _POSIX_NAME_MAX = (255) 132 _POSIX_NGROUPS_MAX = (0) 133 _POSIX_OPEN_MAX = (128) 134 _POSIX_PATH_MAX = (1024) 135 _POSIX_PIPE_BUF = (512) 136 _POSIX_SSIZE_MAX = (2147483647L) 137 _POSIX_STREAM_MAX = (8) 138 _POSIX_TTY_NAME_MAX = (256) 139 _POSIX_TZNAME_MAX = (3) 140 B_GENERAL_ERROR_BASE = LONG_MIN 141 B_OS_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x1000 142 B_APP_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x2000 143 B_INTERFACE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x3000 144 B_MEDIA_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4000 145 B_TRANSLATION_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4800 146 B_MIDI_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x5000 147 B_STORAGE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x6000 148 B_POSIX_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x7000 149 B_MAIL_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x8000 150 B_PRINT_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x9000 151 B_DEVICE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0xa000 152 B_ERRORS_END = (B_GENERAL_ERROR_BASE + 0xffff) 153 E2BIG = (B_POSIX_ERROR_BASE + 1) 154 ECHILD = (B_POSIX_ERROR_BASE + 2) 155 EDEADLK = (B_POSIX_ERROR_BASE + 3) 156 EFBIG = (B_POSIX_ERROR_BASE + 4) 157 EMLINK = (B_POSIX_ERROR_BASE + 5) 158 ENFILE = (B_POSIX_ERROR_BASE + 6) 159 ENODEV = (B_POSIX_ERROR_BASE + 7) 160 ENOLCK = (B_POSIX_ERROR_BASE + 8) 161 ENOSYS = (B_POSIX_ERROR_BASE + 9) 162 ENOTTY = (B_POSIX_ERROR_BASE + 10) 163 ENXIO = (B_POSIX_ERROR_BASE + 11) 164 ESPIPE = (B_POSIX_ERROR_BASE + 12) 165 ESRCH = (B_POSIX_ERROR_BASE + 13) 166 EFPOS = (B_POSIX_ERROR_BASE + 14) 167 ESIGPARM = (B_POSIX_ERROR_BASE + 15) 168 EDOM = (B_POSIX_ERROR_BASE + 16) 169 ERANGE = (B_POSIX_ERROR_BASE + 17) 170 EPROTOTYPE = (B_POSIX_ERROR_BASE + 18) 171 EPROTONOSUPPORT = (B_POSIX_ERROR_BASE + 19) 172 EPFNOSUPPORT = (B_POSIX_ERROR_BASE + 20) 173 EAFNOSUPPORT = (B_POSIX_ERROR_BASE + 21) 174 EADDRINUSE = (B_POSIX_ERROR_BASE + 22) 175 EADDRNOTAVAIL = (B_POSIX_ERROR_BASE + 23) 176 ENETDOWN = (B_POSIX_ERROR_BASE + 24) 177 ENETUNREACH = (B_POSIX_ERROR_BASE + 25) 178 ENETRESET = (B_POSIX_ERROR_BASE + 26) 179 ECONNABORTED = (B_POSIX_ERROR_BASE + 27) 180 ECONNRESET = (B_POSIX_ERROR_BASE + 28) 181 EISCONN = (B_POSIX_ERROR_BASE + 29) 182 ENOTCONN = (B_POSIX_ERROR_BASE + 30) 183 ESHUTDOWN = (B_POSIX_ERROR_BASE + 31) 184 ECONNREFUSED = (B_POSIX_ERROR_BASE + 32) 185 EHOSTUNREACH = (B_POSIX_ERROR_BASE + 33) 186 ENOPROTOOPT = (B_POSIX_ERROR_BASE + 34) 187 ENOBUFS = (B_POSIX_ERROR_BASE + 35) 188 EINPROGRESS = (B_POSIX_ERROR_BASE + 36) 189 EALREADY = (B_POSIX_ERROR_BASE + 37) 190 EILSEQ = (B_POSIX_ERROR_BASE + 38) 191 ENOMSG = (B_POSIX_ERROR_BASE + 39) 192 ESTALE = (B_POSIX_ERROR_BASE + 40) 193 EOVERFLOW = (B_POSIX_ERROR_BASE + 41) 194 EMSGSIZE = (B_POSIX_ERROR_BASE + 42) 195 EOPNOTSUPP = (B_POSIX_ERROR_BASE + 43) 196 ENOTSOCK = (B_POSIX_ERROR_BASE + 44) 197 false = 0 198 true = 1 199 NULL = (0) 200 FALSE = 0 201 TRUE = 1 202 203 # Included from TypeConstants.h 204 B_HOST_IS_LENDIAN = 1 205 B_HOST_IS_BENDIAN = 0 206 def B_HOST_TO_LENDIAN_DOUBLE(arg): return (double)(arg) 207 208 def B_HOST_TO_LENDIAN_FLOAT(arg): return (float)(arg) 209 210 def B_HOST_TO_LENDIAN_INT64(arg): return (uint64)(arg) 211 212 def B_HOST_TO_LENDIAN_INT32(arg): return (uint32)(arg) 213 214 def B_HOST_TO_LENDIAN_INT16(arg): return (uint16)(arg) 215 216 def B_HOST_TO_BENDIAN_DOUBLE(arg): return __swap_double(arg) 217 218 def B_HOST_TO_BENDIAN_FLOAT(arg): return __swap_float(arg) 219 220 def B_HOST_TO_BENDIAN_INT64(arg): return __swap_int64(arg) 221 222 def B_HOST_TO_BENDIAN_INT32(arg): return __swap_int32(arg) 223 224 def B_HOST_TO_BENDIAN_INT16(arg): return __swap_int16(arg) 225 226 def B_LENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg) 227 228 def B_LENDIAN_TO_HOST_FLOAT(arg): return (float)(arg) 229 230 def B_LENDIAN_TO_HOST_INT64(arg): return (uint64)(arg) 231 232 def B_LENDIAN_TO_HOST_INT32(arg): return (uint32)(arg) 233 234 def B_LENDIAN_TO_HOST_INT16(arg): return (uint16)(arg) 235 236 def B_BENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg) 237 238 def B_BENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg) 239 240 def B_BENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg) 241 242 def B_BENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg) 243 244 def B_BENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg) 245 246 B_HOST_IS_LENDIAN = 0 247 B_HOST_IS_BENDIAN = 1 248 def B_HOST_TO_LENDIAN_DOUBLE(arg): return __swap_double(arg) 249 250 def B_HOST_TO_LENDIAN_FLOAT(arg): return __swap_float(arg) 251 252 def B_HOST_TO_LENDIAN_INT64(arg): return __swap_int64(arg) 253 254 def B_HOST_TO_LENDIAN_INT32(arg): return __swap_int32(arg) 255 256 def B_HOST_TO_LENDIAN_INT16(arg): return __swap_int16(arg) 257 258 def B_HOST_TO_BENDIAN_DOUBLE(arg): return (double)(arg) 259 260 def B_HOST_TO_BENDIAN_FLOAT(arg): return (float)(arg) 261 262 def B_HOST_TO_BENDIAN_INT64(arg): return (uint64)(arg) 263 264 def B_HOST_TO_BENDIAN_INT32(arg): return (uint32)(arg) 265 266 def B_HOST_TO_BENDIAN_INT16(arg): return (uint16)(arg) 267 268 def B_LENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg) 269 270 def B_LENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg) 271 272 def B_LENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg) 273 274 def B_LENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg) 275 276 def B_LENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg) 277 278 def B_BENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg) 279 280 def B_BENDIAN_TO_HOST_FLOAT(arg): return (float)(arg) 281 282 def B_BENDIAN_TO_HOST_INT64(arg): return (uint64)(arg) 283 284 def B_BENDIAN_TO_HOST_INT32(arg): return (uint32)(arg) 285 286 def B_BENDIAN_TO_HOST_INT16(arg): return (uint16)(arg) 287 288 def B_SWAP_DOUBLE(arg): return __swap_double(arg) 289 290 def B_SWAP_FLOAT(arg): return __swap_float(arg) 291 292 def B_SWAP_INT64(arg): return __swap_int64(arg) 293 294 def B_SWAP_INT32(arg): return __swap_int32(arg) 295 296 def B_SWAP_INT16(arg): return __swap_int16(arg) 297 298 def htonl(x): return B_HOST_TO_BENDIAN_INT32(x) 299 300 def ntohl(x): return B_BENDIAN_TO_HOST_INT32(x) 301 302 def htons(x): return B_HOST_TO_BENDIAN_INT16(x) 303 304 def ntohs(x): return B_BENDIAN_TO_HOST_INT16(x) 305 306 AF_INET = 1 307 INADDR_ANY = 0x00000000 308 INADDR_BROADCAST = 0xffffffff 309 INADDR_LOOPBACK = 0x7f000001 310 SOL_SOCKET = 1 311 SO_DEBUG = 1 312 SO_REUSEADDR = 2 313 SO_NONBLOCK = 3 314 SO_REUSEPORT = 4 315 MSG_OOB = 0x1 316 SOCK_DGRAM = 1 317 SOCK_STREAM = 2 318 IPPROTO_UDP = 1 319 IPPROTO_TCP = 2 320 IPPROTO_ICMP = 3 321 B_UDP_MAX_SIZE = (65536 - 1024) 322 FD_SETSIZE = 256 323 FDSETSIZE = FD_SETSIZE 324 NFDBITS = 32 325 def _FDMSKNO(fd): return ((fd) / NFDBITS) 326 327 def _FDBITNO(fd): return ((fd) % NFDBITS) 328