package syscall

Import Path
	syscall (on go.dev)

Dependency Relation
	imports 9 packages, and imported by 9 packages

Involved Source Files asan0.go dirent.go endian_little.go env_unix.go exec_linux.go exec_unix.go flock.go forkpipe2.go lsf_linux.go msan0.go net.go netlink_linux.go rlimit.go rlimit_stub.go setuidgid_linux.go sockcmsg_linux.go sockcmsg_unix.go sockcmsg_unix_other.go Package syscall contains an interface to the low-level operating system primitives. The details vary depending on the underlying system, and by default, godoc will display the syscall documentation for the current system. If you want godoc to display syscall documentation for another system, set $GOOS and $GOARCH to the desired system. For example, if you want to view documentation for freebsd/arm on linux/amd64, set $GOOS to freebsd and $GOARCH to arm. The primary use of syscall is inside other packages that provide a more portable interface to the system, such as "os", "time" and "net". Use those packages rather than this one if you can. For details of the functions and data types in this package consult the manuals for the appropriate operating system. These calls return err == nil to indicate success; otherwise err is an operating system error describing the failure. On most systems, that error has type syscall.Errno. Deprecated: this package is locked down. Callers should use the corresponding package in the golang.org/x/sys repository instead. That is also where updates required by new systems or versions should be applied. See https://golang.org/s/go1.4-syscall for more information. syscall_linux.go syscall_linux_accept4.go syscall_linux_amd64.go syscall_unix.go time_nofake.go timestruct.go zerrors_linux_amd64.go zsyscall_linux_amd64.go zsysnum_linux_amd64.go ztypes_linux_amd64.go asm_linux_amd64.s
Package-Level Type Names (total 84, in which 71 are exported)
/* sort exporteds by: | */
Len uint64 Level int32 Type int32 (*Cmsghdr) SetLen(length int)
Conn is implemented by some types in the net and os packages to provide access to the underlying file descriptor or handle. SyscallConn returns a raw network connection. *net.IPConn *net.TCPConn *net.TCPListener *net.UDPConn *net.UnixConn *net.UnixListener *os.File
Credential holds user and group identities to be assumed by a child process started by StartProcess. // Group ID. // Supplementary group IDs. // If true, don't set supplementary groups // User ID.
Ino uint64 Name [256]int8 Off int64 Pad_cgo_0 [5]byte Reclen uint16 Type uint8
Events uint32 Fd int32 Pad int32 func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
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) ... ( Errno) Error() string ( Errno) Is(target error) bool ( Errno) Temporary() bool ( Errno) Timeout() bool Errno : error Errno : net.Error func AllThreadsSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) func AllThreadsSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) const E2BIG const EACCES const EADDRINUSE const EADDRNOTAVAIL const EADV const EAFNOSUPPORT const EAGAIN const EALREADY const EBADE const EBADF const EBADFD const EBADMSG const EBADR const EBADRQC const EBADSLT const EBFONT const EBUSY const ECANCELED const ECHILD const ECHRNG const ECOMM const ECONNABORTED const ECONNREFUSED const ECONNRESET const EDEADLK const EDEADLOCK const EDESTADDRREQ const EDOM const EDOTDOT const EDQUOT const EEXIST const EFAULT const EFBIG const EHOSTDOWN const EHOSTUNREACH const EIDRM const EILSEQ const EINPROGRESS const EINTR const EINVAL const EIO const EISCONN const EISDIR const EISNAM const EKEYEXPIRED const EKEYREJECTED const EKEYREVOKED const EL2HLT const EL2NSYNC const EL3HLT const EL3RST const ELIBACC const ELIBBAD const ELIBEXEC const ELIBMAX const ELIBSCN const ELNRNG const ELOOP const EMEDIUMTYPE const EMFILE const EMLINK const EMSGSIZE const EMULTIHOP const ENAMETOOLONG const ENAVAIL const ENETDOWN const ENETRESET const ENETUNREACH const ENFILE const ENOANO const ENOBUFS const ENOCSI const ENODATA const ENODEV const ENOENT const ENOEXEC const ENOKEY const ENOLCK const ENOLINK const ENOMEDIUM const ENOMEM const ENOMSG const ENONET const ENOPKG const ENOPROTOOPT const ENOSPC const ENOSR const ENOSTR const ENOSYS const ENOTBLK const ENOTCONN const ENOTDIR const ENOTEMPTY const ENOTNAM const ENOTRECOVERABLE const ENOTSOCK const ENOTSUP const ENOTTY const ENOTUNIQ const ENXIO const EOPNOTSUPP const EOVERFLOW const EOWNERDEAD const EPERM const EPFNOSUPPORT const EPIPE const EPROTO const EPROTONOSUPPORT const EPROTOTYPE const ERANGE const EREMCHG const EREMOTE const EREMOTEIO const ERESTART const ERFKILL const EROFS const ESHUTDOWN const ESOCKTNOSUPPORT const ESPIPE const ESRCH const ESRMNT const ESTALE const ESTRPIPE const ETIME const ETIMEDOUT const ETOOMANYREFS const ETXTBSY const EUCLEAN const EUNATCH const EUSERS const EWOULDBLOCK const EXDEV const EXFULL
Bits [16]int64 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
Len int64 Pad_cgo_0 [4]byte Pad_cgo_1 [4]byte Pid int32 Start int64 Type int16 Whence int16 func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error
X__val [2]int32
Data [8]uint32 func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error
Family uint8 Flags uint8 Index uint32 Prefixlen uint8 Scope uint8
Change uint32 Family uint8 Flags uint32 Index int32 Type uint16 X__ifi_pad uint8
// in_addr Ifindex int32 // in_addr
// in6_addr Ifindex uint32
Cookie uint32 Len uint32 Mask uint32 Name [0]uint8 Wd int32
Base *byte Len uint64 (*Iovec) SetLen(length int)
// in_addr // in_addr func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err error) func internal/poll.(*FD).SetsockoptIPMreq(level, name int, mreq *IPMreq) error
// in_addr Ifindex int32 // in_addr func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) func internal/poll.(*FD).SetsockoptIPMreqn(level, name int, mreq *IPMreqn) error
Interface uint32 // in6_addr func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error) func internal/poll.(*FD).SetsockoptIPv6Mreq(level, name int, mreq *IPv6Mreq) error
Addr RawSockaddrInet6 Mtu uint32 func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error)
Linger int32 Onoff int32 func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) func internal/poll.(*FD).SetsockoptLinger(level, name int, l *Linger) error
Control *byte Controllen uint64 Flags int32 Iov *Iovec Iovlen uint64 Name *byte Namelen uint32 Pad_cgo_0 [4]byte Pad_cgo_1 [4]byte (*Msghdr) SetControllen(length int)
NetlinkMessage represents a netlink message. Data []byte Header NlMsghdr func ParseNetlinkMessage(b []byte) ([]NetlinkMessage, error) func ParseNetlinkRouteAttr(m *NetlinkMessage) ([]NetlinkRouteAttr, error)
NetlinkRouteAttr represents a netlink route attribute. Attr RtAttr Value []byte func ParseNetlinkRouteAttr(m *NetlinkMessage) ([]NetlinkRouteAttr, error)
NetlinkRouteRequest represents a request message to receive routing and link states from the kernel. Data RtGenmsg Header NlMsghdr
Len uint16 Type uint16
Error int32 Msg NlMsghdr
Flags uint16 Len uint32 Pid uint32 Seq uint32 Type uint16
ProcAttr holds attributes that will be applied to a new process started by StartProcess. // Current working directory. // Environment. // File descriptors. Sys *SysProcAttr func ForkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error) func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid int, handle uintptr, err error)
Cs uint64 Ds uint64 Eflags uint64 Es uint64 Fs uint64 Fs_base uint64 Gs uint64 Gs_base uint64 Orig_rax uint64 R10 uint64 R11 uint64 R12 uint64 R13 uint64 R14 uint64 R15 uint64 R8 uint64 R9 uint64 Rax uint64 Rbp uint64 Rbx uint64 Rcx uint64 Rdi uint64 Rdx uint64 Rip uint64 Rsi uint64 Rsp uint64 Ss uint64 (*PtraceRegs) PC() uint64 (*PtraceRegs) SetPC(pc uint64) func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) func PtraceSetRegs(pid int, regs *PtraceRegs) (err error)
A RawConn is a raw network connection. Control invokes f on the underlying connection's file descriptor or handle. The file descriptor fd is guaranteed to remain valid while f executes but not after f returns. Read invokes f on the underlying connection's file descriptor or handle; f is expected to try to read from the file descriptor. If f returns true, Read returns. Otherwise Read blocks waiting for the connection to be ready for reading and tries again repeatedly. The file descriptor is guaranteed to remain valid while f executes but not after f returns. Write is like Read but for writing. func Conn.SyscallConn() (RawConn, error) func net.(*IPConn).SyscallConn() (RawConn, error) func net.(*TCPConn).SyscallConn() (RawConn, error) func net.(*TCPListener).SyscallConn() (RawConn, error) func net.(*UDPConn).SyscallConn() (RawConn, error) func net.(*UnixConn).SyscallConn() (RawConn, error) func net.(*UnixListener).SyscallConn() (RawConn, error) func os.(*File).SyscallConn() (RawConn, error)
Data [14]int8 Family uint16
Addr RawSockaddr Pad [96]int8
// in_addr Family uint16 Port uint16 Zero [8]uint8
// in6_addr Family uint16 Flowinfo uint32 Port uint16 Scope_id uint32
Family uint16 Path [108]int8
Cur uint64 Max uint64 func Getrlimit(resource int, rlim *Rlimit) (err error) func Setrlimit(resource int, rlim *Rlimit) error
Len uint16 Type uint16
Family uint8
Flags uint8 Hops uint8 Ifindex int32 Len uint16
Idrss int64 Inblock int64 Isrss int64 Ixrss int64 Majflt int64 Maxrss int64 Minflt int64 Msgrcv int64 Msgsnd int64 Nivcsw int64 Nsignals int64 Nswap int64 Nvcsw int64 Oublock int64 Stime Timeval Utime Timeval func Getrusage(who int, rusage *Rusage) (err error) func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error)
A Signal is a number describing a process signal. It implements the os.Signal interface. ( Signal) Signal() ( Signal) String() string Signal : fmt.Stringer Signal : os.Signal func WaitStatus.Signal() Signal func WaitStatus.StopSignal() Signal func Kill(pid int, sig Signal) (err error) func Tgkill(tgid int, tid int, sig Signal) (err error) const SIGABRT const SIGALRM const SIGBUS const SIGCHLD const SIGCLD const SIGCONT const SIGFPE const SIGHUP const SIGILL const SIGINT const SIGIO const SIGIOT const SIGKILL const SIGPIPE const SIGPOLL const SIGPROF const SIGPWR const SIGQUIT const SIGSEGV const SIGSTKFLT const SIGSTOP const SIGSYS const SIGTERM const SIGTRAP const SIGTSTP const SIGTTIN const SIGTTOU const SIGUNUSED const SIGURG const SIGUSR1 const SIGUSR2 const SIGVTALRM const SIGWINCH const SIGXCPU const SIGXFSZ
*SockaddrInet4 *SockaddrInet6 *SockaddrLinklayer *SockaddrNetlink *SockaddrUnix func Accept(fd int) (nfd int, sa Sockaddr, err error) func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) func Getpeername(fd int) (sa Sockaddr, err error) func Getsockname(fd int) (sa Sockaddr, err error) func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) func internal/poll.(*FD).Accept() (int, Sockaddr, string, error) func internal/poll.(*FD).ReadFrom(p []byte) (int, Sockaddr, error) func internal/poll.(*FD).ReadMsg(p []byte, oob []byte, flags int) (int, int, int, Sockaddr, error) func Bind(fd int, sa Sockaddr) (err error) func Connect(fd int, sa Sockaddr) (err error) func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) func internal/poll.(*FD).WriteMsg(p []byte, oob []byte, sa Sockaddr) (int, int, error) func internal/poll.(*FD).WriteTo(p []byte, sa Sockaddr) (int, error)
Addr [4]byte Port int *SockaddrInet4 : Sockaddr func internal/poll.(*FD).ReadFromInet4(p []byte, from *SockaddrInet4) (int, error) func internal/poll.(*FD).ReadMsgInet4(p []byte, oob []byte, flags int, sa4 *SockaddrInet4) (int, int, int, error) func internal/poll.(*FD).WriteMsgInet4(p []byte, oob []byte, sa *SockaddrInet4) (int, int, error) func internal/poll.(*FD).WriteToInet4(p []byte, sa *SockaddrInet4) (int, error) func internal/syscall/unix.RecvfromInet4(fd int, p []byte, flags int, from *SockaddrInet4) (int, error) func internal/syscall/unix.RecvmsgInet4(fd int, p, oob []byte, flags int, from *SockaddrInet4) (n, oobn int, recvflags int, err error) func internal/syscall/unix.SendmsgNInet4(fd int, p, oob []byte, to *SockaddrInet4, flags int) (n int, err error) func internal/syscall/unix.SendtoInet4(fd int, p []byte, flags int, to *SockaddrInet4) (err error)
Addr [16]byte Port int ZoneId uint32 *SockaddrInet6 : Sockaddr func internal/poll.(*FD).ReadFromInet6(p []byte, from *SockaddrInet6) (int, error) func internal/poll.(*FD).ReadMsgInet6(p []byte, oob []byte, flags int, sa6 *SockaddrInet6) (int, int, int, error) func internal/poll.(*FD).WriteMsgInet6(p []byte, oob []byte, sa *SockaddrInet6) (int, int, error) func internal/poll.(*FD).WriteToInet6(p []byte, sa *SockaddrInet6) (int, error) func internal/syscall/unix.RecvfromInet6(fd int, p []byte, flags int, from *SockaddrInet6) (n int, err error) func internal/syscall/unix.RecvmsgInet6(fd int, p, oob []byte, flags int, from *SockaddrInet6) (n, oobn int, recvflags int, err error) func internal/syscall/unix.SendmsgNInet6(fd int, p, oob []byte, to *SockaddrInet6, flags int) (n int, err error) func internal/syscall/unix.SendtoInet6(fd int, p []byte, flags int, to *SockaddrInet6) (err error)
Addr [8]byte Halen uint8 Hatype uint16 Ifindex int Pkttype uint8 Protocol uint16 *SockaddrLinklayer : Sockaddr
Name string *SockaddrUnix : Sockaddr
SocketControlMessage represents a socket control message. Data []byte Header Cmsghdr func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) func ParseUnixRights(m *SocketControlMessage) ([]int, error)
Code uint16 Jf uint8 Jt uint8 K uint32 func LsfJump(code, k, jt, jf int) *SockFilter func LsfStmt(code, k int) *SockFilter func AttachLsf(fd int, i []SockFilter) error
Filter *SockFilter Len uint16 Pad_cgo_0 [6]byte
Atim Timespec Blksize int64 Blocks int64 Ctim Timespec Dev uint64 Gid uint32 Ino uint64 Mode uint32 Mtim Timespec Nlink uint64 Rdev uint64 Size int64 Uid uint32 X__pad0 int32 X__unused [3]int64 func Fstat(fd int, stat *Stat_t) (err error) func Lstat(path string, stat *Stat_t) (err error) func Stat(path string, stat *Stat_t) (err error) func internal/poll.(*FD).Fstat(s *Stat_t) error func internal/syscall/unix.Fstatat(dirfd int, path string, stat *Stat_t, flags int) error
Bavail uint64 Bfree uint64 Blocks uint64 Bsize int64 Ffree uint64 Files uint64 Flags int64 Frsize int64 Fsid Fsid Namelen int64 Spare [4]int64 Type int64 func Fstatfs(fd int, buf *Statfs_t) (err error) func Statfs(path string, buf *Statfs_t) (err error)
Bufferram uint64 Freehigh uint64 Freeram uint64 Freeswap uint64 Loads [3]uint64 Pad uint16 Pad_cgo_0 [4]byte Pad_cgo_1 [4]byte Procs uint16 Sharedram uint64 Totalhigh uint64 Totalram uint64 Totalswap uint64 Unit uint32 Uptime int64 X_f [0]byte func Sysinfo(info *Sysinfo_t) (err error)
// Ambient capabilities (Linux only) // File descriptor of a cgroup to put the new process into. // Chroot. // Flags for clone calls (Linux only) // Credential. // Controlling TTY fd Foreground places the child process group in the foreground. This implies Setpgid. The Ctty field must be set to the descriptor of the controlling TTY. Unlike Setctty, in this case Ctty must be a descriptor number in the parent process. // Group ID mappings for user namespaces. GidMappingsEnableSetgroups enabling setgroups syscall. If false, then setgroups syscall will be disabled for the child process. This parameter is no-op if GidMappings == nil. Otherwise for unprivileged users this should be set to false for mappings work. // Detach fd 0 from controlling terminal Pdeathsig, if non-zero, is a signal that the kernel will send to the child process when the creating thread dies. Note that the signal is sent on thread termination, which may happen before process termination. There are more details at https://go.dev/issue/27505. // Child's process group ID if Setpgid. Ptrace tells the child to call ptrace(PTRACE_TRACEME). Call runtime.LockOSThread before starting a process with this set, and don't call UnlockOSThread until done with PtraceSyscall calls. Setctty sets the controlling terminal of the child to file descriptor Ctty. Ctty must be a descriptor number in the child process: an index into ProcAttr.Files. This is only meaningful if Setsid is true. Setpgid sets the process group ID of the child to Pgid, or, if Pgid == 0, to the new child's process ID. // Create session. // User ID mappings for user namespaces. // Flags for unshare calls (Linux only) // Whether to make use of the CgroupFD field. func internal/syscall/execenv.Default(sys *SysProcAttr) ([]string, error)
SysProcIDMap holds Container ID to Host ID mappings used for User Namespaces in Linux. See user_namespaces(7). // Container ID. // Host ID. // Size.
Cc [32]uint8 Cflag uint32 Iflag uint32 Ispeed uint32 Lflag uint32 Line uint8 Oflag uint32 Ospeed uint32 Pad_cgo_0 [3]byte
func Time(t *Time_t) (tt Time_t, err error) func Time(t *Time_t) (tt Time_t, err error)
Nsec int64 Sec int64 Nano returns the time stored in ts as nanoseconds. Unix returns the time stored in ts as seconds plus nanoseconds. func NsecToTimespec(nsec int64) Timespec func Nanosleep(time *Timespec, leftover *Timespec) (err error) func Nanosleep(time *Timespec, leftover *Timespec) (err error) func TimespecToNsec(ts Timespec) int64 func UtimesNano(path string, ts []Timespec) (err error)
Sec int64 Usec int64 Nano returns the time stored in tv as nanoseconds. Unix returns the time stored in tv as seconds plus nanoseconds. func NsecToTimeval(nsec int64) Timeval func Futimes(fd int, tv []Timeval) (err error) func Futimesat(dirfd int, path string, tv []Timeval) (err error) func Gettimeofday(tv *Timeval) (err error) func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) func Settimeofday(tv *Timeval) (err error) func TimevalToNsec(tv Timeval) int64 func Utimes(path string, tv []Timeval) (err error)
Cstime int64 Cutime int64 Stime int64 Utime int64 func Times(tms *Tms) (ticks uintptr, err error)
Gid uint32 Pid int32 Uid uint32 func GetsockoptUcred(fd, level, opt int) (*Ucred, error) func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) func UnixCredentials(ucred *Ucred) []byte
Fname [6]int8 Fpack [6]int8 Pad_cgo_0 [4]byte Pad_cgo_1 [4]byte Tfree int32 Tinode uint64 func Ustat(dev int, ubuf *Ustat_t) (err error)
Actime int64 Modtime int64 func Utime(path string, buf *Utimbuf) (err error)
Domainname [65]int8 Machine [65]int8 Nodename [65]int8 Release [65]int8 Sysname [65]int8 Version [65]int8 func Uname(buf *Utsname) (err error)
( WaitStatus) Continued() bool ( WaitStatus) CoreDump() bool ( WaitStatus) ExitStatus() int ( WaitStatus) Exited() bool ( WaitStatus) Signal() Signal ( WaitStatus) Signaled() bool ( WaitStatus) StopSignal() Signal ( WaitStatus) Stopped() bool ( WaitStatus) TrapCause() int func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error)
Package-Level Functions (total 346, in which 231 are exported)
func Accept(fd int) (nfd int, sa Sockaddr, err error)
func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error)
func Access(path string, mode uint32) (err error)
func Acct(path string) (err error)
func Adjtimex(buf *Timex) (state int, err error)
AllThreadsSyscall performs a syscall on each OS thread of the Go runtime. It first invokes the syscall on one thread. Should that invocation fail, it returns immediately with the error status. Otherwise, it invokes the syscall on all of the remaining threads in parallel. It will terminate the program if it observes any invoked syscall's return value differs from that of the first invocation. AllThreadsSyscall is intended for emulating simultaneous process-wide state changes that require consistently modifying per-thread state of the Go runtime. AllThreadsSyscall is unaware of any threads that are launched explicitly by cgo linked code, so the function always returns ENOTSUP in binaries that use cgo.
AllThreadsSyscall6 is like AllThreadsSyscall, but extended to six arguments.
Deprecated: Use golang.org/x/net/bpf instead.
func Bind(fd int, sa Sockaddr) (err error)
BindToDevice binds the socket associated with fd to device.
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).
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).
func Chdir(path string) (err error)
func Chmod(path string, mode uint32) (err error)
func Chown(path string, uid int, gid int) (err error)
func Chroot(path string) (err error)
func Close(fd int) (err error)
CmsgLen returns the value to store in the Len field of the Cmsghdr structure, taking into account any necessary alignment.
CmsgSpace returns the number of bytes an ancillary element with payload of the passed data length occupies.
func Connect(fd int, sa Sockaddr) (err error)
func Creat(path string, mode uint32) (fd int, err error)
Deprecated: Use golang.org/x/net/bpf instead.
func Dup(oldfd int) (fd int, err error)
func Dup2(oldfd int, newfd int) (err error)
func Dup3(oldfd int, newfd int, flags int) (err error)
func EpollCreate(size int) (fd int, err error)
func EpollCreate1(flag int) (fd int, err error)
func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
Exec invokes the execve(2) system call.
func Exit(code int)
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
func Fallocate(fd int, mode uint32, off int64, len int64) (err error)
func Fchdir(fd int) (err error)
func Fchmod(fd int, mode uint32) (err error)
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
func Fchown(fd int, uid int, gid int) (err error)
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
func Fdatasync(fd int) (err error)
func Flock(fd int, how int) (err error)
Combination of fork and exec, careful to be thread safe.
func Fstat(fd int, stat *Stat_t) (err error)
func Fstatfs(fd int, buf *Statfs_t) (err error)
func Fsync(fd int) (err error)
func Ftruncate(fd int, length int64) (err error)
func Futimes(fd int, tv []Timeval) (err error)
func Futimesat(dirfd int, path string, tv []Timeval) (err error)
func Getcwd(buf []byte) (n int, err error)
func Getdents(fd int, buf []byte) (n int, err error)
func Getegid() (egid int)
func Getenv(key string) (value string, found bool)
func Geteuid() (euid int)
func Getgid() (gid int)
func Getgroups() (gids []int, err error)
func Getpgid(pid int) (pgid int, err error)
func Getpgrp() (pid int)
func Getpid() (pid int)
func Getppid() (ppid int)
func Getpriority(which int, who int) (prio int, err error)
func Getrlimit(resource int, rlim *Rlimit) (err error)
func Getrusage(who int, rusage *Rusage) (err error)
func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error)
func GetsockoptInt(fd, level, opt int) (value int, err error)
func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error)
func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error)
func GetsockoptUcred(fd, level, opt int) (*Ucred, error)
func Gettid() (tid int)
func Getuid() (uid int)
func Getwd() (wd string, err error)
func Getxattr(path string, attr string, dest []byte) (sz int, err error)
func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error)
func InotifyInit() (fd int, err error)
func InotifyInit1(flags int) (fd int, err error)
func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error)
func Ioperm(from int, num int, on int) (err error)
func Iopl(level int) (err error)
func Kill(pid int, sig Signal) (err error)
func Klogctl(typ int, buf []byte) (n int, err error)
func Lchown(path string, uid int, gid int) (err error)
func Listen(s int, n int) (err error)
func Listxattr(path string, dest []byte) (sz int, err error)
Deprecated: Use golang.org/x/net/bpf instead.
Deprecated: Use golang.org/x/net/bpf instead.
Deprecated: Use golang.org/x/net/bpf instead.
func Lstat(path string, stat *Stat_t) (err error)
func Madvise(b []byte, advice int) (err error)
func Mkdir(path string, mode uint32) (err error)
func Mkdirat(dirfd int, path string, mode uint32) (err error)
func Mkfifo(path string, mode uint32) (err error)
func Mknod(path string, mode uint32, dev int) (err error)
func Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
func Mlock(b []byte) (err error)
func Mlockall(flags int) (err error)
func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error)
func Mount(source string, target string, fstype string, flags uintptr, data string) (err error)
func Mprotect(b []byte, prot int) (err error)
func Munlock(b []byte) (err error)
func Munmap(b []byte) (err error)
func Nanosleep(time *Timespec, leftover *Timespec) (err error)
NetlinkRIB returns routing information base, as known as RIB, which consists of network facility information, states and parameters.
NsecToTimespec converts a number of nanoseconds into a Timespec.
NsecToTimeval converts a number of nanoseconds into a Timeval.
func Open(path string, mode int, perm uint32) (fd int, err error)
func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err 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.
ParseNetlinkMessage parses b as an array of netlink messages and returns the slice containing the NetlinkMessage structures.
ParseNetlinkRouteAttr parses m's payload as an array of netlink route attributes and returns the slice containing the NetlinkRouteAttr structures.
ParseSocketControlMessage parses b as an array of socket control messages.
ParseUnixCredentials decodes a socket control message that contains credentials in a Ucred structure. To receive such a message, the SO_PASSCRED option must be enabled on the socket.
ParseUnixRights decodes a socket control message that contains an integer array of open file descriptors from another process.
func Pause() (err error)
func Pipe2(p []int, flags int) error
func PivotRoot(newroot string, putold string) (err error)
func Pread(fd int, p []byte, offset int64) (n int, err error)
func PtraceCont(pid int, signal int) (err error)
func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error)
func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error)
func PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error)
func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error)
func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error)
func PtraceSetOptions(pid int, options int) (err error)
func PtraceSyscall(pid int, signal int) (err error)
func Pwrite(fd int, p []byte, offset int64) (n int, err error)
func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
func Read(fd int, p []byte) (n int, err error)
func ReadDirent(fd int, buf []byte) (n int, err error)
func Reboot(cmd int) (err error)
func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error)
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error)
func Removexattr(path string, attr string) (err error)
func Rename(oldpath string, newpath string) (err error)
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
func Seek(fd int, offset int64, whence int) (off int64, err error)
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error)
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error)
func Setegid(egid int) (err error)
func Setenv(key, value string) error
func Seteuid(euid int) (err error)
func Setfsgid(gid int) (err error)
func Setfsuid(uid int) (err error)
func Setgid(gid int) (err error)
func Setgroups(gids []int) (err error)
Deprecated: Use golang.org/x/net/bpf instead.
func SetNonblock(fd int, nonblocking bool) (err error)
func Setpgid(pid int, pgid int) (err error)
func Setpriority(which int, who int, prio int) (err error)
func Setregid(rgid, egid int) (err error)
func Setresgid(rgid, egid, sgid int) (err error)
func Setresuid(ruid, euid, suid int) (err error)
func Setreuid(ruid, euid int) (err error)
func Setrlimit(resource int, rlim *Rlimit) error
func Setsid() (pid int, err error)
func SetsockoptByte(fd, level, opt int, value byte) (err error)
func SetsockoptInet4Addr(fd, level, opt int, value [4]byte) (err error)
func SetsockoptInt(fd, level, opt int, value int) (err error)
func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err error)
func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error)
func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error)
func SetsockoptLinger(fd, level, opt int, l *Linger) (err error)
func SetsockoptString(fd, level, opt int, s string) (err error)
func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error)
func Setuid(uid int) (err error)
func Setxattr(path string, attr string, data []byte, flags int) (err error)
func Shutdown(fd int, how int) (err 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).
func Socket(domain, typ, proto int) (fd int, err error)
func Socketpair(domain, typ, proto int) (fd [2]int, err error)
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
StartProcess wraps ForkExec for package os.
func Stat(path string, stat *Stat_t) (err error)
func Statfs(path string, buf *Statfs_t) (err 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.
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.
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.
func SyncFileRange(fd int, off int64, n int64, flags int) (err error)
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
func Sysinfo(info *Sysinfo_t) (err error)
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
func Tgkill(tgid int, tid int, sig Signal) (err error)
func Time(t *Time_t) (tt Time_t, err error)
func Times(tms *Tms) (ticks uintptr, err error)
TimespecToNsec returns the time stored in ts as nanoseconds.
TimevalToNsec returns the time stored in tv as nanoseconds.
func Truncate(path string, length int64) (err error)
func Umask(mask int) (oldmask int)
func Uname(buf *Utsname) (err error)
UnixCredentials encodes credentials into a socket control message for sending to another process. This can be used for authentication.
UnixRights encodes a set of open file descriptors into a socket control message for sending to another process.
func Unlinkat(dirfd int, path string) error
func Unmount(target string, flags int) (err error)
func Unshare(flags int) (err error)
func Ustat(dev int, ubuf *Ustat_t) (err error)
func Utime(path string, buf *Utimbuf) (err error)
func Utimes(path string, tv []Timeval) (err error)
func UtimesNano(path string, ts []Timespec) (err error)
func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error)
func Write(fd int, p []byte) (n int, err error)
Package-Level Variables (total 38, in which 5 are exported)
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.
For testing: clients can set this flag to force creation of IPv6 sockets to return EAFNOSUPPORT.
Package-Level Constants (total 1912, in which 1879 are exported)
const B0 = 0
const B1000000 = 4104
const B110 = 3
const B115200 = 4098
const B1152000 = 4105
const B134 = 4
const B150 = 5
const B1500000 = 4106
const B1800 = 10
const B200 = 6
const B2000000 = 4107
const B230400 = 4099
const B2400 = 11
const B2500000 = 4108
const B300 = 7
const B3000000 = 4109
const B3500000 = 4110
const B4000000 = 4111
const B460800 = 4100
const B4800 = 12
const B50 = 1
const B500000 = 4101
const B57600 = 4097
const B576000 = 4102
const B600 = 8
const B75 = 2
const B921600 = 4103
const B9600 = 13
const BPF_A = 16
const BPF_B = 16
const BPF_LEN = 128
const BPF_MSH = 160
const BPF_NEG = 128
const BPF_RSH = 112
const BPF_TXA = 128
const CLOCAL = 2048
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
Linux unshare/clone/clone2/clone3 flags, architecture-independent, copied from linux/sched.h.
const CREAD = 128
const CS5 = 0
const CS6 = 16
const CS7 = 32
const CS8 = 48
const CSIZE = 48
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
const ECHO = 8
const ECHOCTL = 512
const ECHOE = 16
const ECHOK = 32
const ECHOKE = 2048
const ECHOPRT = 1024
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
const EPOLLET = -2147483648
const EPOLLMSG = 1024
const EPOLLONESHOT = 1073741824
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
const ETH_P_1588 = 35063
const ETH_P_AARP = 33011
const ETH_P_AOE = 34978
const ETH_P_CUST = 24582
const ETH_P_DEC = 24576
const ETH_P_DIAG = 24581
const ETH_P_EDSA = 56026
const ETH_P_FCOE = 35078
const ETH_P_FIP = 35092
const ETH_P_IP = 2048
const ETH_P_IPV6 = 34525
const ETH_P_IPX = 33079
const ETH_P_LAT = 24580
const ETH_P_PAE = 34958
const ETH_P_RARP = 32821
const ETH_P_SCA = 24583
const ETH_P_SLOW = 34825
const ETH_P_TEB = 25944
const ETH_P_TIPC = 35018
const ETH_P_WCCP = 34878
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
const F_NOTIFY = 1026
const F_OK = 0
const FLUSHO = 4096
const HUPCL = 1024
const ICRNL = 256
const IEXTEN = 32768
const IGNCR = 128
const IMAXBEL = 8192
const IN_CLASSA_HOST = 16777215
const IN_CLASSA_NET = 4278190080
const IN_CLASSB_NET = 4294901760
const IN_CLASSC_NET = 4294967040
const IN_CLOEXEC = 524288
const IN_DONT_FOLLOW = 33554432
const IN_IGNORED = 32768
const IN_ISDIR = 1073741824
const IN_MASK_ADD = 536870912
const IN_MOVE = 192
const IN_ONESHOT = 2147483648
const IN_ONLYDIR = 16777216
const INLCR = 64
const INPCK = 16
const IP_DF = 16384
const IP_MF = 8192
const IP_MSS = 576
const IP_RF = 32768
const ISIG = 1
const IUCLC = 512
const IUTF8 = 16384
const IXANY = 2048
const IXOFF = 4096
const IXON = 1024
const MAP_HUGETLB = 262144
const MAP_STACK = 131072
const MS_ACTIVE = 1073741824
const MS_BIND = 4096
const MS_I_VERSION = 8388608
const MS_KERNMOUNT = 4194304
const MS_MGC_MSK = 4294901760
const MS_MGC_VAL = 3236757504
const MS_MOVE = 8192
const MS_NOUSER = -2147483648
const MS_PRIVATE = 262144
const MS_REC = 16384
const MS_RELATIME = 2097152
const MS_RMT_MASK = 8388689
const MS_SHARED = 1048576
const MS_SILENT = 32768
const MS_SLAVE = 524288
const MS_STRICTATIME = 16777216
const MSG_CMSG_CLOEXEC = 1073741824
const MSG_EOR = 128
const MSG_FASTOPEN = 536870912
const MSG_FIN = 512
const MSG_MORE = 32768
const MSG_RST = 4096
const MSG_SYN = 1024
const NOFLSH = 128
const O_APPEND = 1024
const O_ASYNC = 8192
const O_CLOEXEC = 524288
const O_DIRECT = 16384
const O_DSYNC = 4096
const O_EXCL = 128
const O_FSYNC = 1052672
const O_NDELAY = 2048
const O_NOATIME = 262144
const O_NOFOLLOW = 131072
const O_RSYNC = 1052672
const O_SYNC = 1052672
const O_TRUNC = 512
const OFDEL = 128
const OFILL = 64
const ONOCR = 16
const PARENB = 256
const PARODD = 512
const PathMax = 4096
const PENDIN = 16384
const PR_FP_EXC_INV = 1048576
const PR_SET_PTRACER = 1499557217
const PROT_GROWSDOWN = 16777216
const PROT_GROWSUP = 33554432
const RT_TABLE_MAX = 4294967295
const RTCF_DIRECTSRC = 67108864
const RTCF_LOG = 33554432
const RTCF_MASQ = 4194304
const RTCF_NAT = 8388608
const RTCF_VALVE = 2097152
const RTF_ADDRCLASSMASK = 4160749568
const RTF_BROADCAST = 268435456
const RTF_CACHE = 16777216
const RTF_FLOW = 33554432
const RTF_INTERFACE = 1073741824
const RTF_LINKRT = 1048576
const RTF_LOCAL = 2147483648
const RTF_MULTICAST = 536870912
const RTF_NAT = 134217728
const RTF_NONEXTHOP = 2097152
const RTF_POLICY = 67108864
const S_IFBLK = 24576
const S_IFCHR = 8192
const S_IFDIR = 16384
const S_IFIFO = 4096
const S_IFLNK = 40960
const S_IFMT = 61440
const S_IFREG = 32768
const S_IFSOCK = 49152
const S_IREAD = 256
const S_IRUSR = 256
const S_IRWXU = 448
const S_ISGID = 1024
const S_ISUID = 2048
const S_ISVTX = 512
const S_IWUSR = 128
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
Signals
const SIOCADDRT = 35083
const SIOCATMARK = 35077
const SIOCDARP = 35155
const SIOCDELRT = 35084
const SIOCDRARP = 35168
const SIOCGARP = 35156
const SIOCGIFBR = 35136
const SIOCGIFMAP = 35184
const SIOCGIFMEM = 35103
const SIOCGIFMTU = 35105
const SIOCGPGRP = 35076
const SIOCGRARP = 35169
const SIOCGSTAMP = 35078
const SIOCRTMSG = 35085
const SIOCSARP = 35157
const SIOCSIFBR = 35137
const SIOCSIFMAP = 35185
const SIOCSIFMEM = 35104
const SIOCSIFMTU = 35106
const SIOCSPGRP = 35074
const SIOCSRARP = 35170
const SOL_AAL = 265
const SOL_ATM = 264
const SOL_RAW = 255
const SOL_X25 = 262
const SYS_TEE = 276
const TCGETS = 21505
const TCP_MAXWIN = 65535
const TCP_MSS = 512
const TCSETS = 21506
const TIOCCBRK = 21544
const TIOCCONS = 21533
const TIOCEXCL = 21516
const TIOCGDEV = 2147767346
const TIOCGETD = 21540
const TIOCGPGRP = 21519
const TIOCGPTN = 2147767344
const TIOCGRS485 = 21550
const TIOCGSID = 21545
const TIOCGWINSZ = 21523
const TIOCINQ = 21531
const TIOCLINUX = 21532
const TIOCMBIC = 21527
const TIOCMBIS = 21526
const TIOCMGET = 21525
const TIOCMIWAIT = 21596
const TIOCMSET = 21528
const TIOCNOTTY = 21538
const TIOCNXCL = 21517
const TIOCOUTQ = 21521
const TIOCPKT = 21536
const TIOCSBRK = 21543
const TIOCSCTTY = 21518
const TIOCSETD = 21539
const TIOCSIG = 1074025526
const TIOCSPGRP = 21520
const TIOCSPTLCK = 1074025521
const TIOCSRS485 = 21551
const TIOCSTI = 21522
const TIOCSWINSZ = 21524
const TOSTOP = 256
const TUNATTACHFILTER = 1074812117
const TUNDETACHFILTER = 1074812118
const TUNGETFEATURES = 2147767503
const TUNGETIFF = 2147767506
const TUNGETSNDBUF = 2147767507
const TUNGETVNETHDRSZ = 2147767511
const TUNSETDEBUG = 1074025673
const TUNSETGROUP = 1074025678
const TUNSETIFF = 1074025674
const TUNSETNOCSUM = 1074025672
const TUNSETOFFLOAD = 1074025680
const TUNSETOWNER = 1074025676
const TUNSETPERSIST = 1074025675
const TUNSETSNDBUF = 1074025684
const TUNSETTXFILTER = 1074025681
const TUNSETVNETHDRSZ = 1074025688
const VEOF = 4
const VEOL = 11
const VEOL2 = 16
const VMIN = 6
const VSUSP = 10
const WALL = 1073741824
const WCLONE = 2147483648
const WNOTHREAD = 536870912
const WNOWAIT = 16777216