Merge pull request #3608 from hashicorp/b-3342-windows-log-leak
Fix bug in log framer only affecting Windows
This commit is contained in:
commit
1dd5b3822c
|
@ -56,6 +56,7 @@ BUG FIXES:
|
|||
* cli: Fix panic when running `keyring` commands [GH-3509]
|
||||
* client: Fix a panic when restoring an allocation with a dead leader task
|
||||
[GH-3502]
|
||||
* client: Fix crash when following logs from a Windows node [GH-3608]
|
||||
* client: Fix allocation accounting in GC and trigger GCs on allocation
|
||||
updates [GH-3445]
|
||||
* driver/rkt: Remove pods on shutdown [GH-3562]
|
||||
|
|
|
@ -316,7 +316,7 @@ type StreamFramer struct {
|
|||
// Captures whether the framer is running and any error that occurred to
|
||||
// cause it to stop.
|
||||
running bool
|
||||
Err error
|
||||
err error
|
||||
}
|
||||
|
||||
// NewStreamFramer creates a new stream framer that will output StreamFrames to
|
||||
|
@ -379,16 +379,23 @@ func (s *StreamFramer) ExitCh() <-chan struct{} {
|
|||
return s.exitCh
|
||||
}
|
||||
|
||||
// Err returns the error that caused the StreamFramer to exit
|
||||
func (s *StreamFramer) Err() error {
|
||||
s.l.Lock()
|
||||
defer s.l.Unlock()
|
||||
return s.err
|
||||
}
|
||||
|
||||
// run is the internal run method. It exits if Destroy is called or an error
|
||||
// occurs, in which case the exit channel is closed.
|
||||
func (s *StreamFramer) run() {
|
||||
var err error
|
||||
defer func() {
|
||||
close(s.exitCh)
|
||||
s.l.Lock()
|
||||
s.running = false
|
||||
s.Err = err
|
||||
s.err = err
|
||||
s.l.Unlock()
|
||||
close(s.exitCh)
|
||||
}()
|
||||
|
||||
OUTER:
|
||||
|
@ -466,8 +473,8 @@ func (s *StreamFramer) Send(file, fileEvent string, data []byte, offset int64) e
|
|||
// If we are not running, return the error that caused us to not run or
|
||||
// indicated that it was never started.
|
||||
if !s.running {
|
||||
if s.Err != nil {
|
||||
return s.Err
|
||||
if s.err != nil {
|
||||
return s.err
|
||||
}
|
||||
|
||||
return fmt.Errorf("StreamFramer not running")
|
||||
|
@ -608,6 +615,35 @@ func (s *HTTPServer) Stream(resp http.ResponseWriter, req *http.Request) (interf
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
// parseFramerErr takes an error and returns an error. The error will
|
||||
// potentially change if it was caused by the connection being closed.
|
||||
func parseFramerErr(err error) error {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
errMsg := err.Error()
|
||||
|
||||
if strings.Contains(errMsg, io.ErrClosedPipe.Error()) {
|
||||
// The pipe check is for tests
|
||||
return syscall.EPIPE
|
||||
}
|
||||
|
||||
// The connection was closed by our peer
|
||||
if strings.Contains(errMsg, syscall.EPIPE.Error()) || strings.Contains(errMsg, syscall.ECONNRESET.Error()) {
|
||||
return syscall.EPIPE
|
||||
}
|
||||
|
||||
// Windows version of ECONNRESET
|
||||
//XXX(schmichael) I could find no existing error or constant to
|
||||
// compare this against.
|
||||
if strings.Contains(errMsg, "forcibly closed") {
|
||||
return syscall.EPIPE
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// stream is the internal method to stream the content of a file. eofCancelCh is
|
||||
// used to cancel the stream if triggered while at EOF. If the connection is
|
||||
// broken an EPIPE error is returned
|
||||
|
@ -629,26 +665,6 @@ func (s *HTTPServer) stream(offset int64, path string,
|
|||
t.Done()
|
||||
}()
|
||||
|
||||
// parseFramerErr takes an error and returns an error. The error will
|
||||
// potentially change if it was caused by the connection being closed.
|
||||
parseFramerErr := func(e error) error {
|
||||
if e == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if strings.Contains(e.Error(), io.ErrClosedPipe.Error()) {
|
||||
// The pipe check is for tests
|
||||
return syscall.EPIPE
|
||||
}
|
||||
|
||||
// The connection was closed by our peer
|
||||
if strings.Contains(e.Error(), syscall.EPIPE.Error()) || strings.Contains(e.Error(), syscall.ECONNRESET.Error()) {
|
||||
return syscall.EPIPE
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// Create a variable to allow setting the last event
|
||||
var lastEvent string
|
||||
|
||||
|
@ -721,7 +737,7 @@ OUTER:
|
|||
lastEvent = truncateEvent
|
||||
continue OUTER
|
||||
case <-framer.ExitCh():
|
||||
return parseFramerErr(framer.Err)
|
||||
return parseFramerErr(framer.Err())
|
||||
case err, ok := <-eofCancelCh:
|
||||
if !ok {
|
||||
return nil
|
||||
|
@ -916,7 +932,21 @@ func (s *HTTPServer) logs(follow, plain bool, offset int64,
|
|||
return nil
|
||||
}
|
||||
|
||||
//Since we successfully streamed, update the overall offset/idx.
|
||||
// defensively check to make sure StreamFramer hasn't stopped
|
||||
// running to avoid tight loops with goroutine leaks as in
|
||||
// #3342
|
||||
select {
|
||||
case <-framer.ExitCh():
|
||||
err := parseFramerErr(framer.Err())
|
||||
if err == syscall.EPIPE {
|
||||
// EPIPE just means the connection was closed
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
default:
|
||||
}
|
||||
|
||||
// Since we successfully streamed, update the overall offset/idx.
|
||||
offset = int64(0)
|
||||
nextIdx = idx + 1
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ type FileChanges struct {
|
|||
|
||||
func NewFileChanges() *FileChanges {
|
||||
return &FileChanges{
|
||||
make(chan bool), make(chan bool), make(chan bool)}
|
||||
make(chan bool, 1), make(chan bool, 1), make(chan bool, 1)}
|
||||
}
|
||||
|
||||
func (fc *FileChanges) NotifyModified() {
|
||||
|
|
|
@ -75,7 +75,6 @@ func (fw *InotifyFileWatcher) ChangeEvents(t *tomb.Tomb, pos int64) (*FileChange
|
|||
fw.Size = pos
|
||||
|
||||
go func() {
|
||||
defer RemoveWatch(fw.Filename)
|
||||
|
||||
events := Events(fw.Filename)
|
||||
|
||||
|
@ -88,9 +87,11 @@ func (fw *InotifyFileWatcher) ChangeEvents(t *tomb.Tomb, pos int64) (*FileChange
|
|||
select {
|
||||
case evt, ok = <-events:
|
||||
if !ok {
|
||||
RemoveWatch(fw.Filename)
|
||||
return
|
||||
}
|
||||
case <-t.Dying():
|
||||
RemoveWatch(fw.Filename)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -99,13 +100,19 @@ func (fw *InotifyFileWatcher) ChangeEvents(t *tomb.Tomb, pos int64) (*FileChange
|
|||
fallthrough
|
||||
|
||||
case evt.Op&fsnotify.Rename == fsnotify.Rename:
|
||||
RemoveWatch(fw.Filename)
|
||||
changes.NotifyDeleted()
|
||||
return
|
||||
|
||||
//With an open fd, unlink(fd) - inotify returns IN_ATTRIB (==fsnotify.Chmod)
|
||||
case evt.Op&fsnotify.Chmod == fsnotify.Chmod:
|
||||
fallthrough
|
||||
|
||||
case evt.Op&fsnotify.Write == fsnotify.Write:
|
||||
fi, err := os.Stat(fw.Filename)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
RemoveWatch(fw.Filename)
|
||||
changes.NotifyDeleted()
|
||||
return
|
||||
}
|
||||
|
|
|
@ -83,21 +83,21 @@ func watch(winfo *watchInfo) error {
|
|||
}
|
||||
|
||||
// RemoveWatch signals the run goroutine to remove the watch for the input filename
|
||||
func RemoveWatch(fname string) {
|
||||
remove(&watchInfo{
|
||||
func RemoveWatch(fname string) error {
|
||||
return remove(&watchInfo{
|
||||
fname: fname,
|
||||
})
|
||||
}
|
||||
|
||||
// RemoveWatch create signals the run goroutine to remove the watch for the input filename
|
||||
func RemoveWatchCreate(fname string) {
|
||||
remove(&watchInfo{
|
||||
func RemoveWatchCreate(fname string) error {
|
||||
return remove(&watchInfo{
|
||||
op: fsnotify.Create,
|
||||
fname: fname,
|
||||
})
|
||||
}
|
||||
|
||||
func remove(winfo *watchInfo) {
|
||||
func remove(winfo *watchInfo) error {
|
||||
// start running the shared InotifyTracker if not already running
|
||||
once.Do(goRun)
|
||||
|
||||
|
@ -108,6 +108,67 @@ func remove(winfo *watchInfo) {
|
|||
delete(shared.done, winfo.fname)
|
||||
close(done)
|
||||
}
|
||||
shared.mux.Unlock()
|
||||
|
||||
shared.remove <- winfo
|
||||
return <-shared.error
|
||||
}
|
||||
|
||||
// Events returns a channel to which FileEvents corresponding to the input filename
|
||||
// will be sent. This channel will be closed when removeWatch is called on this
|
||||
// filename.
|
||||
func Events(fname string) <-chan fsnotify.Event {
|
||||
shared.mux.Lock()
|
||||
defer shared.mux.Unlock()
|
||||
|
||||
return shared.chans[fname]
|
||||
}
|
||||
|
||||
// Cleanup removes the watch for the input filename if necessary.
|
||||
func Cleanup(fname string) error {
|
||||
return RemoveWatch(fname)
|
||||
}
|
||||
|
||||
// watchFlags calls fsnotify.WatchFlags for the input filename and flags, creating
|
||||
// a new Watcher if the previous Watcher was closed.
|
||||
func (shared *InotifyTracker) addWatch(winfo *watchInfo) error {
|
||||
shared.mux.Lock()
|
||||
defer shared.mux.Unlock()
|
||||
|
||||
if shared.chans[winfo.fname] == nil {
|
||||
shared.chans[winfo.fname] = make(chan fsnotify.Event)
|
||||
}
|
||||
if shared.done[winfo.fname] == nil {
|
||||
shared.done[winfo.fname] = make(chan bool)
|
||||
}
|
||||
|
||||
fname := winfo.fname
|
||||
if winfo.isCreate() {
|
||||
// Watch for new files to be created in the parent directory.
|
||||
fname = filepath.Dir(fname)
|
||||
}
|
||||
|
||||
var err error
|
||||
// already in inotify watch
|
||||
if shared.watchNums[fname] == 0 {
|
||||
err = shared.watcher.Add(fname)
|
||||
}
|
||||
if err == nil {
|
||||
shared.watchNums[fname]++
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// removeWatch calls fsnotify.RemoveWatch for the input filename and closes the
|
||||
// corresponding events channel.
|
||||
func (shared *InotifyTracker) removeWatch(winfo *watchInfo) error {
|
||||
shared.mux.Lock()
|
||||
|
||||
ch := shared.chans[winfo.fname]
|
||||
if ch != nil {
|
||||
delete(shared.chans, winfo.fname)
|
||||
close(ch)
|
||||
}
|
||||
|
||||
fname := winfo.fname
|
||||
if winfo.isCreate() {
|
||||
|
@ -121,91 +182,18 @@ func remove(winfo *watchInfo) {
|
|||
}
|
||||
shared.mux.Unlock()
|
||||
|
||||
var err error
|
||||
// If we were the last ones to watch this file, unsubscribe from inotify.
|
||||
// This needs to happen after releasing the lock because fsnotify waits
|
||||
// synchronously for the kernel to acknowledge the removal of the watch
|
||||
// for this file, which causes us to deadlock if we still held the lock.
|
||||
if watchNum == 0 {
|
||||
shared.watcher.Remove(fname)
|
||||
}
|
||||
shared.remove <- winfo
|
||||
}
|
||||
|
||||
// Events returns a channel to which FileEvents corresponding to the input filename
|
||||
// will be sent. This channel will be closed when removeWatch is called on this
|
||||
// filename.
|
||||
func Events(fname string) <-chan fsnotify.Event {
|
||||
shared.mux.Lock()
|
||||
defer shared.mux.Unlock()
|
||||
|
||||
return shared.chans[fname]
|
||||
}
|
||||
|
||||
// Cleanup removes the watch for the input filename if necessary.
|
||||
func Cleanup(fname string) {
|
||||
RemoveWatch(fname)
|
||||
}
|
||||
|
||||
// watchFlags calls fsnotify.WatchFlags for the input filename and flags, creating
|
||||
// a new Watcher if the previous Watcher was closed.
|
||||
func (shared *InotifyTracker) addWatch(winfo *watchInfo) error {
|
||||
shared.mux.Lock()
|
||||
defer shared.mux.Unlock()
|
||||
|
||||
if shared.chans[winfo.fname] == nil {
|
||||
shared.chans[winfo.fname] = make(chan fsnotify.Event)
|
||||
shared.done[winfo.fname] = make(chan bool)
|
||||
err = shared.watcher.Remove(fname)
|
||||
}
|
||||
|
||||
fname := winfo.fname
|
||||
if winfo.isCreate() {
|
||||
// Watch for new files to be created in the parent directory.
|
||||
fname = filepath.Dir(fname)
|
||||
}
|
||||
|
||||
// already in inotify watch
|
||||
if shared.watchNums[fname] > 0 {
|
||||
shared.watchNums[fname]++
|
||||
if winfo.isCreate() {
|
||||
shared.watchNums[winfo.fname]++
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
err := shared.watcher.Add(fname)
|
||||
if err == nil {
|
||||
shared.watchNums[fname]++
|
||||
if winfo.isCreate() {
|
||||
shared.watchNums[winfo.fname]++
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// removeWatch calls fsnotify.RemoveWatch for the input filename and closes the
|
||||
// corresponding events channel.
|
||||
func (shared *InotifyTracker) removeWatch(winfo *watchInfo) {
|
||||
shared.mux.Lock()
|
||||
defer shared.mux.Unlock()
|
||||
|
||||
ch := shared.chans[winfo.fname]
|
||||
if ch == nil {
|
||||
return
|
||||
}
|
||||
|
||||
delete(shared.chans, winfo.fname)
|
||||
close(ch)
|
||||
|
||||
if !winfo.isCreate() {
|
||||
return
|
||||
}
|
||||
|
||||
shared.watchNums[winfo.fname]--
|
||||
if shared.watchNums[winfo.fname] == 0 {
|
||||
delete(shared.watchNums, winfo.fname)
|
||||
}
|
||||
}
|
||||
|
||||
// sendEvent sends the input event to the appropriate Tail.
|
||||
func (shared *InotifyTracker) sendEvent(event fsnotify.Event) {
|
||||
name := filepath.Clean(event.Name)
|
||||
|
@ -238,7 +226,7 @@ func (shared *InotifyTracker) run() {
|
|||
shared.error <- shared.addWatch(winfo)
|
||||
|
||||
case winfo := <-shared.remove:
|
||||
shared.removeWatch(winfo)
|
||||
shared.error <- shared.removeWatch(winfo)
|
||||
|
||||
case event, open := <-shared.watcher.Events:
|
||||
if !open {
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2017 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.
|
||||
|
||||
// Functions to access/create device major and minor numbers matching the
|
||||
// encoding used in Darwin's sys/types.h header.
|
||||
|
||||
package unix
|
||||
|
||||
// Major returns the major component of a Darwin device number.
|
||||
func Major(dev uint64) uint32 {
|
||||
return uint32((dev >> 24) & 0xff)
|
||||
}
|
||||
|
||||
// Minor returns the minor component of a Darwin device number.
|
||||
func Minor(dev uint64) uint32 {
|
||||
return uint32(dev & 0xffffff)
|
||||
}
|
||||
|
||||
// Mkdev returns a Darwin device number generated from the given major and minor
|
||||
// components.
|
||||
func Mkdev(major, minor uint32) uint64 {
|
||||
return (uint64(major) << 24) | uint64(minor)
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright 2017 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.
|
||||
|
||||
// Functions to access/create device major and minor numbers matching the
|
||||
// encoding used in Dragonfly's sys/types.h header.
|
||||
//
|
||||
// The information below is extracted and adapted from sys/types.h:
|
||||
//
|
||||
// Minor gives a cookie instead of an index since in order to avoid changing the
|
||||
// meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
|
||||
// devices that don't use them.
|
||||
|
||||
package unix
|
||||
|
||||
// Major returns the major component of a DragonFlyBSD device number.
|
||||
func Major(dev uint64) uint32 {
|
||||
return uint32((dev >> 8) & 0xff)
|
||||
}
|
||||
|
||||
// Minor returns the minor component of a DragonFlyBSD device number.
|
||||
func Minor(dev uint64) uint32 {
|
||||
return uint32(dev & 0xffff00ff)
|
||||
}
|
||||
|
||||
// Mkdev returns a DragonFlyBSD device number generated from the given major and
|
||||
// minor components.
|
||||
func Mkdev(major, minor uint32) uint64 {
|
||||
return (uint64(major) << 8) | uint64(minor)
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright 2017 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.
|
||||
|
||||
// Functions to access/create device major and minor numbers matching the
|
||||
// encoding used in FreeBSD's sys/types.h header.
|
||||
//
|
||||
// The information below is extracted and adapted from sys/types.h:
|
||||
//
|
||||
// Minor gives a cookie instead of an index since in order to avoid changing the
|
||||
// meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
|
||||
// devices that don't use them.
|
||||
|
||||
package unix
|
||||
|
||||
// Major returns the major component of a FreeBSD device number.
|
||||
func Major(dev uint64) uint32 {
|
||||
return uint32((dev >> 8) & 0xff)
|
||||
}
|
||||
|
||||
// Minor returns the minor component of a FreeBSD device number.
|
||||
func Minor(dev uint64) uint32 {
|
||||
return uint32(dev & 0xffff00ff)
|
||||
}
|
||||
|
||||
// Mkdev returns a FreeBSD device number generated from the given major and
|
||||
// minor components.
|
||||
func Mkdev(major, minor uint32) uint64 {
|
||||
return (uint64(major) << 8) | uint64(minor)
|
||||
}
|
|
@ -34,9 +34,9 @@ func Minor(dev uint64) uint32 {
|
|||
// Mkdev returns a Linux device number generated from the given major and minor
|
||||
// components.
|
||||
func Mkdev(major, minor uint32) uint64 {
|
||||
dev := uint64((major & 0x00000fff) << 8)
|
||||
dev |= uint64((major & 0xfffff000) << 32)
|
||||
dev |= uint64((minor & 0x000000ff) << 0)
|
||||
dev |= uint64((minor & 0xffffff00) << 12)
|
||||
dev := (uint64(major) & 0x00000fff) << 8
|
||||
dev |= (uint64(major) & 0xfffff000) << 32
|
||||
dev |= (uint64(minor) & 0x000000ff) << 0
|
||||
dev |= (uint64(minor) & 0xffffff00) << 12
|
||||
return dev
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright 2017 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.
|
||||
|
||||
// Functions to access/create device major and minor numbers matching the
|
||||
// encoding used in NetBSD's sys/types.h header.
|
||||
|
||||
package unix
|
||||
|
||||
// Major returns the major component of a NetBSD device number.
|
||||
func Major(dev uint64) uint32 {
|
||||
return uint32((dev & 0x000fff00) >> 8)
|
||||
}
|
||||
|
||||
// Minor returns the minor component of a NetBSD device number.
|
||||
func Minor(dev uint64) uint32 {
|
||||
minor := uint32((dev & 0x000000ff) >> 0)
|
||||
minor |= uint32((dev & 0xfff00000) >> 12)
|
||||
return minor
|
||||
}
|
||||
|
||||
// Mkdev returns a NetBSD device number generated from the given major and minor
|
||||
// components.
|
||||
func Mkdev(major, minor uint32) uint64 {
|
||||
dev := (uint64(major) << 8) & 0x000fff00
|
||||
dev |= (uint64(minor) << 12) & 0xfff00000
|
||||
dev |= (uint64(minor) << 0) & 0x000000ff
|
||||
return dev
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright 2017 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.
|
||||
|
||||
// Functions to access/create device major and minor numbers matching the
|
||||
// encoding used in OpenBSD's sys/types.h header.
|
||||
|
||||
package unix
|
||||
|
||||
// Major returns the major component of an OpenBSD device number.
|
||||
func Major(dev uint64) uint32 {
|
||||
return uint32((dev & 0x0000ff00) >> 8)
|
||||
}
|
||||
|
||||
// Minor returns the minor component of an OpenBSD device number.
|
||||
func Minor(dev uint64) uint32 {
|
||||
minor := uint32((dev & 0x000000ff) >> 0)
|
||||
minor |= uint32((dev & 0xffff0000) >> 8)
|
||||
return minor
|
||||
}
|
||||
|
||||
// Mkdev returns an OpenBSD device number generated from the given major and minor
|
||||
// components.
|
||||
func Mkdev(major, minor uint32) uint64 {
|
||||
dev := (uint64(major) << 8) & 0x0000ff00
|
||||
dev |= (uint64(minor) << 8) & 0xffff0000
|
||||
dev |= (uint64(minor) << 0) & 0x000000ff
|
||||
return dev
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2010 The Go Authors. All rights reserved.
|
||||
// Copyright 2010 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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Copyright 2014 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.
|
||||
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
// Copyright 2017 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 unix
|
||||
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// FIXME: unexported function from os
|
||||
// syscallMode returns the syscall-specific mode bits from Go's portable mode bits.
|
||||
func syscallMode(i os.FileMode) (o uint32) {
|
||||
o |= uint32(i.Perm())
|
||||
if i&os.ModeSetuid != 0 {
|
||||
o |= syscall.S_ISUID
|
||||
}
|
||||
if i&os.ModeSetgid != 0 {
|
||||
o |= syscall.S_ISGID
|
||||
}
|
||||
if i&os.ModeSticky != 0 {
|
||||
o |= syscall.S_ISVTX
|
||||
}
|
||||
// No mapping for Go's ModeTemporary (plan9 only).
|
||||
return
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Copyright 2015 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.
|
||||
|
||||
|
@ -8,7 +8,7 @@ package unix
|
|||
|
||||
import "syscall"
|
||||
|
||||
// We can't use the gc-syntax .s files for gccgo. On the plus side
|
||||
// We can't use the gc-syntax .s files for gccgo. On the plus side
|
||||
// much of the functionality can be written directly in Go.
|
||||
|
||||
//extern gccgoRealSyscall
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Copyright 2015 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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Copyright 2015 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.
|
||||
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2016 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.
|
||||
|
||||
// +build gccgo,linux,sparc64
|
||||
|
||||
package unix
|
||||
|
||||
import "syscall"
|
||||
|
||||
//extern sysconf
|
||||
func realSysconf(name int) int64
|
||||
|
||||
func sysconf(name int) (n int64, err syscall.Errno) {
|
||||
r := realSysconf(name)
|
||||
if r < 0 {
|
||||
return 0, syscall.GetErrno()
|
||||
}
|
||||
return r, 0
|
||||
}
|
|
@ -80,12 +80,6 @@ darwin_arm64)
|
|||
mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||
;;
|
||||
dragonfly_386)
|
||||
mkerrors="$mkerrors -m32"
|
||||
mksyscall="./mksyscall.pl -l32 -dragonfly"
|
||||
mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||
;;
|
||||
dragonfly_amd64)
|
||||
mkerrors="$mkerrors -m64"
|
||||
mksyscall="./mksyscall.pl -dragonfly"
|
||||
|
@ -142,7 +136,6 @@ openbsd_386)
|
|||
mkerrors="$mkerrors -m32"
|
||||
mksyscall="./mksyscall.pl -l32 -openbsd"
|
||||
mksysctl="./mksysctl_openbsd.pl"
|
||||
zsysctl="zsysctl_openbsd.go"
|
||||
mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||
;;
|
||||
|
@ -150,7 +143,6 @@ openbsd_amd64)
|
|||
mkerrors="$mkerrors -m64"
|
||||
mksyscall="./mksyscall.pl -openbsd"
|
||||
mksysctl="./mksysctl_openbsd.pl"
|
||||
zsysctl="zsysctl_openbsd.go"
|
||||
mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||
;;
|
||||
|
@ -158,7 +150,6 @@ openbsd_arm)
|
|||
mkerrors="$mkerrors"
|
||||
mksyscall="./mksyscall.pl -l32 -openbsd -arm"
|
||||
mksysctl="./mksysctl_openbsd.pl"
|
||||
zsysctl="zsysctl_openbsd.go"
|
||||
mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
|
||||
# Let the type of C char be signed for making the bare syscall
|
||||
# API consistent across platforms.
|
||||
|
|
|
@ -17,8 +17,8 @@ if test -z "$GOARCH" -o -z "$GOOS"; then
|
|||
fi
|
||||
|
||||
# Check that we are using the new build system if we should
|
||||
if [[ "$GOOS" -eq "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
|
||||
if [[ "$GOLANG_SYS_BUILD" -ne "docker" ]]; then
|
||||
if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
|
||||
if [[ "$GOLANG_SYS_BUILD" != "docker" ]]; then
|
||||
echo 1>&2 "In the new build system, mkerrors should not be called directly."
|
||||
echo 1>&2 "See README.md"
|
||||
exit 1
|
||||
|
@ -27,7 +27,7 @@ fi
|
|||
|
||||
CC=${CC:-cc}
|
||||
|
||||
if [[ "$GOOS" -eq "solaris" ]]; then
|
||||
if [[ "$GOOS" = "solaris" ]]; then
|
||||
# Assumes GNU versions of utilities in PATH.
|
||||
export PATH=/usr/gnu/bin:$PATH
|
||||
fi
|
||||
|
@ -38,6 +38,8 @@ includes_Darwin='
|
|||
#define _DARWIN_C_SOURCE
|
||||
#define KERNEL
|
||||
#define _DARWIN_USE_64_BIT_INODE
|
||||
#include <stdint.h>
|
||||
#include <sys/attr.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/ptrace.h>
|
||||
|
@ -46,6 +48,7 @@ includes_Darwin='
|
|||
#include <sys/sysctl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/wait.h>
|
||||
#include <net/bpf.h>
|
||||
#include <net/if.h>
|
||||
|
@ -84,6 +87,7 @@ includes_FreeBSD='
|
|||
#include <sys/sockio.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <net/bpf.h>
|
||||
|
@ -183,6 +187,7 @@ struct ltchars {
|
|||
#include <linux/vm_sockets.h>
|
||||
#include <linux/taskstats.h>
|
||||
#include <linux/genetlink.h>
|
||||
#include <linux/watchdog.h>
|
||||
#include <net/route.h>
|
||||
#include <asm/termbits.h>
|
||||
|
||||
|
@ -283,6 +288,7 @@ includes_SunOS='
|
|||
#include <sys/mman.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mkdev.h>
|
||||
#include <net/bpf.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_arp.h>
|
||||
|
@ -347,6 +353,7 @@ ccflags="$@"
|
|||
$2 !~ /^EXPR_/ &&
|
||||
$2 ~ /^E[A-Z0-9_]+$/ ||
|
||||
$2 ~ /^B[0-9_]+$/ ||
|
||||
$2 ~ /^(OLD|NEW)DEV$/ ||
|
||||
$2 == "BOTHER" ||
|
||||
$2 ~ /^CI?BAUD(EX)?$/ ||
|
||||
$2 == "IBSHIFT" ||
|
||||
|
@ -380,7 +387,9 @@ ccflags="$@"
|
|||
$2 == "SOMAXCONN" ||
|
||||
$2 == "NAME_MAX" ||
|
||||
$2 == "IFNAMSIZ" ||
|
||||
$2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ ||
|
||||
$2 ~ /^CTL_(HW|KERN|MAXNAME|NET|QUERY)$/ ||
|
||||
$2 ~ /^KERN_(HOSTNAME|OS(RELEASE|TYPE)|VERSION)$/ ||
|
||||
$2 ~ /^HW_MACHINE$/ ||
|
||||
$2 ~ /^SYSCTL_VERS/ ||
|
||||
$2 ~ /^(MS|MNT|UMOUNT)_/ ||
|
||||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
|
||||
|
@ -415,9 +424,14 @@ ccflags="$@"
|
|||
$2 ~ /^SECCOMP_MODE_/ ||
|
||||
$2 ~ /^SPLICE_/ ||
|
||||
$2 ~ /^(VM|VMADDR)_/ ||
|
||||
$2 ~ /^IOCTL_VM_SOCKETS_/ ||
|
||||
$2 ~ /^(TASKSTATS|TS)_/ ||
|
||||
$2 ~ /^GENL_/ ||
|
||||
$2 ~ /^UTIME_/ ||
|
||||
$2 ~ /^XATTR_(CREATE|REPLACE)/ ||
|
||||
$2 ~ /^ATTR_(BIT_MAP_COUNT|(CMN|VOL|FILE)_)/ ||
|
||||
$2 ~ /^FSOPT_/ ||
|
||||
$2 ~ /^WDIOC_/ ||
|
||||
$2 !~ "WMESGLEN" &&
|
||||
$2 ~ /^W[A-Z0-9]+$/ ||
|
||||
$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
// Copyright 2016 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.
|
||||
|
||||
// +build ignore
|
||||
|
||||
// mkpost processes the output of cgo -godefs to
|
||||
// modify the generated types. It is used to clean up
|
||||
// the sys API in an architecture specific manner.
|
||||
//
|
||||
// mkpost is run after cgo -godefs; see README.md.
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"go/format"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Get the OS and architecture (using GOARCH_TARGET if it exists)
|
||||
goos := os.Getenv("GOOS")
|
||||
goarch := os.Getenv("GOARCH_TARGET")
|
||||
if goarch == "" {
|
||||
goarch = os.Getenv("GOARCH")
|
||||
}
|
||||
// Check that we are using the new build system if we should be.
|
||||
if goos == "linux" && goarch != "sparc64" {
|
||||
if os.Getenv("GOLANG_SYS_BUILD") != "docker" {
|
||||
os.Stderr.WriteString("In the new build system, mkpost should not be called directly.\n")
|
||||
os.Stderr.WriteString("See README.md\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
b, err := ioutil.ReadAll(os.Stdin)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
// If we have empty Ptrace structs, we should delete them. Only s390x emits
|
||||
// nonempty Ptrace structs.
|
||||
ptraceRexexp := regexp.MustCompile(`type Ptrace((Psw|Fpregs|Per) struct {\s*})`)
|
||||
b = ptraceRexexp.ReplaceAll(b, nil)
|
||||
|
||||
// Replace the control_regs union with a blank identifier for now.
|
||||
controlRegsRegex := regexp.MustCompile(`(Control_regs)\s+\[0\]uint64`)
|
||||
b = controlRegsRegex.ReplaceAll(b, []byte("_ [0]uint64"))
|
||||
|
||||
// Remove fields that are added by glibc
|
||||
// Note that this is unstable as the identifers are private.
|
||||
removeFieldsRegex := regexp.MustCompile(`X__glibc\S*`)
|
||||
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
|
||||
|
||||
// Convert [65]int8 to [65]byte in Utsname members to simplify
|
||||
// conversion to string; see golang.org/issue/20753
|
||||
convertUtsnameRegex := regexp.MustCompile(`((Sys|Node|Domain)name|Release|Version|Machine)(\s+)\[(\d+)\]u?int8`)
|
||||
b = convertUtsnameRegex.ReplaceAll(b, []byte("$1$3[$4]byte"))
|
||||
|
||||
// We refuse to export private fields on s390x
|
||||
if goarch == "s390x" && goos == "linux" {
|
||||
// Remove cgo padding fields
|
||||
removeFieldsRegex := regexp.MustCompile(`Pad_cgo_\d+`)
|
||||
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
|
||||
|
||||
// Remove padding, hidden, or unused fields
|
||||
removeFieldsRegex = regexp.MustCompile(`X_\S+`)
|
||||
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
|
||||
}
|
||||
|
||||
// Remove the first line of warning from cgo
|
||||
b = b[bytes.IndexByte(b, '\n')+1:]
|
||||
// Modify the command in the header to include:
|
||||
// mkpost, our own warning, and a build tag.
|
||||
replacement := fmt.Sprintf(`$1 | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build %s,%s`, goarch, goos)
|
||||
cgoCommandRegex := regexp.MustCompile(`(cgo -godefs .*)`)
|
||||
b = cgoCommandRegex.ReplaceAll(b, []byte(replacement))
|
||||
|
||||
// gofmt
|
||||
b, err = format.Source(b)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
os.Stdout.Write(b)
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2017 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.
|
||||
|
||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
|
||||
// For Unix, get the pagesize from the runtime.
|
||||
|
||||
package unix
|
||||
|
||||
import "syscall"
|
||||
|
||||
func Getpagesize() int {
|
||||
return syscall.Getpagesize()
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012 The Go Authors. All rights reserved.
|
||||
// Copyright 2012 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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012 The Go Authors. All rights reserved.
|
||||
// Copyright 2012 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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2011 The Go Authors. All rights reserved.
|
||||
// Copyright 2011 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.
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
|
||||
// Package unix contains an interface to the low-level operating system
|
||||
// primitives. OS details vary depending on the underlying system, and
|
||||
// primitives. OS details vary depending on the underlying system, and
|
||||
// by default, godoc will display OS-specific documentation for the current
|
||||
// system. If you want godoc to display OS documentation for another
|
||||
// system, set $GOOS and $GOARCH to the desired system. For example, if
|
||||
// system. If you want godoc to display OS documentation for another
|
||||
// system, set $GOOS and $GOARCH to the desired system. For example, if
|
||||
// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS
|
||||
// to freebsd and $GOARCH to arm.
|
||||
// The primary use of this package is inside other packages that provide a more
|
||||
|
@ -49,21 +49,3 @@ func BytePtrFromString(s string) (*byte, error) {
|
|||
// Single-word zero for use when we need a valid pointer to 0 bytes.
|
||||
// See mkunix.pl.
|
||||
var _zero uintptr
|
||||
|
||||
func (ts *Timespec) Unix() (sec int64, nsec int64) {
|
||||
return int64(ts.Sec), int64(ts.Nsec)
|
||||
}
|
||||
|
||||
func (tv *Timeval) Unix() (sec int64, nsec int64) {
|
||||
return int64(tv.Sec), int64(tv.Usec) * 1000
|
||||
}
|
||||
|
||||
func (ts *Timespec) Nano() int64 {
|
||||
return int64(ts.Sec)*1e9 + int64(ts.Nsec)
|
||||
}
|
||||
|
||||
func (tv *Timeval) Nano() int64 {
|
||||
return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
|
||||
}
|
||||
|
||||
func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
|
||||
|
|
|
@ -34,7 +34,7 @@ func Getgroups() (gids []int, err error) {
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
// Sanity check group count. Max is 16 on BSD.
|
||||
// Sanity check group count. Max is 16 on BSD.
|
||||
if n < 0 || n > 1000 {
|
||||
return nil, EINVAL
|
||||
}
|
||||
|
@ -570,7 +570,12 @@ func UtimesNano(path string, ts []Timespec) error {
|
|||
if len(ts) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
||||
// Darwin setattrlist can set nanosecond timestamps
|
||||
err := setattrlistTimes(path, ts, 0)
|
||||
if err != ENOSYS {
|
||||
return err
|
||||
}
|
||||
err = utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
||||
if err != ENOSYS {
|
||||
return err
|
||||
}
|
||||
|
@ -590,6 +595,10 @@ func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
|
|||
if len(ts) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
err := setattrlistTimes(path, ts, flags)
|
||||
if err != ENOSYS {
|
||||
return err
|
||||
}
|
||||
return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
|
||||
}
|
||||
|
||||
|
@ -607,6 +616,15 @@ func Futimes(fd int, tv []Timeval) error {
|
|||
|
||||
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
||||
// TODO: wrap
|
||||
// Acct(name nil-string) (err error)
|
||||
// Gethostuuid(uuid *byte, timeout *Timespec) (err error)
|
||||
|
|
|
@ -54,7 +54,7 @@ func nametomib(name string) (mib []_C_int, err error) {
|
|||
|
||||
// NOTE(rsc): It seems strange to set the buffer to have
|
||||
// size CTL_MAXNAME+2 but use only CTL_MAXNAME
|
||||
// as the size. I don't know why the +2 is here, but the
|
||||
// as the size. I don't know why the +2 is here, but the
|
||||
// kernel uses +2 for its own implementation of this function.
|
||||
// I am scared that if we don't include the +2 here, the kernel
|
||||
// will silently write 2 words farther than we specify
|
||||
|
@ -187,6 +187,37 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func setattrlistTimes(path string, times []Timespec, flags int) error {
|
||||
_p0, err := BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var attrList attrList
|
||||
attrList.bitmapCount = ATTR_BIT_MAP_COUNT
|
||||
attrList.CommonAttr = ATTR_CMN_MODTIME | ATTR_CMN_ACCTIME
|
||||
|
||||
// order is mtime, atime: the opposite of Chtimes
|
||||
attributes := [2]Timespec{times[1], times[0]}
|
||||
options := 0
|
||||
if flags&AT_SYMLINK_NOFOLLOW != 0 {
|
||||
options |= FSOPT_NOFOLLOW
|
||||
}
|
||||
_, _, e1 := Syscall6(
|
||||
SYS_SETATTRLIST,
|
||||
uintptr(unsafe.Pointer(_p0)),
|
||||
uintptr(unsafe.Pointer(&attrList)),
|
||||
uintptr(unsafe.Pointer(&attributes)),
|
||||
uintptr(unsafe.Sizeof(attributes)),
|
||||
uintptr(options),
|
||||
0,
|
||||
)
|
||||
if e1 != 0 {
|
||||
return e1
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
|
||||
// Darwin doesn't support SYS_UTIMENSAT
|
||||
return ENOSYS
|
||||
|
@ -239,6 +270,52 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
|||
return &value, err
|
||||
}
|
||||
|
||||
func Uname(uname *Utsname) error {
|
||||
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
|
||||
n := unsafe.Sizeof(uname.Sysname)
|
||||
if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
|
||||
n = unsafe.Sizeof(uname.Nodename)
|
||||
if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
|
||||
n = unsafe.Sizeof(uname.Release)
|
||||
if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_VERSION}
|
||||
n = unsafe.Sizeof(uname.Version)
|
||||
if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// The version might have newlines or tabs in it, convert them to
|
||||
// spaces.
|
||||
for i, b := range uname.Version {
|
||||
if b == '\n' || b == '\t' {
|
||||
if i == len(uname.Version)-1 {
|
||||
uname.Version[i] = 0
|
||||
} else {
|
||||
uname.Version[i] = ' '
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_HW, HW_MACHINE}
|
||||
n = unsafe.Sizeof(uname.Machine)
|
||||
if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
|
@ -377,7 +454,6 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
|||
// Searchfs
|
||||
// Delete
|
||||
// Copyfile
|
||||
// Poll
|
||||
// Watchevent
|
||||
// Waitevent
|
||||
// Modwatch
|
||||
|
|
|
@ -11,27 +11,18 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = int32(nsec / 1e9)
|
||||
ts.Nsec = int32(nsec % 1e9)
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
tv.Sec = int32(nsec / 1e9)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
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
|
||||
// but is otherwise unused. The answers come back
|
||||
// in the two registers.
|
||||
sec, usec, err := gettimeofday(tv)
|
||||
tv.Sec = int32(sec)
|
||||
|
|
|
@ -11,27 +11,18 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = nsec / 1e9
|
||||
ts.Nsec = nsec % 1e9
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
tv.Sec = int64(nsec / 1e9)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
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
|
||||
// but is otherwise unused. The answers come back
|
||||
// in the two registers.
|
||||
sec, usec, err := gettimeofday(tv)
|
||||
tv.Sec = sec
|
||||
|
|
|
@ -9,27 +9,18 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = int32(nsec / 1e9)
|
||||
ts.Nsec = int32(nsec % 1e9)
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
tv.Sec = int32(nsec / 1e9)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
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
|
||||
// but is otherwise unused. The answers come back
|
||||
// in the two registers.
|
||||
sec, usec, err := gettimeofday(tv)
|
||||
tv.Sec = int32(sec)
|
||||
|
@ -69,3 +60,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
}
|
||||
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
|
||||
|
||||
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
|
||||
// of darwin/arm the syscall is called sysctl instead of __sysctl.
|
||||
const SYS___SYSCTL = SYS_SYSCTL
|
||||
|
|
|
@ -11,27 +11,18 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
func Getpagesize() int { return 16384 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = nsec / 1e9
|
||||
ts.Nsec = nsec % 1e9
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
tv.Sec = int64(nsec / 1e9)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
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
|
||||
// but is otherwise unused. The answers come back
|
||||
// in the two registers.
|
||||
sec, usec, err := gettimeofday(tv)
|
||||
tv.Sec = sec
|
||||
|
|
|
@ -125,6 +125,50 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func setattrlistTimes(path string, times []Timespec, flags int) error {
|
||||
// used on Darwin for UtimesNano
|
||||
return ENOSYS
|
||||
}
|
||||
|
||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||
|
||||
// ioctl itself should not be exposed directly, but additional get/set
|
||||
// functions for specific types are permissible.
|
||||
|
||||
// IoctlSetInt performs an ioctl operation which sets an integer value
|
||||
// on fd, using the specified request number.
|
||||
func IoctlSetInt(fd int, req uint, value int) error {
|
||||
return ioctl(fd, req, uintptr(value))
|
||||
}
|
||||
|
||||
func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
||||
}
|
||||
|
||||
func IoctlSetTermios(fd int, req uint, value *Termios) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
||||
}
|
||||
|
||||
// IoctlGetInt performs an ioctl operation which gets an integer value
|
||||
// from fd, using the specified request number.
|
||||
func IoctlGetInt(fd int, req uint) (int, error) {
|
||||
var value int
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return value, err
|
||||
}
|
||||
|
||||
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
|
||||
var value Winsize
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return &value, err
|
||||
}
|
||||
|
||||
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
||||
var value Termios
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return &value, err
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
|
@ -225,7 +269,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
// Getlogin
|
||||
// Sigpending
|
||||
// Sigaltstack
|
||||
// Ioctl
|
||||
// Reboot
|
||||
// Execve
|
||||
// Vfork
|
||||
|
@ -257,7 +300,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
// Searchfs
|
||||
// Delete
|
||||
// Copyfile
|
||||
// Poll
|
||||
// Watchevent
|
||||
// Waitevent
|
||||
// Modwatch
|
||||
|
@ -403,7 +445,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
// Pread_nocancel
|
||||
// Pwrite_nocancel
|
||||
// Waitid_nocancel
|
||||
// Poll_nocancel
|
||||
// Msgsnd_nocancel
|
||||
// Msgrcv_nocancel
|
||||
// Sem_wait_nocancel
|
||||
|
|
|
@ -11,21 +11,12 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = nsec / 1e9
|
||||
ts.Nsec = nsec % 1e9
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = nsec % 1e9 / 1e3
|
||||
tv.Sec = int64(nsec / 1e9)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
|
|
|
@ -32,7 +32,7 @@ func nametomib(name string) (mib []_C_int, err error) {
|
|||
|
||||
// NOTE(rsc): It seems strange to set the buffer to have
|
||||
// size CTL_MAXNAME+2 but use only CTL_MAXNAME
|
||||
// as the size. I don't know why the +2 is here, but the
|
||||
// as the size. I don't know why the +2 is here, but the
|
||||
// kernel uses +2 for its own implementation of this function.
|
||||
// I am scared that if we don't include the +2 here, the kernel
|
||||
// will silently write 2 words farther than we specify
|
||||
|
@ -120,6 +120,11 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func setattrlistTimes(path string, times []Timespec, flags int) error {
|
||||
// used on Darwin for UtimesNano
|
||||
return ENOSYS
|
||||
}
|
||||
|
||||
// Derive extattr namespace and attribute name
|
||||
|
||||
func xattrnamespace(fullattr string) (ns int, attr string, err error) {
|
||||
|
@ -391,6 +396,52 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
|||
return &value, err
|
||||
}
|
||||
|
||||
func Uname(uname *Utsname) error {
|
||||
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
|
||||
n := unsafe.Sizeof(uname.Sysname)
|
||||
if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
|
||||
n = unsafe.Sizeof(uname.Nodename)
|
||||
if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
|
||||
n = unsafe.Sizeof(uname.Release)
|
||||
if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_KERN, KERN_VERSION}
|
||||
n = unsafe.Sizeof(uname.Version)
|
||||
if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// The version might have newlines or tabs in it, convert them to
|
||||
// spaces.
|
||||
for i, b := range uname.Version {
|
||||
if b == '\n' || b == '\t' {
|
||||
if i == len(uname.Version)-1 {
|
||||
uname.Version[i] = 0
|
||||
} else {
|
||||
uname.Version[i] = ' '
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mib = []_C_int{CTL_HW, HW_MACHINE}
|
||||
n = unsafe.Sizeof(uname.Machine)
|
||||
if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
|
@ -434,6 +485,7 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
|||
//sys Fstatfs(fd int, stat *Statfs_t) (err error)
|
||||
//sys Fsync(fd int) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sys Getdents(fd int, buf []byte) (n int, err error)
|
||||
//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
|
||||
//sys Getdtablesize() (size int)
|
||||
//sysnb Getegid() (egid int)
|
||||
|
@ -550,7 +602,6 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
|||
// Searchfs
|
||||
// Delete
|
||||
// Copyfile
|
||||
// Poll
|
||||
// Watchevent
|
||||
// Waitevent
|
||||
// Modwatch
|
||||
|
|
|
@ -11,21 +11,12 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = int32(nsec / 1e9)
|
||||
ts.Nsec = int32(nsec % 1e9)
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
tv.Sec = int32(nsec / 1e9)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
|
|
|
@ -11,21 +11,12 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = nsec / 1e9
|
||||
ts.Nsec = nsec % 1e9
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = nsec % 1e9 / 1e3
|
||||
tv.Sec = int64(nsec / 1e9)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
|
|
|
@ -11,21 +11,12 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return ts.Sec*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = nsec / 1e9
|
||||
ts.Nsec = int32(nsec % 1e9)
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: int32(nsec)}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
tv.Sec = nsec / 1e9
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: int32(usec)}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
|
|
|
@ -255,7 +255,7 @@ func Getgroups() (gids []int, err error) {
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
// Sanity check group count. Max is 1<<16 on Linux.
|
||||
// Sanity check group count. Max is 1<<16 on Linux.
|
||||
if n < 0 || n > 1<<20 {
|
||||
return nil, EINVAL
|
||||
}
|
||||
|
@ -290,8 +290,8 @@ type WaitStatus uint32
|
|||
// 0x7F (stopped), or a signal number that caused an exit.
|
||||
// The 0x80 bit is whether there was a core dump.
|
||||
// An extra number (exit code, signal causing a stop)
|
||||
// is in the high bits. At least that's the idea.
|
||||
// There are various irregularities. For example, the
|
||||
// is in the high bits. At least that's the idea.
|
||||
// There are various irregularities. For example, the
|
||||
// "continued" status is 0xFFFF, distinguishing itself
|
||||
// from stopped via the core dump bit.
|
||||
|
||||
|
@ -926,7 +926,7 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
|
|||
msg.Namelen = uint32(SizeofSockaddrAny)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = (*byte)(unsafe.Pointer(&p[0]))
|
||||
iov.Base = &p[0]
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy byte
|
||||
|
@ -941,7 +941,7 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
|
|||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
}
|
||||
msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
|
||||
msg.Control = &oob[0]
|
||||
msg.SetControllen(len(oob))
|
||||
}
|
||||
msg.Iov = &iov
|
||||
|
@ -974,11 +974,11 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
|
|||
}
|
||||
}
|
||||
var msg Msghdr
|
||||
msg.Name = (*byte)(unsafe.Pointer(ptr))
|
||||
msg.Name = (*byte)(ptr)
|
||||
msg.Namelen = uint32(salen)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = (*byte)(unsafe.Pointer(&p[0]))
|
||||
iov.Base = &p[0]
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy byte
|
||||
|
@ -993,7 +993,7 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
|
|||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
}
|
||||
msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
|
||||
msg.Control = &oob[0]
|
||||
msg.SetControllen(len(oob))
|
||||
}
|
||||
msg.Iov = &iov
|
||||
|
@ -1023,7 +1023,7 @@ func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err erro
|
|||
|
||||
var buf [sizeofPtr]byte
|
||||
|
||||
// Leading edge. PEEKTEXT/PEEKDATA don't require aligned
|
||||
// Leading edge. PEEKTEXT/PEEKDATA don't require aligned
|
||||
// access (PEEKUSER warns that it might), but if we don't
|
||||
// align our reads, we might straddle an unmapped page
|
||||
// boundary and not get the bytes leading up to the page
|
||||
|
@ -1125,6 +1125,10 @@ func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) {
|
|||
return ptracePoke(PTRACE_POKEDATA, PTRACE_PEEKDATA, pid, addr, data)
|
||||
}
|
||||
|
||||
func PtracePokeUser(pid int, addr uintptr, data []byte) (count int, err error) {
|
||||
return ptracePoke(PTRACE_POKEUSR, PTRACE_PEEKUSR, pid, addr, data)
|
||||
}
|
||||
|
||||
func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
|
||||
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
|
||||
}
|
||||
|
@ -1262,6 +1266,7 @@ func Getpgrp() (pid int) {
|
|||
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
|
||||
//sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
|
||||
//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
|
||||
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
|
||||
//sys read(fd int, p []byte) (n int, err error)
|
||||
//sys Removexattr(path string, attr string) (err error)
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
|
@ -1405,7 +1410,6 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
|
|||
// Msgget
|
||||
// Msgrcv
|
||||
// Msgsnd
|
||||
// Newfstatat
|
||||
// Nfsservctl
|
||||
// Personality
|
||||
// Pselect6
|
||||
|
|
|
@ -14,21 +14,12 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = int32(nsec / 1e9)
|
||||
ts.Nsec = int32(nsec % 1e9)
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Sec = int32(nsec / 1e9)
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (err error)
|
||||
|
@ -63,6 +54,7 @@ func Pipe2(p []int, flags int) (err error) {
|
|||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||
//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
|
||||
//sysnb Getegid() (egid int) = SYS_GETEGID32
|
||||
//sysnb Geteuid() (euid int) = SYS_GETEUID32
|
||||
|
@ -185,9 +177,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
|||
|
||||
// On x86 Linux, all the socket calls go through an extra indirection,
|
||||
// I think because the 5-register system call interface can't handle
|
||||
// the 6-argument calls like sendto and recvfrom. Instead the
|
||||
// the 6-argument calls like sendto and recvfrom. Instead the
|
||||
// arguments to the underlying system call are the number below
|
||||
// and a pointer to an array of uintptr. We hide the pointer in the
|
||||
// and a pointer to an array of uintptr. We hide the pointer in the
|
||||
// socketcall assembly to avoid allocation on every system call.
|
||||
|
||||
const (
|
||||
|
|
|
@ -11,6 +11,7 @@ package unix
|
|||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (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_NEWFSTATAT
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
|
@ -69,8 +70,6 @@ func Gettimeofday(tv *Timeval) (err error) {
|
|||
return nil
|
||||
}
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func Time(t *Time_t) (tt Time_t, err error) {
|
||||
var tv Timeval
|
||||
errno := gettimeofday(&tv)
|
||||
|
@ -85,19 +84,12 @@ func Time(t *Time_t) (tt Time_t, err error) {
|
|||
|
||||
//sys Utime(path string, buf *Utimbuf) (err error)
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = nsec / 1e9
|
||||
ts.Nsec = nsec % 1e9
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Sec = nsec / 1e9
|
||||
tv.Usec = nsec % 1e9 / 1e3
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (err error)
|
||||
|
|
|
@ -11,21 +11,12 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = int32(nsec / 1e9)
|
||||
ts.Nsec = int32(nsec % 1e9)
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Sec = int32(nsec / 1e9)
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||
}
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
|
@ -86,6 +77,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
|||
//sys Dup2(oldfd int, newfd int) (err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||
//sysnb Getegid() (egid int) = SYS_GETEGID32
|
||||
//sysnb Geteuid() (euid int) = SYS_GETEUID32
|
||||
//sysnb Getgid() (gid int) = SYS_GETGID32
|
||||
|
|
|
@ -21,7 +21,12 @@ package unix
|
|||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS_PSELECT6
|
||||
|
||||
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
||||
ts := Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
|
||||
return Pselect(nfd, r, w, e, &ts, nil)
|
||||
}
|
||||
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
|
@ -66,23 +71,14 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
|||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
|
||||
|
||||
func Getpagesize() int { return 65536 }
|
||||
|
||||
//sysnb Gettimeofday(tv *Timeval) (err error)
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = nsec / 1e9
|
||||
ts.Nsec = nsec % 1e9
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Sec = nsec / 1e9
|
||||
tv.Usec = nsec % 1e9 / 1e3
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
func Time(t *Time_t) (Time_t, error) {
|
||||
|
|
|
@ -10,6 +10,7 @@ package unix
|
|||
//sys Dup2(oldfd int, newfd 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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
|
@ -23,7 +24,12 @@ package unix
|
|||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS_PSELECT6
|
||||
|
||||
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
||||
ts := Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
|
||||
return Pselect(nfd, r, w, e, &ts, nil)
|
||||
}
|
||||
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
|
@ -55,8 +61,6 @@ package unix
|
|||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
|
||||
|
||||
func Getpagesize() int { return 65536 }
|
||||
|
||||
//sysnb Gettimeofday(tv *Timeval) (err error)
|
||||
|
||||
func Time(t *Time_t) (tt Time_t, err error) {
|
||||
|
@ -73,19 +77,12 @@ func Time(t *Time_t) (tt Time_t, err error) {
|
|||
|
||||
//sys Utime(path string, buf *Utimbuf) (err error)
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = nsec / 1e9
|
||||
ts.Nsec = nsec % 1e9
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Sec = nsec / 1e9
|
||||
tv.Usec = nsec % 1e9 / 1e3
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
|
|
|
@ -65,6 +65,7 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
|||
|
||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||
|
||||
//sys Utime(path string, buf *Utimbuf) (err error)
|
||||
|
@ -99,19 +100,12 @@ func Seek(fd int, offset int64, whence int) (off int64, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = int32(nsec / 1e9)
|
||||
ts.Nsec = int32(nsec % 1e9)
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Sec = int32(nsec / 1e9)
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
@ -235,5 +229,3 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
|
|||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
|
|
@ -11,6 +11,7 @@ package unix
|
|||
//sys Dup2(oldfd int, newfd int) (err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (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_NEWFSTATAT
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
|
@ -28,7 +29,7 @@ package unix
|
|||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
|
@ -61,26 +62,17 @@ package unix
|
|||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
|
||||
|
||||
func Getpagesize() int { return 65536 }
|
||||
|
||||
//sysnb Gettimeofday(tv *Timeval) (err error)
|
||||
//sysnb Time(t *Time_t) (tt Time_t, err error)
|
||||
|
||||
//sys Utime(path string, buf *Utimbuf) (err error)
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = nsec / 1e9
|
||||
ts.Nsec = nsec % 1e9
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Sec = nsec / 1e9
|
||||
tv.Usec = nsec % 1e9 / 1e3
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
func (r *PtraceRegs) PC() uint64 { return r.Nip }
|
||||
|
|
|
@ -15,6 +15,7 @@ import (
|
|||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (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_NEWFSTATAT
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
|
@ -46,8 +47,6 @@ import (
|
|||
//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
|
||||
//sysnb setgroups(n int, list *_Gid_t) (err error)
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
//sysnb Gettimeofday(tv *Timeval) (err error)
|
||||
|
||||
func Time(t *Time_t) (tt Time_t, err error) {
|
||||
|
@ -64,19 +63,12 @@ func Time(t *Time_t) (tt Time_t, err error) {
|
|||
|
||||
//sys Utime(path string, buf *Utimbuf) (err error)
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = nsec / 1e9
|
||||
ts.Nsec = nsec % 1e9
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Sec = nsec / 1e9
|
||||
tv.Usec = nsec % 1e9 / 1e3
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
|
|
@ -6,15 +6,11 @@
|
|||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"sync/atomic"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Dup2(oldfd int, newfd int) (err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (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 Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
|
@ -63,21 +59,6 @@ import (
|
|||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
|
||||
|
||||
func sysconf(name int) (n int64, err syscall.Errno)
|
||||
|
||||
// pageSize caches the value of Getpagesize, since it can't change
|
||||
// once the system is booted.
|
||||
var pageSize int64 // accessed atomically
|
||||
|
||||
func Getpagesize() int {
|
||||
n := atomic.LoadInt64(&pageSize)
|
||||
if n == 0 {
|
||||
n, _ = sysconf(_SC_PAGESIZE)
|
||||
atomic.StoreInt64(&pageSize, n)
|
||||
}
|
||||
return int(n)
|
||||
}
|
||||
|
||||
func Ioperm(from int, num int, on int) (err error) {
|
||||
return ENOSYS
|
||||
}
|
||||
|
@ -102,19 +83,12 @@ func Time(t *Time_t) (tt Time_t, err error) {
|
|||
|
||||
//sys Utime(path string, buf *Utimbuf) (err error)
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = nsec / 1e9
|
||||
ts.Nsec = nsec % 1e9
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Sec = nsec / 1e9
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: int32(usec)}
|
||||
}
|
||||
|
||||
func (r *PtraceRegs) PC() uint64 { return r.Tpc }
|
||||
|
|
|
@ -55,7 +55,6 @@ func sysctlNodes(mib []_C_int) (nodes []Sysctlnode, err error) {
|
|||
}
|
||||
|
||||
func nametomib(name string) (mib []_C_int, err error) {
|
||||
|
||||
// Split name into components.
|
||||
var parts []string
|
||||
last := 0
|
||||
|
@ -124,6 +123,50 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
return -1, ENOSYS
|
||||
}
|
||||
|
||||
func setattrlistTimes(path string, times []Timespec, flags int) error {
|
||||
// used on Darwin for UtimesNano
|
||||
return ENOSYS
|
||||
}
|
||||
|
||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||
|
||||
// ioctl itself should not be exposed directly, but additional get/set
|
||||
// functions for specific types are permissible.
|
||||
|
||||
// IoctlSetInt performs an ioctl operation which sets an integer value
|
||||
// on fd, using the specified request number.
|
||||
func IoctlSetInt(fd int, req uint, value int) error {
|
||||
return ioctl(fd, req, uintptr(value))
|
||||
}
|
||||
|
||||
func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
||||
}
|
||||
|
||||
func IoctlSetTermios(fd int, req uint, value *Termios) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
||||
}
|
||||
|
||||
// IoctlGetInt performs an ioctl operation which gets an integer value
|
||||
// from fd, using the specified request number.
|
||||
func IoctlGetInt(fd int, req uint) (int, error) {
|
||||
var value int
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return value, err
|
||||
}
|
||||
|
||||
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
|
||||
var value Winsize
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return &value, err
|
||||
}
|
||||
|
||||
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
||||
var value Termios
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return &value, err
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
|
@ -384,7 +427,6 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
// getitimer
|
||||
// getvfsstat
|
||||
// getxattr
|
||||
// ioctl
|
||||
// ktrace
|
||||
// lchflags
|
||||
// lchmod
|
||||
|
@ -422,7 +464,6 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
// ntp_adjtime
|
||||
// pmc_control
|
||||
// pmc_get_info
|
||||
// poll
|
||||
// pollts
|
||||
// preadv
|
||||
// profil
|
||||
|
|
|
@ -6,21 +6,12 @@
|
|||
|
||||
package unix
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = int64(nsec / 1e9)
|
||||
ts.Nsec = int32(nsec % 1e9)
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: int32(nsec)}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
tv.Sec = int64(nsec / 1e9)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: int32(usec)}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
|
|
|
@ -6,21 +6,12 @@
|
|||
|
||||
package unix
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = int64(nsec / 1e9)
|
||||
ts.Nsec = int64(nsec % 1e9)
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
tv.Sec = int64(nsec / 1e9)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: int32(usec)}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
|
|
|
@ -6,21 +6,12 @@
|
|||
|
||||
package unix
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = int64(nsec / 1e9)
|
||||
ts.Nsec = int32(nsec % 1e9)
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: int32(nsec)}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
tv.Sec = int64(nsec / 1e9)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: int32(usec)}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
package unix
|
||||
|
||||
import (
|
||||
"sort"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
@ -32,23 +33,11 @@ type SockaddrDatalink struct {
|
|||
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
func nametomib(name string) (mib []_C_int, err error) {
|
||||
|
||||
// Perform lookup via a binary search
|
||||
left := 0
|
||||
right := len(sysctlMib) - 1
|
||||
for {
|
||||
idx := left + (right-left)/2
|
||||
switch {
|
||||
case name == sysctlMib[idx].ctlname:
|
||||
return sysctlMib[idx].ctloid, nil
|
||||
case name > sysctlMib[idx].ctlname:
|
||||
left = idx + 1
|
||||
default:
|
||||
right = idx - 1
|
||||
}
|
||||
if left > right {
|
||||
break
|
||||
}
|
||||
i := sort.Search(len(sysctlMib), func(i int) bool {
|
||||
return sysctlMib[i].ctlname >= name
|
||||
})
|
||||
if i < len(sysctlMib) && sysctlMib[i].ctlname == name {
|
||||
return sysctlMib[i].ctloid, nil
|
||||
}
|
||||
return nil, EINVAL
|
||||
}
|
||||
|
@ -102,6 +91,50 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func setattrlistTimes(path string, times []Timespec, flags int) error {
|
||||
// used on Darwin for UtimesNano
|
||||
return ENOSYS
|
||||
}
|
||||
|
||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||
|
||||
// ioctl itself should not be exposed directly, but additional get/set
|
||||
// functions for specific types are permissible.
|
||||
|
||||
// IoctlSetInt performs an ioctl operation which sets an integer value
|
||||
// on fd, using the specified request number.
|
||||
func IoctlSetInt(fd int, req uint, value int) error {
|
||||
return ioctl(fd, req, uintptr(value))
|
||||
}
|
||||
|
||||
func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
||||
}
|
||||
|
||||
func IoctlSetTermios(fd int, req uint, value *Termios) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
||||
}
|
||||
|
||||
// IoctlGetInt performs an ioctl operation which gets an integer value
|
||||
// from fd, using the specified request number.
|
||||
func IoctlGetInt(fd int, req uint) (int, error) {
|
||||
var value int
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return value, err
|
||||
}
|
||||
|
||||
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
|
||||
var value Winsize
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return &value, err
|
||||
}
|
||||
|
||||
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
||||
var value Termios
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
return &value, err
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
|
@ -222,7 +255,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
// getresuid
|
||||
// getrtable
|
||||
// getthrid
|
||||
// ioctl
|
||||
// ktrace
|
||||
// lfs_bmapv
|
||||
// lfs_markv
|
||||
|
@ -243,7 +275,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
// nfssvc
|
||||
// nnpfspioctl
|
||||
// openat
|
||||
// poll
|
||||
// preadv
|
||||
// profil
|
||||
// pwritev
|
||||
|
|
|
@ -6,21 +6,12 @@
|
|||
|
||||
package unix
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = int64(nsec / 1e9)
|
||||
ts.Nsec = int32(nsec % 1e9)
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: int32(nsec)}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
tv.Sec = int64(nsec / 1e9)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: int32(usec)}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
|
|
|
@ -6,21 +6,12 @@
|
|||
|
||||
package unix
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = nsec / 1e9
|
||||
ts.Nsec = nsec % 1e9
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = nsec % 1e9 / 1e3
|
||||
tv.Sec = nsec / 1e9
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
|
|
|
@ -6,23 +6,12 @@
|
|||
|
||||
package unix
|
||||
|
||||
import "syscall"
|
||||
|
||||
func Getpagesize() int { return syscall.Getpagesize() }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = int64(nsec / 1e9)
|
||||
ts.Nsec = int32(nsec % 1e9)
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: int32(nsec)}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = int32(nsec % 1e9 / 1e3)
|
||||
tv.Sec = int64(nsec / 1e9)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: int32(usec)}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
package unix
|
||||
|
||||
import (
|
||||
"sync/atomic"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
@ -167,7 +166,7 @@ func Getwd() (wd string, err error) {
|
|||
|
||||
func Getgroups() (gids []int, err error) {
|
||||
n, err := getgroups(0, nil)
|
||||
// Check for error and sanity check group count. Newer versions of
|
||||
// Check for error and sanity check group count. Newer versions of
|
||||
// Solaris allow up to 1024 (NGROUPS_MAX).
|
||||
if n < 0 || n > 1024 {
|
||||
if err != nil {
|
||||
|
@ -351,7 +350,7 @@ func Futimesat(dirfd int, path string, tv []Timeval) error {
|
|||
}
|
||||
|
||||
// Solaris doesn't have an futimes function because it allows NULL to be
|
||||
// specified as the path for futimesat. However, Go doesn't like
|
||||
// specified as the path for futimesat. However, Go doesn't like
|
||||
// NULL-style string interfaces, so this simple wrapper is provided.
|
||||
func Futimes(fd int, tv []Timeval) error {
|
||||
if tv == nil {
|
||||
|
@ -515,6 +514,24 @@ func Acct(path string) (err error) {
|
|||
return acct(pathp)
|
||||
}
|
||||
|
||||
//sys __makedev(version int, major uint, minor uint) (val uint64)
|
||||
|
||||
func Mkdev(major, minor uint32) uint64 {
|
||||
return __makedev(NEWDEV, uint(major), uint(minor))
|
||||
}
|
||||
|
||||
//sys __major(version int, dev uint64) (val uint)
|
||||
|
||||
func Major(dev uint64) uint32 {
|
||||
return uint32(__major(NEWDEV, dev))
|
||||
}
|
||||
|
||||
//sys __minor(version int, dev uint64) (val uint)
|
||||
|
||||
func Minor(dev uint64) uint32 {
|
||||
return uint32(__minor(NEWDEV, dev))
|
||||
}
|
||||
|
||||
/*
|
||||
* Expose the ioctl function
|
||||
*/
|
||||
|
@ -561,6 +578,15 @@ func IoctlGetTermio(fd int, req uint) (*Termio, error) {
|
|||
return &value, err
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
if len(fds) == 0 {
|
||||
return poll(nil, 0, timeout)
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
|
@ -613,6 +639,7 @@ func IoctlGetTermio(fd int, req uint) (*Termio, error) {
|
|||
//sys Mlock(b []byte) (err error)
|
||||
//sys Mlockall(flags int) (err error)
|
||||
//sys Mprotect(b []byte, prot int) (err error)
|
||||
//sys Msync(b []byte, flags int) (err error)
|
||||
//sys Munlock(b []byte) (err error)
|
||||
//sys Munlockall() (err error)
|
||||
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
||||
|
@ -699,18 +726,3 @@ func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, e
|
|||
func Munmap(b []byte) (err error) {
|
||||
return mapper.Munmap(b)
|
||||
}
|
||||
|
||||
//sys sysconf(name int) (n int64, err error)
|
||||
|
||||
// pageSize caches the value of Getpagesize, since it can't change
|
||||
// once the system is booted.
|
||||
var pageSize int64 // accessed atomically
|
||||
|
||||
func Getpagesize() int {
|
||||
n := atomic.LoadInt64(&pageSize)
|
||||
if n == 0 {
|
||||
n, _ = sysconf(_SC_PAGESIZE)
|
||||
atomic.StoreInt64(&pageSize, n)
|
||||
}
|
||||
return int(n)
|
||||
}
|
||||
|
|
|
@ -6,19 +6,12 @@
|
|||
|
||||
package unix
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = nsec / 1e9
|
||||
ts.Nsec = nsec % 1e9
|
||||
return
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func NsecToTimeval(nsec int64) (tv Timeval) {
|
||||
nsec += 999 // round up to microsecond
|
||||
tv.Usec = nsec % 1e9 / 1e3
|
||||
tv.Sec = int64(nsec / 1e9)
|
||||
return
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
func (iov *Iovec) SetLen(length int) {
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
// Copyright 2017 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.
|
||||
|
||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
|
||||
package unix
|
||||
|
||||
// TimespecToNsec converts a Timespec value into a number of
|
||||
// nanoseconds since the Unix epoch.
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
// NsecToTimespec takes a number of nanoseconds since the Unix epoch
|
||||
// and returns the corresponding Timespec value.
|
||||
func NsecToTimespec(nsec int64) Timespec {
|
||||
sec := nsec / 1e9
|
||||
nsec = nsec % 1e9
|
||||
if nsec < 0 {
|
||||
nsec += 1e9
|
||||
sec--
|
||||
}
|
||||
return setTimespec(sec, nsec)
|
||||
}
|
||||
|
||||
// TimevalToNsec converts a Timeval value into a number of nanoseconds
|
||||
// since the Unix epoch.
|
||||
func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
|
||||
|
||||
// NsecToTimeval takes a number of nanoseconds since the Unix epoch
|
||||
// and returns the corresponding Timeval value.
|
||||
func NsecToTimeval(nsec int64) Timeval {
|
||||
nsec += 999 // round up to microsecond
|
||||
usec := nsec % 1e9 / 1e3
|
||||
sec := nsec / 1e9
|
||||
if usec < 0 {
|
||||
usec += 1e6
|
||||
sec--
|
||||
}
|
||||
return setTimeval(sec, usec)
|
||||
}
|
||||
|
||||
// Unix returns ts as the number of seconds and nanoseconds elapsed since the
|
||||
// Unix epoch.
|
||||
func (ts *Timespec) Unix() (sec int64, nsec int64) {
|
||||
return int64(ts.Sec), int64(ts.Nsec)
|
||||
}
|
||||
|
||||
// Unix returns tv as the number of seconds and nanoseconds elapsed since the
|
||||
// Unix epoch.
|
||||
func (tv *Timeval) Unix() (sec int64, nsec int64) {
|
||||
return int64(tv.Sec), int64(tv.Usec) * 1000
|
||||
}
|
||||
|
||||
// Nano returns ts as the number of nanoseconds elapsed since the Unix epoch.
|
||||
func (ts *Timespec) Nano() int64 {
|
||||
return int64(ts.Sec)*1e9 + int64(ts.Nsec)
|
||||
}
|
||||
|
||||
// Nano returns tv as the number of nanoseconds elapsed since the Unix epoch.
|
||||
func (tv *Timeval) Nano() int64 {
|
||||
return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
|
||||
}
|
|
@ -0,0 +1,277 @@
|
|||
// Copyright 2009 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.
|
||||
|
||||
// +build ignore
|
||||
|
||||
/*
|
||||
Input to cgo -godefs. See README.md
|
||||
*/
|
||||
|
||||
// +godefs map struct_in_addr [4]byte /* in_addr */
|
||||
// +godefs map struct_in6_addr [16]byte /* in6_addr */
|
||||
|
||||
package unix
|
||||
|
||||
/*
|
||||
#define __DARWIN_UNIX03 0
|
||||
#define KERNEL
|
||||
#define _DARWIN_USE_64_BIT_INODE
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
#include <signal.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
#include <mach/mach.h>
|
||||
#include <mach/message.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/wait.h>
|
||||
#include <net/bpf.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <net/if_var.h>
|
||||
#include <net/route.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/icmp6.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
enum {
|
||||
sizeofPtr = sizeof(void*),
|
||||
};
|
||||
|
||||
union sockaddr_all {
|
||||
struct sockaddr s1; // this one gets used for fields
|
||||
struct sockaddr_in s2; // these pad it out
|
||||
struct sockaddr_in6 s3;
|
||||
struct sockaddr_un s4;
|
||||
struct sockaddr_dl s5;
|
||||
};
|
||||
|
||||
struct sockaddr_any {
|
||||
struct sockaddr addr;
|
||||
char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
|
||||
};
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
// Machine characteristics; for internal use.
|
||||
|
||||
const (
|
||||
sizeofPtr = C.sizeofPtr
|
||||
sizeofShort = C.sizeof_short
|
||||
sizeofInt = C.sizeof_int
|
||||
sizeofLong = C.sizeof_long
|
||||
sizeofLongLong = C.sizeof_longlong
|
||||
)
|
||||
|
||||
// Basic types
|
||||
|
||||
type (
|
||||
_C_short C.short
|
||||
_C_int C.int
|
||||
_C_long C.long
|
||||
_C_long_long C.longlong
|
||||
)
|
||||
|
||||
// Time
|
||||
|
||||
type Timespec C.struct_timespec
|
||||
|
||||
type Timeval C.struct_timeval
|
||||
|
||||
type Timeval32 C.struct_timeval32
|
||||
|
||||
// Processes
|
||||
|
||||
type Rusage C.struct_rusage
|
||||
|
||||
type Rlimit C.struct_rlimit
|
||||
|
||||
type _Gid_t C.gid_t
|
||||
|
||||
// Files
|
||||
|
||||
type Stat_t C.struct_stat64
|
||||
|
||||
type Statfs_t C.struct_statfs64
|
||||
|
||||
type Flock_t C.struct_flock
|
||||
|
||||
type Fstore_t C.struct_fstore
|
||||
|
||||
type Radvisory_t C.struct_radvisory
|
||||
|
||||
type Fbootstraptransfer_t C.struct_fbootstraptransfer
|
||||
|
||||
type Log2phys_t C.struct_log2phys
|
||||
|
||||
type Fsid C.struct_fsid
|
||||
|
||||
type Dirent C.struct_dirent
|
||||
|
||||
// Sockets
|
||||
|
||||
type RawSockaddrInet4 C.struct_sockaddr_in
|
||||
|
||||
type RawSockaddrInet6 C.struct_sockaddr_in6
|
||||
|
||||
type RawSockaddrUnix C.struct_sockaddr_un
|
||||
|
||||
type RawSockaddrDatalink C.struct_sockaddr_dl
|
||||
|
||||
type RawSockaddr C.struct_sockaddr
|
||||
|
||||
type RawSockaddrAny C.struct_sockaddr_any
|
||||
|
||||
type _Socklen C.socklen_t
|
||||
|
||||
type Linger C.struct_linger
|
||||
|
||||
type Iovec C.struct_iovec
|
||||
|
||||
type IPMreq C.struct_ip_mreq
|
||||
|
||||
type IPv6Mreq C.struct_ipv6_mreq
|
||||
|
||||
type Msghdr C.struct_msghdr
|
||||
|
||||
type Cmsghdr C.struct_cmsghdr
|
||||
|
||||
type Inet4Pktinfo C.struct_in_pktinfo
|
||||
|
||||
type Inet6Pktinfo C.struct_in6_pktinfo
|
||||
|
||||
type IPv6MTUInfo C.struct_ip6_mtuinfo
|
||||
|
||||
type ICMPv6Filter C.struct_icmp6_filter
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
|
||||
SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
|
||||
SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
|
||||
SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
|
||||
SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
|
||||
SizeofLinger = C.sizeof_struct_linger
|
||||
SizeofIPMreq = C.sizeof_struct_ip_mreq
|
||||
SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
|
||||
SizeofMsghdr = C.sizeof_struct_msghdr
|
||||
SizeofCmsghdr = C.sizeof_struct_cmsghdr
|
||||
SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo
|
||||
SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
|
||||
SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
|
||||
SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
|
||||
)
|
||||
|
||||
// Ptrace requests
|
||||
|
||||
const (
|
||||
PTRACE_TRACEME = C.PT_TRACE_ME
|
||||
PTRACE_CONT = C.PT_CONTINUE
|
||||
PTRACE_KILL = C.PT_KILL
|
||||
)
|
||||
|
||||
// Events (kqueue, kevent)
|
||||
|
||||
type Kevent_t C.struct_kevent
|
||||
|
||||
// Select
|
||||
|
||||
type FdSet C.fd_set
|
||||
|
||||
// Routing and interface messages
|
||||
|
||||
const (
|
||||
SizeofIfMsghdr = C.sizeof_struct_if_msghdr
|
||||
SizeofIfData = C.sizeof_struct_if_data
|
||||
SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
|
||||
SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
|
||||
SizeofIfmaMsghdr2 = C.sizeof_struct_ifma_msghdr2
|
||||
SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
|
||||
SizeofRtMetrics = C.sizeof_struct_rt_metrics
|
||||
)
|
||||
|
||||
type IfMsghdr C.struct_if_msghdr
|
||||
|
||||
type IfData C.struct_if_data
|
||||
|
||||
type IfaMsghdr C.struct_ifa_msghdr
|
||||
|
||||
type IfmaMsghdr C.struct_ifma_msghdr
|
||||
|
||||
type IfmaMsghdr2 C.struct_ifma_msghdr2
|
||||
|
||||
type RtMsghdr C.struct_rt_msghdr
|
||||
|
||||
type RtMetrics C.struct_rt_metrics
|
||||
|
||||
// Berkeley packet filter
|
||||
|
||||
const (
|
||||
SizeofBpfVersion = C.sizeof_struct_bpf_version
|
||||
SizeofBpfStat = C.sizeof_struct_bpf_stat
|
||||
SizeofBpfProgram = C.sizeof_struct_bpf_program
|
||||
SizeofBpfInsn = C.sizeof_struct_bpf_insn
|
||||
SizeofBpfHdr = C.sizeof_struct_bpf_hdr
|
||||
)
|
||||
|
||||
type BpfVersion C.struct_bpf_version
|
||||
|
||||
type BpfStat C.struct_bpf_stat
|
||||
|
||||
type BpfProgram C.struct_bpf_program
|
||||
|
||||
type BpfInsn C.struct_bpf_insn
|
||||
|
||||
type BpfHdr C.struct_bpf_hdr
|
||||
|
||||
// Terminal handling
|
||||
|
||||
type Termios C.struct_termios
|
||||
|
||||
type Winsize C.struct_winsize
|
||||
|
||||
// fchmodat-like syscalls.
|
||||
|
||||
const (
|
||||
AT_FDCWD = C.AT_FDCWD
|
||||
AT_REMOVEDIR = C.AT_REMOVEDIR
|
||||
AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
|
||||
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
|
||||
)
|
||||
|
||||
// poll
|
||||
|
||||
type PollFd C.struct_pollfd
|
||||
|
||||
const (
|
||||
POLLERR = C.POLLERR
|
||||
POLLHUP = C.POLLHUP
|
||||
POLLIN = C.POLLIN
|
||||
POLLNVAL = C.POLLNVAL
|
||||
POLLOUT = C.POLLOUT
|
||||
POLLPRI = C.POLLPRI
|
||||
POLLRDBAND = C.POLLRDBAND
|
||||
POLLRDNORM = C.POLLRDNORM
|
||||
POLLWRBAND = C.POLLWRBAND
|
||||
POLLWRNORM = C.POLLWRNORM
|
||||
)
|
||||
|
||||
// uname
|
||||
|
||||
type Utsname C.struct_utsname
|
|
@ -0,0 +1,269 @@
|
|||
// Copyright 2009 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.
|
||||
|
||||
// +build ignore
|
||||
|
||||
/*
|
||||
Input to cgo -godefs. See README.md
|
||||
*/
|
||||
|
||||
// +godefs map struct_in_addr [4]byte /* in_addr */
|
||||
// +godefs map struct_in6_addr [16]byte /* in6_addr */
|
||||
|
||||
package unix
|
||||
|
||||
/*
|
||||
#define KERNEL
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
#include <signal.h>
|
||||
#include <termios.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/wait.h>
|
||||
#include <net/bpf.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <net/route.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/icmp6.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
enum {
|
||||
sizeofPtr = sizeof(void*),
|
||||
};
|
||||
|
||||
union sockaddr_all {
|
||||
struct sockaddr s1; // this one gets used for fields
|
||||
struct sockaddr_in s2; // these pad it out
|
||||
struct sockaddr_in6 s3;
|
||||
struct sockaddr_un s4;
|
||||
struct sockaddr_dl s5;
|
||||
};
|
||||
|
||||
struct sockaddr_any {
|
||||
struct sockaddr addr;
|
||||
char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
|
||||
};
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
// Machine characteristics; for internal use.
|
||||
|
||||
const (
|
||||
sizeofPtr = C.sizeofPtr
|
||||
sizeofShort = C.sizeof_short
|
||||
sizeofInt = C.sizeof_int
|
||||
sizeofLong = C.sizeof_long
|
||||
sizeofLongLong = C.sizeof_longlong
|
||||
)
|
||||
|
||||
// Basic types
|
||||
|
||||
type (
|
||||
_C_short C.short
|
||||
_C_int C.int
|
||||
_C_long C.long
|
||||
_C_long_long C.longlong
|
||||
)
|
||||
|
||||
// Time
|
||||
|
||||
type Timespec C.struct_timespec
|
||||
|
||||
type Timeval C.struct_timeval
|
||||
|
||||
// Processes
|
||||
|
||||
type Rusage C.struct_rusage
|
||||
|
||||
type Rlimit C.struct_rlimit
|
||||
|
||||
type _Gid_t C.gid_t
|
||||
|
||||
// Files
|
||||
|
||||
const ( // Directory mode bits
|
||||
S_IFMT = C.S_IFMT
|
||||
S_IFIFO = C.S_IFIFO
|
||||
S_IFCHR = C.S_IFCHR
|
||||
S_IFDIR = C.S_IFDIR
|
||||
S_IFBLK = C.S_IFBLK
|
||||
S_IFREG = C.S_IFREG
|
||||
S_IFLNK = C.S_IFLNK
|
||||
S_IFSOCK = C.S_IFSOCK
|
||||
S_ISUID = C.S_ISUID
|
||||
S_ISGID = C.S_ISGID
|
||||
S_ISVTX = C.S_ISVTX
|
||||
S_IRUSR = C.S_IRUSR
|
||||
S_IWUSR = C.S_IWUSR
|
||||
S_IXUSR = C.S_IXUSR
|
||||
)
|
||||
|
||||
type Stat_t C.struct_stat
|
||||
|
||||
type Statfs_t C.struct_statfs
|
||||
|
||||
type Flock_t C.struct_flock
|
||||
|
||||
type Dirent C.struct_dirent
|
||||
|
||||
type Fsid C.struct_fsid
|
||||
|
||||
// Sockets
|
||||
|
||||
type RawSockaddrInet4 C.struct_sockaddr_in
|
||||
|
||||
type RawSockaddrInet6 C.struct_sockaddr_in6
|
||||
|
||||
type RawSockaddrUnix C.struct_sockaddr_un
|
||||
|
||||
type RawSockaddrDatalink C.struct_sockaddr_dl
|
||||
|
||||
type RawSockaddr C.struct_sockaddr
|
||||
|
||||
type RawSockaddrAny C.struct_sockaddr_any
|
||||
|
||||
type _Socklen C.socklen_t
|
||||
|
||||
type Linger C.struct_linger
|
||||
|
||||
type Iovec C.struct_iovec
|
||||
|
||||
type IPMreq C.struct_ip_mreq
|
||||
|
||||
type IPv6Mreq C.struct_ipv6_mreq
|
||||
|
||||
type Msghdr C.struct_msghdr
|
||||
|
||||
type Cmsghdr C.struct_cmsghdr
|
||||
|
||||
type Inet6Pktinfo C.struct_in6_pktinfo
|
||||
|
||||
type IPv6MTUInfo C.struct_ip6_mtuinfo
|
||||
|
||||
type ICMPv6Filter C.struct_icmp6_filter
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
|
||||
SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
|
||||
SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
|
||||
SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
|
||||
SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
|
||||
SizeofLinger = C.sizeof_struct_linger
|
||||
SizeofIPMreq = C.sizeof_struct_ip_mreq
|
||||
SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
|
||||
SizeofMsghdr = C.sizeof_struct_msghdr
|
||||
SizeofCmsghdr = C.sizeof_struct_cmsghdr
|
||||
SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
|
||||
SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
|
||||
SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
|
||||
)
|
||||
|
||||
// Ptrace requests
|
||||
|
||||
const (
|
||||
PTRACE_TRACEME = C.PT_TRACE_ME
|
||||
PTRACE_CONT = C.PT_CONTINUE
|
||||
PTRACE_KILL = C.PT_KILL
|
||||
)
|
||||
|
||||
// Events (kqueue, kevent)
|
||||
|
||||
type Kevent_t C.struct_kevent
|
||||
|
||||
// Select
|
||||
|
||||
type FdSet C.fd_set
|
||||
|
||||
// Routing and interface messages
|
||||
|
||||
const (
|
||||
SizeofIfMsghdr = C.sizeof_struct_if_msghdr
|
||||
SizeofIfData = C.sizeof_struct_if_data
|
||||
SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
|
||||
SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
|
||||
SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
|
||||
SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
|
||||
SizeofRtMetrics = C.sizeof_struct_rt_metrics
|
||||
)
|
||||
|
||||
type IfMsghdr C.struct_if_msghdr
|
||||
|
||||
type IfData C.struct_if_data
|
||||
|
||||
type IfaMsghdr C.struct_ifa_msghdr
|
||||
|
||||
type IfmaMsghdr C.struct_ifma_msghdr
|
||||
|
||||
type IfAnnounceMsghdr C.struct_if_announcemsghdr
|
||||
|
||||
type RtMsghdr C.struct_rt_msghdr
|
||||
|
||||
type RtMetrics C.struct_rt_metrics
|
||||
|
||||
// Berkeley packet filter
|
||||
|
||||
const (
|
||||
SizeofBpfVersion = C.sizeof_struct_bpf_version
|
||||
SizeofBpfStat = C.sizeof_struct_bpf_stat
|
||||
SizeofBpfProgram = C.sizeof_struct_bpf_program
|
||||
SizeofBpfInsn = C.sizeof_struct_bpf_insn
|
||||
SizeofBpfHdr = C.sizeof_struct_bpf_hdr
|
||||
)
|
||||
|
||||
type BpfVersion C.struct_bpf_version
|
||||
|
||||
type BpfStat C.struct_bpf_stat
|
||||
|
||||
type BpfProgram C.struct_bpf_program
|
||||
|
||||
type BpfInsn C.struct_bpf_insn
|
||||
|
||||
type BpfHdr C.struct_bpf_hdr
|
||||
|
||||
// Terminal handling
|
||||
|
||||
type Termios C.struct_termios
|
||||
|
||||
type Winsize C.struct_winsize
|
||||
|
||||
// fchmodat-like syscalls.
|
||||
|
||||
const (
|
||||
AT_FDCWD = C.AT_FDCWD
|
||||
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
|
||||
)
|
||||
|
||||
// poll
|
||||
|
||||
type PollFd C.struct_pollfd
|
||||
|
||||
const (
|
||||
POLLERR = C.POLLERR
|
||||
POLLHUP = C.POLLHUP
|
||||
POLLIN = C.POLLIN
|
||||
POLLNVAL = C.POLLNVAL
|
||||
POLLOUT = C.POLLOUT
|
||||
POLLPRI = C.POLLPRI
|
||||
POLLRDBAND = C.POLLRDBAND
|
||||
POLLRDNORM = C.POLLRDNORM
|
||||
POLLWRBAND = C.POLLWRBAND
|
||||
POLLWRNORM = C.POLLWRNORM
|
||||
)
|
|
@ -0,0 +1,396 @@
|
|||
// Copyright 2009 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.
|
||||
|
||||
// +build ignore
|
||||
|
||||
/*
|
||||
Input to cgo -godefs. See README.md
|
||||
*/
|
||||
|
||||
// +godefs map struct_in_addr [4]byte /* in_addr */
|
||||
// +godefs map struct_in6_addr [16]byte /* in6_addr */
|
||||
|
||||
package unix
|
||||
|
||||
/*
|
||||
#define KERNEL
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
#include <signal.h>
|
||||
#include <termios.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/capability.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/wait.h>
|
||||
#include <net/bpf.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <net/route.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/icmp6.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
enum {
|
||||
sizeofPtr = sizeof(void*),
|
||||
};
|
||||
|
||||
union sockaddr_all {
|
||||
struct sockaddr s1; // this one gets used for fields
|
||||
struct sockaddr_in s2; // these pad it out
|
||||
struct sockaddr_in6 s3;
|
||||
struct sockaddr_un s4;
|
||||
struct sockaddr_dl s5;
|
||||
};
|
||||
|
||||
struct sockaddr_any {
|
||||
struct sockaddr addr;
|
||||
char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
|
||||
};
|
||||
|
||||
// This structure is a duplicate of stat on FreeBSD 8-STABLE.
|
||||
// See /usr/include/sys/stat.h.
|
||||
struct stat8 {
|
||||
#undef st_atimespec st_atim
|
||||
#undef st_mtimespec st_mtim
|
||||
#undef st_ctimespec st_ctim
|
||||
#undef st_birthtimespec st_birthtim
|
||||
__dev_t st_dev;
|
||||
ino_t st_ino;
|
||||
mode_t st_mode;
|
||||
nlink_t st_nlink;
|
||||
uid_t st_uid;
|
||||
gid_t st_gid;
|
||||
__dev_t st_rdev;
|
||||
#if __BSD_VISIBLE
|
||||
struct timespec st_atimespec;
|
||||
struct timespec st_mtimespec;
|
||||
struct timespec st_ctimespec;
|
||||
#else
|
||||
time_t st_atime;
|
||||
long __st_atimensec;
|
||||
time_t st_mtime;
|
||||
long __st_mtimensec;
|
||||
time_t st_ctime;
|
||||
long __st_ctimensec;
|
||||
#endif
|
||||
off_t st_size;
|
||||
blkcnt_t st_blocks;
|
||||
blksize_t st_blksize;
|
||||
fflags_t st_flags;
|
||||
__uint32_t st_gen;
|
||||
__int32_t st_lspare;
|
||||
#if __BSD_VISIBLE
|
||||
struct timespec st_birthtimespec;
|
||||
unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
|
||||
unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
|
||||
#else
|
||||
time_t st_birthtime;
|
||||
long st_birthtimensec;
|
||||
unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
|
||||
unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
|
||||
#endif
|
||||
};
|
||||
|
||||
// This structure is a duplicate of if_data on FreeBSD 8-STABLE.
|
||||
// See /usr/include/net/if.h.
|
||||
struct if_data8 {
|
||||
u_char ifi_type;
|
||||
u_char ifi_physical;
|
||||
u_char ifi_addrlen;
|
||||
u_char ifi_hdrlen;
|
||||
u_char ifi_link_state;
|
||||
u_char ifi_spare_char1;
|
||||
u_char ifi_spare_char2;
|
||||
u_char ifi_datalen;
|
||||
u_long ifi_mtu;
|
||||
u_long ifi_metric;
|
||||
u_long ifi_baudrate;
|
||||
u_long ifi_ipackets;
|
||||
u_long ifi_ierrors;
|
||||
u_long ifi_opackets;
|
||||
u_long ifi_oerrors;
|
||||
u_long ifi_collisions;
|
||||
u_long ifi_ibytes;
|
||||
u_long ifi_obytes;
|
||||
u_long ifi_imcasts;
|
||||
u_long ifi_omcasts;
|
||||
u_long ifi_iqdrops;
|
||||
u_long ifi_noproto;
|
||||
u_long ifi_hwassist;
|
||||
// FIXME: these are now unions, so maybe need to change definitions?
|
||||
#undef ifi_epoch
|
||||
time_t ifi_epoch;
|
||||
#undef ifi_lastchange
|
||||
struct timeval ifi_lastchange;
|
||||
};
|
||||
|
||||
// This structure is a duplicate of if_msghdr on FreeBSD 8-STABLE.
|
||||
// See /usr/include/net/if.h.
|
||||
struct if_msghdr8 {
|
||||
u_short ifm_msglen;
|
||||
u_char ifm_version;
|
||||
u_char ifm_type;
|
||||
int ifm_addrs;
|
||||
int ifm_flags;
|
||||
u_short ifm_index;
|
||||
struct if_data8 ifm_data;
|
||||
};
|
||||
*/
|
||||
import "C"
|
||||
|
||||
// Machine characteristics; for internal use.
|
||||
|
||||
const (
|
||||
sizeofPtr = C.sizeofPtr
|
||||
sizeofShort = C.sizeof_short
|
||||
sizeofInt = C.sizeof_int
|
||||
sizeofLong = C.sizeof_long
|
||||
sizeofLongLong = C.sizeof_longlong
|
||||
)
|
||||
|
||||
// Basic types
|
||||
|
||||
type (
|
||||
_C_short C.short
|
||||
_C_int C.int
|
||||
_C_long C.long
|
||||
_C_long_long C.longlong
|
||||
)
|
||||
|
||||
// Time
|
||||
|
||||
type Timespec C.struct_timespec
|
||||
|
||||
type Timeval C.struct_timeval
|
||||
|
||||
// Processes
|
||||
|
||||
type Rusage C.struct_rusage
|
||||
|
||||
type Rlimit C.struct_rlimit
|
||||
|
||||
type _Gid_t C.gid_t
|
||||
|
||||
// Files
|
||||
|
||||
const ( // Directory mode bits
|
||||
S_IFMT = C.S_IFMT
|
||||
S_IFIFO = C.S_IFIFO
|
||||
S_IFCHR = C.S_IFCHR
|
||||
S_IFDIR = C.S_IFDIR
|
||||
S_IFBLK = C.S_IFBLK
|
||||
S_IFREG = C.S_IFREG
|
||||
S_IFLNK = C.S_IFLNK
|
||||
S_IFSOCK = C.S_IFSOCK
|
||||
S_ISUID = C.S_ISUID
|
||||
S_ISGID = C.S_ISGID
|
||||
S_ISVTX = C.S_ISVTX
|
||||
S_IRUSR = C.S_IRUSR
|
||||
S_IWUSR = C.S_IWUSR
|
||||
S_IXUSR = C.S_IXUSR
|
||||
)
|
||||
|
||||
type Stat_t C.struct_stat8
|
||||
|
||||
type Statfs_t C.struct_statfs
|
||||
|
||||
type Flock_t C.struct_flock
|
||||
|
||||
type Dirent C.struct_dirent
|
||||
|
||||
type Fsid C.struct_fsid
|
||||
|
||||
// Advice to Fadvise
|
||||
|
||||
const (
|
||||
FADV_NORMAL = C.POSIX_FADV_NORMAL
|
||||
FADV_RANDOM = C.POSIX_FADV_RANDOM
|
||||
FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL
|
||||
FADV_WILLNEED = C.POSIX_FADV_WILLNEED
|
||||
FADV_DONTNEED = C.POSIX_FADV_DONTNEED
|
||||
FADV_NOREUSE = C.POSIX_FADV_NOREUSE
|
||||
)
|
||||
|
||||
// Sockets
|
||||
|
||||
type RawSockaddrInet4 C.struct_sockaddr_in
|
||||
|
||||
type RawSockaddrInet6 C.struct_sockaddr_in6
|
||||
|
||||
type RawSockaddrUnix C.struct_sockaddr_un
|
||||
|
||||
type RawSockaddrDatalink C.struct_sockaddr_dl
|
||||
|
||||
type RawSockaddr C.struct_sockaddr
|
||||
|
||||
type RawSockaddrAny C.struct_sockaddr_any
|
||||
|
||||
type _Socklen C.socklen_t
|
||||
|
||||
type Linger C.struct_linger
|
||||
|
||||
type Iovec C.struct_iovec
|
||||
|
||||
type IPMreq C.struct_ip_mreq
|
||||
|
||||
type IPMreqn C.struct_ip_mreqn
|
||||
|
||||
type IPv6Mreq C.struct_ipv6_mreq
|
||||
|
||||
type Msghdr C.struct_msghdr
|
||||
|
||||
type Cmsghdr C.struct_cmsghdr
|
||||
|
||||
type Inet6Pktinfo C.struct_in6_pktinfo
|
||||
|
||||
type IPv6MTUInfo C.struct_ip6_mtuinfo
|
||||
|
||||
type ICMPv6Filter C.struct_icmp6_filter
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
|
||||
SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
|
||||
SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
|
||||
SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
|
||||
SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
|
||||
SizeofLinger = C.sizeof_struct_linger
|
||||
SizeofIPMreq = C.sizeof_struct_ip_mreq
|
||||
SizeofIPMreqn = C.sizeof_struct_ip_mreqn
|
||||
SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
|
||||
SizeofMsghdr = C.sizeof_struct_msghdr
|
||||
SizeofCmsghdr = C.sizeof_struct_cmsghdr
|
||||
SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
|
||||
SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
|
||||
SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
|
||||
)
|
||||
|
||||
// Ptrace requests
|
||||
|
||||
const (
|
||||
PTRACE_TRACEME = C.PT_TRACE_ME
|
||||
PTRACE_CONT = C.PT_CONTINUE
|
||||
PTRACE_KILL = C.PT_KILL
|
||||
)
|
||||
|
||||
// Events (kqueue, kevent)
|
||||
|
||||
type Kevent_t C.struct_kevent
|
||||
|
||||
// Select
|
||||
|
||||
type FdSet C.fd_set
|
||||
|
||||
// Routing and interface messages
|
||||
|
||||
const (
|
||||
sizeofIfMsghdr = C.sizeof_struct_if_msghdr
|
||||
SizeofIfMsghdr = C.sizeof_struct_if_msghdr8
|
||||
sizeofIfData = C.sizeof_struct_if_data
|
||||
SizeofIfData = C.sizeof_struct_if_data8
|
||||
SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
|
||||
SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
|
||||
SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
|
||||
SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
|
||||
SizeofRtMetrics = C.sizeof_struct_rt_metrics
|
||||
)
|
||||
|
||||
type ifMsghdr C.struct_if_msghdr
|
||||
|
||||
type IfMsghdr C.struct_if_msghdr8
|
||||
|
||||
type ifData C.struct_if_data
|
||||
|
||||
type IfData C.struct_if_data8
|
||||
|
||||
type IfaMsghdr C.struct_ifa_msghdr
|
||||
|
||||
type IfmaMsghdr C.struct_ifma_msghdr
|
||||
|
||||
type IfAnnounceMsghdr C.struct_if_announcemsghdr
|
||||
|
||||
type RtMsghdr C.struct_rt_msghdr
|
||||
|
||||
type RtMetrics C.struct_rt_metrics
|
||||
|
||||
// Berkeley packet filter
|
||||
|
||||
const (
|
||||
SizeofBpfVersion = C.sizeof_struct_bpf_version
|
||||
SizeofBpfStat = C.sizeof_struct_bpf_stat
|
||||
SizeofBpfZbuf = C.sizeof_struct_bpf_zbuf
|
||||
SizeofBpfProgram = C.sizeof_struct_bpf_program
|
||||
SizeofBpfInsn = C.sizeof_struct_bpf_insn
|
||||
SizeofBpfHdr = C.sizeof_struct_bpf_hdr
|
||||
SizeofBpfZbufHeader = C.sizeof_struct_bpf_zbuf_header
|
||||
)
|
||||
|
||||
type BpfVersion C.struct_bpf_version
|
||||
|
||||
type BpfStat C.struct_bpf_stat
|
||||
|
||||
type BpfZbuf C.struct_bpf_zbuf
|
||||
|
||||
type BpfProgram C.struct_bpf_program
|
||||
|
||||
type BpfInsn C.struct_bpf_insn
|
||||
|
||||
type BpfHdr C.struct_bpf_hdr
|
||||
|
||||
type BpfZbufHeader C.struct_bpf_zbuf_header
|
||||
|
||||
// Terminal handling
|
||||
|
||||
type Termios C.struct_termios
|
||||
|
||||
type Winsize C.struct_winsize
|
||||
|
||||
// fchmodat-like syscalls.
|
||||
|
||||
const (
|
||||
AT_FDCWD = C.AT_FDCWD
|
||||
AT_REMOVEDIR = C.AT_REMOVEDIR
|
||||
AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
|
||||
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
|
||||
)
|
||||
|
||||
// poll
|
||||
|
||||
type PollFd C.struct_pollfd
|
||||
|
||||
const (
|
||||
POLLERR = C.POLLERR
|
||||
POLLHUP = C.POLLHUP
|
||||
POLLIN = C.POLLIN
|
||||
POLLINIGNEOF = C.POLLINIGNEOF
|
||||
POLLNVAL = C.POLLNVAL
|
||||
POLLOUT = C.POLLOUT
|
||||
POLLPRI = C.POLLPRI
|
||||
POLLRDBAND = C.POLLRDBAND
|
||||
POLLRDNORM = C.POLLRDNORM
|
||||
POLLWRBAND = C.POLLWRBAND
|
||||
POLLWRNORM = C.POLLWRNORM
|
||||
)
|
||||
|
||||
// Capabilities
|
||||
|
||||
type CapRights C.struct_cap_rights
|
||||
|
||||
// Uname
|
||||
|
||||
type Utsname C.struct_utsname
|
|
@ -0,0 +1,259 @@
|
|||
// Copyright 2009 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.
|
||||
|
||||
// +build ignore
|
||||
|
||||
/*
|
||||
Input to cgo -godefs. See README.md
|
||||
*/
|
||||
|
||||
// +godefs map struct_in_addr [4]byte /* in_addr */
|
||||
// +godefs map struct_in6_addr [16]byte /* in6_addr */
|
||||
|
||||
package unix
|
||||
|
||||
/*
|
||||
#define KERNEL
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
#include <signal.h>
|
||||
#include <termios.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/wait.h>
|
||||
#include <net/bpf.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <net/route.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/icmp6.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
enum {
|
||||
sizeofPtr = sizeof(void*),
|
||||
};
|
||||
|
||||
union sockaddr_all {
|
||||
struct sockaddr s1; // this one gets used for fields
|
||||
struct sockaddr_in s2; // these pad it out
|
||||
struct sockaddr_in6 s3;
|
||||
struct sockaddr_un s4;
|
||||
struct sockaddr_dl s5;
|
||||
};
|
||||
|
||||
struct sockaddr_any {
|
||||
struct sockaddr addr;
|
||||
char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
|
||||
};
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
// Machine characteristics; for internal use.
|
||||
|
||||
const (
|
||||
sizeofPtr = C.sizeofPtr
|
||||
sizeofShort = C.sizeof_short
|
||||
sizeofInt = C.sizeof_int
|
||||
sizeofLong = C.sizeof_long
|
||||
sizeofLongLong = C.sizeof_longlong
|
||||
)
|
||||
|
||||
// Basic types
|
||||
|
||||
type (
|
||||
_C_short C.short
|
||||
_C_int C.int
|
||||
_C_long C.long
|
||||
_C_long_long C.longlong
|
||||
)
|
||||
|
||||
// Time
|
||||
|
||||
type Timespec C.struct_timespec
|
||||
|
||||
type Timeval C.struct_timeval
|
||||
|
||||
// Processes
|
||||
|
||||
type Rusage C.struct_rusage
|
||||
|
||||
type Rlimit C.struct_rlimit
|
||||
|
||||
type _Gid_t C.gid_t
|
||||
|
||||
// Files
|
||||
|
||||
type Stat_t C.struct_stat
|
||||
|
||||
type Statfs_t C.struct_statfs
|
||||
|
||||
type Flock_t C.struct_flock
|
||||
|
||||
type Dirent C.struct_dirent
|
||||
|
||||
type Fsid C.fsid_t
|
||||
|
||||
// Sockets
|
||||
|
||||
type RawSockaddrInet4 C.struct_sockaddr_in
|
||||
|
||||
type RawSockaddrInet6 C.struct_sockaddr_in6
|
||||
|
||||
type RawSockaddrUnix C.struct_sockaddr_un
|
||||
|
||||
type RawSockaddrDatalink C.struct_sockaddr_dl
|
||||
|
||||
type RawSockaddr C.struct_sockaddr
|
||||
|
||||
type RawSockaddrAny C.struct_sockaddr_any
|
||||
|
||||
type _Socklen C.socklen_t
|
||||
|
||||
type Linger C.struct_linger
|
||||
|
||||
type Iovec C.struct_iovec
|
||||
|
||||
type IPMreq C.struct_ip_mreq
|
||||
|
||||
type IPv6Mreq C.struct_ipv6_mreq
|
||||
|
||||
type Msghdr C.struct_msghdr
|
||||
|
||||
type Cmsghdr C.struct_cmsghdr
|
||||
|
||||
type Inet6Pktinfo C.struct_in6_pktinfo
|
||||
|
||||
type IPv6MTUInfo C.struct_ip6_mtuinfo
|
||||
|
||||
type ICMPv6Filter C.struct_icmp6_filter
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
|
||||
SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
|
||||
SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
|
||||
SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
|
||||
SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
|
||||
SizeofLinger = C.sizeof_struct_linger
|
||||
SizeofIPMreq = C.sizeof_struct_ip_mreq
|
||||
SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
|
||||
SizeofMsghdr = C.sizeof_struct_msghdr
|
||||
SizeofCmsghdr = C.sizeof_struct_cmsghdr
|
||||
SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
|
||||
SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
|
||||
SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
|
||||
)
|
||||
|
||||
// Ptrace requests
|
||||
|
||||
const (
|
||||
PTRACE_TRACEME = C.PT_TRACE_ME
|
||||
PTRACE_CONT = C.PT_CONTINUE
|
||||
PTRACE_KILL = C.PT_KILL
|
||||
)
|
||||
|
||||
// Events (kqueue, kevent)
|
||||
|
||||
type Kevent_t C.struct_kevent
|
||||
|
||||
// Select
|
||||
|
||||
type FdSet C.fd_set
|
||||
|
||||
// Routing and interface messages
|
||||
|
||||
const (
|
||||
SizeofIfMsghdr = C.sizeof_struct_if_msghdr
|
||||
SizeofIfData = C.sizeof_struct_if_data
|
||||
SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
|
||||
SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
|
||||
SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
|
||||
SizeofRtMetrics = C.sizeof_struct_rt_metrics
|
||||
)
|
||||
|
||||
type IfMsghdr C.struct_if_msghdr
|
||||
|
||||
type IfData C.struct_if_data
|
||||
|
||||
type IfaMsghdr C.struct_ifa_msghdr
|
||||
|
||||
type IfAnnounceMsghdr C.struct_if_announcemsghdr
|
||||
|
||||
type RtMsghdr C.struct_rt_msghdr
|
||||
|
||||
type RtMetrics C.struct_rt_metrics
|
||||
|
||||
type Mclpool C.struct_mclpool
|
||||
|
||||
// Berkeley packet filter
|
||||
|
||||
const (
|
||||
SizeofBpfVersion = C.sizeof_struct_bpf_version
|
||||
SizeofBpfStat = C.sizeof_struct_bpf_stat
|
||||
SizeofBpfProgram = C.sizeof_struct_bpf_program
|
||||
SizeofBpfInsn = C.sizeof_struct_bpf_insn
|
||||
SizeofBpfHdr = C.sizeof_struct_bpf_hdr
|
||||
)
|
||||
|
||||
type BpfVersion C.struct_bpf_version
|
||||
|
||||
type BpfStat C.struct_bpf_stat
|
||||
|
||||
type BpfProgram C.struct_bpf_program
|
||||
|
||||
type BpfInsn C.struct_bpf_insn
|
||||
|
||||
type BpfHdr C.struct_bpf_hdr
|
||||
|
||||
type BpfTimeval C.struct_bpf_timeval
|
||||
|
||||
// Terminal handling
|
||||
|
||||
type Termios C.struct_termios
|
||||
|
||||
type Winsize C.struct_winsize
|
||||
|
||||
// fchmodat-like syscalls.
|
||||
|
||||
const (
|
||||
AT_FDCWD = C.AT_FDCWD
|
||||
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
|
||||
)
|
||||
|
||||
// poll
|
||||
|
||||
type PollFd C.struct_pollfd
|
||||
|
||||
const (
|
||||
POLLERR = C.POLLERR
|
||||
POLLHUP = C.POLLHUP
|
||||
POLLIN = C.POLLIN
|
||||
POLLNVAL = C.POLLNVAL
|
||||
POLLOUT = C.POLLOUT
|
||||
POLLPRI = C.POLLPRI
|
||||
POLLRDBAND = C.POLLRDBAND
|
||||
POLLRDNORM = C.POLLRDNORM
|
||||
POLLWRBAND = C.POLLWRBAND
|
||||
POLLWRNORM = C.POLLWRNORM
|
||||
)
|
||||
|
||||
// Sysctl
|
||||
|
||||
type Sysctlnode C.struct_sysctlnode
|
|
@ -0,0 +1,271 @@
|
|||
// Copyright 2009 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.
|
||||
|
||||
// +build ignore
|
||||
|
||||
/*
|
||||
Input to cgo -godefs. See README.md
|
||||
*/
|
||||
|
||||
// +godefs map struct_in_addr [4]byte /* in_addr */
|
||||
// +godefs map struct_in6_addr [16]byte /* in6_addr */
|
||||
|
||||
package unix
|
||||
|
||||
/*
|
||||
#define KERNEL
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
#include <signal.h>
|
||||
#include <termios.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/wait.h>
|
||||
#include <net/bpf.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <net/route.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/icmp6.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
enum {
|
||||
sizeofPtr = sizeof(void*),
|
||||
};
|
||||
|
||||
union sockaddr_all {
|
||||
struct sockaddr s1; // this one gets used for fields
|
||||
struct sockaddr_in s2; // these pad it out
|
||||
struct sockaddr_in6 s3;
|
||||
struct sockaddr_un s4;
|
||||
struct sockaddr_dl s5;
|
||||
};
|
||||
|
||||
struct sockaddr_any {
|
||||
struct sockaddr addr;
|
||||
char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
|
||||
};
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
// Machine characteristics; for internal use.
|
||||
|
||||
const (
|
||||
sizeofPtr = C.sizeofPtr
|
||||
sizeofShort = C.sizeof_short
|
||||
sizeofInt = C.sizeof_int
|
||||
sizeofLong = C.sizeof_long
|
||||
sizeofLongLong = C.sizeof_longlong
|
||||
)
|
||||
|
||||
// Basic types
|
||||
|
||||
type (
|
||||
_C_short C.short
|
||||
_C_int C.int
|
||||
_C_long C.long
|
||||
_C_long_long C.longlong
|
||||
)
|
||||
|
||||
// Time
|
||||
|
||||
type Timespec C.struct_timespec
|
||||
|
||||
type Timeval C.struct_timeval
|
||||
|
||||
// Processes
|
||||
|
||||
type Rusage C.struct_rusage
|
||||
|
||||
type Rlimit C.struct_rlimit
|
||||
|
||||
type _Gid_t C.gid_t
|
||||
|
||||
// Files
|
||||
|
||||
const ( // Directory mode bits
|
||||
S_IFMT = C.S_IFMT
|
||||
S_IFIFO = C.S_IFIFO
|
||||
S_IFCHR = C.S_IFCHR
|
||||
S_IFDIR = C.S_IFDIR
|
||||
S_IFBLK = C.S_IFBLK
|
||||
S_IFREG = C.S_IFREG
|
||||
S_IFLNK = C.S_IFLNK
|
||||
S_IFSOCK = C.S_IFSOCK
|
||||
S_ISUID = C.S_ISUID
|
||||
S_ISGID = C.S_ISGID
|
||||
S_ISVTX = C.S_ISVTX
|
||||
S_IRUSR = C.S_IRUSR
|
||||
S_IWUSR = C.S_IWUSR
|
||||
S_IXUSR = C.S_IXUSR
|
||||
)
|
||||
|
||||
type Stat_t C.struct_stat
|
||||
|
||||
type Statfs_t C.struct_statfs
|
||||
|
||||
type Flock_t C.struct_flock
|
||||
|
||||
type Dirent C.struct_dirent
|
||||
|
||||
type Fsid C.fsid_t
|
||||
|
||||
// Sockets
|
||||
|
||||
type RawSockaddrInet4 C.struct_sockaddr_in
|
||||
|
||||
type RawSockaddrInet6 C.struct_sockaddr_in6
|
||||
|
||||
type RawSockaddrUnix C.struct_sockaddr_un
|
||||
|
||||
type RawSockaddrDatalink C.struct_sockaddr_dl
|
||||
|
||||
type RawSockaddr C.struct_sockaddr
|
||||
|
||||
type RawSockaddrAny C.struct_sockaddr_any
|
||||
|
||||
type _Socklen C.socklen_t
|
||||
|
||||
type Linger C.struct_linger
|
||||
|
||||
type Iovec C.struct_iovec
|
||||
|
||||
type IPMreq C.struct_ip_mreq
|
||||
|
||||
type IPv6Mreq C.struct_ipv6_mreq
|
||||
|
||||
type Msghdr C.struct_msghdr
|
||||
|
||||
type Cmsghdr C.struct_cmsghdr
|
||||
|
||||
type Inet6Pktinfo C.struct_in6_pktinfo
|
||||
|
||||
type IPv6MTUInfo C.struct_ip6_mtuinfo
|
||||
|
||||
type ICMPv6Filter C.struct_icmp6_filter
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
|
||||
SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
|
||||
SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
|
||||
SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
|
||||
SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
|
||||
SizeofLinger = C.sizeof_struct_linger
|
||||
SizeofIPMreq = C.sizeof_struct_ip_mreq
|
||||
SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
|
||||
SizeofMsghdr = C.sizeof_struct_msghdr
|
||||
SizeofCmsghdr = C.sizeof_struct_cmsghdr
|
||||
SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
|
||||
SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
|
||||
SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
|
||||
)
|
||||
|
||||
// Ptrace requests
|
||||
|
||||
const (
|
||||
PTRACE_TRACEME = C.PT_TRACE_ME
|
||||
PTRACE_CONT = C.PT_CONTINUE
|
||||
PTRACE_KILL = C.PT_KILL
|
||||
)
|
||||
|
||||
// Events (kqueue, kevent)
|
||||
|
||||
type Kevent_t C.struct_kevent
|
||||
|
||||
// Select
|
||||
|
||||
type FdSet C.fd_set
|
||||
|
||||
// Routing and interface messages
|
||||
|
||||
const (
|
||||
SizeofIfMsghdr = C.sizeof_struct_if_msghdr
|
||||
SizeofIfData = C.sizeof_struct_if_data
|
||||
SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
|
||||
SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
|
||||
SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
|
||||
SizeofRtMetrics = C.sizeof_struct_rt_metrics
|
||||
)
|
||||
|
||||
type IfMsghdr C.struct_if_msghdr
|
||||
|
||||
type IfData C.struct_if_data
|
||||
|
||||
type IfaMsghdr C.struct_ifa_msghdr
|
||||
|
||||
type IfAnnounceMsghdr C.struct_if_announcemsghdr
|
||||
|
||||
type RtMsghdr C.struct_rt_msghdr
|
||||
|
||||
type RtMetrics C.struct_rt_metrics
|
||||
|
||||
type Mclpool C.struct_mclpool
|
||||
|
||||
// Berkeley packet filter
|
||||
|
||||
const (
|
||||
SizeofBpfVersion = C.sizeof_struct_bpf_version
|
||||
SizeofBpfStat = C.sizeof_struct_bpf_stat
|
||||
SizeofBpfProgram = C.sizeof_struct_bpf_program
|
||||
SizeofBpfInsn = C.sizeof_struct_bpf_insn
|
||||
SizeofBpfHdr = C.sizeof_struct_bpf_hdr
|
||||
)
|
||||
|
||||
type BpfVersion C.struct_bpf_version
|
||||
|
||||
type BpfStat C.struct_bpf_stat
|
||||
|
||||
type BpfProgram C.struct_bpf_program
|
||||
|
||||
type BpfInsn C.struct_bpf_insn
|
||||
|
||||
type BpfHdr C.struct_bpf_hdr
|
||||
|
||||
type BpfTimeval C.struct_bpf_timeval
|
||||
|
||||
// Terminal handling
|
||||
|
||||
type Termios C.struct_termios
|
||||
|
||||
type Winsize C.struct_winsize
|
||||
|
||||
// fchmodat-like syscalls.
|
||||
|
||||
const (
|
||||
AT_FDCWD = C.AT_FDCWD
|
||||
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
|
||||
)
|
||||
|
||||
// poll
|
||||
|
||||
type PollFd C.struct_pollfd
|
||||
|
||||
const (
|
||||
POLLERR = C.POLLERR
|
||||
POLLHUP = C.POLLHUP
|
||||
POLLIN = C.POLLIN
|
||||
POLLNVAL = C.POLLNVAL
|
||||
POLLOUT = C.POLLOUT
|
||||
POLLPRI = C.POLLPRI
|
||||
POLLRDBAND = C.POLLRDBAND
|
||||
POLLRDNORM = C.POLLRDNORM
|
||||
POLLWRBAND = C.POLLWRBAND
|
||||
POLLWRNORM = C.POLLWRNORM
|
||||
)
|
|
@ -0,0 +1,283 @@
|
|||
// Copyright 2009 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.
|
||||
|
||||
// +build ignore
|
||||
|
||||
/*
|
||||
Input to cgo -godefs. See README.md
|
||||
*/
|
||||
|
||||
// +godefs map struct_in_addr [4]byte /* in_addr */
|
||||
// +godefs map struct_in6_addr [16]byte /* in6_addr */
|
||||
|
||||
package unix
|
||||
|
||||
/*
|
||||
#define KERNEL
|
||||
// These defines ensure that builds done on newer versions of Solaris are
|
||||
// backwards-compatible with older versions of Solaris and
|
||||
// OpenSolaris-based derivatives.
|
||||
#define __USE_SUNOS_SOCKETS__ // msghdr
|
||||
#define __USE_LEGACY_PROTOTYPES__ // iovec
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <limits.h>
|
||||
#include <poll.h>
|
||||
#include <signal.h>
|
||||
#include <termios.h>
|
||||
#include <termio.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/times.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/wait.h>
|
||||
#include <net/bpf.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <net/route.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/icmp6.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <ustat.h>
|
||||
#include <utime.h>
|
||||
|
||||
enum {
|
||||
sizeofPtr = sizeof(void*),
|
||||
};
|
||||
|
||||
union sockaddr_all {
|
||||
struct sockaddr s1; // this one gets used for fields
|
||||
struct sockaddr_in s2; // these pad it out
|
||||
struct sockaddr_in6 s3;
|
||||
struct sockaddr_un s4;
|
||||
struct sockaddr_dl s5;
|
||||
};
|
||||
|
||||
struct sockaddr_any {
|
||||
struct sockaddr addr;
|
||||
char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
|
||||
};
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
// Machine characteristics; for internal use.
|
||||
|
||||
const (
|
||||
sizeofPtr = C.sizeofPtr
|
||||
sizeofShort = C.sizeof_short
|
||||
sizeofInt = C.sizeof_int
|
||||
sizeofLong = C.sizeof_long
|
||||
sizeofLongLong = C.sizeof_longlong
|
||||
PathMax = C.PATH_MAX
|
||||
MaxHostNameLen = C.MAXHOSTNAMELEN
|
||||
)
|
||||
|
||||
// Basic types
|
||||
|
||||
type (
|
||||
_C_short C.short
|
||||
_C_int C.int
|
||||
_C_long C.long
|
||||
_C_long_long C.longlong
|
||||
)
|
||||
|
||||
// Time
|
||||
|
||||
type Timespec C.struct_timespec
|
||||
|
||||
type Timeval C.struct_timeval
|
||||
|
||||
type Timeval32 C.struct_timeval32
|
||||
|
||||
type Tms C.struct_tms
|
||||
|
||||
type Utimbuf C.struct_utimbuf
|
||||
|
||||
// Processes
|
||||
|
||||
type Rusage C.struct_rusage
|
||||
|
||||
type Rlimit C.struct_rlimit
|
||||
|
||||
type _Gid_t C.gid_t
|
||||
|
||||
// Files
|
||||
|
||||
const ( // Directory mode bits
|
||||
S_IFMT = C.S_IFMT
|
||||
S_IFIFO = C.S_IFIFO
|
||||
S_IFCHR = C.S_IFCHR
|
||||
S_IFDIR = C.S_IFDIR
|
||||
S_IFBLK = C.S_IFBLK
|
||||
S_IFREG = C.S_IFREG
|
||||
S_IFLNK = C.S_IFLNK
|
||||
S_IFSOCK = C.S_IFSOCK
|
||||
S_ISUID = C.S_ISUID
|
||||
S_ISGID = C.S_ISGID
|
||||
S_ISVTX = C.S_ISVTX
|
||||
S_IRUSR = C.S_IRUSR
|
||||
S_IWUSR = C.S_IWUSR
|
||||
S_IXUSR = C.S_IXUSR
|
||||
)
|
||||
|
||||
type Stat_t C.struct_stat
|
||||
|
||||
type Flock_t C.struct_flock
|
||||
|
||||
type Dirent C.struct_dirent
|
||||
|
||||
// Filesystems
|
||||
|
||||
type _Fsblkcnt_t C.fsblkcnt_t
|
||||
|
||||
type Statvfs_t C.struct_statvfs
|
||||
|
||||
// Sockets
|
||||
|
||||
type RawSockaddrInet4 C.struct_sockaddr_in
|
||||
|
||||
type RawSockaddrInet6 C.struct_sockaddr_in6
|
||||
|
||||
type RawSockaddrUnix C.struct_sockaddr_un
|
||||
|
||||
type RawSockaddrDatalink C.struct_sockaddr_dl
|
||||
|
||||
type RawSockaddr C.struct_sockaddr
|
||||
|
||||
type RawSockaddrAny C.struct_sockaddr_any
|
||||
|
||||
type _Socklen C.socklen_t
|
||||
|
||||
type Linger C.struct_linger
|
||||
|
||||
type Iovec C.struct_iovec
|
||||
|
||||
type IPMreq C.struct_ip_mreq
|
||||
|
||||
type IPv6Mreq C.struct_ipv6_mreq
|
||||
|
||||
type Msghdr C.struct_msghdr
|
||||
|
||||
type Cmsghdr C.struct_cmsghdr
|
||||
|
||||
type Inet6Pktinfo C.struct_in6_pktinfo
|
||||
|
||||
type IPv6MTUInfo C.struct_ip6_mtuinfo
|
||||
|
||||
type ICMPv6Filter C.struct_icmp6_filter
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
|
||||
SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
|
||||
SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
|
||||
SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
|
||||
SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
|
||||
SizeofLinger = C.sizeof_struct_linger
|
||||
SizeofIPMreq = C.sizeof_struct_ip_mreq
|
||||
SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
|
||||
SizeofMsghdr = C.sizeof_struct_msghdr
|
||||
SizeofCmsghdr = C.sizeof_struct_cmsghdr
|
||||
SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
|
||||
SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
|
||||
SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
|
||||
)
|
||||
|
||||
// Select
|
||||
|
||||
type FdSet C.fd_set
|
||||
|
||||
// Misc
|
||||
|
||||
type Utsname C.struct_utsname
|
||||
|
||||
type Ustat_t C.struct_ustat
|
||||
|
||||
const (
|
||||
AT_FDCWD = C.AT_FDCWD
|
||||
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
|
||||
AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
|
||||
AT_REMOVEDIR = C.AT_REMOVEDIR
|
||||
AT_EACCESS = C.AT_EACCESS
|
||||
)
|
||||
|
||||
// Routing and interface messages
|
||||
|
||||
const (
|
||||
SizeofIfMsghdr = C.sizeof_struct_if_msghdr
|
||||
SizeofIfData = C.sizeof_struct_if_data
|
||||
SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
|
||||
SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
|
||||
SizeofRtMetrics = C.sizeof_struct_rt_metrics
|
||||
)
|
||||
|
||||
type IfMsghdr C.struct_if_msghdr
|
||||
|
||||
type IfData C.struct_if_data
|
||||
|
||||
type IfaMsghdr C.struct_ifa_msghdr
|
||||
|
||||
type RtMsghdr C.struct_rt_msghdr
|
||||
|
||||
type RtMetrics C.struct_rt_metrics
|
||||
|
||||
// Berkeley packet filter
|
||||
|
||||
const (
|
||||
SizeofBpfVersion = C.sizeof_struct_bpf_version
|
||||
SizeofBpfStat = C.sizeof_struct_bpf_stat
|
||||
SizeofBpfProgram = C.sizeof_struct_bpf_program
|
||||
SizeofBpfInsn = C.sizeof_struct_bpf_insn
|
||||
SizeofBpfHdr = C.sizeof_struct_bpf_hdr
|
||||
)
|
||||
|
||||
type BpfVersion C.struct_bpf_version
|
||||
|
||||
type BpfStat C.struct_bpf_stat
|
||||
|
||||
type BpfProgram C.struct_bpf_program
|
||||
|
||||
type BpfInsn C.struct_bpf_insn
|
||||
|
||||
type BpfTimeval C.struct_bpf_timeval
|
||||
|
||||
type BpfHdr C.struct_bpf_hdr
|
||||
|
||||
// Terminal handling
|
||||
|
||||
type Termios C.struct_termios
|
||||
|
||||
type Termio C.struct_termio
|
||||
|
||||
type Winsize C.struct_winsize
|
||||
|
||||
// poll
|
||||
|
||||
type PollFd C.struct_pollfd
|
||||
|
||||
const (
|
||||
POLLERR = C.POLLERR
|
||||
POLLHUP = C.POLLHUP
|
||||
POLLIN = C.POLLIN
|
||||
POLLNVAL = C.POLLNVAL
|
||||
POLLOUT = C.POLLOUT
|
||||
POLLPRI = C.POLLPRI
|
||||
POLLRDBAND = C.POLLRDBAND
|
||||
POLLRDNORM = C.POLLRDNORM
|
||||
POLLWRBAND = C.POLLWRBAND
|
||||
POLLWRNORM = C.POLLWRNORM
|
||||
)
|
|
@ -49,6 +49,86 @@ const (
|
|||
AF_UNSPEC = 0x0
|
||||
AF_UTUN = 0x26
|
||||
ALTWERASE = 0x200
|
||||
ATTR_BIT_MAP_COUNT = 0x5
|
||||
ATTR_CMN_ACCESSMASK = 0x20000
|
||||
ATTR_CMN_ACCTIME = 0x1000
|
||||
ATTR_CMN_ADDEDTIME = 0x10000000
|
||||
ATTR_CMN_BKUPTIME = 0x2000
|
||||
ATTR_CMN_CHGTIME = 0x800
|
||||
ATTR_CMN_CRTIME = 0x200
|
||||
ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
|
||||
ATTR_CMN_DEVID = 0x2
|
||||
ATTR_CMN_DOCUMENT_ID = 0x100000
|
||||
ATTR_CMN_ERROR = 0x20000000
|
||||
ATTR_CMN_EXTENDED_SECURITY = 0x400000
|
||||
ATTR_CMN_FILEID = 0x2000000
|
||||
ATTR_CMN_FLAGS = 0x40000
|
||||
ATTR_CMN_FNDRINFO = 0x4000
|
||||
ATTR_CMN_FSID = 0x4
|
||||
ATTR_CMN_FULLPATH = 0x8000000
|
||||
ATTR_CMN_GEN_COUNT = 0x80000
|
||||
ATTR_CMN_GRPID = 0x10000
|
||||
ATTR_CMN_GRPUUID = 0x1000000
|
||||
ATTR_CMN_MODTIME = 0x400
|
||||
ATTR_CMN_NAME = 0x1
|
||||
ATTR_CMN_NAMEDATTRCOUNT = 0x80000
|
||||
ATTR_CMN_NAMEDATTRLIST = 0x100000
|
||||
ATTR_CMN_OBJID = 0x20
|
||||
ATTR_CMN_OBJPERMANENTID = 0x40
|
||||
ATTR_CMN_OBJTAG = 0x10
|
||||
ATTR_CMN_OBJTYPE = 0x8
|
||||
ATTR_CMN_OWNERID = 0x8000
|
||||
ATTR_CMN_PARENTID = 0x4000000
|
||||
ATTR_CMN_PAROBJID = 0x80
|
||||
ATTR_CMN_RETURNED_ATTRS = 0x80000000
|
||||
ATTR_CMN_SCRIPT = 0x100
|
||||
ATTR_CMN_SETMASK = 0x41c7ff00
|
||||
ATTR_CMN_USERACCESS = 0x200000
|
||||
ATTR_CMN_UUID = 0x800000
|
||||
ATTR_CMN_VALIDMASK = 0xffffffff
|
||||
ATTR_CMN_VOLSETMASK = 0x6700
|
||||
ATTR_FILE_ALLOCSIZE = 0x4
|
||||
ATTR_FILE_CLUMPSIZE = 0x10
|
||||
ATTR_FILE_DATAALLOCSIZE = 0x400
|
||||
ATTR_FILE_DATAEXTENTS = 0x800
|
||||
ATTR_FILE_DATALENGTH = 0x200
|
||||
ATTR_FILE_DEVTYPE = 0x20
|
||||
ATTR_FILE_FILETYPE = 0x40
|
||||
ATTR_FILE_FORKCOUNT = 0x80
|
||||
ATTR_FILE_FORKLIST = 0x100
|
||||
ATTR_FILE_IOBLOCKSIZE = 0x8
|
||||
ATTR_FILE_LINKCOUNT = 0x1
|
||||
ATTR_FILE_RSRCALLOCSIZE = 0x2000
|
||||
ATTR_FILE_RSRCEXTENTS = 0x4000
|
||||
ATTR_FILE_RSRCLENGTH = 0x1000
|
||||
ATTR_FILE_SETMASK = 0x20
|
||||
ATTR_FILE_TOTALSIZE = 0x2
|
||||
ATTR_FILE_VALIDMASK = 0x37ff
|
||||
ATTR_VOL_ALLOCATIONCLUMP = 0x40
|
||||
ATTR_VOL_ATTRIBUTES = 0x40000000
|
||||
ATTR_VOL_CAPABILITIES = 0x20000
|
||||
ATTR_VOL_DIRCOUNT = 0x400
|
||||
ATTR_VOL_ENCODINGSUSED = 0x10000
|
||||
ATTR_VOL_FILECOUNT = 0x200
|
||||
ATTR_VOL_FSTYPE = 0x1
|
||||
ATTR_VOL_INFO = 0x80000000
|
||||
ATTR_VOL_IOBLOCKSIZE = 0x80
|
||||
ATTR_VOL_MAXOBJCOUNT = 0x800
|
||||
ATTR_VOL_MINALLOCATION = 0x20
|
||||
ATTR_VOL_MOUNTEDDEVICE = 0x8000
|
||||
ATTR_VOL_MOUNTFLAGS = 0x4000
|
||||
ATTR_VOL_MOUNTPOINT = 0x1000
|
||||
ATTR_VOL_NAME = 0x2000
|
||||
ATTR_VOL_OBJCOUNT = 0x100
|
||||
ATTR_VOL_QUOTA_SIZE = 0x10000000
|
||||
ATTR_VOL_RESERVED_SIZE = 0x20000000
|
||||
ATTR_VOL_SETMASK = 0x80002000
|
||||
ATTR_VOL_SIGNATURE = 0x2
|
||||
ATTR_VOL_SIZE = 0x4
|
||||
ATTR_VOL_SPACEAVAIL = 0x10
|
||||
ATTR_VOL_SPACEFREE = 0x8
|
||||
ATTR_VOL_UUID = 0x40000
|
||||
ATTR_VOL_VALIDMASK = 0xf007ffff
|
||||
B0 = 0x0
|
||||
B110 = 0x6e
|
||||
B115200 = 0x1c200
|
||||
|
@ -169,6 +249,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
|
@ -390,6 +472,11 @@ const (
|
|||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
FSOPT_ATTR_CMN_EXTENDED = 0x20
|
||||
FSOPT_NOFOLLOW = 0x1
|
||||
FSOPT_NOINMEMUPDATE = 0x2
|
||||
FSOPT_PACK_INVAL_ATTRS = 0x8
|
||||
FSOPT_REPORT_FULLSIZE = 0x4
|
||||
F_ADDFILESIGS = 0x3d
|
||||
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
|
||||
F_ADDFILESIGS_RETURN = 0x61
|
||||
|
@ -425,6 +512,7 @@ const (
|
|||
F_PATHPKG_CHECK = 0x34
|
||||
F_PEOFPOSMODE = 0x3
|
||||
F_PREALLOCATE = 0x2a
|
||||
F_PUNCHHOLE = 0x63
|
||||
F_RDADVISE = 0x2c
|
||||
F_RDAHEAD = 0x2d
|
||||
F_RDLCK = 0x1
|
||||
|
@ -441,10 +529,12 @@ const (
|
|||
F_SINGLE_WRITER = 0x4c
|
||||
F_THAW_FS = 0x36
|
||||
F_TRANSCODEKEY = 0x4b
|
||||
F_TRIM_ACTIVE_FILE = 0x64
|
||||
F_UNLCK = 0x2
|
||||
F_VOLPOSMODE = 0x4
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -681,6 +771,7 @@ const (
|
|||
IPV6_FAITH = 0x1d
|
||||
IPV6_FLOWINFO_MASK = 0xffffff0f
|
||||
IPV6_FLOWLABEL_MASK = 0xffff0f00
|
||||
IPV6_FLOW_ECN_MASK = 0x300
|
||||
IPV6_FRAGTTL = 0x3c
|
||||
IPV6_FW_ADD = 0x1e
|
||||
IPV6_FW_DEL = 0x1f
|
||||
|
@ -771,6 +862,7 @@ const (
|
|||
IP_RECVOPTS = 0x5
|
||||
IP_RECVPKTINFO = 0x1a
|
||||
IP_RECVRETOPTS = 0x6
|
||||
IP_RECVTOS = 0x1b
|
||||
IP_RECVTTL = 0x18
|
||||
IP_RETOPTS = 0x8
|
||||
IP_RF = 0x8000
|
||||
|
@ -789,6 +881,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
|
|
@ -49,6 +49,86 @@ const (
|
|||
AF_UNSPEC = 0x0
|
||||
AF_UTUN = 0x26
|
||||
ALTWERASE = 0x200
|
||||
ATTR_BIT_MAP_COUNT = 0x5
|
||||
ATTR_CMN_ACCESSMASK = 0x20000
|
||||
ATTR_CMN_ACCTIME = 0x1000
|
||||
ATTR_CMN_ADDEDTIME = 0x10000000
|
||||
ATTR_CMN_BKUPTIME = 0x2000
|
||||
ATTR_CMN_CHGTIME = 0x800
|
||||
ATTR_CMN_CRTIME = 0x200
|
||||
ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
|
||||
ATTR_CMN_DEVID = 0x2
|
||||
ATTR_CMN_DOCUMENT_ID = 0x100000
|
||||
ATTR_CMN_ERROR = 0x20000000
|
||||
ATTR_CMN_EXTENDED_SECURITY = 0x400000
|
||||
ATTR_CMN_FILEID = 0x2000000
|
||||
ATTR_CMN_FLAGS = 0x40000
|
||||
ATTR_CMN_FNDRINFO = 0x4000
|
||||
ATTR_CMN_FSID = 0x4
|
||||
ATTR_CMN_FULLPATH = 0x8000000
|
||||
ATTR_CMN_GEN_COUNT = 0x80000
|
||||
ATTR_CMN_GRPID = 0x10000
|
||||
ATTR_CMN_GRPUUID = 0x1000000
|
||||
ATTR_CMN_MODTIME = 0x400
|
||||
ATTR_CMN_NAME = 0x1
|
||||
ATTR_CMN_NAMEDATTRCOUNT = 0x80000
|
||||
ATTR_CMN_NAMEDATTRLIST = 0x100000
|
||||
ATTR_CMN_OBJID = 0x20
|
||||
ATTR_CMN_OBJPERMANENTID = 0x40
|
||||
ATTR_CMN_OBJTAG = 0x10
|
||||
ATTR_CMN_OBJTYPE = 0x8
|
||||
ATTR_CMN_OWNERID = 0x8000
|
||||
ATTR_CMN_PARENTID = 0x4000000
|
||||
ATTR_CMN_PAROBJID = 0x80
|
||||
ATTR_CMN_RETURNED_ATTRS = 0x80000000
|
||||
ATTR_CMN_SCRIPT = 0x100
|
||||
ATTR_CMN_SETMASK = 0x41c7ff00
|
||||
ATTR_CMN_USERACCESS = 0x200000
|
||||
ATTR_CMN_UUID = 0x800000
|
||||
ATTR_CMN_VALIDMASK = 0xffffffff
|
||||
ATTR_CMN_VOLSETMASK = 0x6700
|
||||
ATTR_FILE_ALLOCSIZE = 0x4
|
||||
ATTR_FILE_CLUMPSIZE = 0x10
|
||||
ATTR_FILE_DATAALLOCSIZE = 0x400
|
||||
ATTR_FILE_DATAEXTENTS = 0x800
|
||||
ATTR_FILE_DATALENGTH = 0x200
|
||||
ATTR_FILE_DEVTYPE = 0x20
|
||||
ATTR_FILE_FILETYPE = 0x40
|
||||
ATTR_FILE_FORKCOUNT = 0x80
|
||||
ATTR_FILE_FORKLIST = 0x100
|
||||
ATTR_FILE_IOBLOCKSIZE = 0x8
|
||||
ATTR_FILE_LINKCOUNT = 0x1
|
||||
ATTR_FILE_RSRCALLOCSIZE = 0x2000
|
||||
ATTR_FILE_RSRCEXTENTS = 0x4000
|
||||
ATTR_FILE_RSRCLENGTH = 0x1000
|
||||
ATTR_FILE_SETMASK = 0x20
|
||||
ATTR_FILE_TOTALSIZE = 0x2
|
||||
ATTR_FILE_VALIDMASK = 0x37ff
|
||||
ATTR_VOL_ALLOCATIONCLUMP = 0x40
|
||||
ATTR_VOL_ATTRIBUTES = 0x40000000
|
||||
ATTR_VOL_CAPABILITIES = 0x20000
|
||||
ATTR_VOL_DIRCOUNT = 0x400
|
||||
ATTR_VOL_ENCODINGSUSED = 0x10000
|
||||
ATTR_VOL_FILECOUNT = 0x200
|
||||
ATTR_VOL_FSTYPE = 0x1
|
||||
ATTR_VOL_INFO = 0x80000000
|
||||
ATTR_VOL_IOBLOCKSIZE = 0x80
|
||||
ATTR_VOL_MAXOBJCOUNT = 0x800
|
||||
ATTR_VOL_MINALLOCATION = 0x20
|
||||
ATTR_VOL_MOUNTEDDEVICE = 0x8000
|
||||
ATTR_VOL_MOUNTFLAGS = 0x4000
|
||||
ATTR_VOL_MOUNTPOINT = 0x1000
|
||||
ATTR_VOL_NAME = 0x2000
|
||||
ATTR_VOL_OBJCOUNT = 0x100
|
||||
ATTR_VOL_QUOTA_SIZE = 0x10000000
|
||||
ATTR_VOL_RESERVED_SIZE = 0x20000000
|
||||
ATTR_VOL_SETMASK = 0x80002000
|
||||
ATTR_VOL_SIGNATURE = 0x2
|
||||
ATTR_VOL_SIZE = 0x4
|
||||
ATTR_VOL_SPACEAVAIL = 0x10
|
||||
ATTR_VOL_SPACEFREE = 0x8
|
||||
ATTR_VOL_UUID = 0x40000
|
||||
ATTR_VOL_VALIDMASK = 0xf007ffff
|
||||
B0 = 0x0
|
||||
B110 = 0x6e
|
||||
B115200 = 0x1c200
|
||||
|
@ -169,6 +249,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
|
@ -390,6 +472,11 @@ const (
|
|||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
FSOPT_ATTR_CMN_EXTENDED = 0x20
|
||||
FSOPT_NOFOLLOW = 0x1
|
||||
FSOPT_NOINMEMUPDATE = 0x2
|
||||
FSOPT_PACK_INVAL_ATTRS = 0x8
|
||||
FSOPT_REPORT_FULLSIZE = 0x4
|
||||
F_ADDFILESIGS = 0x3d
|
||||
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
|
||||
F_ADDFILESIGS_RETURN = 0x61
|
||||
|
@ -425,6 +512,7 @@ const (
|
|||
F_PATHPKG_CHECK = 0x34
|
||||
F_PEOFPOSMODE = 0x3
|
||||
F_PREALLOCATE = 0x2a
|
||||
F_PUNCHHOLE = 0x63
|
||||
F_RDADVISE = 0x2c
|
||||
F_RDAHEAD = 0x2d
|
||||
F_RDLCK = 0x1
|
||||
|
@ -441,10 +529,12 @@ const (
|
|||
F_SINGLE_WRITER = 0x4c
|
||||
F_THAW_FS = 0x36
|
||||
F_TRANSCODEKEY = 0x4b
|
||||
F_TRIM_ACTIVE_FILE = 0x64
|
||||
F_UNLCK = 0x2
|
||||
F_VOLPOSMODE = 0x4
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -681,6 +771,7 @@ const (
|
|||
IPV6_FAITH = 0x1d
|
||||
IPV6_FLOWINFO_MASK = 0xffffff0f
|
||||
IPV6_FLOWLABEL_MASK = 0xffff0f00
|
||||
IPV6_FLOW_ECN_MASK = 0x300
|
||||
IPV6_FRAGTTL = 0x3c
|
||||
IPV6_FW_ADD = 0x1e
|
||||
IPV6_FW_DEL = 0x1f
|
||||
|
@ -771,6 +862,7 @@ const (
|
|||
IP_RECVOPTS = 0x5
|
||||
IP_RECVPKTINFO = 0x1a
|
||||
IP_RECVRETOPTS = 0x6
|
||||
IP_RECVTOS = 0x1b
|
||||
IP_RECVTTL = 0x18
|
||||
IP_RETOPTS = 0x8
|
||||
IP_RF = 0x8000
|
||||
|
@ -789,6 +881,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
|
|
@ -49,6 +49,86 @@ const (
|
|||
AF_UNSPEC = 0x0
|
||||
AF_UTUN = 0x26
|
||||
ALTWERASE = 0x200
|
||||
ATTR_BIT_MAP_COUNT = 0x5
|
||||
ATTR_CMN_ACCESSMASK = 0x20000
|
||||
ATTR_CMN_ACCTIME = 0x1000
|
||||
ATTR_CMN_ADDEDTIME = 0x10000000
|
||||
ATTR_CMN_BKUPTIME = 0x2000
|
||||
ATTR_CMN_CHGTIME = 0x800
|
||||
ATTR_CMN_CRTIME = 0x200
|
||||
ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
|
||||
ATTR_CMN_DEVID = 0x2
|
||||
ATTR_CMN_DOCUMENT_ID = 0x100000
|
||||
ATTR_CMN_ERROR = 0x20000000
|
||||
ATTR_CMN_EXTENDED_SECURITY = 0x400000
|
||||
ATTR_CMN_FILEID = 0x2000000
|
||||
ATTR_CMN_FLAGS = 0x40000
|
||||
ATTR_CMN_FNDRINFO = 0x4000
|
||||
ATTR_CMN_FSID = 0x4
|
||||
ATTR_CMN_FULLPATH = 0x8000000
|
||||
ATTR_CMN_GEN_COUNT = 0x80000
|
||||
ATTR_CMN_GRPID = 0x10000
|
||||
ATTR_CMN_GRPUUID = 0x1000000
|
||||
ATTR_CMN_MODTIME = 0x400
|
||||
ATTR_CMN_NAME = 0x1
|
||||
ATTR_CMN_NAMEDATTRCOUNT = 0x80000
|
||||
ATTR_CMN_NAMEDATTRLIST = 0x100000
|
||||
ATTR_CMN_OBJID = 0x20
|
||||
ATTR_CMN_OBJPERMANENTID = 0x40
|
||||
ATTR_CMN_OBJTAG = 0x10
|
||||
ATTR_CMN_OBJTYPE = 0x8
|
||||
ATTR_CMN_OWNERID = 0x8000
|
||||
ATTR_CMN_PARENTID = 0x4000000
|
||||
ATTR_CMN_PAROBJID = 0x80
|
||||
ATTR_CMN_RETURNED_ATTRS = 0x80000000
|
||||
ATTR_CMN_SCRIPT = 0x100
|
||||
ATTR_CMN_SETMASK = 0x41c7ff00
|
||||
ATTR_CMN_USERACCESS = 0x200000
|
||||
ATTR_CMN_UUID = 0x800000
|
||||
ATTR_CMN_VALIDMASK = 0xffffffff
|
||||
ATTR_CMN_VOLSETMASK = 0x6700
|
||||
ATTR_FILE_ALLOCSIZE = 0x4
|
||||
ATTR_FILE_CLUMPSIZE = 0x10
|
||||
ATTR_FILE_DATAALLOCSIZE = 0x400
|
||||
ATTR_FILE_DATAEXTENTS = 0x800
|
||||
ATTR_FILE_DATALENGTH = 0x200
|
||||
ATTR_FILE_DEVTYPE = 0x20
|
||||
ATTR_FILE_FILETYPE = 0x40
|
||||
ATTR_FILE_FORKCOUNT = 0x80
|
||||
ATTR_FILE_FORKLIST = 0x100
|
||||
ATTR_FILE_IOBLOCKSIZE = 0x8
|
||||
ATTR_FILE_LINKCOUNT = 0x1
|
||||
ATTR_FILE_RSRCALLOCSIZE = 0x2000
|
||||
ATTR_FILE_RSRCEXTENTS = 0x4000
|
||||
ATTR_FILE_RSRCLENGTH = 0x1000
|
||||
ATTR_FILE_SETMASK = 0x20
|
||||
ATTR_FILE_TOTALSIZE = 0x2
|
||||
ATTR_FILE_VALIDMASK = 0x37ff
|
||||
ATTR_VOL_ALLOCATIONCLUMP = 0x40
|
||||
ATTR_VOL_ATTRIBUTES = 0x40000000
|
||||
ATTR_VOL_CAPABILITIES = 0x20000
|
||||
ATTR_VOL_DIRCOUNT = 0x400
|
||||
ATTR_VOL_ENCODINGSUSED = 0x10000
|
||||
ATTR_VOL_FILECOUNT = 0x200
|
||||
ATTR_VOL_FSTYPE = 0x1
|
||||
ATTR_VOL_INFO = 0x80000000
|
||||
ATTR_VOL_IOBLOCKSIZE = 0x80
|
||||
ATTR_VOL_MAXOBJCOUNT = 0x800
|
||||
ATTR_VOL_MINALLOCATION = 0x20
|
||||
ATTR_VOL_MOUNTEDDEVICE = 0x8000
|
||||
ATTR_VOL_MOUNTFLAGS = 0x4000
|
||||
ATTR_VOL_MOUNTPOINT = 0x1000
|
||||
ATTR_VOL_NAME = 0x2000
|
||||
ATTR_VOL_OBJCOUNT = 0x100
|
||||
ATTR_VOL_QUOTA_SIZE = 0x10000000
|
||||
ATTR_VOL_RESERVED_SIZE = 0x20000000
|
||||
ATTR_VOL_SETMASK = 0x80002000
|
||||
ATTR_VOL_SIGNATURE = 0x2
|
||||
ATTR_VOL_SIZE = 0x4
|
||||
ATTR_VOL_SPACEAVAIL = 0x10
|
||||
ATTR_VOL_SPACEFREE = 0x8
|
||||
ATTR_VOL_UUID = 0x40000
|
||||
ATTR_VOL_VALIDMASK = 0xf007ffff
|
||||
B0 = 0x0
|
||||
B110 = 0x6e
|
||||
B115200 = 0x1c200
|
||||
|
@ -169,6 +249,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
|
@ -390,6 +472,11 @@ const (
|
|||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
FSOPT_ATTR_CMN_EXTENDED = 0x20
|
||||
FSOPT_NOFOLLOW = 0x1
|
||||
FSOPT_NOINMEMUPDATE = 0x2
|
||||
FSOPT_PACK_INVAL_ATTRS = 0x8
|
||||
FSOPT_REPORT_FULLSIZE = 0x4
|
||||
F_ADDFILESIGS = 0x3d
|
||||
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
|
||||
F_ADDFILESIGS_RETURN = 0x61
|
||||
|
@ -425,6 +512,7 @@ const (
|
|||
F_PATHPKG_CHECK = 0x34
|
||||
F_PEOFPOSMODE = 0x3
|
||||
F_PREALLOCATE = 0x2a
|
||||
F_PUNCHHOLE = 0x63
|
||||
F_RDADVISE = 0x2c
|
||||
F_RDAHEAD = 0x2d
|
||||
F_RDLCK = 0x1
|
||||
|
@ -441,10 +529,12 @@ const (
|
|||
F_SINGLE_WRITER = 0x4c
|
||||
F_THAW_FS = 0x36
|
||||
F_TRANSCODEKEY = 0x4b
|
||||
F_TRIM_ACTIVE_FILE = 0x64
|
||||
F_UNLCK = 0x2
|
||||
F_VOLPOSMODE = 0x4
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -681,6 +771,7 @@ const (
|
|||
IPV6_FAITH = 0x1d
|
||||
IPV6_FLOWINFO_MASK = 0xffffff0f
|
||||
IPV6_FLOWLABEL_MASK = 0xffff0f00
|
||||
IPV6_FLOW_ECN_MASK = 0x300
|
||||
IPV6_FRAGTTL = 0x3c
|
||||
IPV6_FW_ADD = 0x1e
|
||||
IPV6_FW_DEL = 0x1f
|
||||
|
@ -771,6 +862,7 @@ const (
|
|||
IP_RECVOPTS = 0x5
|
||||
IP_RECVPKTINFO = 0x1a
|
||||
IP_RECVRETOPTS = 0x6
|
||||
IP_RECVTOS = 0x1b
|
||||
IP_RECVTTL = 0x18
|
||||
IP_RETOPTS = 0x8
|
||||
IP_RF = 0x8000
|
||||
|
@ -789,6 +881,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
|
|
@ -49,6 +49,86 @@ const (
|
|||
AF_UNSPEC = 0x0
|
||||
AF_UTUN = 0x26
|
||||
ALTWERASE = 0x200
|
||||
ATTR_BIT_MAP_COUNT = 0x5
|
||||
ATTR_CMN_ACCESSMASK = 0x20000
|
||||
ATTR_CMN_ACCTIME = 0x1000
|
||||
ATTR_CMN_ADDEDTIME = 0x10000000
|
||||
ATTR_CMN_BKUPTIME = 0x2000
|
||||
ATTR_CMN_CHGTIME = 0x800
|
||||
ATTR_CMN_CRTIME = 0x200
|
||||
ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
|
||||
ATTR_CMN_DEVID = 0x2
|
||||
ATTR_CMN_DOCUMENT_ID = 0x100000
|
||||
ATTR_CMN_ERROR = 0x20000000
|
||||
ATTR_CMN_EXTENDED_SECURITY = 0x400000
|
||||
ATTR_CMN_FILEID = 0x2000000
|
||||
ATTR_CMN_FLAGS = 0x40000
|
||||
ATTR_CMN_FNDRINFO = 0x4000
|
||||
ATTR_CMN_FSID = 0x4
|
||||
ATTR_CMN_FULLPATH = 0x8000000
|
||||
ATTR_CMN_GEN_COUNT = 0x80000
|
||||
ATTR_CMN_GRPID = 0x10000
|
||||
ATTR_CMN_GRPUUID = 0x1000000
|
||||
ATTR_CMN_MODTIME = 0x400
|
||||
ATTR_CMN_NAME = 0x1
|
||||
ATTR_CMN_NAMEDATTRCOUNT = 0x80000
|
||||
ATTR_CMN_NAMEDATTRLIST = 0x100000
|
||||
ATTR_CMN_OBJID = 0x20
|
||||
ATTR_CMN_OBJPERMANENTID = 0x40
|
||||
ATTR_CMN_OBJTAG = 0x10
|
||||
ATTR_CMN_OBJTYPE = 0x8
|
||||
ATTR_CMN_OWNERID = 0x8000
|
||||
ATTR_CMN_PARENTID = 0x4000000
|
||||
ATTR_CMN_PAROBJID = 0x80
|
||||
ATTR_CMN_RETURNED_ATTRS = 0x80000000
|
||||
ATTR_CMN_SCRIPT = 0x100
|
||||
ATTR_CMN_SETMASK = 0x41c7ff00
|
||||
ATTR_CMN_USERACCESS = 0x200000
|
||||
ATTR_CMN_UUID = 0x800000
|
||||
ATTR_CMN_VALIDMASK = 0xffffffff
|
||||
ATTR_CMN_VOLSETMASK = 0x6700
|
||||
ATTR_FILE_ALLOCSIZE = 0x4
|
||||
ATTR_FILE_CLUMPSIZE = 0x10
|
||||
ATTR_FILE_DATAALLOCSIZE = 0x400
|
||||
ATTR_FILE_DATAEXTENTS = 0x800
|
||||
ATTR_FILE_DATALENGTH = 0x200
|
||||
ATTR_FILE_DEVTYPE = 0x20
|
||||
ATTR_FILE_FILETYPE = 0x40
|
||||
ATTR_FILE_FORKCOUNT = 0x80
|
||||
ATTR_FILE_FORKLIST = 0x100
|
||||
ATTR_FILE_IOBLOCKSIZE = 0x8
|
||||
ATTR_FILE_LINKCOUNT = 0x1
|
||||
ATTR_FILE_RSRCALLOCSIZE = 0x2000
|
||||
ATTR_FILE_RSRCEXTENTS = 0x4000
|
||||
ATTR_FILE_RSRCLENGTH = 0x1000
|
||||
ATTR_FILE_SETMASK = 0x20
|
||||
ATTR_FILE_TOTALSIZE = 0x2
|
||||
ATTR_FILE_VALIDMASK = 0x37ff
|
||||
ATTR_VOL_ALLOCATIONCLUMP = 0x40
|
||||
ATTR_VOL_ATTRIBUTES = 0x40000000
|
||||
ATTR_VOL_CAPABILITIES = 0x20000
|
||||
ATTR_VOL_DIRCOUNT = 0x400
|
||||
ATTR_VOL_ENCODINGSUSED = 0x10000
|
||||
ATTR_VOL_FILECOUNT = 0x200
|
||||
ATTR_VOL_FSTYPE = 0x1
|
||||
ATTR_VOL_INFO = 0x80000000
|
||||
ATTR_VOL_IOBLOCKSIZE = 0x80
|
||||
ATTR_VOL_MAXOBJCOUNT = 0x800
|
||||
ATTR_VOL_MINALLOCATION = 0x20
|
||||
ATTR_VOL_MOUNTEDDEVICE = 0x8000
|
||||
ATTR_VOL_MOUNTFLAGS = 0x4000
|
||||
ATTR_VOL_MOUNTPOINT = 0x1000
|
||||
ATTR_VOL_NAME = 0x2000
|
||||
ATTR_VOL_OBJCOUNT = 0x100
|
||||
ATTR_VOL_QUOTA_SIZE = 0x10000000
|
||||
ATTR_VOL_RESERVED_SIZE = 0x20000000
|
||||
ATTR_VOL_SETMASK = 0x80002000
|
||||
ATTR_VOL_SIGNATURE = 0x2
|
||||
ATTR_VOL_SIZE = 0x4
|
||||
ATTR_VOL_SPACEAVAIL = 0x10
|
||||
ATTR_VOL_SPACEFREE = 0x8
|
||||
ATTR_VOL_UUID = 0x40000
|
||||
ATTR_VOL_VALIDMASK = 0xf007ffff
|
||||
B0 = 0x0
|
||||
B110 = 0x6e
|
||||
B115200 = 0x1c200
|
||||
|
@ -169,6 +249,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
|
@ -390,6 +472,11 @@ const (
|
|||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
FSOPT_ATTR_CMN_EXTENDED = 0x20
|
||||
FSOPT_NOFOLLOW = 0x1
|
||||
FSOPT_NOINMEMUPDATE = 0x2
|
||||
FSOPT_PACK_INVAL_ATTRS = 0x8
|
||||
FSOPT_REPORT_FULLSIZE = 0x4
|
||||
F_ADDFILESIGS = 0x3d
|
||||
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
|
||||
F_ADDFILESIGS_RETURN = 0x61
|
||||
|
@ -425,6 +512,7 @@ const (
|
|||
F_PATHPKG_CHECK = 0x34
|
||||
F_PEOFPOSMODE = 0x3
|
||||
F_PREALLOCATE = 0x2a
|
||||
F_PUNCHHOLE = 0x63
|
||||
F_RDADVISE = 0x2c
|
||||
F_RDAHEAD = 0x2d
|
||||
F_RDLCK = 0x1
|
||||
|
@ -441,10 +529,12 @@ const (
|
|||
F_SINGLE_WRITER = 0x4c
|
||||
F_THAW_FS = 0x36
|
||||
F_TRANSCODEKEY = 0x4b
|
||||
F_TRIM_ACTIVE_FILE = 0x64
|
||||
F_UNLCK = 0x2
|
||||
F_VOLPOSMODE = 0x4
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -681,6 +771,7 @@ const (
|
|||
IPV6_FAITH = 0x1d
|
||||
IPV6_FLOWINFO_MASK = 0xffffff0f
|
||||
IPV6_FLOWLABEL_MASK = 0xffff0f00
|
||||
IPV6_FLOW_ECN_MASK = 0x300
|
||||
IPV6_FRAGTTL = 0x3c
|
||||
IPV6_FW_ADD = 0x1e
|
||||
IPV6_FW_DEL = 0x1f
|
||||
|
@ -771,6 +862,7 @@ const (
|
|||
IP_RECVOPTS = 0x5
|
||||
IP_RECVPKTINFO = 0x1a
|
||||
IP_RECVRETOPTS = 0x6
|
||||
IP_RECVTOS = 0x1b
|
||||
IP_RECVTTL = 0x18
|
||||
IP_RETOPTS = 0x8
|
||||
IP_RF = 0x8000
|
||||
|
@ -789,6 +881,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
|
|
@ -351,6 +351,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0x18
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
|
@ -608,6 +610,7 @@ const (
|
|||
F_UNLCKSYS = 0x4
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -944,6 +947,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
@ -981,6 +988,49 @@ const (
|
|||
MAP_STACK = 0x400
|
||||
MCL_CURRENT = 0x1
|
||||
MCL_FUTURE = 0x2
|
||||
MNT_ACLS = 0x8000000
|
||||
MNT_ASYNC = 0x40
|
||||
MNT_AUTOMOUNTED = 0x200000000
|
||||
MNT_BYFSID = 0x8000000
|
||||
MNT_CMDFLAGS = 0xd0f0000
|
||||
MNT_DEFEXPORTED = 0x200
|
||||
MNT_DELEXPORT = 0x20000
|
||||
MNT_EXKERB = 0x800
|
||||
MNT_EXPORTANON = 0x400
|
||||
MNT_EXPORTED = 0x100
|
||||
MNT_EXPUBLIC = 0x20000000
|
||||
MNT_EXRDONLY = 0x80
|
||||
MNT_FORCE = 0x80000
|
||||
MNT_GJOURNAL = 0x2000000
|
||||
MNT_IGNORE = 0x800000
|
||||
MNT_LAZY = 0x3
|
||||
MNT_LOCAL = 0x1000
|
||||
MNT_MULTILABEL = 0x4000000
|
||||
MNT_NFS4ACLS = 0x10
|
||||
MNT_NOATIME = 0x10000000
|
||||
MNT_NOCLUSTERR = 0x40000000
|
||||
MNT_NOCLUSTERW = 0x80000000
|
||||
MNT_NOEXEC = 0x4
|
||||
MNT_NONBUSY = 0x4000000
|
||||
MNT_NOSUID = 0x8
|
||||
MNT_NOSYMFOLLOW = 0x400000
|
||||
MNT_NOWAIT = 0x2
|
||||
MNT_QUOTA = 0x2000
|
||||
MNT_RDONLY = 0x1
|
||||
MNT_RELOAD = 0x40000
|
||||
MNT_ROOTFS = 0x4000
|
||||
MNT_SNAPSHOT = 0x1000000
|
||||
MNT_SOFTDEP = 0x200000
|
||||
MNT_SUIDDIR = 0x100000
|
||||
MNT_SUJ = 0x100000000
|
||||
MNT_SUSPEND = 0x4
|
||||
MNT_SYNCHRONOUS = 0x2
|
||||
MNT_UNION = 0x20
|
||||
MNT_UPDATE = 0x10000
|
||||
MNT_UPDATEMASK = 0x2d8d0807e
|
||||
MNT_USER = 0x8000
|
||||
MNT_VISFLAGMASK = 0x3fef0ffff
|
||||
MNT_WAIT = 0x1
|
||||
MSG_CMSG_CLOEXEC = 0x40000
|
||||
MSG_COMPAT = 0x8000
|
||||
MSG_CTRUNC = 0x20
|
||||
|
|
|
@ -351,6 +351,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0x18
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
|
@ -608,6 +610,7 @@ const (
|
|||
F_UNLCKSYS = 0x4
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -944,6 +947,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
@ -982,6 +989,49 @@ const (
|
|||
MAP_STACK = 0x400
|
||||
MCL_CURRENT = 0x1
|
||||
MCL_FUTURE = 0x2
|
||||
MNT_ACLS = 0x8000000
|
||||
MNT_ASYNC = 0x40
|
||||
MNT_AUTOMOUNTED = 0x200000000
|
||||
MNT_BYFSID = 0x8000000
|
||||
MNT_CMDFLAGS = 0xd0f0000
|
||||
MNT_DEFEXPORTED = 0x200
|
||||
MNT_DELEXPORT = 0x20000
|
||||
MNT_EXKERB = 0x800
|
||||
MNT_EXPORTANON = 0x400
|
||||
MNT_EXPORTED = 0x100
|
||||
MNT_EXPUBLIC = 0x20000000
|
||||
MNT_EXRDONLY = 0x80
|
||||
MNT_FORCE = 0x80000
|
||||
MNT_GJOURNAL = 0x2000000
|
||||
MNT_IGNORE = 0x800000
|
||||
MNT_LAZY = 0x3
|
||||
MNT_LOCAL = 0x1000
|
||||
MNT_MULTILABEL = 0x4000000
|
||||
MNT_NFS4ACLS = 0x10
|
||||
MNT_NOATIME = 0x10000000
|
||||
MNT_NOCLUSTERR = 0x40000000
|
||||
MNT_NOCLUSTERW = 0x80000000
|
||||
MNT_NOEXEC = 0x4
|
||||
MNT_NONBUSY = 0x4000000
|
||||
MNT_NOSUID = 0x8
|
||||
MNT_NOSYMFOLLOW = 0x400000
|
||||
MNT_NOWAIT = 0x2
|
||||
MNT_QUOTA = 0x2000
|
||||
MNT_RDONLY = 0x1
|
||||
MNT_RELOAD = 0x40000
|
||||
MNT_ROOTFS = 0x4000
|
||||
MNT_SNAPSHOT = 0x1000000
|
||||
MNT_SOFTDEP = 0x200000
|
||||
MNT_SUIDDIR = 0x100000
|
||||
MNT_SUJ = 0x100000000
|
||||
MNT_SUSPEND = 0x4
|
||||
MNT_SYNCHRONOUS = 0x2
|
||||
MNT_UNION = 0x20
|
||||
MNT_UPDATE = 0x10000
|
||||
MNT_UPDATEMASK = 0x2d8d0807e
|
||||
MNT_USER = 0x8000
|
||||
MNT_VISFLAGMASK = 0x3fef0ffff
|
||||
MNT_WAIT = 0x1
|
||||
MSG_CMSG_CLOEXEC = 0x40000
|
||||
MSG_COMPAT = 0x8000
|
||||
MSG_CTRUNC = 0x20
|
||||
|
|
|
@ -351,6 +351,8 @@ const (
|
|||
CSTOP = 0x13
|
||||
CSTOPB = 0x400
|
||||
CSUSP = 0x1a
|
||||
CTL_HW = 0x6
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0x18
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
|
@ -615,6 +617,7 @@ const (
|
|||
F_UNLCKSYS = 0x4
|
||||
F_WRLCK = 0x3
|
||||
HUPCL = 0x4000
|
||||
HW_MACHINE = 0x1
|
||||
ICANON = 0x100
|
||||
ICMP6_FILTER = 0x12
|
||||
ICRNL = 0x100
|
||||
|
@ -951,6 +954,10 @@ const (
|
|||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
KERN_HOSTNAME = 0xa
|
||||
KERN_OSRELEASE = 0x2
|
||||
KERN_OSTYPE = 0x1
|
||||
KERN_VERSION = 0x4
|
||||
LOCK_EX = 0x2
|
||||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
|
@ -989,6 +996,49 @@ const (
|
|||
MAP_STACK = 0x400
|
||||
MCL_CURRENT = 0x1
|
||||
MCL_FUTURE = 0x2
|
||||
MNT_ACLS = 0x8000000
|
||||
MNT_ASYNC = 0x40
|
||||
MNT_AUTOMOUNTED = 0x200000000
|
||||
MNT_BYFSID = 0x8000000
|
||||
MNT_CMDFLAGS = 0xd0f0000
|
||||
MNT_DEFEXPORTED = 0x200
|
||||
MNT_DELEXPORT = 0x20000
|
||||
MNT_EXKERB = 0x800
|
||||
MNT_EXPORTANON = 0x400
|
||||
MNT_EXPORTED = 0x100
|
||||
MNT_EXPUBLIC = 0x20000000
|
||||
MNT_EXRDONLY = 0x80
|
||||
MNT_FORCE = 0x80000
|
||||
MNT_GJOURNAL = 0x2000000
|
||||
MNT_IGNORE = 0x800000
|
||||
MNT_LAZY = 0x3
|
||||
MNT_LOCAL = 0x1000
|
||||
MNT_MULTILABEL = 0x4000000
|
||||
MNT_NFS4ACLS = 0x10
|
||||
MNT_NOATIME = 0x10000000
|
||||
MNT_NOCLUSTERR = 0x40000000
|
||||
MNT_NOCLUSTERW = 0x80000000
|
||||
MNT_NOEXEC = 0x4
|
||||
MNT_NONBUSY = 0x4000000
|
||||
MNT_NOSUID = 0x8
|
||||
MNT_NOSYMFOLLOW = 0x400000
|
||||
MNT_NOWAIT = 0x2
|
||||
MNT_QUOTA = 0x2000
|
||||
MNT_RDONLY = 0x1
|
||||
MNT_RELOAD = 0x40000
|
||||
MNT_ROOTFS = 0x4000
|
||||
MNT_SNAPSHOT = 0x1000000
|
||||
MNT_SOFTDEP = 0x200000
|
||||
MNT_SUIDDIR = 0x100000
|
||||
MNT_SUJ = 0x100000000
|
||||
MNT_SUSPEND = 0x4
|
||||
MNT_SYNCHRONOUS = 0x2
|
||||
MNT_UNION = 0x20
|
||||
MNT_UPDATE = 0x10000
|
||||
MNT_UPDATEMASK = 0x2d8d0807e
|
||||
MNT_USER = 0x8000
|
||||
MNT_VISFLAGMASK = 0x3fef0ffff
|
||||
MNT_WAIT = 0x1
|
||||
MSG_CMSG_CLOEXEC = 0x40000
|
||||
MSG_COMPAT = 0x8000
|
||||
MSG_CTRUNC = 0x20
|
||||
|
|
|
@ -36,7 +36,7 @@ const (
|
|||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2b
|
||||
AF_MAX = 0x2c
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
|
@ -51,6 +51,7 @@ const (
|
|||
AF_ROUTE = 0x10
|
||||
AF_RXRPC = 0x21
|
||||
AF_SECURITY = 0xe
|
||||
AF_SMC = 0x2b
|
||||
AF_SNA = 0x16
|
||||
AF_TIPC = 0x1e
|
||||
AF_UNIX = 0x1
|
||||
|
@ -129,6 +130,7 @@ const (
|
|||
ARPHRD_TUNNEL = 0x300
|
||||
ARPHRD_TUNNEL6 = 0x301
|
||||
ARPHRD_VOID = 0xffff
|
||||
ARPHRD_VSOCKMON = 0x33a
|
||||
ARPHRD_X25 = 0x10f
|
||||
B0 = 0x0
|
||||
B1000000 = 0x1008
|
||||
|
@ -392,6 +394,7 @@ const (
|
|||
ETH_P_FIP = 0x8914
|
||||
ETH_P_HDLC = 0x19
|
||||
ETH_P_HSR = 0x892f
|
||||
ETH_P_IBOE = 0x8915
|
||||
ETH_P_IEEE802154 = 0xf6
|
||||
ETH_P_IEEEPUP = 0xa00
|
||||
ETH_P_IEEEPUPAT = 0xa01
|
||||
|
@ -453,6 +456,8 @@ const (
|
|||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x1000
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
|
||||
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
|
||||
|
@ -618,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -657,8 +663,10 @@ const (
|
|||
IPV6_2292PKTOPTIONS = 0x6
|
||||
IPV6_2292RTHDR = 0x5
|
||||
IPV6_ADDRFORM = 0x1
|
||||
IPV6_ADDR_PREFERENCES = 0x48
|
||||
IPV6_ADD_MEMBERSHIP = 0x14
|
||||
IPV6_AUTHHDR = 0xa
|
||||
IPV6_AUTOFLOWLABEL = 0x46
|
||||
IPV6_CHECKSUM = 0x7
|
||||
IPV6_DONTFRAG = 0x3e
|
||||
IPV6_DROP_MEMBERSHIP = 0x15
|
||||
|
@ -671,12 +679,14 @@ const (
|
|||
IPV6_JOIN_GROUP = 0x14
|
||||
IPV6_LEAVE_ANYCAST = 0x1c
|
||||
IPV6_LEAVE_GROUP = 0x15
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
IPV6_NEXTHOP = 0x9
|
||||
IPV6_ORIGDSTADDR = 0x4a
|
||||
IPV6_PATHMTU = 0x3d
|
||||
IPV6_PKTINFO = 0x32
|
||||
IPV6_PMTUDISC_DO = 0x2
|
||||
|
@ -687,8 +697,10 @@ const (
|
|||
IPV6_PMTUDISC_WANT = 0x1
|
||||
IPV6_RECVDSTOPTS = 0x3a
|
||||
IPV6_RECVERR = 0x19
|
||||
IPV6_RECVFRAGSIZE = 0x4d
|
||||
IPV6_RECVHOPLIMIT = 0x33
|
||||
IPV6_RECVHOPOPTS = 0x35
|
||||
IPV6_RECVORIGDSTADDR = 0x4a
|
||||
IPV6_RECVPATHMTU = 0x3c
|
||||
IPV6_RECVPKTINFO = 0x31
|
||||
IPV6_RECVRTHDR = 0x38
|
||||
|
@ -702,7 +714,9 @@ const (
|
|||
IPV6_RXDSTOPTS = 0x3b
|
||||
IPV6_RXHOPOPTS = 0x36
|
||||
IPV6_TCLASS = 0x43
|
||||
IPV6_TRANSPARENT = 0x4b
|
||||
IPV6_UNICAST_HOPS = 0x10
|
||||
IPV6_UNICAST_IF = 0x4c
|
||||
IPV6_V6ONLY = 0x1a
|
||||
IPV6_XFRM_POLICY = 0x23
|
||||
IP_ADD_MEMBERSHIP = 0x23
|
||||
|
@ -745,6 +759,7 @@ const (
|
|||
IP_PMTUDISC_PROBE = 0x3
|
||||
IP_PMTUDISC_WANT = 0x1
|
||||
IP_RECVERR = 0xb
|
||||
IP_RECVFRAGSIZE = 0x19
|
||||
IP_RECVOPTS = 0x6
|
||||
IP_RECVORIGDSTADDR = 0x14
|
||||
IP_RECVRETOPTS = 0x7
|
||||
|
@ -782,6 +797,7 @@ const (
|
|||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
KEYCTL_REVOKE = 0x3
|
||||
KEYCTL_SEARCH = 0xa
|
||||
KEYCTL_SESSION_TO_PARENT = 0x12
|
||||
|
@ -915,6 +931,7 @@ const (
|
|||
MS_SILENT = 0x8000
|
||||
MS_SLAVE = 0x80000
|
||||
MS_STRICTATIME = 0x1000000
|
||||
MS_SUBMOUNT = 0x4000000
|
||||
MS_SYNC = 0x4
|
||||
MS_SYNCHRONOUS = 0x10
|
||||
MS_UNBINDABLE = 0x20000
|
||||
|
@ -929,6 +946,7 @@ const (
|
|||
NETLINK_DNRTMSG = 0xe
|
||||
NETLINK_DROP_MEMBERSHIP = 0x2
|
||||
NETLINK_ECRYPTFS = 0x13
|
||||
NETLINK_EXT_ACK = 0xb
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
|
@ -947,6 +965,7 @@ const (
|
|||
NETLINK_RX_RING = 0x6
|
||||
NETLINK_SCSITRANSPORT = 0x12
|
||||
NETLINK_SELINUX = 0x7
|
||||
NETLINK_SMC = 0x16
|
||||
NETLINK_SOCK_DIAG = 0x4
|
||||
NETLINK_TX_RING = 0x7
|
||||
NETLINK_UNUSED = 0x1
|
||||
|
@ -967,8 +986,10 @@ const (
|
|||
NLMSG_NOOP = 0x1
|
||||
NLMSG_OVERRUN = 0x4
|
||||
NLM_F_ACK = 0x4
|
||||
NLM_F_ACK_TLVS = 0x200
|
||||
NLM_F_APPEND = 0x800
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CAPPED = 0x100
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
|
@ -1025,6 +1046,7 @@ const (
|
|||
PACKET_FANOUT_EBPF = 0x7
|
||||
PACKET_FANOUT_FLAG_DEFRAG = 0x8000
|
||||
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
|
||||
PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
|
||||
PACKET_FANOUT_HASH = 0x0
|
||||
PACKET_FANOUT_LB = 0x1
|
||||
PACKET_FANOUT_QM = 0x5
|
||||
|
@ -1256,7 +1278,7 @@ const (
|
|||
RLIMIT_RTTIME = 0xf
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = -0x1
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
|
@ -1281,7 +1303,7 @@ const (
|
|||
RTAX_UNSPEC = 0x0
|
||||
RTAX_WINDOW = 0x3
|
||||
RTA_ALIGNTO = 0x4
|
||||
RTA_MAX = 0x19
|
||||
RTA_MAX = 0x1a
|
||||
RTCF_DIRECTSRC = 0x4000000
|
||||
RTCF_DOREDIRECT = 0x1000000
|
||||
RTCF_LOG = 0x2000000
|
||||
|
@ -1325,6 +1347,7 @@ const (
|
|||
RTM_DELLINK = 0x11
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
RTM_DELNSID = 0x59
|
||||
RTM_DELQDISC = 0x25
|
||||
RTM_DELROUTE = 0x19
|
||||
|
@ -1333,6 +1356,7 @@ const (
|
|||
RTM_DELTFILTER = 0x2d
|
||||
RTM_F_CLONED = 0x200
|
||||
RTM_F_EQUALIZE = 0x400
|
||||
RTM_F_FIB_MATCH = 0x2000
|
||||
RTM_F_LOOKUP_TABLE = 0x1000
|
||||
RTM_F_NOTIFY = 0x100
|
||||
RTM_F_PREFIX = 0x800
|
||||
|
@ -1354,10 +1378,11 @@ const (
|
|||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x5f
|
||||
RTM_MAX = 0x63
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
|
@ -1372,8 +1397,8 @@ const (
|
|||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x14
|
||||
RTM_NR_MSGTYPES = 0x50
|
||||
RTM_NR_FAMILIES = 0x15
|
||||
RTM_NR_MSGTYPES = 0x54
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
|
@ -1384,6 +1409,7 @@ const (
|
|||
RTNH_F_OFFLOAD = 0x8
|
||||
RTNH_F_ONLINK = 0x4
|
||||
RTNH_F_PERVASIVE = 0x2
|
||||
RTNH_F_UNRESOLVED = 0x20
|
||||
RTN_MAX = 0xb
|
||||
RTPROT_BABEL = 0x2a
|
||||
RTPROT_BIRD = 0xc
|
||||
|
@ -1414,6 +1440,7 @@ const (
|
|||
SCM_TIMESTAMP = 0x1d
|
||||
SCM_TIMESTAMPING = 0x25
|
||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
|
@ -1552,6 +1579,7 @@ const (
|
|||
SO_BSDCOMPAT = 0xe
|
||||
SO_BUSY_POLL = 0x2e
|
||||
SO_CNX_ADVICE = 0x35
|
||||
SO_COOKIE = 0x39
|
||||
SO_DEBUG = 0x1
|
||||
SO_DETACH_BPF = 0x1b
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
|
@ -1560,11 +1588,13 @@ const (
|
|||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
SO_INCOMING_NAPI_ID = 0x38
|
||||
SO_KEEPALIVE = 0x9
|
||||
SO_LINGER = 0xd
|
||||
SO_LOCK_FILTER = 0x2c
|
||||
SO_MARK = 0x24
|
||||
SO_MAX_PACING_RATE = 0x2f
|
||||
SO_MEMINFO = 0x37
|
||||
SO_NOFCS = 0x2b
|
||||
SO_NO_CHECK = 0xb
|
||||
SO_OOBINLINE = 0xa
|
||||
|
@ -1572,6 +1602,7 @@ const (
|
|||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x11
|
||||
SO_PEERGROUPS = 0x3b
|
||||
SO_PEERNAME = 0x1c
|
||||
SO_PEERSEC = 0x1f
|
||||
SO_PRIORITY = 0xc
|
||||
|
@ -1668,6 +1699,7 @@ const (
|
|||
TCP_CORK = 0x3
|
||||
TCP_DEFER_ACCEPT = 0x9
|
||||
TCP_FASTOPEN = 0x17
|
||||
TCP_FASTOPEN_CONNECT = 0x1e
|
||||
TCP_INFO = 0xb
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
|
@ -1727,6 +1759,7 @@ const (
|
|||
TIOCGPKT = 0x80045438
|
||||
TIOCGPTLCK = 0x80045439
|
||||
TIOCGPTN = 0x80045430
|
||||
TIOCGPTPEER = 0x5441
|
||||
TIOCGRS485 = 0x542e
|
||||
TIOCGSERIAL = 0x541e
|
||||
TIOCGSID = 0x5429
|
||||
|
@ -1810,6 +1843,8 @@ const (
|
|||
TUNSETVNETHDRSZ = 0x400454d8
|
||||
TUNSETVNETLE = 0x400454dc
|
||||
UMOUNT_NOFOLLOW = 0x8
|
||||
UTIME_NOW = 0x3fffffff
|
||||
UTIME_OMIT = 0x3ffffffe
|
||||
VDISCARD = 0xd
|
||||
VEOF = 0x4
|
||||
VEOL = 0xb
|
||||
|
@ -1839,6 +1874,17 @@ const (
|
|||
WALL = 0x40000000
|
||||
WCLONE = 0x80000000
|
||||
WCONTINUED = 0x8
|
||||
WDIOC_GETBOOTSTATUS = 0x80045702
|
||||
WDIOC_GETPRETIMEOUT = 0x80045709
|
||||
WDIOC_GETSTATUS = 0x80045701
|
||||
WDIOC_GETSUPPORT = 0x80285700
|
||||
WDIOC_GETTEMP = 0x80045703
|
||||
WDIOC_GETTIMELEFT = 0x8004570a
|
||||
WDIOC_GETTIMEOUT = 0x80045707
|
||||
WDIOC_KEEPALIVE = 0x80045705
|
||||
WDIOC_SETOPTIONS = 0x80045704
|
||||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
|
@ -2019,7 +2065,6 @@ const (
|
|||
SIGTSTP = syscall.Signal(0x14)
|
||||
SIGTTIN = syscall.Signal(0x15)
|
||||
SIGTTOU = syscall.Signal(0x16)
|
||||
SIGUNUSED = syscall.Signal(0x1f)
|
||||
SIGURG = syscall.Signal(0x17)
|
||||
SIGUSR1 = syscall.Signal(0xa)
|
||||
SIGUSR2 = syscall.Signal(0xc)
|
||||
|
|
|
@ -36,7 +36,7 @@ const (
|
|||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2b
|
||||
AF_MAX = 0x2c
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
|
@ -51,6 +51,7 @@ const (
|
|||
AF_ROUTE = 0x10
|
||||
AF_RXRPC = 0x21
|
||||
AF_SECURITY = 0xe
|
||||
AF_SMC = 0x2b
|
||||
AF_SNA = 0x16
|
||||
AF_TIPC = 0x1e
|
||||
AF_UNIX = 0x1
|
||||
|
@ -129,6 +130,7 @@ const (
|
|||
ARPHRD_TUNNEL = 0x300
|
||||
ARPHRD_TUNNEL6 = 0x301
|
||||
ARPHRD_VOID = 0xffff
|
||||
ARPHRD_VSOCKMON = 0x33a
|
||||
ARPHRD_X25 = 0x10f
|
||||
B0 = 0x0
|
||||
B1000000 = 0x1008
|
||||
|
@ -392,6 +394,7 @@ const (
|
|||
ETH_P_FIP = 0x8914
|
||||
ETH_P_HDLC = 0x19
|
||||
ETH_P_HSR = 0x892f
|
||||
ETH_P_IBOE = 0x8915
|
||||
ETH_P_IEEE802154 = 0xf6
|
||||
ETH_P_IEEEPUP = 0xa00
|
||||
ETH_P_IEEEPUPAT = 0xa01
|
||||
|
@ -453,6 +456,8 @@ const (
|
|||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x1000
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
|
||||
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
|
||||
|
@ -618,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -657,8 +663,10 @@ const (
|
|||
IPV6_2292PKTOPTIONS = 0x6
|
||||
IPV6_2292RTHDR = 0x5
|
||||
IPV6_ADDRFORM = 0x1
|
||||
IPV6_ADDR_PREFERENCES = 0x48
|
||||
IPV6_ADD_MEMBERSHIP = 0x14
|
||||
IPV6_AUTHHDR = 0xa
|
||||
IPV6_AUTOFLOWLABEL = 0x46
|
||||
IPV6_CHECKSUM = 0x7
|
||||
IPV6_DONTFRAG = 0x3e
|
||||
IPV6_DROP_MEMBERSHIP = 0x15
|
||||
|
@ -671,12 +679,14 @@ const (
|
|||
IPV6_JOIN_GROUP = 0x14
|
||||
IPV6_LEAVE_ANYCAST = 0x1c
|
||||
IPV6_LEAVE_GROUP = 0x15
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
IPV6_NEXTHOP = 0x9
|
||||
IPV6_ORIGDSTADDR = 0x4a
|
||||
IPV6_PATHMTU = 0x3d
|
||||
IPV6_PKTINFO = 0x32
|
||||
IPV6_PMTUDISC_DO = 0x2
|
||||
|
@ -687,8 +697,10 @@ const (
|
|||
IPV6_PMTUDISC_WANT = 0x1
|
||||
IPV6_RECVDSTOPTS = 0x3a
|
||||
IPV6_RECVERR = 0x19
|
||||
IPV6_RECVFRAGSIZE = 0x4d
|
||||
IPV6_RECVHOPLIMIT = 0x33
|
||||
IPV6_RECVHOPOPTS = 0x35
|
||||
IPV6_RECVORIGDSTADDR = 0x4a
|
||||
IPV6_RECVPATHMTU = 0x3c
|
||||
IPV6_RECVPKTINFO = 0x31
|
||||
IPV6_RECVRTHDR = 0x38
|
||||
|
@ -702,7 +714,9 @@ const (
|
|||
IPV6_RXDSTOPTS = 0x3b
|
||||
IPV6_RXHOPOPTS = 0x36
|
||||
IPV6_TCLASS = 0x43
|
||||
IPV6_TRANSPARENT = 0x4b
|
||||
IPV6_UNICAST_HOPS = 0x10
|
||||
IPV6_UNICAST_IF = 0x4c
|
||||
IPV6_V6ONLY = 0x1a
|
||||
IPV6_XFRM_POLICY = 0x23
|
||||
IP_ADD_MEMBERSHIP = 0x23
|
||||
|
@ -745,6 +759,7 @@ const (
|
|||
IP_PMTUDISC_PROBE = 0x3
|
||||
IP_PMTUDISC_WANT = 0x1
|
||||
IP_RECVERR = 0xb
|
||||
IP_RECVFRAGSIZE = 0x19
|
||||
IP_RECVOPTS = 0x6
|
||||
IP_RECVORIGDSTADDR = 0x14
|
||||
IP_RECVRETOPTS = 0x7
|
||||
|
@ -782,6 +797,7 @@ const (
|
|||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
KEYCTL_REVOKE = 0x3
|
||||
KEYCTL_SEARCH = 0xa
|
||||
KEYCTL_SESSION_TO_PARENT = 0x12
|
||||
|
@ -915,6 +931,7 @@ const (
|
|||
MS_SILENT = 0x8000
|
||||
MS_SLAVE = 0x80000
|
||||
MS_STRICTATIME = 0x1000000
|
||||
MS_SUBMOUNT = 0x4000000
|
||||
MS_SYNC = 0x4
|
||||
MS_SYNCHRONOUS = 0x10
|
||||
MS_UNBINDABLE = 0x20000
|
||||
|
@ -929,6 +946,7 @@ const (
|
|||
NETLINK_DNRTMSG = 0xe
|
||||
NETLINK_DROP_MEMBERSHIP = 0x2
|
||||
NETLINK_ECRYPTFS = 0x13
|
||||
NETLINK_EXT_ACK = 0xb
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
|
@ -947,6 +965,7 @@ const (
|
|||
NETLINK_RX_RING = 0x6
|
||||
NETLINK_SCSITRANSPORT = 0x12
|
||||
NETLINK_SELINUX = 0x7
|
||||
NETLINK_SMC = 0x16
|
||||
NETLINK_SOCK_DIAG = 0x4
|
||||
NETLINK_TX_RING = 0x7
|
||||
NETLINK_UNUSED = 0x1
|
||||
|
@ -967,8 +986,10 @@ const (
|
|||
NLMSG_NOOP = 0x1
|
||||
NLMSG_OVERRUN = 0x4
|
||||
NLM_F_ACK = 0x4
|
||||
NLM_F_ACK_TLVS = 0x200
|
||||
NLM_F_APPEND = 0x800
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CAPPED = 0x100
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
|
@ -1025,6 +1046,7 @@ const (
|
|||
PACKET_FANOUT_EBPF = 0x7
|
||||
PACKET_FANOUT_FLAG_DEFRAG = 0x8000
|
||||
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
|
||||
PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
|
||||
PACKET_FANOUT_HASH = 0x0
|
||||
PACKET_FANOUT_LB = 0x1
|
||||
PACKET_FANOUT_QM = 0x5
|
||||
|
@ -1166,7 +1188,7 @@ const (
|
|||
PR_SET_NO_NEW_PRIVS = 0x26
|
||||
PR_SET_PDEATHSIG = 0x1
|
||||
PR_SET_PTRACER = 0x59616d61
|
||||
PR_SET_PTRACER_ANY = -0x1
|
||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
||||
PR_SET_SECCOMP = 0x16
|
||||
PR_SET_SECUREBITS = 0x1c
|
||||
PR_SET_THP_DISABLE = 0x29
|
||||
|
@ -1257,7 +1279,7 @@ const (
|
|||
RLIMIT_RTTIME = 0xf
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = -0x1
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
|
@ -1282,7 +1304,7 @@ const (
|
|||
RTAX_UNSPEC = 0x0
|
||||
RTAX_WINDOW = 0x3
|
||||
RTA_ALIGNTO = 0x4
|
||||
RTA_MAX = 0x19
|
||||
RTA_MAX = 0x1a
|
||||
RTCF_DIRECTSRC = 0x4000000
|
||||
RTCF_DOREDIRECT = 0x1000000
|
||||
RTCF_LOG = 0x2000000
|
||||
|
@ -1326,6 +1348,7 @@ const (
|
|||
RTM_DELLINK = 0x11
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
RTM_DELNSID = 0x59
|
||||
RTM_DELQDISC = 0x25
|
||||
RTM_DELROUTE = 0x19
|
||||
|
@ -1334,6 +1357,7 @@ const (
|
|||
RTM_DELTFILTER = 0x2d
|
||||
RTM_F_CLONED = 0x200
|
||||
RTM_F_EQUALIZE = 0x400
|
||||
RTM_F_FIB_MATCH = 0x2000
|
||||
RTM_F_LOOKUP_TABLE = 0x1000
|
||||
RTM_F_NOTIFY = 0x100
|
||||
RTM_F_PREFIX = 0x800
|
||||
|
@ -1355,10 +1379,11 @@ const (
|
|||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x5f
|
||||
RTM_MAX = 0x63
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
|
@ -1373,8 +1398,8 @@ const (
|
|||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x14
|
||||
RTM_NR_MSGTYPES = 0x50
|
||||
RTM_NR_FAMILIES = 0x15
|
||||
RTM_NR_MSGTYPES = 0x54
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
|
@ -1385,6 +1410,7 @@ const (
|
|||
RTNH_F_OFFLOAD = 0x8
|
||||
RTNH_F_ONLINK = 0x4
|
||||
RTNH_F_PERVASIVE = 0x2
|
||||
RTNH_F_UNRESOLVED = 0x20
|
||||
RTN_MAX = 0xb
|
||||
RTPROT_BABEL = 0x2a
|
||||
RTPROT_BIRD = 0xc
|
||||
|
@ -1415,6 +1441,7 @@ const (
|
|||
SCM_TIMESTAMP = 0x1d
|
||||
SCM_TIMESTAMPING = 0x25
|
||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
|
@ -1553,6 +1580,7 @@ const (
|
|||
SO_BSDCOMPAT = 0xe
|
||||
SO_BUSY_POLL = 0x2e
|
||||
SO_CNX_ADVICE = 0x35
|
||||
SO_COOKIE = 0x39
|
||||
SO_DEBUG = 0x1
|
||||
SO_DETACH_BPF = 0x1b
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
|
@ -1561,11 +1589,13 @@ const (
|
|||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
SO_INCOMING_NAPI_ID = 0x38
|
||||
SO_KEEPALIVE = 0x9
|
||||
SO_LINGER = 0xd
|
||||
SO_LOCK_FILTER = 0x2c
|
||||
SO_MARK = 0x24
|
||||
SO_MAX_PACING_RATE = 0x2f
|
||||
SO_MEMINFO = 0x37
|
||||
SO_NOFCS = 0x2b
|
||||
SO_NO_CHECK = 0xb
|
||||
SO_OOBINLINE = 0xa
|
||||
|
@ -1573,6 +1603,7 @@ const (
|
|||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x11
|
||||
SO_PEERGROUPS = 0x3b
|
||||
SO_PEERNAME = 0x1c
|
||||
SO_PEERSEC = 0x1f
|
||||
SO_PRIORITY = 0xc
|
||||
|
@ -1669,6 +1700,7 @@ const (
|
|||
TCP_CORK = 0x3
|
||||
TCP_DEFER_ACCEPT = 0x9
|
||||
TCP_FASTOPEN = 0x17
|
||||
TCP_FASTOPEN_CONNECT = 0x1e
|
||||
TCP_INFO = 0xb
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
|
@ -1728,6 +1760,7 @@ const (
|
|||
TIOCGPKT = 0x80045438
|
||||
TIOCGPTLCK = 0x80045439
|
||||
TIOCGPTN = 0x80045430
|
||||
TIOCGPTPEER = 0x5441
|
||||
TIOCGRS485 = 0x542e
|
||||
TIOCGSERIAL = 0x541e
|
||||
TIOCGSID = 0x5429
|
||||
|
@ -1811,6 +1844,8 @@ const (
|
|||
TUNSETVNETHDRSZ = 0x400454d8
|
||||
TUNSETVNETLE = 0x400454dc
|
||||
UMOUNT_NOFOLLOW = 0x8
|
||||
UTIME_NOW = 0x3fffffff
|
||||
UTIME_OMIT = 0x3ffffffe
|
||||
VDISCARD = 0xd
|
||||
VEOF = 0x4
|
||||
VEOL = 0xb
|
||||
|
@ -1840,6 +1875,17 @@ const (
|
|||
WALL = 0x40000000
|
||||
WCLONE = 0x80000000
|
||||
WCONTINUED = 0x8
|
||||
WDIOC_GETBOOTSTATUS = 0x80045702
|
||||
WDIOC_GETPRETIMEOUT = 0x80045709
|
||||
WDIOC_GETSTATUS = 0x80045701
|
||||
WDIOC_GETSUPPORT = 0x80285700
|
||||
WDIOC_GETTEMP = 0x80045703
|
||||
WDIOC_GETTIMELEFT = 0x8004570a
|
||||
WDIOC_GETTIMEOUT = 0x80045707
|
||||
WDIOC_KEEPALIVE = 0x80045705
|
||||
WDIOC_SETOPTIONS = 0x80045704
|
||||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
|
@ -2020,7 +2066,6 @@ const (
|
|||
SIGTSTP = syscall.Signal(0x14)
|
||||
SIGTTIN = syscall.Signal(0x15)
|
||||
SIGTTOU = syscall.Signal(0x16)
|
||||
SIGUNUSED = syscall.Signal(0x1f)
|
||||
SIGURG = syscall.Signal(0x17)
|
||||
SIGUSR1 = syscall.Signal(0xa)
|
||||
SIGUSR2 = syscall.Signal(0xc)
|
||||
|
|
|
@ -36,7 +36,7 @@ const (
|
|||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2b
|
||||
AF_MAX = 0x2c
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
|
@ -51,6 +51,7 @@ const (
|
|||
AF_ROUTE = 0x10
|
||||
AF_RXRPC = 0x21
|
||||
AF_SECURITY = 0xe
|
||||
AF_SMC = 0x2b
|
||||
AF_SNA = 0x16
|
||||
AF_TIPC = 0x1e
|
||||
AF_UNIX = 0x1
|
||||
|
@ -129,6 +130,7 @@ const (
|
|||
ARPHRD_TUNNEL = 0x300
|
||||
ARPHRD_TUNNEL6 = 0x301
|
||||
ARPHRD_VOID = 0xffff
|
||||
ARPHRD_VSOCKMON = 0x33a
|
||||
ARPHRD_X25 = 0x10f
|
||||
B0 = 0x0
|
||||
B1000000 = 0x1008
|
||||
|
@ -392,6 +394,7 @@ const (
|
|||
ETH_P_FIP = 0x8914
|
||||
ETH_P_HDLC = 0x19
|
||||
ETH_P_HSR = 0x892f
|
||||
ETH_P_IBOE = 0x8915
|
||||
ETH_P_IEEE802154 = 0xf6
|
||||
ETH_P_IEEEPUP = 0xa00
|
||||
ETH_P_IEEEPUPAT = 0xa01
|
||||
|
@ -453,6 +456,8 @@ const (
|
|||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x1000
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
|
||||
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
|
||||
|
@ -618,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -657,8 +663,10 @@ const (
|
|||
IPV6_2292PKTOPTIONS = 0x6
|
||||
IPV6_2292RTHDR = 0x5
|
||||
IPV6_ADDRFORM = 0x1
|
||||
IPV6_ADDR_PREFERENCES = 0x48
|
||||
IPV6_ADD_MEMBERSHIP = 0x14
|
||||
IPV6_AUTHHDR = 0xa
|
||||
IPV6_AUTOFLOWLABEL = 0x46
|
||||
IPV6_CHECKSUM = 0x7
|
||||
IPV6_DONTFRAG = 0x3e
|
||||
IPV6_DROP_MEMBERSHIP = 0x15
|
||||
|
@ -671,12 +679,14 @@ const (
|
|||
IPV6_JOIN_GROUP = 0x14
|
||||
IPV6_LEAVE_ANYCAST = 0x1c
|
||||
IPV6_LEAVE_GROUP = 0x15
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
IPV6_NEXTHOP = 0x9
|
||||
IPV6_ORIGDSTADDR = 0x4a
|
||||
IPV6_PATHMTU = 0x3d
|
||||
IPV6_PKTINFO = 0x32
|
||||
IPV6_PMTUDISC_DO = 0x2
|
||||
|
@ -687,8 +697,10 @@ const (
|
|||
IPV6_PMTUDISC_WANT = 0x1
|
||||
IPV6_RECVDSTOPTS = 0x3a
|
||||
IPV6_RECVERR = 0x19
|
||||
IPV6_RECVFRAGSIZE = 0x4d
|
||||
IPV6_RECVHOPLIMIT = 0x33
|
||||
IPV6_RECVHOPOPTS = 0x35
|
||||
IPV6_RECVORIGDSTADDR = 0x4a
|
||||
IPV6_RECVPATHMTU = 0x3c
|
||||
IPV6_RECVPKTINFO = 0x31
|
||||
IPV6_RECVRTHDR = 0x38
|
||||
|
@ -702,7 +714,9 @@ const (
|
|||
IPV6_RXDSTOPTS = 0x3b
|
||||
IPV6_RXHOPOPTS = 0x36
|
||||
IPV6_TCLASS = 0x43
|
||||
IPV6_TRANSPARENT = 0x4b
|
||||
IPV6_UNICAST_HOPS = 0x10
|
||||
IPV6_UNICAST_IF = 0x4c
|
||||
IPV6_V6ONLY = 0x1a
|
||||
IPV6_XFRM_POLICY = 0x23
|
||||
IP_ADD_MEMBERSHIP = 0x23
|
||||
|
@ -745,6 +759,7 @@ const (
|
|||
IP_PMTUDISC_PROBE = 0x3
|
||||
IP_PMTUDISC_WANT = 0x1
|
||||
IP_RECVERR = 0xb
|
||||
IP_RECVFRAGSIZE = 0x19
|
||||
IP_RECVOPTS = 0x6
|
||||
IP_RECVORIGDSTADDR = 0x14
|
||||
IP_RECVRETOPTS = 0x7
|
||||
|
@ -782,6 +797,7 @@ const (
|
|||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
KEYCTL_REVOKE = 0x3
|
||||
KEYCTL_SEARCH = 0xa
|
||||
KEYCTL_SESSION_TO_PARENT = 0x12
|
||||
|
@ -914,6 +930,7 @@ const (
|
|||
MS_SILENT = 0x8000
|
||||
MS_SLAVE = 0x80000
|
||||
MS_STRICTATIME = 0x1000000
|
||||
MS_SUBMOUNT = 0x4000000
|
||||
MS_SYNC = 0x4
|
||||
MS_SYNCHRONOUS = 0x10
|
||||
MS_UNBINDABLE = 0x20000
|
||||
|
@ -928,6 +945,7 @@ const (
|
|||
NETLINK_DNRTMSG = 0xe
|
||||
NETLINK_DROP_MEMBERSHIP = 0x2
|
||||
NETLINK_ECRYPTFS = 0x13
|
||||
NETLINK_EXT_ACK = 0xb
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
|
@ -946,6 +964,7 @@ const (
|
|||
NETLINK_RX_RING = 0x6
|
||||
NETLINK_SCSITRANSPORT = 0x12
|
||||
NETLINK_SELINUX = 0x7
|
||||
NETLINK_SMC = 0x16
|
||||
NETLINK_SOCK_DIAG = 0x4
|
||||
NETLINK_TX_RING = 0x7
|
||||
NETLINK_UNUSED = 0x1
|
||||
|
@ -966,8 +985,10 @@ const (
|
|||
NLMSG_NOOP = 0x1
|
||||
NLMSG_OVERRUN = 0x4
|
||||
NLM_F_ACK = 0x4
|
||||
NLM_F_ACK_TLVS = 0x200
|
||||
NLM_F_APPEND = 0x800
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CAPPED = 0x100
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
|
@ -1024,6 +1045,7 @@ const (
|
|||
PACKET_FANOUT_EBPF = 0x7
|
||||
PACKET_FANOUT_FLAG_DEFRAG = 0x8000
|
||||
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
|
||||
PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
|
||||
PACKET_FANOUT_HASH = 0x0
|
||||
PACKET_FANOUT_LB = 0x1
|
||||
PACKET_FANOUT_QM = 0x5
|
||||
|
@ -1261,7 +1283,7 @@ const (
|
|||
RLIMIT_RTTIME = 0xf
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = -0x1
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
|
@ -1286,7 +1308,7 @@ const (
|
|||
RTAX_UNSPEC = 0x0
|
||||
RTAX_WINDOW = 0x3
|
||||
RTA_ALIGNTO = 0x4
|
||||
RTA_MAX = 0x19
|
||||
RTA_MAX = 0x1a
|
||||
RTCF_DIRECTSRC = 0x4000000
|
||||
RTCF_DOREDIRECT = 0x1000000
|
||||
RTCF_LOG = 0x2000000
|
||||
|
@ -1330,6 +1352,7 @@ const (
|
|||
RTM_DELLINK = 0x11
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
RTM_DELNSID = 0x59
|
||||
RTM_DELQDISC = 0x25
|
||||
RTM_DELROUTE = 0x19
|
||||
|
@ -1338,6 +1361,7 @@ const (
|
|||
RTM_DELTFILTER = 0x2d
|
||||
RTM_F_CLONED = 0x200
|
||||
RTM_F_EQUALIZE = 0x400
|
||||
RTM_F_FIB_MATCH = 0x2000
|
||||
RTM_F_LOOKUP_TABLE = 0x1000
|
||||
RTM_F_NOTIFY = 0x100
|
||||
RTM_F_PREFIX = 0x800
|
||||
|
@ -1359,10 +1383,11 @@ const (
|
|||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x5f
|
||||
RTM_MAX = 0x63
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
|
@ -1377,8 +1402,8 @@ const (
|
|||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x14
|
||||
RTM_NR_MSGTYPES = 0x50
|
||||
RTM_NR_FAMILIES = 0x15
|
||||
RTM_NR_MSGTYPES = 0x54
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
|
@ -1389,6 +1414,7 @@ const (
|
|||
RTNH_F_OFFLOAD = 0x8
|
||||
RTNH_F_ONLINK = 0x4
|
||||
RTNH_F_PERVASIVE = 0x2
|
||||
RTNH_F_UNRESOLVED = 0x20
|
||||
RTN_MAX = 0xb
|
||||
RTPROT_BABEL = 0x2a
|
||||
RTPROT_BIRD = 0xc
|
||||
|
@ -1419,6 +1445,7 @@ const (
|
|||
SCM_TIMESTAMP = 0x1d
|
||||
SCM_TIMESTAMPING = 0x25
|
||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
|
@ -1557,6 +1584,7 @@ const (
|
|||
SO_BSDCOMPAT = 0xe
|
||||
SO_BUSY_POLL = 0x2e
|
||||
SO_CNX_ADVICE = 0x35
|
||||
SO_COOKIE = 0x39
|
||||
SO_DEBUG = 0x1
|
||||
SO_DETACH_BPF = 0x1b
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
|
@ -1565,11 +1593,13 @@ const (
|
|||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
SO_INCOMING_NAPI_ID = 0x38
|
||||
SO_KEEPALIVE = 0x9
|
||||
SO_LINGER = 0xd
|
||||
SO_LOCK_FILTER = 0x2c
|
||||
SO_MARK = 0x24
|
||||
SO_MAX_PACING_RATE = 0x2f
|
||||
SO_MEMINFO = 0x37
|
||||
SO_NOFCS = 0x2b
|
||||
SO_NO_CHECK = 0xb
|
||||
SO_OOBINLINE = 0xa
|
||||
|
@ -1577,6 +1607,7 @@ const (
|
|||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x11
|
||||
SO_PEERGROUPS = 0x3b
|
||||
SO_PEERNAME = 0x1c
|
||||
SO_PEERSEC = 0x1f
|
||||
SO_PRIORITY = 0xc
|
||||
|
@ -1673,6 +1704,7 @@ const (
|
|||
TCP_CORK = 0x3
|
||||
TCP_DEFER_ACCEPT = 0x9
|
||||
TCP_FASTOPEN = 0x17
|
||||
TCP_FASTOPEN_CONNECT = 0x1e
|
||||
TCP_INFO = 0xb
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
|
@ -1732,6 +1764,7 @@ const (
|
|||
TIOCGPKT = 0x80045438
|
||||
TIOCGPTLCK = 0x80045439
|
||||
TIOCGPTN = 0x80045430
|
||||
TIOCGPTPEER = 0x5441
|
||||
TIOCGRS485 = 0x542e
|
||||
TIOCGSERIAL = 0x541e
|
||||
TIOCGSID = 0x5429
|
||||
|
@ -1815,6 +1848,8 @@ const (
|
|||
TUNSETVNETHDRSZ = 0x400454d8
|
||||
TUNSETVNETLE = 0x400454dc
|
||||
UMOUNT_NOFOLLOW = 0x8
|
||||
UTIME_NOW = 0x3fffffff
|
||||
UTIME_OMIT = 0x3ffffffe
|
||||
VDISCARD = 0xd
|
||||
VEOF = 0x4
|
||||
VEOL = 0xb
|
||||
|
@ -1844,6 +1879,17 @@ const (
|
|||
WALL = 0x40000000
|
||||
WCLONE = 0x80000000
|
||||
WCONTINUED = 0x8
|
||||
WDIOC_GETBOOTSTATUS = 0x80045702
|
||||
WDIOC_GETPRETIMEOUT = 0x80045709
|
||||
WDIOC_GETSTATUS = 0x80045701
|
||||
WDIOC_GETSUPPORT = 0x80285700
|
||||
WDIOC_GETTEMP = 0x80045703
|
||||
WDIOC_GETTIMELEFT = 0x8004570a
|
||||
WDIOC_GETTIMEOUT = 0x80045707
|
||||
WDIOC_KEEPALIVE = 0x80045705
|
||||
WDIOC_SETOPTIONS = 0x80045704
|
||||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
|
@ -2024,7 +2070,6 @@ const (
|
|||
SIGTSTP = syscall.Signal(0x14)
|
||||
SIGTTIN = syscall.Signal(0x15)
|
||||
SIGTTOU = syscall.Signal(0x16)
|
||||
SIGUNUSED = syscall.Signal(0x1f)
|
||||
SIGURG = syscall.Signal(0x17)
|
||||
SIGUSR1 = syscall.Signal(0xa)
|
||||
SIGUSR2 = syscall.Signal(0xc)
|
||||
|
|
|
@ -36,7 +36,7 @@ const (
|
|||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2b
|
||||
AF_MAX = 0x2c
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
|
@ -51,6 +51,7 @@ const (
|
|||
AF_ROUTE = 0x10
|
||||
AF_RXRPC = 0x21
|
||||
AF_SECURITY = 0xe
|
||||
AF_SMC = 0x2b
|
||||
AF_SNA = 0x16
|
||||
AF_TIPC = 0x1e
|
||||
AF_UNIX = 0x1
|
||||
|
@ -129,6 +130,7 @@ const (
|
|||
ARPHRD_TUNNEL = 0x300
|
||||
ARPHRD_TUNNEL6 = 0x301
|
||||
ARPHRD_VOID = 0xffff
|
||||
ARPHRD_VSOCKMON = 0x33a
|
||||
ARPHRD_X25 = 0x10f
|
||||
B0 = 0x0
|
||||
B1000000 = 0x1008
|
||||
|
@ -393,6 +395,7 @@ const (
|
|||
ETH_P_FIP = 0x8914
|
||||
ETH_P_HDLC = 0x19
|
||||
ETH_P_HSR = 0x892f
|
||||
ETH_P_IBOE = 0x8915
|
||||
ETH_P_IEEE802154 = 0xf6
|
||||
ETH_P_IEEEPUP = 0xa00
|
||||
ETH_P_IEEEPUPAT = 0xa01
|
||||
|
@ -441,6 +444,7 @@ const (
|
|||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
EXTRA_MAGIC = 0x45585401
|
||||
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||
FALLOC_FL_INSERT_RANGE = 0x20
|
||||
FALLOC_FL_KEEP_SIZE = 0x1
|
||||
|
@ -454,6 +458,8 @@ const (
|
|||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x1000
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
|
||||
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
|
||||
|
@ -619,6 +625,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -658,8 +665,10 @@ const (
|
|||
IPV6_2292PKTOPTIONS = 0x6
|
||||
IPV6_2292RTHDR = 0x5
|
||||
IPV6_ADDRFORM = 0x1
|
||||
IPV6_ADDR_PREFERENCES = 0x48
|
||||
IPV6_ADD_MEMBERSHIP = 0x14
|
||||
IPV6_AUTHHDR = 0xa
|
||||
IPV6_AUTOFLOWLABEL = 0x46
|
||||
IPV6_CHECKSUM = 0x7
|
||||
IPV6_DONTFRAG = 0x3e
|
||||
IPV6_DROP_MEMBERSHIP = 0x15
|
||||
|
@ -672,12 +681,14 @@ const (
|
|||
IPV6_JOIN_GROUP = 0x14
|
||||
IPV6_LEAVE_ANYCAST = 0x1c
|
||||
IPV6_LEAVE_GROUP = 0x15
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
IPV6_NEXTHOP = 0x9
|
||||
IPV6_ORIGDSTADDR = 0x4a
|
||||
IPV6_PATHMTU = 0x3d
|
||||
IPV6_PKTINFO = 0x32
|
||||
IPV6_PMTUDISC_DO = 0x2
|
||||
|
@ -688,8 +699,10 @@ const (
|
|||
IPV6_PMTUDISC_WANT = 0x1
|
||||
IPV6_RECVDSTOPTS = 0x3a
|
||||
IPV6_RECVERR = 0x19
|
||||
IPV6_RECVFRAGSIZE = 0x4d
|
||||
IPV6_RECVHOPLIMIT = 0x33
|
||||
IPV6_RECVHOPOPTS = 0x35
|
||||
IPV6_RECVORIGDSTADDR = 0x4a
|
||||
IPV6_RECVPATHMTU = 0x3c
|
||||
IPV6_RECVPKTINFO = 0x31
|
||||
IPV6_RECVRTHDR = 0x38
|
||||
|
@ -703,7 +716,9 @@ const (
|
|||
IPV6_RXDSTOPTS = 0x3b
|
||||
IPV6_RXHOPOPTS = 0x36
|
||||
IPV6_TCLASS = 0x43
|
||||
IPV6_TRANSPARENT = 0x4b
|
||||
IPV6_UNICAST_HOPS = 0x10
|
||||
IPV6_UNICAST_IF = 0x4c
|
||||
IPV6_V6ONLY = 0x1a
|
||||
IPV6_XFRM_POLICY = 0x23
|
||||
IP_ADD_MEMBERSHIP = 0x23
|
||||
|
@ -746,6 +761,7 @@ const (
|
|||
IP_PMTUDISC_PROBE = 0x3
|
||||
IP_PMTUDISC_WANT = 0x1
|
||||
IP_RECVERR = 0xb
|
||||
IP_RECVFRAGSIZE = 0x19
|
||||
IP_RECVOPTS = 0x6
|
||||
IP_RECVORIGDSTADDR = 0x14
|
||||
IP_RECVRETOPTS = 0x7
|
||||
|
@ -783,6 +799,7 @@ const (
|
|||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
KEYCTL_REVOKE = 0x3
|
||||
KEYCTL_SEARCH = 0xa
|
||||
KEYCTL_SESSION_TO_PARENT = 0x12
|
||||
|
@ -915,6 +932,7 @@ const (
|
|||
MS_SILENT = 0x8000
|
||||
MS_SLAVE = 0x80000
|
||||
MS_STRICTATIME = 0x1000000
|
||||
MS_SUBMOUNT = 0x4000000
|
||||
MS_SYNC = 0x4
|
||||
MS_SYNCHRONOUS = 0x10
|
||||
MS_UNBINDABLE = 0x20000
|
||||
|
@ -929,6 +947,7 @@ const (
|
|||
NETLINK_DNRTMSG = 0xe
|
||||
NETLINK_DROP_MEMBERSHIP = 0x2
|
||||
NETLINK_ECRYPTFS = 0x13
|
||||
NETLINK_EXT_ACK = 0xb
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
|
@ -947,6 +966,7 @@ const (
|
|||
NETLINK_RX_RING = 0x6
|
||||
NETLINK_SCSITRANSPORT = 0x12
|
||||
NETLINK_SELINUX = 0x7
|
||||
NETLINK_SMC = 0x16
|
||||
NETLINK_SOCK_DIAG = 0x4
|
||||
NETLINK_TX_RING = 0x7
|
||||
NETLINK_UNUSED = 0x1
|
||||
|
@ -967,8 +987,10 @@ const (
|
|||
NLMSG_NOOP = 0x1
|
||||
NLMSG_OVERRUN = 0x4
|
||||
NLM_F_ACK = 0x4
|
||||
NLM_F_ACK_TLVS = 0x200
|
||||
NLM_F_APPEND = 0x800
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CAPPED = 0x100
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
|
@ -1025,6 +1047,7 @@ const (
|
|||
PACKET_FANOUT_EBPF = 0x7
|
||||
PACKET_FANOUT_FLAG_DEFRAG = 0x8000
|
||||
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
|
||||
PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
|
||||
PACKET_FANOUT_HASH = 0x0
|
||||
PACKET_FANOUT_LB = 0x1
|
||||
PACKET_FANOUT_QM = 0x5
|
||||
|
@ -1166,7 +1189,7 @@ const (
|
|||
PR_SET_NO_NEW_PRIVS = 0x26
|
||||
PR_SET_PDEATHSIG = 0x1
|
||||
PR_SET_PTRACER = 0x59616d61
|
||||
PR_SET_PTRACER_ANY = -0x1
|
||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
||||
PR_SET_SECCOMP = 0x16
|
||||
PR_SET_SECUREBITS = 0x1c
|
||||
PR_SET_THP_DISABLE = 0x29
|
||||
|
@ -1246,7 +1269,7 @@ const (
|
|||
RLIMIT_RTTIME = 0xf
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = -0x1
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
|
@ -1271,7 +1294,7 @@ const (
|
|||
RTAX_UNSPEC = 0x0
|
||||
RTAX_WINDOW = 0x3
|
||||
RTA_ALIGNTO = 0x4
|
||||
RTA_MAX = 0x19
|
||||
RTA_MAX = 0x1a
|
||||
RTCF_DIRECTSRC = 0x4000000
|
||||
RTCF_DOREDIRECT = 0x1000000
|
||||
RTCF_LOG = 0x2000000
|
||||
|
@ -1315,6 +1338,7 @@ const (
|
|||
RTM_DELLINK = 0x11
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
RTM_DELNSID = 0x59
|
||||
RTM_DELQDISC = 0x25
|
||||
RTM_DELROUTE = 0x19
|
||||
|
@ -1323,6 +1347,7 @@ const (
|
|||
RTM_DELTFILTER = 0x2d
|
||||
RTM_F_CLONED = 0x200
|
||||
RTM_F_EQUALIZE = 0x400
|
||||
RTM_F_FIB_MATCH = 0x2000
|
||||
RTM_F_LOOKUP_TABLE = 0x1000
|
||||
RTM_F_NOTIFY = 0x100
|
||||
RTM_F_PREFIX = 0x800
|
||||
|
@ -1344,10 +1369,11 @@ const (
|
|||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x5f
|
||||
RTM_MAX = 0x63
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
|
@ -1362,8 +1388,8 @@ const (
|
|||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x14
|
||||
RTM_NR_MSGTYPES = 0x50
|
||||
RTM_NR_FAMILIES = 0x15
|
||||
RTM_NR_MSGTYPES = 0x54
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
|
@ -1374,6 +1400,7 @@ const (
|
|||
RTNH_F_OFFLOAD = 0x8
|
||||
RTNH_F_ONLINK = 0x4
|
||||
RTNH_F_PERVASIVE = 0x2
|
||||
RTNH_F_UNRESOLVED = 0x20
|
||||
RTN_MAX = 0xb
|
||||
RTPROT_BABEL = 0x2a
|
||||
RTPROT_BIRD = 0xc
|
||||
|
@ -1404,6 +1431,7 @@ const (
|
|||
SCM_TIMESTAMP = 0x1d
|
||||
SCM_TIMESTAMPING = 0x25
|
||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
|
@ -1542,6 +1570,7 @@ const (
|
|||
SO_BSDCOMPAT = 0xe
|
||||
SO_BUSY_POLL = 0x2e
|
||||
SO_CNX_ADVICE = 0x35
|
||||
SO_COOKIE = 0x39
|
||||
SO_DEBUG = 0x1
|
||||
SO_DETACH_BPF = 0x1b
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
|
@ -1550,11 +1579,13 @@ const (
|
|||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
SO_INCOMING_NAPI_ID = 0x38
|
||||
SO_KEEPALIVE = 0x9
|
||||
SO_LINGER = 0xd
|
||||
SO_LOCK_FILTER = 0x2c
|
||||
SO_MARK = 0x24
|
||||
SO_MAX_PACING_RATE = 0x2f
|
||||
SO_MEMINFO = 0x37
|
||||
SO_NOFCS = 0x2b
|
||||
SO_NO_CHECK = 0xb
|
||||
SO_OOBINLINE = 0xa
|
||||
|
@ -1562,6 +1593,7 @@ const (
|
|||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x11
|
||||
SO_PEERGROUPS = 0x3b
|
||||
SO_PEERNAME = 0x1c
|
||||
SO_PEERSEC = 0x1f
|
||||
SO_PRIORITY = 0xc
|
||||
|
@ -1658,6 +1690,7 @@ const (
|
|||
TCP_CORK = 0x3
|
||||
TCP_DEFER_ACCEPT = 0x9
|
||||
TCP_FASTOPEN = 0x17
|
||||
TCP_FASTOPEN_CONNECT = 0x1e
|
||||
TCP_INFO = 0xb
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
|
@ -1717,6 +1750,7 @@ const (
|
|||
TIOCGPKT = 0x80045438
|
||||
TIOCGPTLCK = 0x80045439
|
||||
TIOCGPTN = 0x80045430
|
||||
TIOCGPTPEER = 0x5441
|
||||
TIOCGRS485 = 0x542e
|
||||
TIOCGSERIAL = 0x541e
|
||||
TIOCGSID = 0x5429
|
||||
|
@ -1800,6 +1834,8 @@ const (
|
|||
TUNSETVNETHDRSZ = 0x400454d8
|
||||
TUNSETVNETLE = 0x400454dc
|
||||
UMOUNT_NOFOLLOW = 0x8
|
||||
UTIME_NOW = 0x3fffffff
|
||||
UTIME_OMIT = 0x3ffffffe
|
||||
VDISCARD = 0xd
|
||||
VEOF = 0x4
|
||||
VEOL = 0xb
|
||||
|
@ -1829,6 +1865,17 @@ const (
|
|||
WALL = 0x40000000
|
||||
WCLONE = 0x80000000
|
||||
WCONTINUED = 0x8
|
||||
WDIOC_GETBOOTSTATUS = 0x80045702
|
||||
WDIOC_GETPRETIMEOUT = 0x80045709
|
||||
WDIOC_GETSTATUS = 0x80045701
|
||||
WDIOC_GETSUPPORT = 0x80285700
|
||||
WDIOC_GETTEMP = 0x80045703
|
||||
WDIOC_GETTIMELEFT = 0x8004570a
|
||||
WDIOC_GETTIMEOUT = 0x80045707
|
||||
WDIOC_KEEPALIVE = 0x80045705
|
||||
WDIOC_SETOPTIONS = 0x80045704
|
||||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
|
@ -2009,7 +2056,6 @@ const (
|
|||
SIGTSTP = syscall.Signal(0x14)
|
||||
SIGTTIN = syscall.Signal(0x15)
|
||||
SIGTTOU = syscall.Signal(0x16)
|
||||
SIGUNUSED = syscall.Signal(0x1f)
|
||||
SIGURG = syscall.Signal(0x17)
|
||||
SIGUSR1 = syscall.Signal(0xa)
|
||||
SIGUSR2 = syscall.Signal(0xc)
|
||||
|
|
|
@ -36,7 +36,7 @@ const (
|
|||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2b
|
||||
AF_MAX = 0x2c
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
|
@ -51,6 +51,7 @@ const (
|
|||
AF_ROUTE = 0x10
|
||||
AF_RXRPC = 0x21
|
||||
AF_SECURITY = 0xe
|
||||
AF_SMC = 0x2b
|
||||
AF_SNA = 0x16
|
||||
AF_TIPC = 0x1e
|
||||
AF_UNIX = 0x1
|
||||
|
@ -129,6 +130,7 @@ const (
|
|||
ARPHRD_TUNNEL = 0x300
|
||||
ARPHRD_TUNNEL6 = 0x301
|
||||
ARPHRD_VOID = 0xffff
|
||||
ARPHRD_VSOCKMON = 0x33a
|
||||
ARPHRD_X25 = 0x10f
|
||||
B0 = 0x0
|
||||
B1000000 = 0x1008
|
||||
|
@ -392,6 +394,7 @@ const (
|
|||
ETH_P_FIP = 0x8914
|
||||
ETH_P_HDLC = 0x19
|
||||
ETH_P_HSR = 0x892f
|
||||
ETH_P_IBOE = 0x8915
|
||||
ETH_P_IEEE802154 = 0xf6
|
||||
ETH_P_IEEEPUP = 0xa00
|
||||
ETH_P_IEEEPUPAT = 0xa01
|
||||
|
@ -453,6 +456,8 @@ const (
|
|||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x2000
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
|
||||
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
|
||||
|
@ -618,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -657,8 +663,10 @@ const (
|
|||
IPV6_2292PKTOPTIONS = 0x6
|
||||
IPV6_2292RTHDR = 0x5
|
||||
IPV6_ADDRFORM = 0x1
|
||||
IPV6_ADDR_PREFERENCES = 0x48
|
||||
IPV6_ADD_MEMBERSHIP = 0x14
|
||||
IPV6_AUTHHDR = 0xa
|
||||
IPV6_AUTOFLOWLABEL = 0x46
|
||||
IPV6_CHECKSUM = 0x7
|
||||
IPV6_DONTFRAG = 0x3e
|
||||
IPV6_DROP_MEMBERSHIP = 0x15
|
||||
|
@ -671,12 +679,14 @@ const (
|
|||
IPV6_JOIN_GROUP = 0x14
|
||||
IPV6_LEAVE_ANYCAST = 0x1c
|
||||
IPV6_LEAVE_GROUP = 0x15
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
IPV6_NEXTHOP = 0x9
|
||||
IPV6_ORIGDSTADDR = 0x4a
|
||||
IPV6_PATHMTU = 0x3d
|
||||
IPV6_PKTINFO = 0x32
|
||||
IPV6_PMTUDISC_DO = 0x2
|
||||
|
@ -687,8 +697,10 @@ const (
|
|||
IPV6_PMTUDISC_WANT = 0x1
|
||||
IPV6_RECVDSTOPTS = 0x3a
|
||||
IPV6_RECVERR = 0x19
|
||||
IPV6_RECVFRAGSIZE = 0x4d
|
||||
IPV6_RECVHOPLIMIT = 0x33
|
||||
IPV6_RECVHOPOPTS = 0x35
|
||||
IPV6_RECVORIGDSTADDR = 0x4a
|
||||
IPV6_RECVPATHMTU = 0x3c
|
||||
IPV6_RECVPKTINFO = 0x31
|
||||
IPV6_RECVRTHDR = 0x38
|
||||
|
@ -702,7 +714,9 @@ const (
|
|||
IPV6_RXDSTOPTS = 0x3b
|
||||
IPV6_RXHOPOPTS = 0x36
|
||||
IPV6_TCLASS = 0x43
|
||||
IPV6_TRANSPARENT = 0x4b
|
||||
IPV6_UNICAST_HOPS = 0x10
|
||||
IPV6_UNICAST_IF = 0x4c
|
||||
IPV6_V6ONLY = 0x1a
|
||||
IPV6_XFRM_POLICY = 0x23
|
||||
IP_ADD_MEMBERSHIP = 0x23
|
||||
|
@ -745,6 +759,7 @@ const (
|
|||
IP_PMTUDISC_PROBE = 0x3
|
||||
IP_PMTUDISC_WANT = 0x1
|
||||
IP_RECVERR = 0xb
|
||||
IP_RECVFRAGSIZE = 0x19
|
||||
IP_RECVOPTS = 0x6
|
||||
IP_RECVORIGDSTADDR = 0x14
|
||||
IP_RECVRETOPTS = 0x7
|
||||
|
@ -782,6 +797,7 @@ const (
|
|||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
KEYCTL_REVOKE = 0x3
|
||||
KEYCTL_SEARCH = 0xa
|
||||
KEYCTL_SESSION_TO_PARENT = 0x12
|
||||
|
@ -915,6 +931,7 @@ const (
|
|||
MS_SILENT = 0x8000
|
||||
MS_SLAVE = 0x80000
|
||||
MS_STRICTATIME = 0x1000000
|
||||
MS_SUBMOUNT = 0x4000000
|
||||
MS_SYNC = 0x4
|
||||
MS_SYNCHRONOUS = 0x10
|
||||
MS_UNBINDABLE = 0x20000
|
||||
|
@ -929,6 +946,7 @@ const (
|
|||
NETLINK_DNRTMSG = 0xe
|
||||
NETLINK_DROP_MEMBERSHIP = 0x2
|
||||
NETLINK_ECRYPTFS = 0x13
|
||||
NETLINK_EXT_ACK = 0xb
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
|
@ -947,6 +965,7 @@ const (
|
|||
NETLINK_RX_RING = 0x6
|
||||
NETLINK_SCSITRANSPORT = 0x12
|
||||
NETLINK_SELINUX = 0x7
|
||||
NETLINK_SMC = 0x16
|
||||
NETLINK_SOCK_DIAG = 0x4
|
||||
NETLINK_TX_RING = 0x7
|
||||
NETLINK_UNUSED = 0x1
|
||||
|
@ -967,8 +986,10 @@ const (
|
|||
NLMSG_NOOP = 0x1
|
||||
NLMSG_OVERRUN = 0x4
|
||||
NLM_F_ACK = 0x4
|
||||
NLM_F_ACK_TLVS = 0x200
|
||||
NLM_F_APPEND = 0x800
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CAPPED = 0x100
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
|
@ -1025,6 +1046,7 @@ const (
|
|||
PACKET_FANOUT_EBPF = 0x7
|
||||
PACKET_FANOUT_FLAG_DEFRAG = 0x8000
|
||||
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
|
||||
PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
|
||||
PACKET_FANOUT_HASH = 0x0
|
||||
PACKET_FANOUT_LB = 0x1
|
||||
PACKET_FANOUT_QM = 0x5
|
||||
|
@ -1258,7 +1280,7 @@ const (
|
|||
RLIMIT_RTTIME = 0xf
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = -0x1
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
|
@ -1283,7 +1305,7 @@ const (
|
|||
RTAX_UNSPEC = 0x0
|
||||
RTAX_WINDOW = 0x3
|
||||
RTA_ALIGNTO = 0x4
|
||||
RTA_MAX = 0x19
|
||||
RTA_MAX = 0x1a
|
||||
RTCF_DIRECTSRC = 0x4000000
|
||||
RTCF_DOREDIRECT = 0x1000000
|
||||
RTCF_LOG = 0x2000000
|
||||
|
@ -1327,6 +1349,7 @@ const (
|
|||
RTM_DELLINK = 0x11
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
RTM_DELNSID = 0x59
|
||||
RTM_DELQDISC = 0x25
|
||||
RTM_DELROUTE = 0x19
|
||||
|
@ -1335,6 +1358,7 @@ const (
|
|||
RTM_DELTFILTER = 0x2d
|
||||
RTM_F_CLONED = 0x200
|
||||
RTM_F_EQUALIZE = 0x400
|
||||
RTM_F_FIB_MATCH = 0x2000
|
||||
RTM_F_LOOKUP_TABLE = 0x1000
|
||||
RTM_F_NOTIFY = 0x100
|
||||
RTM_F_PREFIX = 0x800
|
||||
|
@ -1356,10 +1380,11 @@ const (
|
|||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x5f
|
||||
RTM_MAX = 0x63
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
|
@ -1374,8 +1399,8 @@ const (
|
|||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x14
|
||||
RTM_NR_MSGTYPES = 0x50
|
||||
RTM_NR_FAMILIES = 0x15
|
||||
RTM_NR_MSGTYPES = 0x54
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
|
@ -1386,6 +1411,7 @@ const (
|
|||
RTNH_F_OFFLOAD = 0x8
|
||||
RTNH_F_ONLINK = 0x4
|
||||
RTNH_F_PERVASIVE = 0x2
|
||||
RTNH_F_UNRESOLVED = 0x20
|
||||
RTN_MAX = 0xb
|
||||
RTPROT_BABEL = 0x2a
|
||||
RTPROT_BIRD = 0xc
|
||||
|
@ -1416,6 +1442,7 @@ const (
|
|||
SCM_TIMESTAMP = 0x1d
|
||||
SCM_TIMESTAMPING = 0x25
|
||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
|
@ -1554,6 +1581,7 @@ const (
|
|||
SO_BSDCOMPAT = 0xe
|
||||
SO_BUSY_POLL = 0x2e
|
||||
SO_CNX_ADVICE = 0x35
|
||||
SO_COOKIE = 0x39
|
||||
SO_DEBUG = 0x1
|
||||
SO_DETACH_BPF = 0x1b
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
|
@ -1562,11 +1590,13 @@ const (
|
|||
SO_ERROR = 0x1007
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
SO_INCOMING_NAPI_ID = 0x38
|
||||
SO_KEEPALIVE = 0x8
|
||||
SO_LINGER = 0x80
|
||||
SO_LOCK_FILTER = 0x2c
|
||||
SO_MARK = 0x24
|
||||
SO_MAX_PACING_RATE = 0x2f
|
||||
SO_MEMINFO = 0x37
|
||||
SO_NOFCS = 0x2b
|
||||
SO_NO_CHECK = 0xb
|
||||
SO_OOBINLINE = 0x100
|
||||
|
@ -1574,6 +1604,7 @@ const (
|
|||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x12
|
||||
SO_PEERGROUPS = 0x3b
|
||||
SO_PEERNAME = 0x1c
|
||||
SO_PEERSEC = 0x1e
|
||||
SO_PRIORITY = 0xc
|
||||
|
@ -1670,6 +1701,7 @@ const (
|
|||
TCP_CORK = 0x3
|
||||
TCP_DEFER_ACCEPT = 0x9
|
||||
TCP_FASTOPEN = 0x17
|
||||
TCP_FASTOPEN_CONNECT = 0x1e
|
||||
TCP_INFO = 0xb
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
|
@ -1728,6 +1760,7 @@ const (
|
|||
TIOCGPKT = 0x40045438
|
||||
TIOCGPTLCK = 0x40045439
|
||||
TIOCGPTN = 0x40045430
|
||||
TIOCGPTPEER = 0x20005441
|
||||
TIOCGRS485 = 0x4020542e
|
||||
TIOCGSERIAL = 0x5484
|
||||
TIOCGSID = 0x7416
|
||||
|
@ -1814,6 +1847,8 @@ const (
|
|||
TUNSETVNETHDRSZ = 0x800454d8
|
||||
TUNSETVNETLE = 0x800454dc
|
||||
UMOUNT_NOFOLLOW = 0x8
|
||||
UTIME_NOW = 0x3fffffff
|
||||
UTIME_OMIT = 0x3ffffffe
|
||||
VDISCARD = 0xd
|
||||
VEOF = 0x10
|
||||
VEOL = 0x11
|
||||
|
@ -1844,6 +1879,17 @@ const (
|
|||
WALL = 0x40000000
|
||||
WCLONE = 0x80000000
|
||||
WCONTINUED = 0x8
|
||||
WDIOC_GETBOOTSTATUS = 0x40045702
|
||||
WDIOC_GETPRETIMEOUT = 0x40045709
|
||||
WDIOC_GETSTATUS = 0x40045701
|
||||
WDIOC_GETSUPPORT = 0x40285700
|
||||
WDIOC_GETTEMP = 0x40045703
|
||||
WDIOC_GETTIMELEFT = 0x4004570a
|
||||
WDIOC_GETTIMEOUT = 0x40045707
|
||||
WDIOC_KEEPALIVE = 0x40045705
|
||||
WDIOC_SETOPTIONS = 0x40045704
|
||||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
|
|
|
@ -36,7 +36,7 @@ const (
|
|||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2b
|
||||
AF_MAX = 0x2c
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
|
@ -51,6 +51,7 @@ const (
|
|||
AF_ROUTE = 0x10
|
||||
AF_RXRPC = 0x21
|
||||
AF_SECURITY = 0xe
|
||||
AF_SMC = 0x2b
|
||||
AF_SNA = 0x16
|
||||
AF_TIPC = 0x1e
|
||||
AF_UNIX = 0x1
|
||||
|
@ -129,6 +130,7 @@ const (
|
|||
ARPHRD_TUNNEL = 0x300
|
||||
ARPHRD_TUNNEL6 = 0x301
|
||||
ARPHRD_VOID = 0xffff
|
||||
ARPHRD_VSOCKMON = 0x33a
|
||||
ARPHRD_X25 = 0x10f
|
||||
B0 = 0x0
|
||||
B1000000 = 0x1008
|
||||
|
@ -392,6 +394,7 @@ const (
|
|||
ETH_P_FIP = 0x8914
|
||||
ETH_P_HDLC = 0x19
|
||||
ETH_P_HSR = 0x892f
|
||||
ETH_P_IBOE = 0x8915
|
||||
ETH_P_IEEE802154 = 0xf6
|
||||
ETH_P_IEEEPUP = 0xa00
|
||||
ETH_P_IEEEPUPAT = 0xa01
|
||||
|
@ -453,6 +456,8 @@ const (
|
|||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x2000
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
|
||||
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
|
||||
|
@ -618,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -657,8 +663,10 @@ const (
|
|||
IPV6_2292PKTOPTIONS = 0x6
|
||||
IPV6_2292RTHDR = 0x5
|
||||
IPV6_ADDRFORM = 0x1
|
||||
IPV6_ADDR_PREFERENCES = 0x48
|
||||
IPV6_ADD_MEMBERSHIP = 0x14
|
||||
IPV6_AUTHHDR = 0xa
|
||||
IPV6_AUTOFLOWLABEL = 0x46
|
||||
IPV6_CHECKSUM = 0x7
|
||||
IPV6_DONTFRAG = 0x3e
|
||||
IPV6_DROP_MEMBERSHIP = 0x15
|
||||
|
@ -671,12 +679,14 @@ const (
|
|||
IPV6_JOIN_GROUP = 0x14
|
||||
IPV6_LEAVE_ANYCAST = 0x1c
|
||||
IPV6_LEAVE_GROUP = 0x15
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
IPV6_NEXTHOP = 0x9
|
||||
IPV6_ORIGDSTADDR = 0x4a
|
||||
IPV6_PATHMTU = 0x3d
|
||||
IPV6_PKTINFO = 0x32
|
||||
IPV6_PMTUDISC_DO = 0x2
|
||||
|
@ -687,8 +697,10 @@ const (
|
|||
IPV6_PMTUDISC_WANT = 0x1
|
||||
IPV6_RECVDSTOPTS = 0x3a
|
||||
IPV6_RECVERR = 0x19
|
||||
IPV6_RECVFRAGSIZE = 0x4d
|
||||
IPV6_RECVHOPLIMIT = 0x33
|
||||
IPV6_RECVHOPOPTS = 0x35
|
||||
IPV6_RECVORIGDSTADDR = 0x4a
|
||||
IPV6_RECVPATHMTU = 0x3c
|
||||
IPV6_RECVPKTINFO = 0x31
|
||||
IPV6_RECVRTHDR = 0x38
|
||||
|
@ -702,7 +714,9 @@ const (
|
|||
IPV6_RXDSTOPTS = 0x3b
|
||||
IPV6_RXHOPOPTS = 0x36
|
||||
IPV6_TCLASS = 0x43
|
||||
IPV6_TRANSPARENT = 0x4b
|
||||
IPV6_UNICAST_HOPS = 0x10
|
||||
IPV6_UNICAST_IF = 0x4c
|
||||
IPV6_V6ONLY = 0x1a
|
||||
IPV6_XFRM_POLICY = 0x23
|
||||
IP_ADD_MEMBERSHIP = 0x23
|
||||
|
@ -745,6 +759,7 @@ const (
|
|||
IP_PMTUDISC_PROBE = 0x3
|
||||
IP_PMTUDISC_WANT = 0x1
|
||||
IP_RECVERR = 0xb
|
||||
IP_RECVFRAGSIZE = 0x19
|
||||
IP_RECVOPTS = 0x6
|
||||
IP_RECVORIGDSTADDR = 0x14
|
||||
IP_RECVRETOPTS = 0x7
|
||||
|
@ -782,6 +797,7 @@ const (
|
|||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
KEYCTL_REVOKE = 0x3
|
||||
KEYCTL_SEARCH = 0xa
|
||||
KEYCTL_SESSION_TO_PARENT = 0x12
|
||||
|
@ -915,6 +931,7 @@ const (
|
|||
MS_SILENT = 0x8000
|
||||
MS_SLAVE = 0x80000
|
||||
MS_STRICTATIME = 0x1000000
|
||||
MS_SUBMOUNT = 0x4000000
|
||||
MS_SYNC = 0x4
|
||||
MS_SYNCHRONOUS = 0x10
|
||||
MS_UNBINDABLE = 0x20000
|
||||
|
@ -929,6 +946,7 @@ const (
|
|||
NETLINK_DNRTMSG = 0xe
|
||||
NETLINK_DROP_MEMBERSHIP = 0x2
|
||||
NETLINK_ECRYPTFS = 0x13
|
||||
NETLINK_EXT_ACK = 0xb
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
|
@ -947,6 +965,7 @@ const (
|
|||
NETLINK_RX_RING = 0x6
|
||||
NETLINK_SCSITRANSPORT = 0x12
|
||||
NETLINK_SELINUX = 0x7
|
||||
NETLINK_SMC = 0x16
|
||||
NETLINK_SOCK_DIAG = 0x4
|
||||
NETLINK_TX_RING = 0x7
|
||||
NETLINK_UNUSED = 0x1
|
||||
|
@ -967,8 +986,10 @@ const (
|
|||
NLMSG_NOOP = 0x1
|
||||
NLMSG_OVERRUN = 0x4
|
||||
NLM_F_ACK = 0x4
|
||||
NLM_F_ACK_TLVS = 0x200
|
||||
NLM_F_APPEND = 0x800
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CAPPED = 0x100
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
|
@ -1025,6 +1046,7 @@ const (
|
|||
PACKET_FANOUT_EBPF = 0x7
|
||||
PACKET_FANOUT_FLAG_DEFRAG = 0x8000
|
||||
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
|
||||
PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
|
||||
PACKET_FANOUT_HASH = 0x0
|
||||
PACKET_FANOUT_LB = 0x1
|
||||
PACKET_FANOUT_QM = 0x5
|
||||
|
@ -1166,7 +1188,7 @@ const (
|
|||
PR_SET_NO_NEW_PRIVS = 0x26
|
||||
PR_SET_PDEATHSIG = 0x1
|
||||
PR_SET_PTRACER = 0x59616d61
|
||||
PR_SET_PTRACER_ANY = -0x1
|
||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
||||
PR_SET_SECCOMP = 0x16
|
||||
PR_SET_SECUREBITS = 0x1c
|
||||
PR_SET_THP_DISABLE = 0x29
|
||||
|
@ -1258,7 +1280,7 @@ const (
|
|||
RLIMIT_RTTIME = 0xf
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = -0x1
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
|
@ -1283,7 +1305,7 @@ const (
|
|||
RTAX_UNSPEC = 0x0
|
||||
RTAX_WINDOW = 0x3
|
||||
RTA_ALIGNTO = 0x4
|
||||
RTA_MAX = 0x19
|
||||
RTA_MAX = 0x1a
|
||||
RTCF_DIRECTSRC = 0x4000000
|
||||
RTCF_DOREDIRECT = 0x1000000
|
||||
RTCF_LOG = 0x2000000
|
||||
|
@ -1327,6 +1349,7 @@ const (
|
|||
RTM_DELLINK = 0x11
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
RTM_DELNSID = 0x59
|
||||
RTM_DELQDISC = 0x25
|
||||
RTM_DELROUTE = 0x19
|
||||
|
@ -1335,6 +1358,7 @@ const (
|
|||
RTM_DELTFILTER = 0x2d
|
||||
RTM_F_CLONED = 0x200
|
||||
RTM_F_EQUALIZE = 0x400
|
||||
RTM_F_FIB_MATCH = 0x2000
|
||||
RTM_F_LOOKUP_TABLE = 0x1000
|
||||
RTM_F_NOTIFY = 0x100
|
||||
RTM_F_PREFIX = 0x800
|
||||
|
@ -1356,10 +1380,11 @@ const (
|
|||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x5f
|
||||
RTM_MAX = 0x63
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
|
@ -1374,8 +1399,8 @@ const (
|
|||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x14
|
||||
RTM_NR_MSGTYPES = 0x50
|
||||
RTM_NR_FAMILIES = 0x15
|
||||
RTM_NR_MSGTYPES = 0x54
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
|
@ -1386,6 +1411,7 @@ const (
|
|||
RTNH_F_OFFLOAD = 0x8
|
||||
RTNH_F_ONLINK = 0x4
|
||||
RTNH_F_PERVASIVE = 0x2
|
||||
RTNH_F_UNRESOLVED = 0x20
|
||||
RTN_MAX = 0xb
|
||||
RTPROT_BABEL = 0x2a
|
||||
RTPROT_BIRD = 0xc
|
||||
|
@ -1416,6 +1442,7 @@ const (
|
|||
SCM_TIMESTAMP = 0x1d
|
||||
SCM_TIMESTAMPING = 0x25
|
||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
|
@ -1554,6 +1581,7 @@ const (
|
|||
SO_BSDCOMPAT = 0xe
|
||||
SO_BUSY_POLL = 0x2e
|
||||
SO_CNX_ADVICE = 0x35
|
||||
SO_COOKIE = 0x39
|
||||
SO_DEBUG = 0x1
|
||||
SO_DETACH_BPF = 0x1b
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
|
@ -1562,11 +1590,13 @@ const (
|
|||
SO_ERROR = 0x1007
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
SO_INCOMING_NAPI_ID = 0x38
|
||||
SO_KEEPALIVE = 0x8
|
||||
SO_LINGER = 0x80
|
||||
SO_LOCK_FILTER = 0x2c
|
||||
SO_MARK = 0x24
|
||||
SO_MAX_PACING_RATE = 0x2f
|
||||
SO_MEMINFO = 0x37
|
||||
SO_NOFCS = 0x2b
|
||||
SO_NO_CHECK = 0xb
|
||||
SO_OOBINLINE = 0x100
|
||||
|
@ -1574,6 +1604,7 @@ const (
|
|||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x12
|
||||
SO_PEERGROUPS = 0x3b
|
||||
SO_PEERNAME = 0x1c
|
||||
SO_PEERSEC = 0x1e
|
||||
SO_PRIORITY = 0xc
|
||||
|
@ -1670,6 +1701,7 @@ const (
|
|||
TCP_CORK = 0x3
|
||||
TCP_DEFER_ACCEPT = 0x9
|
||||
TCP_FASTOPEN = 0x17
|
||||
TCP_FASTOPEN_CONNECT = 0x1e
|
||||
TCP_INFO = 0xb
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
|
@ -1728,6 +1760,7 @@ const (
|
|||
TIOCGPKT = 0x40045438
|
||||
TIOCGPTLCK = 0x40045439
|
||||
TIOCGPTN = 0x40045430
|
||||
TIOCGPTPEER = 0x20005441
|
||||
TIOCGRS485 = 0x4020542e
|
||||
TIOCGSERIAL = 0x5484
|
||||
TIOCGSID = 0x7416
|
||||
|
@ -1814,6 +1847,8 @@ const (
|
|||
TUNSETVNETHDRSZ = 0x800454d8
|
||||
TUNSETVNETLE = 0x800454dc
|
||||
UMOUNT_NOFOLLOW = 0x8
|
||||
UTIME_NOW = 0x3fffffff
|
||||
UTIME_OMIT = 0x3ffffffe
|
||||
VDISCARD = 0xd
|
||||
VEOF = 0x10
|
||||
VEOL = 0x11
|
||||
|
@ -1844,6 +1879,17 @@ const (
|
|||
WALL = 0x40000000
|
||||
WCLONE = 0x80000000
|
||||
WCONTINUED = 0x8
|
||||
WDIOC_GETBOOTSTATUS = 0x40045702
|
||||
WDIOC_GETPRETIMEOUT = 0x40045709
|
||||
WDIOC_GETSTATUS = 0x40045701
|
||||
WDIOC_GETSUPPORT = 0x40285700
|
||||
WDIOC_GETTEMP = 0x40045703
|
||||
WDIOC_GETTIMELEFT = 0x4004570a
|
||||
WDIOC_GETTIMEOUT = 0x40045707
|
||||
WDIOC_KEEPALIVE = 0x40045705
|
||||
WDIOC_SETOPTIONS = 0x40045704
|
||||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
|
|
|
@ -36,7 +36,7 @@ const (
|
|||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2b
|
||||
AF_MAX = 0x2c
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
|
@ -51,6 +51,7 @@ const (
|
|||
AF_ROUTE = 0x10
|
||||
AF_RXRPC = 0x21
|
||||
AF_SECURITY = 0xe
|
||||
AF_SMC = 0x2b
|
||||
AF_SNA = 0x16
|
||||
AF_TIPC = 0x1e
|
||||
AF_UNIX = 0x1
|
||||
|
@ -129,6 +130,7 @@ const (
|
|||
ARPHRD_TUNNEL = 0x300
|
||||
ARPHRD_TUNNEL6 = 0x301
|
||||
ARPHRD_VOID = 0xffff
|
||||
ARPHRD_VSOCKMON = 0x33a
|
||||
ARPHRD_X25 = 0x10f
|
||||
B0 = 0x0
|
||||
B1000000 = 0x1008
|
||||
|
@ -392,6 +394,7 @@ const (
|
|||
ETH_P_FIP = 0x8914
|
||||
ETH_P_HDLC = 0x19
|
||||
ETH_P_HSR = 0x892f
|
||||
ETH_P_IBOE = 0x8915
|
||||
ETH_P_IEEE802154 = 0xf6
|
||||
ETH_P_IEEEPUP = 0xa00
|
||||
ETH_P_IEEEPUPAT = 0xa01
|
||||
|
@ -453,6 +456,8 @@ const (
|
|||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x2000
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
|
||||
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
|
||||
|
@ -618,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -657,8 +663,10 @@ const (
|
|||
IPV6_2292PKTOPTIONS = 0x6
|
||||
IPV6_2292RTHDR = 0x5
|
||||
IPV6_ADDRFORM = 0x1
|
||||
IPV6_ADDR_PREFERENCES = 0x48
|
||||
IPV6_ADD_MEMBERSHIP = 0x14
|
||||
IPV6_AUTHHDR = 0xa
|
||||
IPV6_AUTOFLOWLABEL = 0x46
|
||||
IPV6_CHECKSUM = 0x7
|
||||
IPV6_DONTFRAG = 0x3e
|
||||
IPV6_DROP_MEMBERSHIP = 0x15
|
||||
|
@ -671,12 +679,14 @@ const (
|
|||
IPV6_JOIN_GROUP = 0x14
|
||||
IPV6_LEAVE_ANYCAST = 0x1c
|
||||
IPV6_LEAVE_GROUP = 0x15
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
IPV6_NEXTHOP = 0x9
|
||||
IPV6_ORIGDSTADDR = 0x4a
|
||||
IPV6_PATHMTU = 0x3d
|
||||
IPV6_PKTINFO = 0x32
|
||||
IPV6_PMTUDISC_DO = 0x2
|
||||
|
@ -687,8 +697,10 @@ const (
|
|||
IPV6_PMTUDISC_WANT = 0x1
|
||||
IPV6_RECVDSTOPTS = 0x3a
|
||||
IPV6_RECVERR = 0x19
|
||||
IPV6_RECVFRAGSIZE = 0x4d
|
||||
IPV6_RECVHOPLIMIT = 0x33
|
||||
IPV6_RECVHOPOPTS = 0x35
|
||||
IPV6_RECVORIGDSTADDR = 0x4a
|
||||
IPV6_RECVPATHMTU = 0x3c
|
||||
IPV6_RECVPKTINFO = 0x31
|
||||
IPV6_RECVRTHDR = 0x38
|
||||
|
@ -702,7 +714,9 @@ const (
|
|||
IPV6_RXDSTOPTS = 0x3b
|
||||
IPV6_RXHOPOPTS = 0x36
|
||||
IPV6_TCLASS = 0x43
|
||||
IPV6_TRANSPARENT = 0x4b
|
||||
IPV6_UNICAST_HOPS = 0x10
|
||||
IPV6_UNICAST_IF = 0x4c
|
||||
IPV6_V6ONLY = 0x1a
|
||||
IPV6_XFRM_POLICY = 0x23
|
||||
IP_ADD_MEMBERSHIP = 0x23
|
||||
|
@ -745,6 +759,7 @@ const (
|
|||
IP_PMTUDISC_PROBE = 0x3
|
||||
IP_PMTUDISC_WANT = 0x1
|
||||
IP_RECVERR = 0xb
|
||||
IP_RECVFRAGSIZE = 0x19
|
||||
IP_RECVOPTS = 0x6
|
||||
IP_RECVORIGDSTADDR = 0x14
|
||||
IP_RECVRETOPTS = 0x7
|
||||
|
@ -782,6 +797,7 @@ const (
|
|||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
KEYCTL_REVOKE = 0x3
|
||||
KEYCTL_SEARCH = 0xa
|
||||
KEYCTL_SESSION_TO_PARENT = 0x12
|
||||
|
@ -915,6 +931,7 @@ const (
|
|||
MS_SILENT = 0x8000
|
||||
MS_SLAVE = 0x80000
|
||||
MS_STRICTATIME = 0x1000000
|
||||
MS_SUBMOUNT = 0x4000000
|
||||
MS_SYNC = 0x4
|
||||
MS_SYNCHRONOUS = 0x10
|
||||
MS_UNBINDABLE = 0x20000
|
||||
|
@ -929,6 +946,7 @@ const (
|
|||
NETLINK_DNRTMSG = 0xe
|
||||
NETLINK_DROP_MEMBERSHIP = 0x2
|
||||
NETLINK_ECRYPTFS = 0x13
|
||||
NETLINK_EXT_ACK = 0xb
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
|
@ -947,6 +965,7 @@ const (
|
|||
NETLINK_RX_RING = 0x6
|
||||
NETLINK_SCSITRANSPORT = 0x12
|
||||
NETLINK_SELINUX = 0x7
|
||||
NETLINK_SMC = 0x16
|
||||
NETLINK_SOCK_DIAG = 0x4
|
||||
NETLINK_TX_RING = 0x7
|
||||
NETLINK_UNUSED = 0x1
|
||||
|
@ -967,8 +986,10 @@ const (
|
|||
NLMSG_NOOP = 0x1
|
||||
NLMSG_OVERRUN = 0x4
|
||||
NLM_F_ACK = 0x4
|
||||
NLM_F_ACK_TLVS = 0x200
|
||||
NLM_F_APPEND = 0x800
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CAPPED = 0x100
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
|
@ -1025,6 +1046,7 @@ const (
|
|||
PACKET_FANOUT_EBPF = 0x7
|
||||
PACKET_FANOUT_FLAG_DEFRAG = 0x8000
|
||||
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
|
||||
PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
|
||||
PACKET_FANOUT_HASH = 0x0
|
||||
PACKET_FANOUT_LB = 0x1
|
||||
PACKET_FANOUT_QM = 0x5
|
||||
|
@ -1166,7 +1188,7 @@ const (
|
|||
PR_SET_NO_NEW_PRIVS = 0x26
|
||||
PR_SET_PDEATHSIG = 0x1
|
||||
PR_SET_PTRACER = 0x59616d61
|
||||
PR_SET_PTRACER_ANY = -0x1
|
||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
||||
PR_SET_SECCOMP = 0x16
|
||||
PR_SET_SECUREBITS = 0x1c
|
||||
PR_SET_THP_DISABLE = 0x29
|
||||
|
@ -1258,7 +1280,7 @@ const (
|
|||
RLIMIT_RTTIME = 0xf
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = -0x1
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
|
@ -1283,7 +1305,7 @@ const (
|
|||
RTAX_UNSPEC = 0x0
|
||||
RTAX_WINDOW = 0x3
|
||||
RTA_ALIGNTO = 0x4
|
||||
RTA_MAX = 0x19
|
||||
RTA_MAX = 0x1a
|
||||
RTCF_DIRECTSRC = 0x4000000
|
||||
RTCF_DOREDIRECT = 0x1000000
|
||||
RTCF_LOG = 0x2000000
|
||||
|
@ -1327,6 +1349,7 @@ const (
|
|||
RTM_DELLINK = 0x11
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
RTM_DELNSID = 0x59
|
||||
RTM_DELQDISC = 0x25
|
||||
RTM_DELROUTE = 0x19
|
||||
|
@ -1335,6 +1358,7 @@ const (
|
|||
RTM_DELTFILTER = 0x2d
|
||||
RTM_F_CLONED = 0x200
|
||||
RTM_F_EQUALIZE = 0x400
|
||||
RTM_F_FIB_MATCH = 0x2000
|
||||
RTM_F_LOOKUP_TABLE = 0x1000
|
||||
RTM_F_NOTIFY = 0x100
|
||||
RTM_F_PREFIX = 0x800
|
||||
|
@ -1356,10 +1380,11 @@ const (
|
|||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x5f
|
||||
RTM_MAX = 0x63
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
|
@ -1374,8 +1399,8 @@ const (
|
|||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x14
|
||||
RTM_NR_MSGTYPES = 0x50
|
||||
RTM_NR_FAMILIES = 0x15
|
||||
RTM_NR_MSGTYPES = 0x54
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
|
@ -1386,6 +1411,7 @@ const (
|
|||
RTNH_F_OFFLOAD = 0x8
|
||||
RTNH_F_ONLINK = 0x4
|
||||
RTNH_F_PERVASIVE = 0x2
|
||||
RTNH_F_UNRESOLVED = 0x20
|
||||
RTN_MAX = 0xb
|
||||
RTPROT_BABEL = 0x2a
|
||||
RTPROT_BIRD = 0xc
|
||||
|
@ -1416,6 +1442,7 @@ const (
|
|||
SCM_TIMESTAMP = 0x1d
|
||||
SCM_TIMESTAMPING = 0x25
|
||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
|
@ -1554,6 +1581,7 @@ const (
|
|||
SO_BSDCOMPAT = 0xe
|
||||
SO_BUSY_POLL = 0x2e
|
||||
SO_CNX_ADVICE = 0x35
|
||||
SO_COOKIE = 0x39
|
||||
SO_DEBUG = 0x1
|
||||
SO_DETACH_BPF = 0x1b
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
|
@ -1562,11 +1590,13 @@ const (
|
|||
SO_ERROR = 0x1007
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
SO_INCOMING_NAPI_ID = 0x38
|
||||
SO_KEEPALIVE = 0x8
|
||||
SO_LINGER = 0x80
|
||||
SO_LOCK_FILTER = 0x2c
|
||||
SO_MARK = 0x24
|
||||
SO_MAX_PACING_RATE = 0x2f
|
||||
SO_MEMINFO = 0x37
|
||||
SO_NOFCS = 0x2b
|
||||
SO_NO_CHECK = 0xb
|
||||
SO_OOBINLINE = 0x100
|
||||
|
@ -1574,6 +1604,7 @@ const (
|
|||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x12
|
||||
SO_PEERGROUPS = 0x3b
|
||||
SO_PEERNAME = 0x1c
|
||||
SO_PEERSEC = 0x1e
|
||||
SO_PRIORITY = 0xc
|
||||
|
@ -1670,6 +1701,7 @@ const (
|
|||
TCP_CORK = 0x3
|
||||
TCP_DEFER_ACCEPT = 0x9
|
||||
TCP_FASTOPEN = 0x17
|
||||
TCP_FASTOPEN_CONNECT = 0x1e
|
||||
TCP_INFO = 0xb
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
|
@ -1728,6 +1760,7 @@ const (
|
|||
TIOCGPKT = 0x40045438
|
||||
TIOCGPTLCK = 0x40045439
|
||||
TIOCGPTN = 0x40045430
|
||||
TIOCGPTPEER = 0x20005441
|
||||
TIOCGRS485 = 0x4020542e
|
||||
TIOCGSERIAL = 0x5484
|
||||
TIOCGSID = 0x7416
|
||||
|
@ -1814,6 +1847,8 @@ const (
|
|||
TUNSETVNETHDRSZ = 0x800454d8
|
||||
TUNSETVNETLE = 0x800454dc
|
||||
UMOUNT_NOFOLLOW = 0x8
|
||||
UTIME_NOW = 0x3fffffff
|
||||
UTIME_OMIT = 0x3ffffffe
|
||||
VDISCARD = 0xd
|
||||
VEOF = 0x10
|
||||
VEOL = 0x11
|
||||
|
@ -1844,6 +1879,17 @@ const (
|
|||
WALL = 0x40000000
|
||||
WCLONE = 0x80000000
|
||||
WCONTINUED = 0x8
|
||||
WDIOC_GETBOOTSTATUS = 0x40045702
|
||||
WDIOC_GETPRETIMEOUT = 0x40045709
|
||||
WDIOC_GETSTATUS = 0x40045701
|
||||
WDIOC_GETSUPPORT = 0x40285700
|
||||
WDIOC_GETTEMP = 0x40045703
|
||||
WDIOC_GETTIMELEFT = 0x4004570a
|
||||
WDIOC_GETTIMEOUT = 0x40045707
|
||||
WDIOC_KEEPALIVE = 0x40045705
|
||||
WDIOC_SETOPTIONS = 0x40045704
|
||||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
|
|
|
@ -36,7 +36,7 @@ const (
|
|||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2b
|
||||
AF_MAX = 0x2c
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
|
@ -51,6 +51,7 @@ const (
|
|||
AF_ROUTE = 0x10
|
||||
AF_RXRPC = 0x21
|
||||
AF_SECURITY = 0xe
|
||||
AF_SMC = 0x2b
|
||||
AF_SNA = 0x16
|
||||
AF_TIPC = 0x1e
|
||||
AF_UNIX = 0x1
|
||||
|
@ -129,6 +130,7 @@ const (
|
|||
ARPHRD_TUNNEL = 0x300
|
||||
ARPHRD_TUNNEL6 = 0x301
|
||||
ARPHRD_VOID = 0xffff
|
||||
ARPHRD_VSOCKMON = 0x33a
|
||||
ARPHRD_X25 = 0x10f
|
||||
B0 = 0x0
|
||||
B1000000 = 0x1008
|
||||
|
@ -392,6 +394,7 @@ const (
|
|||
ETH_P_FIP = 0x8914
|
||||
ETH_P_HDLC = 0x19
|
||||
ETH_P_HSR = 0x892f
|
||||
ETH_P_IBOE = 0x8915
|
||||
ETH_P_IEEE802154 = 0xf6
|
||||
ETH_P_IEEEPUP = 0xa00
|
||||
ETH_P_IEEEPUPAT = 0xa01
|
||||
|
@ -453,6 +456,8 @@ const (
|
|||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x2000
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
|
||||
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
|
||||
|
@ -618,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -657,8 +663,10 @@ const (
|
|||
IPV6_2292PKTOPTIONS = 0x6
|
||||
IPV6_2292RTHDR = 0x5
|
||||
IPV6_ADDRFORM = 0x1
|
||||
IPV6_ADDR_PREFERENCES = 0x48
|
||||
IPV6_ADD_MEMBERSHIP = 0x14
|
||||
IPV6_AUTHHDR = 0xa
|
||||
IPV6_AUTOFLOWLABEL = 0x46
|
||||
IPV6_CHECKSUM = 0x7
|
||||
IPV6_DONTFRAG = 0x3e
|
||||
IPV6_DROP_MEMBERSHIP = 0x15
|
||||
|
@ -671,12 +679,14 @@ const (
|
|||
IPV6_JOIN_GROUP = 0x14
|
||||
IPV6_LEAVE_ANYCAST = 0x1c
|
||||
IPV6_LEAVE_GROUP = 0x15
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
IPV6_NEXTHOP = 0x9
|
||||
IPV6_ORIGDSTADDR = 0x4a
|
||||
IPV6_PATHMTU = 0x3d
|
||||
IPV6_PKTINFO = 0x32
|
||||
IPV6_PMTUDISC_DO = 0x2
|
||||
|
@ -687,8 +697,10 @@ const (
|
|||
IPV6_PMTUDISC_WANT = 0x1
|
||||
IPV6_RECVDSTOPTS = 0x3a
|
||||
IPV6_RECVERR = 0x19
|
||||
IPV6_RECVFRAGSIZE = 0x4d
|
||||
IPV6_RECVHOPLIMIT = 0x33
|
||||
IPV6_RECVHOPOPTS = 0x35
|
||||
IPV6_RECVORIGDSTADDR = 0x4a
|
||||
IPV6_RECVPATHMTU = 0x3c
|
||||
IPV6_RECVPKTINFO = 0x31
|
||||
IPV6_RECVRTHDR = 0x38
|
||||
|
@ -702,7 +714,9 @@ const (
|
|||
IPV6_RXDSTOPTS = 0x3b
|
||||
IPV6_RXHOPOPTS = 0x36
|
||||
IPV6_TCLASS = 0x43
|
||||
IPV6_TRANSPARENT = 0x4b
|
||||
IPV6_UNICAST_HOPS = 0x10
|
||||
IPV6_UNICAST_IF = 0x4c
|
||||
IPV6_V6ONLY = 0x1a
|
||||
IPV6_XFRM_POLICY = 0x23
|
||||
IP_ADD_MEMBERSHIP = 0x23
|
||||
|
@ -745,6 +759,7 @@ const (
|
|||
IP_PMTUDISC_PROBE = 0x3
|
||||
IP_PMTUDISC_WANT = 0x1
|
||||
IP_RECVERR = 0xb
|
||||
IP_RECVFRAGSIZE = 0x19
|
||||
IP_RECVOPTS = 0x6
|
||||
IP_RECVORIGDSTADDR = 0x14
|
||||
IP_RECVRETOPTS = 0x7
|
||||
|
@ -782,6 +797,7 @@ const (
|
|||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
KEYCTL_REVOKE = 0x3
|
||||
KEYCTL_SEARCH = 0xa
|
||||
KEYCTL_SESSION_TO_PARENT = 0x12
|
||||
|
@ -915,6 +931,7 @@ const (
|
|||
MS_SILENT = 0x8000
|
||||
MS_SLAVE = 0x80000
|
||||
MS_STRICTATIME = 0x1000000
|
||||
MS_SUBMOUNT = 0x4000000
|
||||
MS_SYNC = 0x4
|
||||
MS_SYNCHRONOUS = 0x10
|
||||
MS_UNBINDABLE = 0x20000
|
||||
|
@ -929,6 +946,7 @@ const (
|
|||
NETLINK_DNRTMSG = 0xe
|
||||
NETLINK_DROP_MEMBERSHIP = 0x2
|
||||
NETLINK_ECRYPTFS = 0x13
|
||||
NETLINK_EXT_ACK = 0xb
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
|
@ -947,6 +965,7 @@ const (
|
|||
NETLINK_RX_RING = 0x6
|
||||
NETLINK_SCSITRANSPORT = 0x12
|
||||
NETLINK_SELINUX = 0x7
|
||||
NETLINK_SMC = 0x16
|
||||
NETLINK_SOCK_DIAG = 0x4
|
||||
NETLINK_TX_RING = 0x7
|
||||
NETLINK_UNUSED = 0x1
|
||||
|
@ -967,8 +986,10 @@ const (
|
|||
NLMSG_NOOP = 0x1
|
||||
NLMSG_OVERRUN = 0x4
|
||||
NLM_F_ACK = 0x4
|
||||
NLM_F_ACK_TLVS = 0x200
|
||||
NLM_F_APPEND = 0x800
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CAPPED = 0x100
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
|
@ -1025,6 +1046,7 @@ const (
|
|||
PACKET_FANOUT_EBPF = 0x7
|
||||
PACKET_FANOUT_FLAG_DEFRAG = 0x8000
|
||||
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
|
||||
PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
|
||||
PACKET_FANOUT_HASH = 0x0
|
||||
PACKET_FANOUT_LB = 0x1
|
||||
PACKET_FANOUT_QM = 0x5
|
||||
|
@ -1258,7 +1280,7 @@ const (
|
|||
RLIMIT_RTTIME = 0xf
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = -0x1
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
|
@ -1283,7 +1305,7 @@ const (
|
|||
RTAX_UNSPEC = 0x0
|
||||
RTAX_WINDOW = 0x3
|
||||
RTA_ALIGNTO = 0x4
|
||||
RTA_MAX = 0x19
|
||||
RTA_MAX = 0x1a
|
||||
RTCF_DIRECTSRC = 0x4000000
|
||||
RTCF_DOREDIRECT = 0x1000000
|
||||
RTCF_LOG = 0x2000000
|
||||
|
@ -1327,6 +1349,7 @@ const (
|
|||
RTM_DELLINK = 0x11
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
RTM_DELNSID = 0x59
|
||||
RTM_DELQDISC = 0x25
|
||||
RTM_DELROUTE = 0x19
|
||||
|
@ -1335,6 +1358,7 @@ const (
|
|||
RTM_DELTFILTER = 0x2d
|
||||
RTM_F_CLONED = 0x200
|
||||
RTM_F_EQUALIZE = 0x400
|
||||
RTM_F_FIB_MATCH = 0x2000
|
||||
RTM_F_LOOKUP_TABLE = 0x1000
|
||||
RTM_F_NOTIFY = 0x100
|
||||
RTM_F_PREFIX = 0x800
|
||||
|
@ -1356,10 +1380,11 @@ const (
|
|||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x5f
|
||||
RTM_MAX = 0x63
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
|
@ -1374,8 +1399,8 @@ const (
|
|||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x14
|
||||
RTM_NR_MSGTYPES = 0x50
|
||||
RTM_NR_FAMILIES = 0x15
|
||||
RTM_NR_MSGTYPES = 0x54
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
|
@ -1386,6 +1411,7 @@ const (
|
|||
RTNH_F_OFFLOAD = 0x8
|
||||
RTNH_F_ONLINK = 0x4
|
||||
RTNH_F_PERVASIVE = 0x2
|
||||
RTNH_F_UNRESOLVED = 0x20
|
||||
RTN_MAX = 0xb
|
||||
RTPROT_BABEL = 0x2a
|
||||
RTPROT_BIRD = 0xc
|
||||
|
@ -1416,6 +1442,7 @@ const (
|
|||
SCM_TIMESTAMP = 0x1d
|
||||
SCM_TIMESTAMPING = 0x25
|
||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
|
@ -1554,6 +1581,7 @@ const (
|
|||
SO_BSDCOMPAT = 0xe
|
||||
SO_BUSY_POLL = 0x2e
|
||||
SO_CNX_ADVICE = 0x35
|
||||
SO_COOKIE = 0x39
|
||||
SO_DEBUG = 0x1
|
||||
SO_DETACH_BPF = 0x1b
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
|
@ -1562,11 +1590,13 @@ const (
|
|||
SO_ERROR = 0x1007
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
SO_INCOMING_NAPI_ID = 0x38
|
||||
SO_KEEPALIVE = 0x8
|
||||
SO_LINGER = 0x80
|
||||
SO_LOCK_FILTER = 0x2c
|
||||
SO_MARK = 0x24
|
||||
SO_MAX_PACING_RATE = 0x2f
|
||||
SO_MEMINFO = 0x37
|
||||
SO_NOFCS = 0x2b
|
||||
SO_NO_CHECK = 0xb
|
||||
SO_OOBINLINE = 0x100
|
||||
|
@ -1574,6 +1604,7 @@ const (
|
|||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x12
|
||||
SO_PEERGROUPS = 0x3b
|
||||
SO_PEERNAME = 0x1c
|
||||
SO_PEERSEC = 0x1e
|
||||
SO_PRIORITY = 0xc
|
||||
|
@ -1670,6 +1701,7 @@ const (
|
|||
TCP_CORK = 0x3
|
||||
TCP_DEFER_ACCEPT = 0x9
|
||||
TCP_FASTOPEN = 0x17
|
||||
TCP_FASTOPEN_CONNECT = 0x1e
|
||||
TCP_INFO = 0xb
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
|
@ -1728,6 +1760,7 @@ const (
|
|||
TIOCGPKT = 0x40045438
|
||||
TIOCGPTLCK = 0x40045439
|
||||
TIOCGPTN = 0x40045430
|
||||
TIOCGPTPEER = 0x20005441
|
||||
TIOCGRS485 = 0x4020542e
|
||||
TIOCGSERIAL = 0x5484
|
||||
TIOCGSID = 0x7416
|
||||
|
@ -1814,6 +1847,8 @@ const (
|
|||
TUNSETVNETHDRSZ = 0x800454d8
|
||||
TUNSETVNETLE = 0x800454dc
|
||||
UMOUNT_NOFOLLOW = 0x8
|
||||
UTIME_NOW = 0x3fffffff
|
||||
UTIME_OMIT = 0x3ffffffe
|
||||
VDISCARD = 0xd
|
||||
VEOF = 0x10
|
||||
VEOL = 0x11
|
||||
|
@ -1844,6 +1879,17 @@ const (
|
|||
WALL = 0x40000000
|
||||
WCLONE = 0x80000000
|
||||
WCONTINUED = 0x8
|
||||
WDIOC_GETBOOTSTATUS = 0x40045702
|
||||
WDIOC_GETPRETIMEOUT = 0x40045709
|
||||
WDIOC_GETSTATUS = 0x40045701
|
||||
WDIOC_GETSUPPORT = 0x40285700
|
||||
WDIOC_GETTEMP = 0x40045703
|
||||
WDIOC_GETTIMELEFT = 0x4004570a
|
||||
WDIOC_GETTIMEOUT = 0x40045707
|
||||
WDIOC_KEEPALIVE = 0x40045705
|
||||
WDIOC_SETOPTIONS = 0x40045704
|
||||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
|
|
|
@ -36,7 +36,7 @@ const (
|
|||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2b
|
||||
AF_MAX = 0x2c
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
|
@ -51,6 +51,7 @@ const (
|
|||
AF_ROUTE = 0x10
|
||||
AF_RXRPC = 0x21
|
||||
AF_SECURITY = 0xe
|
||||
AF_SMC = 0x2b
|
||||
AF_SNA = 0x16
|
||||
AF_TIPC = 0x1e
|
||||
AF_UNIX = 0x1
|
||||
|
@ -129,6 +130,7 @@ const (
|
|||
ARPHRD_TUNNEL = 0x300
|
||||
ARPHRD_TUNNEL6 = 0x301
|
||||
ARPHRD_VOID = 0xffff
|
||||
ARPHRD_VSOCKMON = 0x33a
|
||||
ARPHRD_X25 = 0x10f
|
||||
B0 = 0x0
|
||||
B1000000 = 0x17
|
||||
|
@ -392,6 +394,7 @@ const (
|
|||
ETH_P_FIP = 0x8914
|
||||
ETH_P_HDLC = 0x19
|
||||
ETH_P_HSR = 0x892f
|
||||
ETH_P_IBOE = 0x8915
|
||||
ETH_P_IEEE802154 = 0xf6
|
||||
ETH_P_IEEEPUP = 0xa00
|
||||
ETH_P_IEEEPUPAT = 0xa01
|
||||
|
@ -453,6 +456,8 @@ const (
|
|||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
|
||||
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
|
||||
|
@ -618,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -657,8 +663,10 @@ const (
|
|||
IPV6_2292PKTOPTIONS = 0x6
|
||||
IPV6_2292RTHDR = 0x5
|
||||
IPV6_ADDRFORM = 0x1
|
||||
IPV6_ADDR_PREFERENCES = 0x48
|
||||
IPV6_ADD_MEMBERSHIP = 0x14
|
||||
IPV6_AUTHHDR = 0xa
|
||||
IPV6_AUTOFLOWLABEL = 0x46
|
||||
IPV6_CHECKSUM = 0x7
|
||||
IPV6_DONTFRAG = 0x3e
|
||||
IPV6_DROP_MEMBERSHIP = 0x15
|
||||
|
@ -671,12 +679,14 @@ const (
|
|||
IPV6_JOIN_GROUP = 0x14
|
||||
IPV6_LEAVE_ANYCAST = 0x1c
|
||||
IPV6_LEAVE_GROUP = 0x15
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
IPV6_NEXTHOP = 0x9
|
||||
IPV6_ORIGDSTADDR = 0x4a
|
||||
IPV6_PATHMTU = 0x3d
|
||||
IPV6_PKTINFO = 0x32
|
||||
IPV6_PMTUDISC_DO = 0x2
|
||||
|
@ -687,8 +697,10 @@ const (
|
|||
IPV6_PMTUDISC_WANT = 0x1
|
||||
IPV6_RECVDSTOPTS = 0x3a
|
||||
IPV6_RECVERR = 0x19
|
||||
IPV6_RECVFRAGSIZE = 0x4d
|
||||
IPV6_RECVHOPLIMIT = 0x33
|
||||
IPV6_RECVHOPOPTS = 0x35
|
||||
IPV6_RECVORIGDSTADDR = 0x4a
|
||||
IPV6_RECVPATHMTU = 0x3c
|
||||
IPV6_RECVPKTINFO = 0x31
|
||||
IPV6_RECVRTHDR = 0x38
|
||||
|
@ -702,7 +714,9 @@ const (
|
|||
IPV6_RXDSTOPTS = 0x3b
|
||||
IPV6_RXHOPOPTS = 0x36
|
||||
IPV6_TCLASS = 0x43
|
||||
IPV6_TRANSPARENT = 0x4b
|
||||
IPV6_UNICAST_HOPS = 0x10
|
||||
IPV6_UNICAST_IF = 0x4c
|
||||
IPV6_V6ONLY = 0x1a
|
||||
IPV6_XFRM_POLICY = 0x23
|
||||
IP_ADD_MEMBERSHIP = 0x23
|
||||
|
@ -745,6 +759,7 @@ const (
|
|||
IP_PMTUDISC_PROBE = 0x3
|
||||
IP_PMTUDISC_WANT = 0x1
|
||||
IP_RECVERR = 0xb
|
||||
IP_RECVFRAGSIZE = 0x19
|
||||
IP_RECVOPTS = 0x6
|
||||
IP_RECVORIGDSTADDR = 0x14
|
||||
IP_RECVRETOPTS = 0x7
|
||||
|
@ -782,6 +797,7 @@ const (
|
|||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
KEYCTL_REVOKE = 0x3
|
||||
KEYCTL_SEARCH = 0xa
|
||||
KEYCTL_SESSION_TO_PARENT = 0x12
|
||||
|
@ -914,6 +930,7 @@ const (
|
|||
MS_SILENT = 0x8000
|
||||
MS_SLAVE = 0x80000
|
||||
MS_STRICTATIME = 0x1000000
|
||||
MS_SUBMOUNT = 0x4000000
|
||||
MS_SYNC = 0x4
|
||||
MS_SYNCHRONOUS = 0x10
|
||||
MS_UNBINDABLE = 0x20000
|
||||
|
@ -928,6 +945,7 @@ const (
|
|||
NETLINK_DNRTMSG = 0xe
|
||||
NETLINK_DROP_MEMBERSHIP = 0x2
|
||||
NETLINK_ECRYPTFS = 0x13
|
||||
NETLINK_EXT_ACK = 0xb
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
|
@ -946,6 +964,7 @@ const (
|
|||
NETLINK_RX_RING = 0x6
|
||||
NETLINK_SCSITRANSPORT = 0x12
|
||||
NETLINK_SELINUX = 0x7
|
||||
NETLINK_SMC = 0x16
|
||||
NETLINK_SOCK_DIAG = 0x4
|
||||
NETLINK_TX_RING = 0x7
|
||||
NETLINK_UNUSED = 0x1
|
||||
|
@ -968,8 +987,10 @@ const (
|
|||
NLMSG_NOOP = 0x1
|
||||
NLMSG_OVERRUN = 0x4
|
||||
NLM_F_ACK = 0x4
|
||||
NLM_F_ACK_TLVS = 0x200
|
||||
NLM_F_APPEND = 0x800
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CAPPED = 0x100
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
|
@ -1026,6 +1047,7 @@ const (
|
|||
PACKET_FANOUT_EBPF = 0x7
|
||||
PACKET_FANOUT_FLAG_DEFRAG = 0x8000
|
||||
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
|
||||
PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
|
||||
PACKET_FANOUT_HASH = 0x0
|
||||
PACKET_FANOUT_LB = 0x1
|
||||
PACKET_FANOUT_QM = 0x5
|
||||
|
@ -1168,7 +1190,7 @@ const (
|
|||
PR_SET_NO_NEW_PRIVS = 0x26
|
||||
PR_SET_PDEATHSIG = 0x1
|
||||
PR_SET_PTRACER = 0x59616d61
|
||||
PR_SET_PTRACER_ANY = -0x1
|
||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
||||
PR_SET_SECCOMP = 0x16
|
||||
PR_SET_SECUREBITS = 0x1c
|
||||
PR_SET_THP_DISABLE = 0x29
|
||||
|
@ -1314,7 +1336,7 @@ const (
|
|||
RLIMIT_RTTIME = 0xf
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = -0x1
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
|
@ -1339,7 +1361,7 @@ const (
|
|||
RTAX_UNSPEC = 0x0
|
||||
RTAX_WINDOW = 0x3
|
||||
RTA_ALIGNTO = 0x4
|
||||
RTA_MAX = 0x19
|
||||
RTA_MAX = 0x1a
|
||||
RTCF_DIRECTSRC = 0x4000000
|
||||
RTCF_DOREDIRECT = 0x1000000
|
||||
RTCF_LOG = 0x2000000
|
||||
|
@ -1383,6 +1405,7 @@ const (
|
|||
RTM_DELLINK = 0x11
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
RTM_DELNSID = 0x59
|
||||
RTM_DELQDISC = 0x25
|
||||
RTM_DELROUTE = 0x19
|
||||
|
@ -1391,6 +1414,7 @@ const (
|
|||
RTM_DELTFILTER = 0x2d
|
||||
RTM_F_CLONED = 0x200
|
||||
RTM_F_EQUALIZE = 0x400
|
||||
RTM_F_FIB_MATCH = 0x2000
|
||||
RTM_F_LOOKUP_TABLE = 0x1000
|
||||
RTM_F_NOTIFY = 0x100
|
||||
RTM_F_PREFIX = 0x800
|
||||
|
@ -1412,10 +1436,11 @@ const (
|
|||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x5f
|
||||
RTM_MAX = 0x63
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
|
@ -1430,8 +1455,8 @@ const (
|
|||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x14
|
||||
RTM_NR_MSGTYPES = 0x50
|
||||
RTM_NR_FAMILIES = 0x15
|
||||
RTM_NR_MSGTYPES = 0x54
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
|
@ -1442,6 +1467,7 @@ const (
|
|||
RTNH_F_OFFLOAD = 0x8
|
||||
RTNH_F_ONLINK = 0x4
|
||||
RTNH_F_PERVASIVE = 0x2
|
||||
RTNH_F_UNRESOLVED = 0x20
|
||||
RTN_MAX = 0xb
|
||||
RTPROT_BABEL = 0x2a
|
||||
RTPROT_BIRD = 0xc
|
||||
|
@ -1472,6 +1498,7 @@ const (
|
|||
SCM_TIMESTAMP = 0x1d
|
||||
SCM_TIMESTAMPING = 0x25
|
||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
|
@ -1610,6 +1637,7 @@ const (
|
|||
SO_BSDCOMPAT = 0xe
|
||||
SO_BUSY_POLL = 0x2e
|
||||
SO_CNX_ADVICE = 0x35
|
||||
SO_COOKIE = 0x39
|
||||
SO_DEBUG = 0x1
|
||||
SO_DETACH_BPF = 0x1b
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
|
@ -1618,11 +1646,13 @@ const (
|
|||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
SO_INCOMING_NAPI_ID = 0x38
|
||||
SO_KEEPALIVE = 0x9
|
||||
SO_LINGER = 0xd
|
||||
SO_LOCK_FILTER = 0x2c
|
||||
SO_MARK = 0x24
|
||||
SO_MAX_PACING_RATE = 0x2f
|
||||
SO_MEMINFO = 0x37
|
||||
SO_NOFCS = 0x2b
|
||||
SO_NO_CHECK = 0xb
|
||||
SO_OOBINLINE = 0xa
|
||||
|
@ -1630,6 +1660,7 @@ const (
|
|||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x15
|
||||
SO_PEERGROUPS = 0x3b
|
||||
SO_PEERNAME = 0x1c
|
||||
SO_PEERSEC = 0x1f
|
||||
SO_PRIORITY = 0xc
|
||||
|
@ -1724,6 +1755,7 @@ const (
|
|||
TCP_CORK = 0x3
|
||||
TCP_DEFER_ACCEPT = 0x9
|
||||
TCP_FASTOPEN = 0x17
|
||||
TCP_FASTOPEN_CONNECT = 0x1e
|
||||
TCP_INFO = 0xb
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
|
@ -1780,6 +1812,7 @@ const (
|
|||
TIOCGPKT = 0x40045438
|
||||
TIOCGPTLCK = 0x40045439
|
||||
TIOCGPTN = 0x40045430
|
||||
TIOCGPTPEER = 0x20005441
|
||||
TIOCGRS485 = 0x542e
|
||||
TIOCGSERIAL = 0x541e
|
||||
TIOCGSID = 0x5429
|
||||
|
@ -1872,6 +1905,8 @@ const (
|
|||
TUNSETVNETHDRSZ = 0x800454d8
|
||||
TUNSETVNETLE = 0x800454dc
|
||||
UMOUNT_NOFOLLOW = 0x8
|
||||
UTIME_NOW = 0x3fffffff
|
||||
UTIME_OMIT = 0x3ffffffe
|
||||
VDISCARD = 0x10
|
||||
VEOF = 0x4
|
||||
VEOL = 0x6
|
||||
|
@ -1901,6 +1936,17 @@ const (
|
|||
WALL = 0x40000000
|
||||
WCLONE = 0x80000000
|
||||
WCONTINUED = 0x8
|
||||
WDIOC_GETBOOTSTATUS = 0x40045702
|
||||
WDIOC_GETPRETIMEOUT = 0x40045709
|
||||
WDIOC_GETSTATUS = 0x40045701
|
||||
WDIOC_GETSUPPORT = 0x40285700
|
||||
WDIOC_GETTEMP = 0x40045703
|
||||
WDIOC_GETTIMELEFT = 0x4004570a
|
||||
WDIOC_GETTIMEOUT = 0x40045707
|
||||
WDIOC_KEEPALIVE = 0x40045705
|
||||
WDIOC_SETOPTIONS = 0x40045704
|
||||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
|
@ -2081,7 +2127,6 @@ const (
|
|||
SIGTSTP = syscall.Signal(0x14)
|
||||
SIGTTIN = syscall.Signal(0x15)
|
||||
SIGTTOU = syscall.Signal(0x16)
|
||||
SIGUNUSED = syscall.Signal(0x1f)
|
||||
SIGURG = syscall.Signal(0x17)
|
||||
SIGUSR1 = syscall.Signal(0xa)
|
||||
SIGUSR2 = syscall.Signal(0xc)
|
||||
|
|
|
@ -36,7 +36,7 @@ const (
|
|||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2b
|
||||
AF_MAX = 0x2c
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
|
@ -51,6 +51,7 @@ const (
|
|||
AF_ROUTE = 0x10
|
||||
AF_RXRPC = 0x21
|
||||
AF_SECURITY = 0xe
|
||||
AF_SMC = 0x2b
|
||||
AF_SNA = 0x16
|
||||
AF_TIPC = 0x1e
|
||||
AF_UNIX = 0x1
|
||||
|
@ -129,6 +130,7 @@ const (
|
|||
ARPHRD_TUNNEL = 0x300
|
||||
ARPHRD_TUNNEL6 = 0x301
|
||||
ARPHRD_VOID = 0xffff
|
||||
ARPHRD_VSOCKMON = 0x33a
|
||||
ARPHRD_X25 = 0x10f
|
||||
B0 = 0x0
|
||||
B1000000 = 0x17
|
||||
|
@ -392,6 +394,7 @@ const (
|
|||
ETH_P_FIP = 0x8914
|
||||
ETH_P_HDLC = 0x19
|
||||
ETH_P_HSR = 0x892f
|
||||
ETH_P_IBOE = 0x8915
|
||||
ETH_P_IEEE802154 = 0xf6
|
||||
ETH_P_IEEEPUP = 0xa00
|
||||
ETH_P_IEEEPUPAT = 0xa01
|
||||
|
@ -453,6 +456,8 @@ const (
|
|||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
|
||||
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
|
||||
|
@ -618,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -657,8 +663,10 @@ const (
|
|||
IPV6_2292PKTOPTIONS = 0x6
|
||||
IPV6_2292RTHDR = 0x5
|
||||
IPV6_ADDRFORM = 0x1
|
||||
IPV6_ADDR_PREFERENCES = 0x48
|
||||
IPV6_ADD_MEMBERSHIP = 0x14
|
||||
IPV6_AUTHHDR = 0xa
|
||||
IPV6_AUTOFLOWLABEL = 0x46
|
||||
IPV6_CHECKSUM = 0x7
|
||||
IPV6_DONTFRAG = 0x3e
|
||||
IPV6_DROP_MEMBERSHIP = 0x15
|
||||
|
@ -671,12 +679,14 @@ const (
|
|||
IPV6_JOIN_GROUP = 0x14
|
||||
IPV6_LEAVE_ANYCAST = 0x1c
|
||||
IPV6_LEAVE_GROUP = 0x15
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
IPV6_NEXTHOP = 0x9
|
||||
IPV6_ORIGDSTADDR = 0x4a
|
||||
IPV6_PATHMTU = 0x3d
|
||||
IPV6_PKTINFO = 0x32
|
||||
IPV6_PMTUDISC_DO = 0x2
|
||||
|
@ -687,8 +697,10 @@ const (
|
|||
IPV6_PMTUDISC_WANT = 0x1
|
||||
IPV6_RECVDSTOPTS = 0x3a
|
||||
IPV6_RECVERR = 0x19
|
||||
IPV6_RECVFRAGSIZE = 0x4d
|
||||
IPV6_RECVHOPLIMIT = 0x33
|
||||
IPV6_RECVHOPOPTS = 0x35
|
||||
IPV6_RECVORIGDSTADDR = 0x4a
|
||||
IPV6_RECVPATHMTU = 0x3c
|
||||
IPV6_RECVPKTINFO = 0x31
|
||||
IPV6_RECVRTHDR = 0x38
|
||||
|
@ -702,7 +714,9 @@ const (
|
|||
IPV6_RXDSTOPTS = 0x3b
|
||||
IPV6_RXHOPOPTS = 0x36
|
||||
IPV6_TCLASS = 0x43
|
||||
IPV6_TRANSPARENT = 0x4b
|
||||
IPV6_UNICAST_HOPS = 0x10
|
||||
IPV6_UNICAST_IF = 0x4c
|
||||
IPV6_V6ONLY = 0x1a
|
||||
IPV6_XFRM_POLICY = 0x23
|
||||
IP_ADD_MEMBERSHIP = 0x23
|
||||
|
@ -745,6 +759,7 @@ const (
|
|||
IP_PMTUDISC_PROBE = 0x3
|
||||
IP_PMTUDISC_WANT = 0x1
|
||||
IP_RECVERR = 0xb
|
||||
IP_RECVFRAGSIZE = 0x19
|
||||
IP_RECVOPTS = 0x6
|
||||
IP_RECVORIGDSTADDR = 0x14
|
||||
IP_RECVRETOPTS = 0x7
|
||||
|
@ -782,6 +797,7 @@ const (
|
|||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
KEYCTL_REVOKE = 0x3
|
||||
KEYCTL_SEARCH = 0xa
|
||||
KEYCTL_SESSION_TO_PARENT = 0x12
|
||||
|
@ -914,6 +930,7 @@ const (
|
|||
MS_SILENT = 0x8000
|
||||
MS_SLAVE = 0x80000
|
||||
MS_STRICTATIME = 0x1000000
|
||||
MS_SUBMOUNT = 0x4000000
|
||||
MS_SYNC = 0x4
|
||||
MS_SYNCHRONOUS = 0x10
|
||||
MS_UNBINDABLE = 0x20000
|
||||
|
@ -928,6 +945,7 @@ const (
|
|||
NETLINK_DNRTMSG = 0xe
|
||||
NETLINK_DROP_MEMBERSHIP = 0x2
|
||||
NETLINK_ECRYPTFS = 0x13
|
||||
NETLINK_EXT_ACK = 0xb
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
|
@ -946,6 +964,7 @@ const (
|
|||
NETLINK_RX_RING = 0x6
|
||||
NETLINK_SCSITRANSPORT = 0x12
|
||||
NETLINK_SELINUX = 0x7
|
||||
NETLINK_SMC = 0x16
|
||||
NETLINK_SOCK_DIAG = 0x4
|
||||
NETLINK_TX_RING = 0x7
|
||||
NETLINK_UNUSED = 0x1
|
||||
|
@ -968,8 +987,10 @@ const (
|
|||
NLMSG_NOOP = 0x1
|
||||
NLMSG_OVERRUN = 0x4
|
||||
NLM_F_ACK = 0x4
|
||||
NLM_F_ACK_TLVS = 0x200
|
||||
NLM_F_APPEND = 0x800
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CAPPED = 0x100
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
|
@ -1026,6 +1047,7 @@ const (
|
|||
PACKET_FANOUT_EBPF = 0x7
|
||||
PACKET_FANOUT_FLAG_DEFRAG = 0x8000
|
||||
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
|
||||
PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
|
||||
PACKET_FANOUT_HASH = 0x0
|
||||
PACKET_FANOUT_LB = 0x1
|
||||
PACKET_FANOUT_QM = 0x5
|
||||
|
@ -1168,7 +1190,7 @@ const (
|
|||
PR_SET_NO_NEW_PRIVS = 0x26
|
||||
PR_SET_PDEATHSIG = 0x1
|
||||
PR_SET_PTRACER = 0x59616d61
|
||||
PR_SET_PTRACER_ANY = -0x1
|
||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
||||
PR_SET_SECCOMP = 0x16
|
||||
PR_SET_SECUREBITS = 0x1c
|
||||
PR_SET_THP_DISABLE = 0x29
|
||||
|
@ -1314,7 +1336,7 @@ const (
|
|||
RLIMIT_RTTIME = 0xf
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = -0x1
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
|
@ -1339,7 +1361,7 @@ const (
|
|||
RTAX_UNSPEC = 0x0
|
||||
RTAX_WINDOW = 0x3
|
||||
RTA_ALIGNTO = 0x4
|
||||
RTA_MAX = 0x19
|
||||
RTA_MAX = 0x1a
|
||||
RTCF_DIRECTSRC = 0x4000000
|
||||
RTCF_DOREDIRECT = 0x1000000
|
||||
RTCF_LOG = 0x2000000
|
||||
|
@ -1383,6 +1405,7 @@ const (
|
|||
RTM_DELLINK = 0x11
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
RTM_DELNSID = 0x59
|
||||
RTM_DELQDISC = 0x25
|
||||
RTM_DELROUTE = 0x19
|
||||
|
@ -1391,6 +1414,7 @@ const (
|
|||
RTM_DELTFILTER = 0x2d
|
||||
RTM_F_CLONED = 0x200
|
||||
RTM_F_EQUALIZE = 0x400
|
||||
RTM_F_FIB_MATCH = 0x2000
|
||||
RTM_F_LOOKUP_TABLE = 0x1000
|
||||
RTM_F_NOTIFY = 0x100
|
||||
RTM_F_PREFIX = 0x800
|
||||
|
@ -1412,10 +1436,11 @@ const (
|
|||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x5f
|
||||
RTM_MAX = 0x63
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
|
@ -1430,8 +1455,8 @@ const (
|
|||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x14
|
||||
RTM_NR_MSGTYPES = 0x50
|
||||
RTM_NR_FAMILIES = 0x15
|
||||
RTM_NR_MSGTYPES = 0x54
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
|
@ -1442,6 +1467,7 @@ const (
|
|||
RTNH_F_OFFLOAD = 0x8
|
||||
RTNH_F_ONLINK = 0x4
|
||||
RTNH_F_PERVASIVE = 0x2
|
||||
RTNH_F_UNRESOLVED = 0x20
|
||||
RTN_MAX = 0xb
|
||||
RTPROT_BABEL = 0x2a
|
||||
RTPROT_BIRD = 0xc
|
||||
|
@ -1472,6 +1498,7 @@ const (
|
|||
SCM_TIMESTAMP = 0x1d
|
||||
SCM_TIMESTAMPING = 0x25
|
||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
|
@ -1610,6 +1637,7 @@ const (
|
|||
SO_BSDCOMPAT = 0xe
|
||||
SO_BUSY_POLL = 0x2e
|
||||
SO_CNX_ADVICE = 0x35
|
||||
SO_COOKIE = 0x39
|
||||
SO_DEBUG = 0x1
|
||||
SO_DETACH_BPF = 0x1b
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
|
@ -1618,11 +1646,13 @@ const (
|
|||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
SO_INCOMING_NAPI_ID = 0x38
|
||||
SO_KEEPALIVE = 0x9
|
||||
SO_LINGER = 0xd
|
||||
SO_LOCK_FILTER = 0x2c
|
||||
SO_MARK = 0x24
|
||||
SO_MAX_PACING_RATE = 0x2f
|
||||
SO_MEMINFO = 0x37
|
||||
SO_NOFCS = 0x2b
|
||||
SO_NO_CHECK = 0xb
|
||||
SO_OOBINLINE = 0xa
|
||||
|
@ -1630,6 +1660,7 @@ const (
|
|||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x15
|
||||
SO_PEERGROUPS = 0x3b
|
||||
SO_PEERNAME = 0x1c
|
||||
SO_PEERSEC = 0x1f
|
||||
SO_PRIORITY = 0xc
|
||||
|
@ -1724,6 +1755,7 @@ const (
|
|||
TCP_CORK = 0x3
|
||||
TCP_DEFER_ACCEPT = 0x9
|
||||
TCP_FASTOPEN = 0x17
|
||||
TCP_FASTOPEN_CONNECT = 0x1e
|
||||
TCP_INFO = 0xb
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
|
@ -1780,6 +1812,7 @@ const (
|
|||
TIOCGPKT = 0x40045438
|
||||
TIOCGPTLCK = 0x40045439
|
||||
TIOCGPTN = 0x40045430
|
||||
TIOCGPTPEER = 0x20005441
|
||||
TIOCGRS485 = 0x542e
|
||||
TIOCGSERIAL = 0x541e
|
||||
TIOCGSID = 0x5429
|
||||
|
@ -1872,6 +1905,8 @@ const (
|
|||
TUNSETVNETHDRSZ = 0x800454d8
|
||||
TUNSETVNETLE = 0x800454dc
|
||||
UMOUNT_NOFOLLOW = 0x8
|
||||
UTIME_NOW = 0x3fffffff
|
||||
UTIME_OMIT = 0x3ffffffe
|
||||
VDISCARD = 0x10
|
||||
VEOF = 0x4
|
||||
VEOL = 0x6
|
||||
|
@ -1901,6 +1936,17 @@ const (
|
|||
WALL = 0x40000000
|
||||
WCLONE = 0x80000000
|
||||
WCONTINUED = 0x8
|
||||
WDIOC_GETBOOTSTATUS = 0x40045702
|
||||
WDIOC_GETPRETIMEOUT = 0x40045709
|
||||
WDIOC_GETSTATUS = 0x40045701
|
||||
WDIOC_GETSUPPORT = 0x40285700
|
||||
WDIOC_GETTEMP = 0x40045703
|
||||
WDIOC_GETTIMELEFT = 0x4004570a
|
||||
WDIOC_GETTIMEOUT = 0x40045707
|
||||
WDIOC_KEEPALIVE = 0x40045705
|
||||
WDIOC_SETOPTIONS = 0x40045704
|
||||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
|
@ -2081,7 +2127,6 @@ const (
|
|||
SIGTSTP = syscall.Signal(0x14)
|
||||
SIGTTIN = syscall.Signal(0x15)
|
||||
SIGTTOU = syscall.Signal(0x16)
|
||||
SIGUNUSED = syscall.Signal(0x1f)
|
||||
SIGURG = syscall.Signal(0x17)
|
||||
SIGUSR1 = syscall.Signal(0xa)
|
||||
SIGUSR2 = syscall.Signal(0xc)
|
||||
|
|
|
@ -36,7 +36,7 @@ const (
|
|||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2b
|
||||
AF_MAX = 0x2c
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
|
@ -51,6 +51,7 @@ const (
|
|||
AF_ROUTE = 0x10
|
||||
AF_RXRPC = 0x21
|
||||
AF_SECURITY = 0xe
|
||||
AF_SMC = 0x2b
|
||||
AF_SNA = 0x16
|
||||
AF_TIPC = 0x1e
|
||||
AF_UNIX = 0x1
|
||||
|
@ -129,6 +130,7 @@ const (
|
|||
ARPHRD_TUNNEL = 0x300
|
||||
ARPHRD_TUNNEL6 = 0x301
|
||||
ARPHRD_VOID = 0xffff
|
||||
ARPHRD_VSOCKMON = 0x33a
|
||||
ARPHRD_X25 = 0x10f
|
||||
B0 = 0x0
|
||||
B1000000 = 0x1008
|
||||
|
@ -392,6 +394,7 @@ const (
|
|||
ETH_P_FIP = 0x8914
|
||||
ETH_P_HDLC = 0x19
|
||||
ETH_P_HSR = 0x892f
|
||||
ETH_P_IBOE = 0x8915
|
||||
ETH_P_IEEE802154 = 0xf6
|
||||
ETH_P_IEEEPUP = 0xa00
|
||||
ETH_P_IEEEPUPAT = 0xa01
|
||||
|
@ -453,6 +456,8 @@ const (
|
|||
FF1 = 0x8000
|
||||
FFDLY = 0x8000
|
||||
FLUSHO = 0x1000
|
||||
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
|
||||
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
|
||||
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
|
||||
FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
|
||||
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
|
||||
|
@ -618,6 +623,7 @@ const (
|
|||
IN_OPEN = 0x20
|
||||
IN_Q_OVERFLOW = 0x4000
|
||||
IN_UNMOUNT = 0x2000
|
||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
|
||||
IPPROTO_AH = 0x33
|
||||
IPPROTO_BEETPH = 0x5e
|
||||
IPPROTO_COMP = 0x6c
|
||||
|
@ -657,8 +663,10 @@ const (
|
|||
IPV6_2292PKTOPTIONS = 0x6
|
||||
IPV6_2292RTHDR = 0x5
|
||||
IPV6_ADDRFORM = 0x1
|
||||
IPV6_ADDR_PREFERENCES = 0x48
|
||||
IPV6_ADD_MEMBERSHIP = 0x14
|
||||
IPV6_AUTHHDR = 0xa
|
||||
IPV6_AUTOFLOWLABEL = 0x46
|
||||
IPV6_CHECKSUM = 0x7
|
||||
IPV6_DONTFRAG = 0x3e
|
||||
IPV6_DROP_MEMBERSHIP = 0x15
|
||||
|
@ -671,12 +679,14 @@ const (
|
|||
IPV6_JOIN_GROUP = 0x14
|
||||
IPV6_LEAVE_ANYCAST = 0x1c
|
||||
IPV6_LEAVE_GROUP = 0x15
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
IPV6_NEXTHOP = 0x9
|
||||
IPV6_ORIGDSTADDR = 0x4a
|
||||
IPV6_PATHMTU = 0x3d
|
||||
IPV6_PKTINFO = 0x32
|
||||
IPV6_PMTUDISC_DO = 0x2
|
||||
|
@ -687,8 +697,10 @@ const (
|
|||
IPV6_PMTUDISC_WANT = 0x1
|
||||
IPV6_RECVDSTOPTS = 0x3a
|
||||
IPV6_RECVERR = 0x19
|
||||
IPV6_RECVFRAGSIZE = 0x4d
|
||||
IPV6_RECVHOPLIMIT = 0x33
|
||||
IPV6_RECVHOPOPTS = 0x35
|
||||
IPV6_RECVORIGDSTADDR = 0x4a
|
||||
IPV6_RECVPATHMTU = 0x3c
|
||||
IPV6_RECVPKTINFO = 0x31
|
||||
IPV6_RECVRTHDR = 0x38
|
||||
|
@ -702,7 +714,9 @@ const (
|
|||
IPV6_RXDSTOPTS = 0x3b
|
||||
IPV6_RXHOPOPTS = 0x36
|
||||
IPV6_TCLASS = 0x43
|
||||
IPV6_TRANSPARENT = 0x4b
|
||||
IPV6_UNICAST_HOPS = 0x10
|
||||
IPV6_UNICAST_IF = 0x4c
|
||||
IPV6_V6ONLY = 0x1a
|
||||
IPV6_XFRM_POLICY = 0x23
|
||||
IP_ADD_MEMBERSHIP = 0x23
|
||||
|
@ -745,6 +759,7 @@ const (
|
|||
IP_PMTUDISC_PROBE = 0x3
|
||||
IP_PMTUDISC_WANT = 0x1
|
||||
IP_RECVERR = 0xb
|
||||
IP_RECVFRAGSIZE = 0x19
|
||||
IP_RECVOPTS = 0x6
|
||||
IP_RECVORIGDSTADDR = 0x14
|
||||
IP_RECVRETOPTS = 0x7
|
||||
|
@ -782,6 +797,7 @@ const (
|
|||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
KEYCTL_REVOKE = 0x3
|
||||
KEYCTL_SEARCH = 0xa
|
||||
KEYCTL_SESSION_TO_PARENT = 0x12
|
||||
|
@ -914,6 +930,7 @@ const (
|
|||
MS_SILENT = 0x8000
|
||||
MS_SLAVE = 0x80000
|
||||
MS_STRICTATIME = 0x1000000
|
||||
MS_SUBMOUNT = 0x4000000
|
||||
MS_SYNC = 0x4
|
||||
MS_SYNCHRONOUS = 0x10
|
||||
MS_UNBINDABLE = 0x20000
|
||||
|
@ -928,6 +945,7 @@ const (
|
|||
NETLINK_DNRTMSG = 0xe
|
||||
NETLINK_DROP_MEMBERSHIP = 0x2
|
||||
NETLINK_ECRYPTFS = 0x13
|
||||
NETLINK_EXT_ACK = 0xb
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
|
@ -946,6 +964,7 @@ const (
|
|||
NETLINK_RX_RING = 0x6
|
||||
NETLINK_SCSITRANSPORT = 0x12
|
||||
NETLINK_SELINUX = 0x7
|
||||
NETLINK_SMC = 0x16
|
||||
NETLINK_SOCK_DIAG = 0x4
|
||||
NETLINK_TX_RING = 0x7
|
||||
NETLINK_UNUSED = 0x1
|
||||
|
@ -966,8 +985,10 @@ const (
|
|||
NLMSG_NOOP = 0x1
|
||||
NLMSG_OVERRUN = 0x4
|
||||
NLM_F_ACK = 0x4
|
||||
NLM_F_ACK_TLVS = 0x200
|
||||
NLM_F_APPEND = 0x800
|
||||
NLM_F_ATOMIC = 0x400
|
||||
NLM_F_CAPPED = 0x100
|
||||
NLM_F_CREATE = 0x400
|
||||
NLM_F_DUMP = 0x300
|
||||
NLM_F_DUMP_FILTERED = 0x20
|
||||
|
@ -1024,6 +1045,7 @@ const (
|
|||
PACKET_FANOUT_EBPF = 0x7
|
||||
PACKET_FANOUT_FLAG_DEFRAG = 0x8000
|
||||
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
|
||||
PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
|
||||
PACKET_FANOUT_HASH = 0x0
|
||||
PACKET_FANOUT_LB = 0x1
|
||||
PACKET_FANOUT_QM = 0x5
|
||||
|
@ -1165,7 +1187,7 @@ const (
|
|||
PR_SET_NO_NEW_PRIVS = 0x26
|
||||
PR_SET_PDEATHSIG = 0x1
|
||||
PR_SET_PTRACER = 0x59616d61
|
||||
PR_SET_PTRACER_ANY = -0x1
|
||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
||||
PR_SET_SECCOMP = 0x16
|
||||
PR_SET_SECUREBITS = 0x1c
|
||||
PR_SET_THP_DISABLE = 0x29
|
||||
|
@ -1318,7 +1340,7 @@ const (
|
|||
RLIMIT_RTTIME = 0xf
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = -0x1
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
|
@ -1343,7 +1365,7 @@ const (
|
|||
RTAX_UNSPEC = 0x0
|
||||
RTAX_WINDOW = 0x3
|
||||
RTA_ALIGNTO = 0x4
|
||||
RTA_MAX = 0x19
|
||||
RTA_MAX = 0x1a
|
||||
RTCF_DIRECTSRC = 0x4000000
|
||||
RTCF_DOREDIRECT = 0x1000000
|
||||
RTCF_LOG = 0x2000000
|
||||
|
@ -1387,6 +1409,7 @@ const (
|
|||
RTM_DELLINK = 0x11
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
RTM_DELNSID = 0x59
|
||||
RTM_DELQDISC = 0x25
|
||||
RTM_DELROUTE = 0x19
|
||||
|
@ -1395,6 +1418,7 @@ const (
|
|||
RTM_DELTFILTER = 0x2d
|
||||
RTM_F_CLONED = 0x200
|
||||
RTM_F_EQUALIZE = 0x400
|
||||
RTM_F_FIB_MATCH = 0x2000
|
||||
RTM_F_LOOKUP_TABLE = 0x1000
|
||||
RTM_F_NOTIFY = 0x100
|
||||
RTM_F_PREFIX = 0x800
|
||||
|
@ -1416,10 +1440,11 @@ const (
|
|||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x5f
|
||||
RTM_MAX = 0x63
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
|
@ -1434,8 +1459,8 @@ const (
|
|||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x14
|
||||
RTM_NR_MSGTYPES = 0x50
|
||||
RTM_NR_FAMILIES = 0x15
|
||||
RTM_NR_MSGTYPES = 0x54
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
|
@ -1446,6 +1471,7 @@ const (
|
|||
RTNH_F_OFFLOAD = 0x8
|
||||
RTNH_F_ONLINK = 0x4
|
||||
RTNH_F_PERVASIVE = 0x2
|
||||
RTNH_F_UNRESOLVED = 0x20
|
||||
RTN_MAX = 0xb
|
||||
RTPROT_BABEL = 0x2a
|
||||
RTPROT_BIRD = 0xc
|
||||
|
@ -1476,6 +1502,7 @@ const (
|
|||
SCM_TIMESTAMP = 0x1d
|
||||
SCM_TIMESTAMPING = 0x25
|
||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
|
@ -1614,6 +1641,7 @@ const (
|
|||
SO_BSDCOMPAT = 0xe
|
||||
SO_BUSY_POLL = 0x2e
|
||||
SO_CNX_ADVICE = 0x35
|
||||
SO_COOKIE = 0x39
|
||||
SO_DEBUG = 0x1
|
||||
SO_DETACH_BPF = 0x1b
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
|
@ -1622,11 +1650,13 @@ const (
|
|||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
SO_INCOMING_NAPI_ID = 0x38
|
||||
SO_KEEPALIVE = 0x9
|
||||
SO_LINGER = 0xd
|
||||
SO_LOCK_FILTER = 0x2c
|
||||
SO_MARK = 0x24
|
||||
SO_MAX_PACING_RATE = 0x2f
|
||||
SO_MEMINFO = 0x37
|
||||
SO_NOFCS = 0x2b
|
||||
SO_NO_CHECK = 0xb
|
||||
SO_OOBINLINE = 0xa
|
||||
|
@ -1634,6 +1664,7 @@ const (
|
|||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x11
|
||||
SO_PEERGROUPS = 0x3b
|
||||
SO_PEERNAME = 0x1c
|
||||
SO_PEERSEC = 0x1f
|
||||
SO_PRIORITY = 0xc
|
||||
|
@ -1730,6 +1761,7 @@ const (
|
|||
TCP_CORK = 0x3
|
||||
TCP_DEFER_ACCEPT = 0x9
|
||||
TCP_FASTOPEN = 0x17
|
||||
TCP_FASTOPEN_CONNECT = 0x1e
|
||||
TCP_INFO = 0xb
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
|
@ -1789,6 +1821,7 @@ const (
|
|||
TIOCGPKT = 0x80045438
|
||||
TIOCGPTLCK = 0x80045439
|
||||
TIOCGPTN = 0x80045430
|
||||
TIOCGPTPEER = 0x5441
|
||||
TIOCGRS485 = 0x542e
|
||||
TIOCGSERIAL = 0x541e
|
||||
TIOCGSID = 0x5429
|
||||
|
@ -1872,6 +1905,8 @@ const (
|
|||
TUNSETVNETHDRSZ = 0x400454d8
|
||||
TUNSETVNETLE = 0x400454dc
|
||||
UMOUNT_NOFOLLOW = 0x8
|
||||
UTIME_NOW = 0x3fffffff
|
||||
UTIME_OMIT = 0x3ffffffe
|
||||
VDISCARD = 0xd
|
||||
VEOF = 0x4
|
||||
VEOL = 0xb
|
||||
|
@ -1901,6 +1936,17 @@ const (
|
|||
WALL = 0x40000000
|
||||
WCLONE = 0x80000000
|
||||
WCONTINUED = 0x8
|
||||
WDIOC_GETBOOTSTATUS = 0x80045702
|
||||
WDIOC_GETPRETIMEOUT = 0x80045709
|
||||
WDIOC_GETSTATUS = 0x80045701
|
||||
WDIOC_GETSUPPORT = 0x80285700
|
||||
WDIOC_GETTEMP = 0x80045703
|
||||
WDIOC_GETTIMELEFT = 0x8004570a
|
||||
WDIOC_GETTIMEOUT = 0x80045707
|
||||
WDIOC_KEEPALIVE = 0x80045705
|
||||
WDIOC_SETOPTIONS = 0x80045704
|
||||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
|
@ -2081,7 +2127,6 @@ const (
|
|||
SIGTSTP = syscall.Signal(0x14)
|
||||
SIGTTIN = syscall.Signal(0x15)
|
||||
SIGTTOU = syscall.Signal(0x16)
|
||||
SIGUNUSED = syscall.Signal(0x1f)
|
||||
SIGURG = syscall.Signal(0x17)
|
||||
SIGUSR1 = syscall.Signal(0xa)
|
||||
SIGUSR2 = syscall.Signal(0xc)
|
||||
|
|
|
@ -664,6 +664,8 @@ const (
|
|||
MS_OLDSYNC = 0x0
|
||||
MS_SYNC = 0x4
|
||||
M_FLUSH = 0x86
|
||||
NAME_MAX = 0xff
|
||||
NEWDEV = 0x1
|
||||
NL0 = 0x0
|
||||
NL1 = 0x100
|
||||
NLDLY = 0x100
|
||||
|
@ -672,6 +674,9 @@ const (
|
|||
OFDEL = 0x80
|
||||
OFILL = 0x40
|
||||
OLCUC = 0x2
|
||||
OLDDEV = 0x0
|
||||
ONBITSMAJOR = 0x7
|
||||
ONBITSMINOR = 0x8
|
||||
ONLCR = 0x4
|
||||
ONLRET = 0x20
|
||||
ONOCR = 0x10
|
||||
|
@ -1105,6 +1110,7 @@ const (
|
|||
VEOL = 0x5
|
||||
VEOL2 = 0x6
|
||||
VERASE = 0x2
|
||||
VERASE2 = 0x11
|
||||
VINTR = 0x0
|
||||
VKILL = 0x3
|
||||
VLNEXT = 0xf
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
// Code generated by linux/mkall.go generatePtracePair(386, amd64). DO NOT EDIT.
|
||||
|
||||
// +build linux
|
||||
// +build 386 amd64
|
||||
|
||||
package unix
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// PtraceRegs386 is the registers used by 386 binaries.
|
||||
type PtraceRegs386 struct {
|
||||
Ebx int32
|
||||
Ecx int32
|
||||
Edx int32
|
||||
Esi int32
|
||||
Edi int32
|
||||
Ebp int32
|
||||
Eax int32
|
||||
Xds int32
|
||||
Xes int32
|
||||
Xfs int32
|
||||
Xgs int32
|
||||
Orig_eax int32
|
||||
Eip int32
|
||||
Xcs int32
|
||||
Eflags int32
|
||||
Esp int32
|
||||
Xss int32
|
||||
}
|
||||
|
||||
// PtraceGetRegs386 fetches the registers used by 386 binaries.
|
||||
func PtraceGetRegs386(pid int, regsout *PtraceRegs386) error {
|
||||
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
|
||||
}
|
||||
|
||||
// PtraceSetRegs386 sets the registers used by 386 binaries.
|
||||
func PtraceSetRegs386(pid int, regs *PtraceRegs386) error {
|
||||
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
|
||||
}
|
||||
|
||||
// PtraceRegsAmd64 is the registers used by amd64 binaries.
|
||||
type PtraceRegsAmd64 struct {
|
||||
R15 uint64
|
||||
R14 uint64
|
||||
R13 uint64
|
||||
R12 uint64
|
||||
Rbp uint64
|
||||
Rbx uint64
|
||||
R11 uint64
|
||||
R10 uint64
|
||||
R9 uint64
|
||||
R8 uint64
|
||||
Rax uint64
|
||||
Rcx uint64
|
||||
Rdx uint64
|
||||
Rsi uint64
|
||||
Rdi uint64
|
||||
Orig_rax uint64
|
||||
Rip uint64
|
||||
Cs uint64
|
||||
Eflags uint64
|
||||
Rsp uint64
|
||||
Ss uint64
|
||||
Fs_base uint64
|
||||
Gs_base uint64
|
||||
Ds uint64
|
||||
Es uint64
|
||||
Fs uint64
|
||||
Gs uint64
|
||||
}
|
||||
|
||||
// PtraceGetRegsAmd64 fetches the registers used by amd64 binaries.
|
||||
func PtraceGetRegsAmd64(pid int, regsout *PtraceRegsAmd64) error {
|
||||
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
|
||||
}
|
||||
|
||||
// PtraceSetRegsAmd64 sets the registers used by amd64 binaries.
|
||||
func PtraceSetRegsAmd64(pid int, regs *PtraceRegsAmd64) error {
|
||||
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
// Code generated by linux/mkall.go generatePtracePair(arm, arm64). DO NOT EDIT.
|
||||
|
||||
// +build linux
|
||||
// +build arm arm64
|
||||
|
||||
package unix
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// PtraceRegsArm is the registers used by arm binaries.
|
||||
type PtraceRegsArm struct {
|
||||
Uregs [18]uint32
|
||||
}
|
||||
|
||||
// PtraceGetRegsArm fetches the registers used by arm binaries.
|
||||
func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
|
||||
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
|
||||
}
|
||||
|
||||
// PtraceSetRegsArm sets the registers used by arm binaries.
|
||||
func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
|
||||
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
|
||||
}
|
||||
|
||||
// PtraceRegsArm64 is the registers used by arm64 binaries.
|
||||
type PtraceRegsArm64 struct {
|
||||
Regs [31]uint64
|
||||
Sp uint64
|
||||
Pc uint64
|
||||
Pstate uint64
|
||||
}
|
||||
|
||||
// PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
|
||||
func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
|
||||
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
|
||||
}
|
||||
|
||||
// PtraceSetRegsArm64 sets the registers used by arm64 binaries.
|
||||
func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
|
||||
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
// Code generated by linux/mkall.go generatePtracePair(mips, mips64). DO NOT EDIT.
|
||||
|
||||
// +build linux
|
||||
// +build mips mips64
|
||||
|
||||
package unix
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// PtraceRegsMips is the registers used by mips binaries.
|
||||
type PtraceRegsMips struct {
|
||||
Regs [32]uint64
|
||||
Lo uint64
|
||||
Hi uint64
|
||||
Epc uint64
|
||||
Badvaddr uint64
|
||||
Status uint64
|
||||
Cause uint64
|
||||
}
|
||||
|
||||
// PtraceGetRegsMips fetches the registers used by mips binaries.
|
||||
func PtraceGetRegsMips(pid int, regsout *PtraceRegsMips) error {
|
||||
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
|
||||
}
|
||||
|
||||
// PtraceSetRegsMips sets the registers used by mips binaries.
|
||||
func PtraceSetRegsMips(pid int, regs *PtraceRegsMips) error {
|
||||
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
|
||||
}
|
||||
|
||||
// PtraceRegsMips64 is the registers used by mips64 binaries.
|
||||
type PtraceRegsMips64 struct {
|
||||
Regs [32]uint64
|
||||
Lo uint64
|
||||
Hi uint64
|
||||
Epc uint64
|
||||
Badvaddr uint64
|
||||
Status uint64
|
||||
Cause uint64
|
||||
}
|
||||
|
||||
// PtraceGetRegsMips64 fetches the registers used by mips64 binaries.
|
||||
func PtraceGetRegsMips64(pid int, regsout *PtraceRegsMips64) error {
|
||||
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
|
||||
}
|
||||
|
||||
// PtraceSetRegsMips64 sets the registers used by mips64 binaries.
|
||||
func PtraceSetRegsMips64(pid int, regs *PtraceRegsMips64) error {
|
||||
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
// Code generated by linux/mkall.go generatePtracePair(mipsle, mips64le). DO NOT EDIT.
|
||||
|
||||
// +build linux
|
||||
// +build mipsle mips64le
|
||||
|
||||
package unix
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// PtraceRegsMipsle is the registers used by mipsle binaries.
|
||||
type PtraceRegsMipsle struct {
|
||||
Regs [32]uint64
|
||||
Lo uint64
|
||||
Hi uint64
|
||||
Epc uint64
|
||||
Badvaddr uint64
|
||||
Status uint64
|
||||
Cause uint64
|
||||
}
|
||||
|
||||
// PtraceGetRegsMipsle fetches the registers used by mipsle binaries.
|
||||
func PtraceGetRegsMipsle(pid int, regsout *PtraceRegsMipsle) error {
|
||||
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
|
||||
}
|
||||
|
||||
// PtraceSetRegsMipsle sets the registers used by mipsle binaries.
|
||||
func PtraceSetRegsMipsle(pid int, regs *PtraceRegsMipsle) error {
|
||||
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
|
||||
}
|
||||
|
||||
// PtraceRegsMips64le is the registers used by mips64le binaries.
|
||||
type PtraceRegsMips64le struct {
|
||||
Regs [32]uint64
|
||||
Lo uint64
|
||||
Hi uint64
|
||||
Epc uint64
|
||||
Badvaddr uint64
|
||||
Status uint64
|
||||
Cause uint64
|
||||
}
|
||||
|
||||
// PtraceGetRegsMips64le fetches the registers used by mips64le binaries.
|
||||
func PtraceGetRegsMips64le(pid int, regsout *PtraceRegsMips64le) error {
|
||||
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
|
||||
}
|
||||
|
||||
// PtraceSetRegsMips64le sets the registers used by mips64le binaries.
|
||||
func PtraceSetRegsMips64le(pid int, regs *PtraceRegsMips64le) error {
|
||||
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
|
||||
}
|
|
@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Madvise(b []byte, behav int) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
|
|
|
@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Madvise(b []byte, behav int) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
|
|
|
@ -221,7 +221,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
|||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Madvise(b []byte, behav int) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
|
|
|
@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Madvise(b []byte, behav int) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
|
|
|
@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Madvise(b []byte, behav int) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
|
@ -412,6 +423,16 @@ func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Access(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Madvise(b []byte, behav int) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
|
@ -926,6 +937,23 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
|
|
|
@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Madvise(b []byte, behav int) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
|
@ -926,6 +937,23 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
|
|
|
@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Madvise(b []byte, behav int) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
|
@ -926,6 +937,23 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
|
|
|
@ -1035,6 +1035,17 @@ func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func read(fd int, p []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(p) > 0 {
|
||||
|
@ -1446,22 +1457,6 @@ func Mlock(b []byte) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Munlock(b []byte) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
_p0 = unsafe.Pointer(&b[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Mlockall(flags int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1488,6 +1483,22 @@ func Msync(b []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Munlock(b []byte) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
_p0 = unsafe.Pointer(&b[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Munlockall() (err error) {
|
||||
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1558,6 +1569,21 @@ func Fstat(fd int, stat *Stat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Ftruncate(fd int, length int64) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32))
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1035,6 +1035,17 @@ func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func read(fd int, p []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(p) > 0 {
|
||||
|
@ -1446,22 +1457,6 @@ func Mlock(b []byte) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Munlock(b []byte) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
_p0 = unsafe.Pointer(&b[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Mlockall(flags int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1488,6 +1483,22 @@ func Msync(b []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Munlock(b []byte) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
_p0 = unsafe.Pointer(&b[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Munlockall() (err error) {
|
||||
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1555,6 +1566,21 @@ func Fstat(fd int, stat *Stat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstatfs(fd int, buf *Statfs_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1035,6 +1035,17 @@ func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func read(fd int, p []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(p) > 0 {
|
||||
|
@ -1446,22 +1457,6 @@ func Mlock(b []byte) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Munlock(b []byte) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
_p0 = unsafe.Pointer(&b[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Mlockall(flags int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1488,6 +1483,22 @@ func Msync(b []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Munlock(b []byte) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
_p0 = unsafe.Pointer(&b[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Munlockall() (err error) {
|
||||
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1717,6 +1728,21 @@ func Fstat(fd int, stat *Stat_t) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getegid() (egid int) {
|
||||
r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0)
|
||||
egid = int(r0)
|
||||
|
|
|
@ -1035,6 +1035,17 @@ func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func read(fd int, p []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(p) > 0 {
|
||||
|
@ -1446,22 +1457,6 @@ func Mlock(b []byte) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Munlock(b []byte) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
_p0 = unsafe.Pointer(&b[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Mlockall(flags int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1488,6 +1483,22 @@ func Msync(b []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Munlock(b []byte) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
_p0 = unsafe.Pointer(&b[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Munlockall() (err error) {
|
||||
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1667,17 +1678,6 @@ func Seek(fd int, offset int64, whence int) (off int64, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
|
||||
written = int(r0)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue