mirror of https://github.com/ethereum/go-ethereum
commit
3e7b4ae0c3
@ -1,29 +1,28 @@ |
||||
// Copyright 2009 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. |
||||
|
||||
// +build linux |
||||
// +build mips64 mips64le |
||||
// +build !gccgo |
||||
|
||||
#include "textflag.h" |
||||
|
||||
// |
||||
// System call support for 386, FreeBSD |
||||
// System calls for mips64, Linux |
||||
// |
||||
|
||||
// Just jump to package syscall's implementation for all these functions. |
||||
// The runtime may know about them. |
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-32 |
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56 |
||||
JMP syscall·Syscall(SB) |
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-44 |
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80 |
||||
JMP syscall·Syscall6(SB) |
||||
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-56 |
||||
JMP syscall·Syscall9(SB) |
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-32 |
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56 |
||||
JMP syscall·RawSyscall(SB) |
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-44 |
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 |
||||
JMP syscall·RawSyscall6(SB) |
@ -0,0 +1,28 @@ |
||||
// 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 s390x |
||||
// +build linux |
||||
// +build !gccgo |
||||
|
||||
#include "textflag.h" |
||||
|
||||
// |
||||
// System calls for s390x, Linux |
||||
// |
||||
|
||||
// Just jump to package syscall's implementation for all these functions. |
||||
// The runtime may know about them. |
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56 |
||||
BR syscall·Syscall(SB) |
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80 |
||||
BR syscall·Syscall6(SB) |
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56 |
||||
BR syscall·RawSyscall(SB) |
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 |
||||
BR syscall·RawSyscall6(SB) |
@ -0,0 +1,35 @@ |
||||
// 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.
|
||||
|
||||
// Bluetooth sockets and messages
|
||||
|
||||
package unix |
||||
|
||||
// Bluetooth Protocols
|
||||
const ( |
||||
BTPROTO_L2CAP = 0 |
||||
BTPROTO_HCI = 1 |
||||
BTPROTO_SCO = 2 |
||||
BTPROTO_RFCOMM = 3 |
||||
BTPROTO_BNEP = 4 |
||||
BTPROTO_CMTP = 5 |
||||
BTPROTO_HIDP = 6 |
||||
BTPROTO_AVDTP = 7 |
||||
) |
||||
|
||||
const ( |
||||
HCI_CHANNEL_RAW = 0 |
||||
HCI_CHANNEL_USER = 1 |
||||
HCI_CHANNEL_MONITOR = 2 |
||||
HCI_CHANNEL_CONTROL = 3 |
||||
) |
||||
|
||||
// Socketoption Level
|
||||
const ( |
||||
SOL_BLUETOOTH = 0x112 |
||||
SOL_HCI = 0x0 |
||||
SOL_L2CAP = 0x6 |
||||
SOL_RFCOMM = 0x12 |
||||
SOL_SCO = 0x11 |
||||
) |
@ -0,0 +1,62 @@ |
||||
// 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 by mkall.sh.
|
||||
package main |
||||
|
||||
import ( |
||||
"fmt" |
||||
"go/format" |
||||
"io/ioutil" |
||||
"log" |
||||
"os" |
||||
"regexp" |
||||
) |
||||
|
||||
func main() { |
||||
b, err := ioutil.ReadAll(os.Stdin) |
||||
if err != nil { |
||||
log.Fatal(err) |
||||
} |
||||
s := string(b) |
||||
|
||||
goarch := os.Getenv("GOARCH") |
||||
goos := os.Getenv("GOOS") |
||||
if goarch == "s390x" && goos == "linux" { |
||||
// Export the types of PtraceRegs fields.
|
||||
re := regexp.MustCompile("ptrace(Psw|Fpregs|Per)") |
||||
s = re.ReplaceAllString(s, "Ptrace$1") |
||||
|
||||
// Replace padding fields inserted by cgo with blank identifiers.
|
||||
re = regexp.MustCompile("Pad_cgo[A-Za-z0-9_]*") |
||||
s = re.ReplaceAllString(s, "_") |
||||
|
||||
// Replace other unwanted fields with blank identifiers.
|
||||
re = regexp.MustCompile("X_[A-Za-z0-9_]*") |
||||
s = re.ReplaceAllString(s, "_") |
||||
|
||||
// Replace the control_regs union with a blank identifier for now.
|
||||
re = regexp.MustCompile("(Control_regs)\\s+\\[0\\]uint64") |
||||
s = re.ReplaceAllString(s, "_ [0]uint64") |
||||
} |
||||
|
||||
// gofmt
|
||||
b, err = format.Source([]byte(s)) |
||||
if err != nil { |
||||
log.Fatal(err) |
||||
} |
||||
|
||||
// Append this command to the header to show where the new file
|
||||
// came from.
|
||||
re := regexp.MustCompile("(cgo -godefs [a-zA-Z0-9_]+\\.go.*)") |
||||
b = re.ReplaceAll(b, []byte("$1 | go run mkpost.go")) |
||||
|
||||
fmt.Printf("%s", b) |
||||
} |
@ -1,63 +0,0 @@ |
||||
// 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 386,dragonfly
|
||||
|
||||
package unix |
||||
|
||||
import ( |
||||
"syscall" |
||||
"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 TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } |
||||
|
||||
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 SetKevent(k *Kevent_t, fd, mode, flags int) { |
||||
k.Ident = uint32(fd) |
||||
k.Filter = int16(mode) |
||||
k.Flags = uint16(flags) |
||||
} |
||||
|
||||
func (iov *Iovec) SetLen(length int) { |
||||
iov.Len = uint32(length) |
||||
} |
||||
|
||||
func (msghdr *Msghdr) SetControllen(length int) { |
||||
msghdr.Controllen = uint32(length) |
||||
} |
||||
|
||||
func (cmsg *Cmsghdr) SetLen(length int) { |
||||
cmsg.Len = uint32(length) |
||||
} |
||||
|
||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { |
||||
var writtenOut uint64 = 0 |
||||
_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0) |
||||
|
||||
written = int(writtenOut) |
||||
|
||||
if e1 != 0 { |
||||
err = e1 |
||||
} |
||||
return |
||||
} |
||||
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) |
@ -0,0 +1,215 @@ |
||||
// 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.
|
||||
|
||||
// +build linux
|
||||
// +build mips64 mips64le
|
||||
|
||||
package unix |
||||
|
||||
// Linux introduced getdents64 syscall for N64 ABI only in 3.10
|
||||
// (May 21 2013, rev dec33abaafc89bcbd78f85fad0513170415a26d5),
|
||||
// to support older kernels, we have to use getdents for mips64.
|
||||
// Also note that struct dirent is different for these two.
|
||||
// Lookup linux_dirent{,64} in kernel source code for details.
|
||||
const _SYS_getdents = SYS_GETDENTS |
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
//sysnb Geteuid() (euid int)
|
||||
//sysnb Getgid() (gid int)
|
||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Getuid() (uid int)
|
||||
//sys Lchown(path string, uid int, gid int) (err error)
|
||||
//sys Listen(s int, n int) (err error)
|
||||
//sys Pause() (err error)
|
||||
//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
|
||||
//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)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Shutdown(fd int, how int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
|
||||
//sysnb setgroups(n int, list *_Gid_t) (err error)
|
||||
//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
|
||||
//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
|
||||
//sysnb socket(domain int, typ int, proto int) (fd int, err error)
|
||||
//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
|
||||
//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
|
||||
//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
|
||||
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
|
||||
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, 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 Time(t *Time_t) (tt Time_t, err error) { |
||||
var tv Timeval |
||||
err = Gettimeofday(&tv) |
||||
if err != nil { |
||||
return 0, err |
||||
} |
||||
if t != nil { |
||||
*t = Time_t(tv.Sec) |
||||
} |
||||
return Time_t(tv.Sec), nil |
||||
} |
||||
|
||||
//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 NsecToTimeval(nsec int64) (tv Timeval) { |
||||
nsec += 999 // round up to microsecond
|
||||
tv.Sec = nsec / 1e9 |
||||
tv.Usec = nsec % 1e9 / 1e3 |
||||
return |
||||
} |
||||
|
||||
func Pipe(p []int) (err error) { |
||||
if len(p) != 2 { |
||||
return EINVAL |
||||
} |
||||
var pp [2]_C_int |
||||
err = pipe2(&pp, 0) |
||||
p[0] = int(pp[0]) |
||||
p[1] = int(pp[1]) |
||||
return |
||||
} |
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe2(p []int, flags int) (err error) { |
||||
if len(p) != 2 { |
||||
return EINVAL |
||||
} |
||||
var pp [2]_C_int |
||||
err = pipe2(&pp, flags) |
||||
p[0] = int(pp[0]) |
||||
p[1] = int(pp[1]) |
||||
return |
||||
} |
||||
|
||||
func Ioperm(from int, num int, on int) (err error) { |
||||
return ENOSYS |
||||
} |
||||
|
||||
func Iopl(level int) (err error) { |
||||
return ENOSYS |
||||
} |
||||
|
||||
type stat_t struct { |
||||
Dev uint32 |
||||
Pad0 [3]int32 |
||||
Ino uint64 |
||||
Mode uint32 |
||||
Nlink uint32 |
||||
Uid uint32 |
||||
Gid uint32 |
||||
Rdev uint32 |
||||
Pad1 [3]uint32 |
||||
Size int64 |
||||
Atime uint32 |
||||
Atime_nsec uint32 |
||||
Mtime uint32 |
||||
Mtime_nsec uint32 |
||||
Ctime uint32 |
||||
Ctime_nsec uint32 |
||||
Blksize uint32 |
||||
Pad2 uint32 |
||||
Blocks int64 |
||||
} |
||||
|
||||
//sys fstat(fd int, st *stat_t) (err error)
|
||||
//sys lstat(path string, st *stat_t) (err error)
|
||||
//sys stat(path string, st *stat_t) (err error)
|
||||
|
||||
func Fstat(fd int, s *Stat_t) (err error) { |
||||
st := &stat_t{} |
||||
err = fstat(fd, st) |
||||
fillStat_t(s, st) |
||||
return |
||||
} |
||||
|
||||
func Lstat(path string, s *Stat_t) (err error) { |
||||
st := &stat_t{} |
||||
err = lstat(path, st) |
||||
fillStat_t(s, st) |
||||
return |
||||
} |
||||
|
||||
func Stat(path string, s *Stat_t) (err error) { |
||||
st := &stat_t{} |
||||
err = stat(path, st) |
||||
fillStat_t(s, st) |
||||
return |
||||
} |
||||
|
||||
func fillStat_t(s *Stat_t, st *stat_t) { |
||||
s.Dev = st.Dev |
||||
s.Ino = st.Ino |
||||
s.Mode = st.Mode |
||||
s.Nlink = st.Nlink |
||||
s.Uid = st.Uid |
||||
s.Gid = st.Gid |
||||
s.Rdev = st.Rdev |
||||
s.Size = st.Size |
||||
s.Atim = Timespec{int64(st.Atime), int64(st.Atime_nsec)} |
||||
s.Mtim = Timespec{int64(st.Mtime), int64(st.Mtime_nsec)} |
||||
s.Ctim = Timespec{int64(st.Ctime), int64(st.Ctime_nsec)} |
||||
s.Blksize = st.Blksize |
||||
s.Blocks = st.Blocks |
||||
} |
||||
|
||||
func (r *PtraceRegs) PC() uint64 { return r.Regs[64] } |
||||
|
||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Regs[64] = pc } |
||||
|
||||
func (iov *Iovec) SetLen(length int) { |
||||
iov.Len = uint64(length) |
||||
} |
||||
|
||||
func (msghdr *Msghdr) SetControllen(length int) { |
||||
msghdr.Controllen = uint64(length) |
||||
} |
||||
|
||||
func (cmsg *Cmsghdr) SetLen(length int) { |
||||
cmsg.Len = uint64(length) |
||||
} |
||||
|
||||
//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) |
||||
} |
@ -0,0 +1,329 @@ |
||||
// 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 s390x,linux
|
||||
|
||||
package unix |
||||
|
||||
import ( |
||||
"unsafe" |
||||
) |
||||
|
||||
//sys Dup2(oldfd int, newfd int) (err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
//sysnb Geteuid() (euid int)
|
||||
//sysnb Getgid() (gid int)
|
||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Getuid() (uid int)
|
||||
//sysnb InotifyInit() (fd int, err error)
|
||||
//sys Lchown(path string, uid int, gid int) (err error)
|
||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||
//sys Pause() (err error)
|
||||
//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 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)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
//sys Statfs(path string, buf *Statfs_t) (err error)
|
||||
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
//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) { |
||||
var tv Timeval |
||||
err = Gettimeofday(&tv) |
||||
if err != nil { |
||||
return 0, err |
||||
} |
||||
if t != nil { |
||||
*t = Time_t(tv.Sec) |
||||
} |
||||
return Time_t(tv.Sec), nil |
||||
} |
||||
|
||||
//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 NsecToTimeval(nsec int64) (tv Timeval) { |
||||
nsec += 999 // round up to microsecond
|
||||
tv.Sec = nsec / 1e9 |
||||
tv.Usec = nsec % 1e9 / 1e3 |
||||
return |
||||
} |
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
|
||||
func Pipe(p []int) (err error) { |
||||
if len(p) != 2 { |
||||
return EINVAL |
||||
} |
||||
var pp [2]_C_int |
||||
err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0.
|
||||
p[0] = int(pp[0]) |
||||
p[1] = int(pp[1]) |
||||
return |
||||
} |
||||
|
||||
func Pipe2(p []int, flags int) (err error) { |
||||
if len(p) != 2 { |
||||
return EINVAL |
||||
} |
||||
var pp [2]_C_int |
||||
err = pipe2(&pp, flags) |
||||
p[0] = int(pp[0]) |
||||
p[1] = int(pp[1]) |
||||
return |
||||
} |
||||
|
||||
func Ioperm(from int, num int, on int) (err error) { |
||||
return ENOSYS |
||||
} |
||||
|
||||
func Iopl(level int) (err error) { |
||||
return ENOSYS |
||||
} |
||||
|
||||
func (r *PtraceRegs) PC() uint64 { return r.Psw.Addr } |
||||
|
||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = pc } |
||||
|
||||
func (iov *Iovec) SetLen(length int) { |
||||
iov.Len = uint64(length) |
||||
} |
||||
|
||||
func (msghdr *Msghdr) SetControllen(length int) { |
||||
msghdr.Controllen = uint64(length) |
||||
} |
||||
|
||||
func (cmsg *Cmsghdr) SetLen(length int) { |
||||
cmsg.Len = uint64(length) |
||||
} |
||||
|
||||
// Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct.
|
||||
// mmap2 also requires arguments to be passed in a struct; it is currently not exposed in <asm/unistd.h>.
|
||||
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { |
||||
mmap_args := [6]uintptr{addr, length, uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)} |
||||
r0, _, e1 := Syscall(SYS_MMAP, uintptr(unsafe.Pointer(&mmap_args[0])), 0, 0) |
||||
use(unsafe.Pointer(&mmap_args[0])) |
||||
xaddr = uintptr(r0) |
||||
if e1 != 0 { |
||||
err = errnoErr(e1) |
||||
} |
||||
return |
||||
} |
||||
|
||||
// On s390x Linux, all the socket calls go through an extra indirection.
|
||||
// The arguments to the underlying system call (SYS_SOCKETCALL) are the
|
||||
// number below and a pointer to an array of uintptr.
|
||||
const ( |
||||
// see linux/net.h
|
||||
netSocket = 1 |
||||
netBind = 2 |
||||
netConnect = 3 |
||||
netListen = 4 |
||||
netAccept = 5 |
||||
netGetSockName = 6 |
||||
netGetPeerName = 7 |
||||
netSocketPair = 8 |
||||
netSend = 9 |
||||
netRecv = 10 |
||||
netSendTo = 11 |
||||
netRecvFrom = 12 |
||||
netShutdown = 13 |
||||
netSetSockOpt = 14 |
||||
netGetSockOpt = 15 |
||||
netSendMsg = 16 |
||||
netRecvMsg = 17 |
||||
netAccept4 = 18 |
||||
netRecvMMsg = 19 |
||||
netSendMMsg = 20 |
||||
) |
||||
|
||||
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (int, error) { |
||||
args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))} |
||||
fd, _, err := Syscall(SYS_SOCKETCALL, netAccept, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return 0, err |
||||
} |
||||
return int(fd), nil |
||||
} |
||||
|
||||
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) { |
||||
args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)} |
||||
fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return 0, err |
||||
} |
||||
return int(fd), nil |
||||
} |
||||
|
||||
func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error { |
||||
args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))} |
||||
_, _, err := RawSyscall(SYS_SOCKETCALL, netGetSockName, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return err |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error { |
||||
args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))} |
||||
_, _, err := RawSyscall(SYS_SOCKETCALL, netGetPeerName, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return err |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func socketpair(domain int, typ int, flags int, fd *[2]int32) error { |
||||
args := [4]uintptr{uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd))} |
||||
_, _, err := RawSyscall(SYS_SOCKETCALL, netSocketPair, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return err |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) error { |
||||
args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)} |
||||
_, _, err := Syscall(SYS_SOCKETCALL, netBind, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return err |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) error { |
||||
args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)} |
||||
_, _, err := Syscall(SYS_SOCKETCALL, netConnect, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return err |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func socket(domain int, typ int, proto int) (int, error) { |
||||
args := [3]uintptr{uintptr(domain), uintptr(typ), uintptr(proto)} |
||||
fd, _, err := RawSyscall(SYS_SOCKETCALL, netSocket, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return 0, err |
||||
} |
||||
return int(fd), nil |
||||
} |
||||
|
||||
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) error { |
||||
args := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen))} |
||||
_, _, err := Syscall(SYS_SOCKETCALL, netGetSockOpt, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return err |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error { |
||||
args := [4]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val)} |
||||
_, _, err := Syscall(SYS_SOCKETCALL, netSetSockOpt, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return err |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (int, error) { |
||||
var base uintptr |
||||
if len(p) > 0 { |
||||
base = uintptr(unsafe.Pointer(&p[0])) |
||||
} |
||||
args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))} |
||||
n, _, err := Syscall(SYS_SOCKETCALL, netRecvFrom, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return 0, err |
||||
} |
||||
return int(n), nil |
||||
} |
||||
|
||||
func sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) error { |
||||
var base uintptr |
||||
if len(p) > 0 { |
||||
base = uintptr(unsafe.Pointer(&p[0])) |
||||
} |
||||
args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen)} |
||||
_, _, err := Syscall(SYS_SOCKETCALL, netSendTo, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return err |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func recvmsg(s int, msg *Msghdr, flags int) (int, error) { |
||||
args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)} |
||||
n, _, err := Syscall(SYS_SOCKETCALL, netRecvMsg, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return 0, err |
||||
} |
||||
return int(n), nil |
||||
} |
||||
|
||||
func sendmsg(s int, msg *Msghdr, flags int) (int, error) { |
||||
args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)} |
||||
n, _, err := Syscall(SYS_SOCKETCALL, netSendMsg, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return 0, err |
||||
} |
||||
return int(n), nil |
||||
} |
||||
|
||||
func Listen(s int, n int) error { |
||||
args := [2]uintptr{uintptr(s), uintptr(n)} |
||||
_, _, err := Syscall(SYS_SOCKETCALL, netListen, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return err |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
func Shutdown(s, how int) error { |
||||
args := [2]uintptr{uintptr(s), uintptr(how)} |
||||
_, _, err := Syscall(SYS_SOCKETCALL, netShutdown, uintptr(unsafe.Pointer(&args)), 0) |
||||
if err != 0 { |
||||
return err |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
//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) |
||||
} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,304 +0,0 @@ |
||||
// mksysnum_dragonfly.pl
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build 386,dragonfly
|
||||
|
||||
package unix |
||||
|
||||
const ( |
||||
// SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
|
||||
SYS_EXIT = 1 // { void exit(int rval); }
|
||||
SYS_FORK = 2 // { int fork(void); }
|
||||
SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); }
|
||||
SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); }
|
||||
SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
|
||||
SYS_CLOSE = 6 // { int close(int fd); }
|
||||
SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, \
|
||||
SYS_LINK = 9 // { int link(char *path, char *link); }
|
||||
SYS_UNLINK = 10 // { int unlink(char *path); }
|
||||
SYS_CHDIR = 12 // { int chdir(char *path); }
|
||||
SYS_FCHDIR = 13 // { int fchdir(int fd); }
|
||||
SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
|
||||
SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
|
||||
SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
|
||||
SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
|
||||
SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, \
|
||||
SYS_GETPID = 20 // { pid_t getpid(void); }
|
||||
SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, \
|
||||
SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
|
||||
SYS_SETUID = 23 // { int setuid(uid_t uid); }
|
||||
SYS_GETUID = 24 // { uid_t getuid(void); }
|
||||
SYS_GETEUID = 25 // { uid_t geteuid(void); }
|
||||
SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, \
|
||||
SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); }
|
||||
SYS_SENDMSG = 28 // { int sendmsg(int s, caddr_t msg, int flags); }
|
||||
SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, \
|
||||
SYS_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); }
|
||||
SYS_GETPEERNAME = 31 // { int getpeername(int fdes, caddr_t asa, int *alen); }
|
||||
SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, caddr_t asa, int *alen); }
|
||||
SYS_ACCESS = 33 // { int access(char *path, int flags); }
|
||||
SYS_CHFLAGS = 34 // { int chflags(char *path, int flags); }
|
||||
SYS_FCHFLAGS = 35 // { int fchflags(int fd, int flags); }
|
||||
SYS_SYNC = 36 // { int sync(void); }
|
||||
SYS_KILL = 37 // { int kill(int pid, int signum); }
|
||||
SYS_GETPPID = 39 // { pid_t getppid(void); }
|
||||
SYS_DUP = 41 // { int dup(u_int fd); }
|
||||
SYS_PIPE = 42 // { int pipe(void); }
|
||||
SYS_GETEGID = 43 // { gid_t getegid(void); }
|
||||
SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
|
||||
SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, \
|
||||
SYS_GETGID = 47 // { gid_t getgid(void); }
|
||||
SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); }
|
||||
SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
|
||||
SYS_ACCT = 51 // { int acct(char *path); }
|
||||
SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); }
|
||||
SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); }
|
||||
SYS_REBOOT = 55 // { int reboot(int opt); }
|
||||
SYS_REVOKE = 56 // { int revoke(char *path); }
|
||||
SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
|
||||
SYS_READLINK = 58 // { int readlink(char *path, char *buf, int count); }
|
||||
SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
|
||||
SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
|
||||
SYS_CHROOT = 61 // { int chroot(char *path); }
|
||||
SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
|
||||
SYS_VFORK = 66 // { pid_t vfork(void); }
|
||||
SYS_SBRK = 69 // { int sbrk(int incr); }
|
||||
SYS_SSTK = 70 // { int sstk(int incr); }
|
||||
SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); }
|
||||
SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
|
||||
SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
|
||||
SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
|
||||
SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); }
|
||||
SYS_GETPGRP = 81 // { int getpgrp(void); }
|
||||
SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
|
||||
SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, \
|
||||
SYS_SWAPON = 85 // { int swapon(char *name); }
|
||||
SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); }
|
||||
SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
|
||||
SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
|
||||
SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
|
||||
SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
|
||||
SYS_FSYNC = 95 // { int fsync(int fd); }
|
||||
SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); }
|
||||
SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); }
|
||||
SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); }
|
||||
SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
|
||||
SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); }
|
||||
SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
|
||||
SYS_LISTEN = 106 // { int listen(int s, int backlog); }
|
||||
SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
|
||||
SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); }
|
||||
SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
|
||||
SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
|
||||
SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
|
||||
SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
|
||||
SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
|
||||
SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
|
||||
SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
|
||||
SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
|
||||
SYS_RENAME = 128 // { int rename(char *from, char *to); }
|
||||
SYS_FLOCK = 131 // { int flock(int fd, int how); }
|
||||
SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
|
||||
SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
|
||||
SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
|
||||
SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, \
|
||||
SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
|
||||
SYS_RMDIR = 137 // { int rmdir(char *path); }
|
||||
SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); }
|
||||
SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
|
||||
SYS_SETSID = 147 // { int setsid(void); }
|
||||
SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
|
||||
SYS_STATFS = 157 // { int statfs(char *path, struct statfs *buf); }
|
||||
SYS_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); }
|
||||
SYS_GETDOMAINNAME = 162 // { int getdomainname(char *domainname, int len); }
|
||||
SYS_SETDOMAINNAME = 163 // { int setdomainname(char *domainname, int len); }
|
||||
SYS_UNAME = 164 // { int uname(struct utsname *name); }
|
||||
SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
|
||||
SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
|
||||
SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, \
|
||||
SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, \
|
||||
SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
|
||||
SYS_SETGID = 181 // { int setgid(gid_t gid); }
|
||||
SYS_SETEGID = 182 // { int setegid(gid_t egid); }
|
||||
SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
|
||||
SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
|
||||
SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
|
||||
SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
|
||||
SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
|
||||
SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, \
|
||||
// SYS_NOSYS = 198; // { int nosys(void); } __syscall __syscall_args int
|
||||
SYS_LSEEK = 199 // { off_t lseek(int fd, int pad, off_t offset, \
|
||||
SYS_TRUNCATE = 200 // { int truncate(char *path, int pad, off_t length); }
|
||||
SYS_FTRUNCATE = 201 // { int ftruncate(int fd, int pad, off_t length); }
|
||||
SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, \
|
||||
SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
|
||||
SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
|
||||
SYS_UNDELETE = 205 // { int undelete(char *path); }
|
||||
SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
|
||||
SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
|
||||
SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
|
||||
SYS___SEMCTL = 220 // { int __semctl(int semid, int semnum, int cmd, \
|
||||
SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); }
|
||||
SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, \
|
||||
SYS_MSGCTL = 224 // { int msgctl(int msqid, int cmd, \
|
||||
SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); }
|
||||
SYS_MSGSND = 226 // { int msgsnd(int msqid, void *msgp, size_t msgsz, \
|
||||
SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, \
|
||||
SYS_SHMAT = 228 // { caddr_t shmat(int shmid, const void *shmaddr, \
|
||||
SYS_SHMCTL = 229 // { int shmctl(int shmid, int cmd, \
|
||||
SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); }
|
||||
SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); }
|
||||
SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, \
|
||||
SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
|
||||
SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
|
||||
SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); }
|
||||
SYS_RFORK = 251 // { int rfork(int flags); }
|
||||
SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, \
|
||||
SYS_ISSETUGID = 253 // { int issetugid(void); }
|
||||
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
|
||||
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
|
||||
SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
|
||||
SYS_EXTPREADV = 289 // { ssize_t extpreadv(int fd, struct iovec *iovp, \
|
||||
SYS_EXTPWRITEV = 290 // { ssize_t extpwritev(int fd, struct iovec *iovp,\
|
||||
SYS_FHSTATFS = 297 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
|
||||
SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
|
||||
SYS_MODNEXT = 300 // { int modnext(int modid); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat* stat); }
|
||||
SYS_MODFNEXT = 302 // { int modfnext(int modid); }
|
||||
SYS_MODFIND = 303 // { int modfind(const char *name); }
|
||||
SYS_KLDLOAD = 304 // { int kldload(const char *file); }
|
||||
SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
|
||||
SYS_KLDFIND = 306 // { int kldfind(const char *file); }
|
||||
SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); }
|
||||
SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
|
||||
SYS_GETSID = 310 // { int getsid(pid_t pid); }
|
||||
SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
|
||||
SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
|
||||
SYS_AIO_RETURN = 314 // { int aio_return(struct aiocb *aiocbp); }
|
||||
SYS_AIO_SUSPEND = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
|
||||
SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
|
||||
SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); }
|
||||
SYS_AIO_READ = 318 // { int aio_read(struct aiocb *aiocbp); }
|
||||
SYS_AIO_WRITE = 319 // { int aio_write(struct aiocb *aiocbp); }
|
||||
SYS_LIO_LISTIO = 320 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
|
||||
SYS_YIELD = 321 // { int yield(void); }
|
||||
SYS_MLOCKALL = 324 // { int mlockall(int how); }
|
||||
SYS_MUNLOCKALL = 325 // { int munlockall(void); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(u_char *buf, u_int buflen); }
|
||||
SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
|
||||
SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
|
||||
SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
|
||||
SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
|
||||
SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
|
||||
SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
|
||||
SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
|
||||
SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
|
||||
SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
|
||||
SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, void *data); }
|
||||
SYS_JAIL = 338 // { int jail(struct jail *jail); }
|
||||
SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, const sigset_t *set, \
|
||||
SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
|
||||
SYS_SIGACTION = 342 // { int sigaction(int sig, const struct sigaction *act, \
|
||||
SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
|
||||
SYS_SIGRETURN = 344 // { int sigreturn(ucontext_t *sigcntxp); }
|
||||
SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set,\
|
||||
SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set,\
|
||||
SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
|
||||
SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
|
||||
SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, \
|
||||
SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, \
|
||||
SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
|
||||
SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }
|
||||
SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
|
||||
SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, \
|
||||
SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
|
||||
SYS_EXTATTR_SET_FILE = 356 // { int extattr_set_file(const char *path, \
|
||||
SYS_EXTATTR_GET_FILE = 357 // { int extattr_get_file(const char *path, \
|
||||
SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
|
||||
SYS_AIO_WAITCOMPLETE = 359 // { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
|
||||
SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
|
||||
SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
|
||||
SYS_KQUEUE = 362 // { int kqueue(void); }
|
||||
SYS_KEVENT = 363 // { int kevent(int fd, \
|
||||
SYS_SCTP_PEELOFF = 364 // { int sctp_peeloff(int sd, caddr_t name ); }
|
||||
SYS_LCHFLAGS = 391 // { int lchflags(char *path, int flags); }
|
||||
SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
|
||||
SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, \
|
||||
SYS_VARSYM_SET = 450 // { int varsym_set(int level, const char *name, const char *data); }
|
||||
SYS_VARSYM_GET = 451 // { int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
|
||||
SYS_VARSYM_LIST = 452 // { int varsym_list(int level, char *buf, int maxsize, int *marker); }
|
||||
SYS_EXEC_SYS_REGISTER = 465 // { int exec_sys_register(void *entry); }
|
||||
SYS_EXEC_SYS_UNREGISTER = 466 // { int exec_sys_unregister(int id); }
|
||||
SYS_SYS_CHECKPOINT = 467 // { int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
|
||||
SYS_MOUNTCTL = 468 // { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
|
||||
SYS_UMTX_SLEEP = 469 // { int umtx_sleep(volatile const int *ptr, int value, int timeout); }
|
||||
SYS_UMTX_WAKEUP = 470 // { int umtx_wakeup(volatile const int *ptr, int count); }
|
||||
SYS_JAIL_ATTACH = 471 // { int jail_attach(int jid); }
|
||||
SYS_SET_TLS_AREA = 472 // { int set_tls_area(int which, struct tls_info *info, size_t infosize); }
|
||||
SYS_GET_TLS_AREA = 473 // { int get_tls_area(int which, struct tls_info *info, size_t infosize); }
|
||||
SYS_CLOSEFROM = 474 // { int closefrom(int fd); }
|
||||
SYS_STAT = 475 // { int stat(const char *path, struct stat *ub); }
|
||||
SYS_FSTAT = 476 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_LSTAT = 477 // { int lstat(const char *path, struct stat *ub); }
|
||||
SYS_FHSTAT = 478 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
|
||||
SYS_GETDIRENTRIES = 479 // { int getdirentries(int fd, char *buf, u_int count, \
|
||||
SYS_GETDENTS = 480 // { int getdents(int fd, char *buf, size_t count); }
|
||||
SYS_USCHED_SET = 481 // { int usched_set(pid_t pid, int cmd, void *data, \
|
||||
SYS_EXTACCEPT = 482 // { int extaccept(int s, int flags, caddr_t name, int *anamelen); }
|
||||
SYS_EXTCONNECT = 483 // { int extconnect(int s, int flags, caddr_t name, int namelen); }
|
||||
SYS_MCONTROL = 485 // { int mcontrol(void *addr, size_t len, int behav, off_t value); }
|
||||
SYS_VMSPACE_CREATE = 486 // { int vmspace_create(void *id, int type, void *data); }
|
||||
SYS_VMSPACE_DESTROY = 487 // { int vmspace_destroy(void *id); }
|
||||
SYS_VMSPACE_CTL = 488 // { int vmspace_ctl(void *id, int cmd, \
|
||||
SYS_VMSPACE_MMAP = 489 // { int vmspace_mmap(void *id, void *addr, size_t len, \
|
||||
SYS_VMSPACE_MUNMAP = 490 // { int vmspace_munmap(void *id, void *addr, \
|
||||
SYS_VMSPACE_MCONTROL = 491 // { int vmspace_mcontrol(void *id, void *addr, \
|
||||
SYS_VMSPACE_PREAD = 492 // { ssize_t vmspace_pread(void *id, void *buf, \
|
||||
SYS_VMSPACE_PWRITE = 493 // { ssize_t vmspace_pwrite(void *id, const void *buf, \
|
||||
SYS_EXTEXIT = 494 // { void extexit(int how, int status, void *addr); }
|
||||
SYS_LWP_CREATE = 495 // { int lwp_create(struct lwp_params *params); }
|
||||
SYS_LWP_GETTID = 496 // { lwpid_t lwp_gettid(void); }
|
||||
SYS_LWP_KILL = 497 // { int lwp_kill(pid_t pid, lwpid_t tid, int signum); }
|
||||
SYS_LWP_RTPRIO = 498 // { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }
|
||||
SYS_PSELECT = 499 // { int pselect(int nd, fd_set *in, fd_set *ou, \
|
||||
SYS_STATVFS = 500 // { int statvfs(const char *path, struct statvfs *buf); }
|
||||
SYS_FSTATVFS = 501 // { int fstatvfs(int fd, struct statvfs *buf); }
|
||||
SYS_FHSTATVFS = 502 // { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); }
|
||||
SYS_GETVFSSTAT = 503 // { int getvfsstat(struct statfs *buf, \
|
||||
SYS_OPENAT = 504 // { int openat(int fd, char *path, int flags, int mode); }
|
||||
SYS_FSTATAT = 505 // { int fstatat(int fd, char *path, \
|
||||
SYS_FCHMODAT = 506 // { int fchmodat(int fd, char *path, int mode, \
|
||||
SYS_FCHOWNAT = 507 // { int fchownat(int fd, char *path, int uid, int gid, \
|
||||
SYS_UNLINKAT = 508 // { int unlinkat(int fd, char *path, int flags); }
|
||||
SYS_FACCESSAT = 509 // { int faccessat(int fd, char *path, int amode, \
|
||||
SYS_MQ_OPEN = 510 // { mqd_t mq_open(const char * name, int oflag, \
|
||||
SYS_MQ_CLOSE = 511 // { int mq_close(mqd_t mqdes); }
|
||||
SYS_MQ_UNLINK = 512 // { int mq_unlink(const char *name); }
|
||||
SYS_MQ_GETATTR = 513 // { int mq_getattr(mqd_t mqdes, \
|
||||
SYS_MQ_SETATTR = 514 // { int mq_setattr(mqd_t mqdes, \
|
||||
SYS_MQ_NOTIFY = 515 // { int mq_notify(mqd_t mqdes, \
|
||||
SYS_MQ_SEND = 516 // { int mq_send(mqd_t mqdes, const char *msg_ptr, \
|
||||
SYS_MQ_RECEIVE = 517 // { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \
|
||||
SYS_MQ_TIMEDSEND = 518 // { int mq_timedsend(mqd_t mqdes, \
|
||||
SYS_MQ_TIMEDRECEIVE = 519 // { ssize_t mq_timedreceive(mqd_t mqdes, \
|
||||
SYS_IOPRIO_SET = 520 // { int ioprio_set(int which, int who, int prio); }
|
||||
SYS_IOPRIO_GET = 521 // { int ioprio_get(int which, int who); }
|
||||
SYS_CHROOT_KERNEL = 522 // { int chroot_kernel(char *path); }
|
||||
SYS_RENAMEAT = 523 // { int renameat(int oldfd, char *old, int newfd, \
|
||||
SYS_MKDIRAT = 524 // { int mkdirat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKFIFOAT = 525 // { int mkfifoat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKNODAT = 526 // { int mknodat(int fd, char *path, mode_t mode, \
|
||||
SYS_READLINKAT = 527 // { int readlinkat(int fd, char *path, char *buf, \
|
||||
SYS_SYMLINKAT = 528 // { int symlinkat(char *path1, int fd, char *path2); }
|
||||
SYS_SWAPOFF = 529 // { int swapoff(char *name); }
|
||||
SYS_VQUOTACTL = 530 // { int vquotactl(const char *path, \
|
||||
SYS_LINKAT = 531 // { int linkat(int fd1, char *path1, int fd2, \
|
||||
SYS_EACCESS = 532 // { int eaccess(char *path, int flags); }
|
||||
SYS_LPATHCONF = 533 // { int lpathconf(char *path, int name); }
|
||||
SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
|
||||
SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }
|
||||
) |
@ -0,0 +1,327 @@ |
||||
// mksysnum_linux.pl /usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build mips64,linux
|
||||
|
||||
package unix |
||||
|
||||
const ( |
||||
SYS_READ = 5000 |
||||
SYS_WRITE = 5001 |
||||
SYS_OPEN = 5002 |
||||
SYS_CLOSE = 5003 |
||||
SYS_STAT = 5004 |
||||
SYS_FSTAT = 5005 |
||||
SYS_LSTAT = 5006 |
||||
SYS_POLL = 5007 |
||||
SYS_LSEEK = 5008 |
||||
SYS_MMAP = 5009 |
||||
SYS_MPROTECT = 5010 |
||||
SYS_MUNMAP = 5011 |
||||
SYS_BRK = 5012 |
||||
SYS_RT_SIGACTION = 5013 |
||||
SYS_RT_SIGPROCMASK = 5014 |
||||
SYS_IOCTL = 5015 |
||||
SYS_PREAD64 = 5016 |
||||
SYS_PWRITE64 = 5017 |
||||
SYS_READV = 5018 |
||||
SYS_WRITEV = 5019 |
||||
SYS_ACCESS = 5020 |
||||
SYS_PIPE = 5021 |
||||
SYS__NEWSELECT = 5022 |
||||
SYS_SCHED_YIELD = 5023 |
||||
SYS_MREMAP = 5024 |
||||
SYS_MSYNC = 5025 |
||||
SYS_MINCORE = 5026 |
||||
SYS_MADVISE = 5027 |
||||
SYS_SHMGET = 5028 |
||||
SYS_SHMAT = 5029 |
||||
SYS_SHMCTL = 5030 |
||||
SYS_DUP = 5031 |
||||
SYS_DUP2 = 5032 |
||||
SYS_PAUSE = 5033 |
||||
SYS_NANOSLEEP = 5034 |
||||
SYS_GETITIMER = 5035 |
||||
SYS_SETITIMER = 5036 |
||||
SYS_ALARM = 5037 |
||||
SYS_GETPID = 5038 |
||||
SYS_SENDFILE = 5039 |
||||
SYS_SOCKET = 5040 |
||||
SYS_CONNECT = 5041 |
||||
SYS_ACCEPT = 5042 |
||||
SYS_SENDTO = 5043 |
||||
SYS_RECVFROM = 5044 |
||||
SYS_SENDMSG = 5045 |
||||
SYS_RECVMSG = 5046 |
||||
SYS_SHUTDOWN = 5047 |
||||
SYS_BIND = 5048 |
||||
SYS_LISTEN = 5049 |
||||
SYS_GETSOCKNAME = 5050 |
||||
SYS_GETPEERNAME = 5051 |
||||
SYS_SOCKETPAIR = 5052 |
||||
SYS_SETSOCKOPT = 5053 |
||||
SYS_GETSOCKOPT = 5054 |
||||
SYS_CLONE = 5055 |
||||
SYS_FORK = 5056 |
||||
SYS_EXECVE = 5057 |
||||
SYS_EXIT = 5058 |
||||
SYS_WAIT4 = 5059 |
||||
SYS_KILL = 5060 |
||||
SYS_UNAME = 5061 |
||||
SYS_SEMGET = 5062 |
||||
SYS_SEMOP = 5063 |
||||
SYS_SEMCTL = 5064 |
||||
SYS_SHMDT = 5065 |
||||
SYS_MSGGET = 5066 |
||||
SYS_MSGSND = 5067 |
||||
SYS_MSGRCV = 5068 |
||||
SYS_MSGCTL = 5069 |
||||
SYS_FCNTL = 5070 |
||||
SYS_FLOCK = 5071 |
||||
SYS_FSYNC = 5072 |
||||
SYS_FDATASYNC = 5073 |
||||
SYS_TRUNCATE = 5074 |
||||
SYS_FTRUNCATE = 5075 |
||||
SYS_GETDENTS = 5076 |
||||
SYS_GETCWD = 5077 |
||||
SYS_CHDIR = 5078 |
||||
SYS_FCHDIR = 5079 |
||||
SYS_RENAME = 5080 |
||||
SYS_MKDIR = 5081 |
||||
SYS_RMDIR = 5082 |
||||
SYS_CREAT = 5083 |
||||
SYS_LINK = 5084 |
||||
SYS_UNLINK = 5085 |
||||
SYS_SYMLINK = 5086 |
||||
SYS_READLINK = 5087 |
||||
SYS_CHMOD = 5088 |
||||
SYS_FCHMOD = 5089 |
||||
SYS_CHOWN = 5090 |
||||
SYS_FCHOWN = 5091 |
||||
SYS_LCHOWN = 5092 |
||||
SYS_UMASK = 5093 |
||||
SYS_GETTIMEOFDAY = 5094 |
||||
SYS_GETRLIMIT = 5095 |
||||
SYS_GETRUSAGE = 5096 |
||||
SYS_SYSINFO = 5097 |
||||
SYS_TIMES = 5098 |
||||
SYS_PTRACE = 5099 |
||||
SYS_GETUID = 5100 |
||||
SYS_SYSLOG = 5101 |
||||
SYS_GETGID = 5102 |
||||
SYS_SETUID = 5103 |
||||
SYS_SETGID = 5104 |
||||
SYS_GETEUID = 5105 |
||||
SYS_GETEGID = 5106 |
||||
SYS_SETPGID = 5107 |
||||
SYS_GETPPID = 5108 |
||||
SYS_GETPGRP = 5109 |
||||
SYS_SETSID = 5110 |
||||
SYS_SETREUID = 5111 |
||||
SYS_SETREGID = 5112 |
||||
SYS_GETGROUPS = 5113 |
||||
SYS_SETGROUPS = 5114 |
||||
SYS_SETRESUID = 5115 |
||||
SYS_GETRESUID = 5116 |
||||
SYS_SETRESGID = 5117 |
||||
SYS_GETRESGID = 5118 |
||||
SYS_GETPGID = 5119 |
||||
SYS_SETFSUID = 5120 |
||||
SYS_SETFSGID = 5121 |
||||
SYS_GETSID = 5122 |
||||
SYS_CAPGET = 5123 |
||||
SYS_CAPSET = 5124 |
||||
SYS_RT_SIGPENDING = 5125 |
||||
SYS_RT_SIGTIMEDWAIT = 5126 |
||||
SYS_RT_SIGQUEUEINFO = 5127 |
||||
SYS_RT_SIGSUSPEND = 5128 |
||||
SYS_SIGALTSTACK = 5129 |
||||
SYS_UTIME = 5130 |
||||
SYS_MKNOD = 5131 |
||||
SYS_PERSONALITY = 5132 |
||||
SYS_USTAT = 5133 |
||||
SYS_STATFS = 5134 |
||||
SYS_FSTATFS = 5135 |
||||
SYS_SYSFS = 5136 |
||||
SYS_GETPRIORITY = 5137 |
||||
SYS_SETPRIORITY = 5138 |
||||
SYS_SCHED_SETPARAM = 5139 |
||||
SYS_SCHED_GETPARAM = 5140 |
||||
SYS_SCHED_SETSCHEDULER = 5141 |
||||
SYS_SCHED_GETSCHEDULER = 5142 |
||||
SYS_SCHED_GET_PRIORITY_MAX = 5143 |
||||
SYS_SCHED_GET_PRIORITY_MIN = 5144 |
||||
SYS_SCHED_RR_GET_INTERVAL = 5145 |
||||
SYS_MLOCK = 5146 |
||||
SYS_MUNLOCK = 5147 |
||||
SYS_MLOCKALL = 5148 |
||||
SYS_MUNLOCKALL = 5149 |
||||
SYS_VHANGUP = 5150 |
||||
SYS_PIVOT_ROOT = 5151 |
||||
SYS__SYSCTL = 5152 |
||||
SYS_PRCTL = 5153 |
||||
SYS_ADJTIMEX = 5154 |
||||
SYS_SETRLIMIT = 5155 |
||||
SYS_CHROOT = 5156 |
||||
SYS_SYNC = 5157 |
||||
SYS_ACCT = 5158 |
||||
SYS_SETTIMEOFDAY = 5159 |
||||
SYS_MOUNT = 5160 |
||||
SYS_UMOUNT2 = 5161 |
||||
SYS_SWAPON = 5162 |
||||
SYS_SWAPOFF = 5163 |
||||
SYS_REBOOT = 5164 |
||||
SYS_SETHOSTNAME = 5165 |
||||
SYS_SETDOMAINNAME = 5166 |
||||
SYS_CREATE_MODULE = 5167 |
||||
SYS_INIT_MODULE = 5168 |
||||
SYS_DELETE_MODULE = 5169 |
||||
SYS_GET_KERNEL_SYMS = 5170 |
||||
SYS_QUERY_MODULE = 5171 |
||||
SYS_QUOTACTL = 5172 |
||||
SYS_NFSSERVCTL = 5173 |
||||
SYS_GETPMSG = 5174 |
||||
SYS_PUTPMSG = 5175 |
||||
SYS_AFS_SYSCALL = 5176 |
||||
SYS_RESERVED177 = 5177 |
||||
SYS_GETTID = 5178 |
||||
SYS_READAHEAD = 5179 |
||||
SYS_SETXATTR = 5180 |
||||
SYS_LSETXATTR = 5181 |
||||
SYS_FSETXATTR = 5182 |
||||
SYS_GETXATTR = 5183 |
||||
SYS_LGETXATTR = 5184 |
||||
SYS_FGETXATTR = 5185 |
||||
SYS_LISTXATTR = 5186 |
||||
SYS_LLISTXATTR = 5187 |
||||
SYS_FLISTXATTR = 5188 |
||||
SYS_REMOVEXATTR = 5189 |
||||
SYS_LREMOVEXATTR = 5190 |
||||
SYS_FREMOVEXATTR = 5191 |
||||
SYS_TKILL = 5192 |
||||
SYS_RESERVED193 = 5193 |
||||
SYS_FUTEX = 5194 |
||||
SYS_SCHED_SETAFFINITY = 5195 |
||||
SYS_SCHED_GETAFFINITY = 5196 |
||||
SYS_CACHEFLUSH = 5197 |
||||
SYS_CACHECTL = 5198 |
||||
SYS_SYSMIPS = 5199 |
||||
SYS_IO_SETUP = 5200 |
||||
SYS_IO_DESTROY = 5201 |
||||
SYS_IO_GETEVENTS = 5202 |
||||
SYS_IO_SUBMIT = 5203 |
||||
SYS_IO_CANCEL = 5204 |
||||
SYS_EXIT_GROUP = 5205 |
||||
SYS_LOOKUP_DCOOKIE = 5206 |
||||
SYS_EPOLL_CREATE = 5207 |
||||
SYS_EPOLL_CTL = 5208 |
||||
SYS_EPOLL_WAIT = 5209 |
||||
SYS_REMAP_FILE_PAGES = 5210 |
||||
SYS_RT_SIGRETURN = 5211 |
||||
SYS_SET_TID_ADDRESS = 5212 |
||||
SYS_RESTART_SYSCALL = 5213 |
||||
SYS_SEMTIMEDOP = 5214 |
||||
SYS_FADVISE64 = 5215 |
||||
SYS_TIMER_CREATE = 5216 |
||||
SYS_TIMER_SETTIME = 5217 |
||||
SYS_TIMER_GETTIME = 5218 |
||||
SYS_TIMER_GETOVERRUN = 5219 |
||||
SYS_TIMER_DELETE = 5220 |
||||
SYS_CLOCK_SETTIME = 5221 |
||||
SYS_CLOCK_GETTIME = 5222 |
||||
SYS_CLOCK_GETRES = 5223 |
||||
SYS_CLOCK_NANOSLEEP = 5224 |
||||
SYS_TGKILL = 5225 |
||||
SYS_UTIMES = 5226 |
||||
SYS_MBIND = 5227 |
||||
SYS_GET_MEMPOLICY = 5228 |
||||
SYS_SET_MEMPOLICY = 5229 |
||||
SYS_MQ_OPEN = 5230 |
||||
SYS_MQ_UNLINK = 5231 |
||||
SYS_MQ_TIMEDSEND = 5232 |
||||
SYS_MQ_TIMEDRECEIVE = 5233 |
||||
SYS_MQ_NOTIFY = 5234 |
||||
SYS_MQ_GETSETATTR = 5235 |
||||
SYS_VSERVER = 5236 |
||||
SYS_WAITID = 5237 |
||||
SYS_ADD_KEY = 5239 |
||||
SYS_REQUEST_KEY = 5240 |
||||
SYS_KEYCTL = 5241 |
||||
SYS_SET_THREAD_AREA = 5242 |
||||
SYS_INOTIFY_INIT = 5243 |
||||
SYS_INOTIFY_ADD_WATCH = 5244 |
||||
SYS_INOTIFY_RM_WATCH = 5245 |
||||
SYS_MIGRATE_PAGES = 5246 |
||||
SYS_OPENAT = 5247 |
||||
SYS_MKDIRAT = 5248 |
||||
SYS_MKNODAT = 5249 |
||||
SYS_FCHOWNAT = 5250 |
||||
SYS_FUTIMESAT = 5251 |
||||
SYS_NEWFSTATAT = 5252 |
||||
SYS_UNLINKAT = 5253 |
||||
SYS_RENAMEAT = 5254 |
||||
SYS_LINKAT = 5255 |
||||
SYS_SYMLINKAT = 5256 |
||||
SYS_READLINKAT = 5257 |
||||
SYS_FCHMODAT = 5258 |
||||
SYS_FACCESSAT = 5259 |
||||
SYS_PSELECT6 = 5260 |
||||
SYS_PPOLL = 5261 |
||||
SYS_UNSHARE = 5262 |
||||
SYS_SPLICE = 5263 |
||||
SYS_SYNC_FILE_RANGE = 5264 |
||||
SYS_TEE = 5265 |
||||
SYS_VMSPLICE = 5266 |
||||
SYS_MOVE_PAGES = 5267 |
||||
SYS_SET_ROBUST_LIST = 5268 |
||||
SYS_GET_ROBUST_LIST = 5269 |
||||
SYS_KEXEC_LOAD = 5270 |
||||
SYS_GETCPU = 5271 |
||||
SYS_EPOLL_PWAIT = 5272 |
||||
SYS_IOPRIO_SET = 5273 |
||||
SYS_IOPRIO_GET = 5274 |
||||
SYS_UTIMENSAT = 5275 |
||||
SYS_SIGNALFD = 5276 |
||||
SYS_TIMERFD = 5277 |
||||
SYS_EVENTFD = 5278 |
||||
SYS_FALLOCATE = 5279 |
||||
SYS_TIMERFD_CREATE = 5280 |
||||
SYS_TIMERFD_GETTIME = 5281 |
||||
SYS_TIMERFD_SETTIME = 5282 |
||||
SYS_SIGNALFD4 = 5283 |
||||
SYS_EVENTFD2 = 5284 |
||||
SYS_EPOLL_CREATE1 = 5285 |
||||
SYS_DUP3 = 5286 |
||||
SYS_PIPE2 = 5287 |
||||
SYS_INOTIFY_INIT1 = 5288 |
||||
SYS_PREADV = 5289 |
||||
SYS_PWRITEV = 5290 |
||||
SYS_RT_TGSIGQUEUEINFO = 5291 |
||||
SYS_PERF_EVENT_OPEN = 5292 |
||||
SYS_ACCEPT4 = 5293 |
||||
SYS_RECVMMSG = 5294 |
||||
SYS_FANOTIFY_INIT = 5295 |
||||
SYS_FANOTIFY_MARK = 5296 |
||||
SYS_PRLIMIT64 = 5297 |
||||
SYS_NAME_TO_HANDLE_AT = 5298 |
||||
SYS_OPEN_BY_HANDLE_AT = 5299 |
||||
SYS_CLOCK_ADJTIME = 5300 |
||||
SYS_SYNCFS = 5301 |
||||
SYS_SENDMMSG = 5302 |
||||
SYS_SETNS = 5303 |
||||
SYS_PROCESS_VM_READV = 5304 |
||||
SYS_PROCESS_VM_WRITEV = 5305 |
||||
SYS_KCMP = 5306 |
||||
SYS_FINIT_MODULE = 5307 |
||||
SYS_GETDENTS64 = 5308 |
||||
SYS_SCHED_SETATTR = 5309 |
||||
SYS_SCHED_GETATTR = 5310 |
||||
SYS_RENAMEAT2 = 5311 |
||||
SYS_SECCOMP = 5312 |
||||
SYS_GETRANDOM = 5313 |
||||
SYS_MEMFD_CREATE = 5314 |
||||
SYS_BPF = 5315 |
||||
SYS_EXECVEAT = 5316 |
||||
SYS_USERFAULTFD = 5317 |
||||
SYS_MEMBARRIER = 5318 |
||||
) |
@ -0,0 +1,327 @@ |
||||
// mksysnum_linux.pl /usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build mips64le,linux
|
||||
|
||||
package unix |
||||
|
||||
const ( |
||||
SYS_READ = 5000 |
||||
SYS_WRITE = 5001 |
||||
SYS_OPEN = 5002 |
||||
SYS_CLOSE = 5003 |
||||
SYS_STAT = 5004 |
||||
SYS_FSTAT = 5005 |
||||
SYS_LSTAT = 5006 |
||||
SYS_POLL = 5007 |
||||
SYS_LSEEK = 5008 |
||||
SYS_MMAP = 5009 |
||||
SYS_MPROTECT = 5010 |
||||
SYS_MUNMAP = 5011 |
||||
SYS_BRK = 5012 |
||||
SYS_RT_SIGACTION = 5013 |
||||
SYS_RT_SIGPROCMASK = 5014 |
||||
SYS_IOCTL = 5015 |
||||
SYS_PREAD64 = 5016 |
||||
SYS_PWRITE64 = 5017 |
||||
SYS_READV = 5018 |
||||
SYS_WRITEV = 5019 |
||||
SYS_ACCESS = 5020 |
||||
SYS_PIPE = 5021 |
||||
SYS__NEWSELECT = 5022 |
||||
SYS_SCHED_YIELD = 5023 |
||||
SYS_MREMAP = 5024 |
||||
SYS_MSYNC = 5025 |
||||
SYS_MINCORE = 5026 |
||||
SYS_MADVISE = 5027 |
||||
SYS_SHMGET = 5028 |
||||
SYS_SHMAT = 5029 |
||||
SYS_SHMCTL = 5030 |
||||
SYS_DUP = 5031 |
||||
SYS_DUP2 = 5032 |
||||
SYS_PAUSE = 5033 |
||||
SYS_NANOSLEEP = 5034 |
||||
SYS_GETITIMER = 5035 |
||||
SYS_SETITIMER = 5036 |
||||
SYS_ALARM = 5037 |
||||
SYS_GETPID = 5038 |
||||
SYS_SENDFILE = 5039 |
||||
SYS_SOCKET = 5040 |
||||
SYS_CONNECT = 5041 |
||||
SYS_ACCEPT = 5042 |
||||
SYS_SENDTO = 5043 |
||||
SYS_RECVFROM = 5044 |
||||
SYS_SENDMSG = 5045 |
||||
SYS_RECVMSG = 5046 |
||||
SYS_SHUTDOWN = 5047 |
||||
SYS_BIND = 5048 |
||||
SYS_LISTEN = 5049 |
||||
SYS_GETSOCKNAME = 5050 |
||||
SYS_GETPEERNAME = 5051 |
||||
SYS_SOCKETPAIR = 5052 |
||||
SYS_SETSOCKOPT = 5053 |
||||
SYS_GETSOCKOPT = 5054 |
||||
SYS_CLONE = 5055 |
||||
SYS_FORK = 5056 |
||||
SYS_EXECVE = 5057 |
||||
SYS_EXIT = 5058 |
||||
SYS_WAIT4 = 5059 |
||||
SYS_KILL = 5060 |
||||
SYS_UNAME = 5061 |
||||
SYS_SEMGET = 5062 |
||||
SYS_SEMOP = 5063 |
||||
SYS_SEMCTL = 5064 |
||||
SYS_SHMDT = 5065 |
||||
SYS_MSGGET = 5066 |
||||
SYS_MSGSND = 5067 |
||||
SYS_MSGRCV = 5068 |
||||
SYS_MSGCTL = 5069 |
||||
SYS_FCNTL = 5070 |
||||
SYS_FLOCK = 5071 |
||||
SYS_FSYNC = 5072 |
||||
SYS_FDATASYNC = 5073 |
||||
SYS_TRUNCATE = 5074 |
||||
SYS_FTRUNCATE = 5075 |
||||
SYS_GETDENTS = 5076 |
||||
SYS_GETCWD = 5077 |
||||
SYS_CHDIR = 5078 |
||||
SYS_FCHDIR = 5079 |
||||
SYS_RENAME = 5080 |
||||
SYS_MKDIR = 5081 |
||||
SYS_RMDIR = 5082 |
||||
SYS_CREAT = 5083 |
||||
SYS_LINK = 5084 |
||||
SYS_UNLINK = 5085 |
||||
SYS_SYMLINK = 5086 |
||||
SYS_READLINK = 5087 |
||||
SYS_CHMOD = 5088 |
||||
SYS_FCHMOD = 5089 |
||||
SYS_CHOWN = 5090 |
||||
SYS_FCHOWN = 5091 |
||||
SYS_LCHOWN = 5092 |
||||
SYS_UMASK = 5093 |
||||
SYS_GETTIMEOFDAY = 5094 |
||||
SYS_GETRLIMIT = 5095 |
||||
SYS_GETRUSAGE = 5096 |
||||
SYS_SYSINFO = 5097 |
||||
SYS_TIMES = 5098 |
||||
SYS_PTRACE = 5099 |
||||
SYS_GETUID = 5100 |
||||
SYS_SYSLOG = 5101 |
||||
SYS_GETGID = 5102 |
||||
SYS_SETUID = 5103 |
||||
SYS_SETGID = 5104 |
||||
SYS_GETEUID = 5105 |
||||
SYS_GETEGID = 5106 |
||||
SYS_SETPGID = 5107 |
||||
SYS_GETPPID = 5108 |
||||
SYS_GETPGRP = 5109 |
||||
SYS_SETSID = 5110 |
||||
SYS_SETREUID = 5111 |
||||
SYS_SETREGID = 5112 |
||||
SYS_GETGROUPS = 5113 |
||||
SYS_SETGROUPS = 5114 |
||||
SYS_SETRESUID = 5115 |
||||
SYS_GETRESUID = 5116 |
||||
SYS_SETRESGID = 5117 |
||||
SYS_GETRESGID = 5118 |
||||
SYS_GETPGID = 5119 |
||||
SYS_SETFSUID = 5120 |
||||
SYS_SETFSGID = 5121 |
||||
SYS_GETSID = 5122 |
||||
SYS_CAPGET = 5123 |
||||
SYS_CAPSET = 5124 |
||||
SYS_RT_SIGPENDING = 5125 |
||||
SYS_RT_SIGTIMEDWAIT = 5126 |
||||
SYS_RT_SIGQUEUEINFO = 5127 |
||||
SYS_RT_SIGSUSPEND = 5128 |
||||
SYS_SIGALTSTACK = 5129 |
||||
SYS_UTIME = 5130 |
||||
SYS_MKNOD = 5131 |
||||
SYS_PERSONALITY = 5132 |
||||
SYS_USTAT = 5133 |
||||
SYS_STATFS = 5134 |
||||
SYS_FSTATFS = 5135 |
||||
SYS_SYSFS = 5136 |
||||
SYS_GETPRIORITY = 5137 |
||||
SYS_SETPRIORITY = 5138 |
||||
SYS_SCHED_SETPARAM = 5139 |
||||
SYS_SCHED_GETPARAM = 5140 |
||||
SYS_SCHED_SETSCHEDULER = 5141 |
||||
SYS_SCHED_GETSCHEDULER = 5142 |
||||
SYS_SCHED_GET_PRIORITY_MAX = 5143 |
||||
SYS_SCHED_GET_PRIORITY_MIN = 5144 |
||||
SYS_SCHED_RR_GET_INTERVAL = 5145 |
||||
SYS_MLOCK = 5146 |
||||
SYS_MUNLOCK = 5147 |
||||
SYS_MLOCKALL = 5148 |
||||
SYS_MUNLOCKALL = 5149 |
||||
SYS_VHANGUP = 5150 |
||||
SYS_PIVOT_ROOT = 5151 |
||||
SYS__SYSCTL = 5152 |
||||
SYS_PRCTL = 5153 |
||||
SYS_ADJTIMEX = 5154 |
||||
SYS_SETRLIMIT = 5155 |
||||
SYS_CHROOT = 5156 |
||||
SYS_SYNC = 5157 |
||||
SYS_ACCT = 5158 |
||||
SYS_SETTIMEOFDAY = 5159 |
||||
SYS_MOUNT = 5160 |
||||
SYS_UMOUNT2 = 5161 |
||||
SYS_SWAPON = 5162 |
||||
SYS_SWAPOFF = 5163 |
||||
SYS_REBOOT = 5164 |
||||
SYS_SETHOSTNAME = 5165 |
||||
SYS_SETDOMAINNAME = 5166 |
||||
SYS_CREATE_MODULE = 5167 |
||||
SYS_INIT_MODULE = 5168 |
||||
SYS_DELETE_MODULE = 5169 |
||||
SYS_GET_KERNEL_SYMS = 5170 |
||||
SYS_QUERY_MODULE = 5171 |
||||
SYS_QUOTACTL = 5172 |
||||
SYS_NFSSERVCTL = 5173 |
||||
SYS_GETPMSG = 5174 |
||||
SYS_PUTPMSG = 5175 |
||||
SYS_AFS_SYSCALL = 5176 |
||||
SYS_RESERVED177 = 5177 |
||||
SYS_GETTID = 5178 |
||||
SYS_READAHEAD = 5179 |
||||
SYS_SETXATTR = 5180 |
||||
SYS_LSETXATTR = 5181 |
||||
SYS_FSETXATTR = 5182 |
||||
SYS_GETXATTR = 5183 |
||||
SYS_LGETXATTR = 5184 |
||||
SYS_FGETXATTR = 5185 |
||||
SYS_LISTXATTR = 5186 |
||||
SYS_LLISTXATTR = 5187 |
||||
SYS_FLISTXATTR = 5188 |
||||
SYS_REMOVEXATTR = 5189 |
||||
SYS_LREMOVEXATTR = 5190 |
||||
SYS_FREMOVEXATTR = 5191 |
||||
SYS_TKILL = 5192 |
||||
SYS_RESERVED193 = 5193 |
||||
SYS_FUTEX = 5194 |
||||
SYS_SCHED_SETAFFINITY = 5195 |
||||
SYS_SCHED_GETAFFINITY = 5196 |
||||
SYS_CACHEFLUSH = 5197 |
||||
SYS_CACHECTL = 5198 |
||||
SYS_SYSMIPS = 5199 |
||||
SYS_IO_SETUP = 5200 |
||||
SYS_IO_DESTROY = 5201 |
||||
SYS_IO_GETEVENTS = 5202 |
||||
SYS_IO_SUBMIT = 5203 |
||||
SYS_IO_CANCEL = 5204 |
||||
SYS_EXIT_GROUP = 5205 |
||||
SYS_LOOKUP_DCOOKIE = 5206 |
||||
SYS_EPOLL_CREATE = 5207 |
||||
SYS_EPOLL_CTL = 5208 |
||||
SYS_EPOLL_WAIT = 5209 |
||||
SYS_REMAP_FILE_PAGES = 5210 |
||||
SYS_RT_SIGRETURN = 5211 |
||||
SYS_SET_TID_ADDRESS = 5212 |
||||
SYS_RESTART_SYSCALL = 5213 |
||||
SYS_SEMTIMEDOP = 5214 |
||||
SYS_FADVISE64 = 5215 |
||||
SYS_TIMER_CREATE = 5216 |
||||
SYS_TIMER_SETTIME = 5217 |
||||
SYS_TIMER_GETTIME = 5218 |
||||
SYS_TIMER_GETOVERRUN = 5219 |
||||
SYS_TIMER_DELETE = 5220 |
||||
SYS_CLOCK_SETTIME = 5221 |
||||
SYS_CLOCK_GETTIME = 5222 |
||||
SYS_CLOCK_GETRES = 5223 |
||||
SYS_CLOCK_NANOSLEEP = 5224 |
||||
SYS_TGKILL = 5225 |
||||
SYS_UTIMES = 5226 |
||||
SYS_MBIND = 5227 |
||||
SYS_GET_MEMPOLICY = 5228 |
||||
SYS_SET_MEMPOLICY = 5229 |
||||
SYS_MQ_OPEN = 5230 |
||||
SYS_MQ_UNLINK = 5231 |
||||
SYS_MQ_TIMEDSEND = 5232 |
||||
SYS_MQ_TIMEDRECEIVE = 5233 |
||||
SYS_MQ_NOTIFY = 5234 |
||||
SYS_MQ_GETSETATTR = 5235 |
||||
SYS_VSERVER = 5236 |
||||
SYS_WAITID = 5237 |
||||
SYS_ADD_KEY = 5239 |
||||
SYS_REQUEST_KEY = 5240 |
||||
SYS_KEYCTL = 5241 |
||||
SYS_SET_THREAD_AREA = 5242 |
||||
SYS_INOTIFY_INIT = 5243 |
||||
SYS_INOTIFY_ADD_WATCH = 5244 |
||||
SYS_INOTIFY_RM_WATCH = 5245 |
||||
SYS_MIGRATE_PAGES = 5246 |
||||
SYS_OPENAT = 5247 |
||||
SYS_MKDIRAT = 5248 |
||||
SYS_MKNODAT = 5249 |
||||
SYS_FCHOWNAT = 5250 |
||||
SYS_FUTIMESAT = 5251 |
||||
SYS_NEWFSTATAT = 5252 |
||||
SYS_UNLINKAT = 5253 |
||||
SYS_RENAMEAT = 5254 |
||||
SYS_LINKAT = 5255 |
||||
SYS_SYMLINKAT = 5256 |
||||
SYS_READLINKAT = 5257 |
||||
SYS_FCHMODAT = 5258 |
||||
SYS_FACCESSAT = 5259 |
||||
SYS_PSELECT6 = 5260 |
||||
SYS_PPOLL = 5261 |
||||
SYS_UNSHARE = 5262 |
||||
SYS_SPLICE = 5263 |
||||
SYS_SYNC_FILE_RANGE = 5264 |
||||
SYS_TEE = 5265 |
||||
SYS_VMSPLICE = 5266 |
||||
SYS_MOVE_PAGES = 5267 |
||||
SYS_SET_ROBUST_LIST = 5268 |
||||
SYS_GET_ROBUST_LIST = 5269 |
||||
SYS_KEXEC_LOAD = 5270 |
||||
SYS_GETCPU = 5271 |
||||
SYS_EPOLL_PWAIT = 5272 |
||||
SYS_IOPRIO_SET = 5273 |
||||
SYS_IOPRIO_GET = 5274 |
||||
SYS_UTIMENSAT = 5275 |
||||
SYS_SIGNALFD = 5276 |
||||
SYS_TIMERFD = 5277 |
||||
SYS_EVENTFD = 5278 |
||||
SYS_FALLOCATE = 5279 |
||||
SYS_TIMERFD_CREATE = 5280 |
||||
SYS_TIMERFD_GETTIME = 5281 |
||||
SYS_TIMERFD_SETTIME = 5282 |
||||
SYS_SIGNALFD4 = 5283 |
||||
SYS_EVENTFD2 = 5284 |
||||
SYS_EPOLL_CREATE1 = 5285 |
||||
SYS_DUP3 = 5286 |
||||
SYS_PIPE2 = 5287 |
||||
SYS_INOTIFY_INIT1 = 5288 |
||||
SYS_PREADV = 5289 |
||||
SYS_PWRITEV = 5290 |
||||
SYS_RT_TGSIGQUEUEINFO = 5291 |
||||
SYS_PERF_EVENT_OPEN = 5292 |
||||
SYS_ACCEPT4 = 5293 |
||||
SYS_RECVMMSG = 5294 |
||||
SYS_FANOTIFY_INIT = 5295 |
||||
SYS_FANOTIFY_MARK = 5296 |
||||
SYS_PRLIMIT64 = 5297 |
||||
SYS_NAME_TO_HANDLE_AT = 5298 |
||||
SYS_OPEN_BY_HANDLE_AT = 5299 |
||||
SYS_CLOCK_ADJTIME = 5300 |
||||
SYS_SYNCFS = 5301 |
||||
SYS_SENDMMSG = 5302 |
||||
SYS_SETNS = 5303 |
||||
SYS_PROCESS_VM_READV = 5304 |
||||
SYS_PROCESS_VM_WRITEV = 5305 |
||||
SYS_KCMP = 5306 |
||||
SYS_FINIT_MODULE = 5307 |
||||
SYS_GETDENTS64 = 5308 |
||||
SYS_SCHED_SETATTR = 5309 |
||||
SYS_SCHED_GETATTR = 5310 |
||||
SYS_RENAMEAT2 = 5311 |
||||
SYS_SECCOMP = 5312 |
||||
SYS_GETRANDOM = 5313 |
||||
SYS_MEMFD_CREATE = 5314 |
||||
SYS_BPF = 5315 |
||||
SYS_EXECVEAT = 5316 |
||||
SYS_USERFAULTFD = 5317 |
||||
SYS_MEMBARRIER = 5318 |
||||
) |
@ -0,0 +1,328 @@ |
||||
// mksysnum_linux.pl /usr/include/asm/unistd.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
// +build s390x,linux
|
||||
|
||||
package unix |
||||
|
||||
const ( |
||||
SYS_EXIT = 1 |
||||
SYS_FORK = 2 |
||||
SYS_READ = 3 |
||||
SYS_WRITE = 4 |
||||
SYS_OPEN = 5 |
||||
SYS_CLOSE = 6 |
||||
SYS_RESTART_SYSCALL = 7 |
||||
SYS_CREAT = 8 |
||||
SYS_LINK = 9 |
||||
SYS_UNLINK = 10 |
||||
SYS_EXECVE = 11 |
||||
SYS_CHDIR = 12 |
||||
SYS_MKNOD = 14 |
||||
SYS_CHMOD = 15 |
||||
SYS_LSEEK = 19 |
||||
SYS_GETPID = 20 |
||||
SYS_MOUNT = 21 |
||||
SYS_UMOUNT = 22 |
||||
SYS_PTRACE = 26 |
||||
SYS_ALARM = 27 |
||||
SYS_PAUSE = 29 |
||||
SYS_UTIME = 30 |
||||
SYS_ACCESS = 33 |
||||
SYS_NICE = 34 |
||||
SYS_SYNC = 36 |
||||
SYS_KILL = 37 |
||||
SYS_RENAME = 38 |
||||
SYS_MKDIR = 39 |
||||
SYS_RMDIR = 40 |
||||
SYS_DUP = 41 |
||||
SYS_PIPE = 42 |
||||
SYS_TIMES = 43 |
||||
SYS_BRK = 45 |
||||
SYS_SIGNAL = 48 |
||||
SYS_ACCT = 51 |
||||
SYS_UMOUNT2 = 52 |
||||
SYS_IOCTL = 54 |
||||
SYS_FCNTL = 55 |
||||
SYS_SETPGID = 57 |
||||
SYS_UMASK = 60 |
||||
SYS_CHROOT = 61 |
||||
SYS_USTAT = 62 |
||||
SYS_DUP2 = 63 |
||||
SYS_GETPPID = 64 |
||||
SYS_GETPGRP = 65 |
||||
SYS_SETSID = 66 |
||||
SYS_SIGACTION = 67 |
||||
SYS_SIGSUSPEND = 72 |
||||
SYS_SIGPENDING = 73 |
||||
SYS_SETHOSTNAME = 74 |
||||
SYS_SETRLIMIT = 75 |
||||
SYS_GETRUSAGE = 77 |
||||
SYS_GETTIMEOFDAY = 78 |
||||
SYS_SETTIMEOFDAY = 79 |
||||
SYS_SYMLINK = 83 |
||||
SYS_READLINK = 85 |
||||
SYS_USELIB = 86 |
||||
SYS_SWAPON = 87 |
||||
SYS_REBOOT = 88 |
||||
SYS_READDIR = 89 |
||||
SYS_MMAP = 90 |
||||
SYS_MUNMAP = 91 |
||||
SYS_TRUNCATE = 92 |
||||
SYS_FTRUNCATE = 93 |
||||
SYS_FCHMOD = 94 |
||||
SYS_GETPRIORITY = 96 |
||||
SYS_SETPRIORITY = 97 |
||||
SYS_STATFS = 99 |
||||
SYS_FSTATFS = 100 |
||||
SYS_SOCKETCALL = 102 |
||||
SYS_SYSLOG = 103 |
||||
SYS_SETITIMER = 104 |
||||
SYS_GETITIMER = 105 |
||||
SYS_STAT = 106 |
||||
SYS_LSTAT = 107 |
||||
SYS_FSTAT = 108 |
||||
SYS_LOOKUP_DCOOKIE = 110 |
||||
SYS_VHANGUP = 111 |
||||
SYS_IDLE = 112 |
||||
SYS_WAIT4 = 114 |
||||
SYS_SWAPOFF = 115 |
||||
SYS_SYSINFO = 116 |
||||
SYS_IPC = 117 |
||||
SYS_FSYNC = 118 |
||||
SYS_SIGRETURN = 119 |
||||
SYS_CLONE = 120 |
||||
SYS_SETDOMAINNAME = 121 |
||||
SYS_UNAME = 122 |
||||
SYS_ADJTIMEX = 124 |
||||
SYS_MPROTECT = 125 |
||||
SYS_SIGPROCMASK = 126 |
||||
SYS_CREATE_MODULE = 127 |
||||
SYS_INIT_MODULE = 128 |
||||
SYS_DELETE_MODULE = 129 |
||||
SYS_GET_KERNEL_SYMS = 130 |
||||
SYS_QUOTACTL = 131 |
||||
SYS_GETPGID = 132 |
||||
SYS_FCHDIR = 133 |
||||
SYS_BDFLUSH = 134 |
||||
SYS_SYSFS = 135 |
||||
SYS_PERSONALITY = 136 |
||||
SYS_AFS_SYSCALL = 137 |
||||
SYS_GETDENTS = 141 |
||||
SYS_FLOCK = 143 |
||||
SYS_MSYNC = 144 |
||||
SYS_READV = 145 |
||||
SYS_WRITEV = 146 |
||||
SYS_GETSID = 147 |
||||
SYS_FDATASYNC = 148 |
||||
SYS__SYSCTL = 149 |
||||
SYS_MLOCK = 150 |
||||
SYS_MUNLOCK = 151 |
||||
SYS_MLOCKALL = 152 |
||||
SYS_MUNLOCKALL = 153 |
||||
SYS_SCHED_SETPARAM = 154 |
||||
SYS_SCHED_GETPARAM = 155 |
||||
SYS_SCHED_SETSCHEDULER = 156 |
||||
SYS_SCHED_GETSCHEDULER = 157 |
||||
SYS_SCHED_YIELD = 158 |
||||
SYS_SCHED_GET_PRIORITY_MAX = 159 |
||||
SYS_SCHED_GET_PRIORITY_MIN = 160 |
||||
SYS_SCHED_RR_GET_INTERVAL = 161 |
||||
SYS_NANOSLEEP = 162 |
||||
SYS_MREMAP = 163 |
||||
SYS_QUERY_MODULE = 167 |
||||
SYS_POLL = 168 |
||||
SYS_NFSSERVCTL = 169 |
||||
SYS_PRCTL = 172 |
||||
SYS_RT_SIGRETURN = 173 |
||||
SYS_RT_SIGACTION = 174 |
||||
SYS_RT_SIGPROCMASK = 175 |
||||
SYS_RT_SIGPENDING = 176 |
||||
SYS_RT_SIGTIMEDWAIT = 177 |
||||
SYS_RT_SIGQUEUEINFO = 178 |
||||
SYS_RT_SIGSUSPEND = 179 |
||||
SYS_PREAD64 = 180 |
||||
SYS_PWRITE64 = 181 |
||||
SYS_GETCWD = 183 |
||||
SYS_CAPGET = 184 |
||||
SYS_CAPSET = 185 |
||||
SYS_SIGALTSTACK = 186 |
||||
SYS_SENDFILE = 187 |
||||
SYS_GETPMSG = 188 |
||||
SYS_PUTPMSG = 189 |
||||
SYS_VFORK = 190 |
||||
SYS_PIVOT_ROOT = 217 |
||||
SYS_MINCORE = 218 |
||||
SYS_MADVISE = 219 |
||||
SYS_GETDENTS64 = 220 |
||||
SYS_READAHEAD = 222 |
||||
SYS_SETXATTR = 224 |
||||
SYS_LSETXATTR = 225 |
||||
SYS_FSETXATTR = 226 |
||||
SYS_GETXATTR = 227 |
||||
SYS_LGETXATTR = 228 |
||||
SYS_FGETXATTR = 229 |
||||
SYS_LISTXATTR = 230 |
||||
SYS_LLISTXATTR = 231 |
||||
SYS_FLISTXATTR = 232 |
||||
SYS_REMOVEXATTR = 233 |
||||
SYS_LREMOVEXATTR = 234 |
||||
SYS_FREMOVEXATTR = 235 |
||||
SYS_GETTID = 236 |
||||
SYS_TKILL = 237 |
||||
SYS_FUTEX = 238 |
||||
SYS_SCHED_SETAFFINITY = 239 |
||||
SYS_SCHED_GETAFFINITY = 240 |
||||
SYS_TGKILL = 241 |
||||
SYS_IO_SETUP = 243 |
||||
SYS_IO_DESTROY = 244 |
||||
SYS_IO_GETEVENTS = 245 |
||||
SYS_IO_SUBMIT = 246 |
||||
SYS_IO_CANCEL = 247 |
||||
SYS_EXIT_GROUP = 248 |
||||
SYS_EPOLL_CREATE = 249 |
||||
SYS_EPOLL_CTL = 250 |
||||
SYS_EPOLL_WAIT = 251 |
||||
SYS_SET_TID_ADDRESS = 252 |
||||
SYS_FADVISE64 = 253 |
||||
SYS_TIMER_CREATE = 254 |
||||
SYS_TIMER_SETTIME = 255 |
||||
SYS_TIMER_GETTIME = 256 |
||||
SYS_TIMER_GETOVERRUN = 257 |
||||
SYS_TIMER_DELETE = 258 |
||||
SYS_CLOCK_SETTIME = 259 |
||||
SYS_CLOCK_GETTIME = 260 |
||||
SYS_CLOCK_GETRES = 261 |
||||
SYS_CLOCK_NANOSLEEP = 262 |
||||
SYS_STATFS64 = 265 |
||||
SYS_FSTATFS64 = 266 |
||||
SYS_REMAP_FILE_PAGES = 267 |
||||
SYS_MBIND = 268 |
||||
SYS_GET_MEMPOLICY = 269 |
||||
SYS_SET_MEMPOLICY = 270 |
||||
SYS_MQ_OPEN = 271 |
||||
SYS_MQ_UNLINK = 272 |
||||
SYS_MQ_TIMEDSEND = 273 |
||||
SYS_MQ_TIMEDRECEIVE = 274 |
||||
SYS_MQ_NOTIFY = 275 |
||||
SYS_MQ_GETSETATTR = 276 |
||||
SYS_KEXEC_LOAD = 277 |
||||
SYS_ADD_KEY = 278 |
||||
SYS_REQUEST_KEY = 279 |
||||
SYS_KEYCTL = 280 |
||||
SYS_WAITID = 281 |
||||
SYS_IOPRIO_SET = 282 |
||||
SYS_IOPRIO_GET = 283 |
||||
SYS_INOTIFY_INIT = 284 |
||||
SYS_INOTIFY_ADD_WATCH = 285 |
||||
SYS_INOTIFY_RM_WATCH = 286 |
||||
SYS_MIGRATE_PAGES = 287 |
||||
SYS_OPENAT = 288 |
||||
SYS_MKDIRAT = 289 |
||||
SYS_MKNODAT = 290 |
||||
SYS_FCHOWNAT = 291 |
||||
SYS_FUTIMESAT = 292 |
||||
SYS_UNLINKAT = 294 |
||||
SYS_RENAMEAT = 295 |
||||
SYS_LINKAT = 296 |
||||
SYS_SYMLINKAT = 297 |
||||
SYS_READLINKAT = 298 |
||||
SYS_FCHMODAT = 299 |
||||
SYS_FACCESSAT = 300 |
||||
SYS_PSELECT6 = 301 |
||||
SYS_PPOLL = 302 |
||||
SYS_UNSHARE = 303 |
||||
SYS_SET_ROBUST_LIST = 304 |
||||
SYS_GET_ROBUST_LIST = 305 |
||||
SYS_SPLICE = 306 |
||||
SYS_SYNC_FILE_RANGE = 307 |
||||
SYS_TEE = 308 |
||||
SYS_VMSPLICE = 309 |
||||
SYS_MOVE_PAGES = 310 |
||||
SYS_GETCPU = 311 |
||||
SYS_EPOLL_PWAIT = 312 |
||||
SYS_UTIMES = 313 |
||||
SYS_FALLOCATE = 314 |
||||
SYS_UTIMENSAT = 315 |
||||
SYS_SIGNALFD = 316 |
||||
SYS_TIMERFD = 317 |
||||
SYS_EVENTFD = 318 |
||||
SYS_TIMERFD_CREATE = 319 |
||||
SYS_TIMERFD_SETTIME = 320 |
||||
SYS_TIMERFD_GETTIME = 321 |
||||
SYS_SIGNALFD4 = 322 |
||||
SYS_EVENTFD2 = 323 |
||||
SYS_INOTIFY_INIT1 = 324 |
||||
SYS_PIPE2 = 325 |
||||
SYS_DUP3 = 326 |
||||
SYS_EPOLL_CREATE1 = 327 |
||||
SYS_PREADV = 328 |
||||
SYS_PWRITEV = 329 |
||||
SYS_RT_TGSIGQUEUEINFO = 330 |
||||
SYS_PERF_EVENT_OPEN = 331 |
||||
SYS_FANOTIFY_INIT = 332 |
||||
SYS_FANOTIFY_MARK = 333 |
||||
SYS_PRLIMIT64 = 334 |
||||
SYS_NAME_TO_HANDLE_AT = 335 |
||||
SYS_OPEN_BY_HANDLE_AT = 336 |
||||
SYS_CLOCK_ADJTIME = 337 |
||||
SYS_SYNCFS = 338 |
||||
SYS_SETNS = 339 |
||||
SYS_PROCESS_VM_READV = 340 |
||||
SYS_PROCESS_VM_WRITEV = 341 |
||||
SYS_S390_RUNTIME_INSTR = 342 |
||||
SYS_KCMP = 343 |
||||
SYS_FINIT_MODULE = 344 |
||||
SYS_SCHED_SETATTR = 345 |
||||
SYS_SCHED_GETATTR = 346 |
||||
SYS_RENAMEAT2 = 347 |
||||
SYS_SECCOMP = 348 |
||||
SYS_GETRANDOM = 349 |
||||
SYS_MEMFD_CREATE = 350 |
||||
SYS_BPF = 351 |
||||
SYS_S390_PCI_MMIO_WRITE = 352 |
||||
SYS_S390_PCI_MMIO_READ = 353 |
||||
SYS_EXECVEAT = 354 |
||||
SYS_USERFAULTFD = 355 |
||||
SYS_MEMBARRIER = 356 |
||||
SYS_RECVMMSG = 357 |
||||
SYS_SENDMMSG = 358 |
||||
SYS_SOCKET = 359 |
||||
SYS_SOCKETPAIR = 360 |
||||
SYS_BIND = 361 |
||||
SYS_CONNECT = 362 |
||||
SYS_LISTEN = 363 |
||||
SYS_ACCEPT4 = 364 |
||||
SYS_GETSOCKOPT = 365 |
||||
SYS_SETSOCKOPT = 366 |
||||
SYS_GETSOCKNAME = 367 |
||||
SYS_GETPEERNAME = 368 |
||||
SYS_SENDTO = 369 |
||||
SYS_SENDMSG = 370 |
||||
SYS_RECVFROM = 371 |
||||
SYS_RECVMSG = 372 |
||||
SYS_SHUTDOWN = 373 |
||||
SYS_MLOCK2 = 374 |
||||
SYS_SELECT = 142 |
||||
SYS_GETRLIMIT = 191 |
||||
SYS_LCHOWN = 198 |
||||
SYS_GETUID = 199 |
||||
SYS_GETGID = 200 |
||||
SYS_GETEUID = 201 |
||||
SYS_GETEGID = 202 |
||||
SYS_SETREUID = 203 |
||||
SYS_SETREGID = 204 |
||||
SYS_GETGROUPS = 205 |
||||
SYS_SETGROUPS = 206 |
||||
SYS_FCHOWN = 207 |
||||
SYS_SETRESUID = 208 |
||||
SYS_GETRESUID = 209 |
||||
SYS_SETRESGID = 210 |
||||
SYS_GETRESGID = 211 |
||||
SYS_CHOWN = 212 |
||||
SYS_SETUID = 213 |
||||
SYS_SETGID = 214 |
||||
SYS_SETFSUID = 215 |
||||
SYS_SETFSGID = 216 |
||||
SYS_NEWFSTATAT = 293 |
||||
) |
@ -1,437 +0,0 @@ |
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs types_dragonfly.go
|
||||
|
||||
// +build 386,dragonfly
|
||||
|
||||
package unix |
||||
|
||||
const ( |
||||
sizeofPtr = 0x4 |
||||
sizeofShort = 0x2 |
||||
sizeofInt = 0x4 |
||||
sizeofLong = 0x4 |
||||
sizeofLongLong = 0x8 |
||||
) |
||||
|
||||
type ( |
||||
_C_short int16 |
||||
_C_int int32 |
||||
_C_long int32 |
||||
_C_long_long int64 |
||||
) |
||||
|
||||
type Timespec struct { |
||||
Sec int32 |
||||
Nsec int32 |
||||
} |
||||
|
||||
type Timeval struct { |
||||
Sec int32 |
||||
Usec int32 |
||||
} |
||||
|
||||
type Rusage struct { |
||||
Utime Timeval |
||||
Stime Timeval |
||||
Maxrss int32 |
||||
Ixrss int32 |
||||
Idrss int32 |
||||
Isrss int32 |
||||
Minflt int32 |
||||
Majflt int32 |
||||
Nswap int32 |
||||
Inblock int32 |
||||
Oublock int32 |
||||
Msgsnd int32 |
||||
Msgrcv int32 |
||||
Nsignals int32 |
||||
Nvcsw int32 |
||||
Nivcsw int32 |
||||
} |
||||
|
||||
type Rlimit struct { |
||||
Cur int64 |
||||
Max int64 |
||||
} |
||||
|
||||
type _Gid_t uint32 |
||||
|
||||
const ( |
||||
S_IFMT = 0xf000 |
||||
S_IFIFO = 0x1000 |
||||
S_IFCHR = 0x2000 |
||||
S_IFDIR = 0x4000 |
||||
S_IFBLK = 0x6000 |
||||
S_IFREG = 0x8000 |
||||
S_IFLNK = 0xa000 |
||||
S_IFSOCK = 0xc000 |
||||
S_ISUID = 0x800 |
||||
S_ISGID = 0x400 |
||||
S_ISVTX = 0x200 |
||||
S_IRUSR = 0x100 |
||||
S_IWUSR = 0x80 |
||||
S_IXUSR = 0x40 |
||||
) |
||||
|
||||
type Stat_t struct { |
||||
Ino uint64 |
||||
Nlink uint32 |
||||
Dev uint32 |
||||
Mode uint16 |
||||
Padding1 uint16 |
||||
Uid uint32 |
||||
Gid uint32 |
||||
Rdev uint32 |
||||
Atim Timespec |
||||
Mtim Timespec |
||||
Ctim Timespec |
||||
Size int64 |
||||
Blocks int64 |
||||
Blksize uint32 |
||||
Flags uint32 |
||||
Gen uint32 |
||||
Lspare int32 |
||||
Qspare1 int64 |
||||
Qspare2 int64 |
||||
} |
||||
|
||||
type Statfs_t struct { |
||||
Spare2 int32 |
||||
Bsize int32 |
||||
Iosize int32 |
||||
Blocks int32 |
||||
Bfree int32 |
||||
Bavail int32 |
||||
Files int32 |
||||
Ffree int32 |
||||
Fsid Fsid |
||||
Owner uint32 |
||||
Type int32 |
||||
Flags int32 |
||||
Syncwrites int32 |
||||
Asyncwrites int32 |
||||
Fstypename [16]int8 |
||||
Mntonname [80]int8 |
||||
Syncreads int32 |
||||
Asyncreads int32 |
||||
Spares1 int16 |
||||
Mntfromname [80]int8 |
||||
Spares2 int16 |
||||
Spare [2]int32 |
||||
} |
||||
|
||||
type Flock_t struct { |
||||
Start int64 |
||||
Len int64 |
||||
Pid int32 |
||||
Type int16 |
||||
Whence int16 |
||||
} |
||||
|
||||
type Dirent struct { |
||||
Fileno uint64 |
||||
Namlen uint16 |
||||
Type uint8 |
||||
Unused1 uint8 |
||||
Unused2 uint32 |
||||
Name [256]int8 |
||||
} |
||||
|
||||
type Fsid struct { |
||||
Val [2]int32 |
||||
} |
||||
|
||||
type RawSockaddrInet4 struct { |
||||
Len uint8 |
||||
Family uint8 |
||||
Port uint16 |
||||
Addr [4]byte /* in_addr */ |
||||
Zero [8]int8 |
||||
} |
||||
|
||||
type RawSockaddrInet6 struct { |
||||
Len uint8 |
||||
Family uint8 |
||||
Port uint16 |
||||
Flowinfo uint32 |
||||
Addr [16]byte /* in6_addr */ |
||||
Scope_id uint32 |
||||
} |
||||
|
||||
type RawSockaddrUnix struct { |
||||
Len uint8 |
||||
Family uint8 |
||||
Path [104]int8 |
||||
} |
||||
|
||||
type RawSockaddrDatalink struct { |
||||
Len uint8 |
||||
Family uint8 |
||||
Index uint16 |
||||
Type uint8 |
||||
Nlen uint8 |
||||
Alen uint8 |
||||
Slen uint8 |
||||
Data [12]int8 |
||||
Rcf uint16 |
||||
Route [16]uint16 |
||||
} |
||||
|
||||
type RawSockaddr struct { |
||||
Len uint8 |
||||
Family uint8 |
||||
Data [14]int8 |
||||
} |
||||
|
||||
type RawSockaddrAny struct { |
||||
Addr RawSockaddr |
||||
Pad [92]int8 |
||||
} |
||||
|
||||
type _Socklen uint32 |
||||
|
||||
type Linger struct { |
||||
Onoff int32 |
||||
Linger int32 |
||||
} |
||||
|
||||
type Iovec struct { |
||||
Base *byte |
||||
Len uint32 |
||||
} |
||||
|
||||
type IPMreq struct { |
||||
Multiaddr [4]byte /* in_addr */ |
||||
Interface [4]byte /* in_addr */ |
||||
} |
||||
|
||||
type IPv6Mreq struct { |
||||
Multiaddr [16]byte /* in6_addr */ |
||||
Interface uint32 |
||||
} |
||||
|
||||
type Msghdr struct { |
||||
Name *byte |
||||
Namelen uint32 |
||||
Iov *Iovec |
||||
Iovlen int32 |
||||
Control *byte |
||||
Controllen uint32 |
||||
Flags int32 |
||||
} |
||||
|
||||
type Cmsghdr struct { |
||||
Len uint32 |
||||
Level int32 |
||||
Type int32 |
||||
} |
||||
|
||||
type Inet6Pktinfo struct { |
||||
Addr [16]byte /* in6_addr */ |
||||
Ifindex uint32 |
||||
} |
||||
|
||||
type IPv6MTUInfo struct { |
||||
Addr RawSockaddrInet6 |
||||
Mtu uint32 |
||||
} |
||||
|
||||
type ICMPv6Filter struct { |
||||
Filt [8]uint32 |
||||
} |
||||
|
||||
const ( |
||||
SizeofSockaddrInet4 = 0x10 |
||||
SizeofSockaddrInet6 = 0x1c |
||||
SizeofSockaddrAny = 0x6c |
||||
SizeofSockaddrUnix = 0x6a |
||||
SizeofSockaddrDatalink = 0x36 |
||||
SizeofLinger = 0x8 |
||||
SizeofIPMreq = 0x8 |
||||
SizeofIPv6Mreq = 0x14 |
||||
SizeofMsghdr = 0x1c |
||||
SizeofCmsghdr = 0xc |
||||
SizeofInet6Pktinfo = 0x14 |
||||
SizeofIPv6MTUInfo = 0x20 |
||||
SizeofICMPv6Filter = 0x20 |
||||
) |
||||
|
||||
const ( |
||||
PTRACE_TRACEME = 0x0 |
||||
PTRACE_CONT = 0x7 |
||||
PTRACE_KILL = 0x8 |
||||
) |
||||
|
||||
type Kevent_t struct { |
||||
Ident uint32 |
||||
Filter int16 |
||||
Flags uint16 |
||||
Fflags uint32 |
||||
Data int32 |
||||
Udata *byte |
||||
} |
||||
|
||||
type FdSet struct { |
||||
Bits [32]uint32 |
||||
} |
||||
|
||||
const ( |
||||
SizeofIfMsghdr = 0x68 |
||||
SizeofIfData = 0x58 |
||||
SizeofIfaMsghdr = 0x14 |
||||
SizeofIfmaMsghdr = 0x10 |
||||
SizeofIfAnnounceMsghdr = 0x18 |
||||
SizeofRtMsghdr = 0x5c |
||||
SizeofRtMetrics = 0x38 |
||||
) |
||||
|
||||
type IfMsghdr struct { |
||||
Msglen uint16 |
||||
Version uint8 |
||||
Type uint8 |
||||
Addrs int32 |
||||
Flags int32 |
||||
Index uint16 |
||||
Pad_cgo_0 [2]byte |
||||
Data IfData |
||||
} |
||||
|
||||
type IfData struct { |
||||
Type uint8 |
||||
Physical uint8 |
||||
Addrlen uint8 |
||||
Hdrlen uint8 |
||||
Recvquota uint8 |
||||
Xmitquota uint8 |
||||
Pad_cgo_0 [2]byte |
||||
Mtu uint32 |
||||
Metric uint32 |
||||
Link_state uint32 |
||||
Baudrate uint64 |
||||
Ipackets uint32 |
||||
Ierrors uint32 |
||||
Opackets uint32 |
||||
Oerrors uint32 |
||||
Collisions uint32 |
||||
Ibytes uint32 |
||||
Obytes uint32 |
||||
Imcasts uint32 |
||||
Omcasts uint32 |
||||
Iqdrops uint32 |
||||
Noproto uint32 |
||||
Hwassist uint32 |
||||
Unused uint32 |
||||
Lastchange Timeval |
||||
} |
||||
|
||||
type IfaMsghdr struct { |
||||
Msglen uint16 |
||||
Version uint8 |
||||
Type uint8 |
||||
Addrs int32 |
||||
Flags int32 |
||||
Index uint16 |
||||
Pad_cgo_0 [2]byte |
||||
Metric int32 |
||||
} |
||||
|
||||
type IfmaMsghdr struct { |
||||
Msglen uint16 |
||||
Version uint8 |
||||
Type uint8 |
||||
Addrs int32 |
||||
Flags int32 |
||||
Index uint16 |
||||
Pad_cgo_0 [2]byte |
||||
} |
||||
|
||||
type IfAnnounceMsghdr struct { |
||||
Msglen uint16 |
||||
Version uint8 |
||||
Type uint8 |
||||
Index uint16 |
||||
Name [16]int8 |
||||
What uint16 |
||||
} |
||||
|
||||
type RtMsghdr struct { |
||||
Msglen uint16 |
||||
Version uint8 |
||||
Type uint8 |
||||
Index uint16 |
||||
Pad_cgo_0 [2]byte |
||||
Flags int32 |
||||
Addrs int32 |
||||
Pid int32 |
||||
Seq int32 |
||||
Errno int32 |
||||
Use int32 |
||||
Inits uint32 |
||||
Rmx RtMetrics |
||||
} |
||||
|
||||
type RtMetrics struct { |
||||
Locks uint32 |
||||
Mtu uint32 |
||||
Pksent uint32 |
||||
Expire uint32 |
||||
Sendpipe uint32 |
||||
Ssthresh uint32 |
||||
Rtt uint32 |
||||
Rttvar uint32 |
||||
Recvpipe uint32 |
||||
Hopcount uint32 |
||||
Mssopt uint16 |
||||
Pad uint16 |
||||
Msl uint32 |
||||
Iwmaxsegs uint32 |
||||
Iwcapsegs uint32 |
||||
} |
||||
|
||||
const ( |
||||
SizeofBpfVersion = 0x4 |
||||
SizeofBpfStat = 0x8 |
||||
SizeofBpfProgram = 0x8 |
||||
SizeofBpfInsn = 0x8 |
||||
SizeofBpfHdr = 0x14 |
||||
) |
||||
|
||||
type BpfVersion struct { |
||||
Major uint16 |
||||
Minor uint16 |
||||
} |
||||
|
||||
type BpfStat struct { |
||||
Recv uint32 |
||||
Drop uint32 |
||||
} |
||||
|
||||
type BpfProgram struct { |
||||
Len uint32 |
||||
Insns *BpfInsn |
||||
} |
||||
|
||||
type BpfInsn struct { |
||||
Code uint16 |
||||
Jt uint8 |
||||
Jf uint8 |
||||
K uint32 |
||||
} |
||||
|
||||
type BpfHdr struct { |
||||
Tstamp Timeval |
||||
Caplen uint32 |
||||
Datalen uint32 |
||||
Hdrlen uint16 |
||||
Pad_cgo_0 [2]byte |
||||
} |
||||
|
||||
type Termios struct { |
||||
Iflag uint32 |
||||
Oflag uint32 |
||||
Cflag uint32 |
||||
Lflag uint32 |
||||
Cc [20]uint8 |
||||
Ispeed uint32 |
||||
Ospeed uint32 |
||||
} |
@ -0,0 +1,627 @@ |
||||
// +build mips64,linux
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs types_linux.go
|
||||
|
||||
package unix |
||||
|
||||
const ( |
||||
sizeofPtr = 0x8 |
||||
sizeofShort = 0x2 |
||||
sizeofInt = 0x4 |
||||
sizeofLong = 0x8 |
||||
sizeofLongLong = 0x8 |
||||
PathMax = 0x1000 |
||||
) |
||||
|
||||
type ( |
||||
_C_short int16 |
||||
_C_int int32 |
||||
_C_long int64 |
||||
_C_long_long int64 |
||||
) |
||||
|
||||
type Timespec struct { |
||||
Sec int64 |
||||
Nsec int64 |
||||
} |
||||
|
||||
type Timeval struct { |
||||
Sec int64 |
||||
Usec int64 |
||||
} |
||||
|
||||
type Timex struct { |
||||
Modes uint32 |
||||
Pad_cgo_0 [4]byte |
||||
Offset int64 |
||||
Freq int64 |
||||
Maxerror int64 |
||||
Esterror int64 |
||||
Status int32 |
||||
Pad_cgo_1 [4]byte |
||||
Constant int64 |
||||
Precision int64 |
||||
Tolerance int64 |
||||
Time Timeval |
||||
Tick int64 |
||||
Ppsfreq int64 |
||||
Jitter int64 |
||||
Shift int32 |
||||
Pad_cgo_2 [4]byte |
||||
Stabil int64 |
||||
Jitcnt int64 |
||||
Calcnt int64 |
||||
Errcnt int64 |
||||
Stbcnt int64 |
||||
Tai int32 |
||||
Pad_cgo_3 [44]byte |
||||
} |
||||
|
||||
type Time_t int64 |
||||
|
||||
type Tms struct { |
||||
Utime int64 |
||||
Stime int64 |
||||
Cutime int64 |
||||
Cstime int64 |
||||
} |
||||
|
||||
type Utimbuf struct { |
||||
Actime int64 |
||||
Modtime int64 |
||||
} |
||||
|
||||
type Rusage struct { |
||||
Utime Timeval |
||||
Stime Timeval |
||||
Maxrss int64 |
||||
Ixrss int64 |
||||
Idrss int64 |
||||
Isrss int64 |
||||
Minflt int64 |
||||
Majflt int64 |
||||
Nswap int64 |
||||
Inblock int64 |
||||
Oublock int64 |
||||
Msgsnd int64 |
||||
Msgrcv int64 |
||||
Nsignals int64 |
||||
Nvcsw int64 |
||||
Nivcsw int64 |
||||
} |
||||
|
||||
type Rlimit struct { |
||||
Cur uint64 |
||||
Max uint64 |
||||
} |
||||
|
||||
type _Gid_t uint32 |
||||
|
||||
type Stat_t struct { |
||||
Dev uint32 |
||||
Pad1 [3]int32 |
||||
Ino uint64 |
||||
Mode uint32 |
||||
Nlink uint32 |
||||
Uid uint32 |
||||
Gid uint32 |
||||
Rdev uint32 |
||||
Pad2 [3]uint32 |
||||
Size int64 |
||||
Atim Timespec |
||||
Mtim Timespec |
||||
Ctim Timespec |
||||
Blksize uint32 |
||||
Pad4 uint32 |
||||
Blocks int64 |
||||
} |
||||
|
||||
type Statfs_t struct { |
||||
Type int64 |
||||
Bsize int64 |
||||
Frsize int64 |
||||
Blocks uint64 |
||||
Bfree uint64 |
||||
Files uint64 |
||||
Ffree uint64 |
||||
Bavail uint64 |
||||
Fsid Fsid |
||||
Namelen int64 |
||||
Flags int64 |
||||
Spare [5]int64 |
||||
} |
||||
|
||||
type Dirent struct { |
||||
Ino uint64 |
||||
Off int64 |
||||
Reclen uint16 |
||||
Type uint8 |
||||
Name [256]int8 |
||||
Pad_cgo_0 [5]byte |
||||
} |
||||
|
||||
type Fsid struct { |
||||
X__val [2]int32 |
||||
} |
||||
|
||||
type Flock_t struct { |
||||
Type int16 |
||||
Whence int16 |
||||
Pad_cgo_0 [4]byte |
||||
Start int64 |
||||
Len int64 |
||||
Pid int32 |
||||
Pad_cgo_1 [4]byte |
||||
} |
||||
|
||||
const ( |
||||
FADV_NORMAL = 0x0 |
||||
FADV_RANDOM = 0x1 |
||||
FADV_SEQUENTIAL = 0x2 |
||||
FADV_WILLNEED = 0x3 |
||||
FADV_DONTNEED = 0x4 |
||||
FADV_NOREUSE = 0x5 |
||||
) |
||||
|
||||
type RawSockaddrInet4 struct { |
||||
Family uint16 |
||||
Port uint16 |
||||
Addr [4]byte /* in_addr */ |
||||
Zero [8]uint8 |
||||
} |
||||
|
||||
type RawSockaddrInet6 struct { |
||||
Family uint16 |
||||
Port uint16 |
||||
Flowinfo uint32 |
||||
Addr [16]byte /* in6_addr */ |
||||
Scope_id uint32 |
||||
} |
||||
|
||||
type RawSockaddrUnix struct { |
||||
Family uint16 |
||||
Path [108]int8 |
||||
} |
||||
|
||||
type RawSockaddrLinklayer struct { |
||||
Family uint16 |
||||
Protocol uint16 |
||||
Ifindex int32 |
||||
Hatype uint16 |
||||
Pkttype uint8 |
||||
Halen uint8 |
||||
Addr [8]uint8 |
||||
} |
||||
|
||||
type RawSockaddrNetlink struct { |
||||
Family uint16 |
||||
Pad uint16 |
||||
Pid uint32 |
||||
Groups uint32 |
||||
} |
||||
|
||||
type RawSockaddrHCI struct { |
||||
Family uint16 |
||||
Dev uint16 |
||||
Channel uint16 |
||||
} |
||||
|
||||
type RawSockaddr struct { |
||||
Family uint16 |
||||
Data [14]int8 |
||||
} |
||||
|
||||
type RawSockaddrAny struct { |
||||
Addr RawSockaddr |
||||
Pad [96]int8 |
||||
} |
||||
|
||||
type _Socklen uint32 |
||||
|
||||
type Linger struct { |
||||
Onoff int32 |
||||
Linger int32 |
||||
} |
||||
|
||||
type Iovec struct { |
||||
Base *byte |
||||
Len uint64 |
||||
} |
||||
|
||||
type IPMreq struct { |
||||
Multiaddr [4]byte /* in_addr */ |
||||
Interface [4]byte /* in_addr */ |
||||
} |
||||
|
||||
type IPMreqn struct { |
||||
Multiaddr [4]byte /* in_addr */ |
||||
Address [4]byte /* in_addr */ |
||||
Ifindex int32 |
||||
} |
||||
|
||||
type IPv6Mreq struct { |
||||
Multiaddr [16]byte /* in6_addr */ |
||||
Interface uint32 |
||||
} |
||||
|
||||
type Msghdr struct { |
||||
Name *byte |
||||
Namelen uint32 |
||||
Pad_cgo_0 [4]byte |
||||
Iov *Iovec |
||||
Iovlen uint64 |
||||
Control *byte |
||||
Controllen uint64 |
||||
Flags int32 |
||||
Pad_cgo_1 [4]byte |
||||
} |
||||
|
||||
type Cmsghdr struct { |
||||
Len uint64 |
||||
Level int32 |
||||
Type int32 |
||||
} |
||||
|
||||
type Inet4Pktinfo struct { |
||||
Ifindex int32 |
||||
Spec_dst [4]byte /* in_addr */ |
||||
Addr [4]byte /* in_addr */ |
||||
} |
||||
|
||||
type Inet6Pktinfo struct { |
||||
Addr [16]byte /* in6_addr */ |
||||
Ifindex uint32 |
||||
} |
||||
|
||||
type IPv6MTUInfo struct { |
||||
Addr RawSockaddrInet6 |
||||
Mtu uint32 |
||||
} |
||||
|
||||
type ICMPv6Filter struct { |
||||
Data [8]uint32 |
||||
} |
||||
|
||||
type Ucred struct { |
||||
Pid int32 |
||||
Uid uint32 |
||||
Gid uint32 |
||||
} |
||||
|
||||
type TCPInfo struct { |
||||
State uint8 |
||||
Ca_state uint8 |
||||
Retransmits uint8 |
||||
Probes uint8 |
||||
Backoff uint8 |
||||
Options uint8 |
||||
Pad_cgo_0 [2]byte |
||||
Rto uint32 |
||||
Ato uint32 |
||||
Snd_mss uint32 |
||||
Rcv_mss uint32 |
||||
Unacked uint32 |
||||
Sacked uint32 |
||||
Lost uint32 |
||||
Retrans uint32 |
||||
Fackets uint32 |
||||
Last_data_sent uint32 |
||||
Last_ack_sent uint32 |
||||
Last_data_recv uint32 |
||||
Last_ack_recv uint32 |
||||
Pmtu uint32 |
||||
Rcv_ssthresh uint32 |
||||
Rtt uint32 |
||||
Rttvar uint32 |
||||
Snd_ssthresh uint32 |
||||
Snd_cwnd uint32 |
||||
Advmss uint32 |
||||
Reordering uint32 |
||||
Rcv_rtt uint32 |
||||
Rcv_space uint32 |
||||
Total_retrans uint32 |
||||
} |
||||
|
||||
const ( |
||||
SizeofSockaddrInet4 = 0x10 |
||||
SizeofSockaddrInet6 = 0x1c |
||||
SizeofSockaddrAny = 0x70 |
||||
SizeofSockaddrUnix = 0x6e |
||||
SizeofSockaddrLinklayer = 0x14 |
||||
SizeofSockaddrNetlink = 0xc |
||||
SizeofSockaddrHCI = 0x6 |
||||
SizeofLinger = 0x8 |
||||
SizeofIPMreq = 0x8 |
||||
SizeofIPMreqn = 0xc |
||||
SizeofIPv6Mreq = 0x14 |
||||
SizeofMsghdr = 0x38 |
||||
SizeofCmsghdr = 0x10 |
||||
SizeofInet4Pktinfo = 0xc |
||||
SizeofInet6Pktinfo = 0x14 |
||||
SizeofIPv6MTUInfo = 0x20 |
||||
SizeofICMPv6Filter = 0x20 |
||||
SizeofUcred = 0xc |
||||
SizeofTCPInfo = 0x68 |
||||
) |
||||
|
||||
const ( |
||||
IFA_UNSPEC = 0x0 |
||||
IFA_ADDRESS = 0x1 |
||||
IFA_LOCAL = 0x2 |
||||
IFA_LABEL = 0x3 |
||||
IFA_BROADCAST = 0x4 |
||||
IFA_ANYCAST = 0x5 |
||||
IFA_CACHEINFO = 0x6 |
||||
IFA_MULTICAST = 0x7 |
||||
IFLA_UNSPEC = 0x0 |
||||
IFLA_ADDRESS = 0x1 |
||||
IFLA_BROADCAST = 0x2 |
||||
IFLA_IFNAME = 0x3 |
||||
IFLA_MTU = 0x4 |
||||
IFLA_LINK = 0x5 |
||||
IFLA_QDISC = 0x6 |
||||
IFLA_STATS = 0x7 |
||||
IFLA_COST = 0x8 |
||||
IFLA_PRIORITY = 0x9 |
||||
IFLA_MASTER = 0xa |
||||
IFLA_WIRELESS = 0xb |
||||
IFLA_PROTINFO = 0xc |
||||
IFLA_TXQLEN = 0xd |
||||
IFLA_MAP = 0xe |
||||
IFLA_WEIGHT = 0xf |
||||
IFLA_OPERSTATE = 0x10 |
||||
IFLA_LINKMODE = 0x11 |
||||
IFLA_LINKINFO = 0x12 |
||||
IFLA_NET_NS_PID = 0x13 |
||||
IFLA_IFALIAS = 0x14 |
||||
IFLA_MAX = 0x27 |
||||
RT_SCOPE_UNIVERSE = 0x0 |
||||
RT_SCOPE_SITE = 0xc8 |
||||
RT_SCOPE_LINK = 0xfd |
||||
RT_SCOPE_HOST = 0xfe |
||||
RT_SCOPE_NOWHERE = 0xff |
||||
RT_TABLE_UNSPEC = 0x0 |
||||
RT_TABLE_COMPAT = 0xfc |
||||
RT_TABLE_DEFAULT = 0xfd |
||||
RT_TABLE_MAIN = 0xfe |
||||
RT_TABLE_LOCAL = 0xff |
||||
RT_TABLE_MAX = 0xffffffff |
||||
RTA_UNSPEC = 0x0 |
||||
RTA_DST = 0x1 |
||||
RTA_SRC = 0x2 |
||||
RTA_IIF = 0x3 |
||||
RTA_OIF = 0x4 |
||||
RTA_GATEWAY = 0x5 |
||||
RTA_PRIORITY = 0x6 |
||||
RTA_PREFSRC = 0x7 |
||||
RTA_METRICS = 0x8 |
||||
RTA_MULTIPATH = 0x9 |
||||
RTA_FLOW = 0xb |
||||
RTA_CACHEINFO = 0xc |
||||
RTA_TABLE = 0xf |
||||
RTN_UNSPEC = 0x0 |
||||
RTN_UNICAST = 0x1 |
||||
RTN_LOCAL = 0x2 |
||||
RTN_BROADCAST = 0x3 |
||||
RTN_ANYCAST = 0x4 |
||||
RTN_MULTICAST = 0x5 |
||||
RTN_BLACKHOLE = 0x6 |
||||
RTN_UNREACHABLE = 0x7 |
||||
RTN_PROHIBIT = 0x8 |
||||
RTN_THROW = 0x9 |
||||
RTN_NAT = 0xa |
||||
RTN_XRESOLVE = 0xb |
||||
RTNLGRP_NONE = 0x0 |
||||
RTNLGRP_LINK = 0x1 |
||||
RTNLGRP_NOTIFY = 0x2 |
||||
RTNLGRP_NEIGH = 0x3 |
||||
RTNLGRP_TC = 0x4 |
||||
RTNLGRP_IPV4_IFADDR = 0x5 |
||||
RTNLGRP_IPV4_MROUTE = 0x6 |
||||
RTNLGRP_IPV4_ROUTE = 0x7 |
||||
RTNLGRP_IPV4_RULE = 0x8 |
||||
RTNLGRP_IPV6_IFADDR = 0x9 |
||||
RTNLGRP_IPV6_MROUTE = 0xa |
||||
RTNLGRP_IPV6_ROUTE = 0xb |
||||
RTNLGRP_IPV6_IFINFO = 0xc |
||||
RTNLGRP_IPV6_PREFIX = 0x12 |
||||
RTNLGRP_IPV6_RULE = 0x13 |
||||
RTNLGRP_ND_USEROPT = 0x14 |
||||
SizeofNlMsghdr = 0x10 |
||||
SizeofNlMsgerr = 0x14 |
||||
SizeofRtGenmsg = 0x1 |
||||
SizeofNlAttr = 0x4 |
||||
SizeofRtAttr = 0x4 |
||||
SizeofIfInfomsg = 0x10 |
||||
SizeofIfAddrmsg = 0x8 |
||||
SizeofRtMsg = 0xc |
||||
SizeofRtNexthop = 0x8 |
||||
) |
||||
|
||||
type NlMsghdr struct { |
||||
Len uint32 |
||||
Type uint16 |
||||
Flags uint16 |
||||
Seq uint32 |
||||
Pid uint32 |
||||
} |
||||
|
||||
type NlMsgerr struct { |
||||
Error int32 |
||||
Msg NlMsghdr |
||||
} |
||||
|
||||
type RtGenmsg struct { |
||||
Family uint8 |
||||
} |
||||
|
||||
type NlAttr struct { |
||||
Len uint16 |
||||
Type uint16 |
||||
} |
||||
|
||||
type RtAttr struct { |
||||
Len uint16 |
||||
Type uint16 |
||||
} |
||||
|
||||
type IfInfomsg struct { |
||||
Family uint8 |
||||
X__ifi_pad uint8 |
||||
Type uint16 |
||||
Index int32 |
||||
Flags uint32 |
||||
Change uint32 |
||||
} |
||||
|
||||
type IfAddrmsg struct { |
||||
Family uint8 |
||||
Prefixlen uint8 |
||||
Flags uint8 |
||||
Scope uint8 |
||||
Index uint32 |
||||
} |
||||
|
||||
type RtMsg struct { |
||||
Family uint8 |
||||
Dst_len uint8 |
||||
Src_len uint8 |
||||
Tos uint8 |
||||
Table uint8 |
||||
Protocol uint8 |
||||
Scope uint8 |
||||
Type uint8 |
||||
Flags uint32 |
||||
} |
||||
|
||||
type RtNexthop struct { |
||||
Len uint16 |
||||
Flags uint8 |
||||
Hops uint8 |
||||
Ifindex int32 |
||||
} |
||||
|
||||
const ( |
||||
SizeofSockFilter = 0x8 |
||||
SizeofSockFprog = 0x10 |
||||
) |
||||
|
||||
type SockFilter struct { |
||||
Code uint16 |
||||
Jt uint8 |
||||
Jf uint8 |
||||
K uint32 |
||||
} |
||||
|
||||
type SockFprog struct { |
||||
Len uint16 |
||||
Pad_cgo_0 [6]byte |
||||
Filter *SockFilter |
||||
} |
||||
|
||||
type InotifyEvent struct { |
||||
Wd int32 |
||||
Mask uint32 |
||||
Cookie uint32 |
||||
Len uint32 |
||||
} |
||||
|
||||
const SizeofInotifyEvent = 0x10 |
||||
|
||||
type PtraceRegs struct { |
||||
Regs [102]uint64 |
||||
U_tsize uint64 |
||||
U_dsize uint64 |
||||
U_ssize uint64 |
||||
Start_code uint64 |
||||
Start_data uint64 |
||||
Start_stack uint64 |
||||
Signal int64 |
||||
U_ar0 uint64 |
||||
Magic uint64 |
||||
U_comm [32]int8 |
||||
} |
||||
|
||||
type FdSet struct { |
||||
Bits [16]int64 |
||||
} |
||||
|
||||
type Sysinfo_t struct { |
||||
Uptime int64 |
||||
Loads [3]uint64 |
||||
Totalram uint64 |
||||
Freeram uint64 |
||||
Sharedram uint64 |
||||
Bufferram uint64 |
||||
Totalswap uint64 |
||||
Freeswap uint64 |
||||
Procs uint16 |
||||
Pad uint16 |
||||
Pad_cgo_0 [4]byte |
||||
Totalhigh uint64 |
||||
Freehigh uint64 |
||||
Unit uint32 |
||||
X_f [0]int8 |
||||
Pad_cgo_1 [4]byte |
||||
} |
||||
|
||||
type Utsname struct { |
||||
Sysname [65]int8 |
||||
Nodename [65]int8 |
||||
Release [65]int8 |
||||
Version [65]int8 |
||||
Machine [65]int8 |
||||
Domainname [65]int8 |
||||
} |
||||
|
||||
type Ustat_t struct { |
||||
Tfree int32 |
||||
Pad_cgo_0 [4]byte |
||||
Tinode uint64 |
||||
Fname [6]int8 |
||||
Fpack [6]int8 |
||||
Pad_cgo_1 [4]byte |
||||
} |
||||
|
||||
type EpollEvent struct { |
||||
Events uint32 |
||||
Fd int32 |
||||
Pad int32 |
||||
} |
||||
|
||||
const ( |
||||
AT_FDCWD = -0x64 |
||||
AT_REMOVEDIR = 0x200 |
||||
AT_SYMLINK_FOLLOW = 0x400 |
||||
AT_SYMLINK_NOFOLLOW = 0x100 |
||||
) |
||||
|
||||
type PollFd struct { |
||||
Fd int32 |
||||
Events int16 |
||||
Revents int16 |
||||
} |
||||
|
||||
const ( |
||||
POLLIN = 0x1 |
||||
POLLPRI = 0x2 |
||||
POLLOUT = 0x4 |
||||
POLLRDHUP = 0x2000 |
||||
POLLERR = 0x8 |
||||
POLLHUP = 0x10 |
||||
POLLNVAL = 0x20 |
||||
) |
||||
|
||||
type Sigset_t struct { |
||||
X__val [16]uint64 |
||||
} |
||||
|
||||
type Termios struct { |
||||
Iflag uint32 |
||||
Oflag uint32 |
||||
Cflag uint32 |
||||
Lflag uint32 |
||||
Line uint8 |
||||
Cc [32]uint8 |
||||
Pad_cgo_0 [3]byte |
||||
} |
@ -0,0 +1,627 @@ |
||||
// +build mips64le,linux
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs types_linux.go
|
||||
|
||||
package unix |
||||
|
||||
const ( |
||||
sizeofPtr = 0x8 |
||||
sizeofShort = 0x2 |
||||
sizeofInt = 0x4 |
||||
sizeofLong = 0x8 |
||||
sizeofLongLong = 0x8 |
||||
PathMax = 0x1000 |
||||
) |
||||
|
||||
type ( |
||||
_C_short int16 |
||||
_C_int int32 |
||||
_C_long int64 |
||||
_C_long_long int64 |
||||
) |
||||
|
||||
type Timespec struct { |
||||
Sec int64 |
||||
Nsec int64 |
||||
} |
||||
|
||||
type Timeval struct { |
||||
Sec int64 |
||||
Usec int64 |
||||
} |
||||
|
||||
type Timex struct { |
||||
Modes uint32 |
||||
Pad_cgo_0 [4]byte |
||||
Offset int64 |
||||
Freq int64 |
||||
Maxerror int64 |
||||
Esterror int64 |
||||
Status int32 |
||||
Pad_cgo_1 [4]byte |
||||
Constant int64 |
||||
Precision int64 |
||||
Tolerance int64 |
||||
Time Timeval |
||||
Tick int64 |
||||
Ppsfreq int64 |
||||
Jitter int64 |
||||
Shift int32 |
||||
Pad_cgo_2 [4]byte |
||||
Stabil int64 |
||||
Jitcnt int64 |
||||
Calcnt int64 |
||||
Errcnt int64 |
||||
Stbcnt int64 |
||||
Tai int32 |
||||
Pad_cgo_3 [44]byte |
||||
} |
||||
|
||||
type Time_t int64 |
||||
|
||||
type Tms struct { |
||||
Utime int64 |
||||
Stime int64 |
||||
Cutime int64 |
||||
Cstime int64 |
||||
} |
||||
|
||||
type Utimbuf struct { |
||||
Actime int64 |
||||
Modtime int64 |
||||
} |
||||
|
||||
type Rusage struct { |
||||
Utime Timeval |
||||
Stime Timeval |
||||
Maxrss int64 |
||||
Ixrss int64 |
||||
Idrss int64 |
||||
Isrss int64 |
||||
Minflt int64 |
||||
Majflt int64 |
||||
Nswap int64 |
||||
Inblock int64 |
||||
Oublock int64 |
||||
Msgsnd int64 |
||||
Msgrcv int64 |
||||
Nsignals int64 |
||||
Nvcsw int64 |
||||
Nivcsw int64 |
||||
} |
||||
|
||||
type Rlimit struct { |
||||
Cur uint64 |
||||
Max uint64 |
||||
} |
||||
|
||||
type _Gid_t uint32 |
||||
|
||||
type Stat_t struct { |
||||
Dev uint32 |
||||
Pad1 [3]int32 |
||||
Ino uint64 |
||||
Mode uint32 |
||||
Nlink uint32 |
||||
Uid uint32 |
||||
Gid uint32 |
||||
Rdev uint32 |
||||
Pad2 [3]uint32 |
||||
Size int64 |
||||
Atim Timespec |
||||
Mtim Timespec |
||||
Ctim Timespec |
||||
Blksize uint32 |
||||
Pad4 uint32 |
||||
Blocks int64 |
||||
} |
||||
|
||||
type Statfs_t struct { |
||||
Type int64 |
||||
Bsize int64 |
||||
Frsize int64 |
||||
Blocks uint64 |
||||
Bfree uint64 |
||||
Files uint64 |
||||
Ffree uint64 |
||||
Bavail uint64 |
||||
Fsid Fsid |
||||
Namelen int64 |
||||
Flags int64 |
||||
Spare [5]int64 |
||||
} |
||||
|
||||
type Dirent struct { |
||||
Ino uint64 |
||||
Off int64 |
||||
Reclen uint16 |
||||
Type uint8 |
||||
Name [256]int8 |
||||
Pad_cgo_0 [5]byte |
||||
} |
||||
|
||||
type Fsid struct { |
||||
X__val [2]int32 |
||||
} |
||||
|
||||
type Flock_t struct { |
||||
Type int16 |
||||
Whence int16 |
||||
Pad_cgo_0 [4]byte |
||||
Start int64 |
||||
Len int64 |
||||
Pid int32 |
||||
Pad_cgo_1 [4]byte |
||||
} |
||||
|
||||
const ( |
||||
FADV_NORMAL = 0x0 |
||||
FADV_RANDOM = 0x1 |
||||
FADV_SEQUENTIAL = 0x2 |
||||
FADV_WILLNEED = 0x3 |
||||
FADV_DONTNEED = 0x4 |
||||
FADV_NOREUSE = 0x5 |
||||
) |
||||
|
||||
type RawSockaddrInet4 struct { |
||||
Family uint16 |
||||
Port uint16 |
||||
Addr [4]byte /* in_addr */ |
||||
Zero [8]uint8 |
||||
} |
||||
|
||||
type RawSockaddrInet6 struct { |
||||
Family uint16 |
||||
Port uint16 |
||||
Flowinfo uint32 |
||||
Addr [16]byte /* in6_addr */ |
||||
Scope_id uint32 |
||||
} |
||||
|
||||
type RawSockaddrUnix struct { |
||||
Family uint16 |
||||
Path [108]int8 |
||||
} |
||||
|
||||
type RawSockaddrLinklayer struct { |
||||
Family uint16 |
||||
Protocol uint16 |
||||
Ifindex int32 |
||||
Hatype uint16 |
||||
Pkttype uint8 |
||||
Halen uint8 |
||||
Addr [8]uint8 |
||||
} |
||||
|
||||
type RawSockaddrNetlink struct { |
||||
Family uint16 |
||||
Pad uint16 |
||||
Pid uint32 |
||||
Groups uint32 |
||||
} |
||||
|
||||
type RawSockaddrHCI struct { |
||||
Family uint16 |
||||
Dev uint16 |
||||
Channel uint16 |
||||
} |
||||
|
||||
type RawSockaddr struct { |
||||
Family uint16 |
||||
Data [14]int8 |
||||
} |
||||
|
||||
type RawSockaddrAny struct { |
||||
Addr RawSockaddr |
||||
Pad [96]int8 |
||||
} |
||||
|
||||
type _Socklen uint32 |
||||
|
||||
type Linger struct { |
||||
Onoff int32 |
||||
Linger int32 |
||||
} |
||||
|
||||
type Iovec struct { |
||||
Base *byte |
||||
Len uint64 |
||||
} |
||||
|
||||
type IPMreq struct { |
||||
Multiaddr [4]byte /* in_addr */ |
||||
Interface [4]byte /* in_addr */ |
||||
} |
||||
|
||||
type IPMreqn struct { |
||||
Multiaddr [4]byte /* in_addr */ |
||||
Address [4]byte /* in_addr */ |
||||
Ifindex int32 |
||||
} |
||||
|
||||
type IPv6Mreq struct { |
||||
Multiaddr [16]byte /* in6_addr */ |
||||
Interface uint32 |
||||
} |
||||
|
||||
type Msghdr struct { |
||||
Name *byte |
||||
Namelen uint32 |
||||
Pad_cgo_0 [4]byte |
||||
Iov *Iovec |
||||
Iovlen uint64 |
||||
Control *byte |
||||
Controllen uint64 |
||||
Flags int32 |
||||
Pad_cgo_1 [4]byte |
||||
} |
||||
|
||||
type Cmsghdr struct { |
||||
Len uint64 |
||||
Level int32 |
||||
Type int32 |
||||
} |
||||
|
||||
type Inet4Pktinfo struct { |
||||
Ifindex int32 |
||||
Spec_dst [4]byte /* in_addr */ |
||||
Addr [4]byte /* in_addr */ |
||||
} |
||||
|
||||
type Inet6Pktinfo struct { |
||||
Addr [16]byte /* in6_addr */ |
||||
Ifindex uint32 |
||||
} |
||||
|
||||
type IPv6MTUInfo struct { |
||||
Addr RawSockaddrInet6 |
||||
Mtu uint32 |
||||
} |
||||
|
||||
type ICMPv6Filter struct { |
||||
Data [8]uint32 |
||||
} |
||||
|
||||
type Ucred struct { |
||||
Pid int32 |
||||
Uid uint32 |
||||
Gid uint32 |
||||
} |
||||
|
||||
type TCPInfo struct { |
||||
State uint8 |
||||
Ca_state uint8 |
||||
Retransmits uint8 |
||||
Probes uint8 |
||||
Backoff uint8 |
||||
Options uint8 |
||||
Pad_cgo_0 [2]byte |
||||
Rto uint32 |
||||
Ato uint32 |
||||
Snd_mss uint32 |
||||
Rcv_mss uint32 |
||||
Unacked uint32 |
||||
Sacked uint32 |
||||
Lost uint32 |
||||
Retrans uint32 |
||||
Fackets uint32 |
||||
Last_data_sent uint32 |
||||
Last_ack_sent uint32 |
||||
Last_data_recv uint32 |
||||
Last_ack_recv uint32 |
||||
Pmtu uint32 |
||||
Rcv_ssthresh uint32 |
||||
Rtt uint32 |
||||
Rttvar uint32 |
||||
Snd_ssthresh uint32 |
||||
Snd_cwnd uint32 |
||||
Advmss uint32 |
||||
Reordering uint32 |
||||
Rcv_rtt uint32 |
||||
Rcv_space uint32 |
||||
Total_retrans uint32 |
||||
} |
||||
|
||||
const ( |
||||
SizeofSockaddrInet4 = 0x10 |
||||
SizeofSockaddrInet6 = 0x1c |
||||
SizeofSockaddrAny = 0x70 |
||||
SizeofSockaddrUnix = 0x6e |
||||
SizeofSockaddrLinklayer = 0x14 |
||||
SizeofSockaddrNetlink = 0xc |
||||
SizeofSockaddrHCI = 0x6 |
||||
SizeofLinger = 0x8 |
||||
SizeofIPMreq = 0x8 |
||||
SizeofIPMreqn = 0xc |
||||
SizeofIPv6Mreq = 0x14 |
||||
SizeofMsghdr = 0x38 |
||||
SizeofCmsghdr = 0x10 |
||||
SizeofInet4Pktinfo = 0xc |
||||
SizeofInet6Pktinfo = 0x14 |
||||
SizeofIPv6MTUInfo = 0x20 |
||||
SizeofICMPv6Filter = 0x20 |
||||
SizeofUcred = 0xc |
||||
SizeofTCPInfo = 0x68 |
||||
) |
||||
|
||||
const ( |
||||
IFA_UNSPEC = 0x0 |
||||
IFA_ADDRESS = 0x1 |
||||
IFA_LOCAL = 0x2 |
||||
IFA_LABEL = 0x3 |
||||
IFA_BROADCAST = 0x4 |
||||
IFA_ANYCAST = 0x5 |
||||
IFA_CACHEINFO = 0x6 |
||||
IFA_MULTICAST = 0x7 |
||||
IFLA_UNSPEC = 0x0 |
||||
IFLA_ADDRESS = 0x1 |
||||
IFLA_BROADCAST = 0x2 |
||||
IFLA_IFNAME = 0x3 |
||||
IFLA_MTU = 0x4 |
||||
IFLA_LINK = 0x5 |
||||
IFLA_QDISC = 0x6 |
||||
IFLA_STATS = 0x7 |
||||
IFLA_COST = 0x8 |
||||
IFLA_PRIORITY = 0x9 |
||||
IFLA_MASTER = 0xa |
||||
IFLA_WIRELESS = 0xb |
||||
IFLA_PROTINFO = 0xc |
||||
IFLA_TXQLEN = 0xd |
||||
IFLA_MAP = 0xe |
||||
IFLA_WEIGHT = 0xf |
||||
IFLA_OPERSTATE = 0x10 |
||||
IFLA_LINKMODE = 0x11 |
||||
IFLA_LINKINFO = 0x12 |
||||
IFLA_NET_NS_PID = 0x13 |
||||
IFLA_IFALIAS = 0x14 |
||||
IFLA_MAX = 0x27 |
||||
RT_SCOPE_UNIVERSE = 0x0 |
||||
RT_SCOPE_SITE = 0xc8 |
||||
RT_SCOPE_LINK = 0xfd |
||||
RT_SCOPE_HOST = 0xfe |
||||
RT_SCOPE_NOWHERE = 0xff |
||||
RT_TABLE_UNSPEC = 0x0 |
||||
RT_TABLE_COMPAT = 0xfc |
||||
RT_TABLE_DEFAULT = 0xfd |
||||
RT_TABLE_MAIN = 0xfe |
||||
RT_TABLE_LOCAL = 0xff |
||||
RT_TABLE_MAX = 0xffffffff |
||||
RTA_UNSPEC = 0x0 |
||||
RTA_DST = 0x1 |
||||
RTA_SRC = 0x2 |
||||
RTA_IIF = 0x3 |
||||
RTA_OIF = 0x4 |
||||
RTA_GATEWAY = 0x5 |
||||
RTA_PRIORITY = 0x6 |
||||
RTA_PREFSRC = 0x7 |
||||
RTA_METRICS = 0x8 |
||||
RTA_MULTIPATH = 0x9 |
||||
RTA_FLOW = 0xb |
||||
RTA_CACHEINFO = 0xc |
||||
RTA_TABLE = 0xf |
||||
RTN_UNSPEC = 0x0 |
||||
RTN_UNICAST = 0x1 |
||||
RTN_LOCAL = 0x2 |
||||
RTN_BROADCAST = 0x3 |
||||
RTN_ANYCAST = 0x4 |
||||
RTN_MULTICAST = 0x5 |
||||
RTN_BLACKHOLE = 0x6 |
||||
RTN_UNREACHABLE = 0x7 |
||||
RTN_PROHIBIT = 0x8 |
||||
RTN_THROW = 0x9 |
||||
RTN_NAT = 0xa |
||||
RTN_XRESOLVE = 0xb |
||||
RTNLGRP_NONE = 0x0 |
||||
RTNLGRP_LINK = 0x1 |
||||
RTNLGRP_NOTIFY = 0x2 |
||||
RTNLGRP_NEIGH = 0x3 |
||||
RTNLGRP_TC = 0x4 |
||||
RTNLGRP_IPV4_IFADDR = 0x5 |
||||
RTNLGRP_IPV4_MROUTE = 0x6 |
||||
RTNLGRP_IPV4_ROUTE = 0x7 |
||||
RTNLGRP_IPV4_RULE = 0x8 |
||||
RTNLGRP_IPV6_IFADDR = 0x9 |
||||
RTNLGRP_IPV6_MROUTE = 0xa |
||||
RTNLGRP_IPV6_ROUTE = 0xb |
||||
RTNLGRP_IPV6_IFINFO = 0xc |
||||
RTNLGRP_IPV6_PREFIX = 0x12 |
||||
RTNLGRP_IPV6_RULE = 0x13 |
||||
RTNLGRP_ND_USEROPT = 0x14 |
||||
SizeofNlMsghdr = 0x10 |
||||
SizeofNlMsgerr = 0x14 |
||||
SizeofRtGenmsg = 0x1 |
||||
SizeofNlAttr = 0x4 |
||||
SizeofRtAttr = 0x4 |
||||
SizeofIfInfomsg = 0x10 |
||||
SizeofIfAddrmsg = 0x8 |
||||
SizeofRtMsg = 0xc |
||||
SizeofRtNexthop = 0x8 |
||||
) |
||||
|
||||
type NlMsghdr struct { |
||||
Len uint32 |
||||
Type uint16 |
||||
Flags uint16 |
||||
Seq uint32 |
||||
Pid uint32 |
||||
} |
||||
|
||||
type NlMsgerr struct { |
||||
Error int32 |
||||
Msg NlMsghdr |
||||
} |
||||
|
||||
type RtGenmsg struct { |
||||
Family uint8 |
||||
} |
||||
|
||||
type NlAttr struct { |
||||
Len uint16 |
||||
Type uint16 |
||||
} |
||||
|
||||
type RtAttr struct { |
||||
Len uint16 |
||||
Type uint16 |
||||
} |
||||
|
||||
type IfInfomsg struct { |
||||
Family uint8 |
||||
X__ifi_pad uint8 |
||||
Type uint16 |
||||
Index int32 |
||||
Flags uint32 |
||||
Change uint32 |
||||
} |
||||
|
||||
type IfAddrmsg struct { |
||||
Family uint8 |
||||
Prefixlen uint8 |
||||
Flags uint8 |
||||
Scope uint8 |
||||
Index uint32 |
||||
} |
||||
|
||||
type RtMsg struct { |
||||
Family uint8 |
||||
Dst_len uint8 |
||||
Src_len uint8 |
||||
Tos uint8 |
||||
Table uint8 |
||||
Protocol uint8 |
||||
Scope uint8 |
||||
Type uint8 |
||||
Flags uint32 |
||||
} |
||||
|
||||
type RtNexthop struct { |
||||
Len uint16 |
||||
Flags uint8 |
||||
Hops uint8 |
||||
Ifindex int32 |
||||
} |
||||
|
||||
const ( |
||||
SizeofSockFilter = 0x8 |
||||
SizeofSockFprog = 0x10 |
||||
) |
||||
|
||||
type SockFilter struct { |
||||
Code uint16 |
||||
Jt uint8 |
||||
Jf uint8 |
||||
K uint32 |
||||
} |
||||
|
||||
type SockFprog struct { |
||||
Len uint16 |
||||
Pad_cgo_0 [6]byte |
||||
Filter *SockFilter |
||||
} |
||||
|
||||
type InotifyEvent struct { |
||||
Wd int32 |
||||
Mask uint32 |
||||
Cookie uint32 |
||||
Len uint32 |
||||
} |
||||
|
||||
const SizeofInotifyEvent = 0x10 |
||||
|
||||
type PtraceRegs struct { |
||||
Regs [102]uint64 |
||||
U_tsize uint64 |
||||
U_dsize uint64 |
||||
U_ssize uint64 |
||||
Start_code uint64 |
||||
Start_data uint64 |
||||
Start_stack uint64 |
||||
Signal int64 |
||||
U_ar0 uint64 |
||||
Magic uint64 |
||||
U_comm [32]int8 |
||||
} |
||||
|
||||
type FdSet struct { |
||||
Bits [16]int64 |
||||
} |
||||
|
||||
type Sysinfo_t struct { |
||||
Uptime int64 |
||||
Loads [3]uint64 |
||||
Totalram uint64 |
||||
Freeram uint64 |
||||
Sharedram uint64 |
||||
Bufferram uint64 |
||||
Totalswap uint64 |
||||
Freeswap uint64 |
||||
Procs uint16 |
||||
Pad uint16 |
||||
Pad_cgo_0 [4]byte |
||||
Totalhigh uint64 |
||||
Freehigh uint64 |
||||
Unit uint32 |
||||
X_f [0]int8 |
||||
Pad_cgo_1 [4]byte |
||||
} |
||||
|
||||
type Utsname struct { |
||||
Sysname [65]int8 |
||||
Nodename [65]int8 |
||||
Release [65]int8 |
||||
Version [65]int8 |
||||
Machine [65]int8 |
||||
Domainname [65]int8 |
||||
} |
||||
|
||||
type Ustat_t struct { |
||||
Tfree int32 |
||||
Pad_cgo_0 [4]byte |
||||
Tinode uint64 |
||||
Fname [6]int8 |
||||
Fpack [6]int8 |
||||
Pad_cgo_1 [4]byte |
||||
} |
||||
|
||||
type EpollEvent struct { |
||||
Events uint32 |
||||
Fd int32 |
||||
Pad int32 |
||||
} |
||||
|
||||
const ( |
||||
AT_FDCWD = -0x64 |
||||
AT_REMOVEDIR = 0x200 |
||||
AT_SYMLINK_FOLLOW = 0x400 |
||||
AT_SYMLINK_NOFOLLOW = 0x100 |
||||
) |
||||
|
||||
type PollFd struct { |
||||
Fd int32 |
||||
Events int16 |
||||
Revents int16 |
||||
} |
||||
|
||||
const ( |
||||
POLLIN = 0x1 |
||||
POLLPRI = 0x2 |
||||
POLLOUT = 0x4 |
||||
POLLRDHUP = 0x2000 |
||||
POLLERR = 0x8 |
||||
POLLHUP = 0x10 |
||||
POLLNVAL = 0x20 |
||||
) |
||||
|
||||
type Sigset_t struct { |
||||
X__val [16]uint64 |
||||
} |
||||
|
||||
type Termios struct { |
||||
Iflag uint32 |
||||
Oflag uint32 |
||||
Cflag uint32 |
||||
Lflag uint32 |
||||
Line uint8 |
||||
Cc [32]uint8 |
||||
Pad_cgo_0 [3]byte |
||||
} |
@ -0,0 +1,649 @@ |
||||
// +build s390x,linux
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs -- -fsigned-char types_linux.go
|
||||
|
||||
package unix |
||||
|
||||
const ( |
||||
sizeofPtr = 0x8 |
||||
sizeofShort = 0x2 |
||||
sizeofInt = 0x4 |
||||
sizeofLong = 0x8 |
||||
sizeofLongLong = 0x8 |
||||
PathMax = 0x1000 |
||||
) |
||||
|
||||
type ( |
||||
_C_short int16 |
||||
_C_int int32 |
||||
_C_long int64 |
||||
_C_long_long int64 |
||||
) |
||||
|
||||
type Timespec struct { |
||||
Sec int64 |
||||
Nsec int64 |
||||
} |
||||
|
||||
type Timeval struct { |
||||
Sec int64 |
||||
Usec int64 |
||||
} |
||||
|
||||
type Timex struct { |
||||
Modes uint32 |
||||
_ [4]byte |
||||
Offset int64 |
||||
Freq int64 |
||||
Maxerror int64 |
||||
Esterror int64 |
||||
Status int32 |
||||
_ [4]byte |
||||
Constant int64 |
||||
Precision int64 |
||||
Tolerance int64 |
||||
Time Timeval |
||||
Tick int64 |
||||
Ppsfreq int64 |
||||
Jitter int64 |
||||
Shift int32 |
||||
_ [4]byte |
||||
Stabil int64 |
||||
Jitcnt int64 |
||||
Calcnt int64 |
||||
Errcnt int64 |
||||
Stbcnt int64 |
||||
Tai int32 |
||||
_ [44]byte |
||||
} |
||||
|
||||
type Time_t int64 |
||||
|
||||
type Tms struct { |
||||
Utime int64 |
||||
Stime int64 |
||||
Cutime int64 |
||||
Cstime int64 |
||||
} |
||||
|
||||
type Utimbuf struct { |
||||
Actime int64 |
||||
Modtime int64 |
||||
} |
||||
|
||||
type Rusage struct { |
||||
Utime Timeval |
||||
Stime Timeval |
||||
Maxrss int64 |
||||
Ixrss int64 |
||||
Idrss int64 |
||||
Isrss int64 |
||||
Minflt int64 |
||||
Majflt int64 |
||||
Nswap int64 |
||||
Inblock int64 |
||||
Oublock int64 |
||||
Msgsnd int64 |
||||
Msgrcv int64 |
||||
Nsignals int64 |
||||
Nvcsw int64 |
||||
Nivcsw int64 |
||||
} |
||||
|
||||
type Rlimit struct { |
||||
Cur uint64 |
||||
Max uint64 |
||||
} |
||||
|
||||
type _Gid_t uint32 |
||||
|
||||
type Stat_t struct { |
||||
Dev uint64 |
||||
Ino uint64 |
||||
Nlink uint64 |
||||
Mode uint32 |
||||
Uid uint32 |
||||
Gid uint32 |
||||
_ int32 |
||||
Rdev uint64 |
||||
Size int64 |
||||
Atim Timespec |
||||
Mtim Timespec |
||||
Ctim Timespec |
||||
Blksize int64 |
||||
Blocks int64 |
||||
_ [3]int64 |
||||
} |
||||
|
||||
type Statfs_t struct { |
||||
Type uint32 |
||||
Bsize uint32 |
||||
Blocks uint64 |
||||
Bfree uint64 |
||||
Bavail uint64 |
||||
Files uint64 |
||||
Ffree uint64 |
||||
Fsid Fsid |
||||
Namelen uint32 |
||||
Frsize uint32 |
||||
Flags uint32 |
||||
Spare [4]uint32 |
||||
_ [4]byte |
||||
} |
||||
|
||||
type Dirent struct { |
||||
Ino uint64 |
||||
Off int64 |
||||
Reclen uint16 |
||||
Type uint8 |
||||
Name [256]int8 |
||||
_ [5]byte |
||||
} |
||||
|
||||
type Fsid struct { |
||||
_ [2]int32 |
||||
} |
||||
|
||||
type Flock_t struct { |
||||
Type int16 |
||||
Whence int16 |
||||
_ [4]byte |
||||
Start int64 |
||||
Len int64 |
||||
Pid int32 |
||||
_ [4]byte |
||||
} |
||||
|
||||
const ( |
||||
FADV_NORMAL = 0x0 |
||||
FADV_RANDOM = 0x1 |
||||
FADV_SEQUENTIAL = 0x2 |
||||
FADV_WILLNEED = 0x3 |
||||
FADV_DONTNEED = 0x6 |
||||
FADV_NOREUSE = 0x7 |
||||
) |
||||
|
||||
type RawSockaddrInet4 struct { |
||||
Family uint16 |
||||
Port uint16 |
||||
Addr [4]byte /* in_addr */ |
||||
Zero [8]uint8 |
||||
} |
||||
|
||||
type RawSockaddrInet6 struct { |
||||
Family uint16 |
||||
Port uint16 |
||||
Flowinfo uint32 |
||||
Addr [16]byte /* in6_addr */ |
||||
Scope_id uint32 |
||||
} |
||||
|
||||
type RawSockaddrUnix struct { |
||||
Family uint16 |
||||
Path [108]int8 |
||||
} |
||||
|
||||
type RawSockaddrLinklayer struct { |
||||
Family uint16 |
||||
Protocol uint16 |
||||
Ifindex int32 |
||||
Hatype uint16 |
||||
Pkttype uint8 |
||||
Halen uint8 |
||||
Addr [8]uint8 |
||||
} |
||||
|
||||
type RawSockaddrNetlink struct { |
||||
Family uint16 |
||||
Pad uint16 |
||||
Pid uint32 |
||||
Groups uint32 |
||||
} |
||||
|
||||
type RawSockaddrHCI struct { |
||||
Family uint16 |
||||
Dev uint16 |
||||
Channel uint16 |
||||
} |
||||
|
||||
type RawSockaddr struct { |
||||
Family uint16 |
||||
Data [14]int8 |
||||
} |
||||
|
||||
type RawSockaddrAny struct { |
||||
Addr RawSockaddr |
||||
Pad [96]int8 |
||||
} |
||||
|
||||
type _Socklen uint32 |
||||
|
||||
type Linger struct { |
||||
Onoff int32 |
||||
Linger int32 |
||||
} |
||||
|
||||
type Iovec struct { |
||||
Base *byte |
||||
Len uint64 |
||||
} |
||||
|
||||
type IPMreq struct { |
||||
Multiaddr [4]byte /* in_addr */ |
||||
Interface [4]byte /* in_addr */ |
||||
} |
||||
|
||||
type IPMreqn struct { |
||||
Multiaddr [4]byte /* in_addr */ |
||||
Address [4]byte /* in_addr */ |
||||
Ifindex int32 |
||||
} |
||||
|
||||
type IPv6Mreq struct { |
||||
Multiaddr [16]byte /* in6_addr */ |
||||
Interface uint32 |
||||
} |
||||
|
||||
type Msghdr struct { |
||||
Name *byte |
||||
Namelen uint32 |
||||
_ [4]byte |
||||
Iov *Iovec |
||||
Iovlen uint64 |
||||
Control *byte |
||||
Controllen uint64 |
||||
Flags int32 |
||||
_ [4]byte |
||||
} |
||||
|
||||
type Cmsghdr struct { |
||||
Len uint64 |
||||
Level int32 |
||||
Type int32 |
||||
} |
||||
|
||||
type Inet4Pktinfo struct { |
||||
Ifindex int32 |
||||
Spec_dst [4]byte /* in_addr */ |
||||
Addr [4]byte /* in_addr */ |
||||
} |
||||
|
||||
type Inet6Pktinfo struct { |
||||
Addr [16]byte /* in6_addr */ |
||||
Ifindex uint32 |
||||
} |
||||
|
||||
type IPv6MTUInfo struct { |
||||
Addr RawSockaddrInet6 |
||||
Mtu uint32 |
||||
} |
||||
|
||||
type ICMPv6Filter struct { |
||||
Data [8]uint32 |
||||
} |
||||
|
||||
type Ucred struct { |
||||
Pid int32 |
||||
Uid uint32 |
||||
Gid uint32 |
||||
} |
||||
|
||||
type TCPInfo struct { |
||||
State uint8 |
||||
Ca_state uint8 |
||||
Retransmits uint8 |
||||
Probes uint8 |
||||
Backoff uint8 |
||||
Options uint8 |
||||
_ [2]byte |
||||
Rto uint32 |
||||
Ato uint32 |
||||
Snd_mss uint32 |
||||
Rcv_mss uint32 |
||||
Unacked uint32 |
||||
Sacked uint32 |
||||
Lost uint32 |
||||
Retrans uint32 |
||||
Fackets uint32 |
||||
Last_data_sent uint32 |
||||
Last_ack_sent uint32 |
||||
Last_data_recv uint32 |
||||
Last_ack_recv uint32 |
||||
Pmtu uint32 |
||||
Rcv_ssthresh uint32 |
||||
Rtt uint32 |
||||
Rttvar uint32 |
||||
Snd_ssthresh uint32 |
||||
Snd_cwnd uint32 |
||||
Advmss uint32 |
||||
Reordering uint32 |
||||
Rcv_rtt uint32 |
||||
Rcv_space uint32 |
||||
Total_retrans uint32 |
||||
} |
||||
|
||||
const ( |
||||
SizeofSockaddrInet4 = 0x10 |
||||
SizeofSockaddrInet6 = 0x1c |
||||
SizeofSockaddrAny = 0x70 |
||||
SizeofSockaddrUnix = 0x6e |
||||
SizeofSockaddrLinklayer = 0x14 |
||||
SizeofSockaddrNetlink = 0xc |
||||
SizeofSockaddrHCI = 0x6 |
||||
SizeofLinger = 0x8 |
||||
SizeofIPMreq = 0x8 |
||||
SizeofIPMreqn = 0xc |
||||
SizeofIPv6Mreq = 0x14 |
||||
SizeofMsghdr = 0x38 |
||||
SizeofCmsghdr = 0x10 |
||||
SizeofInet4Pktinfo = 0xc |
||||
SizeofInet6Pktinfo = 0x14 |
||||
SizeofIPv6MTUInfo = 0x20 |
||||
SizeofICMPv6Filter = 0x20 |
||||
SizeofUcred = 0xc |
||||
SizeofTCPInfo = 0x68 |
||||
) |
||||
|
||||
const ( |
||||
IFA_UNSPEC = 0x0 |
||||
IFA_ADDRESS = 0x1 |
||||
IFA_LOCAL = 0x2 |
||||
IFA_LABEL = 0x3 |
||||
IFA_BROADCAST = 0x4 |
||||
IFA_ANYCAST = 0x5 |
||||
IFA_CACHEINFO = 0x6 |
||||
IFA_MULTICAST = 0x7 |
||||
IFLA_UNSPEC = 0x0 |
||||
IFLA_ADDRESS = 0x1 |
||||
IFLA_BROADCAST = 0x2 |
||||
IFLA_IFNAME = 0x3 |
||||
IFLA_MTU = 0x4 |
||||
IFLA_LINK = 0x5 |
||||
IFLA_QDISC = 0x6 |
||||
IFLA_STATS = 0x7 |
||||
IFLA_COST = 0x8 |
||||
IFLA_PRIORITY = 0x9 |
||||
IFLA_MASTER = 0xa |
||||
IFLA_WIRELESS = 0xb |
||||
IFLA_PROTINFO = 0xc |
||||
IFLA_TXQLEN = 0xd |
||||
IFLA_MAP = 0xe |
||||
IFLA_WEIGHT = 0xf |
||||
IFLA_OPERSTATE = 0x10 |
||||
IFLA_LINKMODE = 0x11 |
||||
IFLA_LINKINFO = 0x12 |
||||
IFLA_NET_NS_PID = 0x13 |
||||
IFLA_IFALIAS = 0x14 |
||||
IFLA_MAX = 0x27 |
||||
RT_SCOPE_UNIVERSE = 0x0 |
||||
RT_SCOPE_SITE = 0xc8 |
||||
RT_SCOPE_LINK = 0xfd |
||||
RT_SCOPE_HOST = 0xfe |
||||
RT_SCOPE_NOWHERE = 0xff |
||||
RT_TABLE_UNSPEC = 0x0 |
||||
RT_TABLE_COMPAT = 0xfc |
||||
RT_TABLE_DEFAULT = 0xfd |
||||
RT_TABLE_MAIN = 0xfe |
||||
RT_TABLE_LOCAL = 0xff |
||||
RT_TABLE_MAX = 0xffffffff |
||||
RTA_UNSPEC = 0x0 |
||||
RTA_DST = 0x1 |
||||
RTA_SRC = 0x2 |
||||
RTA_IIF = 0x3 |
||||
RTA_OIF = 0x4 |
||||
RTA_GATEWAY = 0x5 |
||||
RTA_PRIORITY = 0x6 |
||||
RTA_PREFSRC = 0x7 |
||||
RTA_METRICS = 0x8 |
||||
RTA_MULTIPATH = 0x9 |
||||
RTA_FLOW = 0xb |
||||
RTA_CACHEINFO = 0xc |
||||
RTA_TABLE = 0xf |
||||
RTN_UNSPEC = 0x0 |
||||
RTN_UNICAST = 0x1 |
||||
RTN_LOCAL = 0x2 |
||||
RTN_BROADCAST = 0x3 |
||||
RTN_ANYCAST = 0x4 |
||||
RTN_MULTICAST = 0x5 |
||||
RTN_BLACKHOLE = 0x6 |
||||
RTN_UNREACHABLE = 0x7 |
||||
RTN_PROHIBIT = 0x8 |
||||
RTN_THROW = 0x9 |
||||
RTN_NAT = 0xa |
||||
RTN_XRESOLVE = 0xb |
||||
RTNLGRP_NONE = 0x0 |
||||
RTNLGRP_LINK = 0x1 |
||||
RTNLGRP_NOTIFY = 0x2 |
||||
RTNLGRP_NEIGH = 0x3 |
||||
RTNLGRP_TC = 0x4 |
||||
RTNLGRP_IPV4_IFADDR = 0x5 |
||||
RTNLGRP_IPV4_MROUTE = 0x6 |
||||
RTNLGRP_IPV4_ROUTE = 0x7 |
||||
RTNLGRP_IPV4_RULE = 0x8 |
||||
RTNLGRP_IPV6_IFADDR = 0x9 |
||||
RTNLGRP_IPV6_MROUTE = 0xa |
||||
RTNLGRP_IPV6_ROUTE = 0xb |
||||
RTNLGRP_IPV6_IFINFO = 0xc |
||||
RTNLGRP_IPV6_PREFIX = 0x12 |
||||
RTNLGRP_IPV6_RULE = 0x13 |
||||
RTNLGRP_ND_USEROPT = 0x14 |
||||
SizeofNlMsghdr = 0x10 |
||||
SizeofNlMsgerr = 0x14 |
||||
SizeofRtGenmsg = 0x1 |
||||
SizeofNlAttr = 0x4 |
||||
SizeofRtAttr = 0x4 |
||||
SizeofIfInfomsg = 0x10 |
||||
SizeofIfAddrmsg = 0x8 |
||||
SizeofRtMsg = 0xc |
||||
SizeofRtNexthop = 0x8 |
||||
) |
||||
|
||||
type NlMsghdr struct { |
||||
Len uint32 |
||||
Type uint16 |
||||
Flags uint16 |
||||
Seq uint32 |
||||
Pid uint32 |
||||
} |
||||
|
||||
type NlMsgerr struct { |
||||
Error int32 |
||||
Msg NlMsghdr |
||||
} |
||||
|
||||
type RtGenmsg struct { |
||||
Family uint8 |
||||
} |
||||
|
||||
type NlAttr struct { |
||||
Len uint16 |
||||
Type uint16 |
||||
} |
||||
|
||||
type RtAttr struct { |
||||
Len uint16 |
||||
Type uint16 |
||||
} |
||||
|
||||
type IfInfomsg struct { |
||||
Family uint8 |
||||
_ uint8 |
||||
Type uint16 |
||||
Index int32 |
||||
Flags uint32 |
||||
Change uint32 |
||||
} |
||||
|
||||
type IfAddrmsg struct { |
||||
Family uint8 |
||||
Prefixlen uint8 |
||||
Flags uint8 |
||||
Scope uint8 |
||||
Index uint32 |
||||
} |
||||
|
||||
type RtMsg struct { |
||||
Family uint8 |
||||
Dst_len uint8 |
||||
Src_len uint8 |
||||
Tos uint8 |
||||
Table uint8 |
||||
Protocol uint8 |
||||
Scope uint8 |
||||
Type uint8 |
||||
Flags uint32 |
||||
} |
||||
|
||||
type RtNexthop struct { |
||||
Len uint16 |
||||
Flags uint8 |
||||
Hops uint8 |
||||
Ifindex int32 |
||||
} |
||||
|
||||
const ( |
||||
SizeofSockFilter = 0x8 |
||||
SizeofSockFprog = 0x10 |
||||
) |
||||
|
||||
type SockFilter struct { |
||||
Code uint16 |
||||
Jt uint8 |
||||
Jf uint8 |
||||
K uint32 |
||||
} |
||||
|
||||
type SockFprog struct { |
||||
Len uint16 |
||||
_ [6]byte |
||||
Filter *SockFilter |
||||
} |
||||
|
||||
type InotifyEvent struct { |
||||
Wd int32 |
||||
Mask uint32 |
||||
Cookie uint32 |
||||
Len uint32 |
||||
} |
||||
|
||||
const SizeofInotifyEvent = 0x10 |
||||
|
||||
type PtraceRegs struct { |
||||
Psw PtracePsw |
||||
Gprs [16]uint64 |
||||
Acrs [16]uint32 |
||||
Orig_gpr2 uint64 |
||||
Fp_regs PtraceFpregs |
||||
Per_info PtracePer |
||||
Ieee_instruction_pointer uint64 |
||||
} |
||||
|
||||
type PtracePsw struct { |
||||
Mask uint64 |
||||
Addr uint64 |
||||
} |
||||
|
||||
type PtraceFpregs struct { |
||||
Fpc uint32 |
||||
_ [4]byte |
||||
Fprs [16]float64 |
||||
} |
||||
|
||||
type PtracePer struct { |
||||
_ [0]uint64 |
||||
_ [24]byte |
||||
_ [8]byte |
||||
Starting_addr uint64 |
||||
Ending_addr uint64 |
||||
Perc_atmid uint16 |
||||
_ [6]byte |
||||
Address uint64 |
||||
Access_id uint8 |
||||
_ [7]byte |
||||
} |
||||
|
||||
type FdSet struct { |
||||
Bits [16]int64 |
||||
} |
||||
|
||||
type Sysinfo_t struct { |
||||
Uptime int64 |
||||
Loads [3]uint64 |
||||
Totalram uint64 |
||||
Freeram uint64 |
||||
Sharedram uint64 |
||||
Bufferram uint64 |
||||
Totalswap uint64 |
||||
Freeswap uint64 |
||||
Procs uint16 |
||||
Pad uint16 |
||||
_ [4]byte |
||||
Totalhigh uint64 |
||||
Freehigh uint64 |
||||
Unit uint32 |
||||
_ [0]int8 |
||||
_ [4]byte |
||||
} |
||||
|
||||
type Utsname struct { |
||||
Sysname [65]int8 |
||||
Nodename [65]int8 |
||||
Release [65]int8 |
||||
Version [65]int8 |
||||
Machine [65]int8 |
||||
Domainname [65]int8 |
||||
} |
||||
|
||||
type Ustat_t struct { |
||||
Tfree int32 |
||||
_ [4]byte |
||||
Tinode uint64 |
||||
Fname [6]int8 |
||||
Fpack [6]int8 |
||||
_ [4]byte |
||||
} |
||||
|
||||
type EpollEvent struct { |
||||
Events uint32 |
||||
_ int32 |
||||
Fd int32 |
||||
Pad int32 |
||||
} |
||||
|
||||
const ( |
||||
AT_FDCWD = -0x64 |
||||
AT_REMOVEDIR = 0x200 |
||||
AT_SYMLINK_FOLLOW = 0x400 |
||||
AT_SYMLINK_NOFOLLOW = 0x100 |
||||
) |
||||
|
||||
type PollFd struct { |
||||
Fd int32 |
||||
Events int16 |
||||
Revents int16 |
||||
} |
||||
|
||||
const ( |
||||
POLLIN = 0x1 |
||||
POLLPRI = 0x2 |
||||
POLLOUT = 0x4 |
||||
POLLRDHUP = 0x2000 |
||||
POLLERR = 0x8 |
||||
POLLHUP = 0x10 |
||||
POLLNVAL = 0x20 |
||||
) |
||||
|
||||
type Sigset_t struct { |
||||
X__val [16]uint64 |
||||
} |
||||
|
||||
type Termios struct { |
||||
Iflag uint32 |
||||
Oflag uint32 |
||||
Cflag uint32 |
||||
Lflag uint32 |
||||
Line uint8 |
||||
Cc [19]uint8 |
||||
Ispeed uint32 |
||||
Ospeed uint32 |
||||
} |
@ -1,64 +0,0 @@ |
||||
// 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.
|
||||
|
||||
// Package ianaindex maps names to Encodings as specified by the IANA registry.
|
||||
// This includes both the MIME and IANA names.
|
||||
//
|
||||
// See http://www.iana.org/assignments/character-sets/character-sets.xhtml for
|
||||
// more details.
|
||||
package ianaindex |
||||
|
||||
import ( |
||||
"golang.org/x/text/encoding" |
||||
) |
||||
|
||||
// TODO: allow users to specify their own aliases?
|
||||
// TODO: allow users to specify their own indexes?
|
||||
// TODO: allow canonicalizing names
|
||||
|
||||
// NOTE: only use these top-level variables if we can get the linker to drop
|
||||
// the indexes when they are not used. Make them a function or perhaps only
|
||||
// support MIME otherwise.
|
||||
|
||||
var ( |
||||
// MIME is an index to map MIME names. It does not support aliases.
|
||||
MIME *Index |
||||
|
||||
// IANA is an index that supports all names and aliases using IANA names as
|
||||
// the canonical identifier.
|
||||
IANA *Index |
||||
) |
||||
|
||||
// Index maps names registered by IANA to Encodings.
|
||||
type Index struct { |
||||
} |
||||
|
||||
// Get returns an Encoding for IANA-registered names. Matching is
|
||||
// case-insensitive.
|
||||
func (x *Index) Get(name string) (encoding.Encoding, error) { |
||||
panic("TODO: implement") |
||||
} |
||||
|
||||
// Name reports the canonical name of the given Encoding. It will return an
|
||||
// error if the e is not associated with a known encoding scheme.
|
||||
func (x *Index) Name(e encoding.Encoding) (string, error) { |
||||
panic("TODO: implement") |
||||
} |
||||
|
||||
// TODO: the coverage of this index is rather spotty. Allowing users to set
|
||||
// encodings would allow:
|
||||
// - users to increase coverage
|
||||
// - allow a partially loaded set of encodings in case the user doesn't need to
|
||||
// them all.
|
||||
// - write an OS-specific wrapper for supported encodings and set them.
|
||||
// The exact definition of Set depends a bit on if and how we want to let users
|
||||
// write their own Encoding implementations. Also, it is not possible yet to
|
||||
// only partially load the encodings without doing some refactoring. Until this
|
||||
// is solved, we might as well not support Set.
|
||||
// // Set sets the e to be used for the encoding scheme identified by name. Only
|
||||
// // canonical names may be used. An empty name assigns e to its internally
|
||||
// // associated encoding scheme.
|
||||
// func (x *Index) Set(name string, e encoding.Encoding) error {
|
||||
// panic("TODO: implement")
|
||||
// }
|
@ -1,92 +0,0 @@ |
||||
// 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.
|
||||
|
||||
package display |
||||
|
||||
// This file contains sets of data for specific languages. Users can use these
|
||||
// to create smaller collections of supported languages and reduce total table
|
||||
// size.
|
||||
|
||||
// The variable names defined here correspond to those in package language.
|
||||
|
||||
var ( |
||||
Afrikaans *Dictionary = &af // af
|
||||
Amharic *Dictionary = &am // am
|
||||
Arabic *Dictionary = &ar // ar
|
||||
ModernStandardArabic *Dictionary = Arabic // ar-001
|
||||
Azerbaijani *Dictionary = &az // az
|
||||
Bulgarian *Dictionary = &bg // bg
|
||||
Bengali *Dictionary = &bn // bn
|
||||
Catalan *Dictionary = &ca // ca
|
||||
Czech *Dictionary = &cs // cs
|
||||
Danish *Dictionary = &da // da
|
||||
German *Dictionary = &de // de
|
||||
Greek *Dictionary = &el // el
|
||||
English *Dictionary = &en // en
|
||||
AmericanEnglish *Dictionary = English // en-US
|
||||
BritishEnglish *Dictionary = English // en-GB
|
||||
Spanish *Dictionary = &es // es
|
||||
EuropeanSpanish *Dictionary = Spanish // es-ES
|
||||
LatinAmericanSpanish *Dictionary = Spanish // es-419
|
||||
Estonian *Dictionary = &et // et
|
||||
Persian *Dictionary = &fa // fa
|
||||
Finnish *Dictionary = &fi // fi
|
||||
Filipino *Dictionary = &fil // fil
|
||||
French *Dictionary = &fr // fr
|
||||
Gujarati *Dictionary = &gu // gu
|
||||
Hebrew *Dictionary = &he // he
|
||||
Hindi *Dictionary = &hi // hi
|
||||
Croatian *Dictionary = &hr // hr
|
||||
Hungarian *Dictionary = &hu // hu
|
||||
Armenian *Dictionary = &hy // hy
|
||||
Indonesian *Dictionary = &id // id
|
||||
Icelandic *Dictionary = &is // is
|
||||
Italian *Dictionary = &it // it
|
||||
Japanese *Dictionary = &ja // ja
|
||||
Georgian *Dictionary = &ka // ka
|
||||
Kazakh *Dictionary = &kk // kk
|
||||
Khmer *Dictionary = &km // km
|
||||
Kannada *Dictionary = &kn // kn
|
||||
Korean *Dictionary = &ko // ko
|
||||
Kirghiz *Dictionary = &ky // ky
|
||||
Lao *Dictionary = &lo // lo
|
||||
Lithuanian *Dictionary = < // lt
|
||||
Latvian *Dictionary = &lv // lv
|
||||
Macedonian *Dictionary = &mk // mk
|
||||
Malayalam *Dictionary = &ml // ml
|
||||
Mongolian *Dictionary = &mn // mn
|
||||
Marathi *Dictionary = &mr // mr
|
||||
Malay *Dictionary = &ms // ms
|
||||
Burmese *Dictionary = &my // my
|
||||
Nepali *Dictionary = &ne // ne
|
||||
Dutch *Dictionary = &nl // nl
|
||||
Norwegian *Dictionary = &no // no
|
||||
Punjabi *Dictionary = &pa // pa
|
||||
Polish *Dictionary = &pl // pl
|
||||
Portuguese *Dictionary = &pt // pt
|
||||
BrazilianPortuguese *Dictionary = Portuguese // pt-BR
|
||||
EuropeanPortuguese *Dictionary = &ptPT // pt-PT
|
||||
Romanian *Dictionary = &ro // ro
|
||||
Russian *Dictionary = &ru // ru
|
||||
Sinhala *Dictionary = &si // si
|
||||
Slovak *Dictionary = &sk // sk
|
||||
Slovenian *Dictionary = &sl // sl
|
||||
Albanian *Dictionary = &sq // sq
|
||||
Serbian *Dictionary = &sr // sr
|
||||
SerbianLatin *Dictionary = &srLatn // sr
|
||||
Swedish *Dictionary = &sv // sv
|
||||
Swahili *Dictionary = &sw // sw
|
||||
Tamil *Dictionary = &ta // ta
|
||||
Telugu *Dictionary = &te // te
|
||||
Thai *Dictionary = &th // th
|
||||
Turkish *Dictionary = &tr // tr
|
||||
Ukrainian *Dictionary = &uk // uk
|
||||
Urdu *Dictionary = &ur // ur
|
||||
Uzbek *Dictionary = &uz // uz
|
||||
Vietnamese *Dictionary = &vi // vi
|
||||
Chinese *Dictionary = &zh // zh
|
||||
SimplifiedChinese *Dictionary = Chinese // zh-Hans
|
||||
TraditionalChinese *Dictionary = &zhHant // zh-Hant
|
||||
Zulu *Dictionary = &zu // zu
|
||||
) |
@ -1,343 +0,0 @@ |
||||
// 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.
|
||||
|
||||
//go:generate go run maketables.go -output tables.go
|
||||
|
||||
// Package display provides display names for languages, scripts and regions in
|
||||
// a requested language.
|
||||
//
|
||||
// The data is based on CLDR's localeDisplayNames. It includes the names of the
|
||||
// draft level "contributed" or "approved". The resulting tables are quite
|
||||
// large. The display package is designed so that users can reduce the linked-in
|
||||
// table sizes by cherry picking the languages one wishes to support. There is a
|
||||
// Dictionary defined for a selected set of common languages for this purpose.
|
||||
package display |
||||
|
||||
import ( |
||||
"strings" |
||||
|
||||
"golang.org/x/text/language" |
||||
) |
||||
|
||||
/* |
||||
TODO: |
||||
All fairly low priority at the moment: |
||||
- Include alternative and variants as an option (using func options). |
||||
- Option for returning the empty string for undefined values. |
||||
- Support variants, currencies, time zones, option names and other data |
||||
provided in CLDR. |
||||
- Do various optimizations: |
||||
- Reduce size of offset tables. |
||||
- Consider compressing infrequently used languages and decompress on demand. |
||||
*/ |
||||
|
||||
// A Namer is used to get the name for a given value, such as a Tag, Language,
|
||||
// Script or Region.
|
||||
type Namer interface { |
||||
// Name returns a display string for the given value. A Namer returns an
|
||||
// empty string for values it does not support. A Namer may support naming
|
||||
// an unspecified value. For example, when getting the name for a region for
|
||||
// a tag that does not have a defined Region, it may return the name for an
|
||||
// unknown region. It is up to the user to filter calls to Name for values
|
||||
// for which one does not want to have a name string.
|
||||
Name(x interface{}) string |
||||
} |
||||
|
||||
var ( |
||||
// Supported lists the languages for which names are defined.
|
||||
Supported language.Coverage |
||||
|
||||
// The set of all possible values for which names are defined. Note that not
|
||||
// all Namer implementations will cover all the values of a given type.
|
||||
// A Namer will return the empty string for unsupported values.
|
||||
Values language.Coverage |
||||
|
||||
matcher language.Matcher |
||||
) |
||||
|
||||
func init() { |
||||
tags := make([]language.Tag, numSupported) |
||||
s := supported |
||||
for i := range tags { |
||||
p := strings.IndexByte(s, '|') |
||||
tags[i] = language.Raw.Make(s[:p]) |
||||
s = s[p+1:] |
||||
} |
||||
matcher = language.NewMatcher(tags) |
||||
Supported = language.NewCoverage(tags) |
||||
|
||||
Values = language.NewCoverage(langTagSet.Tags, supportedScripts, supportedRegions) |
||||
} |
||||
|
||||
// Languages returns a Namer for naming languages. It returns nil if there is no
|
||||
// data for the given tag. The type passed to Name must be either language.Base
|
||||
// or language.Tag. Note that the result may differ between passing a tag or its
|
||||
// base language. For example, for English, passing "nl-BE" would return Flemish
|
||||
// whereas passing "nl" returns "Dutch".
|
||||
func Languages(t language.Tag) Namer { |
||||
if _, index, conf := matcher.Match(t); conf != language.No { |
||||
return languageNamer(index) |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
type languageNamer int |
||||
|
||||
func (n languageNamer) name(i int) string { |
||||
return lookup(langHeaders[:], int(n), i) |
||||
} |
||||
|
||||
// Name implements the Namer interface for language names.
|
||||
func (n languageNamer) Name(x interface{}) string { |
||||
return nameLanguage(n, x) |
||||
} |
||||
|
||||
// nonEmptyIndex walks up the parent chain until a non-empty header is found.
|
||||
// It returns -1 if no index could be found.
|
||||
func nonEmptyIndex(h []header, index int) int { |
||||
for ; index != -1 && h[index].data == ""; index = int(parents[index]) { |
||||
} |
||||
return index |
||||
} |
||||
|
||||
// Scripts returns a Namer for naming scripts. It returns nil if there is no
|
||||
// data for the given tag. The type passed to Name must be either a
|
||||
// language.Script or a language.Tag. It will not attempt to infer a script for
|
||||
// tags with an unspecified script.
|
||||
func Scripts(t language.Tag) Namer { |
||||
if _, index, conf := matcher.Match(t); conf != language.No { |
||||
if index = nonEmptyIndex(scriptHeaders[:], index); index != -1 { |
||||
return scriptNamer(index) |
||||
} |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
type scriptNamer int |
||||
|
||||
func (n scriptNamer) name(i int) string { |
||||
return lookup(scriptHeaders[:], int(n), i) |
||||
} |
||||
|
||||
// Name implements the Namer interface for script names.
|
||||
func (n scriptNamer) Name(x interface{}) string { |
||||
return nameScript(n, x) |
||||
} |
||||
|
||||
// Regions returns a Namer for naming regions. It returns nil if there is no
|
||||
// data for the given tag. The type passed to Name must be either a
|
||||
// language.Region or a language.Tag. It will not attempt to infer a region for
|
||||
// tags with an unspecified region.
|
||||
func Regions(t language.Tag) Namer { |
||||
if _, index, conf := matcher.Match(t); conf != language.No { |
||||
if index = nonEmptyIndex(regionHeaders[:], index); index != -1 { |
||||
return regionNamer(index) |
||||
} |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
type regionNamer int |
||||
|
||||
func (n regionNamer) name(i int) string { |
||||
return lookup(regionHeaders[:], int(n), i) |
||||
} |
||||
|
||||
// Name implements the Namer interface for region names.
|
||||
func (n regionNamer) Name(x interface{}) string { |
||||
return nameRegion(n, x) |
||||
} |
||||
|
||||
// Tags returns a Namer for giving a full description of a tag. The names of
|
||||
// scripts and regions that are not already implied by the language name will
|
||||
// in appended within parentheses. It returns nil if there is not data for the
|
||||
// given tag. The type passed to Name must be a tag.
|
||||
func Tags(t language.Tag) Namer { |
||||
if _, index, conf := matcher.Match(t); conf != language.No { |
||||
return tagNamer(index) |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
type tagNamer int |
||||
|
||||
// Name implements the Namer interface for tag names.
|
||||
func (n tagNamer) Name(x interface{}) string { |
||||
return nameTag(languageNamer(n), scriptNamer(n), regionNamer(n), x) |
||||
} |
||||
|
||||
// lookup finds the name for an entry in a global table, traversing the
|
||||
// inheritance hierarchy if needed.
|
||||
func lookup(table []header, dict, want int) string { |
||||
for dict != -1 { |
||||
if s := table[dict].name(want); s != "" { |
||||
return s |
||||
} |
||||
dict = int(parents[dict]) |
||||
} |
||||
return "" |
||||
} |
||||
|
||||
// A Dictionary holds a collection of Namers for a single language. One can
|
||||
// reduce the amount of data linked in to a binary by only referencing
|
||||
// Dictionaries for the languages one needs to support instead of using the
|
||||
// generic Namer factories.
|
||||
type Dictionary struct { |
||||
parent *Dictionary |
||||
lang header |
||||
script header |
||||
region header |
||||
} |
||||
|
||||
// Tags returns a Namer for giving a full description of a tag. The names of
|
||||
// scripts and regions that are not already implied by the language name will
|
||||
// in appended within parentheses. It returns nil if there is not data for the
|
||||
// given tag. The type passed to Name must be a tag.
|
||||
func (d *Dictionary) Tags() Namer { |
||||
return dictTags{d} |
||||
} |
||||
|
||||
type dictTags struct { |
||||
d *Dictionary |
||||
} |
||||
|
||||
// Name implements the Namer interface for tag names.
|
||||
func (n dictTags) Name(x interface{}) string { |
||||
return nameTag(dictLanguages{n.d}, dictScripts{n.d}, dictRegions{n.d}, x) |
||||
} |
||||
|
||||
// Languages returns a Namer for naming languages. It returns nil if there is no
|
||||
// data for the given tag. The type passed to Name must be either language.Base
|
||||
// or language.Tag. Note that the result may differ between passing a tag or its
|
||||
// base language. For example, for English, passing "nl-BE" would return Flemish
|
||||
// whereas passing "nl" returns "Dutch".
|
||||
func (d *Dictionary) Languages() Namer { |
||||
return dictLanguages{d} |
||||
} |
||||
|
||||
type dictLanguages struct { |
||||
d *Dictionary |
||||
} |
||||
|
||||
func (n dictLanguages) name(i int) string { |
||||
for d := n.d; d != nil; d = d.parent { |
||||
if s := d.lang.name(i); s != "" { |
||||
return s |
||||
} |
||||
} |
||||
return "" |
||||
} |
||||
|
||||
// Name implements the Namer interface for language names.
|
||||
func (n dictLanguages) Name(x interface{}) string { |
||||
return nameLanguage(n, x) |
||||
} |
||||
|
||||
// Scripts returns a Namer for naming scripts. It returns nil if there is no
|
||||
// data for the given tag. The type passed to Name must be either a
|
||||
// language.Script or a language.Tag. It will not attempt to infer a script for
|
||||
// tags with an unspecified script.
|
||||
func (d *Dictionary) Scripts() Namer { |
||||
return dictScripts{d} |
||||
} |
||||
|
||||
type dictScripts struct { |
||||
d *Dictionary |
||||
} |
||||
|
||||
func (n dictScripts) name(i int) string { |
||||
for d := n.d; d != nil; d = d.parent { |
||||
if s := d.script.name(i); s != "" { |
||||
return s |
||||
} |
||||
} |
||||
return "" |
||||
} |
||||
|
||||
// Name implements the Namer interface for script names.
|
||||
func (n dictScripts) Name(x interface{}) string { |
||||
return nameScript(n, x) |
||||
} |
||||
|
||||
// Regions returns a Namer for naming regions. It returns nil if there is no
|
||||
// data for the given tag. The type passed to Name must be either a
|
||||
// language.Region or a language.Tag. It will not attempt to infer a region for
|
||||
// tags with an unspecified region.
|
||||
func (d *Dictionary) Regions() Namer { |
||||
return dictRegions{d} |
||||
} |
||||
|
||||
type dictRegions struct { |
||||
d *Dictionary |
||||
} |
||||
|
||||
func (n dictRegions) name(i int) string { |
||||
for d := n.d; d != nil; d = d.parent { |
||||
if s := d.region.name(i); s != "" { |
||||
return s |
||||
} |
||||
} |
||||
return "" |
||||
} |
||||
|
||||
// Name implements the Namer interface for region names.
|
||||
func (n dictRegions) Name(x interface{}) string { |
||||
return nameRegion(n, x) |
||||
} |
||||
|
||||
// A SelfNamer implements a Namer that returns the name of language in this same
|
||||
// language. It provides a very compact mechanism to provide a comprehensive
|
||||
// list of languages to users in their native language.
|
||||
type SelfNamer struct { |
||||
// Supported defines the values supported by this Namer.
|
||||
Supported language.Coverage |
||||
} |
||||
|
||||
var ( |
||||
// Self is a shared instance of a SelfNamer.
|
||||
Self *SelfNamer = &self |
||||
|
||||
self = SelfNamer{language.NewCoverage(selfTagSet.Tags)} |
||||
) |
||||
|
||||
// Name returns the name of a given language tag in the language identified by
|
||||
// this tag. It supports both the language.Base and language.Tag types.
|
||||
func (n SelfNamer) Name(x interface{}) string { |
||||
t, _ := language.All.Compose(x) |
||||
base, scr, reg := t.Raw() |
||||
baseScript := language.Script{} |
||||
if (scr == language.Script{} && reg != language.Region{}) { |
||||
// For looking up in the self dictionary, we need to select the
|
||||
// maximized script. This is even the case if the script isn't
|
||||
// specified.
|
||||
s1, _ := t.Script() |
||||
if baseScript = getScript(base); baseScript != s1 { |
||||
scr = s1 |
||||
} |
||||
} |
||||
|
||||
i, scr, reg := selfTagSet.index(base, scr, reg) |
||||
if i == -1 { |
||||
return "" |
||||
} |
||||
|
||||
// Only return the display name if the script matches the expected script.
|
||||
if (scr != language.Script{}) { |
||||
if (baseScript == language.Script{}) { |
||||
baseScript = getScript(base) |
||||
} |
||||
if baseScript != scr { |
||||
return "" |
||||
} |
||||
} |
||||
|
||||
return selfHeaders[0].name(i) |
||||
} |
||||
|
||||
// getScript returns the maximized script for a base language.
|
||||
func getScript(b language.Base) language.Script { |
||||
tag, _ := language.Raw.Compose(b) |
||||
scr, _ := tag.Script() |
||||
return scr |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue