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