// Generated by Lisette bindgen
// Source: syscall (Go stdlib)
// Go: 1.25.10
// Lisette: 0.3.0

import "go:sync"

/// An Errno is an unsigned number describing an error condition.
/// It implements the error interface. The zero Errno is by convention
/// a non-error, so code to convert from Errno to error should use:
/// 
/// 	err = nil
/// 	if errno != 0 {
/// 		err = errno
/// 	}
/// 
/// Errno values can be tested against error values using [errors.Is].
/// For example:
/// 
/// 	_, _, err := syscall.Syscall(...)
/// 	if errors.Is(err, fs.ErrNotExist) ...
pub struct Errno(uint)

/// Errors
pub const E2BIG: Errno = 7

/// Errors
pub const EACCES: Errno = 13

/// Errors
pub const EADDRINUSE: Errno = 48

/// Errors
pub const EADDRNOTAVAIL: Errno = 49

/// Errors
pub const EAFNOSUPPORT: Errno = 47

/// Errors
pub const EAGAIN: Errno = 35

/// Errors
pub const EALREADY: Errno = 37

/// Errors
pub const EAUTH: Errno = 80

/// Errors
pub const EBADARCH: Errno = 86

/// Errors
pub const EBADEXEC: Errno = 85

/// Errors
pub const EBADF: Errno = 9

/// Errors
pub const EBADMACHO: Errno = 88

/// Errors
pub const EBADMSG: Errno = 94

/// Errors
pub const EBADRPC: Errno = 72

/// Errors
pub const EBUSY: Errno = 16

/// Errors
pub const ECANCELED: Errno = 89

/// Errors
pub const ECHILD: Errno = 10

/// Errors
pub const ECONNABORTED: Errno = 53

/// Errors
pub const ECONNREFUSED: Errno = 61

/// Errors
pub const ECONNRESET: Errno = 54

/// Errors
pub const EDEADLK: Errno = 11

/// Errors
pub const EDESTADDRREQ: Errno = 39

/// Errors
pub const EDEVERR: Errno = 83

/// Errors
pub const EDOM: Errno = 33

/// Errors
pub const EDQUOT: Errno = 69

/// Errors
pub const EEXIST: Errno = 17

/// Errors
pub const EFAULT: Errno = 14

/// Errors
pub const EFBIG: Errno = 27

/// Errors
pub const EFTYPE: Errno = 79

/// Errors
pub const EHOSTDOWN: Errno = 64

/// Errors
pub const EHOSTUNREACH: Errno = 65

/// Errors
pub const EIDRM: Errno = 90

/// Errors
pub const EILSEQ: Errno = 92

/// Errors
pub const EINPROGRESS: Errno = 36

/// Errors
pub const EINTR: Errno = 4

/// Errors
pub const EINVAL: Errno = 22

/// Errors
pub const EIO: Errno = 5

/// Errors
pub const EISCONN: Errno = 56

/// Errors
pub const EISDIR: Errno = 21

/// Errors
pub const ELAST: Errno = 105

/// Errors
pub const ELOOP: Errno = 62

/// Errors
pub const EMFILE: Errno = 24

/// Errors
pub const EMLINK: Errno = 31

/// Errors
pub const EMSGSIZE: Errno = 40

/// Errors
pub const EMULTIHOP: Errno = 95

/// Errors
pub const ENAMETOOLONG: Errno = 63

/// Errors
pub const ENEEDAUTH: Errno = 81

/// Errors
pub const ENETDOWN: Errno = 50

/// Errors
pub const ENETRESET: Errno = 52

/// Errors
pub const ENETUNREACH: Errno = 51

/// Errors
pub const ENFILE: Errno = 23

/// Errors
pub const ENOATTR: Errno = 93

/// Errors
pub const ENOBUFS: Errno = 55

/// Errors
pub const ENODATA: Errno = 96

/// Errors
pub const ENODEV: Errno = 19

/// Errors
pub const ENOENT: Errno = 2

/// Errors
pub const ENOEXEC: Errno = 8

/// Errors
pub const ENOLCK: Errno = 77

/// Errors
pub const ENOLINK: Errno = 97

/// Errors
pub const ENOMEM: Errno = 12

/// Errors
pub const ENOMSG: Errno = 91

/// Errors
pub const ENOPOLICY: Errno = 103

/// Errors
pub const ENOPROTOOPT: Errno = 42

/// Errors
pub const ENOSPC: Errno = 28

/// Errors
pub const ENOSR: Errno = 98

/// Errors
pub const ENOSTR: Errno = 99

/// Errors
pub const ENOSYS: Errno = 78

/// Errors
pub const ENOTBLK: Errno = 15

/// Errors
pub const ENOTCONN: Errno = 57

/// Errors
pub const ENOTDIR: Errno = 20

/// Errors
pub const ENOTEMPTY: Errno = 66

/// Errors
pub const ENOTRECOVERABLE: Errno = 104

/// Errors
pub const ENOTSOCK: Errno = 38

/// Errors
pub const ENOTSUP: Errno = 45

/// Errors
pub const ENOTTY: Errno = 25

/// Errors
pub const ENXIO: Errno = 6

/// Errors
pub const EOPNOTSUPP: Errno = 102

/// Errors
pub const EOVERFLOW: Errno = 84

/// Errors
pub const EOWNERDEAD: Errno = 105

/// Errors
pub const EPERM: Errno = 1

/// Errors
pub const EPFNOSUPPORT: Errno = 46

/// Errors
pub const EPIPE: Errno = 32

/// Errors
pub const EPROCLIM: Errno = 67

/// Errors
pub const EPROCUNAVAIL: Errno = 76

/// Errors
pub const EPROGMISMATCH: Errno = 75

/// Errors
pub const EPROGUNAVAIL: Errno = 74

/// Errors
pub const EPROTO: Errno = 100

/// Errors
pub const EPROTONOSUPPORT: Errno = 43

/// Errors
pub const EPROTOTYPE: Errno = 41

/// Errors
pub const EPWROFF: Errno = 82

/// Errors
pub const ERANGE: Errno = 34

/// Errors
pub const EREMOTE: Errno = 71

/// Errors
pub const EROFS: Errno = 30

/// Errors
pub const ERPCMISMATCH: Errno = 73

/// Errors
pub const ESHLIBVERS: Errno = 87

/// Errors
pub const ESHUTDOWN: Errno = 58

/// Errors
pub const ESOCKTNOSUPPORT: Errno = 44

/// Errors
pub const ESPIPE: Errno = 29

/// Errors
pub const ESRCH: Errno = 3

/// Errors
pub const ESTALE: Errno = 70

/// Errors
pub const ETIME: Errno = 101

/// Errors
pub const ETIMEDOUT: Errno = 60

/// Errors
pub const ETOOMANYREFS: Errno = 59

/// Errors
pub const ETXTBSY: Errno = 26

/// Errors
pub const EUSERS: Errno = 68

/// Errors
pub const EWOULDBLOCK: Errno = 35

/// Errors
pub const EXDEV: Errno = 18

/// A Signal is a number describing a process signal.
/// It implements the [os.Signal] interface.
pub struct Signal(int)

/// Signals
pub const SIGABRT: Signal = 6

/// Signals
pub const SIGALRM: Signal = 14

/// Signals
pub const SIGBUS: Signal = 10

/// Signals
pub const SIGCHLD: Signal = 20

/// Signals
pub const SIGCONT: Signal = 19

/// Signals
pub const SIGEMT: Signal = 7

/// Signals
pub const SIGFPE: Signal = 8

/// Signals
pub const SIGHUP: Signal = 1

/// Signals
pub const SIGILL: Signal = 4

/// Signals
pub const SIGINFO: Signal = 29

/// Signals
pub const SIGINT: Signal = 2

/// Signals
pub const SIGIO: Signal = 23

/// Signals
pub const SIGIOT: Signal = 6

/// Signals
pub const SIGKILL: Signal = 9

/// Signals
pub const SIGPIPE: Signal = 13

/// Signals
pub const SIGPROF: Signal = 27

/// Signals
pub const SIGQUIT: Signal = 3

/// Signals
pub const SIGSEGV: Signal = 11

/// Signals
pub const SIGSTOP: Signal = 17

/// Signals
pub const SIGSYS: Signal = 12

/// Signals
pub const SIGTERM: Signal = 15

/// Signals
pub const SIGTRAP: Signal = 5

/// Signals
pub const SIGTSTP: Signal = 18

/// Signals
pub const SIGTTIN: Signal = 21

/// Signals
pub const SIGTTOU: Signal = 22

/// Signals
pub const SIGURG: Signal = 16

/// Signals
pub const SIGUSR1: Signal = 30

/// Signals
pub const SIGUSR2: Signal = 31

/// Signals
pub const SIGVTALRM: Signal = 26

/// Signals
pub const SIGWINCH: Signal = 28

/// Signals
pub const SIGXCPU: Signal = 24

/// Signals
pub const SIGXFSZ: Signal = 25

pub fn Accept(fd: int) -> Result<(int, Sockaddr), error>

pub fn Access(path: string, mode: uint32) -> Result<(), error>

pub fn Adjtime(delta: Ref<Timeval>, olddelta: Ref<Timeval>) -> Result<(), error>

pub fn Bind(fd: int, sa: Sockaddr) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn BpfBuflen(fd: int) -> Result<int, error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn BpfDatalink(fd: int) -> Result<int, error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn BpfHeadercmpl(fd: int) -> Result<int, error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn BpfInterface(fd: int, name: string) -> Result<string, error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn BpfJump(code: int, k: int, jt: int, jf: int) -> Ref<BpfInsn>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn BpfStats(fd: int) -> Result<Ref<BpfStat>, error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn BpfStmt(code: int, k: int) -> Ref<BpfInsn>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn BpfTimeout(fd: int) -> Result<Ref<Timeval>, error>

/// BytePtrFromString returns a pointer to a NUL-terminated array of
/// bytes containing the text of s. If s contains a NUL byte at any
/// location, it returns (nil, [EINVAL]).
pub fn BytePtrFromString(s: string) -> Result<Ref<byte>, error>

/// ByteSliceFromString returns a NUL-terminated slice of bytes
/// containing the text of s. If s contains a NUL byte at any
/// location, it returns (nil, [EINVAL]).
pub fn ByteSliceFromString(s: string) -> Result<Slice<byte>, error>

pub fn Chdir(path: string) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn CheckBpfVersion(fd: int) -> Result<(), error>

pub fn Chflags(path: string, flags: int) -> Result<(), error>

pub fn Chmod(path: string, mode: uint32) -> Result<(), error>

pub fn Chown(path: string, uid: int, gid: int) -> Result<(), error>

pub fn Chroot(path: string) -> Result<(), error>

pub fn Clearenv()

pub fn Close(fd: int) -> Result<(), error>

pub fn CloseOnExec(fd: int)

/// CmsgLen returns the value to store in the Len field of the [Cmsghdr]
/// structure, taking into account any necessary alignment.
pub fn CmsgLen(datalen: int) -> int

/// CmsgSpace returns the number of bytes an ancillary element with
/// payload of the passed data length occupies.
pub fn CmsgSpace(datalen: int) -> int

pub fn Connect(fd: int, sa: Sockaddr) -> Result<(), error>

pub fn Dup(fd: int) -> Result<int, error>

pub fn Dup2(from: int, to: int) -> Result<(), error>

pub fn Environ() -> Slice<string>

pub fn Exchangedata(path1: string, path2: string, options: int) -> Result<(), error>

/// Exec invokes the execve(2) system call.
pub fn Exec(argv0: string, argv: Slice<string>, envv: Slice<string>) -> Result<(), error>

pub fn Exit(code: int)

pub fn Fchdir(fd: int) -> Result<(), error>

pub fn Fchflags(fd: int, flags: int) -> Result<(), error>

pub fn Fchmod(fd: int, mode: uint32) -> Result<(), error>

pub fn Fchown(fd: int, uid: int, gid: int) -> Result<(), error>

/// FcntlFlock performs a fcntl syscall for the [F_GETLK], [F_SETLK] or [F_SETLKW] command.
pub fn FcntlFlock(fd: uint, cmd: int, lk: Ref<Flock_t>) -> Result<(), error>

pub fn Flock(fd: int, how: int) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn FlushBpf(fd: int) -> Result<(), error>

/// Combination of fork and exec, careful to be thread safe.
pub fn ForkExec(argv0: string, argv: Slice<string>, attr: Ref<ProcAttr>) -> Result<int, error>

pub fn Fpathconf(fd: int, name: int) -> Result<int, error>

pub fn Fstat(fd: int, stat: Ref<Stat_t>) -> Result<(), error>

pub fn Fstatfs(fd: int, stat: Ref<Statfs_t>) -> Result<(), error>

pub fn Fsync(fd: int) -> Result<(), error>

pub fn Ftruncate(fd: int, length: int64) -> Result<(), error>

pub fn Futimes(fd: int, tv: Slice<Timeval>) -> Result<(), error>

pub fn Getdirentries(fd: int, mut buf: Slice<byte>, basep: Ref<uint>) -> Result<int, error>

pub fn Getdtablesize() -> int

pub fn Getegid() -> int

pub fn Getenv(key: string) -> Option<string>

pub fn Geteuid() -> int

pub fn Getfsstat(mut buf: Slice<Statfs_t>, flags: int) -> Result<int, error>

pub fn Getgid() -> int

pub fn Getgroups() -> Result<Slice<int>, error>

pub fn Getpagesize() -> int

pub fn Getpeername(fd: int) -> Result<Sockaddr, error>

pub fn Getpgid(pid: int) -> Result<int, error>

pub fn Getpgrp() -> int

pub fn Getpid() -> int

pub fn Getppid() -> int

pub fn Getpriority(which: int, who: int) -> Result<int, error>

pub fn Getrlimit(which: int, lim: Ref<Rlimit>) -> Result<(), error>

pub fn Getrusage(who: int, rusage: Ref<Rusage>) -> Result<(), error>

pub fn Getsid(pid: int) -> Result<int, error>

pub fn Getsockname(fd: int) -> Result<Sockaddr, error>

pub fn GetsockoptByte(fd: int, level: int, opt: int) -> Result<byte, error>

pub fn GetsockoptICMPv6Filter(fd: int, level: int, opt: int) -> Result<Ref<ICMPv6Filter>, error>

pub fn GetsockoptIPMreq(fd: int, level: int, opt: int) -> Result<Ref<IPMreq>, error>

pub fn GetsockoptIPv6MTUInfo(fd: int, level: int, opt: int) -> Result<Ref<IPv6MTUInfo>, error>

pub fn GetsockoptIPv6Mreq(fd: int, level: int, opt: int) -> Result<Ref<IPv6Mreq>, error>

pub fn GetsockoptInet4Addr(fd: int, level: int, opt: int) -> Result<Slice<byte>, error>

pub fn GetsockoptInt(fd: int, level: int, opt: int) -> Result<int, error>

pub fn Gettimeofday(tp: Ref<Timeval>) -> Result<(), error>

pub fn Getuid() -> int

pub fn Getwd() -> Result<string, error>

pub fn Issetugid() -> bool

pub fn Kevent(
  kq: int,
  changes: Slice<Kevent_t>,
  events: Slice<Kevent_t>,
  timeout: Ref<Timespec>,
) -> Result<int, error>

pub fn Kill(pid: int, signum: Signal) -> Result<(), error>

pub fn Kqueue() -> Result<int, error>

pub fn Lchown(path: string, uid: int, gid: int) -> Result<(), error>

pub fn Link(path: string, link: string) -> Result<(), error>

pub fn Listen(s: int, backlog: int) -> Result<(), error>

pub fn Lstat(path: string, stat: Ref<Stat_t>) -> Result<(), error>

pub fn Mkdir(path: string, mode: uint32) -> Result<(), error>

pub fn Mkfifo(path: string, mode: uint32) -> Result<(), error>

pub fn Mknod(path: string, mode: uint32, dev: int) -> Result<(), error>

pub fn Mlock(b: Slice<byte>) -> Result<(), error>

pub fn Mlockall(flags: int) -> Result<(), error>

pub fn Mmap(fd: int, offset: int64, length: int, prot: int, flags: int) -> Result<Slice<byte>, error>

pub fn Mprotect(b: Slice<byte>, prot: int) -> Result<(), error>

pub fn Munlock(b: Slice<byte>) -> Result<(), error>

pub fn Munlockall() -> Result<(), error>

pub fn Munmap(b: Slice<byte>) -> Result<(), error>

/// NsecToTimespec converts a number of nanoseconds into a [Timespec].
pub fn NsecToTimespec(nsec: int64) -> Timespec

/// NsecToTimeval converts a number of nanoseconds into a [Timeval].
pub fn NsecToTimeval(nsec: int64) -> Timeval

pub fn Open(path: string, mode: int, perm: uint32) -> Result<int, error>

/// ParseDirent parses up to max directory entries in buf,
/// appending the names to names. It returns the number of
/// bytes consumed from buf, the number of entries added
/// to names, and the new names slice.
pub fn ParseDirent(buf: Slice<byte>, max: int, names: Slice<string>) -> (int, int, Slice<string>)

/// ParseRoutingMessage parses b as routing messages and returns the
/// slice containing the [RoutingMessage] interfaces.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub fn ParseRoutingMessage(b: Slice<byte>) -> Result<Slice<RoutingMessage>, error>

/// ParseRoutingSockaddr parses msg's payload as raw sockaddrs and
/// returns the slice containing the [Sockaddr] interfaces.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub fn ParseRoutingSockaddr(msg: RoutingMessage) -> Result<Slice<Sockaddr>, error>

/// ParseSocketControlMessage parses b as an array of socket control
/// messages.
pub fn ParseSocketControlMessage(b: Slice<byte>) -> Result<Slice<SocketControlMessage>, error>

/// ParseUnixRights decodes a socket control message that contains an
/// integer array of open file descriptors from another process.
pub fn ParseUnixRights(m: Ref<SocketControlMessage>) -> Result<Slice<int>, error>

pub fn Pathconf(path: string, name: int) -> Result<int, error>

pub fn Pipe(mut p: Slice<int>) -> Result<(), error>

pub fn Pread(fd: int, mut p: Slice<byte>, offset: int64) -> Result<int, error>

pub fn PtraceAttach(pid: int) -> Result<(), error>

pub fn PtraceDetach(pid: int) -> Result<(), error>

pub fn Pwrite(fd: int, p: Slice<byte>, offset: int64) -> Result<int, error>

pub fn RawSyscall(trap: uint, a1: uint, a2: uint, a3: uint) -> (uint, uint, Errno)

pub fn RawSyscall6(
  trap: uint,
  a1: uint,
  a2: uint,
  a3: uint,
  a4: uint,
  a5: uint,
  a6: uint,
) -> (uint, uint, Errno)

pub fn Read(fd: int, mut p: Slice<byte>) -> Result<int, error>

pub fn ReadDirent(fd: int, mut buf: Slice<byte>) -> Result<int, error>

pub fn Readlink(path: string, mut buf: Slice<byte>) -> Result<int, error>

pub fn Recvfrom(fd: int, mut p: Slice<byte>, flags: int) -> Result<(int, Sockaddr), error>

pub fn Recvmsg(fd: int, mut p: Slice<byte>, mut oob: Slice<byte>, flags: int) -> Result<(int, int, int, Sockaddr), error>

pub fn Rename(from: string, to: string) -> Result<(), error>

pub fn Revoke(path: string) -> Result<(), error>

pub fn Rmdir(path: string) -> Result<(), error>

/// RouteRIB returns routing information base, as known as RIB,
/// which consists of network facility information, states and
/// parameters.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub fn RouteRIB(facility: int, param: int) -> Result<Slice<byte>, error>

pub fn Seek(fd: int, offset: int64, whence: int) -> Result<int64, error>

pub fn Select(
  n: int,
  r: Ref<FdSet>,
  w: Ref<FdSet>,
  e: Ref<FdSet>,
  timeout: Ref<Timeval>,
) -> Result<(), error>

pub fn Sendfile(outfd: int, infd: int, offset: Ref<int64>, count: int) -> Result<int, error>

pub fn Sendmsg(
  fd: int,
  p: Slice<byte>,
  oob: Slice<byte>,
  to: Sockaddr,
  flags: int,
) -> Result<(), error>

pub fn SendmsgN(
  fd: int,
  p: Slice<byte>,
  oob: Slice<byte>,
  to: Sockaddr,
  flags: int,
) -> Result<int, error>

pub fn Sendto(fd: int, p: Slice<byte>, flags: int, to: Sockaddr) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpf(fd: int, i: Slice<BpfInsn>) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpfBuflen(fd: int, l: int) -> Result<int, error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpfDatalink(fd: int, t: int) -> Result<int, error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpfHeadercmpl(fd: int, f: int) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpfImmediate(fd: int, m: int) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpfInterface(fd: int, name: string) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpfPromisc(fd: int, m: int) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpfTimeout(fd: int, tv: Ref<Timeval>) -> Result<(), error>

pub fn SetKevent(k: Ref<Kevent_t>, fd: int, mode: int, flags: int)

pub fn SetNonblock(fd: int, nonblocking: bool) -> Result<(), error>

pub fn Setegid(egid: int) -> Result<(), error>

pub fn Setenv(key: string, value: string) -> Result<(), error>

pub fn Seteuid(euid: int) -> Result<(), error>

pub fn Setgid(gid: int) -> Result<(), error>

pub fn Setgroups(gids: Slice<int>) -> Result<(), error>

pub fn Setlogin(name: string) -> Result<(), error>

pub fn Setpgid(pid: int, pgid: int) -> Result<(), error>

pub fn Setpriority(which: int, who: int, prio: int) -> Result<(), error>

pub fn Setprivexec(flag: int) -> Result<(), error>

pub fn Setregid(rgid: int, egid: int) -> Result<(), error>

pub fn Setreuid(ruid: int, euid: int) -> Result<(), error>

pub fn Setrlimit(resource: int, rlim: Ref<Rlimit>) -> Result<(), error>

pub fn Setsid() -> Result<int, error>

pub fn SetsockoptByte(fd: int, level: int, opt: int, value: byte) -> Result<(), error>

pub fn SetsockoptICMPv6Filter(
  fd: int,
  level: int,
  opt: int,
  filter: Ref<ICMPv6Filter>,
) -> Result<(), error>

pub fn SetsockoptIPMreq(fd: int, level: int, opt: int, mreq: Ref<IPMreq>) -> Result<(), error>

pub fn SetsockoptIPv6Mreq(fd: int, level: int, opt: int, mreq: Ref<IPv6Mreq>) -> Result<(), error>

// SKIPPED: SetsockoptInet4Addr - array-currently-not-representable
// fixed-size array cannot currently be represented in Lisette

pub fn SetsockoptInt(fd: int, level: int, opt: int, value: int) -> Result<(), error>

pub fn SetsockoptLinger(fd: int, level: int, opt: int, l: Ref<Linger>) -> Result<(), error>

pub fn SetsockoptString(fd: int, level: int, opt: int, s: string) -> Result<(), error>

pub fn SetsockoptTimeval(fd: int, level: int, opt: int, tv: Ref<Timeval>) -> Result<(), error>

pub fn Settimeofday(tp: Ref<Timeval>) -> Result<(), error>

pub fn Setuid(uid: int) -> Result<(), error>

pub fn Shutdown(s: int, how: int) -> Result<(), error>

/// SlicePtrFromStrings converts a slice of strings to a slice of
/// pointers to NUL-terminated byte arrays. If any string contains
/// a NUL byte, it returns (nil, [EINVAL]).
pub fn SlicePtrFromStrings(ss: Slice<string>) -> Result<Slice<Ref<byte>>, error>

pub fn Socket(domain: int, typ: int, proto: int) -> Result<int, error>

pub fn Socketpair(domain: int, typ: int, proto: int) -> Result<Slice<int>, error>

/// StartProcess wraps [ForkExec] for package os.
pub fn StartProcess(argv0: string, argv: Slice<string>, attr: Ref<ProcAttr>) -> Result<(int, uint), error>

pub fn Stat(path: string, stat: Ref<Stat_t>) -> Result<(), error>

pub fn Statfs(path: string, stat: Ref<Statfs_t>) -> Result<(), error>

/// StringBytePtr returns a pointer to a NUL-terminated array of bytes.
/// If s contains a NUL byte this function panics instead of returning
/// an error.
/// 
/// Deprecated: Use [BytePtrFromString] instead.
pub fn StringBytePtr(s: string) -> Ref<byte>

/// StringByteSlice converts a string to a NUL-terminated []byte,
/// If s contains a NUL byte this function panics instead of
/// returning an error.
/// 
/// Deprecated: Use ByteSliceFromString instead.
pub fn StringByteSlice(s: string) -> Slice<byte>

/// StringSlicePtr converts a slice of strings to a slice of pointers
/// to NUL-terminated byte arrays. If any string contains a NUL byte
/// this function panics instead of returning an error.
/// 
/// Deprecated: Use [SlicePtrFromStrings] instead.
pub fn StringSlicePtr(ss: Slice<string>) -> Slice<Ref<byte>>

pub fn Symlink(path: string, link: string) -> Result<(), error>

pub fn Sync() -> Result<(), error>

pub fn Syscall(trap: uint, a1: uint, a2: uint, a3: uint) -> (uint, uint, Errno)

pub fn Syscall6(
  trap: uint,
  a1: uint,
  a2: uint,
  a3: uint,
  a4: uint,
  a5: uint,
  a6: uint,
) -> (uint, uint, Errno)

pub fn Syscall9(
  trap: uint,
  a1: uint,
  a2: uint,
  a3: uint,
  a4: uint,
  a5: uint,
  a6: uint,
  a7: uint,
  a8: uint,
  a9: uint,
) -> (uint, uint, Errno)

pub fn Sysctl(name: string) -> Result<string, error>

pub fn SysctlUint32(name: string) -> Result<uint32, error>

/// TimespecToNsec returns the time stored in ts as nanoseconds.
pub fn TimespecToNsec(ts: Timespec) -> int64

/// TimevalToNsec returns the time stored in tv as nanoseconds.
pub fn TimevalToNsec(tv: Timeval) -> int64

pub fn Truncate(path: string, length: int64) -> Result<(), error>

pub fn Umask(newmask: int) -> int

pub fn Undelete(path: string) -> Result<(), error>

/// UnixRights encodes a set of open file descriptors into a socket
/// control message for sending to another process.
pub fn UnixRights(fds: VarArgs<int>) -> Slice<byte>

pub fn Unlink(path: string) -> Result<(), error>

pub fn Unmount(path: string, flags: int) -> Result<(), error>

pub fn Unsetenv(key: string) -> Result<(), error>

pub fn Utimes(path: string, tv: Slice<Timeval>) -> Result<(), error>

pub fn UtimesNano(path: string, ts: Slice<Timespec>) -> Result<(), error>

pub fn Wait4(
  pid: int,
  wstatus: Ref<WaitStatus>,
  options: int,
  rusage: Ref<Rusage>,
) -> Result<int, error>

pub fn Write(fd: int, p: Slice<byte>) -> Result<int, error>

pub struct BpfHdr {
  pub Tstamp: Timeval32,
  pub Caplen: uint32,
  pub Datalen: uint32,
  pub Hdrlen: uint16,
  // SKIPPED field "Pad_cgo_0": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct BpfInsn {
  pub Code: uint16,
  pub Jt: uint8,
  pub Jf: uint8,
  pub K: uint32,
}

pub struct BpfProgram {
  pub Len: uint32,
  // SKIPPED field "Pad_cgo_0": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  pub Insns: Option<Ref<BpfInsn>>,
}

pub struct BpfStat {
  pub Recv: uint32,
  pub Drop: uint32,
}

pub struct BpfVersion {
  pub Major: uint16,
  pub Minor: uint16,
}

pub struct Cmsghdr {
  pub Len: uint32,
  pub Level: int32,
  pub Type: int32,
}

/// Conn is implemented by some types in the net and os packages to provide
/// access to the underlying file descriptor or handle.
pub interface Conn {
  fn SyscallConn() -> Result<RawConn, error>
}

/// Credential holds user and group identities to be assumed
/// by a child process started by [StartProcess].
pub struct Credential {
  pub Uid: uint32,
  pub Gid: uint32,
  pub Groups: Slice<uint32>,
  pub NoSetGroups: bool,
}

pub struct Dirent {
  pub Ino: uint64,
  pub Seekoff: uint64,
  pub Reclen: uint16,
  pub Namlen: uint16,
  pub Type: uint8,
  // SKIPPED field "Name": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  // SKIPPED field "Pad_cgo_0": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct Fbootstraptransfer_t {
  pub Offset: int64,
  pub Length: uint64,
  pub Buffer: Option<Ref<byte>>,
}

// SKIPPED field "Bits": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
pub type FdSet

pub struct Flock_t {
  pub Start: int64,
  pub Len: int64,
  pub Pid: int32,
  pub Type: int16,
  pub Whence: int16,
}

// SKIPPED field "Val": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
pub type Fsid

pub struct Fstore_t {
  pub Flags: uint32,
  pub Posmode: int32,
  pub Offset: int64,
  pub Length: int64,
  pub Bytesalloc: int64,
}

// SKIPPED field "Filt": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
pub type ICMPv6Filter

// SKIPPED field "Multiaddr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
// SKIPPED field "Interface": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
pub type IPMreq

pub struct IPv6MTUInfo {
  pub Addr: RawSockaddrInet6,
  pub Mtu: uint32,
}

pub struct IPv6Mreq {
  // SKIPPED field "Multiaddr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  pub Interface: uint32,
}

pub struct IfData {
  pub Type: uint8,
  pub Typelen: uint8,
  pub Physical: uint8,
  pub Addrlen: uint8,
  pub Hdrlen: uint8,
  pub Recvquota: uint8,
  pub Xmitquota: uint8,
  pub Unused1: uint8,
  pub Mtu: uint32,
  pub Metric: uint32,
  pub Baudrate: uint32,
  pub Ipackets: uint32,
  pub Ierrors: uint32,
  pub Opackets: uint32,
  pub Oerrors: uint32,
  pub Collisions: uint32,
  pub Ibytes: uint32,
  pub Obytes: uint32,
  pub Imcasts: uint32,
  pub Omcasts: uint32,
  pub Iqdrops: uint32,
  pub Noproto: uint32,
  pub Recvtiming: uint32,
  pub Xmittiming: uint32,
  pub Lastchange: Timeval32,
  pub Unused2: uint32,
  pub Hwassist: uint32,
  pub Reserved1: uint32,
  pub Reserved2: uint32,
}

pub struct IfMsghdr {
  pub Msglen: uint16,
  pub Version: uint8,
  pub Type: uint8,
  pub Addrs: int32,
  pub Flags: int32,
  pub Index: uint16,
  // SKIPPED field "Pad_cgo_0": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  pub Data: IfData,
}

pub struct IfaMsghdr {
  pub Msglen: uint16,
  pub Version: uint8,
  pub Type: uint8,
  pub Addrs: int32,
  pub Flags: int32,
  pub Index: uint16,
  // SKIPPED field "Pad_cgo_0": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  pub Metric: int32,
}

pub struct IfmaMsghdr {
  pub Msglen: uint16,
  pub Version: uint8,
  pub Type: uint8,
  pub Addrs: int32,
  pub Flags: int32,
  pub Index: uint16,
  // SKIPPED field "Pad_cgo_0": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct IfmaMsghdr2 {
  pub Msglen: uint16,
  pub Version: uint8,
  pub Type: uint8,
  pub Addrs: int32,
  pub Flags: int32,
  pub Index: uint16,
  // SKIPPED field "Pad_cgo_0": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  pub Refcount: int32,
}

pub struct Inet4Pktinfo {
  pub Ifindex: uint32,
  // SKIPPED field "Spec_dst": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  // SKIPPED field "Addr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct Inet6Pktinfo {
  // SKIPPED field "Addr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  pub Ifindex: uint32,
}

/// InterfaceAddrMessage represents a routing message containing
/// network interface address entries.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub struct InterfaceAddrMessage {
  pub Header: IfaMsghdr,
  pub Data: Slice<byte>,
}

/// InterfaceMessage represents a routing message containing
/// network interface entries.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub struct InterfaceMessage {
  pub Header: IfMsghdr,
  pub Data: Slice<byte>,
}

/// InterfaceMulticastAddrMessage represents a routing message
/// containing network interface address entries.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub struct InterfaceMulticastAddrMessage {
  pub Header: IfmaMsghdr2,
  pub Data: Slice<byte>,
}

pub struct Iovec {
  pub Base: Option<Ref<byte>>,
  pub Len: uint64,
}

pub struct Kevent_t {
  pub Ident: uint64,
  pub Filter: int16,
  pub Flags: uint16,
  pub Fflags: uint32,
  pub Data: int64,
  pub Udata: Option<Ref<byte>>,
}

pub struct Linger {
  pub Onoff: int32,
  pub Linger: int32,
}

pub struct Log2phys_t {
  pub Flags: uint32,
  pub Contigbytes: int64,
  pub Devoffset: int64,
}

pub struct Msghdr {
  pub Name: Option<Ref<byte>>,
  pub Namelen: uint32,
  // SKIPPED field "Pad_cgo_0": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  pub Iov: Option<Ref<Iovec>>,
  pub Iovlen: int32,
  // SKIPPED field "Pad_cgo_1": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  pub Control: Option<Ref<byte>>,
  pub Controllen: uint32,
  pub Flags: int32,
}

/// ProcAttr holds attributes that will be applied to a new process started
/// by [StartProcess].
pub struct ProcAttr {
  pub Dir: string,
  pub Env: Slice<string>,
  pub Files: Slice<uint>,
  pub Sys: Option<Ref<SysProcAttr>>,
}

pub struct Radvisory_t {
  pub Offset: int64,
  pub Count: int32,
  // SKIPPED field "Pad_cgo_0": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

/// A RawConn is a raw network connection.
pub interface RawConn {
  fn Control(f: fn(uint) -> ()) -> Result<(), error>
  fn Read(f: fn(uint) -> bool) -> Result<(), error>
  fn Write(f: fn(uint) -> bool) -> Result<(), error>
}

pub struct RawSockaddr {
  pub Len: uint8,
  pub Family: uint8,
  // SKIPPED field "Data": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct RawSockaddrAny {
  pub Addr: RawSockaddr,
  // SKIPPED field "Pad": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct RawSockaddrDatalink {
  pub Len: uint8,
  pub Family: uint8,
  pub Index: uint16,
  pub Type: uint8,
  pub Nlen: uint8,
  pub Alen: uint8,
  pub Slen: uint8,
  // SKIPPED field "Data": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct RawSockaddrInet4 {
  pub Len: uint8,
  pub Family: uint8,
  pub Port: uint16,
  // SKIPPED field "Addr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  // SKIPPED field "Zero": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct RawSockaddrInet6 {
  pub Len: uint8,
  pub Family: uint8,
  pub Port: uint16,
  pub Flowinfo: uint32,
  // SKIPPED field "Addr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  pub Scope_id: uint32,
}

pub struct RawSockaddrUnix {
  pub Len: uint8,
  pub Family: uint8,
  // SKIPPED field "Path": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct Rlimit {
  pub Cur: uint64,
  pub Max: uint64,
}

/// RouteMessage represents a routing message containing routing
/// entries.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub struct RouteMessage {
  pub Header: RtMsghdr,
  pub Data: Slice<byte>,
}

/// RoutingMessage represents a routing message.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub interface RoutingMessage {}

pub struct RtMetrics {
  pub Locks: uint32,
  pub Mtu: uint32,
  pub Hopcount: uint32,
  pub Expire: int32,
  pub Recvpipe: uint32,
  pub Sendpipe: uint32,
  pub Ssthresh: uint32,
  pub Rtt: uint32,
  pub Rttvar: uint32,
  pub Pksent: uint32,
  // SKIPPED field "Filler": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct RtMsghdr {
  pub Msglen: uint16,
  pub Version: uint8,
  pub Type: uint8,
  pub Index: uint16,
  // SKIPPED field "Pad_cgo_0": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  pub Flags: int32,
  pub Addrs: int32,
  pub Pid: int32,
  pub Seq: int32,
  pub Errno: int32,
  pub Use: int32,
  pub Inits: uint32,
  pub Rmx: RtMetrics,
}

pub struct Rusage {
  pub Utime: Timeval,
  pub Stime: Timeval,
  pub Maxrss: int64,
  pub Ixrss: int64,
  pub Idrss: int64,
  pub Isrss: int64,
  pub Minflt: int64,
  pub Majflt: int64,
  pub Nswap: int64,
  pub Inblock: int64,
  pub Oublock: int64,
  pub Msgsnd: int64,
  pub Msgrcv: int64,
  pub Nsignals: int64,
  pub Nvcsw: int64,
  pub Nivcsw: int64,
}

pub interface Sockaddr {}

pub struct SockaddrDatalink {
  pub Len: uint8,
  pub Family: uint8,
  pub Index: uint16,
  pub Type: uint8,
  pub Nlen: uint8,
  pub Alen: uint8,
  pub Slen: uint8,
  // SKIPPED field "Data": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct SockaddrInet4 {
  pub Port: int,
  // SKIPPED field "Addr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct SockaddrInet6 {
  pub Port: int,
  pub ZoneId: uint32,
  // SKIPPED field "Addr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct SockaddrUnix {
  pub Name: string,
}

/// SocketControlMessage represents a socket control message.
pub struct SocketControlMessage {
  pub Header: Cmsghdr,
  pub Data: Slice<byte>,
}

pub struct Stat_t {
  pub Dev: int32,
  pub Mode: uint16,
  pub Nlink: uint16,
  pub Ino: uint64,
  pub Uid: uint32,
  pub Gid: uint32,
  pub Rdev: int32,
  // SKIPPED field "Pad_cgo_0": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  pub Atimespec: Timespec,
  pub Mtimespec: Timespec,
  pub Ctimespec: Timespec,
  pub Birthtimespec: Timespec,
  pub Size: int64,
  pub Blocks: int64,
  pub Blksize: int32,
  pub Flags: uint32,
  pub Gen: uint32,
  pub Lspare: int32,
  // SKIPPED field "Qspare": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct Statfs_t {
  pub Bsize: uint32,
  pub Iosize: int32,
  pub Blocks: uint64,
  pub Bfree: uint64,
  pub Bavail: uint64,
  pub Files: uint64,
  pub Ffree: uint64,
  pub Fsid: Fsid,
  pub Owner: uint32,
  pub Type: uint32,
  pub Flags: uint32,
  pub Fssubtype: uint32,
  // SKIPPED field "Fstypename": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  // SKIPPED field "Mntonname": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  // SKIPPED field "Mntfromname": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  // SKIPPED field "Reserved": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct SysProcAttr {
  pub Chroot: string,
  pub Credential: Option<Ref<Credential>>,
  pub Ptrace: bool,
  pub Setsid: bool,
  pub Setpgid: bool,
  pub Setctty: bool,
  pub Noctty: bool,
  pub Ctty: int,
  pub Foreground: bool,
  pub Pgid: int,
}

pub struct Termios {
  pub Iflag: uint64,
  pub Oflag: uint64,
  pub Cflag: uint64,
  pub Lflag: uint64,
  // SKIPPED field "Cc": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  // SKIPPED field "Pad_cgo_0": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
  pub Ispeed: uint64,
  pub Ospeed: uint64,
}

pub struct Timespec {
  pub Sec: int64,
  pub Nsec: int64,
}

pub struct Timeval {
  pub Sec: int64,
  pub Usec: int32,
  // SKIPPED field "Pad_cgo_0": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}

pub struct Timeval32 {
  pub Sec: int32,
  pub Usec: int32,
}

pub struct WaitStatus(uint32)

pub const AF_APPLETALK = 0x10

pub const AF_CCITT = 0xa

pub const AF_CHAOS = 0x5

pub const AF_CNT = 0x15

pub const AF_COIP = 0x14

pub const AF_DATAKIT = 0x9

pub const AF_DECnet = 0xc

pub const AF_DLI = 0xd

pub const AF_E164 = 0x1c

pub const AF_ECMA = 0x8

pub const AF_HYLINK = 0xf

pub const AF_IEEE80211 = 0x25

pub const AF_IMPLINK = 0x3

pub const AF_INET = 0x2

pub const AF_INET6 = 0x1e

pub const AF_IPX = 0x17

pub const AF_ISDN = 0x1c

pub const AF_ISO = 0x7

pub const AF_LAT = 0xe

pub const AF_LINK = 0x12

pub const AF_LOCAL = 0x1

pub const AF_MAX = 0x26

pub const AF_NATM = 0x1f

pub const AF_NDRV = 0x1b

pub const AF_NETBIOS = 0x21

pub const AF_NS = 0x6

pub const AF_OSI = 0x7

pub const AF_PPP = 0x22

pub const AF_PUP = 0x4

pub const AF_RESERVED_36 = 0x24

pub const AF_ROUTE = 0x11

pub const AF_SIP = 0x18

pub const AF_SNA = 0xb

pub const AF_SYSTEM = 0x20

pub const AF_UNIX = 0x1

pub const AF_UNSPEC = 0x0

pub const B0 = 0x0

pub const B110 = 0x6e

pub const B115200 = 0x1c200

pub const B1200 = 0x4b0

pub const B134 = 0x86

pub const B14400 = 0x3840

pub const B150 = 0x96

pub const B1800 = 0x708

pub const B19200 = 0x4b00

pub const B200 = 0xc8

pub const B230400 = 0x38400

pub const B2400 = 0x960

pub const B28800 = 0x7080

pub const B300 = 0x12c

pub const B38400 = 0x9600

pub const B4800 = 0x12c0

pub const B50 = 0x32

pub const B57600 = 0xe100

pub const B600 = 0x258

pub const B7200 = 0x1c20

pub const B75 = 0x4b

pub const B76800 = 0x12c00

pub const B9600 = 0x2580

pub const BIOCFLUSH = 0x20004268

pub const BIOCGBLEN = 0x40044266

pub const BIOCGDLT = 0x4004426a

pub const BIOCGDLTLIST = 0xc00c4279

pub const BIOCGETIF = 0x4020426b

pub const BIOCGHDRCMPLT = 0x40044274

pub const BIOCGRSIG = 0x40044272

pub const BIOCGRTIMEOUT = 0x4010426e

pub const BIOCGSEESENT = 0x40044276

pub const BIOCGSTATS = 0x4008426f

pub const BIOCIMMEDIATE = 0x80044270

pub const BIOCPROMISC = 0x20004269

pub const BIOCSBLEN = 0xc0044266

pub const BIOCSDLT = 0x80044278

pub const BIOCSETF = 0x80104267

pub const BIOCSETIF = 0x8020426c

pub const BIOCSHDRCMPLT = 0x80044275

pub const BIOCSRSIG = 0x80044273

pub const BIOCSRTIMEOUT = 0x8010426d

pub const BIOCSSEESENT = 0x80044277

pub const BIOCVERSION = 0x40044271

pub const BPF_A = 0x10

pub const BPF_ABS = 0x20

pub const BPF_ADD = 0x0

pub const BPF_ALIGNMENT = 0x4

pub const BPF_ALU = 0x4

pub const BPF_AND = 0x50

pub const BPF_B = 0x10

pub const BPF_DIV = 0x30

pub const BPF_H = 0x8

pub const BPF_IMM = 0x0

pub const BPF_IND = 0x40

pub const BPF_JA = 0x0

pub const BPF_JEQ = 0x10

pub const BPF_JGE = 0x30

pub const BPF_JGT = 0x20

pub const BPF_JMP = 0x5

pub const BPF_JSET = 0x40

pub const BPF_K = 0x0

pub const BPF_LD = 0x0

pub const BPF_LDX = 0x1

pub const BPF_LEN = 0x80

pub const BPF_LSH = 0x60

pub const BPF_MAJOR_VERSION = 0x1

pub const BPF_MAXBUFSIZE = 0x80000

pub const BPF_MAXINSNS = 0x200

pub const BPF_MEM = 0x60

pub const BPF_MEMWORDS = 0x10

pub const BPF_MINBUFSIZE = 0x20

pub const BPF_MINOR_VERSION = 0x1

pub const BPF_MISC = 0x7

pub const BPF_MSH = 0xa0

pub const BPF_MUL = 0x20

pub const BPF_NEG = 0x80

pub const BPF_OR = 0x40

pub const BPF_RELEASE = 0x30bb6

pub const BPF_RET = 0x6

pub const BPF_RSH = 0x70

pub const BPF_ST = 0x2

pub const BPF_STX = 0x3

pub const BPF_SUB = 0x10

pub const BPF_TAX = 0x0

pub const BPF_TXA = 0x80

pub const BPF_W = 0x0

pub const BPF_X = 0x8

pub const BRKINT = 0x2

pub const CFLUSH = 0xf

pub const CLOCAL = 0x8000

pub const CREAD = 0x800

pub const CS5 = 0x0

pub const CS6 = 0x100

pub const CS7 = 0x200

pub const CS8 = 0x300

pub const CSIZE = 0x300

pub const CSTART = 0x11

pub const CSTATUS = 0x14

pub const CSTOP = 0x13

pub const CSTOPB = 0x400

pub const CSUSP = 0x1a

pub const CTL_MAXNAME = 0xc

pub const CTL_NET = 0x4

pub const DLT_APPLE_IP_OVER_IEEE1394 = 0x8a

pub const DLT_ARCNET = 0x7

pub const DLT_ATM_CLIP = 0x13

pub const DLT_ATM_RFC1483 = 0xb

pub const DLT_AX25 = 0x3

pub const DLT_CHAOS = 0x5

pub const DLT_CHDLC = 0x68

pub const DLT_C_HDLC = 0x68

pub const DLT_EN10MB = 0x1

pub const DLT_EN3MB = 0x2

pub const DLT_FDDI = 0xa

pub const DLT_IEEE802 = 0x6

pub const DLT_IEEE802_11 = 0x69

pub const DLT_IEEE802_11_RADIO = 0x7f

pub const DLT_IEEE802_11_RADIO_AVS = 0xa3

pub const DLT_LINUX_SLL = 0x71

pub const DLT_LOOP = 0x6c

pub const DLT_NULL = 0x0

pub const DLT_PFLOG = 0x75

pub const DLT_PFSYNC = 0x12

pub const DLT_PPP = 0x9

pub const DLT_PPP_BSDOS = 0x10

pub const DLT_PPP_SERIAL = 0x32

pub const DLT_PRONET = 0x4

pub const DLT_RAW = 0xc

pub const DLT_SLIP = 0x8

pub const DLT_SLIP_BSDOS = 0xf

pub const DT_BLK = 0x6

pub const DT_CHR = 0x2

pub const DT_DIR = 0x4

pub const DT_FIFO = 0x1

pub const DT_LNK = 0xa

pub const DT_REG = 0x8

pub const DT_SOCK = 0xc

pub const DT_UNKNOWN = 0x0

pub const DT_WHT = 0xe

pub const ECHO = 0x8

pub const ECHOCTL = 0x40

pub const ECHOE = 0x2

pub const ECHOK = 0x4

pub const ECHOKE = 0x1

pub const ECHONL = 0x10

pub const ECHOPRT = 0x20

pub const EVFILT_AIO = -0x3

pub const EVFILT_FS = -0x9

pub const EVFILT_MACHPORT = -0x8

pub const EVFILT_PROC = -0x5

pub const EVFILT_READ = -0x1

pub const EVFILT_SIGNAL = -0x6

pub const EVFILT_SYSCOUNT = 0xc

pub const EVFILT_THREADMARKER = 0xc

pub const EVFILT_TIMER = -0x7

pub const EVFILT_USER = -0xa

pub const EVFILT_VM = -0xc

pub const EVFILT_VNODE = -0x4

pub const EVFILT_WRITE = -0x2

pub const EV_ADD = 0x1

pub const EV_CLEAR = 0x20

pub const EV_DELETE = 0x2

pub const EV_DISABLE = 0x8

pub const EV_DISPATCH = 0x80

pub const EV_ENABLE = 0x4

pub const EV_EOF = 0x8000

pub const EV_ERROR = 0x4000

pub const EV_FLAG0 = 0x1000

pub const EV_FLAG1 = 0x2000

pub const EV_ONESHOT = 0x10

pub const EV_OOBAND = 0x2000

pub const EV_POLL = 0x1000

pub const EV_RECEIPT = 0x40

pub const EV_SYSFLAGS = 0xf000

pub const EXTA = 0x4b00

pub const EXTB = 0x9600

pub const EXTPROC = 0x800

pub const FD_CLOEXEC = 0x1

pub const FD_SETSIZE = 0x400

pub const FLUSHO = 0x800000

pub const F_ADDFILESIGS = 0x3d

pub const F_ADDSIGS = 0x3b

pub const F_ALLOCATEALL = 0x4

pub const F_ALLOCATECONTIG = 0x2

pub const F_CHKCLEAN = 0x29

pub const F_DUPFD = 0x0

pub const F_DUPFD_CLOEXEC = 0x43

pub const F_FLUSH_DATA = 0x28

pub const F_FREEZE_FS = 0x35

pub const F_FULLFSYNC = 0x33

pub const F_GETFD = 0x1

pub const F_GETFL = 0x3

pub const F_GETLK = 0x7

pub const F_GETLKPID = 0x42

pub const F_GETNOSIGPIPE = 0x4a

pub const F_GETOWN = 0x5

pub const F_GETPATH = 0x32

pub const F_GETPATH_MTMINFO = 0x47

pub const F_GETPROTECTIONCLASS = 0x3f

pub const F_GLOBAL_NOCACHE = 0x37

pub const F_LOG2PHYS = 0x31

pub const F_LOG2PHYS_EXT = 0x41

pub const F_MARKDEPENDENCY = 0x3c

pub const F_NOCACHE = 0x30

pub const F_NODIRECT = 0x3e

pub const F_OK = 0x0

pub const F_PATHPKG_CHECK = 0x34

pub const F_PEOFPOSMODE = 0x3

pub const F_PREALLOCATE = 0x2a

pub const F_RDADVISE = 0x2c

pub const F_RDAHEAD = 0x2d

pub const F_RDLCK = 0x1

pub const F_READBOOTSTRAP = 0x2e

pub const F_SETBACKINGSTORE = 0x46

pub const F_SETFD = 0x2

pub const F_SETFL = 0x4

pub const F_SETLK = 0x8

pub const F_SETLKW = 0x9

pub const F_SETNOSIGPIPE = 0x49

pub const F_SETOWN = 0x6

pub const F_SETPROTECTIONCLASS = 0x40

pub const F_SETSIZE = 0x2b

pub const F_THAW_FS = 0x36

pub const F_UNLCK = 0x2

pub const F_VOLPOSMODE = 0x4

pub const F_WRITEBOOTSTRAP = 0x2f

pub const F_WRLCK = 0x3

pub const HUPCL = 0x4000

pub const ICANON = 0x100

pub const ICMP6_FILTER = 0x12

pub const ICRNL = 0x100

pub const IEXTEN = 0x400

pub const IFF_ALLMULTI = 0x200

pub const IFF_ALTPHYS = 0x4000

pub const IFF_BROADCAST = 0x2

pub const IFF_DEBUG = 0x4

pub const IFF_LINK0 = 0x1000

pub const IFF_LINK1 = 0x2000

pub const IFF_LINK2 = 0x4000

pub const IFF_LOOPBACK = 0x8

pub const IFF_MULTICAST = 0x8000

pub const IFF_NOARP = 0x80

pub const IFF_NOTRAILERS = 0x20

pub const IFF_OACTIVE = 0x400

pub const IFF_POINTOPOINT = 0x10

pub const IFF_PROMISC = 0x100

pub const IFF_RUNNING = 0x40

pub const IFF_SIMPLEX = 0x800

pub const IFF_UP = 0x1

pub const IFNAMSIZ = 0x10

pub const IFT_1822 = 0x2

pub const IFT_AAL5 = 0x31

pub const IFT_ARCNET = 0x23

pub const IFT_ARCNETPLUS = 0x24

pub const IFT_ATM = 0x25

pub const IFT_BRIDGE = 0xd1

pub const IFT_CARP = 0xf8

pub const IFT_CELLULAR = 0xff

pub const IFT_CEPT = 0x13

pub const IFT_DS3 = 0x1e

pub const IFT_ENC = 0xf4

pub const IFT_EON = 0x19

pub const IFT_ETHER = 0x6

pub const IFT_FAITH = 0x38

pub const IFT_FDDI = 0xf

pub const IFT_FRELAY = 0x20

pub const IFT_FRELAYDCE = 0x2c

pub const IFT_GIF = 0x37

pub const IFT_HDH1822 = 0x3

pub const IFT_HIPPI = 0x2f

pub const IFT_HSSI = 0x2e

pub const IFT_HY = 0xe

pub const IFT_IEEE1394 = 0x90

pub const IFT_IEEE8023ADLAG = 0x88

pub const IFT_ISDNBASIC = 0x14

pub const IFT_ISDNPRIMARY = 0x15

pub const IFT_ISO88022LLC = 0x29

pub const IFT_ISO88023 = 0x7

pub const IFT_ISO88024 = 0x8

pub const IFT_ISO88025 = 0x9

pub const IFT_ISO88026 = 0xa

pub const IFT_L2VLAN = 0x87

pub const IFT_LAPB = 0x10

pub const IFT_LOCALTALK = 0x2a

pub const IFT_LOOP = 0x18

pub const IFT_MIOX25 = 0x26

pub const IFT_MODEM = 0x30

pub const IFT_NSIP = 0x1b

pub const IFT_OTHER = 0x1

pub const IFT_P10 = 0xc

pub const IFT_P80 = 0xd

pub const IFT_PARA = 0x22

pub const IFT_PDP = 0xff

pub const IFT_PFLOG = 0xf5

pub const IFT_PFSYNC = 0xf6

pub const IFT_PPP = 0x17

pub const IFT_PROPMUX = 0x36

pub const IFT_PROPVIRTUAL = 0x35

pub const IFT_PTPSERIAL = 0x16

pub const IFT_RS232 = 0x21

pub const IFT_SDLC = 0x11

pub const IFT_SIP = 0x1f

pub const IFT_SLIP = 0x1c

pub const IFT_SMDSDXI = 0x2b

pub const IFT_SMDSICIP = 0x34

pub const IFT_SONET = 0x27

pub const IFT_SONETPATH = 0x32

pub const IFT_SONETVT = 0x33

pub const IFT_STARLAN = 0xb

pub const IFT_STF = 0x39

pub const IFT_T1 = 0x12

pub const IFT_ULTRA = 0x1d

pub const IFT_V35 = 0x2d

pub const IFT_X25 = 0x5

pub const IFT_X25DDN = 0x4

pub const IFT_X25PLE = 0x28

pub const IFT_XETHER = 0x1a

pub const IGNBRK = 0x1

pub const IGNCR = 0x80

pub const IGNPAR = 0x4

pub const IMAXBEL = 0x2000

pub const INLCR = 0x40

pub const INPCK = 0x10

pub const IN_CLASSA_HOST = 0xffffff

pub const IN_CLASSA_MAX = 0x80

pub const IN_CLASSA_NET = 0xff000000

pub const IN_CLASSA_NSHIFT = 0x18

pub const IN_CLASSB_HOST = 0xffff

pub const IN_CLASSB_MAX = 0x10000

pub const IN_CLASSB_NET = 0xffff0000

pub const IN_CLASSB_NSHIFT = 0x10

pub const IN_CLASSC_HOST = 0xff

pub const IN_CLASSC_NET = 0xffffff00

pub const IN_CLASSC_NSHIFT = 0x8

pub const IN_CLASSD_HOST = 0xfffffff

pub const IN_CLASSD_NET = 0xf0000000

pub const IN_CLASSD_NSHIFT = 0x1c

pub const IN_LINKLOCALNETNUM = 0xa9fe0000

pub const IN_LOOPBACKNET = 0x7f

pub const IPPROTO_3PC = 0x22

pub const IPPROTO_ADFS = 0x44

pub const IPPROTO_AH = 0x33

pub const IPPROTO_AHIP = 0x3d

pub const IPPROTO_APES = 0x63

pub const IPPROTO_ARGUS = 0xd

pub const IPPROTO_AX25 = 0x5d

pub const IPPROTO_BHA = 0x31

pub const IPPROTO_BLT = 0x1e

pub const IPPROTO_BRSATMON = 0x4c

pub const IPPROTO_CFTP = 0x3e

pub const IPPROTO_CHAOS = 0x10

pub const IPPROTO_CMTP = 0x26

pub const IPPROTO_CPHB = 0x49

pub const IPPROTO_CPNX = 0x48

pub const IPPROTO_DDP = 0x25

pub const IPPROTO_DGP = 0x56

pub const IPPROTO_DIVERT = 0xfe

pub const IPPROTO_DONE = 0x101

pub const IPPROTO_DSTOPTS = 0x3c

pub const IPPROTO_EGP = 0x8

pub const IPPROTO_EMCON = 0xe

pub const IPPROTO_ENCAP = 0x62

pub const IPPROTO_EON = 0x50

pub const IPPROTO_ESP = 0x32

pub const IPPROTO_ETHERIP = 0x61

pub const IPPROTO_FRAGMENT = 0x2c

pub const IPPROTO_GGP = 0x3

pub const IPPROTO_GMTP = 0x64

pub const IPPROTO_GRE = 0x2f

pub const IPPROTO_HELLO = 0x3f

pub const IPPROTO_HMP = 0x14

pub const IPPROTO_HOPOPTS = 0x0

pub const IPPROTO_ICMP = 0x1

pub const IPPROTO_ICMPV6 = 0x3a

pub const IPPROTO_IDP = 0x16

pub const IPPROTO_IDPR = 0x23

pub const IPPROTO_IDRP = 0x2d

pub const IPPROTO_IGMP = 0x2

pub const IPPROTO_IGP = 0x55

pub const IPPROTO_IGRP = 0x58

pub const IPPROTO_IL = 0x28

pub const IPPROTO_INLSP = 0x34

pub const IPPROTO_INP = 0x20

pub const IPPROTO_IP = 0x0

pub const IPPROTO_IPCOMP = 0x6c

pub const IPPROTO_IPCV = 0x47

pub const IPPROTO_IPEIP = 0x5e

pub const IPPROTO_IPIP = 0x4

pub const IPPROTO_IPPC = 0x43

pub const IPPROTO_IPV4 = 0x4

pub const IPPROTO_IPV6 = 0x29

pub const IPPROTO_IRTP = 0x1c

pub const IPPROTO_KRYPTOLAN = 0x41

pub const IPPROTO_LARP = 0x5b

pub const IPPROTO_LEAF1 = 0x19

pub const IPPROTO_LEAF2 = 0x1a

pub const IPPROTO_MAX = 0x100

pub const IPPROTO_MAXID = 0x34

pub const IPPROTO_MEAS = 0x13

pub const IPPROTO_MHRP = 0x30

pub const IPPROTO_MICP = 0x5f

pub const IPPROTO_MTP = 0x5c

pub const IPPROTO_MUX = 0x12

pub const IPPROTO_ND = 0x4d

pub const IPPROTO_NHRP = 0x36

pub const IPPROTO_NONE = 0x3b

pub const IPPROTO_NSP = 0x1f

pub const IPPROTO_NVPII = 0xb

pub const IPPROTO_OSPFIGP = 0x59

pub const IPPROTO_PGM = 0x71

pub const IPPROTO_PIGP = 0x9

pub const IPPROTO_PIM = 0x67

pub const IPPROTO_PRM = 0x15

pub const IPPROTO_PUP = 0xc

pub const IPPROTO_PVP = 0x4b

pub const IPPROTO_RAW = 0xff

pub const IPPROTO_RCCMON = 0xa

pub const IPPROTO_RDP = 0x1b

pub const IPPROTO_ROUTING = 0x2b

pub const IPPROTO_RSVP = 0x2e

pub const IPPROTO_RVD = 0x42

pub const IPPROTO_SATEXPAK = 0x40

pub const IPPROTO_SATMON = 0x45

pub const IPPROTO_SCCSP = 0x60

pub const IPPROTO_SCTP = 0x84

pub const IPPROTO_SDRP = 0x2a

pub const IPPROTO_SEP = 0x21

pub const IPPROTO_SRPC = 0x5a

pub const IPPROTO_ST = 0x7

pub const IPPROTO_SVMTP = 0x52

pub const IPPROTO_SWIPE = 0x35

pub const IPPROTO_TCF = 0x57

pub const IPPROTO_TCP = 0x6

pub const IPPROTO_TP = 0x1d

pub const IPPROTO_TPXX = 0x27

pub const IPPROTO_TRUNK1 = 0x17

pub const IPPROTO_TRUNK2 = 0x18

pub const IPPROTO_TTP = 0x54

pub const IPPROTO_UDP = 0x11

pub const IPPROTO_VINES = 0x53

pub const IPPROTO_VISA = 0x46

pub const IPPROTO_VMTP = 0x51

pub const IPPROTO_WBEXPAK = 0x4f

pub const IPPROTO_WBMON = 0x4e

pub const IPPROTO_WSN = 0x4a

pub const IPPROTO_XNET = 0xf

pub const IPPROTO_XTP = 0x24

pub const IPV6_2292DSTOPTS = 0x17

pub const IPV6_2292HOPLIMIT = 0x14

pub const IPV6_2292HOPOPTS = 0x16

pub const IPV6_2292NEXTHOP = 0x15

pub const IPV6_2292PKTINFO = 0x13

pub const IPV6_2292PKTOPTIONS = 0x19

pub const IPV6_2292RTHDR = 0x18

pub const IPV6_BINDV6ONLY = 0x1b

pub const IPV6_BOUND_IF = 0x7d

pub const IPV6_CHECKSUM = 0x1a

pub const IPV6_DEFAULT_MULTICAST_HOPS = 0x1

pub const IPV6_DEFAULT_MULTICAST_LOOP = 0x1

pub const IPV6_DEFHLIM = 0x40

pub const IPV6_FAITH = 0x1d

pub const IPV6_FLOWINFO_MASK = 0xffffff0f

pub const IPV6_FLOWLABEL_MASK = 0xffff0f00

pub const IPV6_FRAGTTL = 0x78

pub const IPV6_FW_ADD = 0x1e

pub const IPV6_FW_DEL = 0x1f

pub const IPV6_FW_FLUSH = 0x20

pub const IPV6_FW_GET = 0x22

pub const IPV6_FW_ZERO = 0x21

pub const IPV6_HLIMDEC = 0x1

pub const IPV6_IPSEC_POLICY = 0x1c

pub const IPV6_JOIN_GROUP = 0xc

pub const IPV6_LEAVE_GROUP = 0xd

pub const IPV6_MAXHLIM = 0xff

pub const IPV6_MAXOPTHDR = 0x800

pub const IPV6_MAXPACKET = 0xffff

pub const IPV6_MAX_GROUP_SRC_FILTER = 0x200

pub const IPV6_MAX_MEMBERSHIPS = 0xfff

pub const IPV6_MAX_SOCK_SRC_FILTER = 0x80

pub const IPV6_MIN_MEMBERSHIPS = 0x1f

pub const IPV6_MMTU = 0x500

pub const IPV6_MULTICAST_HOPS = 0xa

pub const IPV6_MULTICAST_IF = 0x9

pub const IPV6_MULTICAST_LOOP = 0xb

pub const IPV6_PORTRANGE = 0xe

pub const IPV6_PORTRANGE_DEFAULT = 0x0

pub const IPV6_PORTRANGE_HIGH = 0x1

pub const IPV6_PORTRANGE_LOW = 0x2

pub const IPV6_RECVTCLASS = 0x23

pub const IPV6_RTHDR_LOOSE = 0x0

pub const IPV6_RTHDR_STRICT = 0x1

pub const IPV6_RTHDR_TYPE_0 = 0x0

pub const IPV6_SOCKOPT_RESERVED1 = 0x3

pub const IPV6_TCLASS = 0x24

pub const IPV6_UNICAST_HOPS = 0x4

pub const IPV6_V6ONLY = 0x1b

pub const IPV6_VERSION = 0x60

pub const IPV6_VERSION_MASK = 0xf0

pub const IP_ADD_MEMBERSHIP = 0xc

pub const IP_ADD_SOURCE_MEMBERSHIP = 0x46

pub const IP_BLOCK_SOURCE = 0x48

pub const IP_BOUND_IF = 0x19

pub const IP_DEFAULT_MULTICAST_LOOP = 0x1

pub const IP_DEFAULT_MULTICAST_TTL = 0x1

pub const IP_DF = 0x4000

pub const IP_DROP_MEMBERSHIP = 0xd

pub const IP_DROP_SOURCE_MEMBERSHIP = 0x47

pub const IP_DUMMYNET_CONFIGURE = 0x3c

pub const IP_DUMMYNET_DEL = 0x3d

pub const IP_DUMMYNET_FLUSH = 0x3e

pub const IP_DUMMYNET_GET = 0x40

pub const IP_FAITH = 0x16

pub const IP_FW_ADD = 0x28

pub const IP_FW_DEL = 0x29

pub const IP_FW_FLUSH = 0x2a

pub const IP_FW_GET = 0x2c

pub const IP_FW_RESETLOG = 0x2d

pub const IP_FW_ZERO = 0x2b

pub const IP_HDRINCL = 0x2

pub const IP_IPSEC_POLICY = 0x15

pub const IP_MAXPACKET = 0xffff

pub const IP_MAX_GROUP_SRC_FILTER = 0x200

pub const IP_MAX_MEMBERSHIPS = 0xfff

pub const IP_MAX_SOCK_MUTE_FILTER = 0x80

pub const IP_MAX_SOCK_SRC_FILTER = 0x80

pub const IP_MF = 0x2000

pub const IP_MIN_MEMBERSHIPS = 0x1f

pub const IP_MSFILTER = 0x4a

pub const IP_MSS = 0x240

pub const IP_MULTICAST_IF = 0x9

pub const IP_MULTICAST_IFINDEX = 0x42

pub const IP_MULTICAST_LOOP = 0xb

pub const IP_MULTICAST_TTL = 0xa

pub const IP_MULTICAST_VIF = 0xe

pub const IP_NAT__XXX = 0x37

pub const IP_OFFMASK = 0x1fff

pub const IP_OLD_FW_ADD = 0x32

pub const IP_OLD_FW_DEL = 0x33

pub const IP_OLD_FW_FLUSH = 0x34

pub const IP_OLD_FW_GET = 0x36

pub const IP_OLD_FW_RESETLOG = 0x38

pub const IP_OLD_FW_ZERO = 0x35

pub const IP_OPTIONS = 0x1

pub const IP_PKTINFO = 0x1a

pub const IP_PORTRANGE = 0x13

pub const IP_PORTRANGE_DEFAULT = 0x0

pub const IP_PORTRANGE_HIGH = 0x1

pub const IP_PORTRANGE_LOW = 0x2

pub const IP_RECVDSTADDR = 0x7

pub const IP_RECVIF = 0x14

pub const IP_RECVOPTS = 0x5

pub const IP_RECVPKTINFO = 0x1a

pub const IP_RECVRETOPTS = 0x6

pub const IP_RECVTTL = 0x18

pub const IP_RETOPTS = 0x8

pub const IP_RF = 0x8000

pub const IP_RSVP_OFF = 0x10

pub const IP_RSVP_ON = 0xf

pub const IP_RSVP_VIF_OFF = 0x12

pub const IP_RSVP_VIF_ON = 0x11

pub const IP_STRIPHDR = 0x17

pub const IP_TOS = 0x3

pub const IP_TRAFFIC_MGT_BACKGROUND = 0x41

pub const IP_TTL = 0x4

pub const IP_UNBLOCK_SOURCE = 0x49

pub const ISIG = 0x80

pub const ISTRIP = 0x20

pub const IUTF8 = 0x4000

pub const IXANY = 0x800

pub const IXOFF = 0x400

pub const IXON = 0x200

pub const ImplementsGetwd = true

pub const LOCK_EX = 0x2

pub const LOCK_NB = 0x4

pub const LOCK_SH = 0x1

pub const LOCK_UN = 0x8

pub const MADV_CAN_REUSE = 0x9

pub const MADV_DONTNEED = 0x4

pub const MADV_FREE = 0x5

pub const MADV_FREE_REUSABLE = 0x7

pub const MADV_FREE_REUSE = 0x8

pub const MADV_NORMAL = 0x0

pub const MADV_RANDOM = 0x1

pub const MADV_SEQUENTIAL = 0x2

pub const MADV_WILLNEED = 0x3

pub const MADV_ZERO_WIRED_PAGES = 0x6

pub const MAP_ANON = 0x1000

pub const MAP_COPY = 0x2

pub const MAP_FILE = 0x0

pub const MAP_FIXED = 0x10

pub const MAP_HASSEMAPHORE = 0x200

pub const MAP_JIT = 0x800

pub const MAP_NOCACHE = 0x400

pub const MAP_NOEXTEND = 0x100

pub const MAP_NORESERVE = 0x40

pub const MAP_PRIVATE = 0x2

pub const MAP_RENAME = 0x20

pub const MAP_RESERVED0080 = 0x80

pub const MAP_SHARED = 0x1

pub const MCL_CURRENT = 0x1

pub const MCL_FUTURE = 0x2

pub const MSG_CTRUNC = 0x20

pub const MSG_DONTROUTE = 0x4

pub const MSG_DONTWAIT = 0x80

pub const MSG_EOF = 0x100

pub const MSG_EOR = 0x8

pub const MSG_FLUSH = 0x400

pub const MSG_HAVEMORE = 0x2000

pub const MSG_HOLD = 0x800

pub const MSG_NEEDSA = 0x10000

pub const MSG_OOB = 0x1

pub const MSG_PEEK = 0x2

pub const MSG_RCVMORE = 0x4000

pub const MSG_SEND = 0x1000

pub const MSG_TRUNC = 0x10

pub const MSG_WAITALL = 0x40

pub const MSG_WAITSTREAM = 0x200

pub const MS_ASYNC = 0x1

pub const MS_DEACTIVATE = 0x8

pub const MS_INVALIDATE = 0x2

pub const MS_KILLPAGES = 0x4

pub const MS_SYNC = 0x10

pub const NAME_MAX = 0xff

pub const NET_RT_DUMP = 0x1

pub const NET_RT_DUMP2 = 0x7

pub const NET_RT_FLAGS = 0x2

pub const NET_RT_IFLIST = 0x3

pub const NET_RT_IFLIST2 = 0x6

pub const NET_RT_MAXID = 0xa

pub const NET_RT_STAT = 0x4

pub const NET_RT_TRASH = 0x5

pub const NOFLSH = 0x80000000

pub const NOTE_ABSOLUTE = 0x8

pub const NOTE_ATTRIB = 0x8

pub const NOTE_CHILD = 0x4

pub const NOTE_DELETE = 0x1

pub const NOTE_EXEC = 0x20000000

pub const NOTE_EXIT = 0x80000000

pub const NOTE_EXITSTATUS = 0x4000000

pub const NOTE_EXTEND = 0x4

pub const NOTE_FFAND = 0x40000000

pub const NOTE_FFCOPY = 0xc0000000

pub const NOTE_FFCTRLMASK = 0xc0000000

pub const NOTE_FFLAGSMASK = 0xffffff

pub const NOTE_FFNOP = 0x0

pub const NOTE_FFOR = 0x80000000

pub const NOTE_FORK = 0x40000000

pub const NOTE_LINK = 0x10

pub const NOTE_LOWAT = 0x1

pub const NOTE_NONE = 0x80

pub const NOTE_NSECONDS = 0x4

pub const NOTE_PCTRLMASK = -0x100000

pub const NOTE_PDATAMASK = 0xfffff

pub const NOTE_REAP = 0x10000000

pub const NOTE_RENAME = 0x20

pub const NOTE_RESOURCEEND = 0x2000000

pub const NOTE_REVOKE = 0x40

pub const NOTE_SECONDS = 0x1

pub const NOTE_SIGNAL = 0x8000000

pub const NOTE_TRACK = 0x1

pub const NOTE_TRACKERR = 0x2

pub const NOTE_TRIGGER = 0x1000000

pub const NOTE_USECONDS = 0x2

pub const NOTE_VM_ERROR = 0x10000000

pub const NOTE_VM_PRESSURE = 0x80000000

pub const NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000

pub const NOTE_VM_PRESSURE_TERMINATE = 0x40000000

pub const NOTE_WRITE = 0x2

pub const OCRNL = 0x10

pub const OFDEL = 0x20000

pub const OFILL = 0x80

pub const ONLCR = 0x2

pub const ONLRET = 0x40

pub const ONOCR = 0x20

pub const ONOEOT = 0x8

pub const OPOST = 0x1

pub const O_ACCMODE = 0x3

pub const O_ALERT = 0x20000000

pub const O_APPEND = 0x8

pub const O_ASYNC = 0x40

pub const O_CLOEXEC = 0x1000000

pub const O_CREAT = 0x200

pub const O_DIRECTORY = 0x100000

pub const O_DSYNC = 0x400000

pub const O_EVTONLY = 0x8000

pub const O_EXCL = 0x800

pub const O_EXLOCK = 0x20

pub const O_FSYNC = 0x80

pub const O_NDELAY = 0x4

pub const O_NOCTTY = 0x20000

pub const O_NOFOLLOW = 0x100

pub const O_NONBLOCK = 0x4

pub const O_POPUP = 0x80000000

pub const O_RDONLY = 0x0

pub const O_RDWR = 0x2

pub const O_SHLOCK = 0x10

pub const O_SYMLINK = 0x200000

pub const O_SYNC = 0x80

pub const O_TRUNC = 0x400

pub const O_WRONLY = 0x1

pub const PARENB = 0x1000

pub const PARMRK = 0x8

pub const PARODD = 0x2000

pub const PENDIN = 0x20000000

pub const PRIO_PGRP = 0x1

pub const PRIO_PROCESS = 0x0

pub const PRIO_USER = 0x2

pub const PROT_EXEC = 0x4

pub const PROT_NONE = 0x0

pub const PROT_READ = 0x1

pub const PROT_WRITE = 0x2

pub const PTRACE_CONT = 0x7

pub const PTRACE_KILL = 0x8

pub const PTRACE_TRACEME = 0x0

pub const PT_ATTACH = 0xa

pub const PT_ATTACHEXC = 0xe

pub const PT_CONTINUE = 0x7

pub const PT_DENY_ATTACH = 0x1f

pub const PT_DETACH = 0xb

pub const PT_FIRSTMACH = 0x20

pub const PT_FORCEQUOTA = 0x1e

pub const PT_KILL = 0x8

pub const PT_READ_D = 0x2

pub const PT_READ_I = 0x1

pub const PT_READ_U = 0x3

pub const PT_SIGEXC = 0xc

pub const PT_STEP = 0x9

pub const PT_THUPDATE = 0xd

pub const PT_TRACE_ME = 0x0

pub const PT_WRITE_D = 0x5

pub const PT_WRITE_I = 0x4

pub const PT_WRITE_U = 0x6

pub const RLIMIT_AS = 0x5

pub const RLIMIT_CORE = 0x4

pub const RLIMIT_CPU = 0x0

pub const RLIMIT_DATA = 0x2

pub const RLIMIT_FSIZE = 0x1

pub const RLIMIT_NOFILE = 0x8

pub const RLIMIT_STACK = 0x3

pub const RLIM_INFINITY = 0x7fffffffffffffff

pub const RTAX_AUTHOR = 0x6

pub const RTAX_BRD = 0x7

pub const RTAX_DST = 0x0

pub const RTAX_GATEWAY = 0x1

pub const RTAX_GENMASK = 0x3

pub const RTAX_IFA = 0x5

pub const RTAX_IFP = 0x4

pub const RTAX_MAX = 0x8

pub const RTAX_NETMASK = 0x2

pub const RTA_AUTHOR = 0x40

pub const RTA_BRD = 0x80

pub const RTA_DST = 0x1

pub const RTA_GATEWAY = 0x2

pub const RTA_GENMASK = 0x8

pub const RTA_IFA = 0x20

pub const RTA_IFP = 0x10

pub const RTA_NETMASK = 0x4

pub const RTF_BLACKHOLE = 0x1000

pub const RTF_BROADCAST = 0x400000

pub const RTF_CLONING = 0x100

pub const RTF_CONDEMNED = 0x2000000

pub const RTF_DELCLONE = 0x80

pub const RTF_DONE = 0x40

pub const RTF_DYNAMIC = 0x10

pub const RTF_GATEWAY = 0x2

pub const RTF_HOST = 0x4

pub const RTF_IFREF = 0x4000000

pub const RTF_IFSCOPE = 0x1000000

pub const RTF_LLINFO = 0x400

pub const RTF_LOCAL = 0x200000

pub const RTF_MODIFIED = 0x20

pub const RTF_MULTICAST = 0x800000

pub const RTF_PINNED = 0x100000

pub const RTF_PRCLONING = 0x10000

pub const RTF_PROTO1 = 0x8000

pub const RTF_PROTO2 = 0x4000

pub const RTF_PROTO3 = 0x40000

pub const RTF_REJECT = 0x8

pub const RTF_STATIC = 0x800

pub const RTF_UP = 0x1

pub const RTF_WASCLONED = 0x20000

pub const RTF_XRESOLVE = 0x200

pub const RTM_ADD = 0x1

pub const RTM_CHANGE = 0x3

pub const RTM_DELADDR = 0xd

pub const RTM_DELETE = 0x2

pub const RTM_DELMADDR = 0x10

pub const RTM_GET = 0x4

pub const RTM_GET2 = 0x14

pub const RTM_IFINFO = 0xe

pub const RTM_IFINFO2 = 0x12

pub const RTM_LOCK = 0x8

pub const RTM_LOSING = 0x5

pub const RTM_MISS = 0x7

pub const RTM_NEWADDR = 0xc

pub const RTM_NEWMADDR = 0xf

pub const RTM_NEWMADDR2 = 0x13

pub const RTM_OLDADD = 0x9

pub const RTM_OLDDEL = 0xa

pub const RTM_REDIRECT = 0x6

pub const RTM_RESOLVE = 0xb

pub const RTM_RTTUNIT = 0xf4240

pub const RTM_VERSION = 0x5

pub const RTV_EXPIRE = 0x4

pub const RTV_HOPCOUNT = 0x2

pub const RTV_MTU = 0x1

pub const RTV_RPIPE = 0x8

pub const RTV_RTT = 0x40

pub const RTV_RTTVAR = 0x80

pub const RTV_SPIPE = 0x10

pub const RTV_SSTHRESH = 0x20

pub const RUSAGE_CHILDREN = -0x1

pub const RUSAGE_SELF = 0x0

pub const SCM_CREDS = 0x3

pub const SCM_RIGHTS = 0x1

pub const SCM_TIMESTAMP = 0x2

pub const SCM_TIMESTAMP_MONOTONIC = 0x4

pub const SHUT_RD = 0x0

pub const SHUT_RDWR = 0x2

pub const SHUT_WR = 0x1

pub const SIOCADDMULTI = 0x80206931

pub const SIOCAIFADDR = 0x8040691a

pub const SIOCALIFADDR = 0x8118691d

pub const SIOCARPIPLL = 0xc0206928

pub const SIOCATMARK = 0x40047307

pub const SIOCAUTOADDR = 0xc0206926

pub const SIOCAUTONETMASK = 0x80206927

pub const SIOCDELMULTI = 0x80206932

pub const SIOCDIFADDR = 0x80206919

pub const SIOCDIFPHYADDR = 0x80206941

pub const SIOCDLIFADDR = 0x8118691f

pub const SIOCGDRVSPEC = 0xc028697b

pub const SIOCGETSGCNT = 0xc014721c

pub const SIOCGETVIFCNT = 0xc014721b

pub const SIOCGETVLAN = 0xc020697f

pub const SIOCGHIWAT = 0x40047301

pub const SIOCGIFADDR = 0xc0206921

pub const SIOCGIFALTMTU = 0xc0206948

pub const SIOCGIFASYNCMAP = 0xc020697c

pub const SIOCGIFBOND = 0xc0206947

pub const SIOCGIFBRDADDR = 0xc0206923

pub const SIOCGIFCAP = 0xc020695b

pub const SIOCGIFCONF = 0xc00c6924

pub const SIOCGIFDEVMTU = 0xc0206944

pub const SIOCGIFDSTADDR = 0xc0206922

pub const SIOCGIFFLAGS = 0xc0206911

pub const SIOCGIFGENERIC = 0xc020693a

pub const SIOCGIFKPI = 0xc0206987

pub const SIOCGIFMAC = 0xc0206982

pub const SIOCGIFMEDIA = 0xc02c6938

pub const SIOCGIFMETRIC = 0xc0206917

pub const SIOCGIFMTU = 0xc0206933

pub const SIOCGIFNETMASK = 0xc0206925

pub const SIOCGIFPDSTADDR = 0xc0206940

pub const SIOCGIFPHYS = 0xc0206935

pub const SIOCGIFPSRCADDR = 0xc020693f

pub const SIOCGIFSTATUS = 0xc331693d

pub const SIOCGIFVLAN = 0xc020697f

pub const SIOCGIFWAKEFLAGS = 0xc0206988

pub const SIOCGLIFADDR = 0xc118691e

pub const SIOCGLIFPHYADDR = 0xc1186943

pub const SIOCGLOWAT = 0x40047303

pub const SIOCGPGRP = 0x40047309

pub const SIOCIFCREATE = 0xc0206978

pub const SIOCIFCREATE2 = 0xc020697a

pub const SIOCIFDESTROY = 0x80206979

pub const SIOCRSLVMULTI = 0xc010693b

pub const SIOCSDRVSPEC = 0x8028697b

pub const SIOCSETVLAN = 0x8020697e

pub const SIOCSHIWAT = 0x80047300

pub const SIOCSIFADDR = 0x8020690c

pub const SIOCSIFALTMTU = 0x80206945

pub const SIOCSIFASYNCMAP = 0x8020697d

pub const SIOCSIFBOND = 0x80206946

pub const SIOCSIFBRDADDR = 0x80206913

pub const SIOCSIFCAP = 0x8020695a

pub const SIOCSIFDSTADDR = 0x8020690e

pub const SIOCSIFFLAGS = 0x80206910

pub const SIOCSIFGENERIC = 0x80206939

pub const SIOCSIFKPI = 0x80206986

pub const SIOCSIFLLADDR = 0x8020693c

pub const SIOCSIFMAC = 0x80206983

pub const SIOCSIFMEDIA = 0xc0206937

pub const SIOCSIFMETRIC = 0x80206918

pub const SIOCSIFMTU = 0x80206934

pub const SIOCSIFNETMASK = 0x80206916

pub const SIOCSIFPHYADDR = 0x8040693e

pub const SIOCSIFPHYS = 0x80206936

pub const SIOCSIFVLAN = 0x8020697e

pub const SIOCSLIFPHYADDR = 0x81186942

pub const SIOCSLOWAT = 0x80047302

pub const SIOCSPGRP = 0x80047308

pub const SOCK_DGRAM = 0x2

pub const SOCK_MAXADDRLEN = 0xff

pub const SOCK_RAW = 0x3

pub const SOCK_RDM = 0x4

pub const SOCK_SEQPACKET = 0x5

pub const SOCK_STREAM = 0x1

pub const SOL_SOCKET = 0xffff

pub const SOMAXCONN = 0x80

pub const SO_ACCEPTCONN = 0x2

pub const SO_BROADCAST = 0x20

pub const SO_DEBUG = 0x1

pub const SO_DONTROUTE = 0x10

pub const SO_DONTTRUNC = 0x2000

pub const SO_ERROR = 0x1007

pub const SO_KEEPALIVE = 0x8

pub const SO_LABEL = 0x1010

pub const SO_LINGER = 0x80

pub const SO_LINGER_SEC = 0x1080

pub const SO_NKE = 0x1021

pub const SO_NOADDRERR = 0x1023

pub const SO_NOSIGPIPE = 0x1022

pub const SO_NOTIFYCONFLICT = 0x1026

pub const SO_NP_EXTENSIONS = 0x1083

pub const SO_NREAD = 0x1020

pub const SO_NWRITE = 0x1024

pub const SO_OOBINLINE = 0x100

pub const SO_PEERLABEL = 0x1011

pub const SO_RANDOMPORT = 0x1082

pub const SO_RCVBUF = 0x1002

pub const SO_RCVLOWAT = 0x1004

pub const SO_RCVTIMEO = 0x1006

pub const SO_RESTRICTIONS = 0x1081

pub const SO_RESTRICT_DENYIN = 0x1

pub const SO_RESTRICT_DENYOUT = 0x2

pub const SO_RESTRICT_DENYSET = 0x80000000

pub const SO_REUSEADDR = 0x4

pub const SO_REUSEPORT = 0x200

pub const SO_REUSESHAREUID = 0x1025

pub const SO_SNDBUF = 0x1001

pub const SO_SNDLOWAT = 0x1003

pub const SO_SNDTIMEO = 0x1005

pub const SO_TIMESTAMP = 0x400

pub const SO_TIMESTAMP_MONOTONIC = 0x800

pub const SO_TYPE = 0x1008

pub const SO_UPCALLCLOSEWAIT = 0x1027

pub const SO_USELOOPBACK = 0x40

pub const SO_WANTMORE = 0x4000

pub const SO_WANTOOBFLAG = 0x8000

pub const SYS_ACCEPT = 30

pub const SYS_ACCEPT_NOCANCEL = 404

pub const SYS_ACCESS = 33

pub const SYS_ACCESS_EXTENDED = 284

pub const SYS_ACCT = 51

pub const SYS_ADD_PROFIL = 176

pub const SYS_ADJTIME = 140

pub const SYS_AIO_CANCEL = 316

pub const SYS_AIO_ERROR = 317

pub const SYS_AIO_FSYNC = 313

pub const SYS_AIO_READ = 318

pub const SYS_AIO_RETURN = 314

pub const SYS_AIO_SUSPEND = 315

pub const SYS_AIO_SUSPEND_NOCANCEL = 421

pub const SYS_AIO_WRITE = 319

pub const SYS_ATGETMSG = 207

pub const SYS_ATPGETREQ = 211

pub const SYS_ATPGETRSP = 212

pub const SYS_ATPSNDREQ = 209

pub const SYS_ATPSNDRSP = 210

pub const SYS_ATPUTMSG = 208

pub const SYS_ATSOCKET = 206

pub const SYS_AUDIT = 350

pub const SYS_AUDITCTL = 359

pub const SYS_AUDITON = 351

pub const SYS_AUDIT_SESSION_JOIN = 429

pub const SYS_AUDIT_SESSION_PORT = 432

pub const SYS_AUDIT_SESSION_SELF = 428

pub const SYS_BIND = 104

pub const SYS_BSDTHREAD_CREATE = 360

pub const SYS_BSDTHREAD_REGISTER = 366

pub const SYS_BSDTHREAD_TERMINATE = 361

pub const SYS_CHDIR = 12

pub const SYS_CHFLAGS = 34

pub const SYS_CHMOD = 15

pub const SYS_CHMOD_EXTENDED = 282

pub const SYS_CHOWN = 16

pub const SYS_CHROOT = 61

pub const SYS_CHUD = 185

pub const SYS_CLOSE = 6

pub const SYS_CLOSE_NOCANCEL = 399

pub const SYS_CONNECT = 98

pub const SYS_CONNECT_NOCANCEL = 409

pub const SYS_COPYFILE = 227

pub const SYS_CSOPS = 169

pub const SYS_DELETE = 226

pub const SYS_DUP = 41

pub const SYS_DUP2 = 90

pub const SYS_EXCHANGEDATA = 223

pub const SYS_EXECVE = 59

pub const SYS_EXIT = 1

pub const SYS_FCHDIR = 13

pub const SYS_FCHFLAGS = 35

pub const SYS_FCHMOD = 124

pub const SYS_FCHMOD_EXTENDED = 283

pub const SYS_FCHOWN = 123

pub const SYS_FCNTL = 92

pub const SYS_FCNTL_NOCANCEL = 406

pub const SYS_FDATASYNC = 187

pub const SYS_FFSCTL = 245

pub const SYS_FGETATTRLIST = 228

pub const SYS_FGETXATTR = 235

pub const SYS_FHOPEN = 248

pub const SYS_FILEPORT_MAKEFD = 431

pub const SYS_FILEPORT_MAKEPORT = 430

pub const SYS_FLISTXATTR = 241

pub const SYS_FLOCK = 131

pub const SYS_FORK = 2

pub const SYS_FPATHCONF = 192

pub const SYS_FREMOVEXATTR = 239

pub const SYS_FSCTL = 242

pub const SYS_FSETATTRLIST = 229

pub const SYS_FSETXATTR = 237

pub const SYS_FSGETPATH = 427

pub const SYS_FSTAT = 189

pub const SYS_FSTAT64 = 339

pub const SYS_FSTAT64_EXTENDED = 343

pub const SYS_FSTATFS = 158

pub const SYS_FSTATFS64 = 346

pub const SYS_FSTATV = 219

pub const SYS_FSTAT_EXTENDED = 281

pub const SYS_FSYNC = 95

pub const SYS_FSYNC_NOCANCEL = 408

pub const SYS_FTRUNCATE = 201

pub const SYS_FUTIMES = 139

pub const SYS_GETATTRLIST = 220

pub const SYS_GETAUDIT = 355

pub const SYS_GETAUDIT_ADDR = 357

pub const SYS_GETAUID = 353

pub const SYS_GETDIRENTRIES = 196

pub const SYS_GETDIRENTRIES64 = 344

pub const SYS_GETDIRENTRIESATTR = 222

pub const SYS_GETDTABLESIZE = 89

pub const SYS_GETEGID = 43

pub const SYS_GETEUID = 25

pub const SYS_GETFH = 161

pub const SYS_GETFSSTAT = 18

pub const SYS_GETFSSTAT64 = 347

pub const SYS_GETGID = 47

pub const SYS_GETGROUPS = 79

pub const SYS_GETHOSTUUID = 142

pub const SYS_GETITIMER = 86

pub const SYS_GETLCID = 395

pub const SYS_GETLOGIN = 49

pub const SYS_GETPEERNAME = 31

pub const SYS_GETPGID = 151

pub const SYS_GETPGRP = 81

pub const SYS_GETPID = 20

pub const SYS_GETPPID = 39

pub const SYS_GETPRIORITY = 100

pub const SYS_GETRLIMIT = 194

pub const SYS_GETRUSAGE = 117

pub const SYS_GETSGROUPS = 288

pub const SYS_GETSID = 310

pub const SYS_GETSOCKNAME = 32

pub const SYS_GETSOCKOPT = 118

pub const SYS_GETTID = 286

pub const SYS_GETTIMEOFDAY = 116

pub const SYS_GETUID = 24

pub const SYS_GETWGROUPS = 290

pub const SYS_GETXATTR = 234

pub const SYS_IDENTITYSVC = 293

pub const SYS_INITGROUPS = 243

pub const SYS_IOCTL = 54

pub const SYS_IOPOLICYSYS = 322

pub const SYS_ISSETUGID = 327

pub const SYS_KDEBUG_TRACE = 180

pub const SYS_KEVENT = 363

pub const SYS_KEVENT64 = 369

pub const SYS_KILL = 37

pub const SYS_KQUEUE = 362

pub const SYS_LCHOWN = 364

pub const SYS_LINK = 9

pub const SYS_LIO_LISTIO = 320

pub const SYS_LISTEN = 106

pub const SYS_LISTXATTR = 240

pub const SYS_LSEEK = 199

pub const SYS_LSTAT = 190

pub const SYS_LSTAT64 = 340

pub const SYS_LSTAT64_EXTENDED = 342

pub const SYS_LSTATV = 218

pub const SYS_LSTAT_EXTENDED = 280

pub const SYS_MADVISE = 75

pub const SYS_MAXSYSCALL = 439

pub const SYS_MINCORE = 78

pub const SYS_MINHERIT = 250

pub const SYS_MKCOMPLEX = 216

pub const SYS_MKDIR = 136

pub const SYS_MKDIR_EXTENDED = 292

pub const SYS_MKFIFO = 132

pub const SYS_MKFIFO_EXTENDED = 291

pub const SYS_MKNOD = 14

pub const SYS_MLOCK = 203

pub const SYS_MLOCKALL = 324

pub const SYS_MMAP = 197

pub const SYS_MODWATCH = 233

pub const SYS_MOUNT = 167

pub const SYS_MPROTECT = 74

pub const SYS_MSGCTL = 258

pub const SYS_MSGGET = 259

pub const SYS_MSGRCV = 261

pub const SYS_MSGRCV_NOCANCEL = 419

pub const SYS_MSGSND = 260

pub const SYS_MSGSND_NOCANCEL = 418

pub const SYS_MSGSYS = 252

pub const SYS_MSYNC = 65

pub const SYS_MSYNC_NOCANCEL = 405

pub const SYS_MUNLOCK = 204

pub const SYS_MUNLOCKALL = 325

pub const SYS_MUNMAP = 73

pub const SYS_NFSCLNT = 247

pub const SYS_NFSSVC = 155

pub const SYS_OPEN = 5

pub const SYS_OPEN_EXTENDED = 277

pub const SYS_OPEN_NOCANCEL = 398

pub const SYS_PATHCONF = 191

pub const SYS_PID_HIBERNATE = 435

pub const SYS_PID_RESUME = 434

pub const SYS_PID_SHUTDOWN_SOCKETS = 436

pub const SYS_PID_SUSPEND = 433

pub const SYS_PIPE = 42

pub const SYS_POLL = 230

pub const SYS_POLL_NOCANCEL = 417

pub const SYS_POSIX_SPAWN = 244

pub const SYS_PREAD = 153

pub const SYS_PREAD_NOCANCEL = 414

pub const SYS_PROCESS_POLICY = 323

pub const SYS_PROC_INFO = 336

pub const SYS_PROFIL = 44

pub const SYS_PSYNCH_CVBROAD = 303

pub const SYS_PSYNCH_CVCLRPREPOST = 312

pub const SYS_PSYNCH_CVSIGNAL = 304

pub const SYS_PSYNCH_CVWAIT = 305

pub const SYS_PSYNCH_MUTEXDROP = 302

pub const SYS_PSYNCH_MUTEXWAIT = 301

pub const SYS_PSYNCH_RW_DOWNGRADE = 299

pub const SYS_PSYNCH_RW_LONGRDLOCK = 297

pub const SYS_PSYNCH_RW_RDLOCK = 306

pub const SYS_PSYNCH_RW_UNLOCK = 308

pub const SYS_PSYNCH_RW_UNLOCK2 = 309

pub const SYS_PSYNCH_RW_UPGRADE = 300

pub const SYS_PSYNCH_RW_WRLOCK = 307

pub const SYS_PSYNCH_RW_YIELDWRLOCK = 298

pub const SYS_PTRACE = 26

pub const SYS_PWRITE = 154

pub const SYS_PWRITE_NOCANCEL = 415

pub const SYS_QUOTACTL = 165

pub const SYS_READ = 3

pub const SYS_READLINK = 58

pub const SYS_READV = 120

pub const SYS_READV_NOCANCEL = 411

pub const SYS_READ_NOCANCEL = 396

pub const SYS_REBOOT = 55

pub const SYS_RECVFROM = 29

pub const SYS_RECVFROM_NOCANCEL = 403

pub const SYS_RECVMSG = 27

pub const SYS_RECVMSG_NOCANCEL = 401

pub const SYS_REMOVEXATTR = 238

pub const SYS_RENAME = 128

pub const SYS_REVOKE = 56

pub const SYS_RMDIR = 137

pub const SYS_SEARCHFS = 225

pub const SYS_SELECT = 93

pub const SYS_SELECT_NOCANCEL = 407

pub const SYS_SEMCTL = 254

pub const SYS_SEMGET = 255

pub const SYS_SEMOP = 256

pub const SYS_SEMSYS = 251

pub const SYS_SEM_CLOSE = 269

pub const SYS_SEM_DESTROY = 276

pub const SYS_SEM_GETVALUE = 274

pub const SYS_SEM_INIT = 275

pub const SYS_SEM_OPEN = 268

pub const SYS_SEM_POST = 273

pub const SYS_SEM_TRYWAIT = 272

pub const SYS_SEM_UNLINK = 270

pub const SYS_SEM_WAIT = 271

pub const SYS_SEM_WAIT_NOCANCEL = 420

pub const SYS_SENDFILE = 337

pub const SYS_SENDMSG = 28

pub const SYS_SENDMSG_NOCANCEL = 402

pub const SYS_SENDTO = 133

pub const SYS_SENDTO_NOCANCEL = 413

pub const SYS_SETATTRLIST = 221

pub const SYS_SETAUDIT = 356

pub const SYS_SETAUDIT_ADDR = 358

pub const SYS_SETAUID = 354

pub const SYS_SETEGID = 182

pub const SYS_SETEUID = 183

pub const SYS_SETGID = 181

pub const SYS_SETGROUPS = 80

pub const SYS_SETITIMER = 83

pub const SYS_SETLCID = 394

pub const SYS_SETLOGIN = 50

pub const SYS_SETPGID = 82

pub const SYS_SETPRIORITY = 96

pub const SYS_SETPRIVEXEC = 152

pub const SYS_SETREGID = 127

pub const SYS_SETREUID = 126

pub const SYS_SETRLIMIT = 195

pub const SYS_SETSGROUPS = 287

pub const SYS_SETSID = 147

pub const SYS_SETSOCKOPT = 105

pub const SYS_SETTID = 285

pub const SYS_SETTID_WITH_PID = 311

pub const SYS_SETTIMEOFDAY = 122

pub const SYS_SETUID = 23

pub const SYS_SETWGROUPS = 289

pub const SYS_SETXATTR = 236

pub const SYS_SHARED_REGION_CHECK_NP = 294

pub const SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438

pub const SYS_SHMAT = 262

pub const SYS_SHMCTL = 263

pub const SYS_SHMDT = 264

pub const SYS_SHMGET = 265

pub const SYS_SHMSYS = 253

pub const SYS_SHM_OPEN = 266

pub const SYS_SHM_UNLINK = 267

pub const SYS_SHUTDOWN = 134

pub const SYS_SIGACTION = 46

pub const SYS_SIGALTSTACK = 53

pub const SYS_SIGPENDING = 52

pub const SYS_SIGPROCMASK = 48

pub const SYS_SIGRETURN = 184

pub const SYS_SIGSUSPEND = 111

pub const SYS_SIGSUSPEND_NOCANCEL = 410

pub const SYS_SOCKET = 97

pub const SYS_SOCKETPAIR = 135

pub const SYS_STACK_SNAPSHOT = 365

pub const SYS_STAT = 188

pub const SYS_STAT64 = 338

pub const SYS_STAT64_EXTENDED = 341

pub const SYS_STATFS = 157

pub const SYS_STATFS64 = 345

pub const SYS_STATV = 217

pub const SYS_STAT_EXTENDED = 279

pub const SYS_SWAPON = 85

pub const SYS_SYMLINK = 57

pub const SYS_SYNC = 36

pub const SYS_SYSCALL = 0

pub const SYS_THREAD_SELFID = 372

pub const SYS_TRUNCATE = 200

pub const SYS_UMASK = 60

pub const SYS_UMASK_EXTENDED = 278

pub const SYS_UNDELETE = 205

pub const SYS_UNLINK = 10

pub const SYS_UNMOUNT = 159

pub const SYS_UTIMES = 138

pub const SYS_VFORK = 66

pub const SYS_VM_PRESSURE_MONITOR = 296

pub const SYS_WAIT4 = 7

pub const SYS_WAIT4_NOCANCEL = 400

pub const SYS_WAITEVENT = 232

pub const SYS_WAITID = 173

pub const SYS_WAITID_NOCANCEL = 416

pub const SYS_WATCHEVENT = 231

pub const SYS_WORKQ_KERNRETURN = 368

pub const SYS_WORKQ_OPEN = 367

pub const SYS_WRITE = 4

pub const SYS_WRITEV = 121

pub const SYS_WRITEV_NOCANCEL = 412

pub const SYS_WRITE_NOCANCEL = 397

pub const SYS___DISABLE_THREADSIGNAL = 331

pub const SYS___MAC_EXECVE = 380

pub const SYS___MAC_GETFSSTAT = 426

pub const SYS___MAC_GET_FD = 388

pub const SYS___MAC_GET_FILE = 382

pub const SYS___MAC_GET_LCID = 391

pub const SYS___MAC_GET_LCTX = 392

pub const SYS___MAC_GET_LINK = 384

pub const SYS___MAC_GET_MOUNT = 425

pub const SYS___MAC_GET_PID = 390

pub const SYS___MAC_GET_PROC = 386

pub const SYS___MAC_MOUNT = 424

pub const SYS___MAC_SET_FD = 389

pub const SYS___MAC_SET_FILE = 383

pub const SYS___MAC_SET_LCTX = 393

pub const SYS___MAC_SET_LINK = 385

pub const SYS___MAC_SET_PROC = 387

pub const SYS___MAC_SYSCALL = 381

pub const SYS___OLD_SEMWAIT_SIGNAL = 370

pub const SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371

pub const SYS___PTHREAD_CANCELED = 333

pub const SYS___PTHREAD_CHDIR = 348

pub const SYS___PTHREAD_FCHDIR = 349

pub const SYS___PTHREAD_KILL = 328

pub const SYS___PTHREAD_MARKCANCEL = 332

pub const SYS___PTHREAD_SIGMASK = 329

pub const SYS___SEMWAIT_SIGNAL = 334

pub const SYS___SEMWAIT_SIGNAL_NOCANCEL = 423

pub const SYS___SIGWAIT = 330

pub const SYS___SIGWAIT_NOCANCEL = 422

pub const SYS___SYSCTL = 202

pub const S_IEXEC = 0x40

pub const S_IFBLK = 0x6000

pub const S_IFCHR = 0x2000

pub const S_IFDIR = 0x4000

pub const S_IFIFO = 0x1000

pub const S_IFLNK = 0xa000

pub const S_IFMT = 0xf000

pub const S_IFREG = 0x8000

pub const S_IFSOCK = 0xc000

pub const S_IFWHT = 0xe000

pub const S_IREAD = 0x100

pub const S_IRGRP = 0x20

pub const S_IROTH = 0x4

pub const S_IRUSR = 0x100

pub const S_IRWXG = 0x38

pub const S_IRWXO = 0x7

pub const S_IRWXU = 0x1c0

pub const S_ISGID = 0x400

pub const S_ISTXT = 0x200

pub const S_ISUID = 0x800

pub const S_ISVTX = 0x200

pub const S_IWGRP = 0x10

pub const S_IWOTH = 0x2

pub const S_IWRITE = 0x80

pub const S_IWUSR = 0x80

pub const S_IXGRP = 0x8

pub const S_IXOTH = 0x1

pub const S_IXUSR = 0x40

pub const SizeofBpfHdr = 0x14

pub const SizeofBpfInsn = 0x8

pub const SizeofBpfProgram = 0x10

pub const SizeofBpfStat = 0x8

pub const SizeofBpfVersion = 0x4

pub const SizeofCmsghdr = 0xc

pub const SizeofICMPv6Filter = 0x20

pub const SizeofIPMreq = 0x8

pub const SizeofIPv6MTUInfo = 0x20

pub const SizeofIPv6Mreq = 0x14

pub const SizeofIfData = 0x60

pub const SizeofIfMsghdr = 0x70

pub const SizeofIfaMsghdr = 0x14

pub const SizeofIfmaMsghdr = 0x10

pub const SizeofIfmaMsghdr2 = 0x14

pub const SizeofInet4Pktinfo = 0xc

pub const SizeofInet6Pktinfo = 0x14

pub const SizeofLinger = 0x8

pub const SizeofMsghdr = 0x30

pub const SizeofRtMetrics = 0x38

pub const SizeofRtMsghdr = 0x5c

pub const SizeofSockaddrAny = 0x6c

pub const SizeofSockaddrDatalink = 0x14

pub const SizeofSockaddrInet4 = 0x10

pub const SizeofSockaddrInet6 = 0x1c

pub const SizeofSockaddrUnix = 0x6a

pub const TCIFLUSH = 0x1

pub const TCIOFLUSH = 0x3

pub const TCOFLUSH = 0x2

pub const TCP_CONNECTIONTIMEOUT = 0x20

pub const TCP_KEEPALIVE = 0x10

pub const TCP_MAXHLEN = 0x3c

pub const TCP_MAXOLEN = 0x28

pub const TCP_MAXSEG = 0x2

pub const TCP_MAXWIN = 0xffff

pub const TCP_MAX_SACK = 0x3

pub const TCP_MAX_WINSHIFT = 0xe

pub const TCP_MINMSS = 0xd8

pub const TCP_MINMSSOVERLOAD = 0x3e8

pub const TCP_MSS = 0x200

pub const TCP_NODELAY = 0x1

pub const TCP_NOOPT = 0x8

pub const TCP_NOPUSH = 0x4

pub const TCP_RXT_CONNDROPTIME = 0x80

pub const TCP_RXT_FINDROP = 0x100

pub const TCSAFLUSH = 0x2

pub const TIOCCBRK = 0x2000747a

pub const TIOCCDTR = 0x20007478

pub const TIOCCONS = 0x80047462

pub const TIOCDCDTIMESTAMP = 0x40107458

pub const TIOCDRAIN = 0x2000745e

pub const TIOCDSIMICROCODE = 0x20007455

pub const TIOCEXCL = 0x2000740d

pub const TIOCEXT = 0x80047460

pub const TIOCFLUSH = 0x80047410

pub const TIOCGDRAINWAIT = 0x40047456

pub const TIOCGETA = 0x40487413

pub const TIOCGETD = 0x4004741a

pub const TIOCGPGRP = 0x40047477

pub const TIOCGWINSZ = 0x40087468

pub const TIOCIXOFF = 0x20007480

pub const TIOCIXON = 0x20007481

pub const TIOCMBIC = 0x8004746b

pub const TIOCMBIS = 0x8004746c

pub const TIOCMGDTRWAIT = 0x4004745a

pub const TIOCMGET = 0x4004746a

pub const TIOCMODG = 0x40047403

pub const TIOCMODS = 0x80047404

pub const TIOCMSDTRWAIT = 0x8004745b

pub const TIOCMSET = 0x8004746d

pub const TIOCM_CAR = 0x40

pub const TIOCM_CD = 0x40

pub const TIOCM_CTS = 0x20

pub const TIOCM_DSR = 0x100

pub const TIOCM_DTR = 0x2

pub const TIOCM_LE = 0x1

pub const TIOCM_RI = 0x80

pub const TIOCM_RNG = 0x80

pub const TIOCM_RTS = 0x4

pub const TIOCM_SR = 0x10

pub const TIOCM_ST = 0x8

pub const TIOCNOTTY = 0x20007471

pub const TIOCNXCL = 0x2000740e

pub const TIOCOUTQ = 0x40047473

pub const TIOCPKT = 0x80047470

pub const TIOCPKT_DATA = 0x0

pub const TIOCPKT_DOSTOP = 0x20

pub const TIOCPKT_FLUSHREAD = 0x1

pub const TIOCPKT_FLUSHWRITE = 0x2

pub const TIOCPKT_IOCTL = 0x40

pub const TIOCPKT_NOSTOP = 0x10

pub const TIOCPKT_START = 0x8

pub const TIOCPKT_STOP = 0x4

pub const TIOCPTYGNAME = 0x40807453

pub const TIOCPTYGRANT = 0x20007454

pub const TIOCPTYUNLK = 0x20007452

pub const TIOCREMOTE = 0x80047469

pub const TIOCSBRK = 0x2000747b

pub const TIOCSCONS = 0x20007463

pub const TIOCSCTTY = 0x20007461

pub const TIOCSDRAINWAIT = 0x80047457

pub const TIOCSDTR = 0x20007479

pub const TIOCSETA = 0x80487414

pub const TIOCSETAF = 0x80487416

pub const TIOCSETAW = 0x80487415

pub const TIOCSETD = 0x8004741b

pub const TIOCSIG = 0x2000745f

pub const TIOCSPGRP = 0x80047476

pub const TIOCSTART = 0x2000746e

pub const TIOCSTAT = 0x20007465

pub const TIOCSTI = 0x80017472

pub const TIOCSTOP = 0x2000746f

pub const TIOCSWINSZ = 0x80087467

pub const TIOCTIMESTAMP = 0x40107459

pub const TIOCUCNTL = 0x80047466

pub const TOSTOP = 0x400000

pub const VDISCARD = 0xf

pub const VDSUSP = 0xb

pub const VEOF = 0x0

pub const VEOL = 0x1

pub const VEOL2 = 0x2

pub const VERASE = 0x3

pub const VINTR = 0x8

pub const VKILL = 0x5

pub const VLNEXT = 0xe

pub const VMIN = 0x10

pub const VQUIT = 0x9

pub const VREPRINT = 0x6

pub const VSTART = 0xc

pub const VSTATUS = 0x12

pub const VSTOP = 0xd

pub const VSUSP = 0xa

pub const VT0 = 0x0

pub const VT1 = 0x10000

pub const VTDLY = 0x10000

pub const VTIME = 0x11

pub const VWERASE = 0x4

pub const WCONTINUED = 0x10

pub const WCOREFLAG = 0x80

pub const WEXITED = 0x4

pub const WNOHANG = 0x1

pub const WNOWAIT = 0x20

pub const WORDSIZE = 0x40

pub const WSTOPPED = 0x8

pub const WUNTRACED = 0x2

/// ForkLock is used to synchronize creation of new file descriptors
/// with fork.
/// 
/// We want the child in a fork/exec sequence to inherit only the
/// file descriptors we intend. To do that, we mark all file
/// descriptors close-on-exec and then, in the child, explicitly
/// unmark the ones we want the exec'ed program to keep.
/// Unix doesn't make this easy: there is, in general, no way to
/// allocate a new file descriptor close-on-exec. Instead you
/// have to allocate the descriptor and then mark it close-on-exec.
/// If a fork happens between those two events, the child's exec
/// will inherit an unwanted file descriptor.
/// 
/// This lock solves that race: the create new fd/mark close-on-exec
/// operation is done holding ForkLock for reading, and the fork itself
/// is done holding ForkLock for writing. At least, that's the idea.
/// There are some complications.
/// 
/// Some system calls that create new file descriptors can block
/// for arbitrarily long times: open on a hung NFS server or named
/// pipe, accept on a socket, and so on. We can't reasonably grab
/// the lock across those operations.
/// 
/// It is worse to inherit some file descriptors than others.
/// If a non-malicious child accidentally inherits an open ordinary file,
/// that's not a big deal. On the other hand, if a long-lived child
/// accidentally inherits the write end of a pipe, then the reader
/// of that pipe will not see EOF until that child exits, potentially
/// causing the parent program to hang. This is a common problem
/// in threaded C programs that use popen.
/// 
/// Luckily, the file descriptors that are most important not to
/// inherit are not the ones that can take an arbitrarily long time
/// to create: pipe returns instantly, and the net package uses
/// non-blocking I/O to accept on a listening socket.
/// The rules for which file descriptor-creating operations use the
/// ForkLock are as follows:
/// 
///   - [Pipe]. Use pipe2 if available. Otherwise, does not block,
///     so use ForkLock.
///   - [Socket]. Use SOCK_CLOEXEC if available. Otherwise, does not
///     block, so use ForkLock.
///   - [Open]. Use [O_CLOEXEC] if available. Otherwise, may block,
///     so live with the race.
///   - [Dup]. Use [F_DUPFD_CLOEXEC] or dup3 if available. Otherwise,
///     does not block, so use ForkLock.
pub var ForkLock: sync.RWMutex

/// For testing: clients can set this flag to force
/// creation of IPv6 sockets to return [EAFNOSUPPORT].
pub var SocketDisableIPv6: bool

pub var Stderr: int

pub var Stdin: int

pub var Stdout: int

impl Cmsghdr {
  fn SetLen(self: Ref<Cmsghdr>, length: int)
}

impl Errno {
  fn Error(self) -> string

  fn Is(self, target: error) -> bool

  fn Temporary(self) -> bool

  fn Timeout(self) -> bool
}

impl Iovec {
  fn SetLen(self: Ref<Iovec>, length: int)
}

impl Msghdr {
  fn SetControllen(self: Ref<Msghdr>, length: int)
}

impl Signal {
  fn Signal(self)

  fn String(self) -> string
}

impl Timespec {
  /// Nano returns the time stored in ts as nanoseconds.
  fn Nano(self: Ref<Timespec>) -> int64

  /// Unix returns the time stored in ts as seconds plus nanoseconds.
  fn Unix(self: Ref<Timespec>) -> (int64, int64)
}

impl Timeval {
  /// Nano returns the time stored in tv as nanoseconds.
  fn Nano(self: Ref<Timeval>) -> int64

  /// Unix returns the time stored in tv as seconds plus nanoseconds.
  fn Unix(self: Ref<Timeval>) -> (int64, int64)
}

impl WaitStatus {
  fn Continued(self) -> bool

  fn CoreDump(self) -> bool

  fn ExitStatus(self) -> int

  fn Exited(self) -> bool

  fn Signal(self) -> Signal

  fn Signaled(self) -> bool

  fn StopSignal(self) -> Signal

  fn Stopped(self) -> bool

  fn TrapCause(self) -> int
}
