vendor: golang.org/x/sys ed371f2e16b4b305ee99df548828de367527b76b
full diff: 85ca7c5b95...ed371f2e16
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Родитель
e70e756053
Коммит
dbe2f594ed
|
@ -77,7 +77,7 @@ golang.org/x/crypto 75b288015ac94e66e3d6715fb68a
|
||||||
golang.org/x/net ab34263943818b32f575efc978a3d24e80b04bd7
|
golang.org/x/net ab34263943818b32f575efc978a3d24e80b04bd7
|
||||||
golang.org/x/oauth2 bf48bf16ab8d622ce64ec6ce98d2c98f916b6303
|
golang.org/x/oauth2 bf48bf16ab8d622ce64ec6ce98d2c98f916b6303
|
||||||
golang.org/x/sync cd5d95a43a6e21273425c7ae415d3df9ea832eeb
|
golang.org/x/sync cd5d95a43a6e21273425c7ae415d3df9ea832eeb
|
||||||
golang.org/x/sys 85ca7c5b95cdf1e557abb38a283d1e61a5959c31
|
golang.org/x/sys ed371f2e16b4b305ee99df548828de367527b76b
|
||||||
golang.org/x/text 23ae387dee1f90d29a23c0e87ee0b46038fbed0e # v0.3.3
|
golang.org/x/text 23ae387dee1f90d29a23c0e87ee0b46038fbed0e # v0.3.3
|
||||||
golang.org/x/time 555d28b269f0569763d25dbe1a237ae74c6bcc82
|
golang.org/x/time 555d28b269f0569763d25dbe1a237ae74c6bcc82
|
||||||
google.golang.org/genproto 3f1135a288c9a07e340ae8ba4cc6c7065a3160e8
|
google.golang.org/genproto 3f1135a288c9a07e340ae8ba4cc6c7065a3160e8
|
||||||
|
|
|
@ -39,20 +39,25 @@ func (bigEndian) Uint64(b []byte) uint64 {
|
||||||
uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56
|
uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56
|
||||||
}
|
}
|
||||||
|
|
||||||
// hostByteOrder returns binary.LittleEndian on little-endian machines and
|
// hostByteOrder returns littleEndian on little-endian machines and
|
||||||
// binary.BigEndian on big-endian machines.
|
// bigEndian on big-endian machines.
|
||||||
func hostByteOrder() byteOrder {
|
func hostByteOrder() byteOrder {
|
||||||
switch runtime.GOARCH {
|
switch runtime.GOARCH {
|
||||||
case "386", "amd64", "amd64p32",
|
case "386", "amd64", "amd64p32",
|
||||||
|
"alpha",
|
||||||
"arm", "arm64",
|
"arm", "arm64",
|
||||||
"mipsle", "mips64le", "mips64p32le",
|
"mipsle", "mips64le", "mips64p32le",
|
||||||
|
"nios2",
|
||||||
"ppc64le",
|
"ppc64le",
|
||||||
"riscv", "riscv64":
|
"riscv", "riscv64",
|
||||||
|
"sh":
|
||||||
return littleEndian{}
|
return littleEndian{}
|
||||||
case "armbe", "arm64be",
|
case "armbe", "arm64be",
|
||||||
|
"m68k",
|
||||||
"mips", "mips64", "mips64p32",
|
"mips", "mips64", "mips64p32",
|
||||||
"ppc", "ppc64",
|
"ppc", "ppc64",
|
||||||
"s390", "s390x",
|
"s390", "s390x",
|
||||||
|
"shbe",
|
||||||
"sparc", "sparc64":
|
"sparc", "sparc64":
|
||||||
return bigEndian{}
|
return bigEndian{}
|
||||||
}
|
}
|
||||||
|
|
2
vendor/golang.org/x/sys/cpu/cpu_aix_ppc64.go → vendor/golang.org/x/sys/cpu/cpu_aix.go
сгенерированный
поставляемый
2
vendor/golang.org/x/sys/cpu/cpu_aix_ppc64.go → vendor/golang.org/x/sys/cpu/cpu_aix.go
сгенерированный
поставляемый
|
@ -2,7 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build aix,ppc64
|
// +build aix
|
||||||
|
|
||||||
package cpu
|
package cpu
|
||||||
|
|
|
@ -10,8 +10,14 @@ const cacheLineSize = 64
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
case "android", "darwin":
|
case "android", "darwin", "netbsd":
|
||||||
// Android and iOS don't seem to allow reading these registers.
|
// Android and iOS don't seem to allow reading these registers.
|
||||||
|
//
|
||||||
|
// NetBSD:
|
||||||
|
// ID_AA64ISAR0_EL1 is a privileged register and cannot be read from EL0.
|
||||||
|
// It can be read via sysctl(3). Example for future implementers:
|
||||||
|
// https://nxr.netbsd.org/xref/src/usr.sbin/cpuctl/arch/aarch64.c
|
||||||
|
//
|
||||||
// Fake the minimal features expected by
|
// Fake the minimal features expected by
|
||||||
// TestARM64minimalFeatures.
|
// TestARM64minimalFeatures.
|
||||||
ARM64.HasASIMD = true
|
ARM64.HasASIMD = true
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
// Copyright 2020 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// Recreate a getsystemcfg syscall handler instead of
|
||||||
|
// using the one provided by x/sys/unix to avoid having
|
||||||
|
// the dependency between them. (See golang.org/issue/32102)
|
||||||
|
// Morever, this file will be used during the building of
|
||||||
|
// gccgo's libgo and thus must not used a CGo method.
|
||||||
|
|
||||||
|
// +build aix
|
||||||
|
// +build gccgo
|
||||||
|
|
||||||
|
package cpu
|
||||||
|
|
||||||
|
import (
|
||||||
|
"syscall"
|
||||||
|
)
|
||||||
|
|
||||||
|
//extern getsystemcfg
|
||||||
|
func gccgoGetsystemcfg(label uint32) (r uint64)
|
||||||
|
|
||||||
|
func callgetsystemcfg(label int) (r1 uintptr, e1 syscall.Errno) {
|
||||||
|
r1 = uintptr(gccgoGetsystemcfg(uint32(label)))
|
||||||
|
e1 = syscall.GetErrno()
|
||||||
|
return
|
||||||
|
}
|
30
vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go
сгенерированный
поставляемый
Normal file
30
vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
// Copyright 2020 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// Package unsafeheader contains header declarations for the Go runtime's
|
||||||
|
// slice and string implementations.
|
||||||
|
//
|
||||||
|
// This package allows x/sys to use types equivalent to
|
||||||
|
// reflect.SliceHeader and reflect.StringHeader without introducing
|
||||||
|
// a dependency on the (relatively heavy) "reflect" package.
|
||||||
|
package unsafeheader
|
||||||
|
|
||||||
|
import (
|
||||||
|
"unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Slice is the runtime representation of a slice.
|
||||||
|
// It cannot be used safely or portably and its representation may change in a later release.
|
||||||
|
type Slice struct {
|
||||||
|
Data unsafe.Pointer
|
||||||
|
Len int
|
||||||
|
Cap int
|
||||||
|
}
|
||||||
|
|
||||||
|
// String is the runtime representation of a string.
|
||||||
|
// It cannot be used safely or portably and its representation may change in a later release.
|
||||||
|
type String struct {
|
||||||
|
Data unsafe.Pointer
|
||||||
|
Len int
|
||||||
|
}
|
|
@ -89,7 +89,7 @@ constants.
|
||||||
|
|
||||||
Adding new syscall numbers is mostly done by running the build on a sufficiently
|
Adding new syscall numbers is mostly done by running the build on a sufficiently
|
||||||
new installation of the target OS (or updating the source checkouts for the
|
new installation of the target OS (or updating the source checkouts for the
|
||||||
new build system). However, depending on the OS, you make need to update the
|
new build system). However, depending on the OS, you may need to update the
|
||||||
parsing in mksysnum.
|
parsing in mksysnum.
|
||||||
|
|
||||||
### mksyscall.go
|
### mksyscall.go
|
||||||
|
@ -163,7 +163,7 @@ The merge is performed in the following steps:
|
||||||
|
|
||||||
## Generated files
|
## Generated files
|
||||||
|
|
||||||
### `zerror_${GOOS}_${GOARCH}.go`
|
### `zerrors_${GOOS}_${GOARCH}.go`
|
||||||
|
|
||||||
A file containing all of the system's generated error numbers, error strings,
|
A file containing all of the system's generated error numbers, error strings,
|
||||||
signal numbers, and constants. Generated by `mkerrors.sh` (see above).
|
signal numbers, and constants. Generated by `mkerrors.sh` (see above).
|
||||||
|
|
|
@ -6,7 +6,11 @@
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
import "unsafe"
|
import (
|
||||||
|
"unsafe"
|
||||||
|
|
||||||
|
"golang.org/x/sys/internal/unsafeheader"
|
||||||
|
)
|
||||||
|
|
||||||
//sys closedir(dir uintptr) (err error)
|
//sys closedir(dir uintptr) (err error)
|
||||||
//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
|
//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
|
||||||
|
@ -71,6 +75,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||||
cnt++
|
cnt++
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
reclen := int(entry.Reclen)
|
reclen := int(entry.Reclen)
|
||||||
if reclen > len(buf) {
|
if reclen > len(buf) {
|
||||||
// Not enough room. Return for now.
|
// Not enough room. Return for now.
|
||||||
|
@ -79,13 +84,15 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||||
// restarting is O(n^2) in the length of the directory. Oh well.
|
// restarting is O(n^2) in the length of the directory. Oh well.
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy entry into return buffer.
|
// Copy entry into return buffer.
|
||||||
s := struct {
|
var s []byte
|
||||||
ptr unsafe.Pointer
|
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&s))
|
||||||
siz int
|
hdr.Data = unsafe.Pointer(&entry)
|
||||||
cap int
|
hdr.Cap = reclen
|
||||||
}{ptr: unsafe.Pointer(&entry), siz: reclen, cap: reclen}
|
hdr.Len = reclen
|
||||||
copy(buf, *(*[]byte)(unsafe.Pointer(&s)))
|
copy(buf, s)
|
||||||
|
|
||||||
buf = buf[reclen:]
|
buf = buf[reclen:]
|
||||||
n += reclen
|
n += reclen
|
||||||
cnt++
|
cnt++
|
||||||
|
|
|
@ -423,6 +423,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||||
//sysnb Getrlimit(which int, lim *Rlimit) (err error)
|
//sysnb Getrlimit(which int, lim *Rlimit) (err error)
|
||||||
//sysnb Getrusage(who int, rusage *Rusage) (err error)
|
//sysnb Getrusage(who int, rusage *Rusage) (err error)
|
||||||
//sysnb Getsid(pid int) (sid int, err error)
|
//sysnb Getsid(pid int) (sid int, err error)
|
||||||
|
//sysnb Gettimeofday(tp *Timeval) (err error)
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
//sysnb Issetugid() (tainted bool)
|
//sysnb Issetugid() (tainted bool)
|
||||||
//sys Kqueue() (fd int, err error)
|
//sys Kqueue() (fd int, err error)
|
||||||
|
|
|
@ -20,17 +20,6 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
|
|
||||||
func Gettimeofday(tv *Timeval) (err error) {
|
|
||||||
// The tv passed to gettimeofday must be non-nil
|
|
||||||
// but is otherwise unused. The answers come back
|
|
||||||
// in the two registers.
|
|
||||||
sec, usec, err := gettimeofday(tv)
|
|
||||||
tv.Sec = int32(sec)
|
|
||||||
tv.Usec = int32(usec)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||||
k.Ident = uint32(fd)
|
k.Ident = uint32(fd)
|
||||||
k.Filter = int16(mode)
|
k.Filter = int16(mode)
|
||||||
|
|
|
@ -20,17 +20,6 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
return Timeval{Sec: sec, Usec: int32(usec)}
|
return Timeval{Sec: sec, Usec: int32(usec)}
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
|
|
||||||
func Gettimeofday(tv *Timeval) (err error) {
|
|
||||||
// The tv passed to gettimeofday must be non-nil
|
|
||||||
// but is otherwise unused. The answers come back
|
|
||||||
// in the two registers.
|
|
||||||
sec, usec, err := gettimeofday(tv)
|
|
||||||
tv.Sec = sec
|
|
||||||
tv.Usec = usec
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||||
k.Ident = uint64(fd)
|
k.Ident = uint64(fd)
|
||||||
k.Filter = int16(mode)
|
k.Filter = int16(mode)
|
||||||
|
|
|
@ -20,17 +20,6 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
|
|
||||||
func Gettimeofday(tv *Timeval) (err error) {
|
|
||||||
// The tv passed to gettimeofday must be non-nil
|
|
||||||
// but is otherwise unused. The answers come back
|
|
||||||
// in the two registers.
|
|
||||||
sec, usec, err := gettimeofday(tv)
|
|
||||||
tv.Sec = int32(sec)
|
|
||||||
tv.Usec = int32(usec)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||||
k.Ident = uint32(fd)
|
k.Ident = uint32(fd)
|
||||||
k.Filter = int16(mode)
|
k.Filter = int16(mode)
|
||||||
|
|
|
@ -22,17 +22,6 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
return Timeval{Sec: sec, Usec: int32(usec)}
|
return Timeval{Sec: sec, Usec: int32(usec)}
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
|
|
||||||
func Gettimeofday(tv *Timeval) (err error) {
|
|
||||||
// The tv passed to gettimeofday must be non-nil
|
|
||||||
// but is otherwise unused. The answers come back
|
|
||||||
// in the two registers.
|
|
||||||
sec, usec, err := gettimeofday(tv)
|
|
||||||
tv.Sec = sec
|
|
||||||
tv.Usec = usec
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||||
k.Ident = uint64(fd)
|
k.Ident = uint64(fd)
|
||||||
k.Filter = int16(mode)
|
k.Filter = int16(mode)
|
||||||
|
|
|
@ -97,6 +97,12 @@ func IoctlSetRTCTime(fd int, value *RTCTime) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func IoctlSetRTCWkAlrm(fd int, value *RTCWkAlrm) error {
|
||||||
|
err := ioctl(fd, RTC_WKALM_SET, uintptr(unsafe.Pointer(value)))
|
||||||
|
runtime.KeepAlive(value)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
func IoctlGetUint32(fd int, req uint) (uint32, error) {
|
func IoctlGetUint32(fd int, req uint) (uint32, error) {
|
||||||
var value uint32
|
var value uint32
|
||||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||||
|
@ -109,6 +115,12 @@ func IoctlGetRTCTime(fd int) (*RTCTime, error) {
|
||||||
return &value, err
|
return &value, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) {
|
||||||
|
var value RTCWkAlrm
|
||||||
|
err := ioctl(fd, RTC_WKALM_RD, uintptr(unsafe.Pointer(&value)))
|
||||||
|
return &value, err
|
||||||
|
}
|
||||||
|
|
||||||
//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
|
//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
|
||||||
|
|
||||||
func Link(oldpath string, newpath string) (err error) {
|
func Link(oldpath string, newpath string) (err error) {
|
||||||
|
@ -1633,6 +1645,15 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||||
//sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
|
//sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
|
||||||
//sys DeleteModule(name string, flags int) (err error)
|
//sys DeleteModule(name string, flags int) (err error)
|
||||||
//sys Dup(oldfd int) (fd int, err error)
|
//sys Dup(oldfd int) (fd int, err error)
|
||||||
|
|
||||||
|
func Dup2(oldfd, newfd int) error {
|
||||||
|
// Android O and newer blocks dup2; riscv and arm64 don't implement dup2.
|
||||||
|
if runtime.GOOS == "android" || runtime.GOARCH == "riscv64" || runtime.GOARCH == "arm64" {
|
||||||
|
return Dup3(oldfd, newfd, 0)
|
||||||
|
}
|
||||||
|
return dup2(oldfd, newfd)
|
||||||
|
}
|
||||||
|
|
||||||
//sys Dup3(oldfd int, newfd int, flags int) (err error)
|
//sys Dup3(oldfd int, newfd int, flags int) (err error)
|
||||||
//sysnb EpollCreate1(flag int) (fd int, err error)
|
//sysnb EpollCreate1(flag int) (fd int, err error)
|
||||||
//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
|
//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
|
||||||
|
@ -1757,6 +1778,9 @@ func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) {
|
||||||
//sys Syncfs(fd int) (err error)
|
//sys Syncfs(fd int) (err error)
|
||||||
//sysnb Sysinfo(info *Sysinfo_t) (err error)
|
//sysnb Sysinfo(info *Sysinfo_t) (err error)
|
||||||
//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
|
//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
|
||||||
|
//sysnb TimerfdCreate(clockid int, flags int) (fd int, err error)
|
||||||
|
//sysnb TimerfdGettime(fd int, currValue *ItimerSpec) (err error)
|
||||||
|
//sysnb TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error)
|
||||||
//sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error)
|
//sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error)
|
||||||
//sysnb Times(tms *Tms) (ticks uintptr, err error)
|
//sysnb Times(tms *Tms) (ticks uintptr, err error)
|
||||||
//sysnb Umask(mask int) (oldmask int)
|
//sysnb Umask(mask int) (oldmask int)
|
||||||
|
@ -1926,6 +1950,20 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
|
||||||
return int(n), nil
|
return int(n), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func isGroupMember(gid int) bool {
|
||||||
|
groups, err := Getgroups()
|
||||||
|
if err != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, g := range groups {
|
||||||
|
if g == gid {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
//sys faccessat(dirfd int, path string, mode uint32) (err error)
|
//sys faccessat(dirfd int, path string, mode uint32) (err error)
|
||||||
|
|
||||||
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||||
|
@ -1983,7 +2021,7 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||||
gid = Getgid()
|
gid = Getgid()
|
||||||
}
|
}
|
||||||
|
|
||||||
if uint32(gid) == st.Gid {
|
if uint32(gid) == st.Gid || isGroupMember(gid) {
|
||||||
fmode = (st.Mode >> 3) & 7
|
fmode = (st.Mode >> 3) & 7
|
||||||
} else {
|
} else {
|
||||||
fmode = st.Mode & 7
|
fmode = st.Mode & 7
|
||||||
|
@ -2178,7 +2216,6 @@ func Klogset(typ int, arg int) (err error) {
|
||||||
// TimerGetoverrun
|
// TimerGetoverrun
|
||||||
// TimerGettime
|
// TimerGettime
|
||||||
// TimerSettime
|
// TimerSettime
|
||||||
// Timerfd
|
|
||||||
// Tkill (obsolete)
|
// Tkill (obsolete)
|
||||||
// Tuxcall
|
// Tuxcall
|
||||||
// Umount2
|
// Umount2
|
||||||
|
|
|
@ -49,7 +49,7 @@ func Pipe2(p []int, flags int) (err error) {
|
||||||
|
|
||||||
// 64-bit file system and 32-bit uid calls
|
// 64-bit file system and 32-bit uid calls
|
||||||
// (386 default is 32-bit file system and 16-bit uid).
|
// (386 default is 32-bit file system and 16-bit uid).
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
|
|
|
@ -80,7 +80,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||||
|
|
||||||
// 64-bit file system and 32-bit uid calls
|
// 64-bit file system and 32-bit uid calls
|
||||||
// (16-bit uid calls are not always supported in newer kernels)
|
// (16-bit uid calls are not always supported in newer kernels)
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
||||||
|
|
|
@ -25,7 +25,7 @@ func EpollCreate(size int) (fd int, err error) {
|
||||||
//sysnb Getegid() (egid int)
|
//sysnb Getegid() (egid int)
|
||||||
//sysnb Geteuid() (euid int)
|
//sysnb Geteuid() (euid int)
|
||||||
//sysnb Getgid() (gid int)
|
//sysnb Getgid() (gid int)
|
||||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
//sysnb getrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
//sys Listen(s int, n int) (err error)
|
//sys Listen(s int, n int) (err error)
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||||
|
@ -47,7 +47,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||||
//sysnb Setregid(rgid int, egid int) (err error)
|
//sysnb Setregid(rgid int, egid int) (err error)
|
||||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
//sysnb setrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||||
//sys Shutdown(fd int, how int) (err error)
|
//sys Shutdown(fd int, how int) (err error)
|
||||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||||
|
@ -168,6 +168,24 @@ func Pipe2(p []int, flags int) (err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Getrlimit prefers the prlimit64 system call. See issue 38604.
|
||||||
|
func Getrlimit(resource int, rlim *Rlimit) error {
|
||||||
|
err := prlimit(0, resource, nil, rlim)
|
||||||
|
if err != ENOSYS {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return getrlimit(resource, rlim)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setrlimit prefers the prlimit64 system call. See issue 38604.
|
||||||
|
func Setrlimit(resource int, rlim *Rlimit) error {
|
||||||
|
err := prlimit(0, resource, rlim, nil)
|
||||||
|
if err != ENOSYS {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return setrlimit(resource, rlim)
|
||||||
|
}
|
||||||
|
|
||||||
func (r *PtraceRegs) PC() uint64 { return r.Pc }
|
func (r *PtraceRegs) PC() uint64 { return r.Pc }
|
||||||
|
|
||||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
|
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
|
||||||
|
@ -192,9 +210,9 @@ func InotifyInit() (fd int, err error) {
|
||||||
return InotifyInit1(0)
|
return InotifyInit1(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
// dup2 exists because func Dup3 in syscall_linux.go references
|
||||||
return Dup3(oldfd, newfd, 0)
|
// it in an unreachable path. dup2 isn't available on arm64.
|
||||||
}
|
func dup2(oldfd int, newfd int) error
|
||||||
|
|
||||||
func Pause() error {
|
func Pause() error {
|
||||||
_, err := ppoll(nil, 0, nil, nil)
|
_, err := ppoll(nil, 0, nil, nil)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
|
|
||||||
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||||
|
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
|
|
|
@ -191,10 +191,6 @@ func InotifyInit() (fd int, err error) {
|
||||||
return InotifyInit1(0)
|
return InotifyInit1(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
|
||||||
return Dup3(oldfd, newfd, 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
func Pause() error {
|
func Pause() error {
|
||||||
_, err := ppoll(nil, 0, nil, nil)
|
_, err := ppoll(nil, 0, nil, nil)
|
||||||
return err
|
return err
|
||||||
|
@ -228,3 +224,7 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
|
||||||
}
|
}
|
||||||
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
|
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// dup2 exists because func Dup3 in syscall_linux.go references
|
||||||
|
// it in an unreachable path. dup2 isn't available on arm64.
|
||||||
|
func dup2(oldfd int, newfd int) error
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sysnb EpollCreate(size int) (fd int, err error)
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
|
|
|
@ -8,7 +8,7 @@ package unix
|
||||||
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||||
|
|
|
@ -12,6 +12,8 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
|
"golang.org/x/sys/internal/unsafeheader"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -113,15 +115,12 @@ func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (d
|
||||||
return nil, errno
|
return nil, errno
|
||||||
}
|
}
|
||||||
|
|
||||||
// Slice memory layout
|
// Use unsafe to convert addr into a []byte.
|
||||||
var sl = struct {
|
var b []byte
|
||||||
addr uintptr
|
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
|
||||||
len int
|
hdr.Data = unsafe.Pointer(addr)
|
||||||
cap int
|
hdr.Cap = length
|
||||||
}{addr, length, length}
|
hdr.Len = length
|
||||||
|
|
||||||
// Use unsafe to turn sl into a []byte.
|
|
||||||
b := *(*[]byte)(unsafe.Pointer(&sl))
|
|
||||||
|
|
||||||
// Register mapping in m and return it.
|
// Register mapping in m and return it.
|
||||||
p := &b[cap(b)-1]
|
p := &b[cap(b)-1]
|
||||||
|
|
|
@ -160,77 +160,28 @@ const (
|
||||||
BPF_A = 0x10
|
BPF_A = 0x10
|
||||||
BPF_ABS = 0x20
|
BPF_ABS = 0x20
|
||||||
BPF_ADD = 0x0
|
BPF_ADD = 0x0
|
||||||
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
|
||||||
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
|
||||||
BPF_ALU = 0x4
|
BPF_ALU = 0x4
|
||||||
BPF_ALU64 = 0x7
|
BPF_ALU64 = 0x7
|
||||||
BPF_AND = 0x50
|
BPF_AND = 0x50
|
||||||
BPF_ANY = 0x0
|
|
||||||
BPF_ARSH = 0xc0
|
BPF_ARSH = 0xc0
|
||||||
BPF_B = 0x10
|
BPF_B = 0x10
|
||||||
BPF_BUILD_ID_SIZE = 0x14
|
BPF_BUILD_ID_SIZE = 0x14
|
||||||
BPF_CALL = 0x80
|
BPF_CALL = 0x80
|
||||||
BPF_DEVCG_ACC_MKNOD = 0x1
|
|
||||||
BPF_DEVCG_ACC_READ = 0x2
|
|
||||||
BPF_DEVCG_ACC_WRITE = 0x4
|
|
||||||
BPF_DEVCG_DEV_BLOCK = 0x1
|
|
||||||
BPF_DEVCG_DEV_CHAR = 0x2
|
|
||||||
BPF_DIV = 0x30
|
BPF_DIV = 0x30
|
||||||
BPF_DW = 0x18
|
BPF_DW = 0x18
|
||||||
BPF_END = 0xd0
|
BPF_END = 0xd0
|
||||||
BPF_EXIST = 0x2
|
|
||||||
BPF_EXIT = 0x90
|
BPF_EXIT = 0x90
|
||||||
BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
|
|
||||||
BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
|
|
||||||
BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
|
|
||||||
BPF_FROM_BE = 0x8
|
BPF_FROM_BE = 0x8
|
||||||
BPF_FROM_LE = 0x0
|
BPF_FROM_LE = 0x0
|
||||||
BPF_FS_MAGIC = 0xcafe4a11
|
BPF_FS_MAGIC = 0xcafe4a11
|
||||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
|
|
||||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
|
|
||||||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
|
||||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
|
||||||
BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
|
|
||||||
BPF_F_ALLOW_MULTI = 0x2
|
BPF_F_ALLOW_MULTI = 0x2
|
||||||
BPF_F_ALLOW_OVERRIDE = 0x1
|
BPF_F_ALLOW_OVERRIDE = 0x1
|
||||||
BPF_F_ANY_ALIGNMENT = 0x2
|
BPF_F_ANY_ALIGNMENT = 0x2
|
||||||
BPF_F_CLONE = 0x200
|
|
||||||
BPF_F_CTXLEN_MASK = 0xfffff00000000
|
|
||||||
BPF_F_CURRENT_CPU = 0xffffffff
|
|
||||||
BPF_F_CURRENT_NETNS = -0x1
|
|
||||||
BPF_F_DONT_FRAGMENT = 0x4
|
|
||||||
BPF_F_FAST_STACK_CMP = 0x200
|
|
||||||
BPF_F_HDR_FIELD_MASK = 0xf
|
|
||||||
BPF_F_INDEX_MASK = 0xffffffff
|
|
||||||
BPF_F_INGRESS = 0x1
|
|
||||||
BPF_F_INVALIDATE_HASH = 0x2
|
|
||||||
BPF_F_LOCK = 0x4
|
|
||||||
BPF_F_MARK_ENFORCE = 0x40
|
|
||||||
BPF_F_MARK_MANGLED_0 = 0x20
|
|
||||||
BPF_F_MMAPABLE = 0x400
|
|
||||||
BPF_F_NO_COMMON_LRU = 0x2
|
|
||||||
BPF_F_NO_PREALLOC = 0x1
|
|
||||||
BPF_F_NUMA_NODE = 0x4
|
|
||||||
BPF_F_PSEUDO_HDR = 0x10
|
|
||||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||||
BPF_F_RDONLY = 0x8
|
BPF_F_REPLACE = 0x4
|
||||||
BPF_F_RDONLY_PROG = 0x80
|
|
||||||
BPF_F_RECOMPUTE_CSUM = 0x1
|
|
||||||
BPF_F_REUSE_STACKID = 0x400
|
|
||||||
BPF_F_SEQ_NUMBER = 0x8
|
|
||||||
BPF_F_SKIP_FIELD_MASK = 0xff
|
|
||||||
BPF_F_STACK_BUILD_ID = 0x20
|
|
||||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||||
BPF_F_SYSCTL_BASE_NAME = 0x1
|
|
||||||
BPF_F_TEST_RND_HI32 = 0x4
|
BPF_F_TEST_RND_HI32 = 0x4
|
||||||
BPF_F_TEST_STATE_FREQ = 0x8
|
BPF_F_TEST_STATE_FREQ = 0x8
|
||||||
BPF_F_TUNINFO_IPV6 = 0x1
|
|
||||||
BPF_F_USER_BUILD_ID = 0x800
|
|
||||||
BPF_F_USER_STACK = 0x100
|
|
||||||
BPF_F_WRONLY = 0x10
|
|
||||||
BPF_F_WRONLY_PROG = 0x100
|
|
||||||
BPF_F_ZERO_CSUM_TX = 0x2
|
|
||||||
BPF_F_ZERO_SEED = 0x40
|
|
||||||
BPF_H = 0x8
|
BPF_H = 0x8
|
||||||
BPF_IMM = 0x0
|
BPF_IMM = 0x0
|
||||||
BPF_IND = 0x40
|
BPF_IND = 0x40
|
||||||
|
@ -266,7 +217,6 @@ const (
|
||||||
BPF_MUL = 0x20
|
BPF_MUL = 0x20
|
||||||
BPF_NEG = 0x80
|
BPF_NEG = 0x80
|
||||||
BPF_NET_OFF = -0x100000
|
BPF_NET_OFF = -0x100000
|
||||||
BPF_NOEXIST = 0x1
|
|
||||||
BPF_OBJ_NAME_LEN = 0x10
|
BPF_OBJ_NAME_LEN = 0x10
|
||||||
BPF_OR = 0x40
|
BPF_OR = 0x40
|
||||||
BPF_PSEUDO_CALL = 0x1
|
BPF_PSEUDO_CALL = 0x1
|
||||||
|
@ -274,12 +224,6 @@ const (
|
||||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||||
BPF_RET = 0x6
|
BPF_RET = 0x6
|
||||||
BPF_RSH = 0x70
|
BPF_RSH = 0x70
|
||||||
BPF_SK_STORAGE_GET_F_CREATE = 0x1
|
|
||||||
BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
|
|
||||||
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
|
||||||
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
|
||||||
BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
|
|
||||||
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
|
|
||||||
BPF_ST = 0x2
|
BPF_ST = 0x2
|
||||||
BPF_STX = 0x3
|
BPF_STX = 0x3
|
||||||
BPF_SUB = 0x10
|
BPF_SUB = 0x10
|
||||||
|
@ -377,18 +321,21 @@ const (
|
||||||
CLOCK_TXINT = 0x3
|
CLOCK_TXINT = 0x3
|
||||||
CLONE_ARGS_SIZE_VER0 = 0x40
|
CLONE_ARGS_SIZE_VER0 = 0x40
|
||||||
CLONE_ARGS_SIZE_VER1 = 0x50
|
CLONE_ARGS_SIZE_VER1 = 0x50
|
||||||
|
CLONE_ARGS_SIZE_VER2 = 0x58
|
||||||
CLONE_CHILD_CLEARTID = 0x200000
|
CLONE_CHILD_CLEARTID = 0x200000
|
||||||
CLONE_CHILD_SETTID = 0x1000000
|
CLONE_CHILD_SETTID = 0x1000000
|
||||||
CLONE_CLEAR_SIGHAND = 0x100000000
|
CLONE_CLEAR_SIGHAND = 0x100000000
|
||||||
CLONE_DETACHED = 0x400000
|
CLONE_DETACHED = 0x400000
|
||||||
CLONE_FILES = 0x400
|
CLONE_FILES = 0x400
|
||||||
CLONE_FS = 0x200
|
CLONE_FS = 0x200
|
||||||
|
CLONE_INTO_CGROUP = 0x200000000
|
||||||
CLONE_IO = 0x80000000
|
CLONE_IO = 0x80000000
|
||||||
CLONE_NEWCGROUP = 0x2000000
|
CLONE_NEWCGROUP = 0x2000000
|
||||||
CLONE_NEWIPC = 0x8000000
|
CLONE_NEWIPC = 0x8000000
|
||||||
CLONE_NEWNET = 0x40000000
|
CLONE_NEWNET = 0x40000000
|
||||||
CLONE_NEWNS = 0x20000
|
CLONE_NEWNS = 0x20000
|
||||||
CLONE_NEWPID = 0x20000000
|
CLONE_NEWPID = 0x20000000
|
||||||
|
CLONE_NEWTIME = 0x80
|
||||||
CLONE_NEWUSER = 0x10000000
|
CLONE_NEWUSER = 0x10000000
|
||||||
CLONE_NEWUTS = 0x4000000
|
CLONE_NEWUTS = 0x4000000
|
||||||
CLONE_PARENT = 0x8000
|
CLONE_PARENT = 0x8000
|
||||||
|
@ -596,7 +543,9 @@ const (
|
||||||
FAN_DELETE = 0x200
|
FAN_DELETE = 0x200
|
||||||
FAN_DELETE_SELF = 0x400
|
FAN_DELETE_SELF = 0x400
|
||||||
FAN_DENY = 0x2
|
FAN_DENY = 0x2
|
||||||
|
FAN_DIR_MODIFY = 0x80000
|
||||||
FAN_ENABLE_AUDIT = 0x40
|
FAN_ENABLE_AUDIT = 0x40
|
||||||
|
FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
|
||||||
FAN_EVENT_INFO_TYPE_FID = 0x1
|
FAN_EVENT_INFO_TYPE_FID = 0x1
|
||||||
FAN_EVENT_METADATA_LEN = 0x18
|
FAN_EVENT_METADATA_LEN = 0x18
|
||||||
FAN_EVENT_ON_CHILD = 0x8000000
|
FAN_EVENT_ON_CHILD = 0x8000000
|
||||||
|
@ -671,6 +620,7 @@ const (
|
||||||
FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
|
FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
|
||||||
FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
|
FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
|
FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
|
||||||
|
FS_IOC_MEASURE_VERITY = 0xc0046686
|
||||||
FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
|
FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
|
||||||
FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
|
FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
|
||||||
FS_KEY_DESCRIPTOR_SIZE = 0x8
|
FS_KEY_DESCRIPTOR_SIZE = 0x8
|
||||||
|
@ -683,6 +633,9 @@ const (
|
||||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||||
FS_POLICY_FLAGS_VALID = 0xf
|
FS_POLICY_FLAGS_VALID = 0xf
|
||||||
|
FS_VERITY_FL = 0x100000
|
||||||
|
FS_VERITY_HASH_ALG_SHA256 = 0x1
|
||||||
|
FS_VERITY_HASH_ALG_SHA512 = 0x2
|
||||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||||
F_ADD_SEALS = 0x409
|
F_ADD_SEALS = 0x409
|
||||||
F_DUPFD = 0x0
|
F_DUPFD = 0x0
|
||||||
|
@ -733,6 +686,7 @@ const (
|
||||||
GENL_NAMSIZ = 0x10
|
GENL_NAMSIZ = 0x10
|
||||||
GENL_START_ALLOC = 0x13
|
GENL_START_ALLOC = 0x13
|
||||||
GENL_UNS_ADMIN_PERM = 0x10
|
GENL_UNS_ADMIN_PERM = 0x10
|
||||||
|
GRND_INSECURE = 0x4
|
||||||
GRND_NONBLOCK = 0x1
|
GRND_NONBLOCK = 0x1
|
||||||
GRND_RANDOM = 0x2
|
GRND_RANDOM = 0x2
|
||||||
HDIO_DRIVE_CMD = 0x31f
|
HDIO_DRIVE_CMD = 0x31f
|
||||||
|
@ -1483,6 +1437,7 @@ const (
|
||||||
PR_GET_FPEMU = 0x9
|
PR_GET_FPEMU = 0x9
|
||||||
PR_GET_FPEXC = 0xb
|
PR_GET_FPEXC = 0xb
|
||||||
PR_GET_FP_MODE = 0x2e
|
PR_GET_FP_MODE = 0x2e
|
||||||
|
PR_GET_IO_FLUSHER = 0x3a
|
||||||
PR_GET_KEEPCAPS = 0x7
|
PR_GET_KEEPCAPS = 0x7
|
||||||
PR_GET_NAME = 0x10
|
PR_GET_NAME = 0x10
|
||||||
PR_GET_NO_NEW_PRIVS = 0x27
|
PR_GET_NO_NEW_PRIVS = 0x27
|
||||||
|
@ -1518,6 +1473,7 @@ const (
|
||||||
PR_SET_FPEMU = 0xa
|
PR_SET_FPEMU = 0xa
|
||||||
PR_SET_FPEXC = 0xc
|
PR_SET_FPEXC = 0xc
|
||||||
PR_SET_FP_MODE = 0x2d
|
PR_SET_FP_MODE = 0x2d
|
||||||
|
PR_SET_IO_FLUSHER = 0x39
|
||||||
PR_SET_KEEPCAPS = 0x8
|
PR_SET_KEEPCAPS = 0x8
|
||||||
PR_SET_MM = 0x23
|
PR_SET_MM = 0x23
|
||||||
PR_SET_MM_ARG_END = 0x9
|
PR_SET_MM_ARG_END = 0x9
|
||||||
|
@ -1746,12 +1702,15 @@ const (
|
||||||
RTM_DELRULE = 0x21
|
RTM_DELRULE = 0x21
|
||||||
RTM_DELTCLASS = 0x29
|
RTM_DELTCLASS = 0x29
|
||||||
RTM_DELTFILTER = 0x2d
|
RTM_DELTFILTER = 0x2d
|
||||||
|
RTM_DELVLAN = 0x71
|
||||||
RTM_F_CLONED = 0x200
|
RTM_F_CLONED = 0x200
|
||||||
RTM_F_EQUALIZE = 0x400
|
RTM_F_EQUALIZE = 0x400
|
||||||
RTM_F_FIB_MATCH = 0x2000
|
RTM_F_FIB_MATCH = 0x2000
|
||||||
RTM_F_LOOKUP_TABLE = 0x1000
|
RTM_F_LOOKUP_TABLE = 0x1000
|
||||||
RTM_F_NOTIFY = 0x100
|
RTM_F_NOTIFY = 0x100
|
||||||
|
RTM_F_OFFLOAD = 0x4000
|
||||||
RTM_F_PREFIX = 0x800
|
RTM_F_PREFIX = 0x800
|
||||||
|
RTM_F_TRAP = 0x8000
|
||||||
RTM_GETACTION = 0x32
|
RTM_GETACTION = 0x32
|
||||||
RTM_GETADDR = 0x16
|
RTM_GETADDR = 0x16
|
||||||
RTM_GETADDRLABEL = 0x4a
|
RTM_GETADDRLABEL = 0x4a
|
||||||
|
@ -1773,7 +1732,8 @@ const (
|
||||||
RTM_GETSTATS = 0x5e
|
RTM_GETSTATS = 0x5e
|
||||||
RTM_GETTCLASS = 0x2a
|
RTM_GETTCLASS = 0x2a
|
||||||
RTM_GETTFILTER = 0x2e
|
RTM_GETTFILTER = 0x2e
|
||||||
RTM_MAX = 0x6f
|
RTM_GETVLAN = 0x72
|
||||||
|
RTM_MAX = 0x73
|
||||||
RTM_NEWACTION = 0x30
|
RTM_NEWACTION = 0x30
|
||||||
RTM_NEWADDR = 0x14
|
RTM_NEWADDR = 0x14
|
||||||
RTM_NEWADDRLABEL = 0x48
|
RTM_NEWADDRLABEL = 0x48
|
||||||
|
@ -1788,6 +1748,7 @@ const (
|
||||||
RTM_NEWNETCONF = 0x50
|
RTM_NEWNETCONF = 0x50
|
||||||
RTM_NEWNEXTHOP = 0x68
|
RTM_NEWNEXTHOP = 0x68
|
||||||
RTM_NEWNSID = 0x58
|
RTM_NEWNSID = 0x58
|
||||||
|
RTM_NEWNVLAN = 0x70
|
||||||
RTM_NEWPREFIX = 0x34
|
RTM_NEWPREFIX = 0x34
|
||||||
RTM_NEWQDISC = 0x24
|
RTM_NEWQDISC = 0x24
|
||||||
RTM_NEWROUTE = 0x18
|
RTM_NEWROUTE = 0x18
|
||||||
|
@ -1795,8 +1756,8 @@ const (
|
||||||
RTM_NEWSTATS = 0x5c
|
RTM_NEWSTATS = 0x5c
|
||||||
RTM_NEWTCLASS = 0x28
|
RTM_NEWTCLASS = 0x28
|
||||||
RTM_NEWTFILTER = 0x2c
|
RTM_NEWTFILTER = 0x2c
|
||||||
RTM_NR_FAMILIES = 0x18
|
RTM_NR_FAMILIES = 0x19
|
||||||
RTM_NR_MSGTYPES = 0x60
|
RTM_NR_MSGTYPES = 0x64
|
||||||
RTM_SETDCB = 0x4f
|
RTM_SETDCB = 0x4f
|
||||||
RTM_SETLINK = 0x13
|
RTM_SETLINK = 0x13
|
||||||
RTM_SETNEIGHTBL = 0x43
|
RTM_SETNEIGHTBL = 0x43
|
||||||
|
@ -2086,7 +2047,7 @@ const (
|
||||||
TASKSTATS_GENL_NAME = "TASKSTATS"
|
TASKSTATS_GENL_NAME = "TASKSTATS"
|
||||||
TASKSTATS_GENL_VERSION = 0x1
|
TASKSTATS_GENL_VERSION = 0x1
|
||||||
TASKSTATS_TYPE_MAX = 0x6
|
TASKSTATS_TYPE_MAX = 0x6
|
||||||
TASKSTATS_VERSION = 0x9
|
TASKSTATS_VERSION = 0xa
|
||||||
TCIFLUSH = 0x0
|
TCIFLUSH = 0x0
|
||||||
TCIOFF = 0x2
|
TCIOFF = 0x2
|
||||||
TCIOFLUSH = 0x2
|
TCIOFLUSH = 0x2
|
||||||
|
@ -2094,8 +2055,6 @@ const (
|
||||||
TCOFLUSH = 0x1
|
TCOFLUSH = 0x1
|
||||||
TCOOFF = 0x0
|
TCOOFF = 0x0
|
||||||
TCOON = 0x1
|
TCOON = 0x1
|
||||||
TCP_BPF_IW = 0x3e9
|
|
||||||
TCP_BPF_SNDCWND_CLAMP = 0x3ea
|
|
||||||
TCP_CC_INFO = 0x1a
|
TCP_CC_INFO = 0x1a
|
||||||
TCP_CM_INQ = 0x24
|
TCP_CM_INQ = 0x24
|
||||||
TCP_CONGESTION = 0xd
|
TCP_CONGESTION = 0xd
|
||||||
|
@ -2151,6 +2110,8 @@ const (
|
||||||
TCP_USER_TIMEOUT = 0x12
|
TCP_USER_TIMEOUT = 0x12
|
||||||
TCP_WINDOW_CLAMP = 0xa
|
TCP_WINDOW_CLAMP = 0xa
|
||||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||||
|
TFD_TIMER_ABSTIME = 0x1
|
||||||
|
TFD_TIMER_CANCEL_ON_SET = 0x2
|
||||||
TIMER_ABSTIME = 0x1
|
TIMER_ABSTIME = 0x1
|
||||||
TIOCM_DTR = 0x2
|
TIOCM_DTR = 0x2
|
||||||
TIOCM_LE = 0x1
|
TIOCM_LE = 0x1
|
||||||
|
@ -2267,7 +2228,7 @@ const (
|
||||||
VMADDR_CID_ANY = 0xffffffff
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
VMADDR_CID_HOST = 0x2
|
VMADDR_CID_HOST = 0x2
|
||||||
VMADDR_CID_HYPERVISOR = 0x0
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
VMADDR_CID_RESERVED = 0x1
|
VMADDR_CID_LOCAL = 0x1
|
||||||
VMADDR_PORT_ANY = 0xffffffff
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VM_SOCKETS_INVALID_VERSION = 0xffffffff
|
VM_SOCKETS_INVALID_VERSION = 0xffffffff
|
||||||
VQUIT = 0x1
|
VQUIT = 0x1
|
||||||
|
@ -2368,8 +2329,9 @@ const (
|
||||||
XDP_COPY = 0x2
|
XDP_COPY = 0x2
|
||||||
XDP_FLAGS_DRV_MODE = 0x4
|
XDP_FLAGS_DRV_MODE = 0x4
|
||||||
XDP_FLAGS_HW_MODE = 0x8
|
XDP_FLAGS_HW_MODE = 0x8
|
||||||
XDP_FLAGS_MASK = 0xf
|
XDP_FLAGS_MASK = 0x1f
|
||||||
XDP_FLAGS_MODES = 0xe
|
XDP_FLAGS_MODES = 0xe
|
||||||
|
XDP_FLAGS_REPLACE = 0x10
|
||||||
XDP_FLAGS_SKB_MODE = 0x2
|
XDP_FLAGS_SKB_MODE = 0x2
|
||||||
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
|
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
|
||||||
XDP_MMAP_OFFSETS = 0x1
|
XDP_MMAP_OFFSETS = 0x1
|
||||||
|
@ -2394,6 +2356,7 @@ const (
|
||||||
XENFS_SUPER_MAGIC = 0xabba1974
|
XENFS_SUPER_MAGIC = 0xabba1974
|
||||||
XFS_SUPER_MAGIC = 0x58465342
|
XFS_SUPER_MAGIC = 0x58465342
|
||||||
Z3FOLD_MAGIC = 0x33
|
Z3FOLD_MAGIC = 0x33
|
||||||
|
ZONEFS_MAGIC = 0x5a4f4653
|
||||||
ZSMALLOC_MAGIC = 0x58295829
|
ZSMALLOC_MAGIC = 0x58295829
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,9 @@ const (
|
||||||
FFDLY = 0x8000
|
FFDLY = 0x8000
|
||||||
FLUSHO = 0x1000
|
FLUSHO = 0x1000
|
||||||
FP_XSTATE_MAGIC2 = 0x46505845
|
FP_XSTATE_MAGIC2 = 0x46505845
|
||||||
|
FS_IOC_ENABLE_VERITY = 0x40806685
|
||||||
|
FS_IOC_GETFLAGS = 0x80046601
|
||||||
|
FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
|
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
|
||||||
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
|
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
|
||||||
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
|
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
|
||||||
|
@ -340,6 +343,8 @@ const (
|
||||||
TCSETXF = 0x5434
|
TCSETXF = 0x5434
|
||||||
TCSETXW = 0x5435
|
TCSETXW = 0x5435
|
||||||
TCXONC = 0x540a
|
TCXONC = 0x540a
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
@ -73,6 +73,9 @@ const (
|
||||||
FFDLY = 0x8000
|
FFDLY = 0x8000
|
||||||
FLUSHO = 0x1000
|
FLUSHO = 0x1000
|
||||||
FP_XSTATE_MAGIC2 = 0x46505845
|
FP_XSTATE_MAGIC2 = 0x46505845
|
||||||
|
FS_IOC_ENABLE_VERITY = 0x40806685
|
||||||
|
FS_IOC_GETFLAGS = 0x80086601
|
||||||
|
FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
|
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
|
||||||
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
|
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
|
||||||
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
|
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
|
||||||
|
@ -341,6 +344,8 @@ const (
|
||||||
TCSETXF = 0x5434
|
TCSETXF = 0x5434
|
||||||
TCSETXW = 0x5435
|
TCSETXW = 0x5435
|
||||||
TCXONC = 0x540a
|
TCXONC = 0x540a
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
@ -72,6 +72,9 @@ const (
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
FFDLY = 0x8000
|
FFDLY = 0x8000
|
||||||
FLUSHO = 0x1000
|
FLUSHO = 0x1000
|
||||||
|
FS_IOC_ENABLE_VERITY = 0x40806685
|
||||||
|
FS_IOC_GETFLAGS = 0x80046601
|
||||||
|
FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
|
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
|
||||||
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
|
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
|
||||||
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
|
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
|
||||||
|
@ -347,6 +350,8 @@ const (
|
||||||
TCSETXF = 0x5434
|
TCSETXF = 0x5434
|
||||||
TCSETXW = 0x5435
|
TCSETXW = 0x5435
|
||||||
TCXONC = 0x540a
|
TCXONC = 0x540a
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
@ -75,6 +75,9 @@ const (
|
||||||
FFDLY = 0x8000
|
FFDLY = 0x8000
|
||||||
FLUSHO = 0x1000
|
FLUSHO = 0x1000
|
||||||
FPSIMD_MAGIC = 0x46508001
|
FPSIMD_MAGIC = 0x46508001
|
||||||
|
FS_IOC_ENABLE_VERITY = 0x40806685
|
||||||
|
FS_IOC_GETFLAGS = 0x80086601
|
||||||
|
FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
|
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
|
||||||
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
|
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
|
||||||
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
|
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
|
||||||
|
@ -334,6 +337,8 @@ const (
|
||||||
TCSETXF = 0x5434
|
TCSETXF = 0x5434
|
||||||
TCSETXW = 0x5435
|
TCSETXW = 0x5435
|
||||||
TCXONC = 0x540a
|
TCXONC = 0x540a
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
@ -72,6 +72,9 @@ const (
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
FFDLY = 0x8000
|
FFDLY = 0x8000
|
||||||
FLUSHO = 0x2000
|
FLUSHO = 0x2000
|
||||||
|
FS_IOC_ENABLE_VERITY = 0x80806685
|
||||||
|
FS_IOC_GETFLAGS = 0x40046601
|
||||||
|
FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
|
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
|
||||||
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
|
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
|
||||||
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
|
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
|
||||||
|
@ -337,6 +340,8 @@ const (
|
||||||
TCSETSW = 0x540f
|
TCSETSW = 0x540f
|
||||||
TCSETSW2 = 0x8030542c
|
TCSETSW2 = 0x8030542c
|
||||||
TCXONC = 0x5406
|
TCXONC = 0x5406
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x80
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x80047478
|
TIOCCONS = 0x80047478
|
||||||
TIOCEXCL = 0x740d
|
TIOCEXCL = 0x740d
|
||||||
|
|
|
@ -72,6 +72,9 @@ const (
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
FFDLY = 0x8000
|
FFDLY = 0x8000
|
||||||
FLUSHO = 0x2000
|
FLUSHO = 0x2000
|
||||||
|
FS_IOC_ENABLE_VERITY = 0x80806685
|
||||||
|
FS_IOC_GETFLAGS = 0x40086601
|
||||||
|
FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
|
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
|
||||||
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
|
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
|
||||||
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
|
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
|
||||||
|
@ -337,6 +340,8 @@ const (
|
||||||
TCSETSW = 0x540f
|
TCSETSW = 0x540f
|
||||||
TCSETSW2 = 0x8030542c
|
TCSETSW2 = 0x8030542c
|
||||||
TCXONC = 0x5406
|
TCXONC = 0x5406
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x80
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x80047478
|
TIOCCONS = 0x80047478
|
||||||
TIOCEXCL = 0x740d
|
TIOCEXCL = 0x740d
|
||||||
|
|
|
@ -72,6 +72,9 @@ const (
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
FFDLY = 0x8000
|
FFDLY = 0x8000
|
||||||
FLUSHO = 0x2000
|
FLUSHO = 0x2000
|
||||||
|
FS_IOC_ENABLE_VERITY = 0x80806685
|
||||||
|
FS_IOC_GETFLAGS = 0x40086601
|
||||||
|
FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
|
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
|
||||||
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
|
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
|
||||||
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
|
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
|
||||||
|
@ -337,6 +340,8 @@ const (
|
||||||
TCSETSW = 0x540f
|
TCSETSW = 0x540f
|
||||||
TCSETSW2 = 0x8030542c
|
TCSETSW2 = 0x8030542c
|
||||||
TCXONC = 0x5406
|
TCXONC = 0x5406
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x80
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x80047478
|
TIOCCONS = 0x80047478
|
||||||
TIOCEXCL = 0x740d
|
TIOCEXCL = 0x740d
|
||||||
|
|
|
@ -72,6 +72,9 @@ const (
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
FFDLY = 0x8000
|
FFDLY = 0x8000
|
||||||
FLUSHO = 0x2000
|
FLUSHO = 0x2000
|
||||||
|
FS_IOC_ENABLE_VERITY = 0x80806685
|
||||||
|
FS_IOC_GETFLAGS = 0x40046601
|
||||||
|
FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
|
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
|
||||||
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
|
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
|
||||||
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
|
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
|
||||||
|
@ -337,6 +340,8 @@ const (
|
||||||
TCSETSW = 0x540f
|
TCSETSW = 0x540f
|
||||||
TCSETSW2 = 0x8030542c
|
TCSETSW2 = 0x8030542c
|
||||||
TCXONC = 0x5406
|
TCXONC = 0x5406
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x80
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x80047478
|
TIOCCONS = 0x80047478
|
||||||
TIOCEXCL = 0x740d
|
TIOCEXCL = 0x740d
|
||||||
|
|
|
@ -72,6 +72,9 @@ const (
|
||||||
FF1 = 0x4000
|
FF1 = 0x4000
|
||||||
FFDLY = 0x4000
|
FFDLY = 0x4000
|
||||||
FLUSHO = 0x800000
|
FLUSHO = 0x800000
|
||||||
|
FS_IOC_ENABLE_VERITY = 0x80806685
|
||||||
|
FS_IOC_GETFLAGS = 0x40086601
|
||||||
|
FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
|
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
|
||||||
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
|
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
|
||||||
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
|
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
|
||||||
|
@ -391,6 +394,8 @@ const (
|
||||||
TCSETSF = 0x802c7416
|
TCSETSF = 0x802c7416
|
||||||
TCSETSW = 0x802c7415
|
TCSETSW = 0x802c7415
|
||||||
TCXONC = 0x2000741e
|
TCXONC = 0x2000741e
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
@ -72,6 +72,9 @@ const (
|
||||||
FF1 = 0x4000
|
FF1 = 0x4000
|
||||||
FFDLY = 0x4000
|
FFDLY = 0x4000
|
||||||
FLUSHO = 0x800000
|
FLUSHO = 0x800000
|
||||||
|
FS_IOC_ENABLE_VERITY = 0x80806685
|
||||||
|
FS_IOC_GETFLAGS = 0x40086601
|
||||||
|
FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
|
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
|
||||||
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
|
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
|
||||||
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
|
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
|
||||||
|
@ -391,6 +394,8 @@ const (
|
||||||
TCSETSF = 0x802c7416
|
TCSETSF = 0x802c7416
|
||||||
TCSETSW = 0x802c7415
|
TCSETSW = 0x802c7415
|
||||||
TCXONC = 0x2000741e
|
TCXONC = 0x2000741e
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
@ -72,6 +72,9 @@ const (
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
FFDLY = 0x8000
|
FFDLY = 0x8000
|
||||||
FLUSHO = 0x1000
|
FLUSHO = 0x1000
|
||||||
|
FS_IOC_ENABLE_VERITY = 0x40806685
|
||||||
|
FS_IOC_GETFLAGS = 0x80086601
|
||||||
|
FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
|
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
|
||||||
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
|
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
|
||||||
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
|
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
|
||||||
|
@ -328,6 +331,8 @@ const (
|
||||||
TCSETXF = 0x5434
|
TCSETXF = 0x5434
|
||||||
TCSETXW = 0x5435
|
TCSETXW = 0x5435
|
||||||
TCXONC = 0x540a
|
TCXONC = 0x540a
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
@ -72,6 +72,9 @@ const (
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
FFDLY = 0x8000
|
FFDLY = 0x8000
|
||||||
FLUSHO = 0x1000
|
FLUSHO = 0x1000
|
||||||
|
FS_IOC_ENABLE_VERITY = 0x40806685
|
||||||
|
FS_IOC_GETFLAGS = 0x80086601
|
||||||
|
FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
|
FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
|
||||||
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
|
FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
|
||||||
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
|
FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
|
||||||
|
@ -401,6 +404,8 @@ const (
|
||||||
TCSETXF = 0x5434
|
TCSETXF = 0x5434
|
||||||
TCSETXW = 0x5435
|
TCSETXW = 0x5435
|
||||||
TCXONC = 0x540a
|
TCXONC = 0x540a
|
||||||
|
TFD_CLOEXEC = 0x80000
|
||||||
|
TFD_NONBLOCK = 0x800
|
||||||
TIOCCBRK = 0x5428
|
TIOCCBRK = 0x5428
|
||||||
TIOCCONS = 0x541d
|
TIOCCONS = 0x541d
|
||||||
TIOCEXCL = 0x540c
|
TIOCEXCL = 0x540c
|
||||||
|
|
|
@ -76,6 +76,9 @@ const (
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
FFDLY = 0x8000
|
FFDLY = 0x8000
|
||||||
FLUSHO = 0x1000
|
FLUSHO = 0x1000
|
||||||
|
FS_IOC_ENABLE_VERITY = 0x80806685
|
||||||
|
FS_IOC_GETFLAGS = 0x40086601
|
||||||
|
FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
|
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
|
||||||
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
|
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
|
||||||
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
|
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
|
||||||
|
@ -390,6 +393,8 @@ const (
|
||||||
TCSETSW = 0x8024540a
|
TCSETSW = 0x8024540a
|
||||||
TCSETSW2 = 0x802c540e
|
TCSETSW2 = 0x802c540e
|
||||||
TCXONC = 0x20005406
|
TCXONC = 0x20005406
|
||||||
|
TFD_CLOEXEC = 0x400000
|
||||||
|
TFD_NONBLOCK = 0x4000
|
||||||
TIOCCBRK = 0x2000747a
|
TIOCCBRK = 0x2000747a
|
||||||
TIOCCONS = 0x20007424
|
TIOCCONS = 0x20007424
|
||||||
TIOCEXCL = 0x2000740d
|
TIOCEXCL = 0x2000740d
|
||||||
|
|
|
@ -966,6 +966,16 @@ func Getsid(pid int) (sid int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
@ -1709,18 +1719,6 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
|
|
||||||
r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int32(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -1376,6 +1376,21 @@ func libc_getsid_trampoline()
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func libc_gettimeofday_trampoline()
|
||||||
|
|
||||||
|
//go:linkname libc_gettimeofday libc_gettimeofday
|
||||||
|
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
@ -2357,23 +2372,6 @@ func libc_ptrace_trampoline()
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
|
|
||||||
r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int32(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func libc_gettimeofday_trampoline()
|
|
||||||
|
|
||||||
//go:linkname libc_gettimeofday libc_gettimeofday
|
|
||||||
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -966,6 +966,16 @@ func Getsid(pid int) (sid int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
@ -1709,18 +1719,6 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
|
|
||||||
r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int64(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -1376,6 +1376,21 @@ func libc_getsid_trampoline()
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func libc_gettimeofday_trampoline()
|
||||||
|
|
||||||
|
//go:linkname libc_gettimeofday libc_gettimeofday
|
||||||
|
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
@ -2357,23 +2372,6 @@ func libc_ptrace_trampoline()
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
|
|
||||||
r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int64(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func libc_gettimeofday_trampoline()
|
|
||||||
|
|
||||||
//go:linkname libc_gettimeofday libc_gettimeofday
|
|
||||||
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -966,6 +966,16 @@ func Getsid(pid int) (sid int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
@ -1682,18 +1692,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
|
|
||||||
r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int32(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -1376,6 +1376,21 @@ func libc_getsid_trampoline()
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func libc_gettimeofday_trampoline()
|
||||||
|
|
||||||
|
//go:linkname libc_gettimeofday libc_gettimeofday
|
||||||
|
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
@ -2342,23 +2357,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
|
|
||||||
r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int32(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func libc_gettimeofday_trampoline()
|
|
||||||
|
|
||||||
//go:linkname libc_gettimeofday libc_gettimeofday
|
|
||||||
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -966,6 +966,16 @@ func Getsid(pid int) (sid int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
@ -1682,18 +1692,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
|
|
||||||
r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int64(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -1376,6 +1376,21 @@ func libc_getsid_trampoline()
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Gettimeofday(tp *Timeval) (err error) {
|
||||||
|
_, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func libc_gettimeofday_trampoline()
|
||||||
|
|
||||||
|
//go:linkname libc_gettimeofday libc_gettimeofday
|
||||||
|
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getuid() (uid int) {
|
func Getuid() (uid int) {
|
||||||
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
|
||||||
uid = int(r0)
|
uid = int(r0)
|
||||||
|
@ -2342,23 +2357,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
|
|
||||||
r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
|
||||||
sec = int64(r0)
|
|
||||||
usec = int32(r1)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func libc_gettimeofday_trampoline()
|
|
||||||
|
|
||||||
//go:linkname libc_gettimeofday libc_gettimeofday
|
|
||||||
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
_, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
_, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -1450,6 +1450,37 @@ func Sysinfo(info *Sysinfo_t) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func TimerfdCreate(clockid int, flags int) (fd int, err error) {
|
||||||
|
r0, _, e1 := RawSyscall(SYS_TIMERFD_CREATE, uintptr(clockid), uintptr(flags), 0)
|
||||||
|
fd = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func TimerfdGettime(fd int, currValue *ItimerSpec) (err error) {
|
||||||
|
_, _, e1 := RawSyscall(SYS_TIMERFD_GETTIME, uintptr(fd), uintptr(unsafe.Pointer(currValue)), 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error) {
|
||||||
|
_, _, e1 := RawSyscall6(SYS_TIMERFD_SETTIME, uintptr(fd), uintptr(flags), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue)), 0, 0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
|
func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
|
_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
@ -55,7 +55,7 @@ func pipe(p *[2]_C_int) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
@ -234,7 +234,7 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
@ -151,7 +151,7 @@ func Getgid() (gid int) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
func getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
@ -307,7 +307,7 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
func setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
@ -72,7 +72,7 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Dup2(oldfd int, newfd int) (err error) {
|
func dup2(oldfd int, newfd int) (err error) {
|
||||||
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// mksysctl_openbsd.pl
|
// go run mksysctl_openbsd.go
|
||||||
// Code generated by the command above; DO NOT EDIT.
|
// Code generated by the command above; DO NOT EDIT.
|
||||||
|
|
||||||
// +build 386,openbsd
|
// +build 386,openbsd
|
||||||
|
@ -30,6 +30,7 @@ var sysctlMib = []mibentry{
|
||||||
{"hw.model", []_C_int{6, 2}},
|
{"hw.model", []_C_int{6, 2}},
|
||||||
{"hw.ncpu", []_C_int{6, 3}},
|
{"hw.ncpu", []_C_int{6, 3}},
|
||||||
{"hw.ncpufound", []_C_int{6, 21}},
|
{"hw.ncpufound", []_C_int{6, 21}},
|
||||||
|
{"hw.ncpuonline", []_C_int{6, 25}},
|
||||||
{"hw.pagesize", []_C_int{6, 7}},
|
{"hw.pagesize", []_C_int{6, 7}},
|
||||||
{"hw.physmem", []_C_int{6, 19}},
|
{"hw.physmem", []_C_int{6, 19}},
|
||||||
{"hw.product", []_C_int{6, 15}},
|
{"hw.product", []_C_int{6, 15}},
|
||||||
|
|
|
@ -31,6 +31,7 @@ var sysctlMib = []mibentry{
|
||||||
{"hw.model", []_C_int{6, 2}},
|
{"hw.model", []_C_int{6, 2}},
|
||||||
{"hw.ncpu", []_C_int{6, 3}},
|
{"hw.ncpu", []_C_int{6, 3}},
|
||||||
{"hw.ncpufound", []_C_int{6, 21}},
|
{"hw.ncpufound", []_C_int{6, 21}},
|
||||||
|
{"hw.ncpuonline", []_C_int{6, 25}},
|
||||||
{"hw.pagesize", []_C_int{6, 7}},
|
{"hw.pagesize", []_C_int{6, 7}},
|
||||||
{"hw.perfpolicy", []_C_int{6, 23}},
|
{"hw.perfpolicy", []_C_int{6, 23}},
|
||||||
{"hw.physmem", []_C_int{6, 19}},
|
{"hw.physmem", []_C_int{6, 19}},
|
||||||
|
|
|
@ -30,6 +30,7 @@ var sysctlMib = []mibentry{
|
||||||
{"hw.model", []_C_int{6, 2}},
|
{"hw.model", []_C_int{6, 2}},
|
||||||
{"hw.ncpu", []_C_int{6, 3}},
|
{"hw.ncpu", []_C_int{6, 3}},
|
||||||
{"hw.ncpufound", []_C_int{6, 21}},
|
{"hw.ncpufound", []_C_int{6, 21}},
|
||||||
|
{"hw.ncpuonline", []_C_int{6, 25}},
|
||||||
{"hw.pagesize", []_C_int{6, 7}},
|
{"hw.pagesize", []_C_int{6, 7}},
|
||||||
{"hw.physmem", []_C_int{6, 19}},
|
{"hw.physmem", []_C_int{6, 19}},
|
||||||
{"hw.product", []_C_int{6, 15}},
|
{"hw.product", []_C_int{6, 15}},
|
||||||
|
|
|
@ -431,4 +431,6 @@ const (
|
||||||
SYS_FSPICK = 433
|
SYS_FSPICK = 433
|
||||||
SYS_PIDFD_OPEN = 434
|
SYS_PIDFD_OPEN = 434
|
||||||
SYS_CLONE3 = 435
|
SYS_CLONE3 = 435
|
||||||
|
SYS_OPENAT2 = 437
|
||||||
|
SYS_PIDFD_GETFD = 438
|
||||||
)
|
)
|
||||||
|
|
|
@ -353,4 +353,6 @@ const (
|
||||||
SYS_FSPICK = 433
|
SYS_FSPICK = 433
|
||||||
SYS_PIDFD_OPEN = 434
|
SYS_PIDFD_OPEN = 434
|
||||||
SYS_CLONE3 = 435
|
SYS_CLONE3 = 435
|
||||||
|
SYS_OPENAT2 = 437
|
||||||
|
SYS_PIDFD_GETFD = 438
|
||||||
)
|
)
|
||||||
|
|
|
@ -395,4 +395,6 @@ const (
|
||||||
SYS_FSPICK = 433
|
SYS_FSPICK = 433
|
||||||
SYS_PIDFD_OPEN = 434
|
SYS_PIDFD_OPEN = 434
|
||||||
SYS_CLONE3 = 435
|
SYS_CLONE3 = 435
|
||||||
|
SYS_OPENAT2 = 437
|
||||||
|
SYS_PIDFD_GETFD = 438
|
||||||
)
|
)
|
||||||
|
|
|
@ -298,4 +298,6 @@ const (
|
||||||
SYS_FSPICK = 433
|
SYS_FSPICK = 433
|
||||||
SYS_PIDFD_OPEN = 434
|
SYS_PIDFD_OPEN = 434
|
||||||
SYS_CLONE3 = 435
|
SYS_CLONE3 = 435
|
||||||
|
SYS_OPENAT2 = 437
|
||||||
|
SYS_PIDFD_GETFD = 438
|
||||||
)
|
)
|
||||||
|
|
|
@ -416,4 +416,6 @@ const (
|
||||||
SYS_FSPICK = 4433
|
SYS_FSPICK = 4433
|
||||||
SYS_PIDFD_OPEN = 4434
|
SYS_PIDFD_OPEN = 4434
|
||||||
SYS_CLONE3 = 4435
|
SYS_CLONE3 = 4435
|
||||||
|
SYS_OPENAT2 = 4437
|
||||||
|
SYS_PIDFD_GETFD = 4438
|
||||||
)
|
)
|
||||||
|
|
|
@ -346,4 +346,6 @@ const (
|
||||||
SYS_FSPICK = 5433
|
SYS_FSPICK = 5433
|
||||||
SYS_PIDFD_OPEN = 5434
|
SYS_PIDFD_OPEN = 5434
|
||||||
SYS_CLONE3 = 5435
|
SYS_CLONE3 = 5435
|
||||||
|
SYS_OPENAT2 = 5437
|
||||||
|
SYS_PIDFD_GETFD = 5438
|
||||||
)
|
)
|
||||||
|
|
|
@ -346,4 +346,6 @@ const (
|
||||||
SYS_FSPICK = 5433
|
SYS_FSPICK = 5433
|
||||||
SYS_PIDFD_OPEN = 5434
|
SYS_PIDFD_OPEN = 5434
|
||||||
SYS_CLONE3 = 5435
|
SYS_CLONE3 = 5435
|
||||||
|
SYS_OPENAT2 = 5437
|
||||||
|
SYS_PIDFD_GETFD = 5438
|
||||||
)
|
)
|
||||||
|
|
|
@ -416,4 +416,6 @@ const (
|
||||||
SYS_FSPICK = 4433
|
SYS_FSPICK = 4433
|
||||||
SYS_PIDFD_OPEN = 4434
|
SYS_PIDFD_OPEN = 4434
|
||||||
SYS_CLONE3 = 4435
|
SYS_CLONE3 = 4435
|
||||||
|
SYS_OPENAT2 = 4437
|
||||||
|
SYS_PIDFD_GETFD = 4438
|
||||||
)
|
)
|
||||||
|
|
|
@ -395,4 +395,6 @@ const (
|
||||||
SYS_FSPICK = 433
|
SYS_FSPICK = 433
|
||||||
SYS_PIDFD_OPEN = 434
|
SYS_PIDFD_OPEN = 434
|
||||||
SYS_CLONE3 = 435
|
SYS_CLONE3 = 435
|
||||||
|
SYS_OPENAT2 = 437
|
||||||
|
SYS_PIDFD_GETFD = 438
|
||||||
)
|
)
|
||||||
|
|
|
@ -395,4 +395,6 @@ const (
|
||||||
SYS_FSPICK = 433
|
SYS_FSPICK = 433
|
||||||
SYS_PIDFD_OPEN = 434
|
SYS_PIDFD_OPEN = 434
|
||||||
SYS_CLONE3 = 435
|
SYS_CLONE3 = 435
|
||||||
|
SYS_OPENAT2 = 437
|
||||||
|
SYS_PIDFD_GETFD = 438
|
||||||
)
|
)
|
||||||
|
|
|
@ -297,4 +297,6 @@ const (
|
||||||
SYS_FSPICK = 433
|
SYS_FSPICK = 433
|
||||||
SYS_PIDFD_OPEN = 434
|
SYS_PIDFD_OPEN = 434
|
||||||
SYS_CLONE3 = 435
|
SYS_CLONE3 = 435
|
||||||
|
SYS_OPENAT2 = 437
|
||||||
|
SYS_PIDFD_GETFD = 438
|
||||||
)
|
)
|
||||||
|
|
|
@ -360,4 +360,6 @@ const (
|
||||||
SYS_FSPICK = 433
|
SYS_FSPICK = 433
|
||||||
SYS_PIDFD_OPEN = 434
|
SYS_PIDFD_OPEN = 434
|
||||||
SYS_CLONE3 = 435
|
SYS_CLONE3 = 435
|
||||||
|
SYS_OPENAT2 = 437
|
||||||
|
SYS_PIDFD_GETFD = 438
|
||||||
)
|
)
|
||||||
|
|
|
@ -374,4 +374,6 @@ const (
|
||||||
SYS_FSMOUNT = 432
|
SYS_FSMOUNT = 432
|
||||||
SYS_FSPICK = 433
|
SYS_FSPICK = 433
|
||||||
SYS_PIDFD_OPEN = 434
|
SYS_PIDFD_OPEN = 434
|
||||||
|
SYS_OPENAT2 = 437
|
||||||
|
SYS_PIDFD_GETFD = 438
|
||||||
)
|
)
|
||||||
|
|
|
@ -125,9 +125,9 @@ type Statfs_t struct {
|
||||||
Owner uint32
|
Owner uint32
|
||||||
Fsid Fsid
|
Fsid Fsid
|
||||||
Charspare [80]int8
|
Charspare [80]int8
|
||||||
Fstypename [16]int8
|
Fstypename [16]byte
|
||||||
Mntfromname [1024]int8
|
Mntfromname [1024]byte
|
||||||
Mntonname [1024]int8
|
Mntonname [1024]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
type statfs_freebsd11_t struct {
|
type statfs_freebsd11_t struct {
|
||||||
|
@ -150,9 +150,9 @@ type statfs_freebsd11_t struct {
|
||||||
Owner uint32
|
Owner uint32
|
||||||
Fsid Fsid
|
Fsid Fsid
|
||||||
Charspare [80]int8
|
Charspare [80]int8
|
||||||
Fstypename [16]int8
|
Fstypename [16]byte
|
||||||
Mntfromname [88]int8
|
Mntfromname [88]byte
|
||||||
Mntonname [88]int8
|
Mntonname [88]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
type Flock_t struct {
|
type Flock_t struct {
|
||||||
|
|
|
@ -18,6 +18,11 @@ type (
|
||||||
_C_long_long int64
|
_C_long_long int64
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type ItimerSpec struct {
|
||||||
|
Interval Timespec
|
||||||
|
Value Timespec
|
||||||
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
TIME_OK = 0x0
|
TIME_OK = 0x0
|
||||||
TIME_INS = 0x1
|
TIME_INS = 0x1
|
||||||
|
@ -114,7 +119,8 @@ type FscryptKeySpecifier struct {
|
||||||
type FscryptAddKeyArg struct {
|
type FscryptAddKeyArg struct {
|
||||||
Key_spec FscryptKeySpecifier
|
Key_spec FscryptKeySpecifier
|
||||||
Raw_size uint32
|
Raw_size uint32
|
||||||
_ [9]uint32
|
Key_id uint32
|
||||||
|
_ [8]uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
type FscryptRemoveKeyArg struct {
|
type FscryptRemoveKeyArg struct {
|
||||||
|
@ -479,7 +485,7 @@ const (
|
||||||
IFLA_NEW_IFINDEX = 0x31
|
IFLA_NEW_IFINDEX = 0x31
|
||||||
IFLA_MIN_MTU = 0x32
|
IFLA_MIN_MTU = 0x32
|
||||||
IFLA_MAX_MTU = 0x33
|
IFLA_MAX_MTU = 0x33
|
||||||
IFLA_MAX = 0x35
|
IFLA_MAX = 0x36
|
||||||
IFLA_INFO_KIND = 0x1
|
IFLA_INFO_KIND = 0x1
|
||||||
IFLA_INFO_DATA = 0x2
|
IFLA_INFO_DATA = 0x2
|
||||||
IFLA_INFO_XSTATS = 0x3
|
IFLA_INFO_XSTATS = 0x3
|
||||||
|
@ -1865,175 +1871,249 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
BPF_REG_0 = 0x0
|
BPF_REG_0 = 0x0
|
||||||
BPF_REG_1 = 0x1
|
BPF_REG_1 = 0x1
|
||||||
BPF_REG_2 = 0x2
|
BPF_REG_2 = 0x2
|
||||||
BPF_REG_3 = 0x3
|
BPF_REG_3 = 0x3
|
||||||
BPF_REG_4 = 0x4
|
BPF_REG_4 = 0x4
|
||||||
BPF_REG_5 = 0x5
|
BPF_REG_5 = 0x5
|
||||||
BPF_REG_6 = 0x6
|
BPF_REG_6 = 0x6
|
||||||
BPF_REG_7 = 0x7
|
BPF_REG_7 = 0x7
|
||||||
BPF_REG_8 = 0x8
|
BPF_REG_8 = 0x8
|
||||||
BPF_REG_9 = 0x9
|
BPF_REG_9 = 0x9
|
||||||
BPF_REG_10 = 0xa
|
BPF_REG_10 = 0xa
|
||||||
BPF_MAP_CREATE = 0x0
|
BPF_MAP_CREATE = 0x0
|
||||||
BPF_MAP_LOOKUP_ELEM = 0x1
|
BPF_MAP_LOOKUP_ELEM = 0x1
|
||||||
BPF_MAP_UPDATE_ELEM = 0x2
|
BPF_MAP_UPDATE_ELEM = 0x2
|
||||||
BPF_MAP_DELETE_ELEM = 0x3
|
BPF_MAP_DELETE_ELEM = 0x3
|
||||||
BPF_MAP_GET_NEXT_KEY = 0x4
|
BPF_MAP_GET_NEXT_KEY = 0x4
|
||||||
BPF_PROG_LOAD = 0x5
|
BPF_PROG_LOAD = 0x5
|
||||||
BPF_OBJ_PIN = 0x6
|
BPF_OBJ_PIN = 0x6
|
||||||
BPF_OBJ_GET = 0x7
|
BPF_OBJ_GET = 0x7
|
||||||
BPF_PROG_ATTACH = 0x8
|
BPF_PROG_ATTACH = 0x8
|
||||||
BPF_PROG_DETACH = 0x9
|
BPF_PROG_DETACH = 0x9
|
||||||
BPF_PROG_TEST_RUN = 0xa
|
BPF_PROG_TEST_RUN = 0xa
|
||||||
BPF_PROG_GET_NEXT_ID = 0xb
|
BPF_PROG_GET_NEXT_ID = 0xb
|
||||||
BPF_MAP_GET_NEXT_ID = 0xc
|
BPF_MAP_GET_NEXT_ID = 0xc
|
||||||
BPF_PROG_GET_FD_BY_ID = 0xd
|
BPF_PROG_GET_FD_BY_ID = 0xd
|
||||||
BPF_MAP_GET_FD_BY_ID = 0xe
|
BPF_MAP_GET_FD_BY_ID = 0xe
|
||||||
BPF_OBJ_GET_INFO_BY_FD = 0xf
|
BPF_OBJ_GET_INFO_BY_FD = 0xf
|
||||||
BPF_PROG_QUERY = 0x10
|
BPF_PROG_QUERY = 0x10
|
||||||
BPF_RAW_TRACEPOINT_OPEN = 0x11
|
BPF_RAW_TRACEPOINT_OPEN = 0x11
|
||||||
BPF_BTF_LOAD = 0x12
|
BPF_BTF_LOAD = 0x12
|
||||||
BPF_BTF_GET_FD_BY_ID = 0x13
|
BPF_BTF_GET_FD_BY_ID = 0x13
|
||||||
BPF_TASK_FD_QUERY = 0x14
|
BPF_TASK_FD_QUERY = 0x14
|
||||||
BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
|
BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
|
||||||
BPF_MAP_FREEZE = 0x16
|
BPF_MAP_FREEZE = 0x16
|
||||||
BPF_BTF_GET_NEXT_ID = 0x17
|
BPF_BTF_GET_NEXT_ID = 0x17
|
||||||
BPF_MAP_TYPE_UNSPEC = 0x0
|
BPF_MAP_LOOKUP_BATCH = 0x18
|
||||||
BPF_MAP_TYPE_HASH = 0x1
|
BPF_MAP_LOOKUP_AND_DELETE_BATCH = 0x19
|
||||||
BPF_MAP_TYPE_ARRAY = 0x2
|
BPF_MAP_UPDATE_BATCH = 0x1a
|
||||||
BPF_MAP_TYPE_PROG_ARRAY = 0x3
|
BPF_MAP_DELETE_BATCH = 0x1b
|
||||||
BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
|
BPF_LINK_CREATE = 0x1c
|
||||||
BPF_MAP_TYPE_PERCPU_HASH = 0x5
|
BPF_LINK_UPDATE = 0x1d
|
||||||
BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
|
BPF_MAP_TYPE_UNSPEC = 0x0
|
||||||
BPF_MAP_TYPE_STACK_TRACE = 0x7
|
BPF_MAP_TYPE_HASH = 0x1
|
||||||
BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
|
BPF_MAP_TYPE_ARRAY = 0x2
|
||||||
BPF_MAP_TYPE_LRU_HASH = 0x9
|
BPF_MAP_TYPE_PROG_ARRAY = 0x3
|
||||||
BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
|
BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
|
||||||
BPF_MAP_TYPE_LPM_TRIE = 0xb
|
BPF_MAP_TYPE_PERCPU_HASH = 0x5
|
||||||
BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
|
BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
|
||||||
BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
|
BPF_MAP_TYPE_STACK_TRACE = 0x7
|
||||||
BPF_MAP_TYPE_DEVMAP = 0xe
|
BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
|
||||||
BPF_MAP_TYPE_SOCKMAP = 0xf
|
BPF_MAP_TYPE_LRU_HASH = 0x9
|
||||||
BPF_MAP_TYPE_CPUMAP = 0x10
|
BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
|
||||||
BPF_MAP_TYPE_XSKMAP = 0x11
|
BPF_MAP_TYPE_LPM_TRIE = 0xb
|
||||||
BPF_MAP_TYPE_SOCKHASH = 0x12
|
BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
|
||||||
BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
|
BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
|
||||||
BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
|
BPF_MAP_TYPE_DEVMAP = 0xe
|
||||||
BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
|
BPF_MAP_TYPE_SOCKMAP = 0xf
|
||||||
BPF_MAP_TYPE_QUEUE = 0x16
|
BPF_MAP_TYPE_CPUMAP = 0x10
|
||||||
BPF_MAP_TYPE_STACK = 0x17
|
BPF_MAP_TYPE_XSKMAP = 0x11
|
||||||
BPF_MAP_TYPE_SK_STORAGE = 0x18
|
BPF_MAP_TYPE_SOCKHASH = 0x12
|
||||||
BPF_MAP_TYPE_DEVMAP_HASH = 0x19
|
BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
|
||||||
BPF_PROG_TYPE_UNSPEC = 0x0
|
BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
|
||||||
BPF_PROG_TYPE_SOCKET_FILTER = 0x1
|
BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
|
||||||
BPF_PROG_TYPE_KPROBE = 0x2
|
BPF_MAP_TYPE_QUEUE = 0x16
|
||||||
BPF_PROG_TYPE_SCHED_CLS = 0x3
|
BPF_MAP_TYPE_STACK = 0x17
|
||||||
BPF_PROG_TYPE_SCHED_ACT = 0x4
|
BPF_MAP_TYPE_SK_STORAGE = 0x18
|
||||||
BPF_PROG_TYPE_TRACEPOINT = 0x5
|
BPF_MAP_TYPE_DEVMAP_HASH = 0x19
|
||||||
BPF_PROG_TYPE_XDP = 0x6
|
BPF_MAP_TYPE_STRUCT_OPS = 0x1a
|
||||||
BPF_PROG_TYPE_PERF_EVENT = 0x7
|
BPF_PROG_TYPE_UNSPEC = 0x0
|
||||||
BPF_PROG_TYPE_CGROUP_SKB = 0x8
|
BPF_PROG_TYPE_SOCKET_FILTER = 0x1
|
||||||
BPF_PROG_TYPE_CGROUP_SOCK = 0x9
|
BPF_PROG_TYPE_KPROBE = 0x2
|
||||||
BPF_PROG_TYPE_LWT_IN = 0xa
|
BPF_PROG_TYPE_SCHED_CLS = 0x3
|
||||||
BPF_PROG_TYPE_LWT_OUT = 0xb
|
BPF_PROG_TYPE_SCHED_ACT = 0x4
|
||||||
BPF_PROG_TYPE_LWT_XMIT = 0xc
|
BPF_PROG_TYPE_TRACEPOINT = 0x5
|
||||||
BPF_PROG_TYPE_SOCK_OPS = 0xd
|
BPF_PROG_TYPE_XDP = 0x6
|
||||||
BPF_PROG_TYPE_SK_SKB = 0xe
|
BPF_PROG_TYPE_PERF_EVENT = 0x7
|
||||||
BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
|
BPF_PROG_TYPE_CGROUP_SKB = 0x8
|
||||||
BPF_PROG_TYPE_SK_MSG = 0x10
|
BPF_PROG_TYPE_CGROUP_SOCK = 0x9
|
||||||
BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
|
BPF_PROG_TYPE_LWT_IN = 0xa
|
||||||
BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
|
BPF_PROG_TYPE_LWT_OUT = 0xb
|
||||||
BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
|
BPF_PROG_TYPE_LWT_XMIT = 0xc
|
||||||
BPF_PROG_TYPE_LIRC_MODE2 = 0x14
|
BPF_PROG_TYPE_SOCK_OPS = 0xd
|
||||||
BPF_PROG_TYPE_SK_REUSEPORT = 0x15
|
BPF_PROG_TYPE_SK_SKB = 0xe
|
||||||
BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
|
BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
|
||||||
BPF_PROG_TYPE_CGROUP_SYSCTL = 0x17
|
BPF_PROG_TYPE_SK_MSG = 0x10
|
||||||
BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 0x18
|
BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
|
||||||
BPF_PROG_TYPE_CGROUP_SOCKOPT = 0x19
|
BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
|
||||||
BPF_PROG_TYPE_TRACING = 0x1a
|
BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
|
||||||
BPF_CGROUP_INET_INGRESS = 0x0
|
BPF_PROG_TYPE_LIRC_MODE2 = 0x14
|
||||||
BPF_CGROUP_INET_EGRESS = 0x1
|
BPF_PROG_TYPE_SK_REUSEPORT = 0x15
|
||||||
BPF_CGROUP_INET_SOCK_CREATE = 0x2
|
BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
|
||||||
BPF_CGROUP_SOCK_OPS = 0x3
|
BPF_PROG_TYPE_CGROUP_SYSCTL = 0x17
|
||||||
BPF_SK_SKB_STREAM_PARSER = 0x4
|
BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 0x18
|
||||||
BPF_SK_SKB_STREAM_VERDICT = 0x5
|
BPF_PROG_TYPE_CGROUP_SOCKOPT = 0x19
|
||||||
BPF_CGROUP_DEVICE = 0x6
|
BPF_PROG_TYPE_TRACING = 0x1a
|
||||||
BPF_SK_MSG_VERDICT = 0x7
|
BPF_PROG_TYPE_STRUCT_OPS = 0x1b
|
||||||
BPF_CGROUP_INET4_BIND = 0x8
|
BPF_PROG_TYPE_EXT = 0x1c
|
||||||
BPF_CGROUP_INET6_BIND = 0x9
|
BPF_PROG_TYPE_LSM = 0x1d
|
||||||
BPF_CGROUP_INET4_CONNECT = 0xa
|
BPF_CGROUP_INET_INGRESS = 0x0
|
||||||
BPF_CGROUP_INET6_CONNECT = 0xb
|
BPF_CGROUP_INET_EGRESS = 0x1
|
||||||
BPF_CGROUP_INET4_POST_BIND = 0xc
|
BPF_CGROUP_INET_SOCK_CREATE = 0x2
|
||||||
BPF_CGROUP_INET6_POST_BIND = 0xd
|
BPF_CGROUP_SOCK_OPS = 0x3
|
||||||
BPF_CGROUP_UDP4_SENDMSG = 0xe
|
BPF_SK_SKB_STREAM_PARSER = 0x4
|
||||||
BPF_CGROUP_UDP6_SENDMSG = 0xf
|
BPF_SK_SKB_STREAM_VERDICT = 0x5
|
||||||
BPF_LIRC_MODE2 = 0x10
|
BPF_CGROUP_DEVICE = 0x6
|
||||||
BPF_FLOW_DISSECTOR = 0x11
|
BPF_SK_MSG_VERDICT = 0x7
|
||||||
BPF_CGROUP_SYSCTL = 0x12
|
BPF_CGROUP_INET4_BIND = 0x8
|
||||||
BPF_CGROUP_UDP4_RECVMSG = 0x13
|
BPF_CGROUP_INET6_BIND = 0x9
|
||||||
BPF_CGROUP_UDP6_RECVMSG = 0x14
|
BPF_CGROUP_INET4_CONNECT = 0xa
|
||||||
BPF_CGROUP_GETSOCKOPT = 0x15
|
BPF_CGROUP_INET6_CONNECT = 0xb
|
||||||
BPF_CGROUP_SETSOCKOPT = 0x16
|
BPF_CGROUP_INET4_POST_BIND = 0xc
|
||||||
BPF_TRACE_RAW_TP = 0x17
|
BPF_CGROUP_INET6_POST_BIND = 0xd
|
||||||
BPF_TRACE_FENTRY = 0x18
|
BPF_CGROUP_UDP4_SENDMSG = 0xe
|
||||||
BPF_TRACE_FEXIT = 0x19
|
BPF_CGROUP_UDP6_SENDMSG = 0xf
|
||||||
BPF_STACK_BUILD_ID_EMPTY = 0x0
|
BPF_LIRC_MODE2 = 0x10
|
||||||
BPF_STACK_BUILD_ID_VALID = 0x1
|
BPF_FLOW_DISSECTOR = 0x11
|
||||||
BPF_STACK_BUILD_ID_IP = 0x2
|
BPF_CGROUP_SYSCTL = 0x12
|
||||||
BPF_ADJ_ROOM_NET = 0x0
|
BPF_CGROUP_UDP4_RECVMSG = 0x13
|
||||||
BPF_ADJ_ROOM_MAC = 0x1
|
BPF_CGROUP_UDP6_RECVMSG = 0x14
|
||||||
BPF_HDR_START_MAC = 0x0
|
BPF_CGROUP_GETSOCKOPT = 0x15
|
||||||
BPF_HDR_START_NET = 0x1
|
BPF_CGROUP_SETSOCKOPT = 0x16
|
||||||
BPF_LWT_ENCAP_SEG6 = 0x0
|
BPF_TRACE_RAW_TP = 0x17
|
||||||
BPF_LWT_ENCAP_SEG6_INLINE = 0x1
|
BPF_TRACE_FENTRY = 0x18
|
||||||
BPF_LWT_ENCAP_IP = 0x2
|
BPF_TRACE_FEXIT = 0x19
|
||||||
BPF_OK = 0x0
|
BPF_MODIFY_RETURN = 0x1a
|
||||||
BPF_DROP = 0x2
|
BPF_LSM_MAC = 0x1b
|
||||||
BPF_REDIRECT = 0x7
|
BPF_ANY = 0x0
|
||||||
BPF_LWT_REROUTE = 0x80
|
BPF_NOEXIST = 0x1
|
||||||
BPF_SOCK_OPS_VOID = 0x0
|
BPF_EXIST = 0x2
|
||||||
BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
|
BPF_F_LOCK = 0x4
|
||||||
BPF_SOCK_OPS_RWND_INIT = 0x2
|
BPF_F_NO_PREALLOC = 0x1
|
||||||
BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
|
BPF_F_NO_COMMON_LRU = 0x2
|
||||||
BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
|
BPF_F_NUMA_NODE = 0x4
|
||||||
BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
|
BPF_F_RDONLY = 0x8
|
||||||
BPF_SOCK_OPS_NEEDS_ECN = 0x6
|
BPF_F_WRONLY = 0x10
|
||||||
BPF_SOCK_OPS_BASE_RTT = 0x7
|
BPF_F_STACK_BUILD_ID = 0x20
|
||||||
BPF_SOCK_OPS_RTO_CB = 0x8
|
BPF_F_ZERO_SEED = 0x40
|
||||||
BPF_SOCK_OPS_RETRANS_CB = 0x9
|
BPF_F_RDONLY_PROG = 0x80
|
||||||
BPF_SOCK_OPS_STATE_CB = 0xa
|
BPF_F_WRONLY_PROG = 0x100
|
||||||
BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
|
BPF_F_CLONE = 0x200
|
||||||
BPF_SOCK_OPS_RTT_CB = 0xc
|
BPF_F_MMAPABLE = 0x400
|
||||||
BPF_TCP_ESTABLISHED = 0x1
|
BPF_STACK_BUILD_ID_EMPTY = 0x0
|
||||||
BPF_TCP_SYN_SENT = 0x2
|
BPF_STACK_BUILD_ID_VALID = 0x1
|
||||||
BPF_TCP_SYN_RECV = 0x3
|
BPF_STACK_BUILD_ID_IP = 0x2
|
||||||
BPF_TCP_FIN_WAIT1 = 0x4
|
BPF_F_RECOMPUTE_CSUM = 0x1
|
||||||
BPF_TCP_FIN_WAIT2 = 0x5
|
BPF_F_INVALIDATE_HASH = 0x2
|
||||||
BPF_TCP_TIME_WAIT = 0x6
|
BPF_F_HDR_FIELD_MASK = 0xf
|
||||||
BPF_TCP_CLOSE = 0x7
|
BPF_F_PSEUDO_HDR = 0x10
|
||||||
BPF_TCP_CLOSE_WAIT = 0x8
|
BPF_F_MARK_MANGLED_0 = 0x20
|
||||||
BPF_TCP_LAST_ACK = 0x9
|
BPF_F_MARK_ENFORCE = 0x40
|
||||||
BPF_TCP_LISTEN = 0xa
|
BPF_F_INGRESS = 0x1
|
||||||
BPF_TCP_CLOSING = 0xb
|
BPF_F_TUNINFO_IPV6 = 0x1
|
||||||
BPF_TCP_NEW_SYN_RECV = 0xc
|
BPF_F_SKIP_FIELD_MASK = 0xff
|
||||||
BPF_TCP_MAX_STATES = 0xd
|
BPF_F_USER_STACK = 0x100
|
||||||
BPF_FIB_LKUP_RET_SUCCESS = 0x0
|
BPF_F_FAST_STACK_CMP = 0x200
|
||||||
BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
|
BPF_F_REUSE_STACKID = 0x400
|
||||||
BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
|
BPF_F_USER_BUILD_ID = 0x800
|
||||||
BPF_FIB_LKUP_RET_PROHIBIT = 0x3
|
BPF_F_ZERO_CSUM_TX = 0x2
|
||||||
BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
|
BPF_F_DONT_FRAGMENT = 0x4
|
||||||
BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
|
BPF_F_SEQ_NUMBER = 0x8
|
||||||
BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
|
BPF_F_INDEX_MASK = 0xffffffff
|
||||||
BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
|
BPF_F_CURRENT_CPU = 0xffffffff
|
||||||
BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
|
BPF_F_CTXLEN_MASK = 0xfffff00000000
|
||||||
BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
|
BPF_F_CURRENT_NETNS = -0x1
|
||||||
BPF_FD_TYPE_TRACEPOINT = 0x1
|
BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
|
||||||
BPF_FD_TYPE_KPROBE = 0x2
|
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
|
||||||
BPF_FD_TYPE_KRETPROBE = 0x3
|
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
|
||||||
BPF_FD_TYPE_UPROBE = 0x4
|
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
||||||
BPF_FD_TYPE_URETPROBE = 0x5
|
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
||||||
|
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
||||||
|
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
||||||
|
BPF_F_SYSCTL_BASE_NAME = 0x1
|
||||||
|
BPF_SK_STORAGE_GET_F_CREATE = 0x1
|
||||||
|
BPF_F_GET_BRANCH_RECORDS_SIZE = 0x1
|
||||||
|
BPF_ADJ_ROOM_NET = 0x0
|
||||||
|
BPF_ADJ_ROOM_MAC = 0x1
|
||||||
|
BPF_HDR_START_MAC = 0x0
|
||||||
|
BPF_HDR_START_NET = 0x1
|
||||||
|
BPF_LWT_ENCAP_SEG6 = 0x0
|
||||||
|
BPF_LWT_ENCAP_SEG6_INLINE = 0x1
|
||||||
|
BPF_LWT_ENCAP_IP = 0x2
|
||||||
|
BPF_OK = 0x0
|
||||||
|
BPF_DROP = 0x2
|
||||||
|
BPF_REDIRECT = 0x7
|
||||||
|
BPF_LWT_REROUTE = 0x80
|
||||||
|
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
||||||
|
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
||||||
|
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
|
||||||
|
BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
|
||||||
|
BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
|
||||||
|
BPF_SOCK_OPS_VOID = 0x0
|
||||||
|
BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
|
||||||
|
BPF_SOCK_OPS_RWND_INIT = 0x2
|
||||||
|
BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
|
||||||
|
BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
|
||||||
|
BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
|
||||||
|
BPF_SOCK_OPS_NEEDS_ECN = 0x6
|
||||||
|
BPF_SOCK_OPS_BASE_RTT = 0x7
|
||||||
|
BPF_SOCK_OPS_RTO_CB = 0x8
|
||||||
|
BPF_SOCK_OPS_RETRANS_CB = 0x9
|
||||||
|
BPF_SOCK_OPS_STATE_CB = 0xa
|
||||||
|
BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
|
||||||
|
BPF_SOCK_OPS_RTT_CB = 0xc
|
||||||
|
BPF_TCP_ESTABLISHED = 0x1
|
||||||
|
BPF_TCP_SYN_SENT = 0x2
|
||||||
|
BPF_TCP_SYN_RECV = 0x3
|
||||||
|
BPF_TCP_FIN_WAIT1 = 0x4
|
||||||
|
BPF_TCP_FIN_WAIT2 = 0x5
|
||||||
|
BPF_TCP_TIME_WAIT = 0x6
|
||||||
|
BPF_TCP_CLOSE = 0x7
|
||||||
|
BPF_TCP_CLOSE_WAIT = 0x8
|
||||||
|
BPF_TCP_LAST_ACK = 0x9
|
||||||
|
BPF_TCP_LISTEN = 0xa
|
||||||
|
BPF_TCP_CLOSING = 0xb
|
||||||
|
BPF_TCP_NEW_SYN_RECV = 0xc
|
||||||
|
BPF_TCP_MAX_STATES = 0xd
|
||||||
|
TCP_BPF_IW = 0x3e9
|
||||||
|
TCP_BPF_SNDCWND_CLAMP = 0x3ea
|
||||||
|
BPF_DEVCG_ACC_MKNOD = 0x1
|
||||||
|
BPF_DEVCG_ACC_READ = 0x2
|
||||||
|
BPF_DEVCG_ACC_WRITE = 0x4
|
||||||
|
BPF_DEVCG_DEV_BLOCK = 0x1
|
||||||
|
BPF_DEVCG_DEV_CHAR = 0x2
|
||||||
|
BPF_FIB_LOOKUP_DIRECT = 0x1
|
||||||
|
BPF_FIB_LOOKUP_OUTPUT = 0x2
|
||||||
|
BPF_FIB_LKUP_RET_SUCCESS = 0x0
|
||||||
|
BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
|
||||||
|
BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
|
||||||
|
BPF_FIB_LKUP_RET_PROHIBIT = 0x3
|
||||||
|
BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
|
||||||
|
BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
|
||||||
|
BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
|
||||||
|
BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
|
||||||
|
BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
|
||||||
|
BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
|
||||||
|
BPF_FD_TYPE_TRACEPOINT = 0x1
|
||||||
|
BPF_FD_TYPE_KPROBE = 0x2
|
||||||
|
BPF_FD_TYPE_KRETPROBE = 0x3
|
||||||
|
BPF_FD_TYPE_UPROBE = 0x4
|
||||||
|
BPF_FD_TYPE_URETPROBE = 0x5
|
||||||
|
BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
|
||||||
|
BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
|
||||||
|
BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -2199,7 +2279,7 @@ const (
|
||||||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||||
DEVLINK_CMD_MAX = 0x44
|
DEVLINK_CMD_MAX = 0x48
|
||||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||||
|
@ -2279,7 +2359,7 @@ const (
|
||||||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||||
DEVLINK_ATTR_PAD = 0x3d
|
DEVLINK_ATTR_PAD = 0x3d
|
||||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||||
DEVLINK_ATTR_MAX = 0x8c
|
DEVLINK_ATTR_MAX = 0x90
|
||||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||||
|
@ -2291,3 +2371,49 @@ const (
|
||||||
DEVLINK_DPIPE_HEADER_IPV4 = 0x1
|
DEVLINK_DPIPE_HEADER_IPV4 = 0x1
|
||||||
DEVLINK_DPIPE_HEADER_IPV6 = 0x2
|
DEVLINK_DPIPE_HEADER_IPV6 = 0x2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type FsverityDigest struct {
|
||||||
|
Algorithm uint16
|
||||||
|
Size uint16
|
||||||
|
}
|
||||||
|
|
||||||
|
type FsverityEnableArg struct {
|
||||||
|
Version uint32
|
||||||
|
Hash_algorithm uint32
|
||||||
|
Block_size uint32
|
||||||
|
Salt_size uint32
|
||||||
|
Salt_ptr uint64
|
||||||
|
Sig_size uint32
|
||||||
|
_ uint32
|
||||||
|
Sig_ptr uint64
|
||||||
|
_ [11]uint64
|
||||||
|
}
|
||||||
|
|
||||||
|
type Nhmsg struct {
|
||||||
|
Family uint8
|
||||||
|
Scope uint8
|
||||||
|
Protocol uint8
|
||||||
|
Resvd uint8
|
||||||
|
Flags uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type NexthopGrp struct {
|
||||||
|
Id uint32
|
||||||
|
Weight uint8
|
||||||
|
Resvd1 uint8
|
||||||
|
Resvd2 uint16
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
NHA_UNSPEC = 0x0
|
||||||
|
NHA_ID = 0x1
|
||||||
|
NHA_GROUP = 0x2
|
||||||
|
NHA_GROUP_TYPE = 0x3
|
||||||
|
NHA_BLACKHOLE = 0x4
|
||||||
|
NHA_OIF = 0x5
|
||||||
|
NHA_GATEWAY = 0x6
|
||||||
|
NHA_ENCAP_TYPE = 0x7
|
||||||
|
NHA_ENCAP = 0x8
|
||||||
|
NHA_GROUPS = 0x9
|
||||||
|
NHA_MASTER = 0xa
|
||||||
|
)
|
||||||
|
|
|
@ -287,6 +287,7 @@ type Taskstats struct {
|
||||||
Freepages_delay_total uint64
|
Freepages_delay_total uint64
|
||||||
Thrashing_count uint64
|
Thrashing_count uint64
|
||||||
Thrashing_delay_total uint64
|
Thrashing_delay_total uint64
|
||||||
|
Ac_btime64 uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type cpuMask uint32
|
type cpuMask uint32
|
||||||
|
|
|
@ -298,6 +298,7 @@ type Taskstats struct {
|
||||||
Freepages_delay_total uint64
|
Freepages_delay_total uint64
|
||||||
Thrashing_count uint64
|
Thrashing_count uint64
|
||||||
Thrashing_delay_total uint64
|
Thrashing_delay_total uint64
|
||||||
|
Ac_btime64 uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type cpuMask uint64
|
type cpuMask uint64
|
||||||
|
|
|
@ -276,6 +276,7 @@ type Taskstats struct {
|
||||||
Freepages_delay_total uint64
|
Freepages_delay_total uint64
|
||||||
Thrashing_count uint64
|
Thrashing_count uint64
|
||||||
Thrashing_delay_total uint64
|
Thrashing_delay_total uint64
|
||||||
|
Ac_btime64 uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type cpuMask uint32
|
type cpuMask uint32
|
||||||
|
|
|
@ -277,6 +277,7 @@ type Taskstats struct {
|
||||||
Freepages_delay_total uint64
|
Freepages_delay_total uint64
|
||||||
Thrashing_count uint64
|
Thrashing_count uint64
|
||||||
Thrashing_delay_total uint64
|
Thrashing_delay_total uint64
|
||||||
|
Ac_btime64 uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type cpuMask uint64
|
type cpuMask uint64
|
||||||
|
|
|
@ -281,6 +281,7 @@ type Taskstats struct {
|
||||||
Freepages_delay_total uint64
|
Freepages_delay_total uint64
|
||||||
Thrashing_count uint64
|
Thrashing_count uint64
|
||||||
Thrashing_delay_total uint64
|
Thrashing_delay_total uint64
|
||||||
|
Ac_btime64 uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type cpuMask uint32
|
type cpuMask uint32
|
||||||
|
|
|
@ -280,6 +280,7 @@ type Taskstats struct {
|
||||||
Freepages_delay_total uint64
|
Freepages_delay_total uint64
|
||||||
Thrashing_count uint64
|
Thrashing_count uint64
|
||||||
Thrashing_delay_total uint64
|
Thrashing_delay_total uint64
|
||||||
|
Ac_btime64 uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type cpuMask uint64
|
type cpuMask uint64
|
||||||
|
|
|
@ -280,6 +280,7 @@ type Taskstats struct {
|
||||||
Freepages_delay_total uint64
|
Freepages_delay_total uint64
|
||||||
Thrashing_count uint64
|
Thrashing_count uint64
|
||||||
Thrashing_delay_total uint64
|
Thrashing_delay_total uint64
|
||||||
|
Ac_btime64 uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type cpuMask uint64
|
type cpuMask uint64
|
||||||
|
|
|
@ -281,6 +281,7 @@ type Taskstats struct {
|
||||||
Freepages_delay_total uint64
|
Freepages_delay_total uint64
|
||||||
Thrashing_count uint64
|
Thrashing_count uint64
|
||||||
Thrashing_delay_total uint64
|
Thrashing_delay_total uint64
|
||||||
|
Ac_btime64 uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type cpuMask uint32
|
type cpuMask uint32
|
||||||
|
|
|
@ -287,6 +287,7 @@ type Taskstats struct {
|
||||||
Freepages_delay_total uint64
|
Freepages_delay_total uint64
|
||||||
Thrashing_count uint64
|
Thrashing_count uint64
|
||||||
Thrashing_delay_total uint64
|
Thrashing_delay_total uint64
|
||||||
|
Ac_btime64 uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type cpuMask uint64
|
type cpuMask uint64
|
||||||
|
|
|
@ -287,6 +287,7 @@ type Taskstats struct {
|
||||||
Freepages_delay_total uint64
|
Freepages_delay_total uint64
|
||||||
Thrashing_count uint64
|
Thrashing_count uint64
|
||||||
Thrashing_delay_total uint64
|
Thrashing_delay_total uint64
|
||||||
|
Ac_btime64 uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type cpuMask uint64
|
type cpuMask uint64
|
||||||
|
|
|
@ -305,6 +305,7 @@ type Taskstats struct {
|
||||||
Freepages_delay_total uint64
|
Freepages_delay_total uint64
|
||||||
Thrashing_count uint64
|
Thrashing_count uint64
|
||||||
Thrashing_delay_total uint64
|
Thrashing_delay_total uint64
|
||||||
|
Ac_btime64 uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type cpuMask uint64
|
type cpuMask uint64
|
||||||
|
|
|
@ -300,6 +300,7 @@ type Taskstats struct {
|
||||||
Freepages_delay_total uint64
|
Freepages_delay_total uint64
|
||||||
Thrashing_count uint64
|
Thrashing_count uint64
|
||||||
Thrashing_delay_total uint64
|
Thrashing_delay_total uint64
|
||||||
|
Ac_btime64 uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type cpuMask uint64
|
type cpuMask uint64
|
||||||
|
|
|
@ -282,6 +282,7 @@ type Taskstats struct {
|
||||||
Freepages_delay_total uint64
|
Freepages_delay_total uint64
|
||||||
Thrashing_count uint64
|
Thrashing_count uint64
|
||||||
Thrashing_delay_total uint64
|
Thrashing_delay_total uint64
|
||||||
|
Ac_btime64 uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type cpuMask uint64
|
type cpuMask uint64
|
||||||
|
|
|
@ -104,6 +104,35 @@ func (d *DLL) MustFindProc(name string) *Proc {
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FindProcByOrdinal searches DLL d for procedure by ordinal and returns *Proc
|
||||||
|
// if found. It returns an error if search fails.
|
||||||
|
func (d *DLL) FindProcByOrdinal(ordinal uintptr) (proc *Proc, err error) {
|
||||||
|
a, e := GetProcAddressByOrdinal(d.Handle, ordinal)
|
||||||
|
name := "#" + itoa(int(ordinal))
|
||||||
|
if e != nil {
|
||||||
|
return nil, &DLLError{
|
||||||
|
Err: e,
|
||||||
|
ObjName: name,
|
||||||
|
Msg: "Failed to find " + name + " procedure in " + d.Name + ": " + e.Error(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
p := &Proc{
|
||||||
|
Dll: d,
|
||||||
|
Name: name,
|
||||||
|
addr: a,
|
||||||
|
}
|
||||||
|
return p, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MustFindProcByOrdinal is like FindProcByOrdinal but panics if search fails.
|
||||||
|
func (d *DLL) MustFindProcByOrdinal(ordinal uintptr) *Proc {
|
||||||
|
p, e := d.FindProcByOrdinal(ordinal)
|
||||||
|
if e != nil {
|
||||||
|
panic(e)
|
||||||
|
}
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
|
||||||
// Release unloads DLL d from memory.
|
// Release unloads DLL d from memory.
|
||||||
func (d *DLL) Release() (err error) {
|
func (d *DLL) Release() (err error) {
|
||||||
return FreeLibrary(d.Handle)
|
return FreeLibrary(d.Handle)
|
||||||
|
|
|
@ -8,7 +8,6 @@ package windows
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"unicode/utf16"
|
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -40,17 +39,11 @@ func (token Token) Environ(inheritExisting bool) (env []string, err error) {
|
||||||
defer DestroyEnvironmentBlock(block)
|
defer DestroyEnvironmentBlock(block)
|
||||||
blockp := uintptr(unsafe.Pointer(block))
|
blockp := uintptr(unsafe.Pointer(block))
|
||||||
for {
|
for {
|
||||||
entry := (*[(1 << 30) - 1]uint16)(unsafe.Pointer(blockp))[:]
|
entry := UTF16PtrToString((*uint16)(unsafe.Pointer(blockp)))
|
||||||
for i, v := range entry {
|
|
||||||
if v == 0 {
|
|
||||||
entry = entry[:i]
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if len(entry) == 0 {
|
if len(entry) == 0 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
env = append(env, string(utf16.Decode(entry)))
|
env = append(env, entry)
|
||||||
blockp += 2 * (uintptr(len(entry)) + 1)
|
blockp += 2 * (uintptr(len(entry)) + 1)
|
||||||
}
|
}
|
||||||
return env, nil
|
return env, nil
|
||||||
|
|
|
@ -23,4 +23,9 @@ const (
|
||||||
PAGE_EXECUTE_READ = 0x20
|
PAGE_EXECUTE_READ = 0x20
|
||||||
PAGE_EXECUTE_READWRITE = 0x40
|
PAGE_EXECUTE_READWRITE = 0x40
|
||||||
PAGE_EXECUTE_WRITECOPY = 0x80
|
PAGE_EXECUTE_WRITECOPY = 0x80
|
||||||
|
|
||||||
|
QUOTA_LIMITS_HARDWS_MIN_DISABLE = 0x00000002
|
||||||
|
QUOTA_LIMITS_HARDWS_MIN_ENABLE = 0x00000001
|
||||||
|
QUOTA_LIMITS_HARDWS_MAX_DISABLE = 0x00000008
|
||||||
|
QUOTA_LIMITS_HARDWS_MAX_ENABLE = 0x00000004
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,6 +7,8 @@ package windows
|
||||||
import (
|
import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
|
"golang.org/x/sys/internal/unsafeheader"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -1229,7 +1231,7 @@ func (sd *SECURITY_DESCRIPTOR) String() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
defer LocalFree(Handle(unsafe.Pointer(sddl)))
|
defer LocalFree(Handle(unsafe.Pointer(sddl)))
|
||||||
return UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(sddl))[:])
|
return UTF16PtrToString(sddl)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToAbsolute converts a self-relative security descriptor into an absolute one.
|
// ToAbsolute converts a self-relative security descriptor into an absolute one.
|
||||||
|
@ -1307,9 +1309,17 @@ func (absoluteSD *SECURITY_DESCRIPTOR) ToSelfRelative() (selfRelativeSD *SECURIT
|
||||||
}
|
}
|
||||||
|
|
||||||
func (selfRelativeSD *SECURITY_DESCRIPTOR) copySelfRelativeSecurityDescriptor() *SECURITY_DESCRIPTOR {
|
func (selfRelativeSD *SECURITY_DESCRIPTOR) copySelfRelativeSecurityDescriptor() *SECURITY_DESCRIPTOR {
|
||||||
sdBytes := make([]byte, selfRelativeSD.Length())
|
sdLen := (int)(selfRelativeSD.Length())
|
||||||
copy(sdBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(selfRelativeSD))[:len(sdBytes)])
|
|
||||||
return (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&sdBytes[0]))
|
var src []byte
|
||||||
|
h := (*unsafeheader.Slice)(unsafe.Pointer(&src))
|
||||||
|
h.Data = unsafe.Pointer(selfRelativeSD)
|
||||||
|
h.Len = sdLen
|
||||||
|
h.Cap = sdLen
|
||||||
|
|
||||||
|
dst := make([]byte, sdLen)
|
||||||
|
copy(dst, src)
|
||||||
|
return (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&dst[0]))
|
||||||
}
|
}
|
||||||
|
|
||||||
// SecurityDescriptorFromString converts an SDDL string describing a security descriptor into a
|
// SecurityDescriptorFromString converts an SDDL string describing a security descriptor into a
|
||||||
|
@ -1391,6 +1401,6 @@ func ACLFromEntries(explicitEntries []EXPLICIT_ACCESS, mergedACL *ACL) (acl *ACL
|
||||||
}
|
}
|
||||||
defer LocalFree(Handle(unsafe.Pointer(winHeapACL)))
|
defer LocalFree(Handle(unsafe.Pointer(winHeapACL)))
|
||||||
aclBytes := make([]byte, winHeapACL.aclSize)
|
aclBytes := make([]byte, winHeapACL.aclSize)
|
||||||
copy(aclBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(winHeapACL))[:len(aclBytes)])
|
copy(aclBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(winHeapACL))[:len(aclBytes):len(aclBytes)])
|
||||||
return (*ACL)(unsafe.Pointer(&aclBytes[0])), nil
|
return (*ACL)(unsafe.Pointer(&aclBytes[0])), nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
package svc
|
package svc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"unsafe"
|
|
||||||
|
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -48,9 +46,8 @@ func IsAnInteractiveSession() (bool, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
p := unsafe.Pointer(&gs.Groups[0])
|
|
||||||
groups := (*[2 << 20]windows.SIDAndAttributes)(p)[:gs.GroupCount]
|
for _, g := range gs.AllGroups() {
|
||||||
for _, g := range groups {
|
|
||||||
if windows.EqualSid(g.Sid, interSid) {
|
if windows.EqualSid(g.Sid, interSid) {
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
|
"golang.org/x/sys/internal/unsafeheader"
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -224,10 +225,16 @@ const (
|
||||||
func (s *service) run() {
|
func (s *service) run() {
|
||||||
s.goWaits.Wait()
|
s.goWaits.Wait()
|
||||||
s.h = windows.Handle(ssHandle)
|
s.h = windows.Handle(ssHandle)
|
||||||
argv := (*[100]*int16)(unsafe.Pointer(sArgv))[:sArgc]
|
|
||||||
|
var argv []*uint16
|
||||||
|
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&argv))
|
||||||
|
hdr.Data = unsafe.Pointer(sArgv)
|
||||||
|
hdr.Len = int(sArgc)
|
||||||
|
hdr.Cap = int(sArgc)
|
||||||
|
|
||||||
args := make([]string, len(argv))
|
args := make([]string, len(argv))
|
||||||
for i, a := range argv {
|
for i, a := range argv {
|
||||||
args[i] = syscall.UTF16ToString((*[1 << 20]uint16)(unsafe.Pointer(a))[:])
|
args[i] = windows.UTF16PtrToString(a)
|
||||||
}
|
}
|
||||||
|
|
||||||
cmdsToHandler := make(chan ChangeRequest)
|
cmdsToHandler := make(chan ChangeRequest)
|
||||||
|
|
|
@ -13,6 +13,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
"unicode/utf16"
|
"unicode/utf16"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
|
"golang.org/x/sys/internal/unsafeheader"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Handle uintptr
|
type Handle uintptr
|
||||||
|
@ -117,6 +119,32 @@ func UTF16PtrFromString(s string) (*uint16, error) {
|
||||||
return &a[0], nil
|
return &a[0], nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UTF16PtrToString takes a pointer to a UTF-16 sequence and returns the corresponding UTF-8 encoded string.
|
||||||
|
// If the pointer is nil, this returns the empty string. This assumes that the UTF-16 sequence is terminated
|
||||||
|
// at a zero word; if the zero word is not present, the program may crash.
|
||||||
|
func UTF16PtrToString(p *uint16) string {
|
||||||
|
if p == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
if *p == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find NUL terminator.
|
||||||
|
n := 0
|
||||||
|
for ptr := unsafe.Pointer(p); *(*uint16)(ptr) != 0; n++ {
|
||||||
|
ptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p))
|
||||||
|
}
|
||||||
|
|
||||||
|
var s []uint16
|
||||||
|
h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
|
||||||
|
h.Data = unsafe.Pointer(p)
|
||||||
|
h.Len = n
|
||||||
|
h.Cap = n
|
||||||
|
|
||||||
|
return string(utf16.Decode(s))
|
||||||
|
}
|
||||||
|
|
||||||
func Getpagesize() int { return 4096 }
|
func Getpagesize() int { return 4096 }
|
||||||
|
|
||||||
// NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention.
|
// NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention.
|
||||||
|
@ -280,6 +308,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
||||||
//sys GetProcessId(process Handle) (id uint32, err error)
|
//sys GetProcessId(process Handle) (id uint32, err error)
|
||||||
//sys OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (handle Handle, err error)
|
//sys OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (handle Handle, err error)
|
||||||
//sys SetProcessPriorityBoost(process Handle, disable bool) (err error) = kernel32.SetProcessPriorityBoost
|
//sys SetProcessPriorityBoost(process Handle, disable bool) (err error) = kernel32.SetProcessPriorityBoost
|
||||||
|
//sys GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32)
|
||||||
|
//sys SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error)
|
||||||
|
|
||||||
// Volume Management Functions
|
// Volume Management Functions
|
||||||
//sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW
|
//sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW
|
||||||
|
@ -1181,7 +1211,12 @@ type IPv6Mreq struct {
|
||||||
Interface uint32
|
Interface uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetsockoptInt(fd Handle, level, opt int) (int, error) { return -1, syscall.EWINDOWS }
|
func GetsockoptInt(fd Handle, level, opt int) (int, error) {
|
||||||
|
v := int32(0)
|
||||||
|
l := int32(unsafe.Sizeof(v))
|
||||||
|
err := Getsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&v)), &l)
|
||||||
|
return int(v), err
|
||||||
|
}
|
||||||
|
|
||||||
func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) {
|
func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) {
|
||||||
sys := sysLinger{Onoff: uint16(l.Onoff), Linger: uint16(l.Linger)}
|
sys := sysLinger{Onoff: uint16(l.Onoff), Linger: uint16(l.Linger)}
|
||||||
|
@ -1378,7 +1413,7 @@ func (t Token) KnownFolderPath(folderID *KNOWNFOLDERID, flags uint32) (string, e
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
defer CoTaskMemFree(unsafe.Pointer(p))
|
defer CoTaskMemFree(unsafe.Pointer(p))
|
||||||
return UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(p))[:]), nil
|
return UTF16PtrToString(p), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// RtlGetVersion returns the version of the underlying operating system, ignoring
|
// RtlGetVersion returns the version of the underlying operating system, ignoring
|
||||||
|
|
|
@ -217,6 +217,8 @@ var (
|
||||||
procGetProcessId = modkernel32.NewProc("GetProcessId")
|
procGetProcessId = modkernel32.NewProc("GetProcessId")
|
||||||
procOpenThread = modkernel32.NewProc("OpenThread")
|
procOpenThread = modkernel32.NewProc("OpenThread")
|
||||||
procSetProcessPriorityBoost = modkernel32.NewProc("SetProcessPriorityBoost")
|
procSetProcessPriorityBoost = modkernel32.NewProc("SetProcessPriorityBoost")
|
||||||
|
procGetProcessWorkingSetSizeEx = modkernel32.NewProc("GetProcessWorkingSetSizeEx")
|
||||||
|
procSetProcessWorkingSetSizeEx = modkernel32.NewProc("SetProcessWorkingSetSizeEx")
|
||||||
procDefineDosDeviceW = modkernel32.NewProc("DefineDosDeviceW")
|
procDefineDosDeviceW = modkernel32.NewProc("DefineDosDeviceW")
|
||||||
procDeleteVolumeMountPointW = modkernel32.NewProc("DeleteVolumeMountPointW")
|
procDeleteVolumeMountPointW = modkernel32.NewProc("DeleteVolumeMountPointW")
|
||||||
procFindFirstVolumeW = modkernel32.NewProc("FindFirstVolumeW")
|
procFindFirstVolumeW = modkernel32.NewProc("FindFirstVolumeW")
|
||||||
|
@ -2414,6 +2416,23 @@ func SetProcessPriorityBoost(process Handle, disable bool) (err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32) {
|
||||||
|
syscall.Syscall6(procGetProcessWorkingSetSizeEx.Addr(), 4, uintptr(hProcess), uintptr(unsafe.Pointer(lpMinimumWorkingSetSize)), uintptr(unsafe.Pointer(lpMaximumWorkingSetSize)), uintptr(unsafe.Pointer(flags)), 0, 0)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error) {
|
||||||
|
r1, _, e1 := syscall.Syscall6(procSetProcessWorkingSetSizeEx.Addr(), 4, uintptr(hProcess), uintptr(dwMinimumWorkingSetSize), uintptr(dwMaximumWorkingSetSize), uintptr(flags), 0, 0)
|
||||||
|
if r1 == 0 {
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
} else {
|
||||||
|
err = syscall.EINVAL
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) {
|
func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) {
|
||||||
r1, _, e1 := syscall.Syscall(procDefineDosDeviceW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)))
|
r1, _, e1 := syscall.Syscall(procDefineDosDeviceW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)))
|
||||||
if r1 == 0 {
|
if r1 == 0 {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче