1 # Generated by h2py from /usr/include/netinet/in.h
3 # Included from sys/cdefs.h
6 __GNUCLIKE___TYPEOF
= 1
7 __GNUCLIKE___OFFSETOF
= 1
8 __GNUCLIKE___SECTION
= 1
9 __GNUCLIKE_ATTRIBUTE_MODE_DI
= 1
10 __GNUCLIKE_CTOR_SECTION_HANDLING
= 1
11 __GNUCLIKE_BUILTIN_CONSTANT_P
= 1
12 __GNUCLIKE_BUILTIN_VARARGS
= 1
13 __GNUCLIKE_BUILTIN_STDARG
= 1
14 __GNUCLIKE_BUILTIN_VAALIST
= 1
15 __GNUC_VA_LIST_COMPATIBILITY
= 1
16 __GNUCLIKE_BUILTIN_NEXT_ARG
= 1
17 __GNUCLIKE_BUILTIN_MEMCPY
= 1
18 __CC_SUPPORTS_INLINE
= 1
19 __CC_SUPPORTS___INLINE
= 1
20 __CC_SUPPORTS___INLINE__
= 1
21 __CC_SUPPORTS___FUNC__
= 1
22 __CC_SUPPORTS_WARNING
= 1
23 __CC_SUPPORTS_VARADIC_XXX
= 1
24 __CC_SUPPORTS_DYNAMIC_ARRAY_INIT
= 1
26 def __P(protos
): return protos
28 def __STRING(x
): return #x
30 def __XSTRING(x
): return __STRING(x
)
32 def __P(protos
): return ()
34 def __STRING(x
): return "x"
36 def __aligned(x
): return __attribute__((__aligned__(x
)))
38 def __section(x
): return __attribute__((__section__(x
)))
40 def __aligned(x
): return __attribute__((__aligned__(x
)))
42 def __section(x
): return __attribute__((__section__(x
)))
44 def __nonnull(x
): return __attribute__((__nonnull__(x
)))
46 def __predict_true(exp
): return __builtin_expect((exp
), 1)
48 def __predict_false(exp
): return __builtin_expect((exp
), 0)
50 def __predict_true(exp
): return (exp
)
52 def __predict_false(exp
): return (exp
)
54 def __format_arg(fmtarg
): return __attribute__((__format_arg__ (fmtarg
)))
56 def __FBSDID(s
): return __IDSTRING(__CONCAT(__rcsid_
,__LINE__
),s
)
58 def __RCSID(s
): return __IDSTRING(__CONCAT(__rcsid_
,__LINE__
),s
)
60 def __RCSID_SOURCE(s
): return __IDSTRING(__CONCAT(__rcsid_source_
,__LINE__
),s
)
62 def __SCCSID(s
): return __IDSTRING(__CONCAT(__sccsid_
,__LINE__
),s
)
64 def __COPYRIGHT(s
): return __IDSTRING(__CONCAT(__copyright_
,__LINE__
),s
)
66 _POSIX_C_SOURCE
= 199009
67 _POSIX_C_SOURCE
= 199209
69 _POSIX_C_SOURCE
= 200112
71 _POSIX_C_SOURCE
= 199506
72 _POSIX_C_SOURCE
= 198808
73 __POSIX_VISIBLE
= 200112
74 __ISO_C_VISIBLE
= 1999
75 __POSIX_VISIBLE
= 199506
76 __ISO_C_VISIBLE
= 1990
77 __POSIX_VISIBLE
= 199309
78 __ISO_C_VISIBLE
= 1990
79 __POSIX_VISIBLE
= 199209
80 __ISO_C_VISIBLE
= 1990
81 __POSIX_VISIBLE
= 199009
82 __ISO_C_VISIBLE
= 1990
83 __POSIX_VISIBLE
= 198808
88 __ISO_C_VISIBLE
= 1990
92 __ISO_C_VISIBLE
= 1999
93 __POSIX_VISIBLE
= 200112
96 __ISO_C_VISIBLE
= 1999
98 # Included from sys/_types.h
100 # Included from machine/_types.h
102 # Included from machine/endian.h
105 _LITTLE_ENDIAN
= 1234
108 _BYTE_ORDER
= _LITTLE_ENDIAN
109 LITTLE_ENDIAN
= _LITTLE_ENDIAN
110 BIG_ENDIAN
= _BIG_ENDIAN
111 PDP_ENDIAN
= _PDP_ENDIAN
112 BYTE_ORDER
= _BYTE_ORDER
113 def __word_swap_int_var(x
): return \
115 def __word_swap_int_const(x
): return \
117 def __word_swap_int(x
): return __word_swap_int_var(x
)
119 def __byte_swap_int_var(x
): return \
121 def __byte_swap_int_const(x
): return \
123 def __byte_swap_int(x
): return __byte_swap_int_var(x
)
125 def __byte_swap_long_var(x
): return \
127 def __byte_swap_long_const(x
): return \
129 def __byte_swap_long(x
): return __byte_swap_long_var(x
)
131 def __byte_swap_word_var(x
): return \
133 def __byte_swap_word_const(x
): return \
135 def __byte_swap_word(x
): return __byte_swap_word_var(x
)
137 def __htonl(x
): return __bswap32(x
)
139 def __htons(x
): return __bswap16(x
)
141 def __ntohl(x
): return __bswap32(x
)
143 def __ntohs(x
): return __bswap16(x
)
149 def htonl(x
): return __htonl(x
)
151 def htons(x
): return __htons(x
)
153 def ntohl(x
): return __ntohl(x
)
155 def ntohs(x
): return __ntohs(x
)
163 IPPROTO_IPIP
= IPPROTO_IPV4
200 IPPROTO_FRAGMENT
= 44
220 IPPROTO_SATEXPAK
= 64
221 IPPROTO_KRYPTOLAN
= 65
232 IPPROTO_BRSATMON
= 76
263 IPPROTO_OLD_DIVERT
= 254
267 IPPROTO_SPACER
= 32767
268 IPPORT_RESERVED
= 1024
269 IPPORT_HIFIRSTAUTO
= 49152
270 IPPORT_HILASTAUTO
= 65535
271 IPPORT_RESERVEDSTART
= 600
273 def IN_CLASSA(i
): return (((u_int32_t
)(i
) & 0x80000000) == 0)
275 IN_CLASSA_NET
= 0xff000000
276 IN_CLASSA_NSHIFT
= 24
277 IN_CLASSA_HOST
= 0x00ffffff
279 def IN_CLASSB(i
): return (((u_int32_t
)(i
) & 0xc0000000) == 0x80000000)
281 IN_CLASSB_NET
= 0xffff0000
282 IN_CLASSB_NSHIFT
= 16
283 IN_CLASSB_HOST
= 0x0000ffff
284 IN_CLASSB_MAX
= 65536
285 def IN_CLASSC(i
): return (((u_int32_t
)(i
) & 0xe0000000) == 0xc0000000)
287 IN_CLASSC_NET
= 0xffffff00
289 IN_CLASSC_HOST
= 0x000000ff
290 def IN_CLASSD(i
): return (((u_int32_t
)(i
) & 0xf0000000) == 0xe0000000)
292 IN_CLASSD_NET
= 0xf0000000
293 IN_CLASSD_NSHIFT
= 28
294 IN_CLASSD_HOST
= 0x0fffffff
295 def IN_MULTICAST(i
): return IN_CLASSD(i
)
297 def IN_EXPERIMENTAL(i
): return (((u_int32_t
)(i
) & 0xf0000000) == 0xf0000000)
299 def IN_BADCLASS(i
): return (((u_int32_t
)(i
) & 0xf0000000) == 0xf0000000)
301 INADDR_NONE
= 0xffffffff
310 IP_SENDSRCADDR
= IP_RECVDSTADDR
313 IP_MULTICAST_TTL
= 10
314 IP_MULTICAST_LOOP
= 11
315 IP_ADD_MEMBERSHIP
= 12
316 IP_DROP_MEMBERSHIP
= 13
317 IP_MULTICAST_VIF
= 14
329 IP_FW_TABLE_FLUSH
= 42
330 IP_FW_TABLE_GETSIZE
= 43
331 IP_FW_TABLE_LIST
= 44
338 IP_DUMMYNET_CONFIGURE
= 60
340 IP_DUMMYNET_FLUSH
= 62
345 IP_DEFAULT_MULTICAST_TTL
= 1
346 IP_DEFAULT_MULTICAST_LOOP
= 1
347 IP_MAX_MEMBERSHIPS
= 20
348 IP_PORTRANGE_DEFAULT
= 0
349 IP_PORTRANGE_HIGH
= 1
351 IPPROTO_MAXID
= (IPPROTO_AH
+ 1)
353 IPCTL_SENDREDIRECTS
= 2
357 IPCTL_RTMINEXPIRE
= 6
359 IPCTL_SOURCEROUTE
= 8
360 IPCTL_DIRECTEDBROADCAST
= 9
361 IPCTL_INTRQMAXLEN
= 10
362 IPCTL_INTRQDROPS
= 11
364 IPCTL_ACCEPTSOURCEROUTE
= 13
365 IPCTL_FASTFORWARDING
= 14
369 def in_nullhost(x
): return ((x
).s_addr
== INADDR_ANY
)
372 # Included from netinet6/in6.h
373 __KAME_VERSION
= "FreeBSD"
374 IPV6PORT_RESERVED
= 1024
375 IPV6PORT_ANONMIN
= 49152
376 IPV6PORT_ANONMAX
= 65535
377 IPV6PORT_RESERVEDMIN
= 600
378 IPV6PORT_RESERVEDMAX
= (IPV6PORT_RESERVED
-1)
379 INET6_ADDRSTRLEN
= 46
380 IPV6_ADDR_INT32_ONE
= 1
381 IPV6_ADDR_INT32_TWO
= 2
382 IPV6_ADDR_INT32_MNL
= 0xff010000
383 IPV6_ADDR_INT32_MLL
= 0xff020000
384 IPV6_ADDR_INT32_SMP
= 0x0000ffff
385 IPV6_ADDR_INT16_ULL
= 0xfe80
386 IPV6_ADDR_INT16_USL
= 0xfec0
387 IPV6_ADDR_INT16_MLL
= 0xff02
388 IPV6_ADDR_INT32_ONE
= 0x01000000
389 IPV6_ADDR_INT32_TWO
= 0x02000000
390 IPV6_ADDR_INT32_MNL
= 0x000001ff
391 IPV6_ADDR_INT32_MLL
= 0x000002ff
392 IPV6_ADDR_INT32_SMP
= 0xffff0000
393 IPV6_ADDR_INT16_ULL
= 0x80fe
394 IPV6_ADDR_INT16_USL
= 0xc0fe
395 IPV6_ADDR_INT16_MLL
= 0x02ff
396 def IN6_IS_ADDR_UNSPECIFIED(a
): return \
398 def IN6_IS_ADDR_LOOPBACK(a
): return \
400 def IN6_IS_ADDR_V4COMPAT(a
): return \
402 def IN6_IS_ADDR_V4MAPPED(a
): return \
404 IPV6_ADDR_SCOPE_NODELOCAL
= 0x01
405 IPV6_ADDR_SCOPE_INTFACELOCAL
= 0x01
406 IPV6_ADDR_SCOPE_LINKLOCAL
= 0x02
407 IPV6_ADDR_SCOPE_SITELOCAL
= 0x05
408 IPV6_ADDR_SCOPE_ORGLOCAL
= 0x08
409 IPV6_ADDR_SCOPE_GLOBAL
= 0x0e
410 __IPV6_ADDR_SCOPE_NODELOCAL
= 0x01
411 __IPV6_ADDR_SCOPE_INTFACELOCAL
= 0x01
412 __IPV6_ADDR_SCOPE_LINKLOCAL
= 0x02
413 __IPV6_ADDR_SCOPE_SITELOCAL
= 0x05
414 __IPV6_ADDR_SCOPE_ORGLOCAL
= 0x08
415 __IPV6_ADDR_SCOPE_GLOBAL
= 0x0e
416 def IN6_IS_ADDR_LINKLOCAL(a
): return \
418 def IN6_IS_ADDR_SITELOCAL(a
): return \
420 def IN6_IS_ADDR_MC_NODELOCAL(a
): return \
422 def IN6_IS_ADDR_MC_INTFACELOCAL(a
): return \
424 def IN6_IS_ADDR_MC_LINKLOCAL(a
): return \
426 def IN6_IS_ADDR_MC_SITELOCAL(a
): return \
428 def IN6_IS_ADDR_MC_ORGLOCAL(a
): return \
430 def IN6_IS_ADDR_MC_GLOBAL(a
): return \
432 def IN6_IS_ADDR_MC_NODELOCAL(a
): return \
434 def IN6_IS_ADDR_MC_LINKLOCAL(a
): return \
436 def IN6_IS_ADDR_MC_SITELOCAL(a
): return \
438 def IN6_IS_ADDR_MC_ORGLOCAL(a
): return \
440 def IN6_IS_ADDR_MC_GLOBAL(a
): return \
442 def IN6_IS_SCOPE_LINKLOCAL(a
): return \
444 def IFA6_IS_DEPRECATED(a
): return \
446 def IFA6_IS_INVALID(a
): return \
453 IPV6_SOCKOPT_RESERVED1
= 3
454 IPV6_UNICAST_HOPS
= 4
455 IPV6_MULTICAST_IF
= 9
456 IPV6_MULTICAST_HOPS
= 10
457 IPV6_MULTICAST_LOOP
= 11
459 IPV6_LEAVE_GROUP
= 13
462 IPV6_2292PKTINFO
= 19
463 IPV6_2292HOPLIMIT
= 20
464 IPV6_2292NEXTHOP
= 21
465 IPV6_2292HOPOPTS
= 22
466 IPV6_2292DSTOPTS
= 23
468 IPV6_2292PKTOPTIONS
= 25
471 IPV6_BINDV6ONLY
= IPV6_V6ONLY
472 IPV6_IPSEC_POLICY
= 28
479 IPV6_RTHDRDSTOPTS
= 35
480 IPV6_RECVPKTINFO
= 36
481 IPV6_RECVHOPLIMIT
= 37
483 IPV6_RECVHOPOPTS
= 39
484 IPV6_RECVDSTOPTS
= 40
485 IPV6_RECVRTHDRDSTOPTS
= 41
486 IPV6_USE_MIN_MTU
= 42
487 IPV6_RECVPATHMTU
= 43
498 IPV6_AUTOFLOWLABEL
= 59
501 IPV6_PREFER_TEMPADDR
= 63
503 IPV6_RTHDR_STRICT
= 1
504 IPV6_RTHDR_TYPE_0
= 0
505 IPV6_DEFAULT_MULTICAST_HOPS
= 1
506 IPV6_DEFAULT_MULTICAST_LOOP
= 1
507 IPV6_PORTRANGE_DEFAULT
= 0
508 IPV6_PORTRANGE_HIGH
= 1
509 IPV6_PORTRANGE_LOW
= 2
510 IPV6PROTO_MAXID
= (IPPROTO_PIM
+ 1)
511 IPV6CTL_FORWARDING
= 1
512 IPV6CTL_SENDREDIRECTS
= 2
515 IPV6CTL_FORWSRCRT
= 5
519 IPV6CTL_MAXFRAGPACKETS
= 9
520 IPV6CTL_SOURCECHECK
= 10
521 IPV6CTL_SOURCECHECK_LOGINT
= 11
522 IPV6CTL_ACCEPT_RTADV
= 12
523 IPV6CTL_KEEPFAITH
= 13
524 IPV6CTL_LOG_INTERVAL
= 14
525 IPV6CTL_HDRNESTLIMIT
= 15
526 IPV6CTL_DAD_COUNT
= 16
527 IPV6CTL_AUTO_FLOWLABEL
= 17
528 IPV6CTL_DEFMCASTHLIM
= 18
529 IPV6CTL_GIF_HLIM
= 19
530 IPV6CTL_KAME_VERSION
= 20
531 IPV6CTL_USE_DEPRECATED
= 21
532 IPV6CTL_RR_PRUNE
= 22
533 IPV6CTL_MAPPED_ADDR
= 23
535 IPV6CTL_RTEXPIRE
= 25
536 IPV6CTL_RTMINEXPIRE
= 26
537 IPV6CTL_RTMAXCACHE
= 27
538 IPV6CTL_USETEMPADDR
= 32
539 IPV6CTL_TEMPPLTIME
= 33
540 IPV6CTL_TEMPVLTIME
= 34
541 IPV6CTL_AUTO_LINKLOCAL
= 35
542 IPV6CTL_RIP6STATS
= 36
543 IPV6CTL_PREFER_TEMPADDR
= 37
544 IPV6CTL_ADDRCTLPOLICY
= 38
545 IPV6CTL_USE_DEFAULTZONE
= 39
546 IPV6CTL_MAXFRAGS
= 41
548 IPV6CTL_ISATAPRTR
= 43
549 IPV6CTL_MCAST_PMTU
= 44