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