# Generated by h2py from /usr/include/netinet/in.h

# Included from sys/cdefs.h

# Included from machine/cdefs.h

# Included from arm/cdefs.h
def __P(protos): return protos		 

def __STRING(x): return #x

def __P(protos): return ()		 

def __STRING(x): return "x"

def __attribute__(x): return  

def __predict_true(exp): return __builtin_expect(((exp) != 0), 1)

def __predict_false(exp): return __builtin_expect(((exp) != 0), 0)

def __predict_true(exp): return ((exp) != 0)

def __predict_false(exp): return ((exp) != 0)

def __statement(x): return __extension__(x)

def __statement(x): return (0)

def __statement(x): return (x)

__XPG_VISIBLE = 700
_POSIX_C_SOURCE = 200809L
__XPG_VISIBLE = 600
_POSIX_C_SOURCE = 200112L
__XPG_VISIBLE = 520
_POSIX_C_SOURCE = 199506L
__XPG_VISIBLE = 500
_POSIX_C_SOURCE = 199506L
__XPG_VISIBLE = 420
__XPG_VISIBLE = 400
__XPG_VISIBLE = 300
__POSIX_VISIBLE = 200809
__ISO_C_VISIBLE = 1999
__POSIX_VISIBLE = 200112
__ISO_C_VISIBLE = 1999
__POSIX_VISIBLE = 199506
__ISO_C_VISIBLE = 1990
__POSIX_VISIBLE = 199309
__ISO_C_VISIBLE = 1990
__POSIX_VISIBLE = 199209
__ISO_C_VISIBLE = 1990
__POSIX_VISIBLE = 199009
__ISO_C_VISIBLE = 1990
__POSIX_VISIBLE = 198808
__ISO_C_VISIBLE = 0
__POSIX_VISIBLE = 0
__XPG_VISIBLE = 0
__ISO_C_VISIBLE = 1990
__ISO_C_VISIBLE = 1999
__BSD_VISIBLE = 0
__XPG_VISIBLE = 700
__POSIX_VISIBLE = 200809
__ISO_C_VISIBLE = 1999
__BSD_VISIBLE = 1

# Included from sys/types.h

# Included from sys/_types.h

# Included from machine/_types.h

# Included from arm/_types.h

# Included from machine/endian.h

# Included from arm/endian.h

# Included from sys/endian.h
_LITTLE_ENDIAN = 1234
_BIG_ENDIAN = 4321
_PDP_ENDIAN = 3412
LITTLE_ENDIAN = _LITTLE_ENDIAN
BIG_ENDIAN = _BIG_ENDIAN
PDP_ENDIAN = _PDP_ENDIAN
def __swap16gen(x): return \

def __swap32gen(x): return \

def __swap64gen(x): return \

__swap16 = __swap16gen
__swap32 = __swap32gen
__swap64 = __swap64gen
swap16 = __swap16
swap32 = __swap32
swap64 = __swap64
_QUAD_HIGHWORD = 1
_QUAD_LOWWORD = 0
htobe16 = __swap16
htobe32 = __swap32
htobe64 = __swap64
betoh16 = __swap16
betoh32 = __swap32
betoh64 = __swap64
def htole16(x): return ((__uint16_t)(x))

def htole32(x): return ((__uint32_t)(x))

def htole64(x): return ((__uint64_t)(x))

def letoh16(x): return ((__uint16_t)(x))

def letoh32(x): return ((__uint32_t)(x))

def letoh64(x): return ((__uint64_t)(x))

def htons(x): return __swap16(x)

def htonl(x): return __swap32(x)

def ntohs(x): return __swap16(x)

def ntohl(x): return __swap32(x)

_QUAD_HIGHWORD = 0
_QUAD_LOWWORD = 1
htole16 = __swap16
htole32 = __swap32
htole64 = __swap64
letoh16 = __swap16
letoh32 = __swap32
letoh64 = __swap64
def htobe16(x): return ((__uint16_t)(x))

def htobe32(x): return ((__uint32_t)(x))

def htobe64(x): return ((__uint64_t)(x))

def betoh16(x): return ((__uint16_t)(x))

def betoh32(x): return ((__uint32_t)(x))

def betoh64(x): return ((__uint64_t)(x))

def htons(x): return ((__uint16_t)(x))

def htonl(x): return ((__uint32_t)(x))

def ntohs(x): return ((__uint16_t)(x))

def ntohl(x): return ((__uint32_t)(x))

def major(x): return ((int32_t)(((u_int32_t)(x) >> 8) & 0xff))

def minor(x): return ((int32_t)((x) & 0xff) | (((x) & (-65536)) >> 8))


# Included from sys/select.h

# Included from sys/time.h
DST_NONE = 0
DST_USA = 1
DST_AUST = 2
DST_WET = 3
DST_MET = 4
DST_EET = 5
DST_CAN = 6
ITIMER_REAL = 0
ITIMER_VIRTUAL = 1
ITIMER_PROF = 2

# Included from sys/_time.h
CLOCK_REALTIME = 0
CLOCK_VIRTUAL = 1
CLOCK_PROF = 2
CLOCK_MONOTONIC = 3
TIMER_RELTIME = 0x0
TIMER_ABSTIME = 0x1
def FROMBCD(x): return (((x) >> 4) * 10 + ((x) & 0xf))

def TOBCD(x): return (((x) / 10 * 16) + ((x) % 10))

SECDAY = 86400L
SECYR = (SECDAY * 365)
POSIX_BASE_YEAR = 1970

# Included from time.h
NULL = 0L
CLK_TCK = 100
CLOCKS_PER_SEC = 100
FD_SETSIZE = 1024
__NBBY = 8
def FD_ZERO(p): return bzero(p, sizeof(*(p)))

def FD_ZERO(p): return memset(p, 0, sizeof(*(p)))

NBBY = __NBBY
false = 0
true = 1
false = false
true = true
__bool_true_false_are_defined = 1
IPPROTO_IP = 0
IPPROTO_HOPOPTS = IPPROTO_IP
IPPROTO_ICMP = 1
IPPROTO_IGMP = 2
IPPROTO_GGP = 3
IPPROTO_IPIP = 4
IPPROTO_IPV4 = IPPROTO_IPIP
IPPROTO_TCP = 6
IPPROTO_EGP = 8
IPPROTO_PUP = 12
IPPROTO_UDP = 17
IPPROTO_IDP = 22
IPPROTO_TP = 29
IPPROTO_IPV6 = 41
IPPROTO_ROUTING = 43
IPPROTO_FRAGMENT = 44
IPPROTO_RSVP = 46
IPPROTO_GRE = 47
IPPROTO_ESP = 50
IPPROTO_AH = 51
IPPROTO_MOBILE = 55
IPPROTO_ICMPV6 = 58
IPPROTO_NONE = 59
IPPROTO_DSTOPTS = 60
IPPROTO_EON = 80
IPPROTO_ETHERIP = 97
IPPROTO_ENCAP = 98
IPPROTO_PIM = 103
IPPROTO_IPCOMP = 108
IPPROTO_CARP = 112
IPPROTO_MPLS = 137
IPPROTO_PFSYNC = 240
IPPROTO_RAW = 255
IPPROTO_MAX = 256
IPPROTO_DIVERT = 258
IPPORT_RESERVED = 1024
IPPORT_USERRESERVED = 49151
IPPORT_HIFIRSTAUTO = 49152
IPPORT_HILASTAUTO = 65535
IPPROTO_DONE = 257
def __IPADDR(x): return ((u_int32_t)(x))

IN_CLASSA_NSHIFT = 24
IN_CLASSA_MAX = 128
IN_CLASSB_NSHIFT = 16
IN_CLASSB_MAX = 65536
IN_CLASSC_NSHIFT = 8
IN_CLASSD_NSHIFT = 28
def IN_MULTICAST(i): return IN_CLASSD(i)

IN_RFC3021_NSHIFT = 31
IN_LOOPBACKNET = 127
IP_OPTIONS = 1
IP_HDRINCL = 2
IP_TOS = 3
IP_TTL = 4
IP_RECVOPTS = 5
IP_RECVRETOPTS = 6
IP_RECVDSTADDR = 7
IP_RETOPTS = 8
IP_MULTICAST_IF = 9
IP_MULTICAST_TTL = 10
IP_MULTICAST_LOOP = 11
IP_ADD_MEMBERSHIP = 12
IP_DROP_MEMBERSHIP = 13
IP_PORTRANGE = 19
IP_AUTH_LEVEL = 20
IP_ESP_TRANS_LEVEL = 21
IP_ESP_NETWORK_LEVEL = 22
IP_IPSEC_LOCAL_ID = 23
IP_IPSEC_REMOTE_ID = 24
IP_IPSEC_LOCAL_CRED = 25
IP_IPSEC_REMOTE_CRED = 26
IP_IPSEC_LOCAL_AUTH = 27
IP_IPSEC_REMOTE_AUTH = 28
IP_IPCOMP_LEVEL = 29
IP_RECVIF = 30
IP_RECVTTL = 31
IP_MINTTL = 32
IP_RECVDSTPORT = 33
IP_PIPEX = 34
IP_RECVRTABLE = 35
IP_IPSECFLOWINFO = 36
IP_RTABLE = 0x1021
IP_DIVERTFL = 0x1022
IPPROTO_DIVERT_RESP = 0x01
IPPROTO_DIVERT_INIT = 0x02
IPSEC_LEVEL_BYPASS = 0x00
IPSEC_LEVEL_NONE = 0x00
IPSEC_LEVEL_AVAIL = 0x01
IPSEC_LEVEL_USE = 0x02
IPSEC_LEVEL_REQUIRE = 0x03
IPSEC_LEVEL_UNIQUE = 0x04
IPSEC_LEVEL_DEFAULT = IPSEC_LEVEL_AVAIL
IPSEC_AUTH_LEVEL_DEFAULT = IPSEC_LEVEL_DEFAULT
IPSEC_ESP_TRANS_LEVEL_DEFAULT = IPSEC_LEVEL_DEFAULT
IPSEC_ESP_NETWORK_LEVEL_DEFAULT = IPSEC_LEVEL_DEFAULT
IPSEC_IPCOMP_LEVEL_DEFAULT = IPSEC_LEVEL_DEFAULT
IP_DEFAULT_MULTICAST_TTL = 1
IP_DEFAULT_MULTICAST_LOOP = 1
IP_MIN_MEMBERSHIPS = 15
IP_MAX_MEMBERSHIPS = 4095
IP_PORTRANGE_DEFAULT = 0
IP_PORTRANGE_HIGH = 1
IP_PORTRANGE_LOW = 2
INET_ADDRSTRLEN = 16
IPPROTO_MAXID = (IPPROTO_DIVERT + 1)
IPCTL_FORWARDING = 1
IPCTL_SENDREDIRECTS = 2
IPCTL_DEFTTL = 3
IPCTL_DEFMTU = 4
IPCTL_SOURCEROUTE = 5
IPCTL_DIRECTEDBCAST = 6
IPCTL_IPPORT_FIRSTAUTO = 7
IPCTL_IPPORT_LASTAUTO = 8
IPCTL_IPPORT_HIFIRSTAUTO = 9
IPCTL_IPPORT_HILASTAUTO = 10
IPCTL_IPPORT_MAXQUEUE = 11
IPCTL_ENCDEBUG = 12
IPCTL_GIF_TTL = 13
IPCTL_IPSEC_EXPIRE_ACQUIRE = 14
IPCTL_IPSEC_EMBRYONIC_SA_TIMEOUT = 15
IPCTL_IPSEC_REQUIRE_PFS = 16
IPCTL_IPSEC_SOFT_ALLOCATIONS = 17
IPCTL_IPSEC_ALLOCATIONS = 18
IPCTL_IPSEC_SOFT_BYTES = 19
IPCTL_IPSEC_BYTES = 20
IPCTL_IPSEC_TIMEOUT = 21
IPCTL_IPSEC_SOFT_TIMEOUT = 22
IPCTL_IPSEC_SOFT_FIRSTUSE = 23
IPCTL_IPSEC_FIRSTUSE = 24
IPCTL_IPSEC_ENC_ALGORITHM = 25
IPCTL_IPSEC_AUTH_ALGORITHM = 26
IPCTL_MTUDISC = 27
IPCTL_MTUDISCTIMEOUT = 28
IPCTL_IPSEC_IPCOMP_ALGORITHM = 29
IPCTL_IFQUEUE = 30
IPCTL_MFORWARDING = 31
IPCTL_MULTIPATH = 32
IPCTL_STATS = 33
IPCTL_MRTPROTO = 34
IPCTL_MRTSTATS = 35
IPCTL_ARPQUEUED = 36
IPCTL_MAXID = 37

# Included from netinet6/in6.h
__KAME_VERSION = "OpenBSD-current"
INET6_ADDRSTRLEN = 46
IPV6_ADDR_INT32_ONE = 1
IPV6_ADDR_INT32_TWO = 2
IPV6_ADDR_INT32_MNL = (-16711680)
IPV6_ADDR_INT32_MLL = (-16646144)
IPV6_ADDR_INT32_SMP = 0x0000ffff
IPV6_ADDR_INT16_ULL = 0xfe80
IPV6_ADDR_INT16_USL = 0xfec0
IPV6_ADDR_INT16_MLL = 0xff02
IPV6_ADDR_INT32_ONE = 0x01000000
IPV6_ADDR_INT32_TWO = 0x02000000
IPV6_ADDR_INT32_MNL = 0x000001ff
IPV6_ADDR_INT32_MLL = 0x000002ff
IPV6_ADDR_INT32_SMP = (-65536)
IPV6_ADDR_INT16_ULL = 0x80fe
IPV6_ADDR_INT16_USL = 0xc0fe
IPV6_ADDR_INT16_MLL = 0x02ff
def IN6_IS_ADDR_UNSPECIFIED(a): return \

def IN6_IS_ADDR_LOOPBACK(a): return \

def IN6_IS_ADDR_V4COMPAT(a): return \

def IN6_IS_ADDR_V4MAPPED(a): return \

IPV6_ADDR_SCOPE_NODELOCAL = 0x01
IPV6_ADDR_SCOPE_INTFACELOCAL = 0x01
IPV6_ADDR_SCOPE_LINKLOCAL = 0x02
IPV6_ADDR_SCOPE_SITELOCAL = 0x05
IPV6_ADDR_SCOPE_ORGLOCAL = 0x08
IPV6_ADDR_SCOPE_GLOBAL = 0x0e
__IPV6_ADDR_SCOPE_NODELOCAL = 0x01
__IPV6_ADDR_SCOPE_INTFACELOCAL = 0x01
__IPV6_ADDR_SCOPE_LINKLOCAL = 0x02
__IPV6_ADDR_SCOPE_SITELOCAL = 0x05
__IPV6_ADDR_SCOPE_ORGLOCAL = 0x08
__IPV6_ADDR_SCOPE_GLOBAL = 0x0e
def IN6_IS_ADDR_LINKLOCAL(a): return \

def IN6_IS_ADDR_SITELOCAL(a): return \

def IN6_IS_ADDR_MC_NODELOCAL(a): return \

def IN6_IS_ADDR_MC_INTFACELOCAL(a): return \

def IN6_IS_ADDR_MC_LINKLOCAL(a): return \

def IN6_IS_ADDR_MC_SITELOCAL(a): return \

def IN6_IS_ADDR_MC_ORGLOCAL(a): return \

def IN6_IS_ADDR_MC_GLOBAL(a): return \

def IN6_IS_ADDR_MC_NODELOCAL(a): return \

def IN6_IS_ADDR_MC_INTFACELOCAL(a): return \

def IN6_IS_ADDR_MC_LINKLOCAL(a): return \

def IN6_IS_ADDR_MC_SITELOCAL(a): return \

def IN6_IS_ADDR_MC_ORGLOCAL(a): return \

def IN6_IS_ADDR_MC_GLOBAL(a): return \

def IN6_IS_SCOPE_LINKLOCAL(a): return \

def IN6_IS_SCOPE_EMBED(a): return \

def IFA6_IS_DEPRECATED(a): return \

def IFA6_IS_INVALID(a): return \

IPV6_OPTIONS = 1
IPV6_SOCKOPT_RESERVED1 = 3
IPV6_UNICAST_HOPS = 4
IPV6_RECVOPTS = 5
IPV6_RECVRETOPTS = 6
IPV6_RECVDSTADDR = 7
IPV6_RETOPTS = 8
IPV6_MULTICAST_IF = 9
IPV6_MULTICAST_HOPS = 10
IPV6_MULTICAST_LOOP = 11
IPV6_JOIN_GROUP = 12
IPV6_LEAVE_GROUP = 13
IPV6_PORTRANGE = 14
ICMP6_FILTER = 18
IPV6_2292PKTINFO = 19
IPV6_2292HOPLIMIT = 20
IPV6_2292NEXTHOP = 21
IPV6_2292HOPOPTS = 22
IPV6_2292DSTOPTS = 23
IPV6_2292RTHDR = 24
IPV6_2292PKTOPTIONS = 25
IPV6_CHECKSUM = 26
IPV6_V6ONLY = 27
IPV6_IPSEC_POLICY = 28
IPV6_FAITH = 29
IPV6_RTHDRDSTOPTS = 35
IPV6_RECVPKTINFO = 36
IPV6_RECVHOPLIMIT = 37
IPV6_RECVRTHDR = 38
IPV6_RECVHOPOPTS = 39
IPV6_RECVDSTOPTS = 40
IPV6_RECVRTHDRDSTOPTS = 41
IPV6_USE_MIN_MTU = 42
IPV6_RECVPATHMTU = 43
IPV6_PATHMTU = 44
IPV6_PKTINFO = 46
IPV6_HOPLIMIT = 47
IPV6_NEXTHOP = 48
IPV6_HOPOPTS = 49
IPV6_DSTOPTS = 50
IPV6_RTHDR = 51
IPV6_AUTH_LEVEL = 53
IPV6_ESP_TRANS_LEVEL = 54
IPV6_ESP_NETWORK_LEVEL = 55
IPSEC6_OUTSA = 56
IPV6_RECVTCLASS = 57
IPV6_AUTOFLOWLABEL = 59
IPV6_IPCOMP_LEVEL = 60
IPV6_TCLASS = 61
IPV6_DONTFRAG = 62
IPV6_PIPEX = 63
IPV6_RECVDSTPORT = 64
IPV6_RTABLE = 0x1021
IPV6_RTHDR_LOOSE = 0
IPV6_RTHDR_STRICT = 1
IPV6_RTHDR_TYPE_0 = 0
IPV6_DEFAULT_MULTICAST_HOPS = 1
IPV6_DEFAULT_MULTICAST_LOOP = 1
IPV6_PORTRANGE_DEFAULT = 0
IPV6_PORTRANGE_HIGH = 1
IPV6_PORTRANGE_LOW = 2
IPV6PROTO_MAXID = (IPPROTO_DIVERT + 1)
IPV6CTL_FORWARDING = 1
IPV6CTL_SENDREDIRECTS = 2
IPV6CTL_DEFHLIM = 3
IPV6CTL_DEFMTU = 4
IPV6CTL_FORWSRCRT = 5
IPV6CTL_STATS = 6
IPV6CTL_MRTSTATS = 7
IPV6CTL_MRTPROTO = 8
IPV6CTL_MAXFRAGPACKETS = 9
IPV6CTL_SOURCECHECK = 10
IPV6CTL_SOURCECHECK_LOGINT = 11
IPV6CTL_ACCEPT_RTADV = 12
IPV6CTL_KEEPFAITH = 13
IPV6CTL_LOG_INTERVAL = 14
IPV6CTL_HDRNESTLIMIT = 15
IPV6CTL_DAD_COUNT = 16
IPV6CTL_AUTO_FLOWLABEL = 17
IPV6CTL_DEFMCASTHLIM = 18
IPV6CTL_GIF_HLIM = 19
IPV6CTL_KAME_VERSION = 20
IPV6CTL_USE_DEPRECATED = 21
IPV6CTL_RR_PRUNE = 22
IPV6CTL_V6ONLY = 24
IPV6CTL_MAXFRAGS = 41
IPV6CTL_MFORWARDING = 42
IPV6CTL_MULTIPATH = 43
IPV6CTL_MCAST_PMTU = 44
IPV6CTL_NEIGHBORGCTHRESH = 45
IPV6CTL_MAXIFPREFIXES = 46
IPV6CTL_MAXIFDEFROUTERS = 47
IPV6CTL_MAXDYNROUTES = 48
IPV6CTL_DAD_PENDING = 49
IPV6CTL_MAXID = 50
def in_nullhost(x): return ((x).s_addr == INADDR_ANY)

