# Generated by h2py from /usr/include/netinet/in.h
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_PFSYNC = 240
IPPROTO_RAW = 255
IPPROTO_MAX = 256
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_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
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_MAX_MEMBERSHIPS = 20
IP_PORTRANGE_DEFAULT = 0
IP_PORTRANGE_HIGH = 1
IP_PORTRANGE_LOW = 2
INET_ADDRSTRLEN = 16
IPPROTO_MAXID = (IPPROTO_CARP + 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_MAXID = 30

# Included from netinet6/in6.h
__KAME_VERSION = "OpenBSD-current"
IPV6PORT_RESERVED = 1024
IPV6PORT_ANONMIN = 49152
IPV6PORT_ANONMAX = 65535
IPV6PORT_RESERVEDMIN = 600
IPV6PORT_RESERVEDMAX = (IPV6PORT_RESERVED-1)
INET6_ADDRSTRLEN = 46
IPV6_ADDR_INT32_ONE = 1
IPV6_ADDR_INT32_TWO = 2
IPV6_ADDR_INT32_MNL = 0xff010000
IPV6_ADDR_INT32_MLL = 0xff020000
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 = 0xffff0000
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_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_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_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_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 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_PKTINFO = 19
IPV6_HOPLIMIT = 20
IPV6_NEXTHOP = 21
IPV6_HOPOPTS = 22
IPV6_DSTOPTS = 23
IPV6_RTHDR = 24
IPV6_PKTOPTIONS = 25
IPV6_CHECKSUM = 26
IPV6_V6ONLY = 27
IPV6_IPSEC_POLICY = 28
IPV6_FAITH = 29
IPV6_AUTH_LEVEL = 53
IPV6_ESP_TRANS_LEVEL = 54
IPV6_ESP_NETWORK_LEVEL = 55
IPSEC6_OUTSA = 56
IPV6_IPCOMP_LEVEL = 60
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_PIM + 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_MAXID = 42

# Included from sys/cdefs.h

# Included from machine/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 in_nullhost(x): return ((x).s_addr == INADDR_ANY)

