1 # Generated by h2py from /usr/include/netinet/in.h
3 # Included from sys/cdefs.h
4 def __P(protos
): return protos
6 def __STRING(x
): return #x
8 def __XSTRING(x
): return __STRING(x
)
10 def __P(protos
): return ()
12 def __STRING(x
): return "x"
14 def __aligned(x
): return __attribute__((__aligned__(x
)))
16 def __section(x
): return __attribute__((__section__(x
)))
18 def __aligned(x
): return __attribute__((__aligned__(x
)))
20 def __section(x
): return __attribute__((__section__(x
)))
22 def __nonnull(x
): return __attribute__((__nonnull__(x
)))
24 def __predict_true(exp
): return __builtin_expect((exp
), 1)
26 def __predict_false(exp
): return __builtin_expect((exp
), 0)
28 def __predict_true(exp
): return (exp
)
30 def __predict_false(exp
): return (exp
)
32 def __FBSDID(s
): return __IDSTRING(__CONCAT(__rcsid_
,__LINE__
),s
)
34 def __RCSID(s
): return __IDSTRING(__CONCAT(__rcsid_
,__LINE__
),s
)
36 def __RCSID_SOURCE(s
): return __IDSTRING(__CONCAT(__rcsid_source_
,__LINE__
),s
)
38 def __SCCSID(s
): return __IDSTRING(__CONCAT(__sccsid_
,__LINE__
),s
)
40 def __COPYRIGHT(s
): return __IDSTRING(__CONCAT(__copyright_
,__LINE__
),s
)
42 _POSIX_C_SOURCE
= 199009
43 _POSIX_C_SOURCE
= 199209
45 _POSIX_C_SOURCE
= 200112
47 _POSIX_C_SOURCE
= 199506
48 _POSIX_C_SOURCE
= 198808
49 __POSIX_VISIBLE
= 200112
50 __ISO_C_VISIBLE
= 1999
51 __POSIX_VISIBLE
= 199506
52 __ISO_C_VISIBLE
= 1990
53 __POSIX_VISIBLE
= 199309
54 __ISO_C_VISIBLE
= 1990
55 __POSIX_VISIBLE
= 199209
56 __ISO_C_VISIBLE
= 1990
57 __POSIX_VISIBLE
= 199009
58 __ISO_C_VISIBLE
= 1990
59 __POSIX_VISIBLE
= 198808
64 __ISO_C_VISIBLE
= 1990
68 __ISO_C_VISIBLE
= 1999
69 __POSIX_VISIBLE
= 200112
72 __ISO_C_VISIBLE
= 1999
74 # Included from sys/_types.h
76 # Included from machine/_types.h
78 # Included from machine/endian.h
84 _BYTE_ORDER
= _LITTLE_ENDIAN
85 LITTLE_ENDIAN
= _LITTLE_ENDIAN
86 BIG_ENDIAN
= _BIG_ENDIAN
87 PDP_ENDIAN
= _PDP_ENDIAN
88 BYTE_ORDER
= _BYTE_ORDER
89 __INTEL_COMPILER_with_FreeBSD_endian
= 1
90 __INTEL_COMPILER_with_FreeBSD_endian
= 1
91 def __word_swap_int_var(x
): return \
93 def __word_swap_int_const(x
): return \
95 def __word_swap_int(x
): return __word_swap_int_var(x
)
97 def __byte_swap_int_var(x
): return \
99 def __byte_swap_int_var(x
): return \
101 def __byte_swap_int_const(x
): return \
103 def __byte_swap_int(x
): return __byte_swap_int_var(x
)
105 def __byte_swap_word_var(x
): return \
107 def __byte_swap_word_const(x
): return \
109 def __byte_swap_word(x
): return __byte_swap_word_var(x
)
111 def __htonl(x
): return __bswap32(x
)
113 def __htons(x
): return __bswap16(x
)
115 def __ntohl(x
): return __bswap32(x
)
117 def __ntohs(x
): return __bswap16(x
)
123 def htonl(x
): return __htonl(x
)
125 def htons(x
): return __htons(x
)
127 def ntohl(x
): return __ntohl(x
)
129 def ntohs(x
): return __ntohs(x
)
137 IPPROTO_IPIP
= IPPROTO_IPV4
174 IPPROTO_FRAGMENT
= 44
194 IPPROTO_SATEXPAK
= 64
195 IPPROTO_KRYPTOLAN
= 65
206 IPPROTO_BRSATMON
= 76
235 IPPROTO_OLD_DIVERT
= 254
239 IPPORT_RESERVED
= 1024
240 IPPORT_HIFIRSTAUTO
= 49152
241 IPPORT_HILASTAUTO
= 65535
242 IPPORT_RESERVEDSTART
= 600
244 def IN_CLASSA(i
): return (((u_int32_t
)(i
) & (-2147483648)) == 0)
246 IN_CLASSA_NET
= (-16777216)
247 IN_CLASSA_NSHIFT
= 24
248 IN_CLASSA_HOST
= 0x00ffffff
250 def IN_CLASSB(i
): return (((u_int32_t
)(i
) & (-1073741824)) == (-2147483648))
252 IN_CLASSB_NET
= (-65536)
253 IN_CLASSB_NSHIFT
= 16
254 IN_CLASSB_HOST
= 0x0000ffff
255 IN_CLASSB_MAX
= 65536
256 def IN_CLASSC(i
): return (((u_int32_t
)(i
) & (-536870912)) == (-1073741824))
258 IN_CLASSC_NET
= (-256)
260 IN_CLASSC_HOST
= 0x000000ff
261 def IN_CLASSD(i
): return (((u_int32_t
)(i
) & (-268435456)) == (-536870912))
263 IN_CLASSD_NET
= (-268435456)
264 IN_CLASSD_NSHIFT
= 28
265 IN_CLASSD_HOST
= 0x0fffffff
266 def IN_MULTICAST(i
): return IN_CLASSD(i
)
268 def IN_EXPERIMENTAL(i
): return (((u_int32_t
)(i
) & (-268435456)) == (-268435456))
270 def IN_BADCLASS(i
): return (((u_int32_t
)(i
) & (-268435456)) == (-268435456))
281 IP_SENDSRCADDR
= IP_RECVDSTADDR
284 IP_MULTICAST_TTL
= 10
285 IP_MULTICAST_LOOP
= 11
286 IP_ADD_MEMBERSHIP
= 12
287 IP_DROP_MEMBERSHIP
= 13
288 IP_MULTICAST_VIF
= 14
300 IP_FW_TABLE_FLUSH
= 42
301 IP_FW_TABLE_GETSIZE
= 43
302 IP_FW_TABLE_LIST
= 44
309 IP_DUMMYNET_CONFIGURE
= 60
311 IP_DUMMYNET_FLUSH
= 62
314 IP_DEFAULT_MULTICAST_TTL
= 1
315 IP_DEFAULT_MULTICAST_LOOP
= 1
316 IP_MAX_MEMBERSHIPS
= 20
317 IP_PORTRANGE_DEFAULT
= 0
318 IP_PORTRANGE_HIGH
= 1
320 IPPROTO_MAXID
= (IPPROTO_AH
+ 1)
322 IPCTL_SENDREDIRECTS
= 2
326 IPCTL_RTMINEXPIRE
= 6
328 IPCTL_SOURCEROUTE
= 8
329 IPCTL_DIRECTEDBROADCAST
= 9
330 IPCTL_INTRQMAXLEN
= 10
331 IPCTL_INTRQDROPS
= 11
333 IPCTL_ACCEPTSOURCEROUTE
= 13
334 IPCTL_FASTFORWARDING
= 14
338 def in_nullhost(x
): return ((x
).s_addr
== INADDR_ANY
)
341 # Included from netinet6/in6.h
342 __KAME_VERSION
= "20010528/FreeBSD"
343 IPV6PORT_RESERVED
= 1024
344 IPV6PORT_ANONMIN
= 49152
345 IPV6PORT_ANONMAX
= 65535
346 IPV6PORT_RESERVEDMIN
= 600
347 IPV6PORT_RESERVEDMAX
= (IPV6PORT_RESERVED
-1)
348 INET6_ADDRSTRLEN
= 46
349 IPV6_ADDR_INT32_ONE
= 1
350 IPV6_ADDR_INT32_TWO
= 2
351 IPV6_ADDR_INT32_MNL
= (-16711680)
352 IPV6_ADDR_INT32_MLL
= (-16646144)
353 IPV6_ADDR_INT32_SMP
= 0x0000ffff
354 IPV6_ADDR_INT16_ULL
= 0xfe80
355 IPV6_ADDR_INT16_USL
= 0xfec0
356 IPV6_ADDR_INT16_MLL
= 0xff02
357 IPV6_ADDR_INT32_ONE
= 0x01000000
358 IPV6_ADDR_INT32_TWO
= 0x02000000
359 IPV6_ADDR_INT32_MNL
= 0x000001ff
360 IPV6_ADDR_INT32_MLL
= 0x000002ff
361 IPV6_ADDR_INT32_SMP
= (-65536)
362 IPV6_ADDR_INT16_ULL
= 0x80fe
363 IPV6_ADDR_INT16_USL
= 0xc0fe
364 IPV6_ADDR_INT16_MLL
= 0x02ff
365 def IN6_IS_ADDR_UNSPECIFIED(a
): return \
367 def IN6_IS_ADDR_LOOPBACK(a
): return \
369 def IN6_IS_ADDR_V4COMPAT(a
): return \
371 def IN6_IS_ADDR_V4MAPPED(a
): return \
373 IPV6_ADDR_SCOPE_NODELOCAL
= 0x01
374 IPV6_ADDR_SCOPE_INTFACELOCAL
= 0x01
375 IPV6_ADDR_SCOPE_LINKLOCAL
= 0x02
376 IPV6_ADDR_SCOPE_SITELOCAL
= 0x05
377 IPV6_ADDR_SCOPE_ORGLOCAL
= 0x08
378 IPV6_ADDR_SCOPE_GLOBAL
= 0x0e
379 __IPV6_ADDR_SCOPE_NODELOCAL
= 0x01
380 __IPV6_ADDR_SCOPE_INTFACELOCAL
= 0x01
381 __IPV6_ADDR_SCOPE_LINKLOCAL
= 0x02
382 __IPV6_ADDR_SCOPE_SITELOCAL
= 0x05
383 __IPV6_ADDR_SCOPE_ORGLOCAL
= 0x08
384 __IPV6_ADDR_SCOPE_GLOBAL
= 0x0e
385 def IN6_IS_ADDR_LINKLOCAL(a
): return \
387 def IN6_IS_ADDR_SITELOCAL(a
): return \
389 def IN6_IS_ADDR_MC_NODELOCAL(a
): return \
391 def IN6_IS_ADDR_MC_INTFACELOCAL(a
): return \
393 def IN6_IS_ADDR_MC_LINKLOCAL(a
): return \
395 def IN6_IS_ADDR_MC_SITELOCAL(a
): return \
397 def IN6_IS_ADDR_MC_ORGLOCAL(a
): return \
399 def IN6_IS_ADDR_MC_GLOBAL(a
): return \
401 def IN6_IS_ADDR_MC_NODELOCAL(a
): return \
403 def IN6_IS_ADDR_MC_LINKLOCAL(a
): return \
405 def IN6_IS_ADDR_MC_SITELOCAL(a
): return \
407 def IN6_IS_ADDR_MC_ORGLOCAL(a
): return \
409 def IN6_IS_ADDR_MC_GLOBAL(a
): return \
411 def IN6_IS_SCOPE_LINKLOCAL(a
): return \
413 def IFA6_IS_DEPRECATED(a
): return \
415 def IFA6_IS_INVALID(a
): return \
422 IPV6_SOCKOPT_RESERVED1
= 3
423 IPV6_UNICAST_HOPS
= 4
424 IPV6_MULTICAST_IF
= 9
425 IPV6_MULTICAST_HOPS
= 10
426 IPV6_MULTICAST_LOOP
= 11
428 IPV6_LEAVE_GROUP
= 13
431 IPV6_2292PKTINFO
= 19
432 IPV6_2292HOPLIMIT
= 20
433 IPV6_2292NEXTHOP
= 21
434 IPV6_2292HOPOPTS
= 22
435 IPV6_2292DSTOPTS
= 23
437 IPV6_2292PKTOPTIONS
= 25
440 IPV6_BINDV6ONLY
= IPV6_V6ONLY
441 IPV6_IPSEC_POLICY
= 28
448 IPV6_RTHDRDSTOPTS
= 35
449 IPV6_RECVPKTINFO
= 36
450 IPV6_RECVHOPLIMIT
= 37
452 IPV6_RECVHOPOPTS
= 39
453 IPV6_RECVDSTOPTS
= 40
454 IPV6_RECVRTHDRDSTOPTS
= 41
455 IPV6_USE_MIN_MTU
= 42
456 IPV6_RECVPATHMTU
= 43
467 IPV6_AUTOFLOWLABEL
= 59
470 IPV6_PREFER_TEMPADDR
= 63
472 IPV6_RTHDR_STRICT
= 1
473 IPV6_RTHDR_TYPE_0
= 0
474 IPV6_DEFAULT_MULTICAST_HOPS
= 1
475 IPV6_DEFAULT_MULTICAST_LOOP
= 1
476 IPV6_PORTRANGE_DEFAULT
= 0
477 IPV6_PORTRANGE_HIGH
= 1
478 IPV6_PORTRANGE_LOW
= 2
479 IPV6PROTO_MAXID
= (IPPROTO_PIM
+ 1)
480 IPV6CTL_FORWARDING
= 1
481 IPV6CTL_SENDREDIRECTS
= 2
484 IPV6CTL_FORWSRCRT
= 5
488 IPV6CTL_MAXFRAGPACKETS
= 9
489 IPV6CTL_SOURCECHECK
= 10
490 IPV6CTL_SOURCECHECK_LOGINT
= 11
491 IPV6CTL_ACCEPT_RTADV
= 12
492 IPV6CTL_KEEPFAITH
= 13
493 IPV6CTL_LOG_INTERVAL
= 14
494 IPV6CTL_HDRNESTLIMIT
= 15
495 IPV6CTL_DAD_COUNT
= 16
496 IPV6CTL_AUTO_FLOWLABEL
= 17
497 IPV6CTL_DEFMCASTHLIM
= 18
498 IPV6CTL_GIF_HLIM
= 19
499 IPV6CTL_KAME_VERSION
= 20
500 IPV6CTL_USE_DEPRECATED
= 21
501 IPV6CTL_RR_PRUNE
= 22
502 IPV6CTL_MAPPED_ADDR
= 23
504 IPV6CTL_RTEXPIRE
= 25
505 IPV6CTL_RTMINEXPIRE
= 26
506 IPV6CTL_RTMAXCACHE
= 27
507 IPV6CTL_USETEMPADDR
= 32
508 IPV6CTL_TEMPPLTIME
= 33
509 IPV6CTL_TEMPVLTIME
= 34
510 IPV6CTL_AUTO_LINKLOCAL
= 35
511 IPV6CTL_RIP6STATS
= 36
512 IPV6CTL_PREFER_TEMPADDR
= 37
513 IPV6CTL_ADDRCTLPOLICY
= 38
514 IPV6CTL_MAXFRAGS
= 41