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

# Included from sys/featuretest.h
_POSIX_C_SOURCE = 1L
_NETBSD_SOURCE = 1

# Included from machine/int_types.h

# Included from sys/common_int_types.h

# Included from sys/cdefs.h

# Included from machine/cdefs.h

# Included from sys/cdefs_elf.h
def _C_LABEL(x): return __CONCAT(_,x)

def _C_LABEL(x): return x

def _C_LABEL_STRING(x): return x

def ___RENAME(x): return __asm(___STRING(_C_LABEL(x)))

def ____RENAME(x): return __asm(___STRING(x))

def ___RENAME(x): return __asm(___STRING(x))

def __weak_extern(sym): return \

def ___weak_extern(sym): return \

def __weak_extern(sym): return \

def __RCSID(_s): return __IDSTRING(rcsid,_s)

def __link_set_count(set): return \


# Included from sys/cdefs_aout.h
def _C_LABEL(x): return __CONCAT(_,x)

def ___RENAME(x): return __asm(___STRING(_C_LABEL(x)))

def ____RENAME(x): return __asm(___STRING(x))

def __weak_extern(sym): return \

def __weak_reference(sym): return __attribute__((__weakref__))

def ___weak_extern(sym): return \

def __weak_reference(sym): return __attribute__((__weakref__))

def ___weak_reference(sym): return ; __asm(".weak sym");

def __RCSID(_s): return __IDSTRING(rcsid,_s)

def __COPYRIGHT(_s): return __IDSTRING(copyright,_s)

def __COPYRIGHT(_s): return \

def __link_set_end(set): return \

def ___STRING(x): return __STRING(x)

def __P(protos): return protos		 

def __STRING(x): return #x

def __P(protos): return ()		 

def __STRING(x): return "x"

def __CTASSERT(x): return __CTASSERT0(x, __ctassert, __COUNTER__)

def __CTASSERT(x): return __CTASSERT99(x, __INCLUDE_LEVEL__, __LINE__)

def __aligned(x): return  

def __section(x): return  

def __aligned(x): return __attribute__((__aligned__(x)))

def __section(x): return __attribute__((__section__(x)))

__func__ = ""
def __RENAME(x): return ___RENAME(x)

def __RENAME(x): return __symbolrename(x)

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)

def __predict_false(exp): return (exp)

def __format_arg(fmtarg): return __attribute__((__format_arg__ (fmtarg)))

def __format_arg(fmtarg): return  

def __alignof(__t): return __alignof__(__t)

def __arraycount(__x): return (sizeof(__x) / sizeof(__x[0]))

def __BIT(__n): return \

def __LOWEST_SET_BIT(__mask): return ((((__mask) - 1) & (__mask)) ^ (__mask))

def __SHIFTOUT_MASK(__mask): return __SHIFTOUT((__mask), (__mask))

def __USE(a): return ((void)(a))

__INT32_TYPE__ = int

# Included from sys/ansi.h

# Included from machine/ansi.h
_BSD_CLOCKID_T_ = int
_BSD_TIMER_T_ = int
_BSD_SUSECONDS_T_ = int
_BSD_WCHAR_T_ = int
_BSD_WINT_T_ = int
IPPROTO_IP = 0
IPPROTO_HOPOPTS = 0
IPPROTO_ICMP = 1
IPPROTO_IGMP = 2
IPPROTO_GGP = 3
IPPROTO_IPV4 = 4
IPPROTO_IPIP = 4
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_IPV6_ICMP = 58
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_VRRP = 112
IPPROTO_CARP = 112
IPPROTO_PFSYNC = 240
IPPROTO_RAW = 255
IPPROTO_MAX = 256
IPPROTO_DONE = 257
CTL_IPPROTO_IPSEC = 258
IPPORT_RESERVED = 1024
IPPORT_ANONMIN = 49152
IPPORT_ANONMAX = 65535
IPPORT_RESERVEDMIN = 600
IPPORT_RESERVEDMAX = (IPPORT_RESERVED-1)
def __IPADDR(x): return ((uint32_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
INET_ADDRSTRLEN = 16
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_PORTALGO = 18
IP_PORTRANGE = 19
IP_RECVIF = 20
IP_ERRORMTU = 21
IP_IPSEC_POLICY = 22
IP_RECVTTL = 23
IP_MINTTL = 24
IP_PKTINFO = 25
IP_RECVPKTINFO = 26
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
IPPROTO_MAXID = (IPPROTO_AH + 1)
IPCTL_FORWARDING = 1
IPCTL_SENDREDIRECTS = 2
IPCTL_DEFTTL = 3
IPCTL_DEFMTU = 4
IPCTL_FORWSRCRT = 5
IPCTL_DIRECTEDBCAST = 6
IPCTL_ALLOWSRCRT = 7
IPCTL_SUBNETSARELOCAL = 8
IPCTL_MTUDISC = 9
IPCTL_ANONPORTMIN = 10
IPCTL_ANONPORTMAX = 11
IPCTL_MTUDISCTIMEOUT = 12
IPCTL_MAXFLOWS = 13
IPCTL_HOSTZEROBROADCAST = 14
IPCTL_GIF_TTL = 15
IPCTL_LOWPORTMIN = 16
IPCTL_LOWPORTMAX = 17
IPCTL_MAXFRAGPACKETS = 18
IPCTL_GRE_TTL = 19
IPCTL_CHECKINTERFACE = 20
IPCTL_IFQ = 21
IPCTL_RANDOMID = 22
IPCTL_LOOPBACKCKSUM = 23
IPCTL_STATS = 24
IPCTL_MAXID = 25

# Included from netinet6/in6.h

# Included from sys/socket.h

# Included from sys/uio.h
def UIO_SETUP_SYSSPACE(uio): return uio_setup_sysspace(uio)

UIO_MAXIOV = 1024
UIO_SMALLIOV = 8

# Included from sys/sigtypes.h
SOCK_STREAM = 1
SOCK_DGRAM = 2
SOCK_RAW = 3
SOCK_RDM = 4
SOCK_SEQPACKET = 5
SOCK_CLOEXEC = 0x10000000
SOCK_NONBLOCK = 0x20000000
SOCK_NOSIGPIPE = 0x40000000
SOCK_FLAGS_MASK = (-268435456)
SO_DEBUG = 0x0001
SO_ACCEPTCONN = 0x0002
SO_REUSEADDR = 0x0004
SO_KEEPALIVE = 0x0008
SO_DONTROUTE = 0x0010
SO_BROADCAST = 0x0020
SO_USELOOPBACK = 0x0040
SO_LINGER = 0x0080
SO_OOBINLINE = 0x0100
SO_REUSEPORT = 0x0200
SO_NOSIGPIPE = 0x0800
SO_ACCEPTFILTER = 0x1000
SO_TIMESTAMP = 0x2000
SO_SNDBUF = 0x1001
SO_RCVBUF = 0x1002
SO_SNDLOWAT = 0x1003
SO_RCVLOWAT = 0x1004
SO_ERROR = 0x1007
SO_TYPE = 0x1008
SO_OVERFLOWED = 0x1009
SO_NOHEADER = 0x100a
SO_SNDTIMEO = 0x100b
SO_RCVTIMEO = 0x100c
SOL_SOCKET = 0xffff
AF_UNSPEC = 0
AF_LOCAL = 1
AF_UNIX = AF_LOCAL
AF_INET = 2
AF_IMPLINK = 3
AF_PUP = 4
AF_CHAOS = 5
AF_NS = 6
AF_ISO = 7
AF_OSI = AF_ISO
AF_ECMA = 8
AF_DATAKIT = 9
AF_CCITT = 10
AF_SNA = 11
AF_DECnet = 12
AF_DLI = 13
AF_LAT = 14
AF_HYLINK = 15
AF_APPLETALK = 16
AF_OROUTE = 17
AF_LINK = 18
pseudo_AF_XTP = 19
AF_COIP = 20
AF_CNT = 21
pseudo_AF_RTIP = 22
AF_IPX = 23
AF_INET6 = 24
pseudo_AF_PIP = 25
AF_ISDN = 26
AF_E164 = AF_ISDN
AF_NATM = 27
AF_ARP = 28
pseudo_AF_KEY = 29
pseudo_AF_HDRCMPLT = 30
AF_BLUETOOTH = 31
AF_IEEE80211 = 32
AF_MPLS = 33
AF_ROUTE = 34
AF_MAX = 35
_SS_MAXSIZE = 128
PF_UNSPEC = AF_UNSPEC
PF_LOCAL = AF_LOCAL
PF_UNIX = PF_LOCAL
PF_INET = AF_INET
PF_IMPLINK = AF_IMPLINK
PF_PUP = AF_PUP
PF_CHAOS = AF_CHAOS
PF_NS = AF_NS
PF_ISO = AF_ISO
PF_OSI = AF_ISO
PF_ECMA = AF_ECMA
PF_DATAKIT = AF_DATAKIT
PF_CCITT = AF_CCITT
PF_SNA = AF_SNA
PF_DECnet = AF_DECnet
PF_DLI = AF_DLI
PF_LAT = AF_LAT
PF_HYLINK = AF_HYLINK
PF_APPLETALK = AF_APPLETALK
PF_OROUTE = AF_OROUTE
PF_LINK = AF_LINK
PF_XTP = pseudo_AF_XTP
PF_COIP = AF_COIP
PF_CNT = AF_CNT
PF_INET6 = AF_INET6
PF_IPX = AF_IPX
PF_RTIP = pseudo_AF_RTIP
PF_PIP = pseudo_AF_PIP
PF_ISDN = AF_ISDN
PF_E164 = AF_E164
PF_NATM = AF_NATM
PF_ARP = AF_ARP
PF_KEY = pseudo_AF_KEY
PF_BLUETOOTH = AF_BLUETOOTH
PF_MPLS = AF_MPLS
PF_ROUTE = AF_ROUTE
PF_MAX = AF_MAX
def SOCKCREDSIZE(ngrps): return \

NET_MAXID = AF_MAX
PCB_SLOP = 20
PCB_ALL = 0
NET_RT_DUMP = 1
NET_RT_FLAGS = 2
NET_RT_OOIFLIST = 3
NET_RT_OIFLIST = 4
NET_RT_IFLIST = 5
NET_RT_MAXID = 6
SOMAXCONN = 128
MSG_OOB = 0x0001
MSG_PEEK = 0x0002
MSG_DONTROUTE = 0x0004
MSG_EOR = 0x0008
MSG_TRUNC = 0x0010
MSG_CTRUNC = 0x0020
MSG_WAITALL = 0x0040
MSG_DONTWAIT = 0x0080
MSG_BCAST = 0x0100
MSG_MCAST = 0x0200
MSG_NOSIGNAL = 0x0400
MSG_CMSG_CLOEXEC = 0x0800
MSG_NBIO = 0x1000
MSG_WAITFORONE = 0x2000
MSG_USERFLAGS = 0x0ffffff
MSG_NAMEMBUF = 0x1000000
MSG_CONTROLMBUF = 0x2000000
MSG_IOVUSRSPACE = 0x4000000
MSG_LENUSRSPACE = 0x8000000
def CMSG_DATA(cmsg): return \

def CCMSG_DATA(cmsg): return \

def __CMSG_ALIGN(n): return (((n) + __ALIGNBYTES) & ~__ALIGNBYTES)

def CMSG_ALIGN(n): return __CMSG_ALIGN(n)

def CMSG_FIRSTHDR(mhdr): return \

SCM_RIGHTS = 0x01
SCM_CREDS = 0x04
SCM_TIMESTAMP = 0x08
SHUT_RD = 0
SHUT_WR = 1
SHUT_RDWR = 2
__KAME_VERSION = "NetBSD-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 = (-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_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_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_EMBEDDABLE(__a): return \

def IFA6_IS_DEPRECATED(a): return \

def IFA6_IS_INVALID(a): return \

IPV6_OPTIONS = 1
IPV6_RECVOPTS = 5
IPV6_RECVRETOPTS = 6
IPV6_RECVDSTADDR = 7
IPV6_RETOPTS = 8
IPV6_SOCKOPT_RESERVED1 = 3
IPV6_UNICAST_HOPS = 4
IPV6_MULTICAST_IF = 9
IPV6_MULTICAST_HOPS = 10
IPV6_MULTICAST_LOOP = 11
IPV6_JOIN_GROUP = 12
IPV6_LEAVE_GROUP = 13
IPV6_PORTRANGE = 14
IPV6_PORTALGO = 17
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_RECVTCLASS = 57
IPV6_OTCLASS = 58
IPV6_TCLASS = 61
IPV6_DONTFRAG = 62
IPV6_PREFER_TEMPADDR = 63
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_ANONPORTMIN = 28
IPV6CTL_ANONPORTMAX = 29
IPV6CTL_LOWPORTMIN = 30
IPV6CTL_LOWPORTMAX = 31
IPV6CTL_AUTO_LINKLOCAL = 35
IPV6CTL_USE_DEFAULTZONE = 39
IPV6CTL_MAXFRAGS = 41
IPV6CTL_IFQ = 42
IPV6CTL_RTADV_MAXROUTES = 43
IPV6CTL_RTADV_NUMROUTES = 44
IPV6CTL_MAXID = 45
INET6_IS_ADDR_LINKLOCAL = 1
INET6_IS_ADDR_MC_LINKLOCAL = 2
INET6_IS_ADDR_SITELOCAL = 4
def in_nullhost(x): return ((x).s_addr == INADDR_ANY)

