package syscall
Import Path
syscall (on golang.org and go.dev)
Dependency Relation
imports 8 packages, and imported by 15 packages
Involved Source Files
dirent.go
endian_little.go
env_unix.go
exec_linux.go
exec_unix.go
flock.go
lsf_linux.go
msan0.go
net.go
netlink_linux.go
setuidgid_linux.go
sock_cloexec_linux.go
sockcmsg_linux.go
sockcmsg_unix.go
sockcmsg_unix_other.go
str.go
d-> syscall.go
syscall_dup2_linux.go
syscall_linux.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
Exported Type Names
type Conn (interface)
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)
type Credential (struct)
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.
type EpollEvent (struct)
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)
type Errno uintptr
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 from the os package
using errors.Is. For example:
_, _, err := syscall.Syscall(...)
if errors.Is(err, os.ErrNotExist) ...
( T) Error() string
( T) Is(target error) bool
( T) Temporary() bool
( T) Timeout() bool
T : error
T : net.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 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
type FdSet (struct)
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)
type Flock_t (struct)
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
type ICMPv6Filter (struct)
Data [8]uint32
func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error)
func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error
type IfInfomsg (struct)
Change uint32
Family uint8
Flags uint32
Index int32
Type uint16
X__ifi_pad uint8
type Inet4Pktinfo (struct)
// in_addr
Ifindex int32
// in_addr
type Inet6Pktinfo (struct)
// in6_addr
Ifindex uint32
type IPMreq (struct)
// 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
type IPMreqn (struct)
// 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
type IPv6Mreq (struct)
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
type IPv6MTUInfo (struct)
Addr RawSockaddrInet6
Mtu uint32
func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error)
type Linger (struct)
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
type Msghdr (struct)
Control *byte
Controllen uint64
Flags int32
Iov *Iovec
Iovlen uint64
Name *byte
Namelen uint32
Pad_cgo_0 [4]byte
Pad_cgo_1 [4]byte
(*T) SetControllen(length int)
type NetlinkMessage (struct)
NetlinkMessage represents a netlink message.
Data []byte
Header NlMsghdr
func ParseNetlinkMessage(b []byte) ([]NetlinkMessage, error)
func ParseNetlinkRouteAttr(m *NetlinkMessage) ([]NetlinkRouteAttr, error)
type NetlinkRouteAttr (struct)
NetlinkRouteAttr represents a netlink route attribute.
Attr RtAttr
Value []byte
func ParseNetlinkRouteAttr(m *NetlinkMessage) ([]NetlinkRouteAttr, error)
type NetlinkRouteRequest (struct)
NetlinkRouteRequest represents a request message to receive routing
and link states from the kernel.
Data RtGenmsg
Header NlMsghdr
type ProcAttr (struct)
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)
type PtraceRegs (struct)
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
(*T) PC() uint64
(*T) SetPC(pc uint64)
func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error)
func PtraceSetRegs(pid int, regs *PtraceRegs) (err error)
type RawConn (interface)
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)
type RawSockaddr (struct)
Data [14]int8
Family uint16
type RawSockaddrAny (struct)
Addr RawSockaddr
Pad [96]int8
type RawSockaddrInet6 (struct)
// in6_addr
Family uint16
Flowinfo uint32
Port uint16
Scope_id uint32
type RawSockaddrLinklayer (struct)
Addr [8]uint8
Family uint16
Halen uint8
Hatype uint16
Ifindex int32
Pkttype uint8
Protocol uint16
type RawSockaddrUnix (struct)
Family uint16
Path [108]int8
type Rlimit (struct)
Cur uint64
Max uint64
func Getrlimit(resource int, rlim *Rlimit) (err error)
func Setrlimit(resource int, rlim *Rlimit) (err error)
type RtMsg (struct)
Dst_len uint8
Family uint8
Flags uint32
Protocol uint8
Scope uint8
Src_len uint8
Table uint8
Tos uint8
Type uint8
type Rusage (struct)
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)
type Signal int
A Signal is a number describing a process signal.
It implements the os.Signal interface.
( T) Signal()
( T) String() string
T : expvar.Var
T : fmt.Stringer
T : 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
type Sockaddr (interface)
*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) (int, int, int, Sockaddr, error)
func net/internal/socktest.(*Switch).Accept(s int) (ns int, sa Sockaddr, err error)
func net/internal/socktest.(*Switch).Accept4(s, flags int) (ns int, sa Sockaddr, err 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)
func net/internal/socktest.(*Switch).Connect(s int, sa Sockaddr) (err error)
type SockaddrLinklayer (struct)
Addr [8]byte
Halen uint8
Hatype uint16
Ifindex int
Pkttype uint8
Protocol uint16
*T : Sockaddr
type SocketControlMessage (struct)
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)
type SockFilter (struct)
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
type Stat_t (struct)
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
type Statfs_t (struct)
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)
type Sysinfo_t (struct)
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)
type SysProcAttr (struct)
// Ambient capabilities (Linux only)
// 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
// Signal that the process will get when its parent dies (Linux only)
// 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.
func internal/syscall/execenv.Default(sys *SysProcAttr) ([]string, error)
type SysProcIDMap (struct)
SysProcIDMap holds Container ID to Host ID mappings used for User Namespaces in Linux.
See user_namespaces(7).
// Container ID.
// Host ID.
// Size.
type TCPInfo (struct)
Advmss uint32
Ato uint32
Backoff uint8
Ca_state uint8
Fackets uint32
Last_ack_recv uint32
Last_ack_sent uint32
Last_data_recv uint32
Last_data_sent uint32
Lost uint32
Options uint8
Pad_cgo_0 [2]byte
Pmtu uint32
Probes uint8
Rcv_mss uint32
Rcv_rtt uint32
Rcv_space uint32
Rcv_ssthresh uint32
Reordering uint32
Retrans uint32
Retransmits uint8
Rto uint32
Rtt uint32
Rttvar uint32
Sacked uint32
Snd_cwnd uint32
Snd_mss uint32
Snd_ssthresh uint32
State uint8
Total_retrans uint32
Unacked uint32
type Termios (struct)
Cc [32]uint8
Cflag uint32
Iflag uint32
Ispeed uint32
Lflag uint32
Line uint8
Oflag uint32
Ospeed uint32
Pad_cgo_0 [3]byte
type Time_t int64
func Time(t *Time_t) (tt Time_t, err error)
func Time(t *Time_t) (tt Time_t, err error)
type Timespec (struct)
Nsec int64
Sec int64
Nano returns ts as the number of nanoseconds elapsed since the Unix epoch.
Unix returns ts as the number of seconds and nanoseconds elapsed since the
Unix epoch.
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)
type Timeval (struct)
Sec int64
Usec int64
Nano returns tv as the number of nanoseconds elapsed since the Unix epoch.
Unix returns tv as the number of seconds and nanoseconds elapsed since the
Unix epoch.
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)
type Timex (struct)
Calcnt int64
Constant int64
Errcnt int64
Esterror int64
Freq int64
Jitcnt int64
Jitter int64
Maxerror int64
Modes uint32
Offset int64
Pad_cgo_0 [4]byte
Pad_cgo_1 [4]byte
Pad_cgo_2 [4]byte
Pad_cgo_3 [44]byte
Ppsfreq int64
Precision int64
Shift int32
Stabil int64
Status int32
Stbcnt int64
Tai int32
Tick int64
Time Timeval
Tolerance int64
func Adjtimex(buf *Timex) (state int, err error)
type Tms (struct)
Cstime int64
Cutime int64
Stime int64
Utime int64
func Times(tms *Tms) (ticks uintptr, err error)
type Ucred (struct)
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
type Ustat_t (struct)
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)
type Utsname (struct)
Domainname [65]int8
Machine [65]int8
Nodename [65]int8
Release [65]int8
Sysname [65]int8
Version [65]int8
func Uname(buf *Utsname) (err error)
type WaitStatus uint32
( T) Continued() bool
( T) CoreDump() bool
( T) ExitStatus() int
( T) Exited() bool
( T) Signal() Signal
( T) Signaled() bool
( T) StopSignal() Signal
( T) Stopped() bool
( T) TrapCause() int
func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error)
Exported Values
const AF_ALG = 38
const AF_APPLETALK = 5
const AF_ASH = 18
const AF_ATMPVC = 8
const AF_ATMSVC = 20
const AF_AX25 = 3
const AF_BLUETOOTH = 31
const AF_BRIDGE = 7
const AF_CAIF = 37
const AF_CAN = 29
const AF_DECnet = 12
const AF_ECONET = 19
const AF_FILE = 1
const AF_IEEE802154 = 36
const AF_INET = 2
const AF_INET6 = 10
const AF_IPX = 4
const AF_IRDA = 23
const AF_ISDN = 34
const AF_IUCV = 32
const AF_KEY = 15
const AF_LLC = 26
const AF_LOCAL = 1
const AF_MAX = 39
const AF_NETBEUI = 13
const AF_NETLINK = 16
const AF_NETROM = 6
const AF_PACKET = 17
const AF_PHONET = 35
const AF_PPPOX = 24
const AF_RDS = 21
const AF_ROSE = 11
const AF_ROUTE = 16
const AF_RXRPC = 33
const AF_SECURITY = 14
const AF_SNA = 22
const AF_TIPC = 30
const AF_UNIX = 1
const AF_UNSPEC = 0
const AF_WANPIPE = 25
const AF_X25 = 9
const ARPHRD_ADAPT = 264
const ARPHRD_APPLETLK = 8
const ARPHRD_ARCNET = 7
const ARPHRD_ASH = 781
const ARPHRD_ATM = 19
const ARPHRD_AX25 = 3
const ARPHRD_BIF = 775
const ARPHRD_CHAOS = 5
const ARPHRD_CISCO = 513
const ARPHRD_CSLIP = 257
const ARPHRD_CSLIP6 = 259
const ARPHRD_DDCMP = 517
const ARPHRD_DLCI = 15
const ARPHRD_ECONET = 782
const ARPHRD_EETHER = 2
const ARPHRD_ETHER = 1
const ARPHRD_EUI64 = 27
const ARPHRD_FCAL = 785
const ARPHRD_FCFABRIC = 787
const ARPHRD_FCPL = 786
const ARPHRD_FCPP = 784
const ARPHRD_FDDI = 774
const ARPHRD_FRAD = 770
const ARPHRD_HDLC = 513
const ARPHRD_HIPPI = 780
const ARPHRD_HWX25 = 272
const ARPHRD_IEEE1394 = 24
const ARPHRD_IEEE802 = 6
const ARPHRD_IEEE80211 = 801
const ARPHRD_IEEE80211_PRISM = 802
const ARPHRD_IEEE80211_RADIOTAP = 803
const ARPHRD_IEEE802154 = 804
const ARPHRD_IEEE802154_PHY = 805
const ARPHRD_IEEE802_TR = 800
const ARPHRD_INFINIBAND = 32
const ARPHRD_IPDDP = 777
const ARPHRD_IPGRE = 778
const ARPHRD_IRDA = 783
const ARPHRD_LAPB = 516
const ARPHRD_LOCALTLK = 773
const ARPHRD_LOOPBACK = 772
const ARPHRD_METRICOM = 23
const ARPHRD_NETROM = 0
const ARPHRD_NONE = 65534
const ARPHRD_PIMREG = 779
const ARPHRD_PPP = 512
const ARPHRD_PRONET = 4
const ARPHRD_RAWHDLC = 518
const ARPHRD_ROSE = 270
const ARPHRD_RSRVD = 260
const ARPHRD_SIT = 776
const ARPHRD_SKIP = 771
const ARPHRD_SLIP = 256
const ARPHRD_SLIP6 = 258
const ARPHRD_TUNNEL = 768
const ARPHRD_TUNNEL6 = 769
const ARPHRD_VOID = 65535
const ARPHRD_X25 = 271
const B0 = 0
const B1000000 = 4104
const B110 = 3
const B115200 = 4098
const B1152000 = 4105
const B1200 = 9
const B134 = 4
const B150 = 5
const B1500000 = 4106
const B1800 = 10
const B19200 = 14
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 B38400 = 15
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
func BindToDevice(fd int, device string) (err error)
BindToDevice binds the socket associated with fd to device.
const BPF_A = 16
const BPF_ABS = 32
const BPF_ADD = 0
const BPF_ALU = 4
const BPF_AND = 80
const BPF_B = 16
const BPF_DIV = 48
const BPF_H = 8
const BPF_IMM = 0
const BPF_IND = 64
const BPF_JA = 0
const BPF_JEQ = 16
const BPF_JGE = 48
const BPF_JGT = 32
const BPF_JMP = 5
const BPF_JSET = 64
const BPF_K = 0
const BPF_LD = 0
const BPF_LDX = 1
const BPF_LEN = 128
const BPF_LSH = 96
const BPF_MAJOR_VERSION = 1
const BPF_MAXINSNS = 4096
const BPF_MEM = 96
const BPF_MEMWORDS = 16
const BPF_MINOR_VERSION = 1
const BPF_MISC = 7
const BPF_MSH = 160
const BPF_MUL = 32
const BPF_NEG = 128
const BPF_OR = 64
const BPF_RET = 6
const BPF_RSH = 112
const BPF_ST = 2
const BPF_STX = 3
const BPF_SUB = 16
const BPF_TAX = 0
const BPF_TXA = 128
const BPF_W = 0
const BPF_X = 8
const BRKINT = 2
func BytePtrFromString(s string) (*byte, 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).
func ByteSliceFromString(s string) ([]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).
func Clearenv()
const CLOCAL = 2048
const CLONE_CHILD_CLEARTID = 2097152
const CLONE_CHILD_SETTID = 16777216
const CLONE_DETACHED = 4194304
const CLONE_FILES = 1024
const CLONE_FS = 512
const CLONE_IO = 2147483648
const CLONE_NEWIPC = 134217728
const CLONE_NEWNET = 1073741824
const CLONE_NEWNS = 131072
const CLONE_NEWPID = 536870912
const CLONE_NEWUSER = 268435456
const CLONE_NEWUTS = 67108864
const CLONE_PARENT = 32768
const CLONE_PARENT_SETTID = 1048576
const CLONE_PTRACE = 8192
const CLONE_SETTLS = 524288
const CLONE_SIGHAND = 2048
const CLONE_SYSVSEM = 262144
const CLONE_THREAD = 65536
const CLONE_UNTRACED = 8388608
const CLONE_VFORK = 16384
const CLONE_VM = 256
func CloseOnExec(fd int)
func CmsgLen(datalen int) int
CmsgLen returns the value to store in the Len field of the Cmsghdr
structure, taking into account any necessary alignment.
func CmsgSpace(datalen int) int
CmsgSpace returns the number of bytes an ancillary element with
payload of the passed data length occupies.
const CREAD = 128
const CS5 = 0
const CS6 = 16
const CS7 = 32
const CS8 = 48
const CSIZE = 48
const CSTOPB = 64
const DT_BLK = 6
const DT_CHR = 2
const DT_DIR = 4
const DT_FIFO = 1
const DT_LNK = 10
const DT_REG = 8
const DT_SOCK = 12
const DT_UNKNOWN = 0
const DT_WHT = 14
const EADDRINUSE Errno = 98
Errors
const EADDRNOTAVAIL Errno = 99
Errors
const EAFNOSUPPORT Errno = 97
Errors
const ECHO = 8
const ECHOCTL = 512
const ECHOE = 16
const ECHOK = 32
const ECHOKE = 2048
const ECHONL = 64
const ECHOPRT = 1024
const ECONNABORTED Errno = 103
Errors
const ECONNREFUSED Errno = 111
Errors
const ECONNRESET Errno = 104
Errors
const EDESTADDRREQ Errno = 89
Errors
const EHOSTUNREACH Errno = 113
Errors
const EINPROGRESS Errno = 115
Errors
const EKEYEXPIRED Errno = 127
Errors
const EKEYREJECTED Errno = 129
Errors
const EKEYREVOKED Errno = 128
Errors
const EMEDIUMTYPE Errno = 124
Errors
const ENAMETOOLONG Errno = 36
Errors
const ENETUNREACH Errno = 101
Errors
const ENOPROTOOPT Errno = 92
Errors
const ENOTRECOVERABLE Errno = 131
Errors
const EOPNOTSUPP Errno = 95
Errors
const EOWNERDEAD Errno = 130
Errors
const EPFNOSUPPORT Errno = 96
Errors
const EPOLL_CLOEXEC = 524288
const EPOLL_CTL_ADD = 1
const EPOLL_CTL_DEL = 2
const EPOLL_CTL_MOD = 3
const EPOLL_NONBLOCK = 2048
const EPOLLERR = 8
const EPOLLET = -2147483648
const EPOLLHUP = 16
const EPOLLIN = 1
const EPOLLMSG = 1024
const EPOLLONESHOT = 1073741824
const EPOLLOUT = 4
const EPOLLPRI = 2
const EPOLLRDBAND = 128
const EPOLLRDHUP = 8192
const EPOLLRDNORM = 64
const EPOLLWRBAND = 512
const EPOLLWRNORM = 256
const EPROTONOSUPPORT Errno = 93
Errors
const EPROTOTYPE Errno = 91
Errors
const ESOCKTNOSUPPORT Errno = 94
Errors
const ETH_P_1588 = 35063
const ETH_P_8021Q = 33024
const ETH_P_802_2 = 4
const ETH_P_802_3 = 1
const ETH_P_AARP = 33011
const ETH_P_ALL = 3
const ETH_P_AOE = 34978
const ETH_P_ARCNET = 26
const ETH_P_ARP = 2054
const ETH_P_ATALK = 32923
const ETH_P_ATMFATE = 34948
const ETH_P_ATMMPOA = 34892
const ETH_P_AX25 = 2
const ETH_P_BPQ = 2303
const ETH_P_CAIF = 247
const ETH_P_CAN = 12
const ETH_P_CONTROL = 22
const ETH_P_CUST = 24582
const ETH_P_DDCMP = 6
const ETH_P_DEC = 24576
const ETH_P_DIAG = 24581
const ETH_P_DNA_DL = 24577
const ETH_P_DNA_RC = 24578
const ETH_P_DNA_RT = 24579
const ETH_P_DSA = 27
const ETH_P_ECONET = 24
const ETH_P_EDSA = 56026
const ETH_P_FCOE = 35078
const ETH_P_FIP = 35092
const ETH_P_HDLC = 25
const ETH_P_IEEE802154 = 246
const ETH_P_IEEEPUP = 2560
const ETH_P_IEEEPUPAT = 2561
const ETH_P_IP = 2048
const ETH_P_IPV6 = 34525
const ETH_P_IPX = 33079
const ETH_P_IRDA = 23
const ETH_P_LAT = 24580
const ETH_P_LINK_CTL = 34924
const ETH_P_LOCALTALK = 9
const ETH_P_LOOP = 96
const ETH_P_MOBITEX = 21
const ETH_P_MPLS_MC = 34888
const ETH_P_MPLS_UC = 34887
const ETH_P_PAE = 34958
const ETH_P_PAUSE = 34824
const ETH_P_PHONET = 245
const ETH_P_PPP_DISC = 34915
const ETH_P_PPP_MP = 8
const ETH_P_PPP_SES = 34916
const ETH_P_PPPTALK = 16
const ETH_P_PUP = 512
const ETH_P_PUPAT = 513
const ETH_P_RARP = 32821
const ETH_P_SCA = 24583
const ETH_P_SLOW = 34825
const ETH_P_SNAP = 5
const ETH_P_TEB = 25944
const ETH_P_TIPC = 35018
const ETH_P_TR_802_2 = 17
const ETH_P_TRAILER = 28
const ETH_P_WAN_PPP = 7
const ETH_P_WCCP = 34878
const ETH_P_X25 = 2053
const ETOOMANYREFS Errno = 109
Errors
const EWOULDBLOCK Errno = 11
Errors
func Exec(argv0 string, argv []string, envv []string) (err error)
Exec invokes the execve(2) system call.
const F_DUPFD = 0
const F_DUPFD_CLOEXEC = 1030
const F_EXLCK = 4
const F_GETFD = 1
const F_GETFL = 3
const F_GETLEASE = 1025
const F_GETLK = 5
const F_GETLK64 = 5
const F_GETOWN = 9
const F_GETOWN_EX = 16
const F_GETPIPE_SZ = 1032
const F_GETSIG = 11
const F_LOCK = 1
const F_NOTIFY = 1026
const F_OK = 0
const F_RDLCK = 0
const F_SETFD = 2
const F_SETFL = 4
const F_SETLEASE = 1024
const F_SETLK = 6
const F_SETLK64 = 6
const F_SETLKW = 7
const F_SETLKW64 = 7
const F_SETOWN = 8
const F_SETOWN_EX = 15
const F_SETPIPE_SZ = 1031
const F_SETSIG = 10
const F_SHLCK = 8
const F_TEST = 3
const F_TLOCK = 2
const F_ULOCK = 0
const F_UNLCK = 2
const F_WRLCK = 1
func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error
FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
const FD_CLOEXEC = 1
const FD_SETSIZE = 1024
const FLUSHO = 4096
func ForkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error)
Combination of fork and exec, careful to be thread safe.
func Getpagesize() int
const HUPCL = 1024
const ICANON = 2
const ICMPV6_FILTER = 1
const ICRNL = 256
const IEXTEN = 32768
const IFA_ADDRESS = 1
const IFA_ANYCAST = 5
const IFA_BROADCAST = 4
const IFA_CACHEINFO = 6
const IFA_F_DADFAILED = 8
const IFA_F_DEPRECATED = 32
const IFA_F_HOMEADDRESS = 16
const IFA_F_NODAD = 2
const IFA_F_OPTIMISTIC = 4
const IFA_F_PERMANENT = 128
const IFA_F_SECONDARY = 1
const IFA_F_TEMPORARY = 1
const IFA_F_TENTATIVE = 64
const IFA_LABEL = 3
const IFA_LOCAL = 2
const IFA_MAX = 7
const IFA_MULTICAST = 7
const IFA_UNSPEC = 0
const IFF_ALLMULTI = 512
const IFF_AUTOMEDIA = 16384
const IFF_BROADCAST = 2
const IFF_DEBUG = 4
const IFF_DYNAMIC = 32768
const IFF_LOOPBACK = 8
const IFF_MASTER = 1024
const IFF_MULTICAST = 4096
const IFF_NO_PI = 4096
const IFF_NOARP = 128
const IFF_NOTRAILERS = 32
const IFF_ONE_QUEUE = 8192
const IFF_POINTOPOINT = 16
const IFF_PORTSEL = 8192
const IFF_PROMISC = 256
const IFF_RUNNING = 64
const IFF_SLAVE = 2048
const IFF_TAP = 2
const IFF_TUN = 1
const IFF_TUN_EXCL = 32768
const IFF_UP = 1
const IFF_VNET_HDR = 16384
const IFLA_ADDRESS = 1
const IFLA_BROADCAST = 2
const IFLA_COST = 8
const IFLA_IFALIAS = 20
const IFLA_IFNAME = 3
const IFLA_LINK = 5
const IFLA_LINKINFO = 18
const IFLA_LINKMODE = 17
const IFLA_MAP = 14
const IFLA_MASTER = 10
const IFLA_MAX = 29
const IFLA_MTU = 4
const IFLA_NET_NS_PID = 19
const IFLA_OPERSTATE = 16
const IFLA_PRIORITY = 9
const IFLA_PROTINFO = 12
const IFLA_QDISC = 6
const IFLA_STATS = 7
const IFLA_TXQLEN = 13
const IFLA_UNSPEC = 0
const IFLA_WEIGHT = 15
const IFLA_WIRELESS = 11
const IFNAMSIZ = 16
const IGNBRK = 1
const IGNCR = 128
const IGNPAR = 4
const IMAXBEL = 8192
const ImplementsGetwd = true
const IN_ACCESS = 1
const IN_ALL_EVENTS = 4095
const IN_ATTRIB = 4
const IN_CLASSA_HOST = 16777215
const IN_CLASSA_MAX = 128
const IN_CLASSA_NET = 4278190080
const IN_CLASSA_NSHIFT = 24
const IN_CLASSB_HOST = 65535
const IN_CLASSB_MAX = 65536
const IN_CLASSB_NET = 4294901760
const IN_CLASSB_NSHIFT = 16
const IN_CLASSC_HOST = 255
const IN_CLASSC_NET = 4294967040
const IN_CLASSC_NSHIFT = 8
const IN_CLOEXEC = 524288
const IN_CLOSE = 24
const IN_CLOSE_NOWRITE = 16
const IN_CLOSE_WRITE = 8
const IN_CREATE = 256
const IN_DELETE = 512
const IN_DELETE_SELF = 1024
const IN_DONT_FOLLOW = 33554432
const IN_EXCL_UNLINK = 67108864
const IN_IGNORED = 32768
const IN_ISDIR = 1073741824
const IN_LOOPBACKNET = 127
const IN_MASK_ADD = 536870912
const IN_MODIFY = 2
const IN_MOVE = 192
const IN_MOVE_SELF = 2048
const IN_MOVED_FROM = 64
const IN_MOVED_TO = 128
const IN_NONBLOCK = 2048
const IN_ONESHOT = 2147483648
const IN_ONLYDIR = 16777216
const IN_OPEN = 32
const IN_Q_OVERFLOW = 16384
const IN_UNMOUNT = 8192
const INLCR = 64
const INPCK = 16
const IP_ADD_MEMBERSHIP = 35
const IP_ADD_SOURCE_MEMBERSHIP = 39
const IP_BLOCK_SOURCE = 38
const IP_DEFAULT_MULTICAST_LOOP = 1
const IP_DEFAULT_MULTICAST_TTL = 1
const IP_DF = 16384
const IP_DROP_MEMBERSHIP = 36
const IP_DROP_SOURCE_MEMBERSHIP = 40
const IP_FREEBIND = 15
const IP_HDRINCL = 3
const IP_IPSEC_POLICY = 16
const IP_MAX_MEMBERSHIPS = 20
const IP_MAXPACKET = 65535
const IP_MF = 8192
const IP_MINTTL = 21
const IP_MSFILTER = 41
const IP_MSS = 576
const IP_MTU = 14
const IP_MTU_DISCOVER = 10
const IP_MULTICAST_IF = 32
const IP_MULTICAST_LOOP = 34
const IP_MULTICAST_TTL = 33
const IP_OFFMASK = 8191
const IP_OPTIONS = 4
const IP_ORIGDSTADDR = 20
const IP_PASSSEC = 18
const IP_PKTINFO = 8
const IP_PKTOPTIONS = 9
const IP_PMTUDISC = 10
const IP_PMTUDISC_DO = 2
const IP_PMTUDISC_DONT = 0
const IP_PMTUDISC_PROBE = 3
const IP_PMTUDISC_WANT = 1
const IP_RECVERR = 11
const IP_RECVOPTS = 6
const IP_RECVORIGDSTADDR = 20
const IP_RECVRETOPTS = 7
const IP_RECVTOS = 13
const IP_RECVTTL = 12
const IP_RETOPTS = 7
const IP_RF = 32768
const IP_ROUTER_ALERT = 5
const IP_TOS = 1
const IP_TRANSPARENT = 19
const IP_TTL = 2
const IP_UNBLOCK_SOURCE = 37
const IP_XFRM_POLICY = 17
const IPPROTO_AH = 51
const IPPROTO_COMP = 108
const IPPROTO_DCCP = 33
const IPPROTO_DSTOPTS = 60
const IPPROTO_EGP = 8
const IPPROTO_ENCAP = 98
const IPPROTO_ESP = 50
const IPPROTO_FRAGMENT = 44
const IPPROTO_GRE = 47
const IPPROTO_HOPOPTS = 0
const IPPROTO_ICMP = 1
const IPPROTO_ICMPV6 = 58
const IPPROTO_IDP = 22
const IPPROTO_IGMP = 2
const IPPROTO_IP = 0
const IPPROTO_IPIP = 4
const IPPROTO_IPV6 = 41
const IPPROTO_MTP = 92
const IPPROTO_NONE = 59
const IPPROTO_PIM = 103
const IPPROTO_PUP = 12
const IPPROTO_RAW = 255
const IPPROTO_ROUTING = 43
const IPPROTO_RSVP = 46
const IPPROTO_SCTP = 132
const IPPROTO_TCP = 6
const IPPROTO_TP = 29
const IPPROTO_UDP = 17
const IPPROTO_UDPLITE = 136
const IPV6_2292DSTOPTS = 4
const IPV6_2292HOPLIMIT = 8
const IPV6_2292HOPOPTS = 3
const IPV6_2292PKTINFO = 2
const IPV6_2292PKTOPTIONS = 6
const IPV6_2292RTHDR = 5
const IPV6_ADD_MEMBERSHIP = 20
const IPV6_ADDRFORM = 1
const IPV6_AUTHHDR = 10
const IPV6_CHECKSUM = 7
const IPV6_DROP_MEMBERSHIP = 21
const IPV6_DSTOPTS = 59
const IPV6_HOPLIMIT = 52
const IPV6_HOPOPTS = 54
const IPV6_IPSEC_POLICY = 34
const IPV6_JOIN_ANYCAST = 27
const IPV6_JOIN_GROUP = 20
const IPV6_LEAVE_ANYCAST = 28
const IPV6_LEAVE_GROUP = 21
const IPV6_MTU = 24
const IPV6_MTU_DISCOVER = 23
const IPV6_MULTICAST_HOPS = 18
const IPV6_MULTICAST_IF = 17
const IPV6_MULTICAST_LOOP = 19
const IPV6_NEXTHOP = 9
const IPV6_PKTINFO = 50
const IPV6_PMTUDISC_DO = 2
const IPV6_PMTUDISC_DONT = 0
const IPV6_PMTUDISC_PROBE = 3
const IPV6_PMTUDISC_WANT = 1
const IPV6_RECVDSTOPTS = 58
const IPV6_RECVERR = 25
const IPV6_RECVHOPLIMIT = 51
const IPV6_RECVHOPOPTS = 53
const IPV6_RECVPKTINFO = 49
const IPV6_RECVRTHDR = 56
const IPV6_RECVTCLASS = 66
const IPV6_ROUTER_ALERT = 22
const IPV6_RTHDR = 57
const IPV6_RTHDR_LOOSE = 0
const IPV6_RTHDR_STRICT = 1
const IPV6_RTHDR_TYPE_0 = 0
const IPV6_RTHDRDSTOPTS = 55
const IPV6_RXDSTOPTS = 59
const IPV6_RXHOPOPTS = 54
const IPV6_TCLASS = 67
const IPV6_UNICAST_HOPS = 16
const IPV6_V6ONLY = 26
const IPV6_XFRM_POLICY = 35
const ISIG = 1
const ISTRIP = 32
const IUCLC = 512
const IUTF8 = 16384
const IXANY = 2048
const IXOFF = 4096
const IXON = 1024
const LINUX_REBOOT_CMD_CAD_OFF = 0
const LINUX_REBOOT_CMD_CAD_ON = 2309737967
const LINUX_REBOOT_CMD_HALT = 3454992675
const LINUX_REBOOT_CMD_KEXEC = 1163412803
const LINUX_REBOOT_CMD_POWER_OFF = 1126301404
const LINUX_REBOOT_CMD_RESTART = 19088743
const LINUX_REBOOT_CMD_RESTART2 = 2712847316
const LINUX_REBOOT_CMD_SW_SUSPEND = 3489725666
const LINUX_REBOOT_MAGIC1 = 4276215469
const LINUX_REBOOT_MAGIC2 = 672274793
const LOCK_EX = 2
const LOCK_NB = 4
const LOCK_SH = 1
const LOCK_UN = 8
const MADV_DOFORK = 11
const MADV_DONTFORK = 10
const MADV_DONTNEED = 4
const MADV_HUGEPAGE = 14
const MADV_HWPOISON = 100
const MADV_MERGEABLE = 12
const MADV_NOHUGEPAGE = 15
const MADV_NORMAL = 0
const MADV_RANDOM = 1
const MADV_REMOVE = 9
const MADV_SEQUENTIAL = 2
const MADV_UNMERGEABLE = 13
const MADV_WILLNEED = 3
const MAP_32BIT = 64
const MAP_ANON = 32
const MAP_ANONYMOUS = 32
const MAP_DENYWRITE = 2048
const MAP_EXECUTABLE = 4096
const MAP_FILE = 0
const MAP_FIXED = 16
const MAP_GROWSDOWN = 256
const MAP_HUGETLB = 262144
const MAP_LOCKED = 8192
const MAP_NONBLOCK = 65536
const MAP_NORESERVE = 16384
const MAP_POPULATE = 32768
const MAP_PRIVATE = 2
const MAP_SHARED = 1
const MAP_STACK = 131072
const MAP_TYPE = 15
const MCL_CURRENT = 1
const MCL_FUTURE = 2
const MNT_DETACH = 2
const MNT_EXPIRE = 4
const MNT_FORCE = 1
const MS_ACTIVE = 1073741824
const MS_ASYNC = 1
const MS_BIND = 4096
const MS_DIRSYNC = 128
const MS_I_VERSION = 8388608
const MS_INVALIDATE = 2
const MS_KERNMOUNT = 4194304
const MS_MANDLOCK = 64
const MS_MGC_MSK = 4294901760
const MS_MGC_VAL = 3236757504
const MS_MOVE = 8192
const MS_NOATIME = 1024
const MS_NODEV = 4
const MS_NODIRATIME = 2048
const MS_NOEXEC = 8
const MS_NOSUID = 2
const MS_NOUSER = -2147483648
const MS_POSIXACL = 65536
const MS_PRIVATE = 262144
const MS_RDONLY = 1
const MS_REC = 16384
const MS_RELATIME = 2097152
const MS_REMOUNT = 32
const MS_RMT_MASK = 8388689
const MS_SHARED = 1048576
const MS_SILENT = 32768
const MS_SLAVE = 524288
const MS_STRICTATIME = 16777216
const MS_SYNC = 4
const MS_SYNCHRONOUS = 16
const MS_UNBINDABLE = 131072
const MSG_CMSG_CLOEXEC = 1073741824
const MSG_CONFIRM = 2048
const MSG_CTRUNC = 8
const MSG_DONTROUTE = 4
const MSG_DONTWAIT = 64
const MSG_EOR = 128
const MSG_ERRQUEUE = 8192
const MSG_FASTOPEN = 536870912
const MSG_FIN = 512
const MSG_MORE = 32768
const MSG_NOSIGNAL = 16384
const MSG_OOB = 1
const MSG_PEEK = 2
const MSG_PROXY = 16
const MSG_RST = 4096
const MSG_SYN = 1024
const MSG_TRUNC = 32
const MSG_TRYHARD = 4
const MSG_WAITALL = 256
const MSG_WAITFORONE = 65536
func Munlockall() (err error)
const NAME_MAX = 255
const NETLINK_ADD_MEMBERSHIP = 1
const NETLINK_AUDIT = 9
const NETLINK_BROADCAST_ERROR = 4
const NETLINK_CONNECTOR = 11
const NETLINK_DNRTMSG = 14
const NETLINK_DROP_MEMBERSHIP = 2
const NETLINK_ECRYPTFS = 19
const NETLINK_FIB_LOOKUP = 10
const NETLINK_FIREWALL = 3
const NETLINK_GENERIC = 16
const NETLINK_INET_DIAG = 4
const NETLINK_IP6_FW = 13
const NETLINK_ISCSI = 8
const NETLINK_KOBJECT_UEVENT = 15
const NETLINK_NETFILTER = 12
const NETLINK_NFLOG = 5
const NETLINK_NO_ENOBUFS = 5
const NETLINK_PKTINFO = 3
const NETLINK_ROUTE = 0
const NETLINK_SCSITRANSPORT = 18
const NETLINK_SELINUX = 7
const NETLINK_UNUSED = 1
const NETLINK_USERSOCK = 2
const NETLINK_XFRM = 6
func NetlinkRIB(proto, family int) ([]byte, error)
NetlinkRIB returns routing information base, as known as RIB, which
consists of network facility information, states and parameters.
const NLA_ALIGNTO = 4
const NLA_F_NESTED = 32768
const NLA_F_NET_BYTEORDER = 16384
const NLA_HDRLEN = 4
const NLM_F_ACK = 4
const NLM_F_APPEND = 2048
const NLM_F_ATOMIC = 1024
const NLM_F_CREATE = 1024
const NLM_F_DUMP = 768
const NLM_F_ECHO = 8
const NLM_F_EXCL = 512
const NLM_F_MATCH = 512
const NLM_F_MULTI = 2
const NLM_F_REPLACE = 256
const NLM_F_REQUEST = 1
const NLM_F_ROOT = 256
const NLMSG_ALIGNTO = 4
const NLMSG_DONE = 3
const NLMSG_ERROR = 2
const NLMSG_HDRLEN = 16
const NLMSG_MIN_TYPE = 16
const NLMSG_NOOP = 1
const NLMSG_OVERRUN = 4
const NOFLSH = 128
func NsecToTimespec(nsec int64) Timespec
NsecToTimespec takes a number of nanoseconds since the Unix epoch
and returns the corresponding Timespec value.
func NsecToTimeval(nsec int64) Timeval
NsecToTimeval takes a number of nanoseconds since the Unix epoch
and returns the corresponding Timeval value.
const O_ACCMODE = 3
const O_APPEND = 1024
const O_ASYNC = 8192
const O_CLOEXEC = 524288
const O_CREAT = 64
const O_DIRECT = 16384
const O_DIRECTORY = 65536
const O_DSYNC = 4096
const O_EXCL = 128
const O_FSYNC = 1052672
const O_LARGEFILE = 0
const O_NDELAY = 2048
const O_NOATIME = 262144
const O_NOCTTY = 256
const O_NOFOLLOW = 131072
const O_NONBLOCK = 2048
const O_RDONLY = 0
const O_RDWR = 2
const O_RSYNC = 1052672
const O_SYNC = 1052672
const O_TRUNC = 512
const O_WRONLY = 1
const OCRNL = 8
const OFDEL = 128
const OFILL = 64
const OLCUC = 2
const ONLCR = 4
const ONLRET = 32
const ONOCR = 16
const OPOST = 1
const PACKET_ADD_MEMBERSHIP = 1
const PACKET_BROADCAST = 1
const PACKET_DROP_MEMBERSHIP = 2
const PACKET_FASTROUTE = 6
const PACKET_HOST = 0
const PACKET_LOOPBACK = 5
const PACKET_MR_ALLMULTI = 2
const PACKET_MR_MULTICAST = 0
const PACKET_MR_PROMISC = 1
const PACKET_MULTICAST = 2
const PACKET_OTHERHOST = 3
const PACKET_OUTGOING = 4
const PACKET_RECV_OUTPUT = 3
const PACKET_RX_RING = 5
const PACKET_STATISTICS = 6
const PARENB = 256
const PARMRK = 8
const PARODD = 512
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string)
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.
func ParseNetlinkMessage(b []byte) ([]NetlinkMessage, error)
ParseNetlinkMessage parses b as an array of netlink messages and
returns the slice containing the NetlinkMessage structures.
func ParseNetlinkRouteAttr(m *NetlinkMessage) ([]NetlinkRouteAttr, error)
ParseNetlinkRouteAttr parses m's payload as an array of netlink
route attributes and returns the slice containing the
NetlinkRouteAttr structures.
func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error)
ParseSocketControlMessage parses b as an array of socket control
messages.
func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error)
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.
func ParseUnixRights(m *SocketControlMessage) ([]int, error)
ParseUnixRights decodes a socket control message that contains an
integer array of open file descriptors from another process.
const PathMax = 4096
const PENDIN = 16384
const PR_CAPBSET_DROP = 24
const PR_CAPBSET_READ = 23
const PR_ENDIAN_BIG = 0
const PR_ENDIAN_LITTLE = 1
const PR_ENDIAN_PPC_LITTLE = 2
const PR_FP_EXC_ASYNC = 2
const PR_FP_EXC_DISABLED = 0
const PR_FP_EXC_DIV = 65536
const PR_FP_EXC_INV = 1048576
const PR_FP_EXC_NONRECOV = 1
const PR_FP_EXC_OVF = 131072
const PR_FP_EXC_PRECISE = 3
const PR_FP_EXC_RES = 524288
const PR_FP_EXC_SW_ENABLE = 128
const PR_FP_EXC_UND = 262144
const PR_FPEMU_NOPRINT = 1
const PR_FPEMU_SIGFPE = 2
const PR_GET_DUMPABLE = 3
const PR_GET_ENDIAN = 19
const PR_GET_FPEMU = 9
const PR_GET_FPEXC = 11
const PR_GET_KEEPCAPS = 7
const PR_GET_NAME = 16
const PR_GET_PDEATHSIG = 2
const PR_GET_SECCOMP = 21
const PR_GET_SECUREBITS = 27
const PR_GET_TIMERSLACK = 30
const PR_GET_TIMING = 13
const PR_GET_TSC = 25
const PR_GET_UNALIGN = 5
const PR_MCE_KILL = 33
const PR_MCE_KILL_CLEAR = 0
const PR_MCE_KILL_DEFAULT = 2
const PR_MCE_KILL_EARLY = 1
const PR_MCE_KILL_GET = 34
const PR_MCE_KILL_LATE = 0
const PR_MCE_KILL_SET = 1
const PR_SET_DUMPABLE = 4
const PR_SET_ENDIAN = 20
const PR_SET_FPEMU = 10
const PR_SET_FPEXC = 12
const PR_SET_KEEPCAPS = 8
const PR_SET_NAME = 15
const PR_SET_PDEATHSIG = 1
const PR_SET_PTRACER = 1499557217
const PR_SET_SECCOMP = 22
const PR_SET_SECUREBITS = 28
const PR_SET_TIMERSLACK = 29
const PR_SET_TIMING = 14
const PR_SET_TSC = 26
const PR_SET_UNALIGN = 6
const PR_TASK_PERF_EVENTS_DISABLE = 31
const PR_TASK_PERF_EVENTS_ENABLE = 32
const PR_TIMING_STATISTICAL = 0
const PR_TIMING_TIMESTAMP = 1
const PR_TSC_ENABLE = 1
const PR_TSC_SIGSEGV = 2
const PR_UNALIGN_NOPRINT = 1
const PR_UNALIGN_SIGBUS = 2
const PRIO_PGRP = 1
const PRIO_PROCESS = 0
const PRIO_USER = 2
const PROT_EXEC = 4
const PROT_GROWSDOWN = 16777216
const PROT_GROWSUP = 33554432
const PROT_NONE = 0
const PROT_READ = 1
const PROT_WRITE = 2
const PTRACE_ARCH_PRCTL = 30
const PTRACE_ATTACH = 16
const PTRACE_CONT = 7
const PTRACE_DETACH = 17
const PTRACE_EVENT_CLONE = 3
const PTRACE_EVENT_EXEC = 4
const PTRACE_EVENT_EXIT = 6
const PTRACE_EVENT_FORK = 1
const PTRACE_EVENT_VFORK = 2
const PTRACE_EVENT_VFORK_DONE = 5
const PTRACE_GET_THREAD_AREA = 25
const PTRACE_GETEVENTMSG = 16897
const PTRACE_GETFPREGS = 14
const PTRACE_GETFPXREGS = 18
const PTRACE_GETREGS = 12
const PTRACE_GETREGSET = 16900
const PTRACE_GETSIGINFO = 16898
const PTRACE_KILL = 8
const PTRACE_O_MASK = 127
const PTRACE_O_TRACECLONE = 8
const PTRACE_O_TRACEEXEC = 16
const PTRACE_O_TRACEEXIT = 64
const PTRACE_O_TRACEFORK = 2
const PTRACE_O_TRACESYSGOOD = 1
const PTRACE_O_TRACEVFORK = 4
const PTRACE_O_TRACEVFORKDONE = 32
const PTRACE_OLDSETOPTIONS = 21
const PTRACE_PEEKDATA = 2
const PTRACE_PEEKTEXT = 1
const PTRACE_PEEKUSR = 3
const PTRACE_POKEDATA = 5
const PTRACE_POKETEXT = 4
const PTRACE_POKEUSR = 6
const PTRACE_SET_THREAD_AREA = 26
const PTRACE_SETFPREGS = 15
const PTRACE_SETFPXREGS = 19
const PTRACE_SETOPTIONS = 16896
const PTRACE_SETREGS = 13
const PTRACE_SETREGSET = 16901
const PTRACE_SETSIGINFO = 16899
const PTRACE_SINGLEBLOCK = 33
const PTRACE_SINGLESTEP = 9
const PTRACE_SYSCALL = 24
const PTRACE_SYSEMU = 31
const PTRACE_SYSEMU_SINGLESTEP = 32
const PTRACE_TRACEME = 0
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error)
const RLIM_INFINITY = -1
const RLIMIT_AS = 9
const RLIMIT_CORE = 4
const RLIMIT_CPU = 0
const RLIMIT_DATA = 2
const RLIMIT_FSIZE = 1
const RLIMIT_NOFILE = 7
const RLIMIT_STACK = 3
const RT_CLASS_DEFAULT = 253
const RT_CLASS_LOCAL = 255
const RT_CLASS_MAIN = 254
const RT_CLASS_MAX = 255
const RT_CLASS_UNSPEC = 0
const RT_SCOPE_HOST = 254
const RT_SCOPE_LINK = 253
const RT_SCOPE_NOWHERE = 255
const RT_SCOPE_SITE = 200
const RT_SCOPE_UNIVERSE = 0
const RT_TABLE_COMPAT = 252
const RT_TABLE_DEFAULT = 253
const RT_TABLE_LOCAL = 255
const RT_TABLE_MAIN = 254
const RT_TABLE_MAX = 4294967295
const RT_TABLE_UNSPEC = 0
const RTA_ALIGNTO = 4
const RTA_CACHEINFO = 12
const RTA_DST = 1
const RTA_FLOW = 11
const RTA_GATEWAY = 5
const RTA_IIF = 3
const RTA_MAX = 16
const RTA_METRICS = 8
const RTA_MULTIPATH = 9
const RTA_OIF = 4
const RTA_PREFSRC = 7
const RTA_PRIORITY = 6
const RTA_SRC = 2
const RTA_TABLE = 15
const RTA_UNSPEC = 0
const RTAX_ADVMSS = 8
const RTAX_CWND = 7
const RTAX_FEATURE_ALLFRAG = 8
const RTAX_FEATURE_ECN = 1
const RTAX_FEATURE_SACK = 2
const RTAX_FEATURE_TIMESTAMP = 4
const RTAX_FEATURES = 12
const RTAX_HOPLIMIT = 10
const RTAX_INITCWND = 11
const RTAX_INITRWND = 14
const RTAX_LOCK = 1
const RTAX_MAX = 14
const RTAX_MTU = 2
const RTAX_REORDERING = 9
const RTAX_RTO_MIN = 13
const RTAX_RTT = 4
const RTAX_RTTVAR = 5
const RTAX_SSTHRESH = 6
const RTAX_UNSPEC = 0
const RTAX_WINDOW = 3
const RTCF_DIRECTSRC = 67108864
const RTCF_DOREDIRECT = 16777216
const RTCF_LOG = 33554432
const RTCF_MASQ = 4194304
const RTCF_NAT = 8388608
const RTCF_VALVE = 2097152
const RTF_ADDRCLASSMASK = 4160749568
const RTF_ADDRCONF = 262144
const RTF_ALLONLINK = 131072
const RTF_BROADCAST = 268435456
const RTF_CACHE = 16777216
const RTF_DEFAULT = 65536
const RTF_DYNAMIC = 16
const RTF_FLOW = 33554432
const RTF_GATEWAY = 2
const RTF_HOST = 4
const RTF_INTERFACE = 1073741824
const RTF_IRTT = 256
const RTF_LINKRT = 1048576
const RTF_LOCAL = 2147483648
const RTF_MODIFIED = 32
const RTF_MSS = 64
const RTF_MTU = 64
const RTF_MULTICAST = 536870912
const RTF_NAT = 134217728
const RTF_NOFORWARD = 4096
const RTF_NONEXTHOP = 2097152
const RTF_NOPMTUDISC = 16384
const RTF_POLICY = 67108864
const RTF_REINSTATE = 8
const RTF_REJECT = 512
const RTF_STATIC = 1024
const RTF_THROW = 8192
const RTF_UP = 1
const RTF_WINDOW = 128
const RTF_XRESOLVE = 2048
const RTM_BASE = 16
const RTM_DELACTION = 49
const RTM_DELADDR = 21
const RTM_DELADDRLABEL = 73
const RTM_DELLINK = 17
const RTM_DELNEIGH = 29
const RTM_DELQDISC = 37
const RTM_DELROUTE = 25
const RTM_DELRULE = 33
const RTM_DELTCLASS = 41
const RTM_DELTFILTER = 45
const RTM_F_CLONED = 512
const RTM_F_EQUALIZE = 1024
const RTM_F_NOTIFY = 256
const RTM_F_PREFIX = 2048
const RTM_GETACTION = 50
const RTM_GETADDR = 22
const RTM_GETADDRLABEL = 74
const RTM_GETANYCAST = 62
const RTM_GETDCB = 78
const RTM_GETLINK = 18
const RTM_GETMULTICAST = 58
const RTM_GETNEIGH = 30
const RTM_GETNEIGHTBL = 66
const RTM_GETQDISC = 38
const RTM_GETROUTE = 26
const RTM_GETRULE = 34
const RTM_GETTCLASS = 42
const RTM_GETTFILTER = 46
const RTM_MAX = 79
const RTM_NEWACTION = 48
const RTM_NEWADDR = 20
const RTM_NEWADDRLABEL = 72
const RTM_NEWLINK = 16
const RTM_NEWNDUSEROPT = 68
const RTM_NEWNEIGH = 28
const RTM_NEWNEIGHTBL = 64
const RTM_NEWPREFIX = 52
const RTM_NEWQDISC = 36
const RTM_NEWROUTE = 24
const RTM_NEWRULE = 32
const RTM_NEWTCLASS = 40
const RTM_NEWTFILTER = 44
const RTM_NR_FAMILIES = 16
const RTM_NR_MSGTYPES = 64
const RTM_SETDCB = 79
const RTM_SETLINK = 19
const RTM_SETNEIGHTBL = 67
const RTN_ANYCAST = 4
const RTN_BLACKHOLE = 6
const RTN_BROADCAST = 3
const RTN_LOCAL = 2
const RTN_MAX = 11
const RTN_MULTICAST = 5
const RTN_NAT = 10
const RTN_PROHIBIT = 8
const RTN_THROW = 9
const RTN_UNICAST = 1
const RTN_UNREACHABLE = 7
const RTN_UNSPEC = 0
const RTN_XRESOLVE = 11
const RTNH_ALIGNTO = 4
const RTNH_F_DEAD = 1
const RTNH_F_ONLINK = 4
const RTNH_F_PERVASIVE = 2
const RTNLGRP_IPV4_IFADDR = 5
const RTNLGRP_IPV4_MROUTE = 6
const RTNLGRP_IPV4_ROUTE = 7
const RTNLGRP_IPV4_RULE = 8
const RTNLGRP_IPV6_IFADDR = 9
const RTNLGRP_IPV6_IFINFO = 12
const RTNLGRP_IPV6_MROUTE = 10
const RTNLGRP_IPV6_PREFIX = 18
const RTNLGRP_IPV6_ROUTE = 11
const RTNLGRP_IPV6_RULE = 19
const RTNLGRP_LINK = 1
const RTNLGRP_ND_USEROPT = 20
const RTNLGRP_NEIGH = 3
const RTNLGRP_NONE = 0
const RTNLGRP_NOTIFY = 2
const RTNLGRP_TC = 4
const RTPROT_BIRD = 12
const RTPROT_BOOT = 3
const RTPROT_DHCP = 16
const RTPROT_DNROUTED = 13
const RTPROT_GATED = 8
const RTPROT_KERNEL = 2
const RTPROT_MRT = 10
const RTPROT_NTK = 15
const RTPROT_RA = 9
const RTPROT_REDIRECT = 1
const RTPROT_STATIC = 4
const RTPROT_UNSPEC = 0
const RTPROT_XORP = 14
const RTPROT_ZEBRA = 11
const RUSAGE_CHILDREN = -1
const RUSAGE_SELF = 0
const RUSAGE_THREAD = 1
const S_BLKSIZE = 512
const S_IEXEC = 64
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_IRGRP = 32
const S_IROTH = 4
const S_IRUSR = 256
const S_IRWXG = 56
const S_IRWXO = 7
const S_IRWXU = 448
const S_ISGID = 1024
const S_ISUID = 2048
const S_ISVTX = 512
const S_IWGRP = 16
const S_IWOTH = 2
const S_IWRITE = 128
const S_IWUSR = 128
const S_IXGRP = 8
const S_IXOTH = 1
const S_IXUSR = 64
const SCM_CREDENTIALS = 2
const SCM_RIGHTS = 1
const SCM_TIMESTAMP = 29
const SCM_TIMESTAMPING = 37
const SCM_TIMESTAMPNS = 35
const SHUT_RD = 0
const SHUT_RDWR = 2
const SHUT_WR = 1
const SIOCADDDLCI = 35200
const SIOCADDMULTI = 35121
const SIOCADDRT = 35083
const SIOCATMARK = 35077
const SIOCDARP = 35155
const SIOCDELDLCI = 35201
const SIOCDELMULTI = 35122
const SIOCDELRT = 35084
const SIOCDEVPRIVATE = 35312
const SIOCDIFADDR = 35126
const SIOCDRARP = 35168
const SIOCGARP = 35156
const SIOCGIFADDR = 35093
const SIOCGIFBR = 35136
const SIOCGIFBRDADDR = 35097
const SIOCGIFCONF = 35090
const SIOCGIFCOUNT = 35128
const SIOCGIFDSTADDR = 35095
const SIOCGIFENCAP = 35109
const SIOCGIFFLAGS = 35091
const SIOCGIFHWADDR = 35111
const SIOCGIFINDEX = 35123
const SIOCGIFMAP = 35184
const SIOCGIFMEM = 35103
const SIOCGIFMETRIC = 35101
const SIOCGIFMTU = 35105
const SIOCGIFNAME = 35088
const SIOCGIFNETMASK = 35099
const SIOCGIFPFLAGS = 35125
const SIOCGIFSLAVE = 35113
const SIOCGIFTXQLEN = 35138
const SIOCGPGRP = 35076
const SIOCGRARP = 35169
const SIOCGSTAMP = 35078
const SIOCGSTAMPNS = 35079
const SIOCPROTOPRIVATE = 35296
const SIOCRTMSG = 35085
const SIOCSARP = 35157
const SIOCSIFADDR = 35094
const SIOCSIFBR = 35137
const SIOCSIFBRDADDR = 35098
const SIOCSIFDSTADDR = 35096
const SIOCSIFENCAP = 35110
const SIOCSIFFLAGS = 35092
const SIOCSIFHWADDR = 35108
const SIOCSIFHWBROADCAST = 35127
const SIOCSIFLINK = 35089
const SIOCSIFMAP = 35185
const SIOCSIFMEM = 35104
const SIOCSIFMETRIC = 35102
const SIOCSIFMTU = 35106
const SIOCSIFNAME = 35107
const SIOCSIFNETMASK = 35100
const SIOCSIFPFLAGS = 35124
const SIOCSIFSLAVE = 35120
const SIOCSIFTXQLEN = 35139
const SIOCSPGRP = 35074
const SIOCSRARP = 35170
const SizeofCmsghdr = 16
const SizeofICMPv6Filter = 32
const SizeofIfAddrmsg = 8
const SizeofIfInfomsg = 16
const SizeofInet4Pktinfo = 12
const SizeofInet6Pktinfo = 20
const SizeofInotifyEvent = 16
const SizeofIPMreq = 8
const SizeofIPMreqn = 12
const SizeofIPv6Mreq = 20
const SizeofIPv6MTUInfo = 32
const SizeofLinger = 8
const SizeofMsghdr = 56
const SizeofNlAttr = 4
const SizeofNlMsgerr = 20
const SizeofNlMsghdr = 16
const SizeofRtAttr = 4
const SizeofRtGenmsg = 1
const SizeofRtMsg = 12
const SizeofRtNexthop = 8
const SizeofSockaddrAny = 112
const SizeofSockaddrInet4 = 16
const SizeofSockaddrInet6 = 28
const SizeofSockaddrLinklayer = 20
const SizeofSockaddrNetlink = 12
const SizeofSockaddrUnix = 110
const SizeofSockFilter = 8
const SizeofSockFprog = 16
const SizeofTCPInfo = 104
const SizeofUcred = 12
func SlicePtrFromStrings(ss []string) ([]*byte, 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).
const SO_ACCEPTCONN = 30
const SO_ATTACH_FILTER = 26
const SO_BINDTODEVICE = 25
const SO_BROADCAST = 6
const SO_BSDCOMPAT = 14
const SO_DEBUG = 1
const SO_DETACH_FILTER = 27
const SO_DOMAIN = 39
const SO_DONTROUTE = 5
const SO_ERROR = 4
const SO_KEEPALIVE = 9
const SO_LINGER = 13
const SO_MARK = 36
const SO_NO_CHECK = 11
const SO_OOBINLINE = 10
const SO_PASSCRED = 16
const SO_PASSSEC = 34
const SO_PEERCRED = 17
const SO_PEERNAME = 28
const SO_PEERSEC = 31
const SO_PRIORITY = 12
const SO_PROTOCOL = 38
const SO_RCVBUF = 8
const SO_RCVBUFFORCE = 33
const SO_RCVLOWAT = 18
const SO_RCVTIMEO = 20
const SO_REUSEADDR = 2
const SO_RXQ_OVFL = 40
const SO_SECURITY_AUTHENTICATION = 22
const SO_SECURITY_ENCRYPTION_NETWORK = 24
const SO_SECURITY_ENCRYPTION_TRANSPORT = 23
const SO_SNDBUF = 7
const SO_SNDBUFFORCE = 32
const SO_SNDLOWAT = 19
const SO_SNDTIMEO = 21
const SO_TIMESTAMP = 29
const SO_TIMESTAMPING = 37
const SO_TIMESTAMPNS = 35
const SO_TYPE = 3
const SOCK_CLOEXEC = 524288
const SOCK_DCCP = 6
const SOCK_DGRAM = 2
const SOCK_NONBLOCK = 2048
const SOCK_PACKET = 10
const SOCK_RAW = 3
const SOCK_RDM = 4
const SOCK_SEQPACKET = 5
const SOCK_STREAM = 1
var SocketDisableIPv6 bool
For testing: clients can set this flag to force
creation of IPv6 sockets to return EAFNOSUPPORT.
const SOL_AAL = 265
const SOL_ATM = 264
const SOL_DECNET = 261
const SOL_ICMPV6 = 58
const SOL_IP = 0
const SOL_IPV6 = 41
const SOL_IRDA = 266
const SOL_PACKET = 263
const SOL_RAW = 255
const SOL_SOCKET = 1
const SOL_TCP = 6
const SOL_X25 = 262
const SOMAXCONN = 128
func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid int, handle uintptr, err error)
StartProcess wraps ForkExec for package os.
func StringBytePtr(s string) *byte
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.
func StringByteSlice(s string) []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.
func StringSlicePtr(ss []string) []*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.
func Sync()
const SYS__SYSCTL = 156
const SYS_ACCEPT = 43
const SYS_ACCEPT4 = 288
const SYS_ACCESS = 21
const SYS_ACCT = 163
const SYS_ADD_KEY = 248
const SYS_ADJTIMEX = 159
const SYS_AFS_SYSCALL = 183
const SYS_ALARM = 37
const SYS_ARCH_PRCTL = 158
const SYS_BIND = 49
const SYS_BRK = 12
const SYS_CAPGET = 125
const SYS_CAPSET = 126
const SYS_CHDIR = 80
const SYS_CHMOD = 90
const SYS_CHOWN = 92
const SYS_CHROOT = 161
const SYS_CLOCK_GETRES = 229
const SYS_CLOCK_GETTIME = 228
const SYS_CLOCK_NANOSLEEP = 230
const SYS_CLOCK_SETTIME = 227
const SYS_CLONE = 56
const SYS_CLOSE = 3
const SYS_CONNECT = 42
const SYS_CREAT = 85
const SYS_CREATE_MODULE = 174
const SYS_DELETE_MODULE = 176
const SYS_DUP = 32
const SYS_DUP2 = 33
const SYS_DUP3 = 292
const SYS_EPOLL_CREATE = 213
const SYS_EPOLL_CREATE1 = 291
const SYS_EPOLL_CTL = 233
const SYS_EPOLL_CTL_OLD = 214
const SYS_EPOLL_PWAIT = 281
const SYS_EPOLL_WAIT = 232
const SYS_EPOLL_WAIT_OLD = 215
const SYS_EVENTFD = 284
const SYS_EVENTFD2 = 290
const SYS_EXECVE = 59
const SYS_EXIT = 60
const SYS_EXIT_GROUP = 231
const SYS_FACCESSAT = 269
const SYS_FADVISE64 = 221
const SYS_FALLOCATE = 285
const SYS_FANOTIFY_INIT = 300
const SYS_FANOTIFY_MARK = 301
const SYS_FCHDIR = 81
const SYS_FCHMOD = 91
const SYS_FCHMODAT = 268
const SYS_FCHOWN = 93
const SYS_FCHOWNAT = 260
const SYS_FCNTL = 72
const SYS_FDATASYNC = 75
const SYS_FGETXATTR = 193
const SYS_FLISTXATTR = 196
const SYS_FLOCK = 73
const SYS_FORK = 57
const SYS_FREMOVEXATTR = 199
const SYS_FSETXATTR = 190
const SYS_FSTAT = 5
const SYS_FSTATFS = 138
const SYS_FSYNC = 74
const SYS_FTRUNCATE = 77
const SYS_FUTEX = 202
const SYS_FUTIMESAT = 261
const SYS_GET_KERNEL_SYMS = 177
const SYS_GET_MEMPOLICY = 239
const SYS_GET_ROBUST_LIST = 274
const SYS_GET_THREAD_AREA = 211
const SYS_GETCWD = 79
const SYS_GETDENTS = 78
const SYS_GETDENTS64 = 217
const SYS_GETEGID = 108
const SYS_GETEUID = 107
const SYS_GETGID = 104
const SYS_GETGROUPS = 115
const SYS_GETITIMER = 36
const SYS_GETPEERNAME = 52
const SYS_GETPGID = 121
const SYS_GETPGRP = 111
const SYS_GETPID = 39
const SYS_GETPMSG = 181
const SYS_GETPPID = 110
const SYS_GETPRIORITY = 140
const SYS_GETRESGID = 120
const SYS_GETRESUID = 118
const SYS_GETRLIMIT = 97
const SYS_GETRUSAGE = 98
const SYS_GETSID = 124
const SYS_GETSOCKNAME = 51
const SYS_GETSOCKOPT = 55
const SYS_GETTID = 186
const SYS_GETTIMEOFDAY = 96
const SYS_GETUID = 102
const SYS_GETXATTR = 191
const SYS_INIT_MODULE = 175
const SYS_INOTIFY_ADD_WATCH = 254
const SYS_INOTIFY_INIT = 253
const SYS_INOTIFY_INIT1 = 294
const SYS_INOTIFY_RM_WATCH = 255
const SYS_IO_CANCEL = 210
const SYS_IO_DESTROY = 207
const SYS_IO_GETEVENTS = 208
const SYS_IO_SETUP = 206
const SYS_IO_SUBMIT = 209
const SYS_IOCTL = 16
const SYS_IOPERM = 173
const SYS_IOPL = 172
const SYS_IOPRIO_GET = 252
const SYS_IOPRIO_SET = 251
const SYS_KEXEC_LOAD = 246
const SYS_KEYCTL = 250
const SYS_KILL = 62
const SYS_LCHOWN = 94
const SYS_LGETXATTR = 192
const SYS_LINK = 86
const SYS_LINKAT = 265
const SYS_LISTEN = 50
const SYS_LISTXATTR = 194
const SYS_LLISTXATTR = 195
const SYS_LOOKUP_DCOOKIE = 212
const SYS_LREMOVEXATTR = 198
const SYS_LSEEK = 8
const SYS_LSETXATTR = 189
const SYS_LSTAT = 6
const SYS_MADVISE = 28
const SYS_MBIND = 237
const SYS_MIGRATE_PAGES = 256
const SYS_MINCORE = 27
const SYS_MKDIR = 83
const SYS_MKDIRAT = 258
const SYS_MKNOD = 133
const SYS_MKNODAT = 259
const SYS_MLOCK = 149
const SYS_MLOCKALL = 151
const SYS_MMAP = 9
const SYS_MODIFY_LDT = 154
const SYS_MOUNT = 165
const SYS_MOVE_PAGES = 279
const SYS_MPROTECT = 10
const SYS_MQ_GETSETATTR = 245
const SYS_MQ_NOTIFY = 244
const SYS_MQ_OPEN = 240
const SYS_MQ_TIMEDRECEIVE = 243
const SYS_MQ_TIMEDSEND = 242
const SYS_MQ_UNLINK = 241
const SYS_MREMAP = 25
const SYS_MSGCTL = 71
const SYS_MSGGET = 68
const SYS_MSGRCV = 70
const SYS_MSGSND = 69
const SYS_MSYNC = 26
const SYS_MUNLOCK = 150
const SYS_MUNLOCKALL = 152
const SYS_MUNMAP = 11
const SYS_NANOSLEEP = 35
const SYS_NEWFSTATAT = 262
const SYS_NFSSERVCTL = 180
const SYS_OPEN = 2
const SYS_OPENAT = 257
const SYS_PAUSE = 34
const SYS_PERF_EVENT_OPEN = 298
const SYS_PERSONALITY = 135
const SYS_PIPE = 22
const SYS_PIPE2 = 293
const SYS_PIVOT_ROOT = 155
const SYS_POLL = 7
const SYS_PPOLL = 271
const SYS_PRCTL = 157
const SYS_PREAD64 = 17
const SYS_PREADV = 295
const SYS_PRLIMIT64 = 302
const SYS_PSELECT6 = 270
const SYS_PTRACE = 101
const SYS_PUTPMSG = 182
const SYS_PWRITE64 = 18
const SYS_PWRITEV = 296
const SYS_QUERY_MODULE = 178
const SYS_QUOTACTL = 179
const SYS_READ = 0
const SYS_READAHEAD = 187
const SYS_READLINK = 89
const SYS_READLINKAT = 267
const SYS_READV = 19
const SYS_REBOOT = 169
const SYS_RECVFROM = 45
const SYS_RECVMMSG = 299
const SYS_RECVMSG = 47
const SYS_REMAP_FILE_PAGES = 216
const SYS_REMOVEXATTR = 197
const SYS_RENAME = 82
const SYS_RENAMEAT = 264
const SYS_REQUEST_KEY = 249
const SYS_RESTART_SYSCALL = 219
const SYS_RMDIR = 84
const SYS_RT_SIGACTION = 13
const SYS_RT_SIGPENDING = 127
const SYS_RT_SIGPROCMASK = 14
const SYS_RT_SIGQUEUEINFO = 129
const SYS_RT_SIGRETURN = 15
const SYS_RT_SIGSUSPEND = 130
const SYS_RT_SIGTIMEDWAIT = 128
const SYS_RT_TGSIGQUEUEINFO = 297
const SYS_SCHED_GET_PRIORITY_MAX = 146
const SYS_SCHED_GET_PRIORITY_MIN = 147
const SYS_SCHED_GETAFFINITY = 204
const SYS_SCHED_GETPARAM = 143
const SYS_SCHED_GETSCHEDULER = 145
const SYS_SCHED_RR_GET_INTERVAL = 148
const SYS_SCHED_SETAFFINITY = 203
const SYS_SCHED_SETPARAM = 142
const SYS_SCHED_SETSCHEDULER = 144
const SYS_SCHED_YIELD = 24
const SYS_SECURITY = 185
const SYS_SELECT = 23
const SYS_SEMCTL = 66
const SYS_SEMGET = 64
const SYS_SEMOP = 65
const SYS_SEMTIMEDOP = 220
const SYS_SENDFILE = 40
const SYS_SENDMSG = 46
const SYS_SENDTO = 44
const SYS_SET_MEMPOLICY = 238
const SYS_SET_ROBUST_LIST = 273
const SYS_SET_THREAD_AREA = 205
const SYS_SET_TID_ADDRESS = 218
const SYS_SETDOMAINNAME = 171
const SYS_SETFSGID = 123
const SYS_SETFSUID = 122
const SYS_SETGID = 106
const SYS_SETGROUPS = 116
const SYS_SETHOSTNAME = 170
const SYS_SETITIMER = 38
const SYS_SETPGID = 109
const SYS_SETPRIORITY = 141
const SYS_SETREGID = 114
const SYS_SETRESGID = 119
const SYS_SETRESUID = 117
const SYS_SETREUID = 113
const SYS_SETRLIMIT = 160
const SYS_SETSID = 112
const SYS_SETSOCKOPT = 54
const SYS_SETTIMEOFDAY = 164
const SYS_SETUID = 105
const SYS_SETXATTR = 188
const SYS_SHMAT = 30
const SYS_SHMCTL = 31
const SYS_SHMDT = 67
const SYS_SHMGET = 29
const SYS_SHUTDOWN = 48
const SYS_SIGALTSTACK = 131
const SYS_SIGNALFD = 282
const SYS_SIGNALFD4 = 289
const SYS_SOCKET = 41
const SYS_SOCKETPAIR = 53
const SYS_SPLICE = 275
const SYS_STAT = 4
const SYS_STATFS = 137
const SYS_SWAPOFF = 168
const SYS_SWAPON = 167
const SYS_SYMLINK = 88
const SYS_SYMLINKAT = 266
const SYS_SYNC = 162
const SYS_SYNC_FILE_RANGE = 277
const SYS_SYSFS = 139
const SYS_SYSINFO = 99
const SYS_SYSLOG = 103
const SYS_TEE = 276
const SYS_TGKILL = 234
const SYS_TIME = 201
const SYS_TIMER_CREATE = 222
const SYS_TIMER_DELETE = 226
const SYS_TIMER_GETOVERRUN = 225
const SYS_TIMER_GETTIME = 224
const SYS_TIMER_SETTIME = 223
const SYS_TIMERFD_CREATE = 283
const SYS_TIMERFD_GETTIME = 287
const SYS_TIMERFD_SETTIME = 286
const SYS_TIMES = 100
const SYS_TKILL = 200
const SYS_TRUNCATE = 76
const SYS_TUXCALL = 184
const SYS_UMASK = 95
const SYS_UMOUNT2 = 166
const SYS_UNAME = 63
const SYS_UNLINK = 87
const SYS_UNLINKAT = 263
const SYS_UNSHARE = 272
const SYS_USELIB = 134
const SYS_USTAT = 136
const SYS_UTIME = 132
const SYS_UTIMENSAT = 280
const SYS_UTIMES = 235
const SYS_VFORK = 58
const SYS_VHANGUP = 153
const SYS_VMSPLICE = 278
const SYS_VSERVER = 236
const SYS_WAIT4 = 61
const SYS_WAITID = 247
const SYS_WRITE = 1
const SYS_WRITEV = 20
const TCGETS = 21505
const TCIFLUSH = 0
const TCIOFLUSH = 2
const TCOFLUSH = 1
const TCP_CONGESTION = 13
const TCP_CORK = 3
const TCP_DEFER_ACCEPT = 9
const TCP_INFO = 11
const TCP_KEEPCNT = 6
const TCP_KEEPIDLE = 4
const TCP_KEEPINTVL = 5
const TCP_LINGER2 = 8
const TCP_MAX_WINSHIFT = 14
const TCP_MAXSEG = 2
const TCP_MAXWIN = 65535
const TCP_MD5SIG = 14
const TCP_MD5SIG_MAXKEYLEN = 80
const TCP_MSS = 512
const TCP_NODELAY = 1
const TCP_QUICKACK = 12
const TCP_SYNCNT = 7
const TCP_WINDOW_CLAMP = 10
const TCSETS = 21506
func TimespecToNsec(ts Timespec) int64
TimespecToNsec converts a Timespec value into a number of
nanoseconds since the Unix epoch.
func TimevalToNsec(tv Timeval) int64
TimevalToNsec converts a Timeval value into a number of nanoseconds
since the Unix epoch.
const TIOCCBRK = 21544
const TIOCCONS = 21533
const TIOCEXCL = 21516
const TIOCGDEV = 2147767346
const TIOCGETD = 21540
const TIOCGICOUNT = 21597
const TIOCGLCKTRMIOS = 21590
const TIOCGPGRP = 21519
const TIOCGPTN = 2147767344
const TIOCGRS485 = 21550
const TIOCGSERIAL = 21534
const TIOCGSID = 21545
const TIOCGSOFTCAR = 21529
const TIOCGWINSZ = 21523
const TIOCINQ = 21531
const TIOCLINUX = 21532
const TIOCM_CAR = 64
const TIOCM_CD = 64
const TIOCM_CTS = 32
const TIOCM_DSR = 256
const TIOCM_DTR = 2
const TIOCM_LE = 1
const TIOCM_RI = 128
const TIOCM_RNG = 128
const TIOCM_RTS = 4
const TIOCM_SR = 16
const TIOCM_ST = 8
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 TIOCPKT_DATA = 0
const TIOCPKT_DOSTOP = 32
const TIOCPKT_FLUSHREAD = 1
const TIOCPKT_FLUSHWRITE = 2
const TIOCPKT_IOCTL = 64
const TIOCPKT_NOSTOP = 16
const TIOCPKT_START = 8
const TIOCPKT_STOP = 4
const TIOCSBRK = 21543
const TIOCSCTTY = 21518
const TIOCSER_TEMT = 1
const TIOCSERCONFIG = 21587
const TIOCSERGETLSR = 21593
const TIOCSERGETMULTI = 21594
const TIOCSERGSTRUCT = 21592
const TIOCSERGWILD = 21588
const TIOCSERSETMULTI = 21595
const TIOCSERSWILD = 21589
const TIOCSETD = 21539
const TIOCSIG = 1074025526
const TIOCSLCKTRMIOS = 21591
const TIOCSPGRP = 21520
const TIOCSPTLCK = 1074025521
const TIOCSRS485 = 21551
const TIOCSSERIAL = 21535
const TIOCSSOFTCAR = 21530
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 TUNSETLINK = 1074025677
const TUNSETNOCSUM = 1074025672
const TUNSETOFFLOAD = 1074025680
const TUNSETOWNER = 1074025676
const TUNSETPERSIST = 1074025675
const TUNSETSNDBUF = 1074025684
const TUNSETTXFILTER = 1074025681
const TUNSETVNETHDRSZ = 1074025688
func UnixCredentials(ucred *Ucred) []byte
UnixCredentials encodes credentials into a socket control message
for sending to another process. This can be used for
authentication.
func UnixRights(fds ...int) []byte
UnixRights encodes a set of open file descriptors into a socket
control message for sending to another process.
const VDISCARD = 13
const VEOF = 4
const VEOL = 11
const VEOL2 = 16
const VERASE = 2
const VINTR = 0
const VKILL = 3
const VLNEXT = 15
const VMIN = 6
const VQUIT = 1
const VREPRINT = 12
const VSTART = 8
const VSTOP = 9
const VSUSP = 10
const VSWTC = 7
const VTIME = 5
const VWERASE = 14
const WALL = 1073741824
const WCLONE = 2147483648
const WCONTINUED = 8
const WEXITED = 4
const WNOHANG = 1
const WNOTHREAD = 536870912
const WNOWAIT = 16777216
const WORDSIZE = 64
const WSTOPPED = 2
const WUNTRACED = 2
const XCASE = 4
![]() |
The pages are generated with Golds v0.1.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project and developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |