1 # Generated by h2py from /include/netinet/in.h
4 # Included from features.h
10 _POSIX_C_SOURCE
= 199506L
12 _XOPEN_SOURCE_EXTENDED
= 1
13 _LARGEFILE64_SOURCE
= 1
21 _POSIX_C_SOURCE
= 199506L
27 __USE_XOPEN_EXTENDED
= 1
30 __USE_XOPEN_EXTENDED
= 1
33 __USE_FILE_OFFSET64
= 1
40 __STDC_IEC_559_COMPLEX__
= 1
45 # Included from sys/cdefs.h
47 def __PMT(args
): return args
49 def __P(args
): return args
51 def __PMT(args
): return args
53 def __P(args
): return ()
55 def __PMT(args
): return ()
57 def __STRING(x
): return #x
59 def __STRING(x
): return "x"
61 def __ASMNAME(cname
): return __ASMNAME2 (__USER_LABEL_PREFIX__
, cname
)
63 def __attribute__(xyz
): return
65 __USE_EXTERN_INLINES
= 1
67 # Included from gnu/stubs.h
69 # Included from limits.h
72 # Included from bits/posix1_lim.h
73 _BITS_POSIX1_LIM_H
= 1
74 _POSIX_AIO_LISTIO_MAX
= 2
78 _POSIX_DELAYTIMER_MAX
= 32
80 _POSIX_MAX_CANON
= 255
81 _POSIX_MAX_INPUT
= 255
82 _POSIX_MQ_OPEN_MAX
= 8
83 _POSIX_MQ_PRIO_MAX
= 32
84 _POSIX_NGROUPS_MAX
= 0
86 _POSIX_FD_SETSIZE
= _POSIX_OPEN_MAX
91 _POSIX_SEM_NSEMS_MAX
= 256
92 _POSIX_SEM_VALUE_MAX
= 32767
93 _POSIX_SIGQUEUE_MAX
= 32
94 _POSIX_SSIZE_MAX
= 32767
98 _POSIX_HIWAT
= _POSIX_PIPE_BUF
99 _POSIX_UIO_MAXIOV
= 16
100 _POSIX_TTY_NAME_MAX
= 9
101 _POSIX_TIMER_MAX
= 32
102 _POSIX_LOGIN_NAME_MAX
= 9
103 _POSIX_CLOCKRES_MIN
= 20000000
105 # Included from bits/local_lim.h
107 # Included from posix/limits.h
112 INT_MIN
= (-2147483647-1)
113 LONG_MAX
= 2147483647L
114 LONG_MIN
= (-2147483647L-1L)
121 _POSIX_ARG_MAX
= 131072
122 _POSIX_CHILD_MAX
= 4096
124 _POSIX_MAX_CANON
= 126
125 _POSIX_MAX_INPUT
= 126
126 _POSIX_NAME_MAX
= 256
127 _POSIX_NGROUPS_MAX
= 32
128 _POSIX_OPEN_MAX
= 256
129 _POSIX_PATH_MAX
= 255
130 _POSIX_PIPE_BUF
= 512
131 _POSIX_SSIZE_MAX
= 2147483647
132 _POSIX_STREAM_MAX
= 256
133 _POSIX_TZNAME_MAX
= 5
144 SSIZE_MAX
= 2147483647
146 AIO_PRIO_DELTA_MAX
= 20
148 NGROUPS_MAX
= _POSIX_NGROUPS_MAX
150 # Included from bits/posix2_lim.h
151 _BITS_POSIX2_LIM_H
= 1
152 _POSIX2_BC_BASE_MAX
= 99
153 _POSIX2_BC_DIM_MAX
= 2048
154 _POSIX2_BC_SCALE_MAX
= 99
155 _POSIX2_BC_STRING_MAX
= 1000
156 _POSIX2_COLL_WEIGHTS_MAX
= 255
157 _POSIX2_EQUIV_CLASS_MAX
= 255
158 _POSIX2_EXPR_NEST_MAX
= 32
159 _POSIX2_LINE_MAX
= 2048
160 _POSIX2_RE_DUP_MAX
= 255
161 _POSIX2_CHARCLASS_NAME_MAX
= 2048
162 BC_BASE_MAX
= _POSIX2_BC_BASE_MAX
163 BC_DIM_MAX
= _POSIX2_BC_DIM_MAX
164 BC_SCALE_MAX
= _POSIX2_BC_SCALE_MAX
165 BC_STRING_MAX
= _POSIX2_BC_STRING_MAX
166 COLL_WEIGHTS_MAX
= _POSIX2_COLL_WEIGHTS_MAX
167 EQUIV_CLASS_MAX
= _POSIX2_EQUIV_CLASS_MAX
168 EXPR_NEST_MAX
= _POSIX2_EXPR_NEST_MAX
169 LINE_MAX
= _POSIX2_LINE_MAX
170 RE_DUP_MAX
= _POSIX2_RE_DUP_MAX
171 CHARCLASS_NAME_MAX
= _POSIX2_CHARCLASS_NAME_MAX
173 # Included from bits/xopen_lim.h
176 # Included from bits/stdio_lim.h
183 STREAM_MAX
= FOPEN_MAX
184 TZNAME_MAX
= _POSIX_TZNAME_MAX
185 _XOPEN_IOV_MAX
= _POSIX_UIO_MAXIOV
186 NL_ARGMAX
= _POSIX_ARG_MAX
187 NL_LANGMAX
= _POSIX2_LINE_MAX
206 INT_MIN
= (-INT_MAX
- 1)
208 UINT_MAX
= 4294967295
209 LONG_MAX
= 9223372036854775807L
210 LONG_MAX
= 2147483647L
211 LONG_MIN
= (-LONG_MAX
- 1L)
212 ULONG_MAX
= 4294967295L
214 # Included from stdint.h
217 # Included from bits/wordsize.h
219 def __INT64_C(c
): return c
## L
221 def __UINT64_C(c
): return c
## UL
223 def __INT64_C(c
): return c
## LL
225 def __UINT64_C(c
): return c
## ULL
228 INT16_MIN
= (-32767-1)
229 INT32_MIN
= (-2147483647-1)
230 INT64_MIN
= (-__INT64_C(9223372036854775807)-1)
233 INT32_MAX
= (2147483647)
234 INT64_MAX
= (__INT64_C(9223372036854775807))
235 UINT64_MAX
= (__UINT64_C(18446744073709551615))
236 INT_LEAST8_MIN
= (-128)
237 INT_LEAST16_MIN
= (-32767-1)
238 INT_LEAST32_MIN
= (-2147483647-1)
239 INT_LEAST64_MIN
= (-__INT64_C(9223372036854775807)-1)
240 INT_LEAST8_MAX
= (127)
241 INT_LEAST16_MAX
= (32767)
242 INT_LEAST32_MAX
= (2147483647)
243 INT_LEAST64_MAX
= (__INT64_C(9223372036854775807))
244 UINT_LEAST64_MAX
= (__UINT64_C(18446744073709551615))
245 INT_FAST8_MIN
= (-128)
246 INT_FAST16_MIN
= (-9223372036854775807L-1)
247 INT_FAST32_MIN
= (-9223372036854775807L-1)
248 INT_FAST16_MIN
= (-2147483647-1)
249 INT_FAST32_MIN
= (-2147483647-1)
250 INT_FAST64_MIN
= (-__INT64_C(9223372036854775807)-1)
251 INT_FAST8_MAX
= (127)
252 INT_FAST16_MAX
= (9223372036854775807L)
253 INT_FAST32_MAX
= (9223372036854775807L)
254 INT_FAST16_MAX
= (2147483647)
255 INT_FAST32_MAX
= (2147483647)
256 INT_FAST64_MAX
= (__INT64_C(9223372036854775807))
257 UINT_FAST64_MAX
= (__UINT64_C(18446744073709551615))
258 INTPTR_MIN
= (-9223372036854775807L-1)
259 INTPTR_MAX
= (9223372036854775807L)
260 INTPTR_MIN
= (-2147483647-1)
261 INTPTR_MAX
= (2147483647)
262 INTMAX_MIN
= (-__INT64_C(9223372036854775807)-1)
263 INTMAX_MAX
= (__INT64_C(9223372036854775807))
264 UINTMAX_MAX
= (__UINT64_C(18446744073709551615))
265 PTRDIFF_MIN
= (-9223372036854775807L-1)
266 PTRDIFF_MAX
= (9223372036854775807L)
267 PTRDIFF_MIN
= (-2147483647-1)
268 PTRDIFF_MAX
= (2147483647)
269 SIG_ATOMIC_MIN
= (-2147483647-1)
270 SIG_ATOMIC_MAX
= (2147483647)
271 WCHAR_MIN
= (-2147483647-1)
272 WCHAR_MAX
= (2147483647)
274 def INT8_C(c
): return c
276 def INT16_C(c
): return c
278 def INT32_C(c
): return c
280 def INT64_C(c
): return c
## L
282 def INT64_C(c
): return c
## LL
284 def UINT8_C(c
): return c
## U
286 def UINT16_C(c
): return c
## U
288 def UINT32_C(c
): return c
## U
290 def UINT64_C(c
): return c
## UL
292 def UINT64_C(c
): return c
## ULL
294 def INTMAX_C(c
): return c
## L
296 def UINTMAX_C(c
): return c
## UL
298 def INTMAX_C(c
): return c
## LL
300 def UINTMAX_C(c
): return c
## ULL
303 # Included from sys/types.h
306 # Included from bits/types.h
309 def __FDELT(d
): return ((d
) / __NFDBITS
)
312 # Included from bits/pthreadtypes.h
314 # Included from time.h
317 # Included from bits/time.h
319 # Included from posix/time.h
321 # Included from posix/types.h
324 CLOCKS_PER_SEC
= 1000000
326 CLOCKS_PER_SEC
= 1000000
329 CLK_TCK
= CLOCKS_PER_SEC
330 __clock_t_defined
= 1
332 __timespec_defined
= 1
333 def __isleap(year
): return \
335 __BIT_TYPES_DEFINED__
= 1
337 # Included from endian.h
339 __LITTLE_ENDIAN
= 1234
343 # Included from bits/endian.h
344 __BYTE_ORDER
= __LITTLE_ENDIAN
345 __FLOAT_WORD_ORDER
= __BYTE_ORDER
346 LITTLE_ENDIAN
= __LITTLE_ENDIAN
347 BIG_ENDIAN
= __BIG_ENDIAN
348 PDP_ENDIAN
= __PDP_ENDIAN
349 BYTE_ORDER
= __BYTE_ORDER
351 # Included from sys/select.h
354 # Included from bits/select.h
355 def __FD_ZERO(fdsp
): return \
357 def __FD_ZERO(set): return \
360 # Included from bits/sigset.h
363 def __sigmask(sig
): return \
365 def __sigemptyset(set): return \
367 def __sigfillset(set): return \
369 def __sigisemptyset(set): return \
371 FD_SETSIZE
= __FD_SETSIZE
372 def FD_ZERO(fdsetp
): return __FD_ZERO (fdsetp
)
375 # Included from sys/sysmacros.h
377 def major(dev
): return ( (( (dev
) >> 8) & 0xff))
379 def minor(dev
): return ( ((dev
) & 0xff))
382 # Included from bits/socket.h
402 PF_ROUTE
= PF_NETLINK
410 AF_UNSPEC
= PF_UNSPEC
417 AF_APPLETALK
= PF_APPLETALK
418 AF_NETROM
= PF_NETROM
419 AF_BRIDGE
= PF_BRIDGE
420 AF_ATMPVC
= PF_ATMPVC
424 AF_DECnet
= PF_DECnet
425 AF_NETBEUI
= PF_NETBEUI
426 AF_SECURITY
= PF_SECURITY
428 AF_NETLINK
= PF_NETLINK
430 AF_PACKET
= PF_PACKET
432 AF_ECONET
= PF_ECONET
433 AF_ATMSVC
= PF_ATMSVC
446 # Included from bits/sockaddr.h
448 def __SOCKADDR_COMMON(sa_prefix
): return \
451 def CMSG_FIRSTHDR(mhdr
): return \
454 # Included from atheos/socket.h
456 # Included from atheos/types.h
461 # Included from atheos/filesystem.h
463 # Included from atheos/atomic.h
465 # Included from atheos/typedefs.h
467 # Included from atheos/fs_attribs.h
469 # Included from atheos/kernel.h
471 # Included from atheos/kdebug.h
473 # Included from atheos/threads.h
480 # Included from atheos/stdlib.h
482 # Included from atheos/string.h
483 def COMMON(x
): return \
485 def COMMON(x
): return \
488 # Included from atheos/schedule.h
490 # Included from atheos/timer.h
492 # Included from posix/resource.h
507 # Included from atheos/v86.h
509 # Included from atheos/areas.h
510 MEMF_REAL
= 0x00000002
511 MEMF_USER
= 0x00000004
512 MEMF_BUFFER
= 0x00000008
513 MEMF_KERNEL
= 0x00000010
514 MEMF_OKTOFAILHACK
= 0x00000020
515 MEMF_PRI_MASK
= 0x000000ff
516 MEMF_NOBLOCK
= 0x00000100
517 MEMF_CLEAR
= 0x00010000
518 MEMF_LOCKED
= 0x10000000
521 def PAGE_ALIGN(addr
): return (((addr
)+PAGE_SIZE
-1)&PAGE_MASK
)
527 AREA_READ
= 0x00000001
528 AREA_WRITE
= 0x00000002
529 AREA_EXEC
= 0x00000004
530 AREA_FULL_ACCESS
= (AREA_READ | AREA_WRITE | AREA_EXEC
)
531 AREA_KERNEL
= 0x00000008
532 AREA_UNMAP_PHYS
= 0x00000010
533 AREA_ANY_ADDRESS
= 0x00000000
534 AREA_EXACT_ADDRESS
= 0x00000100
535 AREA_BASE_ADDRESS
= 0x00000200
536 AREA_CLONE_ADDRESS
= 0x00000300
537 AREA_ADDR_SPEC_MASK
= 0x00000f00
538 AREA_TOP_DOWN
= 0x00001000
539 AREA_REMAPPED
= 0x0020
541 AREA_GROWSDOWN
= 0x0080
542 AREA_FIRST_KERNEL_ADDRESS
= 0x00100000
543 AREA_LAST_KERNEL_ADDRESS
= 0x7fffffff
544 AREA_FIRST_USER_ADDRESS
= 0x80000000
545 AREA_LAST_USER_ADDRESS
= 0xffffffff
547 def kfree(p
): return kassertw( __kfree(p
) == 0 )
550 # Included from posix/dirent.h
554 # Included from dirent.h
557 # Included from bits/dirent.h
558 def _D_ALLOC_NAMLEN(d
): return (_D_EXACT_NAMLEN (d
) + 1)
560 def IFTODT(mode
): return (((mode
) & 0170000) >> 12)
562 def DTTOIF(dirtype
): return ((dirtype
) << 12)
564 def dirfd(dirp
): return _DIR_dirfd (dirp
)
569 # Included from posix/stat.h
581 def S_ISLNK(m
): return (((m
) & S_IFMT
) == S_IFLNK
)
583 def S_ISREG(m
): return (((m
) & S_IFMT
) == S_IFREG
)
585 def S_ISDIR(m
): return (((m
) & S_IFMT
) == S_IFDIR
)
587 def S_ISCHR(m
): return (((m
) & S_IFMT
) == S_IFCHR
)
589 def S_ISBLK(m
): return (((m
) & S_IFMT
) == S_IFBLK
)
591 def S_ISFIFO(m
): return (((m
) & S_IFMT
) == S_IFIFO
)
593 def S_ISSOCK(m
): return (((m
) & S_IFMT
) == S_IFSOCK
)
607 S_IRWXUGO
= (S_IRWXU|S_IRWXG|S_IRWXO
)
608 S_IALLUGO
= (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO
)
609 S_IRUGO
= (S_IRUSR|S_IRGRP|S_IROTH
)
610 S_IWUGO
= (S_IWUSR|S_IWGRP|S_IWOTH
)
611 S_IXUGO
= (S_IXUSR|S_IXGRP|S_IXOTH
)
614 # Included from posix/fcntl.h
626 O_NDELAY
= O_NONBLOCK
632 O_NOTRAVERSE
= 0100000
633 O_NOFOLLOW
= O_NOTRAVERSE
658 # Included from posix/uio.h
661 MNTF_READONLY
= 0x0001
662 FS_IS_READONLY
= 0x00000001
663 FS_IS_REMOVABLE
= 0x00000002
664 FS_IS_PERSISTENT
= 0x00000004
665 FS_IS_SHARED
= 0x00000008
666 FS_IS_BLOCKBASED
= 0x00000010
667 FS_CAN_MOUNT
= 0x00000020
668 FS_HAS_MIME
= 0x00010000
669 FS_HAS_ATTR
= 0x00020000
670 FS_HAS_QUERY
= 0x00040000
679 WFSSTAT_NAME
= 0x0001
680 FSDRIVER_API_VERSION
= 1
682 # Included from net/nettypes.h
684 INADDR_ANY
= 0x00000000
685 INADDR_BROADCAST
= 0xffffffff
686 INADDR_LOOPBACK
= 0x7f000001
687 def CMSG_ALIGN(len): return ( ((len)+sizeof(long)-1) & ~
(sizeof(long)-1) )
718 PF_ROUTE
= PF_NETLINK
726 AF_UNSPEC
= PF_UNSPEC
733 AF_APPLETALK
= PF_APPLETALK
734 AF_NETROM
= PF_NETROM
735 AF_BRIDGE
= PF_BRIDGE
736 AF_ATMPVC
= PF_ATMPVC
740 AF_DECnet
= PF_DECnet
741 AF_NETBEUI
= PF_NETBEUI
742 AF_SECURITY
= PF_SECURITY
744 AF_NETLINK
= PF_NETLINK
746 AF_PACKET
= PF_PACKET
748 AF_ECONET
= PF_ECONET
749 AF_ATMSVC
= PF_ATMSVC
785 IPTOS_LOWDELAY
= 0x10
786 IPTOS_THROUGHPUT
= 0x08
787 IPTOS_RELIABILITY
= 0x04
793 IP_MULTICAST_TTL
= 33
794 IP_MULTICAST_LOOP
= 34
795 IP_ADD_MEMBERSHIP
= 35
796 IP_DROP_MEMBERSHIP
= 36
799 def IN_CLASSA(a
): return ((( (a
)) & 0x80000000) == 0)
801 IN_CLASSA_NET
= 0xff000000
802 IN_CLASSA_NSHIFT
= 24
803 IN_CLASSA_HOST
= (0xffffffff & ~IN_CLASSA_NET
)
805 def IN_CLASSB(a
): return ((( (a
)) & 0xc0000000) == 0x80000000)
807 IN_CLASSB_NET
= 0xffff0000
808 IN_CLASSB_NSHIFT
= 16
809 IN_CLASSB_HOST
= (0xffffffff & ~IN_CLASSB_NET
)
810 IN_CLASSB_MAX
= 65536
811 def IN_CLASSC(a
): return ((( (a
)) & 0xe0000000) == 0xc0000000)
813 IN_CLASSC_NET
= 0xffffff00
815 IN_CLASSC_HOST
= (0xffffffff & ~IN_CLASSC_NET
)
816 def IN_CLASSD(a
): return ((( (a
)) & 0xf0000000) == 0xe0000000)
818 def IN_MULTICAST(a
): return IN_CLASSD(a
)
820 def IN_EXPERIMENTAL(a
): return ((( (a
)) & 0xe0000000) == 0xe0000000)
822 def IN_BADCLASS(a
): return ((( (a
)) & 0xf0000000) == 0xf0000000)
824 INADDR_ANY
= ( 0x00000000)
825 INADDR_BROADCAST
= ( 0xffffffff)
826 INADDR_NONE
= ( 0xffffffff)
828 INADDR_LOOPBACK
= ( 0x7f000001)
829 INADDR_UNSPEC_GROUP
= ( 0xe0000000)
830 INADDR_ALLHOSTS_GROUP
= ( 0xe0000001)
831 INADDR_ALLRTRS_GROUP
= ( 0xe0000002)
832 INADDR_MAX_LOCAL_GROUP
= ( 0xe00000ff)
834 INET6_ADDRSTRLEN
= 46
836 # Included from bits/in.h
852 IP_MULTICAST_TTL
= 33
853 IP_MULTICAST_LOOP
= 34
854 IP_ADD_MEMBERSHIP
= 35
855 IP_DROP_MEMBERSHIP
= 36
856 IP_RECVRETOPTS
= IP_RETOPTS
862 IP_DEFAULT_MULTICAST_TTL
= 1
863 IP_DEFAULT_MULTICAST_LOOP
= 1
864 IP_MAX_MEMBERSHIPS
= 20
875 IPV6_UNICAST_HOPS
= 16
876 IPV6_MULTICAST_IF
= 17
877 IPV6_MULTICAST_HOPS
= 18
878 IPV6_MULTICAST_LOOP
= 19
879 IPV6_ADD_MEMBERSHIP
= 20
880 IPV6_DROP_MEMBERSHIP
= 21
881 IPV6_ROUTER_ALERT
= 22
882 SCM_SRCRT
= IPV6_RXSRCRT
883 IPV6_RXHOPOPTS
= IPV6_HOPOPTS
884 IPV6_RXDSTOPTS
= IPV6_DSTOPTS
885 IPV6_PMTUDISC_DONT
= 0
886 IPV6_PMTUDISC_WANT
= 1
891 # Included from bits/byteswap.h
892 def __bswap_constant_16(x
): return \
894 def __bswap_16(x
): return \
896 def __bswap_16(x
): return __bswap_constant_16 (x
)
898 def __bswap_constant_32(x
): return \
900 def __bswap_32(x
): return \
902 def __bswap_32(x
): return \
904 def __bswap_32(x
): return __bswap_constant_32 (x
)
906 def __bswap_64(x
): return \
908 def ntohl(x
): return (x
)
910 def ntohs(x
): return (x
)
912 def htonl(x
): return (x
)
914 def htons(x
): return (x
)
916 def ntohl(x
): return __bswap_32 (x
)
918 def ntohs(x
): return __bswap_16 (x
)
920 def htonl(x
): return __bswap_32 (x
)
922 def htons(x
): return __bswap_16 (x
)
924 def IN6_IS_ADDR_UNSPECIFIED(a
): return \
926 def IN6_IS_ADDR_LOOPBACK(a
): return \
928 def IN6_IS_ADDR_LINKLOCAL(a
): return \
930 def IN6_IS_ADDR_SITELOCAL(a
): return \
932 def IN6_IS_ADDR_V4MAPPED(a
): return \
934 def IN6_IS_ADDR_V4COMPAT(a
): return \
936 def IN6_IS_ADDR_MC_NODELOCAL(a
): return \
938 def IN6_IS_ADDR_MC_LINKLOCAL(a
): return \
940 def IN6_IS_ADDR_MC_SITELOCAL(a
): return \
942 def IN6_IS_ADDR_MC_ORGLOCAL(a
): return \
944 def IN6_IS_ADDR_MC_GLOBAL(a
): return