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

# Included from machine/param.h

# Included from machine/cpu.h

# Included from powerpc/cpu.h

# Included from machine/frame.h

# Included from powerpc/frame.h

# Included from machine/types.h

# Included from powerpc/types.h

# Included from sys/cdefs.h

# Included from machine/cdefs.h

# Included from powerpc/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)


# Included from machine/psl.h

# Included from powerpc/psl.h
PSL_VEC = 0x02000000
PSL_POW = 0x00040000
PSL_ILE = 0x00010000
PSL_EE = 0x00008000
PSL_PR = 0x00004000
PSL_FP = 0x00002000
PSL_ME = 0x00001000
PSL_FE0 = 0x00000800
PSL_SE = 0x00000400
PSL_BE = 0x00000200
PSL_FE1 = 0x00000100
PSL_IP = 0x00000040
PSL_IR = 0x00000020
PSL_DR = 0x00000010
PSL_RI = 0x00000002
PSL_LE = 0x00000001
PSL_FE_DIS = 0
PSL_FE_NONREC = PSL_FE1
PSL_FE_REC = PSL_FE0
PSL_FE_PREC = (PSL_FE0 | PSL_FE1)
PSL_FE_DFLT = PSL_FE_DIS
PSL_MBO = 0
PSL_MBZ = 0
PSL_USERSET = (PSL_EE | PSL_PR | PSL_ME | PSL_IR | PSL_DR | PSL_RI)
PSL_USERSTATIC = (PSL_USERSET | PSL_IP | 0x87c0008c)

# Included from machine/intr.h

# Included from powerpc/intr.h
IPL_NONE = 0
IPL_BIO = 1
IPL_AUDIO = IPL_BIO
IPL_NET = 2
IPL_TTY = 3
IPL_IMP = 4
IPL_CLOCK = 5
IPL_HIGH = 6
IPL_NUM = 7
IST_NONE = 0
IST_PULSE = 1
IST_EDGE = 2
IST_LEVEL = 3
PPC_NIRQ = 66
PPC_CLK_IRQ = 64
PPC_STAT_IRQ = 65
def splassert(wantipl): return  

SINT_CLOCK = 0x10000000
SINT_NET = 0x20000000
SINT_TTY = 0x40000000
SPL_CLOCK = 0x80000000
SINT_MASK = (SINT_CLOCK|SINT_NET|SINT_TTY)
MAX_PRECONF_INTR = 16
def DELAY(n): return delay(n)

CACHELINESIZE = 32
CPU_ALLOWAPERTURE = 1
CPU_MAXID = 2

# Included from powerpc/param.h
MACHINE_ARCH = "powerpc"
def ALIGN(p): return (((u_int)(p) + ALIGNBYTES) & ~ALIGNBYTES)

PAGE_SHIFT = 12
PAGE_SIZE = 4096
PAGE_MASK = (PAGE_SIZE - 1)
PGSHIFT = PAGE_SHIFT
NBPG = PAGE_SIZE
PGOFSET = PAGE_MASK
DEV_BSHIFT = 9
DEV_BSIZE = (1 << DEV_BSHIFT)
BLKDEV_IOSIZE = NBPG
MAXPHYS = (64 * 1024)
UPAGES = 4
USPACE = (UPAGES * NBPG)
MSIZE = 256
MCLSHIFT = 11
MCLBYTES = (1 << MCLSHIFT)
MCLOFSET = (MCLBYTES - 1)
NMBCLUSTERS = 2048
NMBCLUSTERS = 1024
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 dbtob(x): return ((x) << DEV_BSHIFT)

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

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

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

SEGMENT_LENGTH = 0x10000000
SEGMENT_MASK = 0xf0000000
USER_SR = 13
KERNEL_SR = 14
KERNEL_SEG0 = 0xfffff0
KERNEL_SEGMENT = (KERNEL_SEG0 + KERNEL_SR)
NPMAPS = 32768
MACHINE = "macppc"
KERNBASE = 0x100000
MSGBUFSIZE = (NBPG*2)
NKMEMPAGES_MIN_DEFAULT = ((8 * 1024 * 1024) >> PAGE_SHIFT)
NKMEMPAGES_MAX_DEFAULT = ((16 * 1024 * 1024) >> PAGE_SHIFT)
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
pseudo_AF_HDRCMPLT = 31
AF_MAX = 32
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_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_BPF = pseudo_AF_HDRCMPLT
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
NET_BPF_BUFSIZE = 1
NET_BPF_MAXBUFSIZE = 2
NET_BPF_MAXID = 3
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_FIRSTHDR(mhdr): return \

def __CMSG_ALIGN(len): return ALIGN(len)

def CMSG_ALIGN(n): return __CMSG_ALIGN(n)

SCM_RIGHTS = 0x01
SCM_CREDS = 0x02
MSG_COMPAT = 0x8000
