package unix

Import Path
	golang.org/x/sys/unix (on go.dev)

Dependency Relation
	imports 11 packages, and imported by 3 packages

Involved Source Files affinity_linux.go aliases.go bluetooth_linux.go constants.go dev_linux.go dirent.go endian_little.go env_unix.go fcntl.go fdset.go ifreq_linux.go ioctl.go ioctl_linux.go pagesize_unix.go race0.go readdirent_getdents.go sockcmsg_linux.go sockcmsg_unix.go sockcmsg_unix_other.go Package unix contains an interface to the low-level operating system primitives. OS details vary depending on the underlying system, and by default, godoc will display OS-specific documentation for the current system. If you want godoc to display OS 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 this package 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 represents an operating system error describing the failure and holds a value of type syscall.Errno. syscall_linux.go syscall_linux_alarm.go syscall_linux_amd64.go syscall_linux_amd64_gc.go syscall_linux_gc.go syscall_unix.go syscall_unix_gc.go sysvshm_linux.go sysvshm_unix.go timestruct.go zerrors_linux.go zerrors_linux_amd64.go zptrace_x86_linux.go zsyscall_linux.go zsyscall_linux_amd64.go zsysnum_linux_amd64.go ztypes_linux.go ztypes_linux_amd64.go asm_linux_amd64.s
Code Examples package main import ( "golang.org/x/sys/unix" "log" "os" ) func main() { err := unix.Exec("/bin/ls", []string{"ls", "-al"}, os.Environ()) log.Fatal(err) } package main import ( "golang.org/x/sys/unix" "log" "os" ) func main() { f, _ := os.Create("example.lock") if err := unix.Flock(int(f.Fd()), unix.LOCK_EX); err != nil { log.Fatal(err) } // Do work here that requires the lock. When finished, release the lock: if err := unix.Flock(int(f.Fd()), unix.LOCK_UN); err != nil { log.Fatal(err) } } package main import ( "golang.org/x/sys/unix" "log" ) func main() { // create shared memory region of 1024 bytes id, err := unix.SysvShmGet(unix.IPC_PRIVATE, 1024, unix.IPC_CREAT|unix.IPC_EXCL|0o600) if err != nil { log.Fatal("sysv shm create failed:", err) } // warning: sysv shared memory segments persist even after after a process // is destroyed, so it's very important to explicitly delete it when you // don't need it anymore. defer func() { _, err := unix.SysvShmCtl(id, unix.IPC_RMID, nil) if err != nil { log.Fatal(err) } }() // to use a shared memory region you must attach to it b, err := unix.SysvShmAttach(id, 0, 0) if err != nil { log.Fatal("sysv attach failed:", err) } // you should detach from the segment when finished with it. The byte // slice is no longer valid after detaching defer func() { if err = unix.SysvShmDetach(b); err != nil { log.Fatal("sysv detach failed:", err) } }() // Changes to the contents of the byte slice are reflected in other // mappings of the shared memory identifer in this and other processes b[42] = 'h' b[43] = 'i' }
Package-Level Type Names (total 254, in which 243 are exported)
/* sort exporteds by: | */
Data *byte Datalen int32 Flags int32 Op int32
Devname [64]uint8 Length int64 Pno int32 Start int64 Volname [64]uint8
Rxerr uint16 Txerr uint16
Freq uint32
Flags uint32 Mask uint32
Id uint32 Mask uint32 func SetsockoptCanRawFilter(fd, level, opt int, filter []CanFilter) error
Effective uint32 Inheritable uint32 Permitted uint32 func Capget(hdr *CapUserHeader, data *CapUserData) (err error) func Capset(hdr *CapUserHeader, data *CapUserData) (err error)
Pid int32 Version uint32 func Capget(hdr *CapUserHeader, data *CapUserData) (err error) func Capset(hdr *CapUserHeader, data *CapUserData) (err error)
Len uint64 Level int32 Type int32 (*Cmsghdr) SetLen(length int) func ParseOneSocketControlMessage(b []byte) (hdr Cmsghdr, data []byte, remainder []byte, err error)
CPUSet represents a CPU affinity mask. Clear removes cpu from the set s. Count returns the number of CPUs in the set s. IsSet reports whether cpu is in the set s. Set adds cpu to the set s. Zero clears the set s, so that it contains no CPUs. func SchedGetaffinity(pid int, set *CPUSet) error func SchedSetaffinity(pid int, set *CPUSet) error
Type [64]int8
Blocksize uint32 Geniv [64]int8 Ivsize uint32 Maxauthsize uint32 Type [64]int8
Type [64]int8
Blocksize uint32 Max_keysize uint32 Min_keysize uint32 Type [64]int8
Type [64]int8
Blocksize uint32 Digestsize uint32 Type [64]int8
Type [64]int8
Type [64]int8
Seedsize uint32 Type [64]int8
Err_cnt uint64 Hash_cnt uint64 Hash_tlen uint64 Type [64]int8
Type [64]int8
Err_cnt uint64 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Type [64]int8
Driver_name [64]int8 Flags uint32 Mask uint32 Module_name [64]int8 Name [64]int8 Refcnt uint32 Type uint32
Ino uint64 Name [256]int8 Off int64 Reclen uint16 Type uint8
Dev uint64 Name [0]byte Next uint32
Count uint32
Sector uint64
Length uint64 Next uint32 Sector_start uint64 Status int32 Target_type [16]byte
Next uint32 Version [3]uint32
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)
Length uint32 Start uint32
Length uint64 Start uint64
type Errno = syscall.Errno (basic type)
Bus_info [32]byte Cmd uint32 Driver [32]byte Eedump_len uint32 Erom_version [32]byte Fw_version [32]byte N_priv_flags uint32 N_stats uint32 Regdump_len uint32 Reserved2 [12]byte Testinfo_len uint32 Version [32]byte func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error)
Fd int32 Response uint32
Bits [16]int64 Clear removes fd from the set fds. IsSet returns whether fd is in the set fds. Set adds fd to the set fds. Zero clears the set fds. func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (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) func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
Dest_offset uint64 Src_fd int64 Src_length uint64 Src_offset uint64 func IoctlFileCloneRange(destFd int, value *FileCloneRange) error
Info []FileDedupeRangeInfo Reserved1 uint16 Reserved2 uint32 Src_length uint64 Src_offset uint64 func IoctlFileDedupeRange(srcFd int, value *FileDedupeRange) error
FileHandle represents the C struct file_handle used by name_to_handle_at (see NameToHandleAt) and open_by_handle_at (see OpenByHandleAt). (*FileHandle) Bytes() []byte (*FileHandle) Size() int (*FileHandle) Type() int32 func NameToHandleAt(dirfd int, path string, flags int) (handle FileHandle, mountID int, err error) func NewFileHandle(handleType int32, handle []byte) FileHandle func OpenByHandleAt(mountFD int, handle FileHandle, flags int) (fd int, err error)
Len int64 Pid int32 Start int64 Type int16 Whence int16 func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error
Key_id uint32 Key_spec FscryptKeySpecifier Raw_size uint32
Policy [24]byte Size uint64
Mode uint32 Raw [64]uint8 Size uint32
Type uint32 U [32]byte
Key_spec FscryptKeySpecifier Removal_status_flags uint32
Val [2]int32
Algorithm uint16 Size uint16
Cmd uint8 Reserved uint16 Version uint8
Command uint8 Count uint8 Feature uint8 Number uint8
Cylinders uint16 Heads uint8 Sectors uint8 Start uint64
Bustype uint32 Product int16 Vendor int16 func IoctlHIDGetRawInfo(fd int) (*HIDRawDevInfo, error)
Size uint32 Value [4096]uint8 func IoctlHIDGetDesc(fd int, value *HIDRawReportDescriptor) error
Data [8]uint32 func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error
Cstamp uint32 Prefered uint32 Tstamp uint32 Valid uint32
Family uint8 Flags uint8 Index uint32 Prefixlen uint8 Scope uint8
Change uint32 Family uint8 Flags uint32 Index int32 Type uint16
An Ifreq is a type-safe wrapper around the raw ifreq struct. An Ifreq contains an interface name and a union of arbitrary data which can be accessed using the Ifreq's methods. To create an Ifreq, use the NewIfreq function. Use the Name method to access the stored interface name. The union data fields can be get and set using the following methods: - Uint16/SetUint16: flags - Uint32/SetUint32: ifindex, metric, mtu Inet4Addr returns the Ifreq union data from an embedded sockaddr as a C in_addr/Go []byte (4-byte IPv4 address) value. If the sockaddr family is not AF_INET, an error is returned. Name returns the interface name associated with the Ifreq. SetInet4Addr sets a C in_addr/Go []byte (4-byte IPv4 address) value in an embedded sockaddr within the Ifreq's union data. v must be 4 bytes in length or an error will be returned. SetUint16 sets a C short/Go uint16 value as the Ifreq's union data. SetUint32 sets a C int/Go uint32 value as the Ifreq's union data. Uint16 returns the Ifreq union data as a C short/Go uint16 value. Uint32 returns the Ifreq union data as a C int/Go uint32 value. func NewIfreq(name string) (*Ifreq, error) func IoctlIfreq(fd int, req uint, value *Ifreq) error
// in_addr Ifindex int32 // in_addr func PktInfo4(info *Inet4Pktinfo) []byte
// in6_addr Ifindex uint32 func PktInfo6(info *Inet6Pktinfo) []byte
Cookie uint32 Len uint32 Mask uint32 Wd int32
Base *byte Len uint64 (*Iovec) SetLen(length int) func KeyctlInstantiateIOV(id int, payload []Iovec, ringid int) error func ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) func ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) func Vmsplice(fd int, iovs []Iovec, flags int) (int, error)
// in_addr // in_addr func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err 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)
Interface uint32 // in6_addr func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error)
Addr RawSockaddrInet6 Mtu uint32 func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error)
Interval Timespec Value Timespec func TimerfdGettime(fd int, currValue *ItimerSpec) (err error) func TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error) func TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error)
Interval Timeval Value Timeval func Getitimer(which ItimerWhich) (Itimerval, error) func MakeItimerval(interval, value time.Duration) Itimerval func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error)
A value which may be passed to the which parameter for Getitimer and Setitimer. func Getitimer(which ItimerWhich) (Itimerval, error) func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) const ItimerProf const ItimerReal const ItimerVirtual
Bpf_fd int32 Fd int32 func IoctlKCMAttach(fd int, info KCMAttach) error
Fd int32 func IoctlKCMClone(fd int) (*KCMClone, error)
Fd int32 func IoctlKCMUnattach(fd int, info KCMUnattach) error
Base int32 Prime int32 Private int32 func KeyctlDHCompute(params *KeyctlDHParams, buffer []byte) (size int, err error)
Allowed_access uint64 Parent_fd int32
Access_fs uint64
Linger int32 Onoff int32 func GetsockoptLinger(fd, level, opt int) (*Linger, error) func SetsockoptLinger(fd, level, opt int, l *Linger) (err error)
Crypt_name [64]uint8 Device uint64 Encrypt_key [32]uint8 Encrypt_key_size uint32 Encrypt_type uint32 File_name [64]uint8 Flags uint32 Init [2]uint64 Inode uint64 Number uint32 Offset uint64 Rdevice uint64 Sizelimit uint64 func IoctlLoopGetStatus64(fd int) (*LoopInfo64, error) func IoctlLoopSetStatus64(fd int, value *LoopInfo64) error
Attr_clr uint64 Attr_set uint64 Propagation uint64 Userns_fd uint64 func MountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr) error
Control *byte Controllen uint64 Flags int32 Iov *Iovec Iovlen uint64 Name *byte Namelen uint32 (*Msghdr) SetControllen(length int) (*Msghdr) SetIovlen(length int)
Badblocks uint32 Bbtblocks uint32 Corrected uint32 Failed uint32
Erasesize uint32 Flags uint32 Oobsize uint32 Size uint32 Type uint8 Writesize uint32
Length uint32 Ptr *uint8 Start uint32
Length uint32 Pad uint32 Ptr uint64 Start uint64
Data uint64 Len uint64 Mode uint8 Oob uint64 Ooblen uint64 Start uint64
Eccbytes uint32 Eccpos [64]uint32 Oobavail uint32 Oobfree [8]NandOobfree
Length uint32 Offset uint32
Eccbytes uint32 Eccpos [32]uint32 Oobfree [8][2]uint32 Useecc uint32
Family uint8 Flags uint8 Ifindex int32 Pad1 uint8 Pad2 uint16 State uint16 Type uint8
Id uint32 Resvd1 uint8 Resvd2 uint16 Weight uint8
Nfgen_family uint8 Res_id uint16 Version uint8
Family uint8 Flags uint32 Protocol uint8 Resvd uint8 Scope uint8
Len uint16 Type uint16
Error int32 Msg NlMsghdr
Flags uint16 Len uint32 Pid uint32 Seq uint32 Type uint16
Flags uint64 Mode uint64 Resolve uint64 func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error)
Length uint32 Locked uint32 Start uint32
Address [8]uint8 Alen uint16 Ifindex int32 Type uint16 func SetsockoptPacketMreq(fd, level, opt int, mreq *PacketMreq) error
Events int16 Fd int32 Revents int16 func Poll(fds []PollFd, timeout int) (n int, err error) func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
Info PPSKInfo Timeout PPSKTime
Api_version int32 Assert_off_tu PPSKTime Clear_off_tu PPSKTime Mode int32
Flags uint32 Nsec int32 Sec int64
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)
PtraceRegs386 is the registers used by 386 binaries. Eax int32 Ebp int32 Ebx int32 Ecx int32 Edi int32 Edx int32 Eflags int32 Eip int32 Esi int32 Esp int32 Orig_eax int32 Xcs int32 Xds int32 Xes int32 Xfs int32 Xgs int32 Xss int32 func PtraceGetRegs386(pid int, regsout *PtraceRegs386) error func PtraceSetRegs386(pid int, regs *PtraceRegs386) error
PtraceRegsAmd64 is the registers used by amd64 binaries. 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 func PtraceGetRegsAmd64(pid int, regsout *PtraceRegsAmd64) error func PtraceSetRegsAmd64(pid int, regs *PtraceRegsAmd64) error
Data [14]int8 Family uint16
Family uint16 Feat uint32 Mask uint32 Name [64]uint8 Type [14]uint8
Addr RawSockaddr Pad [96]int8
Addr [16]byte Family uint16 Ifindex int32
Channel uint16 Dev uint16 Family uint16
// in_addr Family uint16 Port uint16 Zero [8]uint8
// in6_addr Family uint16 Flowinfo uint32 Port uint16 Scope_id uint32
Addr uint32 Family uint16 Name [8]int8 Nodeid [8]int8 Port uint16 User_id [8]int8
Bdaddr [6]uint8 Bdaddr_type uint8 Cid uint16 Family uint16 Psm uint16
// in_addr Conn_id uint32 Family uint16 Unused uint16
// in6_addr Conn_id uint32 Family uint16 Flowinfo uint32 Scope_id uint32 Unused uint16
Dev_idx uint32 Nfc_protocol uint32 Sa_family uint16 Target_idx uint32
Dev_idx uint32 Dsap uint8 Nfc_protocol uint32 Sa_family uint16 Service_name [63]uint8 Service_name_len uint64 Ssap uint8 Target_idx uint32 (*RawSockaddrNFCLLCP) SetServiceNameLen(length int)
Bdaddr [6]uint8 Channel uint8 Family uint16
Addr [12]byte Addrtype uint8 Family uint16 Scope int8
Family uint16 Path [108]int8
Cid uint32 Family uint16 Flags uint8 Port uint32 Reserved1 uint16 Zero [3]uint8
Erasesize uint32 Numblocks uint32 Offset uint32 Regionindex uint32
RemoteIovec is Iovec with the pointer replaced with an integer. It is used for ProcessVMReadv and ProcessVMWritev, where the pointer refers to a location in a different process' address space, which would confuse the Go garbage collector. Base uintptr Len int func ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) func ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error)
Cur uint64 Max uint64 func Getrlimit(resource int, rlim *Rlimit) (err error) func Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) func Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) func Setrlimit(resource int, rlim *Rlimit) (err error)
Len uint16 Type uint16
Clock int64 Ctrl int32 Max int32 Min int32 Negmult int32 Posmult int32 Value int32
Hour int32 Isdst int32 Mday int32 Min int32 Mon int32 Sec int32 Wday int32 Yday int32 Year int32 func IoctlGetRTCTime(fd int) (*RTCTime, error) func IoctlSetRTCTime(fd int, value *RTCTime) error
Enabled uint8 Pending uint8 Time RTCTime func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) func IoctlSetRTCWkAlrm(fd int, value *RTCWkAlrm) error
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) func Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error)
Ts [3]Timespec
Code int32 Errno int32 Signo int32 func PidfdSendSignal(pidfd int, sig Signal, info *Siginfo, flags int) (err error) func Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error)
type Signal = syscall.Signal (basic type)
Val [16]uint64 func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) func PthreadSigmask(how int, set, oldset *Sigset_t) error func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error)
Sockaddr represents a socket address. *SockaddrALG *SockaddrCAN *SockaddrCANJ1939 *SockaddrHCI *SockaddrInet4 *SockaddrInet6 *SockaddrIUCV *SockaddrL2 *SockaddrL2TPIP *SockaddrL2TPIP6 *SockaddrLinklayer *SockaddrNetlink *SockaddrNFC *SockaddrNFCLLCP *SockaddrPPPoE *SockaddrRFCOMM *SockaddrTIPC *SockaddrUnix *SockaddrVM *SockaddrXDP 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 ParseOrigDstAddr(m *SocketControlMessage) (Sockaddr, 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 RecvmsgBuffers(fd int, buffers [][]byte, oob []byte, flags int) (n, oobn int, recvflags int, from 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 SendmsgBuffers(fd int, buffers [][]byte, oob []byte, to Sockaddr, flags int) (n 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)
SockaddrALG implements the Sockaddr interface for AF_ALG type sockets. SockaddrALG enables userspace access to the Linux kernel's cryptography subsystem. The Type and Name fields specify which type of hash or cipher should be used with a given socket. To create a file descriptor that provides access to a hash or cipher, both Bind and Accept must be used. Once the setup process is complete, input data can be written to the socket, processed by the kernel, and then read back as hash output or ciphertext. Here is an example of using an AF_ALG socket with SHA1 hashing. The initial socket setup process is as follows: // Open a socket to perform SHA1 hashing. fd, _ := unix.Socket(unix.AF_ALG, unix.SOCK_SEQPACKET, 0) addr := &unix.SockaddrALG{Type: "hash", Name: "sha1"} unix.Bind(fd, addr) // Note: unix.Accept does not work at this time; must invoke accept() // manually using unix.Syscall. hashfd, _, _ := unix.Syscall(unix.SYS_ACCEPT, uintptr(fd), 0, 0) Once a file descriptor has been returned from Accept, it may be used to perform SHA1 hashing. The descriptor is not safe for concurrent use, but may be re-used repeatedly with subsequent Write and Read operations. When hashing a small byte slice or string, a single Write and Read may be used: // Assume hashfd is already configured using the setup process. hash := os.NewFile(hashfd, "sha1") // Hash an input string and read the results. Each Write discards // previous hash state. Read always reads the current state. b := make([]byte, 20) for i := 0; i < 2; i++ { io.WriteString(hash, "Hello, world.") hash.Read(b) fmt.Println(hex.EncodeToString(b)) } // Output: // 2ae01472317d1935a84797ec1983ae243fc6aa28 // 2ae01472317d1935a84797ec1983ae243fc6aa28 For hashing larger byte slices, or byte streams such as those read from a file or socket, use Sendto with MSG_MORE to instruct the kernel to update the hash digest instead of creating a new one for a given chunk and finalizing it. // Assume hashfd and addr are already configured using the setup process. hash := os.NewFile(hashfd, "sha1") // Hash the contents of a file. f, _ := os.Open("/tmp/linux-4.10-rc7.tar.xz") b := make([]byte, 4096) for { n, err := f.Read(b) if err == io.EOF { break } unix.Sendto(hashfd, b[:n], unix.MSG_MORE, addr) } hash.Read(b) fmt.Println(hex.EncodeToString(b)) // Output: 85cdcad0c06eef66f805ecce353bec9accbeecc5 For more information, see: http://www.chronox.de/crypto-API/crypto/userspace-if.html. Feature uint32 Mask uint32 Name string Type string *SockaddrALG : Sockaddr
SockaddrCAN implements the Sockaddr interface for AF_CAN type sockets. The RxID and TxID fields are used for transport protocol addressing in (CAN_TP16, CAN_TP20, CAN_MCNET, and CAN_ISOTP), they can be left with zero values for CAN_RAW and CAN_BCM sockets as they have no meaning. The SockaddrCAN struct must be bound to the socket file descriptor using Bind before the CAN socket can be used. // Read one raw CAN frame fd, _ := Socket(AF_CAN, SOCK_RAW, CAN_RAW) addr := &SockaddrCAN{Ifindex: index} Bind(fd, addr) frame := make([]byte, 16) Read(fd, frame) The full SocketCAN documentation can be found in the linux kernel archives at: https://www.kernel.org/doc/Documentation/networking/can.txt Ifindex int RxID uint32 TxID uint32 *SockaddrCAN : Sockaddr
SockaddrCANJ1939 implements the Sockaddr interface for AF_CAN using J1939 protocol (https://en.wikipedia.org/wiki/SAE_J1939). For more information on the purposes of the fields, check the official linux kernel documentation available here: https://www.kernel.org/doc/Documentation/networking/j1939.rst Addr uint8 Ifindex int Name uint64 PGN uint32 *SockaddrCANJ1939 : Sockaddr
SockaddrHCI implements the Sockaddr interface for AF_BLUETOOTH type sockets using the HCI protocol. Channel uint16 Dev uint16 *SockaddrHCI : Sockaddr
SockaddrInet4 implements the Sockaddr interface for AF_INET type sockets. Addr [4]byte Port int *SockaddrInet4 : Sockaddr
SockaddrInet6 implements the Sockaddr interface for AF_INET6 type sockets. Addr [16]byte Port int ZoneId uint32 *SockaddrInet6 : Sockaddr
SockaddrIUCV implements the Sockaddr interface for AF_IUCV sockets. Name string UserID string *SockaddrIUCV : Sockaddr
SockaddrL2 implements the Sockaddr interface for AF_BLUETOOTH type sockets using the L2CAP protocol. Addr [6]uint8 AddrType uint8 CID uint16 PSM uint16 *SockaddrL2 : Sockaddr
SockaddrL2TPIP implements the Sockaddr interface for IPPROTO_L2TP/AF_INET sockets. Addr [4]byte ConnId uint32 *SockaddrL2TPIP : Sockaddr
SockaddrL2TPIP6 implements the Sockaddr interface for IPPROTO_L2TP/AF_INET6 sockets. Addr [16]byte ConnId uint32 ZoneId uint32 *SockaddrL2TPIP6 : Sockaddr
SockaddrLinklayer implements the Sockaddr interface for AF_PACKET type sockets. Addr [8]byte Halen uint8 Hatype uint16 Ifindex int Pkttype uint8 Protocol uint16 *SockaddrLinklayer : Sockaddr
DeviceIdx uint32 NFCProtocol uint32 TargetIdx uint32 *SockaddrNFC : Sockaddr
DestinationSAP uint8 DeviceIdx uint32 NFCProtocol uint32 ServiceName string SourceSAP uint8 TargetIdx uint32 *SockaddrNFCLLCP : Sockaddr
Dev string Remote []byte SID uint16 *SockaddrPPPoE : Sockaddr
SockaddrRFCOMM implements the Sockaddr interface for AF_BLUETOOTH type sockets using the RFCOMM protocol. Server example: fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM) _ = unix.Bind(fd, &unix.SockaddrRFCOMM{ Channel: 1, Addr: [6]uint8{0, 0, 0, 0, 0, 0}, // BDADDR_ANY or 00:00:00:00:00:00 }) _ = Listen(fd, 1) nfd, sa, _ := Accept(fd) fmt.Printf("conn addr=%v fd=%d", sa.(*unix.SockaddrRFCOMM).Addr, nfd) Read(nfd, buf) Client example: fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM) _ = Connect(fd, &SockaddrRFCOMM{ Channel: 1, Addr: [6]byte{0x11, 0x22, 0x33, 0xaa, 0xbb, 0xcc}, // CC:BB:AA:33:22:11 }) Write(fd, []byte(`hello`)) Addr represents a bluetooth address, byte ordering is little-endian. Channel is a designated bluetooth channel, only 1-30 are available for use. Since Linux 2.6.7 and further zero value is the first available channel. *SockaddrRFCOMM : Sockaddr
Family uint16
SockaddrTIPC implements the Sockaddr interface for AF_TIPC type sockets. For more information on TIPC, see: http://tipc.sourceforge.net/. Addr is the type of address used to manipulate a socket. Addr must be one of: - *TIPCSocketAddr: "id" variant in the C addr union - *TIPCServiceRange: "nameseq" variant in the C addr union - *TIPCServiceName: "name" variant in the C addr union If nil, EINVAL will be returned when the structure is used. Scope is the publication scopes when binding service/service range. Should be set to TIPC_CLUSTER_SCOPE or TIPC_NODE_SCOPE. *SockaddrTIPC : Sockaddr
SockaddrUnix implements the Sockaddr interface for AF_UNIX type sockets. Name string *SockaddrUnix : Sockaddr
SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets. SockaddrVM provides access to Linux VM sockets: a mechanism that enables bidirectional communication between a hypervisor and its guest virtual machines. CID and Port specify a context ID and port address for a VM socket. Guests have a unique CID, and hosts may have a well-known CID of: - VMADDR_CID_HYPERVISOR: refers to the hypervisor process. - VMADDR_CID_LOCAL: refers to local communication (loopback). - VMADDR_CID_HOST: refers to other processes on the host. Flags uint8 Port uint32 *SockaddrVM : Sockaddr
Flags uint16 Ifindex uint32 QueueID uint32 SharedUmemFD uint32 *SockaddrXDP : Sockaddr
SocketControlMessage represents a socket control message. Data []byte Header Cmsghdr func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) func ParseOrigDstAddr(m *SocketControlMessage) (Sockaddr, error) func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) func ParseUnixRights(m *SocketControlMessage) ([]int, error)
Code uint8 Data uint32 Errno uint32 Info uint32 Origin uint8 Pad uint8 Type uint8
Code uint16 Jf uint8 Jt uint8 K uint32
Filter *SockFilter Len uint16 func SetsockoptSockFprog(fd, level, opt int, fprog *SockFprog) error
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 func Fstat(fd int, stat *Stat_t) (err error) func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) func Lstat(path string, stat *Stat_t) (err error) func Stat(path string, stat *Stat_t) (err 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)
Nsec uint32 Sec int64
Bufferram uint64 Freehigh uint64 Freeram uint64 Freeswap uint64 Loads [3]uint64 Pad uint16 Procs uint16 Sharedram uint64 Totalhigh uint64 Totalram uint64 Totalswap uint64 Unit uint32 Uptime int64 func Sysinfo(info *Sysinfo_t) (err error)
Cgid uint32 Cuid uint32 Gid uint32 Key int32 Mode uint32 Seq uint16 Uid uint32
Atime int64 Cpid int32 Ctime int64 Dtime int64 Lpid int32 Nattch uint64 Perm SysvIpcPerm Segsz uint64 func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error)
Addr SockaddrStorage Flags uint8 Key [80]uint8 Keylen uint16 Prefixlen uint8
Code uint32 Val uint32 func SetsockoptTCPRepairOpt(fd, level, opt int, o []TCPRepairOpt) (err error)
Cc [19]uint8 Cflag uint32 Iflag uint32 Ispeed uint32 Lflag uint32 Line uint8 Oflag uint32 Ospeed uint32 func IoctlGetTermios(fd int, req uint) (*Termios, error) func IoctlSetTermios(fd int, req uint, value *Termios) error
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 TimeToTimespec(t time.Time) (Timespec, error) func ClockGetres(clockid int32, res *Timespec) (err error) func ClockGettime(clockid int32, time *Timespec) (err error) func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) func Nanosleep(time *Timespec, leftover *Timespec) (err error) func Nanosleep(time *Timespec, leftover *Timespec) (err error) func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) func TimespecToNsec(ts Timespec) int64 func UtimesNano(path string, ts []Timespec) error func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) 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 GetsockoptTimeval(fd, level, opt int) (*Timeval, error) func NsecToTimeval(nsec int64) Timeval func Futimes(fd int, tv []Timeval) (err error) func Futimesat(dirfd int, path string, tv []Timeval) error func Gettimeofday(tv *Timeval) (err error) func Lutimes(path string, tv []Timeval) 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) error
Calcnt int64 Constant int64 Errcnt int64 Esterror int64 Freq int64 Jitcnt int64 Jitter int64 Maxerror int64 Modes uint32 Offset int64 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) func ClockAdjtime(clockid int32, buf *Timex) (state int, err error)
TIPCAddr is implemented by types that can be used as an address for SockaddrTIPC. It is only implemented by *TIPCSocketAddr, *TIPCServiceRange, and *TIPCServiceName. *TIPCServiceName *TIPCServiceRange *TIPCSocketAddr
Event uint32 Lower uint32 Port TIPCSocketAddr S TIPCSubscr Upper uint32
Flags uint32 Instance uint32 Scope uint32 Type uint32
Domain uint32 Instance uint32 Type uint32 *TIPCServiceName : TIPCAddr
Lower uint32 Type uint32 Upper uint32 *TIPCServiceRange : TIPCAddr
Id uint32 Linkname [68]int8 Peer uint32
Id [16]int8 Peer uint32
Node uint32 Ref uint32 *TIPCSocketAddr : TIPCAddr
Filter uint32 Handle [8]int8 Seq TIPCServiceRange Timeout uint32
Cstime int64 Cutime int64 Stime int64 Utime int64 func Times(tms *Tms) (ticks uintptr, err error)
Sec uint32 Usec uint32
Hdr [40]byte To_priv uint32 Version uint32
Len uint32 Mac uint16 Net uint16 Sec uint32 Snaplen uint32 Status uint64 Usec uint32
Rxhash uint32 Vlan_tci uint32 Vlan_tpid uint16
Block_nr uint32 Block_size uint32 Frame_nr uint32 Frame_size uint32 func SetsockoptTpacketReq(fd, level, opt int, tp *TpacketReq) error
Block_nr uint32 Block_size uint32 Feature_req_word uint32 Frame_nr uint32 Frame_size uint32 Retire_blk_tov uint32 Sizeof_priv uint32 func SetsockoptTpacketReq3(fd, level, opt int, tp *TpacketReq3) error
Drops uint32 Packets uint32 func GetsockoptTpacketStats(fd, level, opt int) (*TpacketStats, error)
Drops uint32 Freeze_q_cnt uint32 Packets uint32 func GetsockoptTpacketStatsV3(fd, level, opt int) (*TpacketStatsV3, 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 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]byte Machine [65]byte Nodename [65]byte Release [65]byte Sysname [65]byte Version [65]byte func Uname(buf *Utsname) (err error)
( WaitStatus) Continued() bool ( WaitStatus) CoreDump() bool ( WaitStatus) ExitStatus() int ( WaitStatus) Exited() bool ( WaitStatus) Signal() syscall.Signal ( WaitStatus) Signaled() bool ( WaitStatus) StopSignal() syscall.Signal ( WaitStatus) Stopped() bool ( WaitStatus) TrapCause() int func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error)
Identity [32]uint8 Options uint32 Version uint32 func IoctlGetWatchdogInfo(fd int) (*WatchdogInfo, error)
Col uint16 Row uint16 Xpixel uint16 Ypixel uint16 func IoctlGetWinsize(fd int, req uint) (*Winsize, error) func IoctlSetWinsize(fd int, req uint, value *Winsize) error
Addr uint64 Len uint32 Options uint32
Cr XDPRingOffset Fr XDPRingOffset Rx XDPRingOffset Tx XDPRingOffset
Consumer uint64 Desc uint64 Flags uint64 Producer uint64
Addr uint64 Flags uint32 Headroom uint32 Len uint64 Size uint32
Package-Level Functions (total 486, in which 386 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 AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error)
func Adjtimex(buf *Timex) (state int, err error)
func Alarm(seconds uint) (remaining uint, err error)
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).
BytePtrToString takes a pointer to a sequence of text and returns the corresponding string. If the pointer is nil, it returns the empty string. It assumes that the text sequence is terminated at a zero byte; if the zero byte is not present, the program may crash.
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).
ByteSliceToString returns a string form of the text represented by the slice s, with a terminating NUL and any bytes after the NUL removed.
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 ClockAdjtime(clockid int32, buf *Timex) (state int, err error)
func ClockGetres(clockid int32, res *Timespec) (err error)
func ClockGettime(clockid int32, time *Timespec) (err error)
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error)
func Close(fd int) (err error)
func CloseRange(first uint, last uint, flags uint) (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 CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
func Creat(path string, mode uint32) (fd int, err error)
func DeleteModule(name string, flags int) (err error)
func Dup(oldfd int) (fd int, err error)
func Dup2(oldfd, newfd int) 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)
ErrnoName returns the error name for error number e.
func Eventfd(initval uint, flags int) (fd int, err error)
Exec calls execve(2), which replaces the calling executable in the process tree. argv0 should be the full path to an executable ("/bin/ls") and the executable name should also be the first argument in argv (["ls", "-l"]). envv are the environment variables that should be passed to the new process (["USER=go", "PWD=/tmp"]).
func Exit(code int)
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
func Faccessat2(dirfd int, path string, mode uint32, flags int) (err error)
func Fadvise(fd int, offset int64, length int64, advice int) (err error)
func Fallocate(fd int, mode uint32, off int64, len int64) (err error)
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error)
func FanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname string) (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.
FcntlInt performs a fcntl syscall on fd with the provided command and argument.
func Fdatasync(fd int) (err error)
func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error)
func FinitModule(fd int, params string, flags int) (err error)
func Flistxattr(fd int, dest []byte) (sz int, err error)
func Flock(fd int, how int) (err error)
func Fremovexattr(fd int, attr string) (err error)
func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error)
func Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error)
func Fsopen(fsName string, flags int) (fd int, err error)
func Fspick(dirfd int, pathName string, flags int) (fd int, err error)
func Fstat(fd int, stat *Stat_t) (err error)
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (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) 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)
Getitimer wraps getitimer(2) to return the current value of the timer specified by which.
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 Getrandom(buf []byte, flags int) (n int, err error)
func Getrlimit(resource int, rlim *Rlimit) (err error)
func Getrusage(who int, rusage *Rusage) (err error)
func Getsid(pid int) (sid int, err error)
func GetsockoptByte(fd, level, opt int) (value byte, 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 GetsockoptLinger(fd, level, opt int) (*Linger, error)
GetsockoptString returns the string value of the socket option opt for the socket associated with fd at the given socket level.
func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error)
func GetsockoptTimeval(fd, level, opt int) (*Timeval, error)
func GetsockoptUcred(fd, level, opt int) (*Ucred, error)
func GetsockoptUint64(fd, level, opt int) (value uint64, err 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 InitModule(moduleImage []byte, params string) (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)
IoctlFileClone performs an FICLONE ioctl operation to clone the entire file associated with the file description srcFd to the file associated with the file descriptor destFd. See the ioctl_ficlone(2) man page for details.
IoctlFileCloneRange performs an FICLONERANGE ioctl operation to clone the range of data conveyed in value to the file associated with the file descriptor destFd. See the ioctl_ficlonerange(2) man page for details.
IoctlFileDedupeRange performs an FIDEDUPERANGE ioctl operation to share the range of data conveyed in value from the file associated with the file descriptor srcFd to the value.Info destinations. See the ioctl_fideduperange(2) man page for details.
IoctlGetEthtoolDrvinfo fetches ethtool driver information for the network device specified by ifname.
IoctlGetInt performs an ioctl operation which gets an integer value from fd, using the specified request number. A few ioctl requests use the return value as an output parameter; for those, IoctlRetInt should be used instead of this function.
IoctlGetWatchdogInfo fetches information about a watchdog device from the Linux watchdog API. For more information, see: https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
IoctlIfreq performs an ioctl using an Ifreq structure for input and/or output. See the netdevice(7) man page for details.
IoctlKCMAttach attaches a TCP socket and associated BPF program file descriptor to a multiplexor.
IoctlKCMClone attaches a new file descriptor to a multiplexor by cloning an existing KCM socket, returning a structure containing the file descriptor of the new socket.
IoctlKCMUnattach unattaches a TCP socket file descriptor from a multiplexor.
IoctlLoopGetStatus64 gets the status of the loop device associated with the file descriptor fd using the LOOP_GET_STATUS64 operation.
IoctlLoopSetStatus64 sets the status of the loop device associated with the file descriptor fd using the LOOP_SET_STATUS64 operation.
IoctlRetInt performs an ioctl operation specified by req on a device associated with opened file descriptor fd, and returns a non-negative integer that is returned by the ioctl syscall.
IoctlSetInt performs an ioctl operation which sets an integer value on fd, using the specified request number.
IoctlSetPointerInt performs an ioctl operation which sets an integer value on fd, using the specified request number. The ioctl argument is called with a pointer to the integer value, rather than passing the integer value directly.
IoctlSetTermios performs an ioctl on fd with a *Termios. The req value will usually be TCSETA or TIOCSETA.
IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. To change fd's window size, the req argument should be TIOCSWINSZ.
IoctlWatchdogKeepalive issues a keepalive ioctl to a watchdog device. For more information, see: https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
func Ioperm(from int, num int, on int) (err error)
func Iopl(level int) (err error)
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error)
KeyctlDHCompute implements the KEYCTL_DH_COMPUTE command. This command computes a Diffie-Hellman shared secret based on the provide params. The secret is written to the provided buffer and the returned size is the number of bytes written (returning an error if there is insufficient space in the buffer). If a nil buffer is passed in, this function returns the minimum buffer length needed to store the appropriate data. Note that this differs from KEYCTL_READ's behavior which always returns the requested payload size. See the full documentation at: http://man7.org/linux/man-pages/man3/keyctl_dh_compute.3.html
KeyctlGetKeyringID implements the KEYCTL_GET_KEYRING_ID command. See the full documentation at: http://man7.org/linux/man-pages/man3/keyctl_get_keyring_ID.3.html
KeyctlInstantiateIOV implements the KEYCTL_INSTANTIATE_IOV command. This command is similar to KEYCTL_INSTANTIATE, except that the payload is a slice of Iovec (each of which represents a buffer) instead of a single buffer. See the full documentation at: http://man7.org/linux/man-pages/man3/keyctl_instantiate_iov.3.html
func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error)
KeyctlJoinSessionKeyring implements the KEYCTL_JOIN_SESSION_KEYRING command. See the full documentation at: http://man7.org/linux/man-pages/man3/keyctl_join_session_keyring.3.html
KeyctlRestrictKeyring implements the KEYCTL_RESTRICT_KEYRING command. This command limits the set of keys that can be linked to the keyring, regardless of keyring permissions. The command requires the "setattr" permission. When called with an empty keyType the command locks the keyring, preventing any further keys from being linked to the keyring. The "asymmetric" keyType defines restrictions requiring key payloads to be DER encoded X.509 certificates signed by keys in another keyring. Restrictions for "asymmetric" include "builtin_trusted", "builtin_and_secondary_trusted", "key_or_keyring:<key>", and "key_or_keyring:<key>:chain". As of Linux 4.12, only the "asymmetric" keyType defines type-specific restrictions. See the full documentation at: http://man7.org/linux/man-pages/man3/keyctl_restrict_keyring.3.html http://man7.org/linux/man-pages/man2/keyctl.2.html
KeyctlSearch implements the KEYCTL_SEARCH command. See the full documentation at: http://man7.org/linux/man-pages/man3/keyctl_search.3.html
KeyctlSetperm implements the KEYCTL_SETPERM command. The perm value is the key handle permission mask as described in the "keyctl setperm" section of http://man7.org/linux/man-pages/man1/keyctl.1.html. See the full documentation at: http://man7.org/linux/man-pages/man3/keyctl_setperm.3.html
KeyctlString calls keyctl commands which return a string. These commands are KEYCTL_DESCRIBE and KEYCTL_GET_SECURITY.
func Kill(pid int, sig syscall.Signal) (err error)
func Klogctl(typ int, buf []byte) (n int, err error)
Klogset wraps the sys_syslog system call; it sets console_loglevel to the value specified by arg and passes a dummy pointer to bufp.
func Lchown(path string, uid int, gid int) (err error)
func Lgetxattr(path string, attr string, dest []byte) (sz int, err error)
func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
func Listen(s int, n int) (err error)
func Listxattr(path string, dest []byte) (sz int, err error)
func Llistxattr(path string, dest []byte) (sz int, err error)
func Lremovexattr(path string, attr string) (err error)
func Lsetxattr(path string, attr string, data []byte, flags int) (err error)
func Lstat(path string, stat *Stat_t) (err error)
Lutimes sets the access and modification times tv on path. If path refers to a symlink, it is not dereferenced and the timestamps are set on the symlink. If tv is nil, the access and modification times are set to the current time. Otherwise tv must contain exactly 2 elements, with access time as the first element and modification time as the second element.
func Madvise(b []byte, advice int) (err error)
Major returns the major component of a Linux device number.
MakeItimerval creates an Itimerval from interval and value durations.
func MemfdCreate(name string, flags int) (fd int, err error)
func MemfdSecret(flags int) (fd int, err error)
Minor returns the minor component of a Linux device number.
Mkdev returns a Linux device number generated from the given major and minor components.
func Mkdir(path string, mode uint32) (err error)
func Mkdirat(dirfd int, path string, mode uint32) (err error)
func Mkfifoat(dirfd int, path string, mode uint32) 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)
MountSetattr is a wrapper for mount_setattr(2). https://man7.org/linux/man-pages/man2/mount_setattr.2.html Requires kernel >= 5.12.
func MoveMount(fromDirfd int, fromPathName string, toDirfd int, toPathName string, flags int) (err error)
func Mprotect(b []byte, prot int) (err error)
func Msync(b []byte, flags int) (err error)
func Munlock(b []byte) (err error)
func Munmap(b []byte) (err error)
NameToHandleAt wraps the name_to_handle_at system call; it obtains a handle for a path name.
func Nanosleep(time *Timespec, leftover *Timespec) (err error)
NewFileHandle constructs a FileHandle.
NewIfreq creates an Ifreq with the input network interface name after validating the name does not exceed IFNAMSIZ-1 (trailing NULL required) bytes.
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)
func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error)
OpenByHandleAt wraps the open_by_handle_at system call; it opens a file via a handle as previously returned by NameToHandleAt.
func OpenTree(dfd int, fileName string, flags uint) (r 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.
ParseOneSocketControlMessage parses a single socket control message from b, returning the message header, message data (a slice of b), and the remainder of b after that single message. When there are no remaining messages, len(remainder) == 0.
ParseOrigDstAddr decodes a socket control message containing the original destination address. To receive such a message the IP_RECVORIGDSTADDR or IPV6_RECVORIGDSTADDR option must be enabled on the socket.
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 PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
func PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error)
func PidfdOpen(pid int, flags int) (fd int, err error)
func PidfdSendSignal(pidfd int, sig Signal, info *Siginfo, flags int) (err error)
func Pipe2(p []int, flags int) error
func PivotRoot(newroot string, putold string) (err error)
PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO.
PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO.
func Poll(fds []PollFd, timeout int) (n int, err error)
func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
PrctlRetInt performs a prctl operation specified by option and further optional arguments arg2 through arg5 depending on option. It returns a non-negative integer that is returned by the prctl syscall.
func Pread(fd int, p []byte, offset int64) (n int, err error)
func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error)
func Preadv2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error)
func Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error)
func ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error)
func ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error)
func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
func PthreadSigmask(how int, set, oldset *Sigset_t) error
func PtraceCont(pid int, signal int) (err error)
func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error)
PtraceGetRegs386 fetches the registers used by 386 binaries.
PtraceGetRegsAmd64 fetches the registers used by amd64 binaries.
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 PtracePeekUser(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 PtracePokeUser(pid int, addr uintptr, data []byte) (count int, err error)
func PtraceSetOptions(pid int, options int) (err error)
PtraceSetRegs386 sets the registers used by 386 binaries.
PtraceSetRegsAmd64 sets the registers used by amd64 binaries.
func PtraceSyscall(pid int, signal int) (err error)
func Pwrite(fd int, p []byte, offset int64) (n int, err error)
func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error)
func Pwritev2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error)
func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
RawSyscallNoError may be used instead of RawSyscall for syscalls that don't fail.
func Read(fd int, p []byte) (n int, err error)
ReadDirent reads directory entries from fd and writes them into buf.
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
func Readv(fd int, iovs [][]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)
Recvmsg receives a message from a socket using the recvmsg system call. The received non-control data will be written to p, and any "out of band" control data will be written to oob. The flags are passed to recvmsg. The results are: - n is the number of non-control data bytes read into p - oobn is the number of control data bytes read into oob; this may be interpreted using [ParseSocketControlMessage] - recvflags is flags returned by recvmsg - from is the address of the sender If the underlying socket type is not SOCK_DGRAM, a received message containing oob data and a single '\0' of non-control data is treated as if the message contained only control data, i.e. n will be zero on return.
RecvmsgBuffers receives a message from a socket using the recvmsg system call. This function is equivalent to Recvmsg, but non-control data read is scattered into the buffers slices.
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 Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error)
func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error)
SchedGetaffinity gets the CPU affinity mask of the thread specified by pid. If pid is 0 the calling thread is used.
SchedSetaffinity sets the CPU affinity mask of the thread specified by pid. If pid is 0 the calling thread is used.
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 Send(s int, buf []byte, flags int) (err error)
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
Sendmsg sends a message on a socket to an address using the sendmsg system call. This function is equivalent to SendmsgN, but does not return the number of bytes actually sent.
SendmsgBuffers sends a message on a socket to an address using the sendmsg system call. This function is equivalent to SendmsgN, but the non-control data is gathered from buffers.
SendmsgN sends a message on a socket to an address using the sendmsg system call. p contains the non-control data to send, and oob contains the "out of band" control data. The flags are passed to sendmsg. The number of non-control bytes actually written to the socket is returned. Some socket types do not support sending control data without accompanying non-control data. If p is empty, and oob contains control data, and the underlying socket type is not SOCK_DGRAM, p will be treated as containing a single '\0' and the return value will indicate zero bytes sent. The Go function Recvmsg, if called with an empty p and a non-empty oob, will read and ignore this additional '\0'. If the message is received by code that does not use Recvmsg, or that does not use Go at all, that code will need to be written to expect and ignore the additional '\0'. If you need to send non-empty oob with p actually empty, and if the underlying socket type supports it, you can do so via a raw system call as follows: msg := &unix.Msghdr{ Control: &oob[0], } msg.SetControllen(len(oob)) n, _, errno := unix.Syscall(unix.SYS_SENDMSG, uintptr(fd), uintptr(unsafe.Pointer(msg)), flags)
func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error)
func Setenv(key, value string) error
SetfsgidRetGid sets fsgid for current thread and returns previous fsgid set. setfsgid(2) will return a non-nil error only if its caller lacks CAP_SETUID capability. If the call fails due to other reasons, current fsgid will be returned.
SetfsuidRetUid sets fsuid for current thread and returns previous fsuid set. setfsgid(2) will return a non-nil error only if its caller lacks CAP_SETUID capability If the call fails due to other reasons, current fsuid will be returned.
func Setgid(gid int) (err error)
func Setgroups(gids []int) (err error)
Setitimer wraps setitimer(2) to arm or disarm the timer specified by which. It returns the previous value of the timer. If the Itimerval argument is the zero value, the timer will be disarmed.
func SetNonblock(fd int, nonblocking bool) (err error)
func Setns(fd int, nstype int) (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) (err error)
func Setsid() (pid int, err error)
func SetsockoptByte(fd, level, opt int, value byte) (err error)
func SetsockoptCanRawFilter(fd, level, opt int, filter []CanFilter) 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 SetsockoptPacketMreq(fd, level, opt int, mreq *PacketMreq) error
SetsockoptSockFprog attaches a classic BPF or an extended BPF program to a socket to filter incoming packets. See 'man 7 socket' for usage information.
func SetsockoptString(fd, level, opt int, s string) (err error)
func SetsockoptTCPRepairOpt(fd, level, opt int, o []TCPRepairOpt) (err error)
func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error)
func SetsockoptUint64(fd, level, opt int, value uint64) (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)
func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error)
SignalName returns the signal name for signal number s.
SignalNum returns the syscall.Signal for signal named s, or 0 if a signal with such name is not found. The signal name should start with "SIG".
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)
func Stat(path string, stat *Stat_t) (err error)
func Statfs(path string, buf *Statfs_t) (err error)
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error)
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
func SyncFileRange(fd int, off int64, n int64, flags int) (err error)
func Syncfs(fd int) (err error)
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
SyscallNoError may be used instead of Syscall for syscalls that don't fail.
func Sysinfo(info *Sysinfo_t) (err error)
SysvShmAttach attaches the Sysv shared memory segment associated with the shared memory identifier id.
SysvShmCtl performs control operations on the shared memory segment specified by id.
SysvShmDetach unmaps the shared memory slice returned from SysvShmAttach. It is not safe to use the slice after calling this function.
SysvShmGet returns the Sysv shared memory identifier associated with key. If the IPC_CREAT flag is specified a new segment is created.
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
func Tgkill(tgid int, tid int, sig syscall.Signal) (err error)
func Time(t *Time_t) (tt Time_t, err error)
func TimerfdCreate(clockid int, flags int) (fd int, err error)
func TimerfdGettime(fd int, currValue *ItimerSpec) (err error)
func TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error)
func Times(tms *Tms) (ticks uintptr, err error)
TimespecToNsec returns the time stored in ts as nanoseconds.
TimeToTimespec converts t into a Timespec. On some 32-bit systems the range of valid Timespec values are smaller than that of time.Time values. So if t is out of the valid range of Timespec, it returns a zero Timespec and ERANGE.
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, flags int) (err 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 UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error
Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd, using the specified flags.
func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error)
func Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error)
func Write(fd int, p []byte) (n int, err error)
func Writev(fd int, iovs [][]byte) (n int, err error)
Package-Level Variables (total 16, in which 4 are exported)
For testing: clients can set this flag to force creation of IPv6 sockets to return EAFNOSUPPORT.
Package-Level Constants (total 8878, in which 8858 are exported)
const AAFS_MAGIC = 1513908720
const ADJ_NANO = 8192
const ADJ_TAI = 128
const ADJ_TICK = 16384
const AF_IB = 27
const AFS_FS_MAGIC = 1799439955
const AFS_SUPER_MAGIC = 1397113167
const AT_FDCWD = -100
const AUDIT_ARCH_ALPHA = 3221262374
const AUDIT_ARCH_ARCV2 = 1073742019
const AUDIT_ARCH_ARM = 1073741864
const AUDIT_ARCH_C6X = 1073741964
const AUDIT_ARCH_CRIS = 1073741900
const AUDIT_ARCH_CSKY = 1073742076
const AUDIT_ARCH_I386 = 1073741827
const AUDIT_ARCH_IA64 = 3221225522
const AUDIT_ARCH_MIPS64 = 2147483656
const AUDIT_ARCH_MIPSEL = 1073741832
const AUDIT_ARCH_NDS32 = 1073741991
const AUDIT_ARCH_NIOS2 = 1073741937
const AUDIT_ARCH_PPC64 = 2147483669
const AUDIT_ARCH_S390X = 2147483670
const AUDIT_ARCH_SH64 = 2147483690
const AUDIT_ARCH_SHEL = 1073741866
const AUDIT_ARCH_SHEL64 = 3221225514
const AUDIT_ARCH_TILEGX = 3221225663
const AUDIT_ARCH_X86_64 = 3221225534
const AUDIT_BIT_MASK = 134217728
const AUDIT_BIT_TEST = 1207959552
const AUDIT_EQUAL = 1073741824
const AUDIT_FILTER_ENTRY = 2
const AUDIT_LESS_THAN = 268435456
const AUDIT_NEGATE = 2147483648
const AUDIT_NOT_EQUAL = 805306368
const AUDIT_OPERATORS = 2013265920
const AUDIT_SID_UNSET = 4294967295
const AUDIT_UID_UNSET = 4294967295
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 BDEVFS_MAGIC = 1650746742
const BINFMTFS_MAGIC = 1112100429
const BLKBSZGET = 2148012656
const BLKBSZSET = 1074270833
const BLKGETSIZE64 = 2148012658
const BLKPG = 4713
const BLKRAGET = 4707
const BLKRASET = 4706
const BLKROGET = 4702
const BLKROSET = 4701
const BOTHER = 4096
const BPF_A = 16
const BPF_B = 16
const BPF_CGROUP_INET4_POST_BIND = 12
const BPF_CGROUP_INET6_POST_BIND = 13
const BPF_END = 208
const BPF_F_CTXLEN_MASK = 4503595332403200
const BPF_F_CURRENT_CPU = 4294967295
const BPF_F_INDEX_MASK = 4294967295
const BPF_FS_MAGIC = 3405662737
const BPF_JLE = 176
const BPF_JLT = 160
const BPF_LEN = 128
const BPF_LL_OFF = -2097152
const BPF_MOD = 144
const BPF_MOV = 176
const BPF_MSH = 160
const BPF_NEG = 128
const BPF_NET_OFF = -1048576
const BPF_RSH = 112
const BPF_TXA = 128
const BPF_XOR = 160
const BS0 = 0
const BS1 = 8192
const BSDLY = 8192
Bluetooth Protocols
Bluetooth Protocols
Bluetooth Protocols
Bluetooth Protocols
Bluetooth Protocols
Bluetooth Protocols
Bluetooth Protocols
Bluetooth Protocols
const BTRFS_SUPER_MAGIC = 2435016766
const BTRFS_TEST_MAGIC = 1936880249
const CAN_EFF_FLAG = 2147483648
const CAN_EFF_MASK = 536870911
const CAN_ERR_FLAG = 536870912
const CAN_ERR_MASK = 536870911
const CAN_INV_FILTER = 536870912
const CAN_RTR_FLAG = 1073741824
const CBAUD = 4111
const CBAUDEX = 4096
const CBitFieldMaskBit34 = 17179869184
const CBitFieldMaskBit35 = 34359738368
const CBitFieldMaskBit36 = 68719476736
const CBitFieldMaskBit37 = 137438953472
const CBitFieldMaskBit38 = 274877906944
const CBitFieldMaskBit39 = 549755813888
const CBitFieldMaskBit40 = 1099511627776
const CBitFieldMaskBit41 = 2199023255552
const CBitFieldMaskBit42 = 4398046511104
const CBitFieldMaskBit43 = 8796093022208
const CBitFieldMaskBit44 = 17592186044416
const CBitFieldMaskBit45 = 35184372088832
const CBitFieldMaskBit46 = 70368744177664
const CBitFieldMaskBit47 = 140737488355328
const CBitFieldMaskBit48 = 281474976710656
const CBitFieldMaskBit49 = 562949953421312
const CBitFieldMaskBit50 = 1125899906842624
const CBitFieldMaskBit51 = 2251799813685248
const CBitFieldMaskBit52 = 4503599627370496
const CBitFieldMaskBit53 = 9007199254740992
const CBitFieldMaskBit54 = 18014398509481984
const CBitFieldMaskBit55 = 36028797018963968
const CBitFieldMaskBit56 = 72057594037927936
const CBitFieldMaskBit57 = 144115188075855872
const CBitFieldMaskBit58 = 288230376151711744
const CBitFieldMaskBit59 = 576460752303423488
const CBitFieldMaskBit60 = 1152921504606846976
const CBitFieldMaskBit61 = 2305843009213693952
const CBitFieldMaskBit62 = 4611686018427387904
const CBitFieldMaskBit63 = 9223372036854775808
const CIBAUD = 269418496
const CIFS_SUPER_MAGIC = 4283649346
const CLOCAL = 2048
const CLONE_INTO_CGROUP = 8589934592
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 CMSPAR = 1073741824
const CODA_SUPER_MAGIC = 1937076805
const CR0 = 0
const CR1 = 512
const CR2 = 1024
const CR3 = 1536
const CRAMFS_MAGIC = 684539205
const CRDLY = 1536
const CREAD = 128
const CRTSCTS = 2147483648
const CS5 = 0
const CS6 = 16
const CS7 = 32
const CS8 = 48
const CSIGNAL = 255
const CSIZE = 48
const CSTOP = 19
const CSUSP = 26
const DAXFS_MAGIC = 1684300152
const DEBUGFS_MAGIC = 1684170528
const DEVLINK_ATTR_DPIPE_ENTRY = 35
const DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 38
const DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 39
const DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 36
const DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 37
const DEVLINK_ATTR_RELOAD_STATS_ENTRY = 158
const DEVLINK_RESOURCE_UNIT_ENTRY = 0
const DEVMEM_MAGIC = 1162691661
const DM_CONTROL_NODE = "control"
const DM_DEV_ARM_POLL = 3241737488
const DM_DEV_CREATE = 3241737475
const DM_DEV_REMOVE = 3241737476
const DM_DEV_RENAME = 3241737477
const DM_DEV_STATUS = 3241737479
const DM_DEV_SUSPEND = 3241737478
const DM_DEV_WAIT = 3241737480
const DM_DIR = "mapper"
const DM_LIST_DEVICES = 3241737474
const DM_LIST_VERSIONS = 3241737485
const DM_REMOVE_ALL = 3241737473
const DM_TABLE_CLEAR = 3241737482
const DM_TABLE_DEPS = 3241737483
const DM_TABLE_LOAD = 3241737481
const DM_TABLE_STATUS = 3241737484
const DM_TARGET_MSG = 3241737486
const DM_VERSION = 3241737472
const DM_VERSION_EXTRA = "-ioctl (2022-07-28)"
const DMA_BUF_MAGIC = 1145913666
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
const ECCGETLAYOUT = 2168999185
const ECCGETSTATS = 2148551954
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
const EFD_CLOEXEC = 524288
const EFIVARFS_MAGIC = 3730735588
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
Errors
const EM_ALPHA = 36902
const EM_BPF = 247
const EM_CSKY = 252
const EM_FRV = 21569
const EM_SH = 42
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 EPOLLEXCLUSIVE = 268435456
const EPOLLMSG = 1024
const EPOLLONESHOT = 1073741824
const EPOLLWAKEUP = 536870912
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_CFM = 35074
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_HSR = 35119
const ETH_P_IBOE = 35093
const ETH_P_IFE = 60734
const ETH_P_IP = 2048
const ETH_P_IPV6 = 34525
const ETH_P_IPX = 33079
const ETH_P_LAT = 24580
const ETH_P_LLDP = 35020
const ETH_P_MRP = 35043
const ETH_P_MVRP = 35061
const ETH_P_NCSI = 35064
const ETH_P_NSH = 35151
const ETH_P_PAE = 34958
const ETH_P_PRP = 35067
const ETH_P_RARP = 32821
const ETH_P_SCA = 24583
const ETH_P_SLOW = 34825
const ETH_P_TDLS = 35085
const ETH_P_TEB = 25944
const ETH_P_TIPC = 35018
const ETH_P_WCCP = 34878
const ETHTOOL_A_TUNNEL_UDP_ENTRY_MAX = 2
const ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT = 1
const ETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE = 2
const ETHTOOL_A_TUNNEL_UDP_ENTRY_UNSPEC = 0
const ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY = 3
Errors
Errors
Errors
Errors
Errors
Errors
const EV_FF = 21
const EV_VERSION = 65537
Errors
Errors
const EXTA = 14
const EXTB = 15
const EXTPROC = 65536
const F2FS_SUPER_MAGIC = 4076150800
const F_NOTIFY = 1026
const F_OK = 0
const FAN_ONDIR = 1073741824
const FAN_RENAME = 268435456
const FF0 = 0
const FF1 = 32768
const FFDLY = 32768
const FICLONE = 1074041865
const FICLONERANGE = 1075876877
const FIDEDUPERANGE = 3222836278
const FLUSHO = 4096
const FP_XSTATE_MAGIC2 = 1179670597
const FS_IOC_GETFLAGS = 2148034049
const FS_IOC_SETFLAGS = 1074292226
const FS_VERITY_FL = 1048576
const FUSE_SUPER_MAGIC = 1702057286
const HIDIOCGRAWINFO = 2148026371
const HIDIOCGRDESC = 2416199682
const HIDIOCGRDESCSIZE = 2147764225
const HPFS_SUPER_MAGIC = 4187351113
const HUGETLBFS_MAGIC = 2508478710
const HUPCL = 1024
const ICRNL = 256
const IEXTEN = 32768
const IFF_DORMANT = 131072
const IFF_ECHO = 262144
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_MASK_CREATE = 268435456
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 IPC_EXCL = 1024
const ISIG = 1
Possible which values for Getitimer and Setitimer.
Possible which values for Getitimer and Setitimer.
Possible which values for Getitimer and Setitimer.
const IUCLC = 512
const IUTF8 = 16384
const IXANY = 2048
const IXOFF = 4096
const IXON = 1024
const KEXEC_ARCH_MASK = 4294901760
const KEXEC_ARCH_SH = 2752512
const MAP_HUGETLB = 262144
const MAP_STACK = 131072
const MAP_SYNC = 524288
const MEMERASE = 1074285826
const MEMERASE64 = 1074810132
const MEMGETBADBLOCK = 1074285835
const MEMGETINFO = 2149600513
const MEMGETOOBSEL = 2160610570
const MEMGETREGIONCOUNT = 2147765511
const MEMGETREGIONINFO = 3222293768
const MEMISLOCKED = 2148027671
const MEMLOCK = 1074285829
const MEMREAD = 3225439514
const MEMREADOOB = 3222293764
const MEMREADOOB64 = 3222818070
const MEMSETBADBLOCK = 1074285836
const MEMUNLOCK = 1074285830
const MEMWRITE = 3224390936
const MEMWRITEOOB = 3222293763
const MEMWRITEOOB64 = 3222818069
const MFD_HUGE_16GB = 2281701376
const MFD_HUGE_16MB = 1610612736
const MFD_HUGE_1GB = 2013265920
const MFD_HUGE_1MB = 1342177280
const MFD_HUGE_256MB = 1879048192
const MFD_HUGE_2GB = 2080374784
const MFD_HUGE_2MB = 1409286144
const MFD_HUGE_32MB = 1677721600
const MFD_HUGE_512KB = 1275068416
const MFD_HUGE_512MB = 1946157056
const MFD_HUGE_64KB = 1073741824
const MFD_HUGE_8MB = 1543503872
const MS_ACTIVE = 1073741824
const MS_BIND = 4096
const MS_BORN = 536870912
const MS_I_VERSION = 8388608
const MS_KERNMOUNT = 4194304
const MS_LAZYTIME = 33554432
const MS_MGC_MSK = 4294901760
const MS_MGC_VAL = 3236757504
const MS_MOVE = 8192
const MS_NOREMOTELOCK = 134217728
const MS_NOSEC = 268435456
const MS_NOUSER = -2147483648
const MS_PRIVATE = 262144
const MS_REC = 16384
const MS_RELATIME = 2097152
const MS_RMT_MASK = 41943121
const MS_SHARED = 1048576
const MS_SILENT = 32768
const MS_SLAVE = 524288
const MS_STRICTATIME = 16777216
const MS_SUBMOUNT = 67108864
const MS_VERBOSE = 32768
const MSG_BATCH = 262144
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 MSG_ZEROCOPY = 67108864
const NF_INET_POST_ROUTING = 4
const NFT_DATA_VERDICT = 4294967040
const NL0 = 0
const NL1 = 256
const NLDLY = 256
const NOFLSH = 128
const NSFS_MAGIC = 1853056627
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_PATH = 2097152
const O_RSYNC = 1052672
const O_SYNC = 1052672
const O_TMPFILE = 4259840
const O_TRUNC = 512
const OCFS2_SUPER_MAGIC = 1952539503
const OFDEL = 128
const OFILL = 64
const ONOCR = 16
const OTPERASE = 1074547993
const OTPGETREGIONCOUNT = 1074023694
const OTPGETREGIONINFO = 1074547983
const OTPLOCK = 2148289808
const OTPSELECT = 2147765517
const PARENB = 256
const PARODD = 512
const PathMax = 4096
const PENDIN = 16384
const PERF_EVENT_IOC_ID = 2148017159
const PERF_TXN_ABORT_MASK = -4294967296
const PerfBitMmap2 = 8388608
const PIPEFS_MAGIC = 1346981957
const PPPIOCATTACH = 1074033725
const PPPIOCATTCHAN = 1074033720
const PPPIOCBRIDGECHAN = 1074033717
const PPPIOCCONNECT = 1074033722
const PPPIOCDETACH = 1074033724
const PPPIOCGASYNCMAP = 2147775576
const PPPIOCGCHAN = 2147775543
const PPPIOCGDEBUG = 2147775553
const PPPIOCGFLAGS = 2147775578
const PPPIOCGIDLE = 2148561983
const PPPIOCGIDLE32 = 2148037695
const PPPIOCGIDLE64 = 2148561983
const PPPIOCGL2TPSTATS = 2152231990
const PPPIOCGMRU = 2147775571
const PPPIOCGNPMODE = 3221779532
const PPPIOCGRASYNCMAP = 2147775573
const PPPIOCGUNIT = 2147775574
const PPPIOCGXASYNCMAP = 2149610576
const PPPIOCNEWUNIT = 3221517374
const PPPIOCSACTIVE = 1074820166
const PPPIOCSASYNCMAP = 1074033751
const PPPIOCSCOMPRESS = 1074820173
const PPPIOCSDEBUG = 1074033728
const PPPIOCSFLAGS = 1074033753
const PPPIOCSMAXCID = 1074033745
const PPPIOCSMRRU = 1074033723
const PPPIOCSMRU = 1074033746
const PPPIOCSNPMODE = 1074295883
const PPPIOCSPASS = 1074820167
const PPPIOCSRASYNCMAP = 1074033748
const PPPIOCSXASYNCMAP = 1075868751
const PPS_FETCH = 3221778596
const PPS_GETCAP = 2148036771
const PPS_GETPARAMS = 2148036769
const PPS_SETPARAMS = 1074294946
const PR_FP_EXC_INV = 1048576
const PR_SET_PTRACER = 1499557217
const PR_SET_PTRACER_ANY = 18446744073709551615
const PR_SET_VMA = 1398164801
const PROT_GROWSDOWN = 16777216
const PROT_GROWSUP = 33554432
const PSTOREFS_MAGIC = 1634035564
const PTRACE_EVENTMSG_SYSCALL_ENTRY = 1
const PTRACE_O_MASK = 3145983
const PTRACE_SYSCALL_INFO_ENTRY = 1
const QNX6_SUPER_MAGIC = 1746473250
const R_OK = 4
const RAMFS_MAGIC = 2240043254
const RLIM_INFINITY = 18446744073709551615
const RNDADDENTROPY = 1074287107
const RNDADDTOENTCNT = 1074024961
const RNDGETENTCNT = 2147766784
const RNDGETPOOL = 2148028930
const RT_TABLE_MAX = 4294967295
const RTC_AIE_ON = 28673
const RTC_ALM_READ = 2149871624
const RTC_ALM_SET = 1076129799
const RTC_EPOCH_READ = 2148036621
const RTC_EPOCH_SET = 1074294798
const RTC_IRQP_READ = 2148036619
const RTC_IRQP_SET = 1074294796
const RTC_PARAM_GET = 1075343379
const RTC_PARAM_SET = 1075343380
const RTC_PIE_ON = 28677
const RTC_PLL_GET = 2149609489
const RTC_PLL_SET = 1075867666
const RTC_RD_TIME = 2149871625
const RTC_SET_TIME = 1076129802
const RTC_UIE_ON = 28675
const RTC_VL_CLR = 28692
const RTC_VL_READ = 2147774483
const RTC_WIE_ON = 28687
const RTC_WKALM_RD = 2150133776
const RTC_WKALM_SET = 1076391951
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 RTM_F_TRAP = 32768
const RTM_MAX = 123
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
const SC_LOG_FLUSH = 1048576
const SECRETMEM_MAGIC = 1397048141
const SECURITYFS_MAGIC = 1935894131
const SELINUX_MAGIC = 4185718668
const SFD_CLOEXEC = 524288
const SHM_RND = 8192
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 SIOCGSKNS = 35148
const SIOCGSTAMP = 35078
const SIOCGSTAMP_NEW = 2148567302
const SIOCGSTAMPNS_NEW = 2148567303
const SIOCINQ = 21531
const SIOCOUTQ = 21521
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 SIOCWANDEV = 35146
const SMACK_MAGIC = 1128357203
const SMB2_SUPER_MAGIC = 4266872130
const SOCKFS_MAGIC = 1397703499
const SOL_AAL = 265
const SOL_ALG = 279
const SOL_ATM = 264
Socketoption Level
Socketoption Level
const SOL_KCM = 281
Socketoption Level
const SOL_LLC = 268
const SOL_NFC = 280
const SOL_RAW = 255
const SOL_RDS = 276
Socketoption Level
Socketoption Level
const SOL_SMC = 286
const SOL_TLS = 282
const SOL_X25 = 262
const SOL_XDP = 283
const SQUASHFS_MAGIC = 1936814952
const STA_CLK = 32768
const STA_MODE = 16384
const STA_NANO = 8192
const STACK_END_MAGIC = 1470918301
const STATX__RESERVED = 2147483648
const SYS_BPF = 321
const SYS_TEE = 276
const SYSFS_MAGIC = 1650812274
const TAB0 = 0
const TAB1 = 2048
const TAB2 = 4096
const TAB3 = 6144
const TABDLY = 6144
const TASKSTATS_GENL_NAME = "TASKSTATS"
const TCFLSH = 21515
const TCGETA = 21509
const TCGETS = 21505
const TCGETS2 = 2150388778
const TCGETX = 21554
const TCP_MAXWIN = 65535
const TCP_MSS = 512
const TCSBRK = 21513
const TCSBRKP = 21541
const TCSETA = 21510
const TCSETAF = 21512
const TCSETAW = 21511
const TCSETS = 21506
const TCSETS2 = 1076646955
const TCSETSF = 21508
const TCSETSF2 = 1076646957
const TCSETSW = 21507
const TCSETSW2 = 1076646956
const TCSETX = 21555
const TCSETXF = 21556
const TCSETXW = 21557
const TCXONC = 21514
const TFD_CLOEXEC = 524288
const TIOCCBRK = 21544
const TIOCCONS = 21533
const TIOCEXCL = 21516
const TIOCGDEV = 2147767346
const TIOCGETD = 21540
const TIOCGEXCL = 2147767360
const TIOCGISO7816 = 2150126658
const TIOCGPGRP = 21519
const TIOCGPKT = 2147767352
const TIOCGPTLCK = 2147767353
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 TIOCSISO7816 = 3223868483
const TIOCSPGRP = 21520
const TIOCSPTLCK = 1074025521
const TIOCSRS485 = 21551
const TIOCSTI = 21522
const TIOCSWINSZ = 21524
const TIPC_REKEYING_NOW = 4294967295
const TIPC_WAIT_FOREVER = 4294967295
const TIPC_ZONE_MASK = 4278190080
const TMPFS_MAGIC = 16914836
const TOSTOP = 256
const TRACEFS_MAGIC = 1953653091
const TUNATTACHFILTER = 1074812117
const TUNDETACHFILTER = 1074812118
const TUNGETFEATURES = 2147767503
const TUNGETFILTER = 2148553947
const TUNGETIFF = 2147767506
const TUNGETSNDBUF = 2147767507
const TUNGETVNETBE = 2147767519
const TUNGETVNETHDRSZ = 2147767511
const TUNGETVNETLE = 2147767517
const TUNSETCARRIER = 1074025698
const TUNSETDEBUG = 1074025673
const TUNSETFILTEREBPF = 2147767521
const TUNSETGROUP = 1074025678
const TUNSETIFF = 1074025674
const TUNSETIFINDEX = 1074025690
const TUNSETNOCSUM = 1074025672
const TUNSETOFFLOAD = 1074025680
const TUNSETOWNER = 1074025676
const TUNSETPERSIST = 1074025675
const TUNSETQUEUE = 1074025689
const TUNSETSNDBUF = 1074025684
const TUNSETTXFILTER = 1074025681
const TUNSETVNETBE = 1074025694
const TUNSETVNETHDRSZ = 1074025688
const TUNSETVNETLE = 1074025692
const UBI_IOCATT = 1075343168
const UBI_IOCDET = 1074032449
const UBI_IOCEBCH = 1074024194
const UBI_IOCEBER = 1074024193
const UBI_IOCEBISMAP = 2147766021
const UBI_IOCEBMAP = 1074286339
const UBI_IOCEBUNMAP = 1074024196
const UBI_IOCMKVOL = 1083731712
const UBI_IOCRMVOL = 1074032385
const UBI_IOCRNVOL = 1360031491
const UBI_IOCRPEB = 1074032388
const UBI_IOCRSVOL = 1074556674
const UBI_IOCSETVOLPROP = 1074810630
const UBI_IOCSPEB = 1074032389
const UBI_IOCVOLCRBLK = 1082150663
const UBI_IOCVOLUP = 1074286336
const UDF_SUPER_MAGIC = 352400198
const UTIME_NOW = 1073741823
const UTIME_OMIT = 1073741822
const V9FS_MAGIC = 16914839
const VEOF = 4
const VEOL = 11
const VEOL2 = 16
const VMADDR_CID_ANY = 4294967295
const VMADDR_PORT_ANY = 4294967295
const VMIN = 6
const VSUSP = 10
const VT0 = 0
const VT1 = 16384
const VTDLY = 16384
const W_OK = 2
const WALL = 1073741824
const WCLONE = 2147483648
const WDIOC_GETSTATUS = 2147768065
const WDIOC_GETSUPPORT = 2150127360
const WDIOC_GETTEMP = 2147768067
const WDIOC_GETTIMELEFT = 2147768074
const WDIOC_GETTIMEOUT = 2147768071
const WDIOC_KEEPALIVE = 2147768069
const WDIOC_SETOPTIONS = 2147768068
const WDIOC_SETTIMEOUT = 3221509894
const WG_GENL_NAME = "wireguard"
const WNOTHREAD = 536870912
const WNOWAIT = 16777216
const X_OK = 1
const XDP_PGOFF_TX_RING = 2147483648
const XENFS_SUPER_MAGIC = 2881100148
const XFS_SUPER_MAGIC = 1481003842
const XTABS = 6144
const ZONEFS_MAGIC = 1515144787