1 # Generated by h2py from /boot/develop/headers/be/net/socket.h
3 # Included from BeBuild.h
4 B_BEOS_VERSION_4
= 0x0400
5 B_BEOS_VERSION_4_5
= 0x0450
6 B_BEOS_VERSION_5
= 0x0500
7 B_BEOS_VERSION
= B_BEOS_VERSION_5
8 B_BEOS_VERSION_MAUI
= B_BEOS_VERSION_5
17 def _UNUSED(x
): return x
20 # Included from sys/types.h
22 # Included from time.h
24 # Included from be_setup.h
25 def __std(ref
): return ref
33 # Included from null.h
37 # Included from size_t.h
39 # Included from stddef.h
41 # Included from wchar_t.h
43 CLK_TCK
= CLOCKS_PER_SEC
46 # Included from sys/time.h
48 # Included from ByteOrder.h
50 # Included from endian.h
51 __LITTLE_ENDIAN
= 1234
52 LITTLE_ENDIAN
= __LITTLE_ENDIAN
53 __BYTE_ORDER
= __LITTLE_ENDIAN
54 BYTE_ORDER
= __BYTE_ORDER
58 BIG_ENDIAN
= __BIG_ENDIAN
59 __BYTE_ORDER
= __BIG_ENDIAN
60 BYTE_ORDER
= __BYTE_ORDER
64 PDP_ENDIAN
= __PDP_ENDIAN
66 # Included from SupportDefs.h
68 # Included from Errors.h
70 # Included from limits.h
72 # Included from float.h
78 FLT_MIN_10_EXP
= (-37)
84 DBL_MIN_10_EXP
= (-308)
87 LDBL_MANT_DIG
= DBL_MANT_DIG
89 LDBL_MIN_EXP
= DBL_MIN_EXP
90 LDBL_MIN_10_EXP
= DBL_MIN_10_EXP
91 LDBL_MAX_EXP
= DBL_MAX_EXP
92 LDBL_MAX_10_EXP
= DBL_MAX_10_EXP
101 LONG_MIN
= (-2147483647L-1)
102 LONG_MAX
= (2147483647L)
111 LOGIN_NAME_MAX
= (32)
119 SSIZE_MAX
= (2147483647L)
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)
138 B_GENERAL_ERROR_BASE
= LONG_MIN
139 B_OS_ERROR_BASE
= B_GENERAL_ERROR_BASE
+ 0x1000
140 B_APP_ERROR_BASE
= B_GENERAL_ERROR_BASE
+ 0x2000
141 B_INTERFACE_ERROR_BASE
= B_GENERAL_ERROR_BASE
+ 0x3000
142 B_MEDIA_ERROR_BASE
= B_GENERAL_ERROR_BASE
+ 0x4000
143 B_TRANSLATION_ERROR_BASE
= B_GENERAL_ERROR_BASE
+ 0x4800
144 B_MIDI_ERROR_BASE
= B_GENERAL_ERROR_BASE
+ 0x5000
145 B_STORAGE_ERROR_BASE
= B_GENERAL_ERROR_BASE
+ 0x6000
146 B_POSIX_ERROR_BASE
= B_GENERAL_ERROR_BASE
+ 0x7000
147 B_MAIL_ERROR_BASE
= B_GENERAL_ERROR_BASE
+ 0x8000
148 B_PRINT_ERROR_BASE
= B_GENERAL_ERROR_BASE
+ 0x9000
149 B_DEVICE_ERROR_BASE
= B_GENERAL_ERROR_BASE
+ 0xa000
150 B_ERRORS_END
= (B_GENERAL_ERROR_BASE
+ 0xffff)
151 E2BIG
= (B_POSIX_ERROR_BASE
+ 1)
152 ECHILD
= (B_POSIX_ERROR_BASE
+ 2)
153 EDEADLK
= (B_POSIX_ERROR_BASE
+ 3)
154 EFBIG
= (B_POSIX_ERROR_BASE
+ 4)
155 EMLINK
= (B_POSIX_ERROR_BASE
+ 5)
156 ENFILE
= (B_POSIX_ERROR_BASE
+ 6)
157 ENODEV
= (B_POSIX_ERROR_BASE
+ 7)
158 ENOLCK
= (B_POSIX_ERROR_BASE
+ 8)
159 ENOSYS
= (B_POSIX_ERROR_BASE
+ 9)
160 ENOTTY
= (B_POSIX_ERROR_BASE
+ 10)
161 ENXIO
= (B_POSIX_ERROR_BASE
+ 11)
162 ESPIPE
= (B_POSIX_ERROR_BASE
+ 12)
163 ESRCH
= (B_POSIX_ERROR_BASE
+ 13)
164 EFPOS
= (B_POSIX_ERROR_BASE
+ 14)
165 ESIGPARM
= (B_POSIX_ERROR_BASE
+ 15)
166 EDOM
= (B_POSIX_ERROR_BASE
+ 16)
167 ERANGE
= (B_POSIX_ERROR_BASE
+ 17)
168 EPROTOTYPE
= (B_POSIX_ERROR_BASE
+ 18)
169 EPROTONOSUPPORT
= (B_POSIX_ERROR_BASE
+ 19)
170 EPFNOSUPPORT
= (B_POSIX_ERROR_BASE
+ 20)
171 EAFNOSUPPORT
= (B_POSIX_ERROR_BASE
+ 21)
172 EADDRINUSE
= (B_POSIX_ERROR_BASE
+ 22)
173 EADDRNOTAVAIL
= (B_POSIX_ERROR_BASE
+ 23)
174 ENETDOWN
= (B_POSIX_ERROR_BASE
+ 24)
175 ENETUNREACH
= (B_POSIX_ERROR_BASE
+ 25)
176 ENETRESET
= (B_POSIX_ERROR_BASE
+ 26)
177 ECONNABORTED
= (B_POSIX_ERROR_BASE
+ 27)
178 ECONNRESET
= (B_POSIX_ERROR_BASE
+ 28)
179 EISCONN
= (B_POSIX_ERROR_BASE
+ 29)
180 ENOTCONN
= (B_POSIX_ERROR_BASE
+ 30)
181 ESHUTDOWN
= (B_POSIX_ERROR_BASE
+ 31)
182 ECONNREFUSED
= (B_POSIX_ERROR_BASE
+ 32)
183 EHOSTUNREACH
= (B_POSIX_ERROR_BASE
+ 33)
184 ENOPROTOOPT
= (B_POSIX_ERROR_BASE
+ 34)
185 ENOBUFS
= (B_POSIX_ERROR_BASE
+ 35)
186 EINPROGRESS
= (B_POSIX_ERROR_BASE
+ 36)
187 EALREADY
= (B_POSIX_ERROR_BASE
+ 37)
188 EILSEQ
= (B_POSIX_ERROR_BASE
+ 38)
189 ENOMSG
= (B_POSIX_ERROR_BASE
+ 39)
190 ESTALE
= (B_POSIX_ERROR_BASE
+ 40)
191 EOVERFLOW
= (B_POSIX_ERROR_BASE
+ 41)
192 EMSGSIZE
= (B_POSIX_ERROR_BASE
+ 42)
193 EOPNOTSUPP
= (B_POSIX_ERROR_BASE
+ 43)
194 ENOTSOCK
= (B_POSIX_ERROR_BASE
+ 44)
201 # Included from TypeConstants.h
202 B_HOST_IS_LENDIAN
= 1
203 B_HOST_IS_BENDIAN
= 0
204 def B_HOST_TO_LENDIAN_DOUBLE(arg
): return (double
)(arg
)
206 def B_HOST_TO_LENDIAN_FLOAT(arg
): return (float)(arg
)
208 def B_HOST_TO_LENDIAN_INT64(arg
): return (uint64
)(arg
)
210 def B_HOST_TO_LENDIAN_INT32(arg
): return (uint32
)(arg
)
212 def B_HOST_TO_LENDIAN_INT16(arg
): return (uint16
)(arg
)
214 def B_HOST_TO_BENDIAN_DOUBLE(arg
): return __swap_double(arg
)
216 def B_HOST_TO_BENDIAN_FLOAT(arg
): return __swap_float(arg
)
218 def B_HOST_TO_BENDIAN_INT64(arg
): return __swap_int64(arg
)
220 def B_HOST_TO_BENDIAN_INT32(arg
): return __swap_int32(arg
)
222 def B_HOST_TO_BENDIAN_INT16(arg
): return __swap_int16(arg
)
224 def B_LENDIAN_TO_HOST_DOUBLE(arg
): return (double
)(arg
)
226 def B_LENDIAN_TO_HOST_FLOAT(arg
): return (float)(arg
)
228 def B_LENDIAN_TO_HOST_INT64(arg
): return (uint64
)(arg
)
230 def B_LENDIAN_TO_HOST_INT32(arg
): return (uint32
)(arg
)
232 def B_LENDIAN_TO_HOST_INT16(arg
): return (uint16
)(arg
)
234 def B_BENDIAN_TO_HOST_DOUBLE(arg
): return __swap_double(arg
)
236 def B_BENDIAN_TO_HOST_FLOAT(arg
): return __swap_float(arg
)
238 def B_BENDIAN_TO_HOST_INT64(arg
): return __swap_int64(arg
)
240 def B_BENDIAN_TO_HOST_INT32(arg
): return __swap_int32(arg
)
242 def B_BENDIAN_TO_HOST_INT16(arg
): return __swap_int16(arg
)
244 B_HOST_IS_LENDIAN
= 0
245 B_HOST_IS_BENDIAN
= 1
246 def B_HOST_TO_LENDIAN_DOUBLE(arg
): return __swap_double(arg
)
248 def B_HOST_TO_LENDIAN_FLOAT(arg
): return __swap_float(arg
)
250 def B_HOST_TO_LENDIAN_INT64(arg
): return __swap_int64(arg
)
252 def B_HOST_TO_LENDIAN_INT32(arg
): return __swap_int32(arg
)
254 def B_HOST_TO_LENDIAN_INT16(arg
): return __swap_int16(arg
)
256 def B_HOST_TO_BENDIAN_DOUBLE(arg
): return (double
)(arg
)
258 def B_HOST_TO_BENDIAN_FLOAT(arg
): return (float)(arg
)
260 def B_HOST_TO_BENDIAN_INT64(arg
): return (uint64
)(arg
)
262 def B_HOST_TO_BENDIAN_INT32(arg
): return (uint32
)(arg
)
264 def B_HOST_TO_BENDIAN_INT16(arg
): return (uint16
)(arg
)
266 def B_LENDIAN_TO_HOST_DOUBLE(arg
): return __swap_double(arg
)
268 def B_LENDIAN_TO_HOST_FLOAT(arg
): return __swap_float(arg
)
270 def B_LENDIAN_TO_HOST_INT64(arg
): return __swap_int64(arg
)
272 def B_LENDIAN_TO_HOST_INT32(arg
): return __swap_int32(arg
)
274 def B_LENDIAN_TO_HOST_INT16(arg
): return __swap_int16(arg
)
276 def B_BENDIAN_TO_HOST_DOUBLE(arg
): return (double
)(arg
)
278 def B_BENDIAN_TO_HOST_FLOAT(arg
): return (float)(arg
)
280 def B_BENDIAN_TO_HOST_INT64(arg
): return (uint64
)(arg
)
282 def B_BENDIAN_TO_HOST_INT32(arg
): return (uint32
)(arg
)
284 def B_BENDIAN_TO_HOST_INT16(arg
): return (uint16
)(arg
)
286 def B_SWAP_DOUBLE(arg
): return __swap_double(arg
)
288 def B_SWAP_FLOAT(arg
): return __swap_float(arg
)
290 def B_SWAP_INT64(arg
): return __swap_int64(arg
)
292 def B_SWAP_INT32(arg
): return __swap_int32(arg
)
294 def B_SWAP_INT16(arg
): return __swap_int16(arg
)
296 def htonl(x
): return B_HOST_TO_BENDIAN_INT32(x
)
298 def ntohl(x
): return B_BENDIAN_TO_HOST_INT32(x
)
300 def htons(x
): return B_HOST_TO_BENDIAN_INT16(x
)
302 def ntohs(x
): return B_BENDIAN_TO_HOST_INT16(x
)
305 INADDR_ANY
= 0x00000000
306 INADDR_BROADCAST
= 0xffffffff
307 INADDR_LOOPBACK
= 0x7f000001
319 B_UDP_MAX_SIZE
= (65536 - 1024)
321 FDSETSIZE
= FD_SETSIZE
323 def _FDMSKNO(fd
): return ((fd
) / NFDBITS
)
325 def _FDBITNO(fd
): return ((fd
) % NFDBITS
)