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_word_var(x
): return \
127 def __byte_swap_word_const(x
): return \
129 def __byte_swap_word(x
): return __byte_swap_word_var(x
)
131 def __htonl(x
): return __bswap32(x
)
133 def __htons(x
): return __bswap16(x
)
135 def __ntohl(x
): return __bswap32(x
)
137 def __ntohs(x
): return __bswap16(x
)
143 def htonl(x
): return __htonl(x
)
145 def htons(x
): return __htons(x
)
147 def ntohl(x
): return __ntohl(x
)
149 def ntohs(x
): return __ntohs(x
)
157 IPPROTO_IPIP
= IPPROTO_IPV4
194 IPPROTO_FRAGMENT
= 44
214 IPPROTO_SATEXPAK
= 64
215 IPPROTO_KRYPTOLAN
= 65
226 IPPROTO_BRSATMON
= 76
257 IPPROTO_OLD_DIVERT
= 254
261 IPPROTO_SPACER
= 32767
262 IPPORT_RESERVED
= 1024
263 IPPORT_HIFIRSTAUTO
= 49152
264 IPPORT_HILASTAUTO
= 65535
265 IPPORT_RESERVEDSTART
= 600
267 def IN_CLASSA(i
): return (((u_int32_t
)(i
) & (-2147483648)) == 0)
269 IN_CLASSA_NET
= (-16777216)
270 IN_CLASSA_NSHIFT
= 24
271 IN_CLASSA_HOST
= 0x00ffffff
273 def IN_CLASSB(i
): return (((u_int32_t
)(i
) & (-1073741824)) == (-2147483648))
275 IN_CLASSB_NET
= (-65536)
276 IN_CLASSB_NSHIFT
= 16
277 IN_CLASSB_HOST
= 0x0000ffff
278 IN_CLASSB_MAX
= 65536
279 def IN_CLASSC(i
): return (((u_int32_t
)(i
) & (-536870912)) == (-1073741824))
281 IN_CLASSC_NET
= (-256)
283 IN_CLASSC_HOST
= 0x000000ff
284 def IN_CLASSD(i
): return (((u_int32_t
)(i
) & (-268435456)) == (-536870912))
286 IN_CLASSD_NET
= (-268435456)
287 IN_CLASSD_NSHIFT
= 28
288 IN_CLASSD_HOST
= 0x0fffffff
289 def IN_MULTICAST(i
): return IN_CLASSD(i
)
291 def IN_EXPERIMENTAL(i
): return (((u_int32_t
)(i
) & (-268435456)) == (-268435456))
293 def IN_BADCLASS(i
): return (((u_int32_t
)(i
) & (-268435456)) == (-268435456))
295 def IN_LINKLOCAL(i
): return (((u_int32_t
)(i
) & (-65536)) == (-1442971648))
297 def IN_LOCAL_GROUP(i
): return (((u_int32_t
)(i
) & (-256)) == (-536870912))
308 IP_SENDSRCADDR
= IP_RECVDSTADDR
311 IP_MULTICAST_TTL
= 10
312 IP_MULTICAST_LOOP
= 11
313 IP_ADD_MEMBERSHIP
= 12
314 IP_DROP_MEMBERSHIP
= 13
315 IP_MULTICAST_VIF
= 14
327 IP_FW_TABLE_FLUSH
= 42
328 IP_FW_TABLE_GETSIZE
= 43
329 IP_FW_TABLE_LIST
= 44
338 IP_FW_NAT_GET_CONFIG
= 58
339 IP_FW_NAT_GET_LOG
= 59
340 IP_DUMMYNET_CONFIGURE
= 60
342 IP_DUMMYNET_FLUSH
= 62
347 IP_ADD_SOURCE_MEMBERSHIP
= 70
348 IP_DROP_SOURCE_MEMBERSHIP
= 71
350 IP_UNBLOCK_SOURCE
= 73
352 MCAST_JOIN_GROUP
= 80
353 MCAST_LEAVE_GROUP
= 81
354 MCAST_JOIN_SOURCE_GROUP
= 82
355 MCAST_LEAVE_SOURCE_GROUP
= 83
356 MCAST_BLOCK_SOURCE
= 84
357 MCAST_UNBLOCK_SOURCE
= 85
358 IP_DEFAULT_MULTICAST_TTL
= 1
359 IP_DEFAULT_MULTICAST_LOOP
= 1
360 IP_MIN_MEMBERSHIPS
= 31
361 IP_MAX_MEMBERSHIPS
= 4095
362 IP_MAX_SOURCE_FILTER
= 1024
365 IP_PORTRANGE_DEFAULT
= 0
366 IP_PORTRANGE_HIGH
= 1
368 IPPROTO_MAXID
= (IPPROTO_AH
+ 1)
370 IPCTL_SENDREDIRECTS
= 2
374 IPCTL_RTMINEXPIRE
= 6
376 IPCTL_SOURCEROUTE
= 8
377 IPCTL_DIRECTEDBROADCAST
= 9
378 IPCTL_INTRQMAXLEN
= 10
379 IPCTL_INTRQDROPS
= 11
381 IPCTL_ACCEPTSOURCEROUTE
= 13
382 IPCTL_FASTFORWARDING
= 14
386 def in_nullhost(x
): return ((x
).s_addr
== INADDR_ANY
)
389 # Included from netinet6/in6.h
390 __KAME_VERSION
= "FreeBSD"
391 IPV6PORT_RESERVED
= 1024
392 IPV6PORT_ANONMIN
= 49152
393 IPV6PORT_ANONMAX
= 65535
394 IPV6PORT_RESERVEDMIN
= 600
395 IPV6PORT_RESERVEDMAX
= (IPV6PORT_RESERVED
-1)
396 INET6_ADDRSTRLEN
= 46
397 IPV6_ADDR_INT32_ONE
= 1
398 IPV6_ADDR_INT32_TWO
= 2
399 IPV6_ADDR_INT32_MNL
= (-16711680)
400 IPV6_ADDR_INT32_MLL
= (-16646144)
401 IPV6_ADDR_INT32_SMP
= 0x0000ffff
402 IPV6_ADDR_INT16_ULL
= 0xfe80
403 IPV6_ADDR_INT16_USL
= 0xfec0
404 IPV6_ADDR_INT16_MLL
= 0xff02
405 IPV6_ADDR_INT32_ONE
= 0x01000000
406 IPV6_ADDR_INT32_TWO
= 0x02000000
407 IPV6_ADDR_INT32_MNL
= 0x000001ff
408 IPV6_ADDR_INT32_MLL
= 0x000002ff
409 IPV6_ADDR_INT32_SMP
= (-65536)
410 IPV6_ADDR_INT16_ULL
= 0x80fe
411 IPV6_ADDR_INT16_USL
= 0xc0fe
412 IPV6_ADDR_INT16_MLL
= 0x02ff
413 def IN6_IS_ADDR_UNSPECIFIED(a
): return \
415 def IN6_IS_ADDR_LOOPBACK(a
): return \
417 def IN6_IS_ADDR_V4COMPAT(a
): return \
419 def IN6_IS_ADDR_V4MAPPED(a
): return \
421 IPV6_ADDR_SCOPE_NODELOCAL
= 0x01
422 IPV6_ADDR_SCOPE_INTFACELOCAL
= 0x01
423 IPV6_ADDR_SCOPE_LINKLOCAL
= 0x02
424 IPV6_ADDR_SCOPE_SITELOCAL
= 0x05
425 IPV6_ADDR_SCOPE_ORGLOCAL
= 0x08
426 IPV6_ADDR_SCOPE_GLOBAL
= 0x0e
427 __IPV6_ADDR_SCOPE_NODELOCAL
= 0x01
428 __IPV6_ADDR_SCOPE_INTFACELOCAL
= 0x01
429 __IPV6_ADDR_SCOPE_LINKLOCAL
= 0x02
430 __IPV6_ADDR_SCOPE_SITELOCAL
= 0x05
431 __IPV6_ADDR_SCOPE_ORGLOCAL
= 0x08
432 __IPV6_ADDR_SCOPE_GLOBAL
= 0x0e
433 def IN6_IS_ADDR_LINKLOCAL(a
): return \
435 def IN6_IS_ADDR_SITELOCAL(a
): return \
437 def IN6_IS_ADDR_MC_NODELOCAL(a
): return \
439 def IN6_IS_ADDR_MC_INTFACELOCAL(a
): return \
441 def IN6_IS_ADDR_MC_LINKLOCAL(a
): return \
443 def IN6_IS_ADDR_MC_SITELOCAL(a
): return \
445 def IN6_IS_ADDR_MC_ORGLOCAL(a
): return \
447 def IN6_IS_ADDR_MC_GLOBAL(a
): return \
449 def IN6_IS_ADDR_MC_NODELOCAL(a
): return \
451 def IN6_IS_ADDR_MC_LINKLOCAL(a
): return \
453 def IN6_IS_ADDR_MC_SITELOCAL(a
): return \
455 def IN6_IS_ADDR_MC_ORGLOCAL(a
): return \
457 def IN6_IS_ADDR_MC_GLOBAL(a
): return \
459 def IN6_IS_SCOPE_LINKLOCAL(a
): return \
461 def IN6_IS_SCOPE_EMBED(a
): return \
463 def IFA6_IS_DEPRECATED(a
): return \
465 def IFA6_IS_INVALID(a
): return \
472 IPV6_SOCKOPT_RESERVED1
= 3
473 IPV6_UNICAST_HOPS
= 4
474 IPV6_MULTICAST_IF
= 9
475 IPV6_MULTICAST_HOPS
= 10
476 IPV6_MULTICAST_LOOP
= 11
478 IPV6_LEAVE_GROUP
= 13
481 IPV6_2292PKTINFO
= 19
482 IPV6_2292HOPLIMIT
= 20
483 IPV6_2292NEXTHOP
= 21
484 IPV6_2292HOPOPTS
= 22
485 IPV6_2292DSTOPTS
= 23
487 IPV6_2292PKTOPTIONS
= 25
490 IPV6_BINDV6ONLY
= IPV6_V6ONLY
491 IPV6_IPSEC_POLICY
= 28
498 IPV6_RTHDRDSTOPTS
= 35
499 IPV6_RECVPKTINFO
= 36
500 IPV6_RECVHOPLIMIT
= 37
502 IPV6_RECVHOPOPTS
= 39
503 IPV6_RECVDSTOPTS
= 40
504 IPV6_RECVRTHDRDSTOPTS
= 41
505 IPV6_USE_MIN_MTU
= 42
506 IPV6_RECVPATHMTU
= 43
517 IPV6_AUTOFLOWLABEL
= 59
520 IPV6_PREFER_TEMPADDR
= 63
523 IPV6_RTHDR_STRICT
= 1
524 IPV6_RTHDR_TYPE_0
= 0
525 IPV6_DEFAULT_MULTICAST_HOPS
= 1
526 IPV6_DEFAULT_MULTICAST_LOOP
= 1
527 IPV6_PORTRANGE_DEFAULT
= 0
528 IPV6_PORTRANGE_HIGH
= 1
529 IPV6_PORTRANGE_LOW
= 2
530 IPV6PROTO_MAXID
= (IPPROTO_PIM
+ 1)
531 IPV6CTL_FORWARDING
= 1
532 IPV6CTL_SENDREDIRECTS
= 2
535 IPV6CTL_FORWSRCRT
= 5
539 IPV6CTL_MAXFRAGPACKETS
= 9
540 IPV6CTL_SOURCECHECK
= 10
541 IPV6CTL_SOURCECHECK_LOGINT
= 11
542 IPV6CTL_ACCEPT_RTADV
= 12
543 IPV6CTL_KEEPFAITH
= 13
544 IPV6CTL_LOG_INTERVAL
= 14
545 IPV6CTL_HDRNESTLIMIT
= 15
546 IPV6CTL_DAD_COUNT
= 16
547 IPV6CTL_AUTO_FLOWLABEL
= 17
548 IPV6CTL_DEFMCASTHLIM
= 18
549 IPV6CTL_GIF_HLIM
= 19
550 IPV6CTL_KAME_VERSION
= 20
551 IPV6CTL_USE_DEPRECATED
= 21
552 IPV6CTL_RR_PRUNE
= 22
553 IPV6CTL_MAPPED_ADDR
= 23
555 IPV6CTL_RTEXPIRE
= 25
556 IPV6CTL_RTMINEXPIRE
= 26
557 IPV6CTL_RTMAXCACHE
= 27
558 IPV6CTL_USETEMPADDR
= 32
559 IPV6CTL_TEMPPLTIME
= 33
560 IPV6CTL_TEMPVLTIME
= 34
561 IPV6CTL_AUTO_LINKLOCAL
= 35
562 IPV6CTL_RIP6STATS
= 36
563 IPV6CTL_PREFER_TEMPADDR
= 37
564 IPV6CTL_ADDRCTLPOLICY
= 38
565 IPV6CTL_USE_DEFAULTZONE
= 39
566 IPV6CTL_MAXFRAGS
= 41
568 IPV6CTL_ISATAPRTR
= 43
569 IPV6CTL_MCAST_PMTU
= 44