# Generated by h2py from /usr/include/sys/socket.h

# Included from machine/param.h
MACHINE = "sparc"
MACHINE_ARCH = "sparc"

# Included from machine/cpu.h
CPU_LED_BLINK = 1
CPU_VSYNCBLANK = 2
CPU_MAXID = 3

# Included from machine/psl.h
PSR_IMPL = 0xf0000000
PSR_VER = 0x0f000000
PSR_ICC = 0x00f00000
PSR_N = 0x00800000
PSR_Z = 0x00400000
PSR_O = 0x00200000
PSR_C = 0x00100000
PSR_EC = 0x00002000
PSR_EF = 0x00001000
PSR_PIL = 0x00000f00
PSR_S = 0x00000080
PSR_PS = 0x00000040
PSR_ET = 0x00000020
PSR_CWP = 0x0000001f
PSR_BITS = "\20\16EC\15EF\10S\7PS\6ET"
PIL_CLOCK = 10
PIL_AUSOFT = 4
PIL_FDSOFT = 4
PIL_BIO = 5
PIL_NET = 6
PIL_TTY = 6
def cpu_swapin(p): return  

def cpu_swapout(p): return  

def cpu_wait(p): return  

SIR_NET = 0
SIR_CLOCK = 1
ALIGNBYTES = 7
def ALIGN(p): return (((u_int)(p) + ALIGNBYTES) & ~ALIGNBYTES)

SUN4_PGSHIFT = 13
SUN4CM_PGSHIFT = 12
KERNBASE = 0xf8000000
KERNTEXTOFF = 0xf8004000
DEV_BSIZE = 512
DEV_BSHIFT = 9
BLKDEV_IOSIZE = 2048
MAXPHYS = (64 * 1024)
CLSIZE = 1
CLSIZELOG2 = 0
SSIZE = 1
USPACE = 8192
MSIZE = 128
MCLBYTES = 2048
MCLSHIFT = 11
MCLOFSET = (MCLBYTES - 1)
NMBCLUSTERS = 1024
NMBCLUSTERS = 512
MSGBUFSIZE = 4096
def ctod(x): return ((x) << (PGSHIFT - DEV_BSHIFT))

def dtoc(x): return ((x) >> (PGSHIFT - DEV_BSHIFT))

def ctob(x): return ((x) << PGSHIFT)

def btoc(x): return (((x) + PGOFSET) >> PGSHIFT)

def btodb(x): return ((x) >> DEV_BSHIFT)

def dbtob(x): return ((x) << DEV_BSHIFT)

def bdbtofsb(bn): return ((bn) / (BLKDEV_IOSIZE / DEV_BSIZE))

def sparc_btop(x): return ((unsigned)(x) >> PGSHIFT)

def sparc_ptob(x): return ((unsigned)(x) << PGSHIFT)

def DELAY(n): return delay(n)

CPU_SUN4 = 0
CPU_SUN4C = 1
CPU_SUN4M = 2
CPU_ISSUN4 = (0)
NBPG = 4096
PGOFSET = (NBPG-1)
PGSHIFT = SUN4CM_PGSHIFT
PAGE_SIZE = 4096
PAGE_MASK = (PAGE_SIZE - 1)
PAGE_SHIFT = SUN4CM_PGSHIFT
CPU_ISSUN4C = (0)
CPU_ISSUN4M = (1)
CPU_ISSUN4C = (0)
CPU_ISSUN4 = (0)
CPU_ISSUN4OR4C = (0)
CPU_ISSUN4COR4M = (1)
NBPG = 4096
PGOFSET = (NBPG-1)
PGSHIFT = SUN4CM_PGSHIFT
PAGE_SIZE = 4096
PAGE_MASK = (PAGE_SIZE - 1)
PAGE_SHIFT = SUN4CM_PGSHIFT
CPU_ISSUN4M = (0)
CPU_ISSUN4OR4C = (1)
CPU_ISSUN4M = (0)
CPU_ISSUN4C = (1)
CPU_ISSUN4 = (0)
CPU_ISSUN4OR4C = (1)
CPU_ISSUN4COR4M = (1)
NBPG = 4096
PGOFSET = (NBPG-1)
PGSHIFT = SUN4CM_PGSHIFT
PAGE_SIZE = 4096
PAGE_MASK = (PAGE_SIZE - 1)
PAGE_SHIFT = SUN4CM_PGSHIFT
CPU_ISSUN4M = (0)
CPU_ISSUN4C = (0)
CPU_ISSUN4 = (1)
CPU_ISSUN4OR4C = (1)
CPU_ISSUN4COR4M = (0)
NBPG = 8192
PGOFSET = (NBPG-1)
PGSHIFT = SUN4_PGSHIFT
PAGE_SIZE = 8192
PAGE_MASK = (PAGE_SIZE - 1)
PAGE_SHIFT = SUN4_PGSHIFT
SOCK_STREAM = 1
SOCK_DGRAM = 2
SOCK_RAW = 3
SOCK_RDM = 4
SOCK_SEQPACKET = 5
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_SNDBUF = 0x1001
SO_RCVBUF = 0x1002
SO_SNDLOWAT = 0x1003
SO_RCVLOWAT = 0x1004
SO_SNDTIMEO = 0x1005
SO_RCVTIMEO = 0x1006
SO_ERROR = 0x1007
SO_TYPE = 0x1008
SO_NETPROC = 0x1020
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_ROUTE = 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_ENCAP = 28
AF_SIP = 29
AF_KEY = 30
AF_MAX = 31
PF_UNSPEC = AF_UNSPEC
PF_LOCAL = AF_LOCAL
PF_UNIX = PF_LOCAL
PF_INET = AF_INET
PF_INET6 = AF_INET6
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_ROUTE = AF_ROUTE
PF_LINK = AF_LINK
PF_XTP = pseudo_AF_XTP
PF_COIP = AF_COIP
PF_CNT = AF_CNT
PF_IPX = AF_IPX
PF_INET6 = AF_INET6
PF_PIP = pseudo_AF_PIP
PF_ISDN = AF_ISDN
PF_NATM = AF_NATM
PF_ENCAP = AF_ENCAP
PF_SIP = AF_SIP
PF_KEY = AF_KEY
PF_MAX = AF_MAX
SHUT_RD = 0
SHUT_WR = 1
SHUT_RDWR = 2
def SOCKCREDSIZE(ngrps): return \

NET_MAXID = AF_MAX
NET_RT_DUMP = 1
NET_RT_FLAGS = 2
NET_RT_IFLIST = 3
NET_RT_MAXID = 4
SOMAXCONN = 128
MSG_OOB = 0x1
MSG_PEEK = 0x2
MSG_DONTROUTE = 0x4
MSG_EOR = 0x8
MSG_TRUNC = 0x10
MSG_CTRUNC = 0x20
MSG_WAITALL = 0x40
MSG_DONTWAIT = 0x80
MSG_BCAST = 0x100
MSG_MCAST = 0x200
def CMSG_DATA(cmsg): return \

def __CMSG_ALIGN(len): return ALIGN(len)

def CMSG_ALIGN(n): return __CMSG_ALIGN(n)

SCM_RIGHTS = 0x01
SCM_CREDS = 0x02

# 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 __kprintf_attribute__(a): return __attribute__(a)

MSG_COMPAT = 0x8000
