mirror of https://github.com/golang/go.git
syscall: add support for openbsd/ppc64
Add syscall support for the openbsd/ppc64 port. Updates #56001 Change-Id: I695c5c296e90645515de0c8f89f1bc57e976679d Reviewed-on: https://go-review.googlesource.com/c/go/+/475636 Reviewed-by: Eric Grosse <grosse@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Joel Sing <joel@sing.id.au> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
c140105e1c
commit
e7e99a8e02
|
|
@ -0,0 +1,32 @@
|
|||
// Copyright 2023 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.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
//
|
||||
// System call support for PPC64, OpenBSD
|
||||
//
|
||||
|
||||
// Provide these function names via assembly so they are provided as ABI0,
|
||||
// rather than ABIInternal.
|
||||
|
||||
// func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
JMP ·syscallInternal(SB)
|
||||
|
||||
// func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
JMP ·syscall6Internal(SB)
|
||||
|
||||
// func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
JMP ·rawSyscallInternal(SB)
|
||||
|
||||
// func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
JMP ·rawSyscall6Internal(SB)
|
||||
|
||||
// func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno)
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||
JMP ·syscall9Internal(SB)
|
||||
|
|
@ -355,6 +355,18 @@ openbsd_mips64)
|
|||
# API consistent between platforms.
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
;;
|
||||
openbsd_ppc64)
|
||||
GOOSARCH_in="syscall_openbsd_libc.go syscall_openbsd_$GOARCH.go"
|
||||
mkerrors="$mkerrors -m64"
|
||||
mksyscall="./mksyscall.pl -openbsd -libc"
|
||||
mksysctl="./mksysctl_openbsd.pl"
|
||||
zsysctl="zsysctl_openbsd.go"
|
||||
mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
|
||||
# Let the type of C char be signed to make the bare syscall
|
||||
# API consistent between platforms.
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
mkasm="go run mkasm.go"
|
||||
;;
|
||||
plan9_386)
|
||||
mkerrors=
|
||||
mksyscall="./mksyscall.pl -l32 -plan9"
|
||||
|
|
|
|||
|
|
@ -54,7 +54,12 @@ func main() {
|
|||
if !trampolines[fn] {
|
||||
trampolines[fn] = true
|
||||
fmt.Fprintf(&out, "TEXT ·%s_trampoline(SB),NOSPLIT,$0-0\n", fn)
|
||||
fmt.Fprintf(&out, "\tJMP\t%s(SB)\n", fn)
|
||||
if goos == "openbsd" && arch == "ppc64" {
|
||||
fmt.Fprintf(&out, "\tCALL\t%s(SB)\n", fn)
|
||||
fmt.Fprintf(&out, "\tRET\n")
|
||||
} else {
|
||||
fmt.Fprintf(&out, "\tJMP\t%s(SB)\n", fn)
|
||||
}
|
||||
}
|
||||
}
|
||||
err = os.WriteFile(fmt.Sprintf("zsyscall_%s_%s.s", goos, arch), out.Bytes(), 0644)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
// Copyright 2023 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 syscall
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
k.Ident = uint64(fd)
|
||||
k.Filter = int16(mode)
|
||||
k.Flags = uint16(flags)
|
||||
}
|
||||
|
||||
func (iov *Iovec) SetLen(length int) {
|
||||
iov.Len = uint64(length)
|
||||
}
|
||||
|
||||
func (msghdr *Msghdr) SetControllen(length int) {
|
||||
msghdr.Controllen = uint32(length)
|
||||
}
|
||||
|
||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint32(length)
|
||||
}
|
||||
|
||||
// RTM_LOCK only exists in OpenBSD 6.3 and earlier.
|
||||
const RTM_LOCK = 0x8
|
||||
|
||||
// SYS___SYSCTL only exists in OpenBSD 5.8 and earlier, when it was
|
||||
// was renamed to SYS_SYSCTL.
|
||||
const SYS___SYSCTL = SYS_SYSCTL
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,354 @@
|
|||
// go run mkasm.go openbsd ppc64
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
#include "textflag.h"
|
||||
TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getgroups(SB)
|
||||
RET
|
||||
TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_setgroups(SB)
|
||||
RET
|
||||
TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_wait4(SB)
|
||||
RET
|
||||
TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_accept(SB)
|
||||
RET
|
||||
TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_bind(SB)
|
||||
RET
|
||||
TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_connect(SB)
|
||||
RET
|
||||
TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_socket(SB)
|
||||
RET
|
||||
TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getsockopt(SB)
|
||||
RET
|
||||
TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_setsockopt(SB)
|
||||
RET
|
||||
TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getpeername(SB)
|
||||
RET
|
||||
TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getsockname(SB)
|
||||
RET
|
||||
TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_shutdown(SB)
|
||||
RET
|
||||
TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_socketpair(SB)
|
||||
RET
|
||||
TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_recvfrom(SB)
|
||||
RET
|
||||
TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_sendto(SB)
|
||||
RET
|
||||
TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_recvmsg(SB)
|
||||
RET
|
||||
TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_sendmsg(SB)
|
||||
RET
|
||||
TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_kevent(SB)
|
||||
RET
|
||||
TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_utimes(SB)
|
||||
RET
|
||||
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_futimes(SB)
|
||||
RET
|
||||
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_fcntl(SB)
|
||||
RET
|
||||
TEXT ·libc_pipe2_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_pipe2(SB)
|
||||
RET
|
||||
TEXT ·libc_accept4_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_accept4(SB)
|
||||
RET
|
||||
TEXT ·libc_getdents_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getdents(SB)
|
||||
RET
|
||||
TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_access(SB)
|
||||
RET
|
||||
TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_adjtime(SB)
|
||||
RET
|
||||
TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_chdir(SB)
|
||||
RET
|
||||
TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_chflags(SB)
|
||||
RET
|
||||
TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_chmod(SB)
|
||||
RET
|
||||
TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_chown(SB)
|
||||
RET
|
||||
TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_chroot(SB)
|
||||
RET
|
||||
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_close(SB)
|
||||
RET
|
||||
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_dup(SB)
|
||||
RET
|
||||
TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_dup2(SB)
|
||||
RET
|
||||
TEXT ·libc_dup3_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_dup3(SB)
|
||||
RET
|
||||
TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_fchdir(SB)
|
||||
RET
|
||||
TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_fchflags(SB)
|
||||
RET
|
||||
TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_fchmod(SB)
|
||||
RET
|
||||
TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_fchown(SB)
|
||||
RET
|
||||
TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_flock(SB)
|
||||
RET
|
||||
TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_fpathconf(SB)
|
||||
RET
|
||||
TEXT ·libc_fstat_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_fstat(SB)
|
||||
RET
|
||||
TEXT ·libc_fstatfs_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_fstatfs(SB)
|
||||
RET
|
||||
TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_fsync(SB)
|
||||
RET
|
||||
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_ftruncate(SB)
|
||||
RET
|
||||
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getegid(SB)
|
||||
RET
|
||||
TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_geteuid(SB)
|
||||
RET
|
||||
TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getgid(SB)
|
||||
RET
|
||||
TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getpgid(SB)
|
||||
RET
|
||||
TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getpgrp(SB)
|
||||
RET
|
||||
TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getpid(SB)
|
||||
RET
|
||||
TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getppid(SB)
|
||||
RET
|
||||
TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getpriority(SB)
|
||||
RET
|
||||
TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getrlimit(SB)
|
||||
RET
|
||||
TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getrusage(SB)
|
||||
RET
|
||||
TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getsid(SB)
|
||||
RET
|
||||
TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_gettimeofday(SB)
|
||||
RET
|
||||
TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getuid(SB)
|
||||
RET
|
||||
TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_issetugid(SB)
|
||||
RET
|
||||
TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_kill(SB)
|
||||
RET
|
||||
TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_kqueue(SB)
|
||||
RET
|
||||
TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_lchown(SB)
|
||||
RET
|
||||
TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_link(SB)
|
||||
RET
|
||||
TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_listen(SB)
|
||||
RET
|
||||
TEXT ·libc_lstat_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_lstat(SB)
|
||||
RET
|
||||
TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_mkdir(SB)
|
||||
RET
|
||||
TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_mkfifo(SB)
|
||||
RET
|
||||
TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_mknod(SB)
|
||||
RET
|
||||
TEXT ·libc_nanosleep_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_nanosleep(SB)
|
||||
RET
|
||||
TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_open(SB)
|
||||
RET
|
||||
TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_pathconf(SB)
|
||||
RET
|
||||
TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_pread(SB)
|
||||
RET
|
||||
TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_pwrite(SB)
|
||||
RET
|
||||
TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_read(SB)
|
||||
RET
|
||||
TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_readlink(SB)
|
||||
RET
|
||||
TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_rename(SB)
|
||||
RET
|
||||
TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_revoke(SB)
|
||||
RET
|
||||
TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_rmdir(SB)
|
||||
RET
|
||||
TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_select(SB)
|
||||
RET
|
||||
TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_setegid(SB)
|
||||
RET
|
||||
TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_seteuid(SB)
|
||||
RET
|
||||
TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_setgid(SB)
|
||||
RET
|
||||
TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_setlogin(SB)
|
||||
RET
|
||||
TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_setpgid(SB)
|
||||
RET
|
||||
TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_setpriority(SB)
|
||||
RET
|
||||
TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_setregid(SB)
|
||||
RET
|
||||
TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_setreuid(SB)
|
||||
RET
|
||||
TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_setrlimit(SB)
|
||||
RET
|
||||
TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_setsid(SB)
|
||||
RET
|
||||
TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_settimeofday(SB)
|
||||
RET
|
||||
TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_setuid(SB)
|
||||
RET
|
||||
TEXT ·libc_stat_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_stat(SB)
|
||||
RET
|
||||
TEXT ·libc_statfs_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_statfs(SB)
|
||||
RET
|
||||
TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_symlink(SB)
|
||||
RET
|
||||
TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_sync(SB)
|
||||
RET
|
||||
TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_truncate(SB)
|
||||
RET
|
||||
TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_umask(SB)
|
||||
RET
|
||||
TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_unlink(SB)
|
||||
RET
|
||||
TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_unmount(SB)
|
||||
RET
|
||||
TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_write(SB)
|
||||
RET
|
||||
TEXT ·libc_writev_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_writev(SB)
|
||||
RET
|
||||
TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_mmap(SB)
|
||||
RET
|
||||
TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_munmap(SB)
|
||||
RET
|
||||
TEXT ·libc_utimensat_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_utimensat(SB)
|
||||
RET
|
||||
TEXT ·libc_syscall_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_syscall(SB)
|
||||
RET
|
||||
TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_lseek(SB)
|
||||
RET
|
||||
TEXT ·libc_getcwd_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getcwd(SB)
|
||||
RET
|
||||
TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_sysctl(SB)
|
||||
RET
|
||||
TEXT ·libc_fork_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_fork(SB)
|
||||
RET
|
||||
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_ioctl(SB)
|
||||
RET
|
||||
TEXT ·libc_execve_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_execve(SB)
|
||||
RET
|
||||
TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_exit(SB)
|
||||
RET
|
||||
TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_ptrace(SB)
|
||||
RET
|
||||
TEXT ·libc_getentropy_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_getentropy(SB)
|
||||
RET
|
||||
TEXT ·libc_fstatat_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_fstatat(SB)
|
||||
RET
|
||||
TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_unlinkat(SB)
|
||||
RET
|
||||
TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
|
||||
CALL libc_openat(SB)
|
||||
RET
|
||||
|
|
@ -14,6 +14,7 @@ var sysctlMib = []mibentry{
|
|||
{"ddb.max_line", []_C_int{9, 3}},
|
||||
{"ddb.max_width", []_C_int{9, 2}},
|
||||
{"ddb.panic", []_C_int{9, 5}},
|
||||
{"ddb.profile", []_C_int{9, 9}},
|
||||
{"ddb.radix", []_C_int{9, 1}},
|
||||
{"ddb.tab_stop_width", []_C_int{9, 4}},
|
||||
{"ddb.trigger", []_C_int{9, 8}},
|
||||
|
|
@ -28,30 +29,39 @@ var sysctlMib = []mibentry{
|
|||
{"hw.model", []_C_int{6, 2}},
|
||||
{"hw.ncpu", []_C_int{6, 3}},
|
||||
{"hw.ncpufound", []_C_int{6, 21}},
|
||||
{"hw.ncpuonline", []_C_int{6, 25}},
|
||||
{"hw.pagesize", []_C_int{6, 7}},
|
||||
{"hw.perfpolicy", []_C_int{6, 23}},
|
||||
{"hw.physmem", []_C_int{6, 19}},
|
||||
{"hw.power", []_C_int{6, 26}},
|
||||
{"hw.product", []_C_int{6, 15}},
|
||||
{"hw.serialno", []_C_int{6, 17}},
|
||||
{"hw.setperf", []_C_int{6, 13}},
|
||||
{"hw.smt", []_C_int{6, 24}},
|
||||
{"hw.usermem", []_C_int{6, 20}},
|
||||
{"hw.uuid", []_C_int{6, 18}},
|
||||
{"hw.vendor", []_C_int{6, 14}},
|
||||
{"hw.version", []_C_int{6, 16}},
|
||||
{"kern.arandom", []_C_int{1, 37}},
|
||||
{"kern.allowdt", []_C_int{1, 65}},
|
||||
{"kern.allowkmem", []_C_int{1, 52}},
|
||||
{"kern.argmax", []_C_int{1, 8}},
|
||||
{"kern.audio", []_C_int{1, 84}},
|
||||
{"kern.boottime", []_C_int{1, 21}},
|
||||
{"kern.bufcachepercent", []_C_int{1, 72}},
|
||||
{"kern.ccpu", []_C_int{1, 45}},
|
||||
{"kern.clockrate", []_C_int{1, 12}},
|
||||
{"kern.consbuf", []_C_int{1, 83}},
|
||||
{"kern.consbufsize", []_C_int{1, 82}},
|
||||
{"kern.consdev", []_C_int{1, 75}},
|
||||
{"kern.cp_time", []_C_int{1, 40}},
|
||||
{"kern.cp_time2", []_C_int{1, 71}},
|
||||
{"kern.cryptodevallowsoft", []_C_int{1, 53}},
|
||||
{"kern.cpustats", []_C_int{1, 85}},
|
||||
{"kern.domainname", []_C_int{1, 22}},
|
||||
{"kern.file", []_C_int{1, 73}},
|
||||
{"kern.forkstat", []_C_int{1, 42}},
|
||||
{"kern.fscale", []_C_int{1, 46}},
|
||||
{"kern.fsync", []_C_int{1, 33}},
|
||||
{"kern.global_ptrace", []_C_int{1, 81}},
|
||||
{"kern.hostid", []_C_int{1, 11}},
|
||||
{"kern.hostname", []_C_int{1, 10}},
|
||||
{"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}},
|
||||
|
|
@ -74,17 +84,16 @@ var sysctlMib = []mibentry{
|
|||
{"kern.ngroups", []_C_int{1, 18}},
|
||||
{"kern.nosuidcoredump", []_C_int{1, 32}},
|
||||
{"kern.nprocs", []_C_int{1, 47}},
|
||||
{"kern.nselcoll", []_C_int{1, 43}},
|
||||
{"kern.nthreads", []_C_int{1, 26}},
|
||||
{"kern.numvnodes", []_C_int{1, 58}},
|
||||
{"kern.osrelease", []_C_int{1, 2}},
|
||||
{"kern.osrevision", []_C_int{1, 3}},
|
||||
{"kern.ostype", []_C_int{1, 1}},
|
||||
{"kern.osversion", []_C_int{1, 27}},
|
||||
{"kern.pfstatus", []_C_int{1, 86}},
|
||||
{"kern.pool_debug", []_C_int{1, 77}},
|
||||
{"kern.posix1version", []_C_int{1, 17}},
|
||||
{"kern.proc", []_C_int{1, 66}},
|
||||
{"kern.random", []_C_int{1, 31}},
|
||||
{"kern.rawpartition", []_C_int{1, 24}},
|
||||
{"kern.saved_ids", []_C_int{1, 20}},
|
||||
{"kern.securelevel", []_C_int{1, 9}},
|
||||
|
|
@ -102,21 +111,20 @@ var sysctlMib = []mibentry{
|
|||
{"kern.timecounter.hardware", []_C_int{1, 69, 3}},
|
||||
{"kern.timecounter.tick", []_C_int{1, 69, 1}},
|
||||
{"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}},
|
||||
{"kern.tty.maxptys", []_C_int{1, 44, 6}},
|
||||
{"kern.tty.nptys", []_C_int{1, 44, 7}},
|
||||
{"kern.timeout_stats", []_C_int{1, 87}},
|
||||
{"kern.tty.tk_cancc", []_C_int{1, 44, 4}},
|
||||
{"kern.tty.tk_nin", []_C_int{1, 44, 1}},
|
||||
{"kern.tty.tk_nout", []_C_int{1, 44, 2}},
|
||||
{"kern.tty.tk_rawcc", []_C_int{1, 44, 3}},
|
||||
{"kern.tty.ttyinfo", []_C_int{1, 44, 5}},
|
||||
{"kern.ttycount", []_C_int{1, 57}},
|
||||
{"kern.userasymcrypto", []_C_int{1, 60}},
|
||||
{"kern.usercrypto", []_C_int{1, 52}},
|
||||
{"kern.usermount", []_C_int{1, 30}},
|
||||
{"kern.utc_offset", []_C_int{1, 88}},
|
||||
{"kern.version", []_C_int{1, 4}},
|
||||
{"kern.vnode", []_C_int{1, 13}},
|
||||
{"kern.video", []_C_int{1, 89}},
|
||||
{"kern.watchdog.auto", []_C_int{1, 64, 2}},
|
||||
{"kern.watchdog.period", []_C_int{1, 64, 1}},
|
||||
{"kern.witnesswatch", []_C_int{1, 53}},
|
||||
{"kern.wxabort", []_C_int{1, 74}},
|
||||
{"net.bpf.bufsize", []_C_int{4, 31, 1}},
|
||||
{"net.bpf.maxbufsize", []_C_int{4, 31, 2}},
|
||||
{"net.inet.ah.enable", []_C_int{4, 2, 51, 1}},
|
||||
|
|
@ -144,7 +152,9 @@ var sysctlMib = []mibentry{
|
|||
{"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}},
|
||||
{"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}},
|
||||
{"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}},
|
||||
{"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}},
|
||||
{"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}},
|
||||
{"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}},
|
||||
{"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}},
|
||||
{"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}},
|
||||
{"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}},
|
||||
|
|
@ -153,8 +163,10 @@ var sysctlMib = []mibentry{
|
|||
{"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}},
|
||||
{"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}},
|
||||
{"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}},
|
||||
{"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}},
|
||||
{"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}},
|
||||
{"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}},
|
||||
{"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}},
|
||||
{"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}},
|
||||
{"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}},
|
||||
{"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}},
|
||||
|
|
@ -171,9 +183,7 @@ var sysctlMib = []mibentry{
|
|||
{"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}},
|
||||
{"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}},
|
||||
{"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}},
|
||||
{"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}},
|
||||
{"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}},
|
||||
{"net.inet.pim.stats", []_C_int{4, 2, 103, 1}},
|
||||
{"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}},
|
||||
{"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}},
|
||||
{"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}},
|
||||
|
|
@ -187,6 +197,7 @@ var sysctlMib = []mibentry{
|
|||
{"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}},
|
||||
{"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}},
|
||||
{"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}},
|
||||
{"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}},
|
||||
{"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}},
|
||||
{"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}},
|
||||
{"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}},
|
||||
|
|
@ -194,9 +205,12 @@ var sysctlMib = []mibentry{
|
|||
{"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}},
|
||||
{"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}},
|
||||
{"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}},
|
||||
{"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}},
|
||||
{"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}},
|
||||
{"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}},
|
||||
{"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}},
|
||||
{"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}},
|
||||
{"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}},
|
||||
{"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}},
|
||||
{"net.inet.udp.stats", []_C_int{4, 2, 17, 5}},
|
||||
{"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}},
|
||||
|
|
@ -209,13 +223,8 @@ var sysctlMib = []mibentry{
|
|||
{"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}},
|
||||
{"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}},
|
||||
{"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}},
|
||||
{"net.inet6.icmp6.nd6_prune", []_C_int{4, 24, 30, 6}},
|
||||
{"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}},
|
||||
{"net.inet6.icmp6.nd6_useloopback", []_C_int{4, 24, 30, 11}},
|
||||
{"net.inet6.icmp6.nodeinfo", []_C_int{4, 24, 30, 13}},
|
||||
{"net.inet6.icmp6.rediraccept", []_C_int{4, 24, 30, 2}},
|
||||
{"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}},
|
||||
{"net.inet6.ip6.accept_rtadv", []_C_int{4, 24, 17, 12}},
|
||||
{"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}},
|
||||
{"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}},
|
||||
{"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}},
|
||||
|
|
@ -228,20 +237,19 @@ var sysctlMib = []mibentry{
|
|||
{"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}},
|
||||
{"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}},
|
||||
{"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}},
|
||||
{"net.inet6.ip6.maxifdefrouters", []_C_int{4, 24, 17, 47}},
|
||||
{"net.inet6.ip6.maxifprefixes", []_C_int{4, 24, 17, 46}},
|
||||
{"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}},
|
||||
{"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}},
|
||||
{"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}},
|
||||
{"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}},
|
||||
{"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}},
|
||||
{"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}},
|
||||
{"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}},
|
||||
{"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}},
|
||||
{"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}},
|
||||
{"net.inet6.ip6.rr_prune", []_C_int{4, 24, 17, 22}},
|
||||
{"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}},
|
||||
{"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}},
|
||||
{"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}},
|
||||
{"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}},
|
||||
{"net.inet6.ip6.v6only", []_C_int{4, 24, 17, 24}},
|
||||
{"net.key.sadb_dump", []_C_int{4, 30, 1}},
|
||||
{"net.key.spd_dump", []_C_int{4, 30, 2}},
|
||||
{"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}},
|
||||
|
|
@ -250,21 +258,7 @@ var sysctlMib = []mibentry{
|
|||
{"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}},
|
||||
{"net.mpls.mapttl_ip", []_C_int{4, 33, 5}},
|
||||
{"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}},
|
||||
{"net.mpls.maxloop_inkernel", []_C_int{4, 33, 4}},
|
||||
{"net.mpls.ttl", []_C_int{4, 33, 2}},
|
||||
{"net.pflow.stats", []_C_int{4, 34, 1}},
|
||||
{"net.pipex.enable", []_C_int{4, 35, 1}},
|
||||
{"vm.anonmin", []_C_int{2, 7}},
|
||||
{"vm.loadavg", []_C_int{2, 2}},
|
||||
{"vm.maxslp", []_C_int{2, 10}},
|
||||
{"vm.nkmempages", []_C_int{2, 6}},
|
||||
{"vm.psstrings", []_C_int{2, 3}},
|
||||
{"vm.swapencrypt.enable", []_C_int{2, 5, 0}},
|
||||
{"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}},
|
||||
{"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}},
|
||||
{"vm.uspace", []_C_int{2, 11}},
|
||||
{"vm.uvmexp", []_C_int{2, 4}},
|
||||
{"vm.vmmeter", []_C_int{2, 1}},
|
||||
{"vm.vnodemin", []_C_int{2, 9}},
|
||||
{"vm.vtextmin", []_C_int{2, 8}},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,230 @@
|
|||
// mksysnum_openbsd.pl
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
package syscall
|
||||
|
||||
const (
|
||||
SYS_EXIT = 1 // { void sys_exit(int rval); }
|
||||
SYS_FORK = 2 // { int sys_fork(void); }
|
||||
SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
|
||||
SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \
|
||||
SYS_OPEN = 5 // { int sys_open(const char *path, \
|
||||
SYS_CLOSE = 6 // { int sys_close(int fd); }
|
||||
SYS_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); }
|
||||
SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \
|
||||
SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
|
||||
SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
|
||||
SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \
|
||||
SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
|
||||
SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
|
||||
SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \
|
||||
SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
|
||||
SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \
|
||||
SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
|
||||
SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
|
||||
SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \
|
||||
SYS_GETPID = 20 // { pid_t sys_getpid(void); }
|
||||
SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \
|
||||
SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
|
||||
SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
|
||||
SYS_GETUID = 24 // { uid_t sys_getuid(void); }
|
||||
SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
|
||||
SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \
|
||||
SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \
|
||||
SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, \
|
||||
SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \
|
||||
SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, \
|
||||
SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, \
|
||||
SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, \
|
||||
SYS_ACCESS = 33 // { int sys_access(const char *path, int amode); }
|
||||
SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
|
||||
SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
|
||||
SYS_SYNC = 36 // { void sys_sync(void); }
|
||||
SYS_MSYSCALL = 37 // { int sys_msyscall(void *addr, size_t len); }
|
||||
SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
|
||||
SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
|
||||
SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
|
||||
SYS_DUP = 41 // { int sys_dup(int fd); }
|
||||
SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \
|
||||
SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
|
||||
SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \
|
||||
SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \
|
||||
SYS_SIGACTION = 46 // { int sys_sigaction(int signum, \
|
||||
SYS_GETGID = 47 // { gid_t sys_getgid(void); }
|
||||
SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
|
||||
SYS_MMAP = 49 // { void *sys_mmap(void *addr, size_t len, int prot, \
|
||||
SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
|
||||
SYS_ACCT = 51 // { int sys_acct(const char *path); }
|
||||
SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
|
||||
SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
|
||||
SYS_IOCTL = 54 // { int sys_ioctl(int fd, \
|
||||
SYS_REBOOT = 55 // { int sys_reboot(int opt); }
|
||||
SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
|
||||
SYS_SYMLINK = 57 // { int sys_symlink(const char *path, \
|
||||
SYS_READLINK = 58 // { ssize_t sys_readlink(const char *path, \
|
||||
SYS_EXECVE = 59 // { int sys_execve(const char *path, \
|
||||
SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
|
||||
SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
|
||||
SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \
|
||||
SYS_STATFS = 63 // { int sys_statfs(const char *path, \
|
||||
SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \
|
||||
SYS_VFORK = 66 // { int sys_vfork(void); }
|
||||
SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \
|
||||
SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \
|
||||
SYS_SETITIMER = 69 // { int sys_setitimer(int which, \
|
||||
SYS_GETITIMER = 70 // { int sys_getitimer(int which, \
|
||||
SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \
|
||||
SYS_KEVENT = 72 // { int sys_kevent(int fd, \
|
||||
SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
|
||||
SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \
|
||||
SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \
|
||||
SYS_UTIMES = 76 // { int sys_utimes(const char *path, \
|
||||
SYS_FUTIMES = 77 // { int sys_futimes(int fd, \
|
||||
SYS_MQUERY = 78 // { void *sys_mquery(void *addr, size_t len, int prot, \
|
||||
SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \
|
||||
SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \
|
||||
SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
|
||||
SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, pid_t pgid); }
|
||||
SYS_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, \
|
||||
SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \
|
||||
SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \
|
||||
SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, \
|
||||
SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \
|
||||
SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \
|
||||
SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \
|
||||
SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
|
||||
SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \
|
||||
SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
|
||||
SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, \
|
||||
SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \
|
||||
SYS_FSYNC = 95 // { int sys_fsync(int fd); }
|
||||
SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
|
||||
SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
|
||||
SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \
|
||||
SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
|
||||
SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
|
||||
SYS_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); }
|
||||
SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); }
|
||||
SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
|
||||
SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \
|
||||
SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \
|
||||
SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
|
||||
SYS_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, \
|
||||
SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, \
|
||||
SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \
|
||||
SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \
|
||||
SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
|
||||
SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, \
|
||||
SYS_UNVEIL = 114 // { int sys_unveil(const char *path, \
|
||||
SYS___REALPATH = 115 // { int sys___realpath(const char *pathname, \
|
||||
SYS_RECVMMSG = 116 // { int sys_recvmmsg(int s, struct mmsghdr *mmsg, \
|
||||
SYS_SENDMMSG = 117 // { int sys_sendmmsg(int s, struct mmsghdr *mmsg,\
|
||||
SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \
|
||||
SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }
|
||||
SYS_READV = 120 // { ssize_t sys_readv(int fd, \
|
||||
SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \
|
||||
SYS_KILL = 122 // { int sys_kill(int pid, int signum); }
|
||||
SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
|
||||
SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
|
||||
SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
|
||||
SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }
|
||||
SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
|
||||
SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
|
||||
SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
|
||||
SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, \
|
||||
SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
|
||||
SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \
|
||||
SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
|
||||
SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
|
||||
SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \
|
||||
SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }
|
||||
SYS_SETSID = 147 // { int sys_setsid(void); }
|
||||
SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \
|
||||
SYS_YPCONNECT = 150 // { int sys_ypconnect(int type); }
|
||||
SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
|
||||
SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
|
||||
SYS___TMPFD = 164 // { int sys___tmpfd(int flags); }
|
||||
SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
|
||||
SYS_LSEEK = 166 // { off_t sys_lseek(int fd, off_t offset, int whence); }
|
||||
SYS_TRUNCATE = 167 // { int sys_truncate(const char *path, off_t length); }
|
||||
SYS_FTRUNCATE = 168 // { int sys_ftruncate(int fd, off_t length); }
|
||||
SYS_PREAD = 169 // { ssize_t sys_pread(int fd, void *buf, \
|
||||
SYS_PWRITE = 170 // { ssize_t sys_pwrite(int fd, const void *buf, \
|
||||
SYS_PREADV = 171 // { ssize_t sys_preadv(int fd, \
|
||||
SYS_PWRITEV = 172 // { ssize_t sys_pwritev(int fd, \
|
||||
SYS_PAD_PREAD = 173 // { ssize_t sys_pad_pread(int fd, void *buf, \
|
||||
SYS_PAD_PWRITE = 174 // { ssize_t sys_pad_pwrite(int fd, const void *buf, \
|
||||
SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
|
||||
SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
|
||||
SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
|
||||
SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
|
||||
SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
|
||||
SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
|
||||
SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, \
|
||||
SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, \
|
||||
SYS_PAD_MMAP = 197 // { void *sys_pad_mmap(void *addr, size_t len, int prot, \
|
||||
SYS_PAD_LSEEK = 199 // { off_t sys_pad_lseek(int fd, int pad, off_t offset, \
|
||||
SYS_PAD_TRUNCATE = 200 // { int sys_pad_truncate(const char *path, int pad, \
|
||||
SYS_PAD_FTRUNCATE = 201 // { int sys_pad_ftruncate(int fd, int pad, off_t length); }
|
||||
SYS_SYSCTL = 202 // { int sys_sysctl(const int *name, u_int namelen, \
|
||||
SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
|
||||
SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
|
||||
SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
|
||||
SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \
|
||||
SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
|
||||
SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
|
||||
SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \
|
||||
SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
|
||||
SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \
|
||||
SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
|
||||
SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \
|
||||
SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \
|
||||
SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
|
||||
SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
|
||||
SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
|
||||
SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
|
||||
SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
|
||||
SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
|
||||
SYS_PAD_PREADV = 267 // { ssize_t sys_pad_preadv(int fd, \
|
||||
SYS_PAD_PWRITEV = 268 // { ssize_t sys_pad_pwritev(int fd, \
|
||||
SYS_KQUEUE = 269 // { int sys_kqueue(void); }
|
||||
SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
|
||||
SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
|
||||
SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \
|
||||
SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, \
|
||||
SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, \
|
||||
SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, \
|
||||
SYS_PAD_MQUERY = 286 // { void *sys_pad_mquery(void *addr, size_t len, \
|
||||
SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
|
||||
SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \
|
||||
SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
|
||||
SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \
|
||||
SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \
|
||||
SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \
|
||||
SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \
|
||||
SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \
|
||||
SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
|
||||
SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
|
||||
SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \
|
||||
SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
|
||||
SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \
|
||||
SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
|
||||
SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \
|
||||
SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
|
||||
SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
|
||||
SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \
|
||||
SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \
|
||||
SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \
|
||||
SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \
|
||||
SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \
|
||||
SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \
|
||||
SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, \
|
||||
SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, \
|
||||
SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, \
|
||||
SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \
|
||||
SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \
|
||||
SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \
|
||||
SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
|
||||
SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
|
||||
)
|
||||
|
|
@ -0,0 +1,446 @@
|
|||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -fsigned-char types_openbsd.go
|
||||
|
||||
package syscall
|
||||
|
||||
const (
|
||||
sizeofPtr = 0x8
|
||||
sizeofShort = 0x2
|
||||
sizeofInt = 0x4
|
||||
sizeofLong = 0x8
|
||||
sizeofLongLong = 0x8
|
||||
)
|
||||
|
||||
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 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
|
||||
|
||||
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
|
||||
S_IRWXG = 0x38
|
||||
S_IRWXO = 0x7
|
||||
)
|
||||
|
||||
type Stat_t struct {
|
||||
Mode uint32
|
||||
Dev int32
|
||||
Ino uint64
|
||||
Nlink uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev int32
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
Size int64
|
||||
Blocks int64
|
||||
Blksize int32
|
||||
Flags uint32
|
||||
Gen uint32
|
||||
X__st_birthtim Timespec
|
||||
}
|
||||
|
||||
type Statfs_t struct {
|
||||
F_flags uint32
|
||||
F_bsize uint32
|
||||
F_iosize uint32
|
||||
F_blocks uint64
|
||||
F_bfree uint64
|
||||
F_bavail int64
|
||||
F_files uint64
|
||||
F_ffree uint64
|
||||
F_favail int64
|
||||
F_syncwrites uint64
|
||||
F_syncreads uint64
|
||||
F_asyncwrites uint64
|
||||
F_asyncreads uint64
|
||||
F_fsid Fsid
|
||||
F_namemax uint32
|
||||
F_owner uint32
|
||||
F_ctime uint64
|
||||
F_fstypename [16]int8
|
||||
F_mntonname [90]int8
|
||||
F_mntfromname [90]int8
|
||||
F_mntfromspec [90]int8
|
||||
Pad_cgo_0 [2]byte
|
||||
Mount_info [160]byte
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
Start int64
|
||||
Len int64
|
||||
Pid int32
|
||||
Type int16
|
||||
Whence int16
|
||||
}
|
||||
|
||||
type Dirent struct {
|
||||
Fileno uint64
|
||||
Off int64
|
||||
Reclen uint16
|
||||
Type uint8
|
||||
Namlen uint8
|
||||
X__d_padding [4]uint8
|
||||
Name [256]int8
|
||||
}
|
||||
|
||||
type Fsid struct {
|
||||
Val [2]int32
|
||||
}
|
||||
|
||||
const (
|
||||
pathMax = 0x400
|
||||
)
|
||||
|
||||
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 [24]int8
|
||||
}
|
||||
|
||||
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 uint64
|
||||
}
|
||||
|
||||
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 uint32
|
||||
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 = 0x20
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPv6Mreq = 0x14
|
||||
SizeofMsghdr = 0x30
|
||||
SizeofCmsghdr = 0xc
|
||||
SizeofInet6Pktinfo = 0x14
|
||||
SizeofIPv6MTUInfo = 0x20
|
||||
SizeofICMPv6Filter = 0x20
|
||||
)
|
||||
|
||||
const (
|
||||
PTRACE_TRACEME = 0x0
|
||||
PTRACE_CONT = 0x7
|
||||
PTRACE_KILL = 0x8
|
||||
)
|
||||
|
||||
type Kevent_t struct {
|
||||
Ident uint64
|
||||
Filter int16
|
||||
Flags uint16
|
||||
Fflags uint32
|
||||
Data int64
|
||||
Udata *byte
|
||||
}
|
||||
|
||||
type FdSet struct {
|
||||
Bits [32]uint32
|
||||
}
|
||||
|
||||
const (
|
||||
SizeofIfMsghdr = 0xa8
|
||||
SizeofIfData = 0x90
|
||||
SizeofIfaMsghdr = 0x18
|
||||
SizeofIfAnnounceMsghdr = 0x1a
|
||||
SizeofRtMsghdr = 0x60
|
||||
SizeofRtMetrics = 0x38
|
||||
)
|
||||
|
||||
type IfMsghdr struct {
|
||||
Msglen uint16
|
||||
Version uint8
|
||||
Type uint8
|
||||
Hdrlen uint16
|
||||
Index uint16
|
||||
Tableid uint16
|
||||
Pad1 uint8
|
||||
Pad2 uint8
|
||||
Addrs int32
|
||||
Flags int32
|
||||
Xflags int32
|
||||
Data IfData
|
||||
}
|
||||
|
||||
type IfData struct {
|
||||
Type uint8
|
||||
Addrlen uint8
|
||||
Hdrlen uint8
|
||||
Link_state uint8
|
||||
Mtu uint32
|
||||
Metric uint32
|
||||
Rdomain uint32
|
||||
Baudrate uint64
|
||||
Ipackets uint64
|
||||
Ierrors uint64
|
||||
Opackets uint64
|
||||
Oerrors uint64
|
||||
Collisions uint64
|
||||
Ibytes uint64
|
||||
Obytes uint64
|
||||
Imcasts uint64
|
||||
Omcasts uint64
|
||||
Iqdrops uint64
|
||||
Oqdrops uint64
|
||||
Noproto uint64
|
||||
Capabilities uint32
|
||||
Lastchange Timeval
|
||||
}
|
||||
|
||||
type IfaMsghdr struct {
|
||||
Msglen uint16
|
||||
Version uint8
|
||||
Type uint8
|
||||
Hdrlen uint16
|
||||
Index uint16
|
||||
Tableid uint16
|
||||
Pad1 uint8
|
||||
Pad2 uint8
|
||||
Addrs int32
|
||||
Flags int32
|
||||
Metric int32
|
||||
}
|
||||
|
||||
type IfAnnounceMsghdr struct {
|
||||
Msglen uint16
|
||||
Version uint8
|
||||
Type uint8
|
||||
Hdrlen uint16
|
||||
Index uint16
|
||||
What uint16
|
||||
Name [16]int8
|
||||
}
|
||||
|
||||
type RtMsghdr struct {
|
||||
Msglen uint16
|
||||
Version uint8
|
||||
Type uint8
|
||||
Hdrlen uint16
|
||||
Index uint16
|
||||
Tableid uint16
|
||||
Priority uint8
|
||||
Mpls uint8
|
||||
Addrs int32
|
||||
Flags int32
|
||||
Fmask int32
|
||||
Pid int32
|
||||
Seq int32
|
||||
Errno int32
|
||||
Inits uint32
|
||||
Rmx RtMetrics
|
||||
}
|
||||
|
||||
type RtMetrics struct {
|
||||
Pksent uint64
|
||||
Expire int64
|
||||
Locks uint32
|
||||
Mtu uint32
|
||||
Refcnt uint32
|
||||
Hopcount uint32
|
||||
Recvpipe uint32
|
||||
Sendpipe uint32
|
||||
Ssthresh uint32
|
||||
Rtt uint32
|
||||
Rttvar uint32
|
||||
Pad uint32
|
||||
}
|
||||
|
||||
type Mclpool struct{}
|
||||
|
||||
const (
|
||||
SizeofBpfVersion = 0x4
|
||||
SizeofBpfStat = 0x8
|
||||
SizeofBpfProgram = 0x10
|
||||
SizeofBpfInsn = 0x8
|
||||
SizeofBpfHdr = 0x18
|
||||
)
|
||||
|
||||
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 BpfTimeval
|
||||
Caplen uint32
|
||||
Datalen uint32
|
||||
Hdrlen uint16
|
||||
Ifidx uint16
|
||||
Flowid uint16
|
||||
Flags uint8
|
||||
Drops uint8
|
||||
}
|
||||
|
||||
type BpfTimeval struct {
|
||||
Sec uint32
|
||||
Usec uint32
|
||||
}
|
||||
|
||||
const (
|
||||
_AT_FDCWD = -0x64
|
||||
)
|
||||
|
||||
type Termios struct {
|
||||
Iflag uint32
|
||||
Oflag uint32
|
||||
Cflag uint32
|
||||
Lflag uint32
|
||||
Cc [20]uint8
|
||||
Ispeed int32
|
||||
Ospeed int32
|
||||
}
|
||||
Loading…
Reference in New Issue