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

# Included from machine/param.h

# Included from machine/psl.h
PSL_C = 0x00000001
PSL_PF = 0x00000004
PSL_AF = 0x00000010
PSL_Z = 0x00000040
PSL_N = 0x00000080
PSL_T = 0x00000100
PSL_I = 0x00000200
PSL_D = 0x00000400
PSL_V = 0x00000800
PSL_IOPL = 0x00003000
PSL_NT = 0x00004000
PSL_RF = 0x00010000
PSL_VM = 0x00020000
PSL_AC = 0x00040000
PSL_VIF = 0x00080000
PSL_VIP = 0x00100000
PSL_ID = 0x00200000
PSL_MBO = 0x00000002
PSL_MBZ = 0xffc08028
PSL_USERSET = (PSL_MBO | PSL_I)
PSL_USERSTATIC = (PSL_MBO | PSL_MBZ | PSL_I | PSL_IOPL | PSL_NT | PSL_VIF | PSL_VIP)
PSL_USERSTATIC = (PSL_MBO | PSL_MBZ | PSL_I | PSL_IOPL | PSL_NT | PSL_VM | PSL_VIF | PSL_VIP)
PSL_USER = (PSL_C | PSL_MBO | PSL_PF | PSL_AF | PSL_Z | PSL_N | PSL_V)

# Included from machine/intr.h

# Included from machine/intrdefs.h
IPL_NONE = 0x0
IPL_SOFTCLOCK = 0x4
IPL_SOFTNET = 0x5
IPL_BIO = 0x6
IPL_NET = 0x7
IPL_SOFTSERIAL = 0x8
IPL_TTY = 0x9
IPL_VM = 0xa
IPL_IMP = IPL_VM
IPL_AUDIO = 0xb
IPL_CLOCK = 0xc
IPL_SCHED = IPL_CLOCK
IPL_STATCLOCK = IPL_CLOCK
IPL_HIGH = 0xd
IPL_SERIAL = 0xd
IPL_IPI = 0xe
NIPL = 16
IST_NONE = 0
IST_PULSE = 1
IST_EDGE = 2
IST_LEVEL = 3
LIR_IPI = 31
LIR_TIMER = 30
SIR_CLOCK = 29
SIR_NET = 28
SIR_SERIAL = 27
MAX_INTR_SOURCES = 32
NUM_LEGACY_IRQS = 16
IDT_INTR_LOW = (0x20 + NUM_LEGACY_IRQS)
IDT_INTR_HIGH = 0xef
X86_IPI_HALT = 0x00000001
X86_IPI_MICROSET = 0x00000002
X86_IPI_FLUSH_FPU = 0x00000004
X86_IPI_SYNCH_FPU = 0x00000008
X86_IPI_TLB = 0x00000010
X86_IPI_MTRR = 0x00000020
X86_IPI_GDT = 0x00000040
X86_IPI_DDB = 0x00000080
X86_NIPI = 8
IREENT_MAGIC = 0x18041969

# Included from machine/cpu.h

# Included from machine/frame.h

# Included from sys/signal.h

# 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)


# Included from machine/signal.h

# Included from machine/trap.h
T_PRIVINFLT = 0
T_BPTFLT = 1
T_ARITHTRAP = 2
T_ASTFLT = 3
T_PROTFLT = 4
T_TRCTRAP = 5
T_PAGEFLT = 6
T_ALIGNFLT = 7
T_DIVIDE = 8
T_NMI = 9
T_OFLOW = 10
T_BOUND = 11
T_DNA = 12
T_DOUBLEFLT = 13
T_FPOPFLT = 14
T_TSSFLT = 15
T_SEGNPFLT = 16
T_STKFLT = 17
T_MCA = 18
T_XMM = 19
T_RESERVED = 20
T_USER = 0x100
TC_TSS = 0x80000000
TC_FLAGMASK = (TC_TSS)
_NSIG = 32
NSIG = _NSIG
SIGHUP = 1
SIGINT = 2
SIGQUIT = 3
SIGILL = 4
SIGTRAP = 5
SIGABRT = 6
SIGIOT = SIGABRT
SIGEMT = 7
SIGFPE = 8
SIGKILL = 9
SIGBUS = 10
SIGSEGV = 11
SIGSYS = 12
SIGPIPE = 13
SIGALRM = 14
SIGTERM = 15
SIGURG = 16
SIGSTOP = 17
SIGTSTP = 18
SIGCONT = 19
SIGCHLD = 20
SIGTTIN = 21
SIGTTOU = 22
SIGIO = 23
SIGXCPU = 24
SIGXFSZ = 25
SIGVTALRM = 26
SIGPROF = 27
SIGWINCH = 28
SIGINFO = 29
SIGUSR1 = 30
SIGUSR2 = 31

# Included from sys/siginfo.h
SI_NOINFO = 32767
SI_USER = 0
SI_LWP = (-1)
SI_QUEUE = (-2)
SI_TIMER = (-3)
ILL_ILLOPC = 1
ILL_ILLOPN = 2
ILL_ILLADR = 3
ILL_ILLTRP = 4
ILL_PRVOPC = 5
ILL_PRVREG = 6
ILL_COPROC = 7
ILL_BADSTK = 8
NSIGILL = 8
EMT_TAGOVF = 1
NSIGEMT = 1
FPE_INTDIV = 1
FPE_INTOVF = 2
FPE_FLTDIV = 3
FPE_FLTOVF = 4
FPE_FLTUND = 5
FPE_FLTRES = 6
FPE_FLTINV = 7
FPE_FLTSUB = 8
NSIGFPE = 8
SEGV_MAPERR = 1
SEGV_ACCERR = 2
NSIGSEGV = 2
BUS_ADRALN = 1
BUS_ADRERR = 2
BUS_OBJERR = 3
NSIGBUS = 3
TRAP_BRKPT = 1
TRAP_TRACE = 2
NSIGTRAP = 2
CLD_EXITED = 1
CLD_KILLED = 2
CLD_DUMPED = 3
CLD_TRAPPED = 4
CLD_STOPPED = 5
CLD_CONTINUED = 6
NSIGCLD = 6
POLL_IN = 1
POLL_OUT = 2
POLL_MSG = 3
POLL_ERR = 4
POLL_PRI = 5
POLL_HUP = 6
NSIGPOLL = 6
PROF_SIG = 1
NSIGPROF = 1
SI_MAXSZ = 128

# Included from sys/time.h

# Included from sys/types.h

# Included from machine/types.h

# Included from machine/ansi.h
_BSD_PTRDIFF_T_ = long
_BSD_SSIZE_T_ = long
_BSD_TIME_T_ = int
_BSD_CLOCKID_T_ = int
_BSD_TIMER_T_ = int
_BSD_WCHAR_T_ = int
_BSD_WINT_T_ = int
_BSD_RUNE_T_ = int

# Included from machine/endian.h

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

def __swap32gen(x): return \

def __swap64gen(x): return \

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

def htole32(x): return (x)

def htole64(x): return (x)

def letoh16(x): return (x)

def letoh32(x): return (x)

def letoh64(x): return (x)

_QUAD_HIGHWORD = 0
_QUAD_LOWWORD = 1
htole16 = swap16
htole32 = swap32
htole64 = swap64
letoh16 = swap16
letoh32 = swap32
letoh64 = swap64
def htobe16(x): return (x)

def htobe32(x): return (x)

def htobe64(x): return (x)

def betoh16(x): return (x)

def betoh32(x): return (x)

def betoh64(x): return (x)

htons = htobe16
htonl = htobe32
ntohs = betoh16
ntohl = betoh32
def major(x): return ((int32_t)(((u_int32_t)(x) >> 8) & 0xff))

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

NBBY = 8
FD_SETSIZE = 1024
def FD_ZERO(p): return bzero(p, sizeof(*(p)))

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

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
CLOCK_REALTIME = 0
CLOCK_VIRTUAL = 1
CLOCK_PROF = 2
CLOCK_MONOTONIC = 3
TIMER_RELTIME = 0x0
TIMER_ABSTIME = 0x1

# Included from time.h
NULL = 0L
CLOCKS_PER_SEC = 100
CLK_TCK = 100
SA_ONSTACK = 0x0001
SA_RESTART = 0x0002
SA_RESETHAND = 0x0004
SA_NODEFER = 0x0010
SA_NOCLDWAIT = 0x0020
SA_USERTRAMP = 0x0100
SA_NOCLDSTOP = 0x0008
SA_SIGINFO = 0x0040
SIG_BLOCK = 1
SIG_UNBLOCK = 2
SIG_SETMASK = 3
SS_ONSTACK = 0x0001
SS_DISABLE = 0x0004
MINSIGSTKSZ = 8192
SIGSTKSZ = (MINSIGSTKSZ + 32768)
SV_ONSTACK = SA_ONSTACK
SV_INTERRUPT = SA_RESTART
SV_RESETHAND = SA_RESETHAND
def sigmask(m): return (1 << ((m)-1))


# Included from machine/fpu.h
__INITIAL_NPXCW__ = 0x037f
__INITIAL_MXCSR__ = 0x1f80
__INITIAL_MXCSR_MASK__ = 0xffbf
__OpenBSD_NPXCW__ = 0x127f
__Linux_NPXCW__ = 0x037f

# Included from machine/segments.h
def ISPL(s): return ((s) & SEL_RPL)	 

SEL_KPL = 0
SEL_UPL = 3
SEL_RPL = 3
def ISLDT(s): return ((s) & SEL_LDT)	 

SEL_LDT = 4
def IDXSEL(s): return (((s) >> 3) & 0x1fff)

def IDXDYNSEL(s): return ((((s) & ~SEL_RPL) - DYNSEL_START) >> 4)

SDT_SYSNULL = 0
SDT_SYS286TSS = 1
SDT_SYSLDT = 2
SDT_SYS286BSY = 3
SDT_SYS286CGT = 4
SDT_SYSTASKGT = 5
SDT_SYS286IGT = 6
SDT_SYS286TGT = 7
SDT_SYSNULL2 = 8
SDT_SYS386TSS = 9
SDT_SYSNULL3 = 10
SDT_SYS386BSY = 11
SDT_SYS386CGT = 12
SDT_SYSNULL4 = 13
SDT_SYS386IGT = 14
SDT_SYS386TGT = 15
SDT_MEMRO = 16
SDT_MEMROA = 17
SDT_MEMRW = 18
SDT_MEMRWA = 19
SDT_MEMROD = 20
SDT_MEMRODA = 21
SDT_MEMRWD = 22
SDT_MEMRWDA = 23
SDT_MEME = 24
SDT_MEMEA = 25
SDT_MEMER = 26
SDT_MEMERA = 27
SDT_MEMEC = 28
SDT_MEMEAC = 29
SDT_MEMERC = 30
SDT_MEMERAC = 31
SEGEX_EXT = 0x01
SEGEX_IDT = 0x02
SEGEX_TI = 0x04
NIDT = 256
NRSVIDT = 32
GNULL_SEL = 0
GCODE_SEL = 1
GDATA_SEL = 2
GUCODE_SEL = 3
GUDATA_SEL = 4
GAPM32CODE_SEL = 5
GAPM16CODE_SEL = 6
GAPMDATA_SEL = 7
GBIOSCODE_SEL = 8
GBIOSDATA_SEL = 9
GPNPBIOSCODE_SEL = 10
GPNPBIOSDATA_SEL = 11
GPNPBIOSSCRATCH_SEL = 12
GPNPBIOSTRAMP_SEL = 13
GUCODE32_SEL = 14
GUDATA32_SEL = 15
NGDT_MEM = 16
GLDT_SEL = 0
NGDT_SYS = 1
GDT_SYS_OFFSET = (NGDT_MEM << 3)
LSYS5CALLS_SEL = 0
LUCODE32_SEL = 8
LUDATA_SEL = 16
LUCODE_SEL = 24
LSOL26CALLS_SEL = 32
LUDATA32_SEL = 56
LBSDICALLS_SEL = 128
LDT_SIZE = 144
LSYSRETBASE_SEL = LUCODE32_SEL
def VALID_USER_DSEL32(s): return \

def VALID_USER_CSEL32(s): return \

def VALID_USER_CSEL(s): return \

def VALID_USER_DSEL(s): return \


# Included from machine/tss.h

# Included from machine/cacheinfo.h
CAI_ITLB = 0
CAI_ITLB2 = 1
CAI_DTLB = 2
CAI_DTLB2 = 3
CAI_ICACHE = 4
CAI_DCACHE = 5
CAI_L2CACHE = 6
CAI_COUNT = 7
def AMD_L1_EAX_DTLB_ASSOC(x): return (((x) >> 24) & 0xff)

def AMD_L1_EAX_DTLB_ENTRIES(x): return (((x) >> 16) & 0xff)

def AMD_L1_EAX_ITLB_ASSOC(x): return (((x) >> 8)  & 0xff)

def AMD_L1_EAX_ITLB_ENTRIES(x): return ( (x)        & 0xff)

def AMD_L1_EBX_DTLB_ASSOC(x): return (((x) >> 24) & 0xff)

def AMD_L1_EBX_DTLB_ENTRIES(x): return (((x) >> 16) & 0xff)

def AMD_L1_EBX_ITLB_ASSOC(x): return (((x) >> 8)  & 0xff)

def AMD_L1_EBX_ITLB_ENTRIES(x): return ( (x)        & 0xff)

def AMD_L1_ECX_DC_SIZE(x): return ((((x) >> 24) & 0xff) * 1024)

def AMD_L1_ECX_DC_ASSOC(x): return (((x) >> 16) & 0xff)

def AMD_L1_ECX_DC_LPT(x): return (((x) >> 8)  & 0xff)

def AMD_L1_ECX_DC_LS(x): return ( (x)        & 0xff)

def AMD_L1_EDX_IC_SIZE(x): return ((((x) >> 24) & 0xff) * 1024)

def AMD_L1_EDX_IC_ASSOC(x): return (((x) >> 16) & 0xff)

def AMD_L1_EDX_IC_LPT(x): return (((x) >> 8)  & 0xff)

def AMD_L1_EDX_IC_LS(x): return ( (x)        & 0xff)

def AMD_L2_EAX_DTLB_ASSOC(x): return (((x) >> 28)  & 0xf)

def AMD_L2_EAX_DTLB_ENTRIES(x): return (((x) >> 16)  & 0xfff)

def AMD_L2_EAX_IUTLB_ASSOC(x): return (((x) >> 12)  & 0xf)

def AMD_L2_EAX_IUTLB_ENTRIES(x): return ( (x)         & 0xfff)

def AMD_L2_EBX_DTLB_ASSOC(x): return (((x) >> 28)  & 0xf)

def AMD_L2_EBX_DTLB_ENTRIES(x): return (((x) >> 16)  & 0xfff)

def AMD_L2_EBX_IUTLB_ASSOC(x): return (((x) >> 12)  & 0xf)

def AMD_L2_EBX_IUTLB_ENTRIES(x): return ( (x)         & 0xfff)

def AMD_L2_ECX_C_SIZE(x): return ((((x) >> 16) & 0xffff) * 1024)

def AMD_L2_ECX_C_ASSOC(x): return (((x) >> 12) & 0xf)

def AMD_L2_ECX_C_LPT(x): return (((x) >> 8)  & 0xf)

def AMD_L2_ECX_C_LS(x): return ( (x)        & 0xff)


# Included from sys/device.h

# Included from sys/queue.h
def SLIST_HEAD_INITIALIZER(head): return \

def SLIST_ENTRY(type): return \

def SLIST_END(head): return NULL

def SLIST_EMPTY(head): return (SLIST_FIRST(head) == SLIST_END(head))

def LIST_HEAD_INITIALIZER(head): return \

def LIST_ENTRY(type): return \

def LIST_END(head): return NULL

def LIST_EMPTY(head): return (LIST_FIRST(head) == LIST_END(head))

def SIMPLEQ_HEAD_INITIALIZER(head): return \

def SIMPLEQ_ENTRY(type): return \

def SIMPLEQ_END(head): return NULL

def SIMPLEQ_EMPTY(head): return (SIMPLEQ_FIRST(head) == SIMPLEQ_END(head))

def TAILQ_HEAD_INITIALIZER(head): return \

def TAILQ_ENTRY(type): return \

def TAILQ_END(head): return NULL

def TAILQ_EMPTY(head): return \

def CIRCLEQ_HEAD_INITIALIZER(head): return \

def CIRCLEQ_ENTRY(type): return \

def CIRCLEQ_EMPTY(head): return \


# Included from sys/lock.h

# Included from sys/simplelock.h

# Included from machine/lock.h
__SIMPLELOCK_LOCKED = 1
__SIMPLELOCK_UNLOCKED = 0

# Included from machine/atomic.h
SLOCK_LOCKED = 1
SLOCK_UNLOCKED = 0
def simple_lock_try(lkp): return (1)	 

def simple_unlock(lkp): return _simple_unlock(lkp, __FILE__, __LINE__)

def simple_lock_try(lkp): return _simple_lock_try(lkp, __FILE__, __LINE__)

def simple_lock(lkp): return _simple_lock(lkp, __FILE__, __LINE__)

LK_TYPE_MASK = 0x0000000f
LK_SHARED = 0x00000001
LK_EXCLUSIVE = 0x00000002
LK_UPGRADE = 0x00000003
LK_EXCLUPGRADE = 0x00000004
LK_DOWNGRADE = 0x00000005
LK_RELEASE = 0x00000006
LK_DRAIN = 0x00000007
LK_EXTFLG_MASK = 0x00700070
LK_NOWAIT = 0x00000010
LK_SLEEPFAIL = 0x00000020
LK_CANRECURSE = 0x00000040
LK_REENABLE = 0x00000080
LK_SETRECURSE = 0x00100000
LK_RECURSEFAIL = 0x00200000
LK_SPIN = 0x00400000
LK_WANT_UPGRADE = 0x00001000
LK_WANT_EXCL = 0x00002000
LK_HAVE_EXCL = 0x00004000
LK_WAITDRAIN = 0x00008000
LK_DRAINING = 0x00040000
LK_DRAINED = 0x00080000
LK_INTERLOCK = 0x00010000
LK_RETRY = 0x00020000
def spinlock_release_all(l): return _spinlock_release_all((l), __FILE__, __LINE__)

def LOCK_ASSERT(x): return KASSERT(x)

def LOCK_ASSERT(x): return  

SIMPLE_LOCK = simple_lock
SIMPLE_UNLOCK = simple_unlock
SIMPLE_LOCK = simple_lock
SIMPLE_UNLOCK = simple_unlock
DVF_ACTIVE = 0x0001
FSTATE_NOTFOUND = 0
FSTATE_FOUND = 1
FSTATE_STAR = 2
FSTATE_DNOTFOUND = 3
FSTATE_DSTAR = 4
DETACH_FORCE = 0x01
DETACH_QUIET = 0x02
QUIET = 0
UNCONF = 1
UNSUPP = 2

# Included from sys/sched.h
CP_USER = 0
CP_NICE = 1
CP_SYS = 2
CP_INTR = 3
CP_IDLE = 4
CPUSTATES = 5
SPCF_SEENRR = 0x0001
SPCF_SHOULDYIELD = 0x0002
SPCF_SWITCHCLEAR = (SPCF_SEENRR|SPCF_SHOULDYIELD)
NICE_WEIGHT = 2
def ESTCPULIM(e): return min((e), NICE_WEIGHT * PRIO_MAX - PPQ)

IPL_SCHED = IPL_HIGH
def SCHED_LOCK(s): return \

def SCHED_UNLOCK(s): return \

def SCHED_LOCK(s): return \

def SCHED_UNLOCK(s): return \

def SCHED_UNLOCK(s): return splx(s)

CI_DDB_RUNNING = 0
CI_DDB_SHOULDSTOP = 1
CI_DDB_STOPPED = 2
CI_DDB_ENTERDDB = 3
CI_DDB_INDDB = 4
CPUF_BSP = 0x0001
CPUF_AP = 0x0002
CPUF_SP = 0x0004
CPUF_PRIMARY = 0x0008
CPUF_PRESENT = 0x1000
CPUF_RUNNING = 0x2000
CPUF_PAUSE = 0x4000
CPUF_GO = 0x8000
CPU_INFO_ITERATOR = int
X86_MAXPROCS = 32
X86_MAXPROCS = 1
def CPU_IS_PRIMARY(ci): return 1


# Included from sys/mplock.h
def CLKF_BASEPRI(frame): return (0)

def signotify(p): return aston(p)

CPU_CONSDEV = 1
CPU_BIOS = 2
CPU_BLK2CHR = 3
CPU_CHR2BLK = 4
CPU_ALLOWAPERTURE = 5
CPU_CPUVENDOR = 6
CPU_CPUID = 7
CPU_CPUFEATURE = 8
CPU_APMWARN = 9
CPU_KBDRESET = 10
CPU_APMHALT = 11
CPU_USERLDT = 12
CPU_MAXID = 13

# Included from sys/evcount.h
IS_LEGACY = 0x0001
IS_IPI = 0x0002
IS_LOG = 0x0004
def APIC_LEVEL(l): return ((l) << 4)

def splx(x): return spllower(x)

IPLSHIFT = 4
def IPL(level): return ((level) >> IPLSHIFT)	 


# Included from machine/pic.h
PIC_I8259 = 0
PIC_IOAPIC = 1
PIC_LAPIC = 2
PIC_SOFT = 3
X86_SOFTINTR_SOFTCLOCK = 0
X86_SOFTINTR_SOFTNET = 1
X86_SOFTINTR_SOFTSERIAL = 2
X86_NSOFTINTR = 3
def softintr_schedule(arg): return \

MACHINE = "amd64"
MACHINE_ARCH = "amd64"
def ALIGN(p): return (((u_long)(p) + ALIGNBYTES) &~ALIGNBYTES)

PGSHIFT = 12
NBPG = (1 << PGSHIFT)
PGOFSET = (NBPG-1)
PAGE_SHIFT = 12
PAGE_SIZE = (1 << PAGE_SHIFT)
PAGE_MASK = (PAGE_SIZE - 1)
KERNBASE = 0xffffffff80000000
KERNTEXTOFF = (KERNBASE+0x100000)
KERNTEXTOFF_HI = 0xffffffff
KERNTEXTOFF_LO = 0x80100000
KERNBASE_HI = 0xffffffff
KERNBASE_LO = 0x80000000
DEV_BSHIFT = 9
DEV_BSIZE = (1 << DEV_BSHIFT)
BLKDEV_IOSIZE = 2048
MAXPHYS = (64 * 1024)
SSIZE = 1
SINCR = 1
UPAGES = 5
USPACE = (UPAGES * NBPG)
USPACE_ALIGN = (0)
MSGBUFSIZE = 4*NBPG
MSIZE = 256
MCLSHIFT = 11
MCLBYTES = (1 << MCLSHIFT)
MCLOFSET = (MCLBYTES - 1)
NMBCLUSTERS = 6144
NKMEMPAGES_MIN_DEFAULT = ((8 * 1024 * 1024) >> PAGE_SHIFT)
NKMEMPAGES_MAX_DEFAULT = ((128 * 1024 * 1024) >> PAGE_SHIFT)
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 bdbtofsb(bn): return ((bn) / (BLKDEV_IOSIZE / DEV_BSIZE))

def x86_round_pdr(x): return \

def btop(x): return x86_btop(x)

def ptob(x): return x86_ptob(x)

def round_pdr(x): return x86_round_pdr(x)

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
