mirror of
https://github.com/golang/go
synced 2024-11-21 23:44:39 -07:00
syscall: Changes to the syscall package to support NetBSD.
Not all syscalls are implemented, but many are. On the suggestion of Joel Sing <jsing@google.com>, the generated files were added with hg add instead of hg cp, since they are generated on an OS dependant basis. R=golang-dev, jsing, mikioh.mikioh CC=golang-dev https://golang.org/cl/5491050
This commit is contained in:
parent
2ca4a61658
commit
5425db8f99
@ -54,7 +54,6 @@ GOFILES_netbsd=\
|
||||
sockcmsg_unix.go\
|
||||
syscall_bsd.go\
|
||||
syscall_unix.go\
|
||||
zsysctl_netbsd.go\
|
||||
|
||||
GOFILES_openbsd=\
|
||||
bpf_bsd.go\
|
||||
|
137
src/pkg/syscall/asm_netbsd_386.s
Normal file
137
src/pkg/syscall/asm_netbsd_386.s
Normal file
@ -0,0 +1,137 @@
|
||||
// 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.
|
||||
|
||||
//
|
||||
// System call support for 386, NetBSD
|
||||
//
|
||||
|
||||
// func Syscall(trap int32, a1, a2, a3 int32) (r1, r2, err int32);
|
||||
// func Syscall6(trap int32, a1, a2, a3, a4, a5, a6 int32) (r1, r2, err int32);
|
||||
// Trap # in AX, args on stack above caller pc.
|
||||
|
||||
TEXT ·Syscall(SB),7,$0
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
LEAL 8(SP), SI
|
||||
LEAL 4(SP), DI
|
||||
CLD
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
INT $0x80
|
||||
JAE ok
|
||||
MOVL $-1, 20(SP) // r1
|
||||
MOVL $-1, 24(SP) // r2
|
||||
MOVL AX, 28(SP) // errno
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
ok:
|
||||
MOVL AX, 20(SP) // r1
|
||||
MOVL DX, 24(SP) // r2
|
||||
MOVL $0, 28(SP) // errno
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall6(SB),7,$0
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
LEAL 8(SP), SI
|
||||
LEAL 4(SP), DI
|
||||
CLD
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
INT $0x80
|
||||
JAE ok6
|
||||
MOVL $-1, 32(SP) // r1
|
||||
MOVL $-1, 36(SP) // r2
|
||||
MOVL AX, 40(SP) // errno
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
ok6:
|
||||
MOVL AX, 32(SP) // r1
|
||||
MOVL DX, 36(SP) // r2
|
||||
MOVL $0, 40(SP) // errno
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall9(SB),7,$0
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
LEAL 8(SP), SI
|
||||
LEAL 4(SP), DI
|
||||
CLD
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
INT $0x80
|
||||
JAE ok9
|
||||
MOVL $-1, 44(SP) // r1
|
||||
MOVL $-1, 48(SP) // r2
|
||||
MOVL AX, 52(SP) // errno
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
ok9:
|
||||
MOVL AX, 44(SP) // r1
|
||||
MOVL DX, 48(SP) // r2
|
||||
MOVL $0, 52(SP) // errno
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),7,$0
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
LEAL 8(SP), SI
|
||||
LEAL 4(SP), DI
|
||||
CLD
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
INT $0x80
|
||||
JAE ok1
|
||||
MOVL $-1, 20(SP) // r1
|
||||
MOVL $-1, 24(SP) // r2
|
||||
MOVL AX, 28(SP) // errno
|
||||
RET
|
||||
ok1:
|
||||
MOVL AX, 20(SP) // r1
|
||||
MOVL DX, 24(SP) // r2
|
||||
MOVL $0, 28(SP) // errno
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall6(SB),7,$0
|
||||
MOVL 4(SP), AX // syscall entry
|
||||
// slide args down on top of system call number
|
||||
LEAL 8(SP), SI
|
||||
LEAL 4(SP), DI
|
||||
CLD
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
MOVSL
|
||||
INT $0x80
|
||||
JAE ok2
|
||||
MOVL $-1, 32(SP) // r1
|
||||
MOVL $-1, 36(SP) // r2
|
||||
MOVL AX, 40(SP) // errno
|
||||
RET
|
||||
ok2:
|
||||
MOVL AX, 32(SP) // r1
|
||||
MOVL DX, 36(SP) // r2
|
||||
MOVL $0, 40(SP) // errno
|
||||
RET
|
130
src/pkg/syscall/asm_netbsd_amd64.s
Normal file
130
src/pkg/syscall/asm_netbsd_amd64.s
Normal file
@ -0,0 +1,130 @@
|
||||
// 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.
|
||||
|
||||
//
|
||||
// System call support for AMD64, NetBSD
|
||||
//
|
||||
|
||||
// func Syscall(trap int64, a1, a2, a3 int64) (r1, r2, err int64);
|
||||
// func Syscall6(trap int64, a1, a2, a3, a4, a5, a6 int64) (r1, r2, err int64);
|
||||
// func Syscall9(trap int64, a1, a2, a3, a4, a5, a6, a7, a8, a9 int64) (r1, r2, err int64);
|
||||
// Trap # in AX, args in DI SI DX, return in AX DX
|
||||
|
||||
TEXT ·Syscall(SB),7,$0
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 8(SP), AX // syscall entry
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
MOVQ 32(SP), DX
|
||||
MOVQ $0, R10
|
||||
MOVQ $0, R8
|
||||
MOVQ $0, R9
|
||||
SYSCALL
|
||||
JCC ok
|
||||
MOVQ $-1, 40(SP) // r1
|
||||
MOVQ $0, 48(SP) // r2
|
||||
MOVQ AX, 56(SP) // errno
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
ok:
|
||||
MOVQ AX, 40(SP) // r1
|
||||
MOVQ DX, 48(SP) // r2
|
||||
MOVQ $0, 56(SP) // errno
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall6(SB),7,$0
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 8(SP), AX // syscall entry
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
MOVQ 32(SP), DX
|
||||
MOVQ 40(SP), R10
|
||||
MOVQ 48(SP), R8
|
||||
MOVQ 56(SP), R9
|
||||
SYSCALL
|
||||
JCC ok6
|
||||
MOVQ $-1, 64(SP) // r1
|
||||
MOVQ $0, 72(SP) // r2
|
||||
MOVQ AX, 80(SP) // errno
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
ok6:
|
||||
MOVQ AX, 64(SP) // r1
|
||||
MOVQ DX, 72(SP) // r2
|
||||
MOVQ $0, 80(SP) // errno
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·Syscall9(SB),7,$0
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOVQ 8(SP), AX // syscall entry
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
MOVQ 32(SP), DX
|
||||
MOVQ 40(SP), R10
|
||||
MOVQ 48(SP), R8
|
||||
MOVQ 56(SP), R9
|
||||
MOVQ 64(SP), R11
|
||||
MOVQ 72(SP), R12
|
||||
MOVQ 80(SP), R13
|
||||
SUBQ $32, SP
|
||||
MOVQ R11, 8(SP) // arg 7
|
||||
MOVQ R12, 16(SP) // arg 8
|
||||
MOVQ R13, 24(SP) // arg 9
|
||||
SYSCALL
|
||||
JCC ok9
|
||||
ADDQ $32, SP
|
||||
MOVQ $-1, 64(SP) // r1
|
||||
MOVQ $0, 72(SP) // r2
|
||||
MOVQ AX, 80(SP) // errno
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
ok9:
|
||||
ADDQ $32, SP
|
||||
MOVQ AX, 64(SP) // r1
|
||||
MOVQ DX, 72(SP) // r2
|
||||
MOVQ $0, 80(SP) // errno
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),7,$0
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
MOVQ 32(SP), DX
|
||||
MOVQ $0, R10
|
||||
MOVQ $0, R8
|
||||
MOVQ $0, R9
|
||||
MOVQ 8(SP), AX // syscall entry
|
||||
SYSCALL
|
||||
JCC ok1
|
||||
MOVQ $-1, 40(SP) // r1
|
||||
MOVQ $0, 48(SP) // r2
|
||||
MOVQ AX, 56(SP) // errno
|
||||
RET
|
||||
ok1:
|
||||
MOVQ AX, 40(SP) // r1
|
||||
MOVQ DX, 48(SP) // r2
|
||||
MOVQ $0, 56(SP) // errno
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall6(SB),7,$0
|
||||
MOVQ 16(SP), DI
|
||||
MOVQ 24(SP), SI
|
||||
MOVQ 32(SP), DX
|
||||
MOVQ 40(SP), R10
|
||||
MOVQ 48(SP), R8
|
||||
MOVQ 56(SP), R9
|
||||
MOVQ 8(SP), AX // syscall entry
|
||||
SYSCALL
|
||||
JCC ok2
|
||||
MOVQ $-1, 64(SP) // r1
|
||||
MOVQ $0, 72(SP) // r2
|
||||
MOVQ AX, 80(SP) // errno
|
||||
RET
|
||||
ok2:
|
||||
MOVQ AX, 64(SP) // r1
|
||||
MOVQ DX, 72(SP) // r2
|
||||
MOVQ $0, 80(SP) // errno
|
||||
RET
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin freebsd openbsd
|
||||
// +build darwin freebsd netbsd openbsd
|
||||
|
||||
// Berkeley packet filter for BSD variants
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin freebsd linux openbsd
|
||||
// +build darwin freebsd linux netbsd openbsd
|
||||
|
||||
// Unix environment variables.
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin freebsd linux openbsd
|
||||
// +build darwin freebsd linux netbsd openbsd
|
||||
|
||||
// Fork, exec, wait, etc.
|
||||
|
||||
|
@ -148,6 +148,18 @@ linux_arm)
|
||||
mksysnum="./mksysnum_linux.pl /usr/include/asm/unistd.h"
|
||||
mktypes="GOARCH=$GOARCH cgo -godefs"
|
||||
;;
|
||||
netbsd_386)
|
||||
mkerrors="$mkerrors -m32"
|
||||
mksyscall="./mksyscall.pl -l32 -netbsd"
|
||||
mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
|
||||
mktypes="GOARCH=$GOARCH cgo -godefs"
|
||||
;;
|
||||
netbsd_amd64)
|
||||
mkerrors="$mkerrors -m64"
|
||||
mksyscall="./mksyscall.pl -netbsd"
|
||||
mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
|
||||
mktypes="GOARCH=$GOARCH cgo -godefs"
|
||||
;;
|
||||
openbsd_386)
|
||||
mkerrors="$mkerrors -m32"
|
||||
mksyscall="./mksyscall.pl -l32 -openbsd"
|
||||
@ -194,7 +206,7 @@ esac
|
||||
if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi
|
||||
syscall_goos="syscall_$GOOS.go"
|
||||
case "$GOOS" in
|
||||
darwin | freebsd | openbsd)
|
||||
darwin | freebsd | netbsd | openbsd)
|
||||
syscall_goos="syscall_bsd.go $syscall_goos"
|
||||
;;
|
||||
esac
|
||||
|
@ -84,6 +84,27 @@ includes_Linux='
|
||||
#include <netpacket/packet.h>
|
||||
'
|
||||
|
||||
includes_NetBSD='
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/sockio.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/termios.h>
|
||||
#include <sys/ttycom.h>
|
||||
#include <sys/wait.h>
|
||||
#include <net/bpf.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_types.h>
|
||||
#include <net/route.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <netinet/ip_mroute.h>
|
||||
#include <netinet/if_ether.h>
|
||||
'
|
||||
|
||||
includes_OpenBSD='
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -26,6 +26,7 @@ my $errors = 0;
|
||||
my $_32bit = "";
|
||||
my $plan9 = 0;
|
||||
my $openbsd = 0;
|
||||
my $netbsd = 0;
|
||||
|
||||
if($ARGV[0] eq "-b32") {
|
||||
$_32bit = "big-endian";
|
||||
@ -42,6 +43,10 @@ if($ARGV[0] eq "-openbsd") {
|
||||
$openbsd = 1;
|
||||
shift;
|
||||
}
|
||||
if($ARGV[0] eq "-netbsd") {
|
||||
$netbsd = 1;
|
||||
shift;
|
||||
}
|
||||
|
||||
if($ARGV[0] =~ /^-/) {
|
||||
print STDERR "usage: mksyscall.pl [-b32 | -l32] [file ...]\n";
|
||||
@ -120,7 +125,7 @@ while(<>) {
|
||||
$text .= "\n";
|
||||
push @args, "uintptr(_p$n)", "uintptr(len($name))";
|
||||
$n++;
|
||||
} elsif($type eq "int64" && $openbsd) {
|
||||
} elsif($type eq "int64" && ($openbsd || $netbsd)) {
|
||||
push @args, "0";
|
||||
if($_32bit eq "big-endian") {
|
||||
push @args, "uintptr($name>>32)", "uintptr($name)";
|
||||
|
51
src/pkg/syscall/mksysnum_netbsd.pl
Executable file
51
src/pkg/syscall/mksysnum_netbsd.pl
Executable file
@ -0,0 +1,51 @@
|
||||
#!/usr/bin/perl
|
||||
# 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.
|
||||
#
|
||||
# Generate system call table for OpenBSD from master list
|
||||
# (for example, /usr/src/sys/kern/syscalls.master).
|
||||
|
||||
use strict;
|
||||
|
||||
my $command = "mksysnum_netbsd.pl " . join(' ', @ARGV);
|
||||
|
||||
print <<EOF;
|
||||
// $command
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
|
||||
package syscall
|
||||
|
||||
const (
|
||||
EOF
|
||||
|
||||
my $line = '';
|
||||
while(<>){
|
||||
if($line =~ /^(.*)\\$/) {
|
||||
# Handle continuation
|
||||
$line = $1;
|
||||
$_ =~ s/^\s+//;
|
||||
$line .= $_;
|
||||
} else {
|
||||
# New line
|
||||
$line = $_;
|
||||
}
|
||||
next if $line =~ /\\$/;
|
||||
if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) {
|
||||
my $num = $1;
|
||||
my $proto = $6;
|
||||
my $compat = $8;
|
||||
my $name = "$7_$9";
|
||||
|
||||
$name = "$7_$11" if $11 ne '';
|
||||
$name =~ y/a-z/A-Z/;
|
||||
|
||||
if($compat eq '' || $compat eq '30' || $compat eq '50') {
|
||||
print " $name = $num; // $proto\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print <<EOF;
|
||||
)
|
||||
EOF
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin freebsd openbsd
|
||||
// +build darwin freebsd netbsd openbsd
|
||||
|
||||
// Routing sockets and messages
|
||||
|
||||
|
35
src/pkg/syscall/route_netbsd.go
Normal file
35
src/pkg/syscall/route_netbsd.go
Normal file
@ -0,0 +1,35 @@
|
||||
// Copyright 2011 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Routing sockets and messages for NetBSD
|
||||
|
||||
package syscall
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func (any *anyMessage) toRoutingMessage(buf []byte) RoutingMessage {
|
||||
switch any.Type {
|
||||
case RTM_ADD, RTM_DELETE, RTM_CHANGE, RTM_GET, RTM_LOSING, RTM_REDIRECT, RTM_MISS, RTM_LOCK, RTM_RESOLVE:
|
||||
p := (*RouteMessage)(unsafe.Pointer(any))
|
||||
rtm := &RouteMessage{}
|
||||
rtm.Header = p.Header
|
||||
rtm.Data = buf[SizeofRtMsghdr:any.Msglen]
|
||||
return rtm
|
||||
case RTM_IFINFO:
|
||||
p := (*InterfaceMessage)(unsafe.Pointer(any))
|
||||
ifm := &InterfaceMessage{}
|
||||
ifm.Header = p.Header
|
||||
ifm.Data = buf[SizeofIfMsghdr:any.Msglen]
|
||||
return ifm
|
||||
case RTM_NEWADDR, RTM_DELADDR:
|
||||
p := (*InterfaceAddrMessage)(unsafe.Pointer(any))
|
||||
ifam := &InterfaceAddrMessage{}
|
||||
ifam.Header = p.Header
|
||||
ifam.Data = buf[SizeofIfaMsghdr:any.Msglen]
|
||||
return ifam
|
||||
}
|
||||
return nil
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin freebsd linux openbsd
|
||||
// +build darwin freebsd linux netbsd openbsd
|
||||
|
||||
// Socket control messages
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin freebsd openbsd
|
||||
// +build darwin freebsd netbsd openbsd
|
||||
|
||||
// BSD system call wrappers shared by *BSD based systems
|
||||
// including OS X (Darwin) and FreeBSD. Like the other
|
||||
|
437
src/pkg/syscall/syscall_netbsd.go
Normal file
437
src/pkg/syscall/syscall_netbsd.go
Normal file
@ -0,0 +1,437 @@
|
||||
// Copyright 2009,2010 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// NetBSD system calls.
|
||||
// This file is compiled as ordinary Go code,
|
||||
// but it is also input to mksyscall,
|
||||
// which parses the //sys lines and generates system call stubs.
|
||||
// Note that sometimes we use a lowercase //sys name and wrap
|
||||
// it in our own nicer implementation, either here or in
|
||||
// syscall_bsd.go or syscall_unix.go.
|
||||
|
||||
package syscall
|
||||
|
||||
import "unsafe"
|
||||
|
||||
const OS = "netbsd"
|
||||
|
||||
type SockaddrDatalink struct {
|
||||
Len uint8
|
||||
Family uint8
|
||||
Index uint16
|
||||
Type uint8
|
||||
Nlen uint8
|
||||
Alen uint8
|
||||
Slen uint8
|
||||
Data [24]int8
|
||||
raw RawSockaddrDatalink
|
||||
}
|
||||
|
||||
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno)
|
||||
|
||||
func nametomib(name string) (mib []_C_int, err error) {
|
||||
return nil, EINVAL
|
||||
}
|
||||
|
||||
// ParseDirent parses up to max directory entries in buf,
|
||||
// appending the names to names. It returns the number
|
||||
// bytes consumed from buf, the number of entries added
|
||||
// to names, and the new names slice.
|
||||
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
|
||||
origlen := len(buf)
|
||||
for max != 0 && len(buf) > 0 {
|
||||
dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
|
||||
if dirent.Reclen == 0 {
|
||||
buf = nil
|
||||
break
|
||||
}
|
||||
buf = buf[dirent.Reclen:]
|
||||
if dirent.Fileno == 0 { // File absent in directory.
|
||||
continue
|
||||
}
|
||||
bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
|
||||
var name = string(bytes[0:dirent.Namlen])
|
||||
if name == "." || name == ".." { // Useless names
|
||||
continue
|
||||
}
|
||||
max--
|
||||
count++
|
||||
names = append(names, name)
|
||||
}
|
||||
return origlen - len(buf), count, names
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (err error)
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe(&pp)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
}
|
||||
|
||||
// TODO
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
return -1, ENOSYS
|
||||
}
|
||||
|
||||
// TODO
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
return -1, ENOSYS
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
//sys Access(path string, mode uint32) (err error)
|
||||
//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
|
||||
//sys Chdir(path string) (err error)
|
||||
//sys Chflags(path string, flags int) (err error)
|
||||
//sys Chmod(path string, mode uint32) (err error)
|
||||
//sys Chown(path string, uid int, gid int) (err error)
|
||||
//sys Chroot(path string) (err error)
|
||||
//sys Close(fd int) (err error)
|
||||
//sysnb Dup(fd int) (nfd int, err error)
|
||||
//sysnb Dup2(from int, to int) (err error)
|
||||
//sys Exit(code int)
|
||||
//sys Fchdir(fd int) (err error)
|
||||
//sys Fchflags(path string, flags int) (err error)
|
||||
//sys Fchmod(fd int, mode uint32) (err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Flock(fd int, how int) (err error)
|
||||
//sys Fpathconf(fd int, name int) (val int, err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fsync(fd int) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
//sysnb Geteuid() (uid int)
|
||||
//sysnb Getgid() (gid int)
|
||||
//sysnb Getpgid(pid int) (pgid int, err error)
|
||||
//sysnb Getpgrp() (pgrp int)
|
||||
//sysnb Getpid() (pid int)
|
||||
//sysnb Getppid() (ppid int)
|
||||
//sys Getpriority(which int, who int) (prio int, err error)
|
||||
//sysnb Getrlimit(which int, lim *Rlimit) (err error)
|
||||
//sysnb Getrusage(who int, rusage *Rusage) (err error)
|
||||
//sysnb Getsid(pid int) (sid int, err error)
|
||||
//sysnb Gettimeofday(tv *Timeval) (err error)
|
||||
//sysnb Getuid() (uid int)
|
||||
//sys Issetugid() (tainted bool)
|
||||
//sys Kill(pid int, signum int) (err error)
|
||||
//sys Kqueue() (fd int, err error)
|
||||
//sys Lchown(path string, uid int, gid int) (err error)
|
||||
//sys Link(path string, link string) (err error)
|
||||
//sys Listen(s int, backlog int) (err error)
|
||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||
//sys Mkdir(path string, mode uint32) (err error)
|
||||
//sys Mkfifo(path string, mode uint32) (err error)
|
||||
//sys Mknod(path string, mode uint32, dev int) (err error)
|
||||
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
||||
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
||||
//sys Pathconf(path string, name int) (val int, err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
|
||||
//sys Read(fd int, p []byte) (n int, err error)
|
||||
//sys Readlink(path string, buf []byte) (n int, err error)
|
||||
//sys Rename(from string, to string) (err error)
|
||||
//sys Revoke(path string) (err error)
|
||||
//sys Rmdir(path string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
|
||||
//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
|
||||
//sysnb Setegid(egid int) (err error)
|
||||
//sysnb Seteuid(euid int) (err error)
|
||||
//sysnb Setgid(gid int) (err error)
|
||||
//sysnb Setpgid(pid int, pgid int) (err error)
|
||||
//sys Setpriority(which int, who int, prio int) (err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
||||
//sysnb Setrlimit(which int, lim *Rlimit) (err error)
|
||||
//sysnb Setsid() (pid int, err error)
|
||||
//sysnb Settimeofday(tp *Timeval) (err error)
|
||||
//sysnb Setuid(uid int) (err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
//sys Symlink(path string, link string) (err error)
|
||||
//sys Sync() (err error)
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
//sys Umask(newmask int) (oldmask int)
|
||||
//sys Unlink(path string) (err error)
|
||||
//sys Unmount(path string, flags int) (err error)
|
||||
//sys Write(fd int, p []byte) (n int, err error)
|
||||
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
|
||||
//sys munmap(addr uintptr, length uintptr) (err error)
|
||||
//sys read(fd int, buf *byte, nbuf int) (n int, err error)
|
||||
//sys write(fd int, buf *byte, nbuf int) (n int, err error)
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
*/
|
||||
// ____semctl13
|
||||
// __clone
|
||||
// __fhopen40
|
||||
// __fhstat40
|
||||
// __fhstatvfs140
|
||||
// __fstat30
|
||||
// __getcwd
|
||||
// __getdents30
|
||||
// __getfh30
|
||||
// __getlogin
|
||||
// __lstat30
|
||||
// __mount50
|
||||
// __msgctl13
|
||||
// __msync13
|
||||
// __ntp_gettime30
|
||||
// __posix_chown
|
||||
// __posix_fadvise50
|
||||
// __posix_fchown
|
||||
// __posix_lchown
|
||||
// __posix_rename
|
||||
// __setlogin
|
||||
// __shmctl13
|
||||
// __sigaction_sigtramp
|
||||
// __sigaltstack14
|
||||
// __sigpending14
|
||||
// __sigprocmask14
|
||||
// __sigsuspend14
|
||||
// __sigtimedwait
|
||||
// __stat30
|
||||
// __syscall
|
||||
// __vfork14
|
||||
// _ksem_close
|
||||
// _ksem_destroy
|
||||
// _ksem_getvalue
|
||||
// _ksem_init
|
||||
// _ksem_open
|
||||
// _ksem_post
|
||||
// _ksem_trywait
|
||||
// _ksem_unlink
|
||||
// _ksem_wait
|
||||
// _lwp_continue
|
||||
// _lwp_create
|
||||
// _lwp_ctl
|
||||
// _lwp_detach
|
||||
// _lwp_exit
|
||||
// _lwp_getname
|
||||
// _lwp_getprivate
|
||||
// _lwp_kill
|
||||
// _lwp_park
|
||||
// _lwp_self
|
||||
// _lwp_setname
|
||||
// _lwp_setprivate
|
||||
// _lwp_suspend
|
||||
// _lwp_unpark
|
||||
// _lwp_unpark_all
|
||||
// _lwp_wait
|
||||
// _lwp_wakeup
|
||||
// _pset_bind
|
||||
// _sched_getaffinity
|
||||
// _sched_getparam
|
||||
// _sched_setaffinity
|
||||
// _sched_setparam
|
||||
// acct
|
||||
// aio_cancel
|
||||
// aio_error
|
||||
// aio_fsync
|
||||
// aio_read
|
||||
// aio_return
|
||||
// aio_suspend
|
||||
// aio_write
|
||||
// break
|
||||
// clock_getres
|
||||
// clock_gettime
|
||||
// clock_settime
|
||||
// compat_09_ogetdomainname
|
||||
// compat_09_osetdomainname
|
||||
// compat_09_ouname
|
||||
// compat_10_omsgsys
|
||||
// compat_10_osemsys
|
||||
// compat_10_oshmsys
|
||||
// compat_12_fstat12
|
||||
// compat_12_getdirentries
|
||||
// compat_12_lstat12
|
||||
// compat_12_msync
|
||||
// compat_12_oreboot
|
||||
// compat_12_oswapon
|
||||
// compat_12_stat12
|
||||
// compat_13_sigaction13
|
||||
// compat_13_sigaltstack13
|
||||
// compat_13_sigpending13
|
||||
// compat_13_sigprocmask13
|
||||
// compat_13_sigreturn13
|
||||
// compat_13_sigsuspend13
|
||||
// compat_14___semctl
|
||||
// compat_14_msgctl
|
||||
// compat_14_shmctl
|
||||
// compat_16___sigaction14
|
||||
// compat_16___sigreturn14
|
||||
// compat_20_fhstatfs
|
||||
// compat_20_fstatfs
|
||||
// compat_20_getfsstat
|
||||
// compat_20_statfs
|
||||
// compat_30___fhstat30
|
||||
// compat_30___fstat13
|
||||
// compat_30___lstat13
|
||||
// compat_30___stat13
|
||||
// compat_30_fhopen
|
||||
// compat_30_fhstat
|
||||
// compat_30_fhstatvfs1
|
||||
// compat_30_getdents
|
||||
// compat_30_getfh
|
||||
// compat_30_ntp_gettime
|
||||
// compat_30_socket
|
||||
// compat_40_mount
|
||||
// compat_43_fstat43
|
||||
// compat_43_lstat43
|
||||
// compat_43_oaccept
|
||||
// compat_43_ocreat
|
||||
// compat_43_oftruncate
|
||||
// compat_43_ogetdirentries
|
||||
// compat_43_ogetdtablesize
|
||||
// compat_43_ogethostid
|
||||
// compat_43_ogethostname
|
||||
// compat_43_ogetkerninfo
|
||||
// compat_43_ogetpagesize
|
||||
// compat_43_ogetpeername
|
||||
// compat_43_ogetrlimit
|
||||
// compat_43_ogetsockname
|
||||
// compat_43_okillpg
|
||||
// compat_43_olseek
|
||||
// compat_43_ommap
|
||||
// compat_43_oquota
|
||||
// compat_43_orecv
|
||||
// compat_43_orecvfrom
|
||||
// compat_43_orecvmsg
|
||||
// compat_43_osend
|
||||
// compat_43_osendmsg
|
||||
// compat_43_osethostid
|
||||
// compat_43_osethostname
|
||||
// compat_43_osetrlimit
|
||||
// compat_43_osigblock
|
||||
// compat_43_osigsetmask
|
||||
// compat_43_osigstack
|
||||
// compat_43_osigvec
|
||||
// compat_43_otruncate
|
||||
// compat_43_owait
|
||||
// compat_43_stat43
|
||||
// execve
|
||||
// extattr_delete_fd
|
||||
// extattr_delete_file
|
||||
// extattr_delete_link
|
||||
// extattr_get_fd
|
||||
// extattr_get_file
|
||||
// extattr_get_link
|
||||
// extattr_list_fd
|
||||
// extattr_list_file
|
||||
// extattr_list_link
|
||||
// extattr_set_fd
|
||||
// extattr_set_file
|
||||
// extattr_set_link
|
||||
// extattrctl
|
||||
// fchroot
|
||||
// fdatasync
|
||||
// fgetxattr
|
||||
// fktrace
|
||||
// flistxattr
|
||||
// fork
|
||||
// fremovexattr
|
||||
// fsetxattr
|
||||
// fstatvfs1
|
||||
// fsync_range
|
||||
// getcontext
|
||||
// getitimer
|
||||
// getvfsstat
|
||||
// getxattr
|
||||
// ioctl
|
||||
// ktrace
|
||||
// lchflags
|
||||
// lchmod
|
||||
// lfs_bmapv
|
||||
// lfs_markv
|
||||
// lfs_segclean
|
||||
// lfs_segwait
|
||||
// lgetxattr
|
||||
// lio_listio
|
||||
// listxattr
|
||||
// llistxattr
|
||||
// lremovexattr
|
||||
// lseek
|
||||
// lsetxattr
|
||||
// lutimes
|
||||
// madvise
|
||||
// mincore
|
||||
// minherit
|
||||
// mlock
|
||||
// mlockall
|
||||
// modctl
|
||||
// mprotect
|
||||
// mq_close
|
||||
// mq_getattr
|
||||
// mq_notify
|
||||
// mq_open
|
||||
// mq_receive
|
||||
// mq_send
|
||||
// mq_setattr
|
||||
// mq_timedreceive
|
||||
// mq_timedsend
|
||||
// mq_unlink
|
||||
// mremap
|
||||
// msgget
|
||||
// msgrcv
|
||||
// msgsnd
|
||||
// munlock
|
||||
// munlockall
|
||||
// nfssvc
|
||||
// ntp_adjtime
|
||||
// pmc_control
|
||||
// pmc_get_info
|
||||
// poll
|
||||
// pollts
|
||||
// preadv
|
||||
// profil
|
||||
// pselect
|
||||
// pset_assign
|
||||
// pset_create
|
||||
// pset_destroy
|
||||
// ptrace
|
||||
// pwritev
|
||||
// quotactl
|
||||
// rasctl
|
||||
// readv
|
||||
// reboot
|
||||
// removexattr
|
||||
// sa_enable
|
||||
// sa_preempt
|
||||
// sa_register
|
||||
// sa_setconcurrency
|
||||
// sa_stacks
|
||||
// sa_yield
|
||||
// sbrk
|
||||
// sched_yield
|
||||
// semconfig
|
||||
// semget
|
||||
// semop
|
||||
// setcontext
|
||||
// setitimer
|
||||
// setxattr
|
||||
// shmat
|
||||
// shmdt
|
||||
// shmget
|
||||
// sstk
|
||||
// statvfs1
|
||||
// swapctl
|
||||
// sysarch
|
||||
// syscall
|
||||
// timer_create
|
||||
// timer_delete
|
||||
// timer_getoverrun
|
||||
// timer_gettime
|
||||
// timer_settime
|
||||
// undelete
|
||||
// utrace
|
||||
// uuidgen
|
||||
// vadvise
|
||||
// vfork
|
||||
// writev
|
42
src/pkg/syscall/syscall_netbsd_386.go
Normal file
42
src/pkg/syscall/syscall_netbsd_386.go
Normal file
@ -0,0 +1,42 @@
|
||||
// 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.
|
||||
|
||||
package syscall
|
||||
|
||||
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)
|
||||
}
|
42
src/pkg/syscall/syscall_netbsd_amd64.go
Normal file
42
src/pkg/syscall/syscall_netbsd_amd64.go
Normal file
@ -0,0 +1,42 @@
|
||||
// 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.
|
||||
|
||||
package syscall
|
||||
|
||||
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 = 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 = nsec % 1e9 / 1e3
|
||||
tv.Sec = int64(nsec / 1e9)
|
||||
return
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin freebsd linux openbsd
|
||||
// +build darwin freebsd linux netbsd openbsd
|
||||
|
||||
package syscall
|
||||
|
||||
|
229
src/pkg/syscall/types_netbsd.go
Normal file
229
src/pkg/syscall/types_netbsd.go
Normal file
@ -0,0 +1,229 @@
|
||||
// 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.
|
||||
|
||||
/*
|
||||
Input to cgo -godefs. See also mkerrors.sh and mkall.sh
|
||||
*/
|
||||
|
||||
// +build ignore
|
||||
|
||||
// +godefs map struct_in_addr [4]byte /* in_addr */
|
||||
// +godefs map struct_in6_addr [16]byte /* in6_addr */
|
||||
|
||||
package syscall
|
||||
|
||||
/*
|
||||
#define KERNEL
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/wait.h>
|
||||
#include <net/bpf.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <net/route.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
enum {
|
||||
sizeofPtr = sizeof(void*),
|
||||
};
|
||||
|
||||
union sockaddr_all {
|
||||
struct sockaddr s1; // this one gets used for fields
|
||||
struct sockaddr_in s2; // these pad it out
|
||||
struct sockaddr_in6 s3;
|
||||
struct sockaddr_un s4;
|
||||
struct sockaddr_dl s5;
|
||||
};
|
||||
|
||||
struct sockaddr_any {
|
||||
struct sockaddr addr;
|
||||
char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
|
||||
};
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
// Machine characteristics; for internal use.
|
||||
|
||||
const (
|
||||
sizeofPtr = C.sizeofPtr
|
||||
sizeofShort = C.sizeof_short
|
||||
sizeofInt = C.sizeof_int
|
||||
sizeofLong = C.sizeof_long
|
||||
sizeofLongLong = C.sizeof_longlong
|
||||
)
|
||||
|
||||
// Basic types
|
||||
|
||||
type (
|
||||
_C_short C.short
|
||||
_C_int C.int
|
||||
_C_long C.long
|
||||
_C_long_long C.longlong
|
||||
)
|
||||
|
||||
// Time
|
||||
|
||||
type Timespec C.struct_timespec
|
||||
|
||||
type Timeval C.struct_timeval
|
||||
|
||||
// Processes
|
||||
|
||||
type Rusage C.struct_rusage
|
||||
|
||||
type Rlimit C.struct_rlimit
|
||||
|
||||
type _Gid_t C.gid_t
|
||||
|
||||
// Files
|
||||
|
||||
const ( // Directory mode bits
|
||||
S_IFMT = C.S_IFMT
|
||||
S_IFIFO = C.S_IFIFO
|
||||
S_IFCHR = C.S_IFCHR
|
||||
S_IFDIR = C.S_IFDIR
|
||||
S_IFBLK = C.S_IFBLK
|
||||
S_IFREG = C.S_IFREG
|
||||
S_IFLNK = C.S_IFLNK
|
||||
S_IFSOCK = C.S_IFSOCK
|
||||
S_ISUID = C.S_ISUID
|
||||
S_ISGID = C.S_ISGID
|
||||
S_ISVTX = C.S_ISVTX
|
||||
S_IRUSR = C.S_IRUSR
|
||||
S_IWUSR = C.S_IWUSR
|
||||
S_IXUSR = C.S_IXUSR
|
||||
)
|
||||
|
||||
type Stat_t C.struct_stat
|
||||
|
||||
type Statfs_t C.struct_statfs
|
||||
|
||||
type Flock_t C.struct_flock
|
||||
|
||||
type Dirent C.struct_dirent
|
||||
|
||||
type Fsid C.fsid_t
|
||||
|
||||
// Sockets
|
||||
|
||||
type RawSockaddrInet4 C.struct_sockaddr_in
|
||||
|
||||
type RawSockaddrInet6 C.struct_sockaddr_in6
|
||||
|
||||
type RawSockaddrUnix C.struct_sockaddr_un
|
||||
|
||||
type RawSockaddrDatalink C.struct_sockaddr_dl
|
||||
|
||||
type RawSockaddr C.struct_sockaddr
|
||||
|
||||
type RawSockaddrAny C.struct_sockaddr_any
|
||||
|
||||
type _Socklen C.socklen_t
|
||||
|
||||
type Linger C.struct_linger
|
||||
|
||||
type Iovec C.struct_iovec
|
||||
|
||||
type IPMreq C.struct_ip_mreq
|
||||
|
||||
type IPv6Mreq C.struct_ipv6_mreq
|
||||
|
||||
type Msghdr C.struct_msghdr
|
||||
|
||||
type Cmsghdr C.struct_cmsghdr
|
||||
|
||||
type Inet6Pktinfo C.struct_in6_pktinfo
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
|
||||
SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
|
||||
SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
|
||||
SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
|
||||
SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
|
||||
SizeofLinger = C.sizeof_struct_linger
|
||||
SizeofIPMreq = C.sizeof_struct_ip_mreq
|
||||
SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
|
||||
SizeofMsghdr = C.sizeof_struct_msghdr
|
||||
SizeofCmsghdr = C.sizeof_struct_cmsghdr
|
||||
SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
|
||||
)
|
||||
|
||||
// Ptrace requests
|
||||
|
||||
const (
|
||||
PTRACE_TRACEME = C.PT_TRACE_ME
|
||||
PTRACE_CONT = C.PT_CONTINUE
|
||||
PTRACE_KILL = C.PT_KILL
|
||||
)
|
||||
|
||||
// Events (kqueue, kevent)
|
||||
|
||||
type Kevent_t C.struct_kevent
|
||||
|
||||
// Select
|
||||
|
||||
type FdSet C.fd_set
|
||||
|
||||
// Routing and interface messages
|
||||
|
||||
const (
|
||||
SizeofIfMsghdr = C.sizeof_struct_if_msghdr
|
||||
SizeofIfData = C.sizeof_struct_if_data
|
||||
SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
|
||||
SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
|
||||
SizeofRtMetrics = C.sizeof_struct_rt_metrics
|
||||
)
|
||||
|
||||
type IfMsghdr C.struct_if_msghdr
|
||||
|
||||
type IfData C.struct_if_data
|
||||
|
||||
type IfaMsghdr C.struct_ifa_msghdr
|
||||
|
||||
type RtMsghdr C.struct_rt_msghdr
|
||||
|
||||
type RtMetrics C.struct_rt_metrics
|
||||
|
||||
type Mclpool C.struct_mclpool
|
||||
|
||||
// Berkeley packet filter
|
||||
|
||||
const (
|
||||
SizeofBpfVersion = C.sizeof_struct_bpf_version
|
||||
SizeofBpfStat = C.sizeof_struct_bpf_stat
|
||||
SizeofBpfProgram = C.sizeof_struct_bpf_program
|
||||
SizeofBpfInsn = C.sizeof_struct_bpf_insn
|
||||
SizeofBpfHdr = C.sizeof_struct_bpf_hdr
|
||||
)
|
||||
|
||||
type BpfVersion C.struct_bpf_version
|
||||
|
||||
type BpfStat C.struct_bpf_stat
|
||||
|
||||
type BpfProgram C.struct_bpf_program
|
||||
|
||||
type BpfInsn C.struct_bpf_insn
|
||||
|
||||
type BpfHdr C.struct_bpf_hdr
|
||||
|
||||
type BpfTimeval C.struct_bpf_timeval
|
1368
src/pkg/syscall/zerrors_netbsd_386.go
Normal file
1368
src/pkg/syscall/zerrors_netbsd_386.go
Normal file
File diff suppressed because it is too large
Load Diff
1368
src/pkg/syscall/zerrors_netbsd_amd64.go
Normal file
1368
src/pkg/syscall/zerrors_netbsd_amd64.go
Normal file
File diff suppressed because it is too large
Load Diff
1069
src/pkg/syscall/zsyscall_netbsd_386.go
Normal file
1069
src/pkg/syscall/zsyscall_netbsd_386.go
Normal file
File diff suppressed because it is too large
Load Diff
1069
src/pkg/syscall/zsyscall_netbsd_amd64.go
Normal file
1069
src/pkg/syscall/zsyscall_netbsd_amd64.go
Normal file
File diff suppressed because it is too large
Load Diff
274
src/pkg/syscall/zsysnum_netbsd_386.go
Normal file
274
src/pkg/syscall/zsysnum_netbsd_386.go
Normal file
@ -0,0 +1,274 @@
|
||||
// mksysnum_netbsd.pl
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; 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, size_t nbyte); }
|
||||
SYS_OPEN = 5 // { int|sys||open(const char *path, int flags, ... mode_t mode); }
|
||||
SYS_CLOSE = 6 // { int|sys||close(int fd); }
|
||||
SYS_LINK = 9 // { int|sys||link(const char *path, const char *link); }
|
||||
SYS_UNLINK = 10 // { int|sys||unlink(const char *path); }
|
||||
SYS_CHDIR = 12 // { int|sys||chdir(const char *path); }
|
||||
SYS_FCHDIR = 13 // { int|sys||fchdir(int fd); }
|
||||
SYS_CHMOD = 15 // { int|sys||chmod(const char *path, mode_t mode); }
|
||||
SYS_CHOWN = 16 // { int|sys||chown(const char *path, uid_t uid, gid_t gid); }
|
||||
SYS_BREAK = 17 // { int|sys||obreak(char *nsize); }
|
||||
SYS_GETPID = 20 // { pid_t|sys||getpid_with_ppid(void); }
|
||||
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_with_euid(void); }
|
||||
SYS_GETEUID = 25 // { uid_t|sys||geteuid(void); }
|
||||
SYS_PTRACE = 26 // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); }
|
||||
SYS_RECVMSG = 27 // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); }
|
||||
SYS_SENDMSG = 28 // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); }
|
||||
SYS_RECVFROM = 29 // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
|
||||
SYS_ACCEPT = 30 // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); }
|
||||
SYS_GETPEERNAME = 31 // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
|
||||
SYS_GETSOCKNAME = 32 // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
|
||||
SYS_ACCESS = 33 // { int|sys||access(const char *path, int flags); }
|
||||
SYS_CHFLAGS = 34 // { int|sys||chflags(const char *path, u_long flags); }
|
||||
SYS_FCHFLAGS = 35 // { int|sys||fchflags(int fd, u_long flags); }
|
||||
SYS_SYNC = 36 // { void|sys||sync(void); }
|
||||
SYS_KILL = 37 // { int|sys||kill(pid_t pid, int signum); }
|
||||
SYS_GETPPID = 39 // { pid_t|sys||getppid(void); }
|
||||
SYS_DUP = 41 // { int|sys||dup(int fd); }
|
||||
SYS_PIPE = 42 // { int|sys||pipe(void); }
|
||||
SYS_GETEGID = 43 // { gid_t|sys||getegid(void); }
|
||||
SYS_PROFIL = 44 // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); }
|
||||
SYS_KTRACE = 45 // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); }
|
||||
SYS_GETGID = 47 // { gid_t|sys||getgid_with_egid(void); }
|
||||
SYS___GETLOGIN = 49 // { int|sys||__getlogin(char *namebuf, size_t namelen); }
|
||||
SYS___SETLOGIN = 50 // { int|sys||__setlogin(const char *namebuf); }
|
||||
SYS_ACCT = 51 // { int|sys||acct(const char *path); }
|
||||
SYS_IOCTL = 54 // { int|sys||ioctl(int fd, u_long com, ... void *data); }
|
||||
SYS_REVOKE = 56 // { int|sys||revoke(const char *path); }
|
||||
SYS_SYMLINK = 57 // { int|sys||symlink(const char *path, const char *link); }
|
||||
SYS_READLINK = 58 // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); }
|
||||
SYS_EXECVE = 59 // { int|sys||execve(const char *path, char * const *argp, char * const *envp); }
|
||||
SYS_UMASK = 60 // { mode_t|sys||umask(mode_t newmask); }
|
||||
SYS_CHROOT = 61 // { int|sys||chroot(const char *path); }
|
||||
SYS_VFORK = 66 // { int|sys||vfork(void); }
|
||||
SYS_SBRK = 69 // { int|sys||sbrk(intptr_t incr); }
|
||||
SYS_SSTK = 70 // { int|sys||sstk(int incr); }
|
||||
SYS_VADVISE = 72 // { int|sys||ovadvise(int anom); }
|
||||
SYS_MUNMAP = 73 // { int|sys||munmap(void *addr, size_t len); }
|
||||
SYS_MPROTECT = 74 // { int|sys||mprotect(void *addr, size_t len, int prot); }
|
||||
SYS_MADVISE = 75 // { int|sys||madvise(void *addr, size_t len, int behav); }
|
||||
SYS_MINCORE = 78 // { int|sys||mincore(void *addr, size_t len, char *vec); }
|
||||
SYS_GETGROUPS = 79 // { int|sys||getgroups(int gidsetsize, gid_t *gidset); }
|
||||
SYS_SETGROUPS = 80 // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); }
|
||||
SYS_GETPGRP = 81 // { int|sys||getpgrp(void); }
|
||||
SYS_SETPGID = 82 // { int|sys||setpgid(pid_t pid, pid_t pgid); }
|
||||
SYS_DUP2 = 90 // { int|sys||dup2(int from, int to); }
|
||||
SYS_FCNTL = 92 // { int|sys||fcntl(int fd, int cmd, ... void *arg); }
|
||||
SYS_FSYNC = 95 // { int|sys||fsync(int fd); }
|
||||
SYS_SETPRIORITY = 96 // { int|sys||setpriority(int which, id_t who, int prio); }
|
||||
SYS_CONNECT = 98 // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); }
|
||||
SYS_GETPRIORITY = 100 // { int|sys||getpriority(int which, id_t who); }
|
||||
SYS_BIND = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); }
|
||||
SYS_SETSOCKOPT = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
|
||||
SYS_LISTEN = 106 // { int|sys||listen(int s, int backlog); }
|
||||
SYS_GETSOCKOPT = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
|
||||
SYS_READV = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); }
|
||||
SYS_WRITEV = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); }
|
||||
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, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
|
||||
SYS_SHUTDOWN = 134 // { int|sys||shutdown(int s, int how); }
|
||||
SYS_SOCKETPAIR = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); }
|
||||
SYS_MKDIR = 136 // { int|sys||mkdir(const char *path, mode_t mode); }
|
||||
SYS_RMDIR = 137 // { int|sys||rmdir(const char *path); }
|
||||
SYS_SETSID = 147 // { int|sys||setsid(void); }
|
||||
SYS_SYSARCH = 165 // { int|sys||sysarch(int op, void *parms); }
|
||||
SYS_PREAD = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); }
|
||||
SYS_PWRITE = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); }
|
||||
SYS_NTP_ADJTIME = 176 // { int|sys||ntp_adjtime(struct timex *tp); }
|
||||
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_GETRLIMIT = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); }
|
||||
SYS_SETRLIMIT = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); }
|
||||
SYS_MMAP = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); }
|
||||
SYS_LSEEK = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); }
|
||||
SYS_TRUNCATE = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); }
|
||||
SYS_FTRUNCATE = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); }
|
||||
SYS___SYSCTL = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); }
|
||||
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_UNDELETE = 205 // { int|sys||undelete(const char *path); }
|
||||
SYS_GETPGID = 207 // { pid_t|sys||getpgid(pid_t pid); }
|
||||
SYS_REBOOT = 208 // { int|sys||reboot(int opt, char *bootstr); }
|
||||
SYS_POLL = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); }
|
||||
SYS_SEMGET = 221 // { int|sys||semget(key_t key, int nsems, int semflg); }
|
||||
SYS_SEMOP = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); }
|
||||
SYS_SEMCONFIG = 223 // { int|sys||semconfig(int flag); }
|
||||
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, int msgflg); }
|
||||
SYS_MSGRCV = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
|
||||
SYS_SHMAT = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); }
|
||||
SYS_SHMDT = 230 // { int|sys||shmdt(const void *shmaddr); }
|
||||
SYS_SHMGET = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); }
|
||||
SYS_TIMER_CREATE = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); }
|
||||
SYS_TIMER_DELETE = 236 // { int|sys||timer_delete(timer_t timerid); }
|
||||
SYS_TIMER_GETOVERRUN = 239 // { int|sys||timer_getoverrun(timer_t timerid); }
|
||||
SYS_FDATASYNC = 241 // { int|sys||fdatasync(int fd); }
|
||||
SYS_MLOCKALL = 242 // { int|sys||mlockall(int flags); }
|
||||
SYS_MUNLOCKALL = 243 // { int|sys||munlockall(void); }
|
||||
SYS_SIGQUEUEINFO = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); }
|
||||
SYS_MODCTL = 246 // { int|sys||modctl(int cmd, void *arg); }
|
||||
SYS___POSIX_RENAME = 270 // { int|sys||__posix_rename(const char *from, const char *to); }
|
||||
SYS_SWAPCTL = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); }
|
||||
SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); }
|
||||
SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); }
|
||||
SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); }
|
||||
SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); }
|
||||
SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); }
|
||||
SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); }
|
||||
SYS_GETSID = 286 // { pid_t|sys||getsid(pid_t pid); }
|
||||
SYS___CLONE = 287 // { pid_t|sys||__clone(int flags, void *stack); }
|
||||
SYS_FKTRACE = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); }
|
||||
SYS_PREADV = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }
|
||||
SYS_PWRITEV = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }
|
||||
SYS___GETCWD = 296 // { int|sys||__getcwd(char *bufp, size_t length); }
|
||||
SYS_FCHROOT = 297 // { int|sys||fchroot(int fd); }
|
||||
SYS_LCHFLAGS = 304 // { int|sys||lchflags(const char *path, u_long flags); }
|
||||
SYS_ISSETUGID = 305 // { int|sys||issetugid(void); }
|
||||
SYS_UTRACE = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); }
|
||||
SYS_GETCONTEXT = 307 // { int|sys||getcontext(struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 308 // { int|sys||setcontext(const struct __ucontext *ucp); }
|
||||
SYS__LWP_CREATE = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); }
|
||||
SYS__LWP_EXIT = 310 // { int|sys||_lwp_exit(void); }
|
||||
SYS__LWP_SELF = 311 // { lwpid_t|sys||_lwp_self(void); }
|
||||
SYS__LWP_WAIT = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); }
|
||||
SYS__LWP_SUSPEND = 313 // { int|sys||_lwp_suspend(lwpid_t target); }
|
||||
SYS__LWP_CONTINUE = 314 // { int|sys||_lwp_continue(lwpid_t target); }
|
||||
SYS__LWP_WAKEUP = 315 // { int|sys||_lwp_wakeup(lwpid_t target); }
|
||||
SYS__LWP_GETPRIVATE = 316 // { void *|sys||_lwp_getprivate(void); }
|
||||
SYS__LWP_SETPRIVATE = 317 // { void|sys||_lwp_setprivate(void *ptr); }
|
||||
SYS__LWP_KILL = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); }
|
||||
SYS__LWP_DETACH = 319 // { int|sys||_lwp_detach(lwpid_t target); }
|
||||
SYS__LWP_UNPARK = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); }
|
||||
SYS__LWP_UNPARK_ALL = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); }
|
||||
SYS__LWP_SETNAME = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); }
|
||||
SYS__LWP_GETNAME = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); }
|
||||
SYS__LWP_CTL = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); }
|
||||
SYS_SA_REGISTER = 330 // { int|sys||sa_register(sa_upcall_t new, sa_upcall_t *old, int flags, ssize_t stackinfo_offset); }
|
||||
SYS_SA_STACKS = 331 // { int|sys||sa_stacks(int num, stack_t *stacks); }
|
||||
SYS_SA_ENABLE = 332 // { int|sys||sa_enable(void); }
|
||||
SYS_SA_SETCONCURRENCY = 333 // { int|sys||sa_setconcurrency(int concurrency); }
|
||||
SYS_SA_YIELD = 334 // { int|sys||sa_yield(void); }
|
||||
SYS_SA_PREEMPT = 335 // { int|sys||sa_preempt(int sa_id); }
|
||||
SYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); }
|
||||
SYS_PMC_GET_INFO = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); }
|
||||
SYS_PMC_CONTROL = 342 // { int|sys||pmc_control(int ctr, int op, void *args); }
|
||||
SYS_RASCTL = 343 // { int|sys||rasctl(void *addr, size_t len, int op); }
|
||||
SYS_KQUEUE = 344 // { int|sys||kqueue(void); }
|
||||
SYS__SCHED_SETPARAM = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); }
|
||||
SYS__SCHED_GETPARAM = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); }
|
||||
SYS__SCHED_SETAFFINITY = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); }
|
||||
SYS__SCHED_GETAFFINITY = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); }
|
||||
SYS_SCHED_YIELD = 350 // { int|sys||sched_yield(void); }
|
||||
SYS_FSYNC_RANGE = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); }
|
||||
SYS_UUIDGEN = 355 // { int|sys||uuidgen(struct uuid *store, int count); }
|
||||
SYS_GETVFSSTAT = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); }
|
||||
SYS_STATVFS1 = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); }
|
||||
SYS_FSTATVFS1 = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); }
|
||||
SYS_EXTATTRCTL = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_SET_FILE = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FILE = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_FILE = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_SET_FD = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FD = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_FD = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_SET_LINK = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_LINK = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_LINK = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_LIST_FD = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_FILE = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_LINK = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_SETXATTR = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); }
|
||||
SYS_LSETXATTR = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); }
|
||||
SYS_FSETXATTR = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); }
|
||||
SYS_GETXATTR = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); }
|
||||
SYS_LGETXATTR = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); }
|
||||
SYS_FGETXATTR = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); }
|
||||
SYS_LISTXATTR = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); }
|
||||
SYS_LLISTXATTR = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); }
|
||||
SYS_FLISTXATTR = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); }
|
||||
SYS_REMOVEXATTR = 384 // { int|sys||removexattr(const char *path, const char *name); }
|
||||
SYS_LREMOVEXATTR = 385 // { int|sys||lremovexattr(const char *path, const char *name); }
|
||||
SYS_FREMOVEXATTR = 386 // { int|sys||fremovexattr(int fd, const char *name); }
|
||||
SYS_GETDENTS = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); }
|
||||
SYS_SOCKET = 394 // { int|sys|30|socket(int domain, int type, int protocol); }
|
||||
SYS_GETFH = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); }
|
||||
SYS_MOUNT = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); }
|
||||
SYS_MREMAP = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); }
|
||||
SYS_PSET_CREATE = 412 // { int|sys||pset_create(psetid_t *psid); }
|
||||
SYS_PSET_DESTROY = 413 // { int|sys||pset_destroy(psetid_t psid); }
|
||||
SYS_PSET_ASSIGN = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); }
|
||||
SYS__PSET_BIND = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); }
|
||||
SYS_POSIX_FADVISE = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); }
|
||||
SYS_SELECT = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
|
||||
SYS_GETTIMEOFDAY = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); }
|
||||
SYS_SETTIMEOFDAY = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); }
|
||||
SYS_UTIMES = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); }
|
||||
SYS_ADJTIME = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); }
|
||||
SYS_FUTIMES = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); }
|
||||
SYS_LUTIMES = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); }
|
||||
SYS_SETITIMER = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
|
||||
SYS_GETITIMER = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); }
|
||||
SYS_CLOCK_GETTIME = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); }
|
||||
SYS_CLOCK_SETTIME = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); }
|
||||
SYS_CLOCK_GETRES = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); }
|
||||
SYS_NANOSLEEP = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
|
||||
SYS___SIGTIMEDWAIT = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); }
|
||||
SYS__LWP_PARK = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); }
|
||||
SYS_KEVENT = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); }
|
||||
SYS_PSELECT = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
|
||||
SYS_POLLTS = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
|
||||
SYS_STAT = 439 // { int|sys|50|stat(const char *path, struct stat *ub); }
|
||||
SYS_FSTAT = 440 // { int|sys|50|fstat(int fd, struct stat *sb); }
|
||||
SYS_LSTAT = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); }
|
||||
SYS___SEMCTL = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); }
|
||||
SYS_SHMCTL = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); }
|
||||
SYS_MSGCTL = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); }
|
||||
SYS_GETRUSAGE = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); }
|
||||
SYS_TIMER_SETTIME = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }
|
||||
SYS_TIMER_GETTIME = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); }
|
||||
SYS_NTP_GETTIME = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); }
|
||||
SYS_WAIT4 = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
|
||||
SYS_MKNOD = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); }
|
||||
SYS_FHSTAT = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); }
|
||||
SYS_QUOTACTL = 452 // { int|sys|50|quotactl(const char *path, struct plistref *pref); }
|
||||
SYS_PIPE2 = 453 // { int|sys||pipe2(int *fildes, int flags); }
|
||||
SYS_DUP3 = 454 // { int|sys||dup3(int from, int to, int flags); }
|
||||
SYS_KQUEUE1 = 455 // { int|sys||kqueue1(int flags); }
|
||||
SYS_PACCEPT = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); }
|
||||
SYS_LINKAT = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); }
|
||||
SYS_RENAMEAT = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); }
|
||||
SYS_MKFIFOAT = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); }
|
||||
SYS_MKNODAT = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); }
|
||||
SYS_MKDIRAT = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); }
|
||||
SYS_FACCESSAT = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); }
|
||||
SYS_FCHMODAT = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); }
|
||||
SYS_FCHOWNAT = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); }
|
||||
SYS_FEXECVE = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); }
|
||||
SYS_FSTATAT = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); }
|
||||
SYS_UTIMENSAT = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); }
|
||||
SYS_OPENAT = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); }
|
||||
SYS_READLINKAT = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); }
|
||||
SYS_SYMLINKAT = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); }
|
||||
SYS_UNLINKAT = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); }
|
||||
SYS_FUTIMENS = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); }
|
||||
)
|
274
src/pkg/syscall/zsysnum_netbsd_amd64.go
Normal file
274
src/pkg/syscall/zsysnum_netbsd_amd64.go
Normal file
@ -0,0 +1,274 @@
|
||||
// mksysnum_netbsd.pl
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; 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, size_t nbyte); }
|
||||
SYS_OPEN = 5 // { int|sys||open(const char *path, int flags, ... mode_t mode); }
|
||||
SYS_CLOSE = 6 // { int|sys||close(int fd); }
|
||||
SYS_LINK = 9 // { int|sys||link(const char *path, const char *link); }
|
||||
SYS_UNLINK = 10 // { int|sys||unlink(const char *path); }
|
||||
SYS_CHDIR = 12 // { int|sys||chdir(const char *path); }
|
||||
SYS_FCHDIR = 13 // { int|sys||fchdir(int fd); }
|
||||
SYS_CHMOD = 15 // { int|sys||chmod(const char *path, mode_t mode); }
|
||||
SYS_CHOWN = 16 // { int|sys||chown(const char *path, uid_t uid, gid_t gid); }
|
||||
SYS_BREAK = 17 // { int|sys||obreak(char *nsize); }
|
||||
SYS_GETPID = 20 // { pid_t|sys||getpid_with_ppid(void); }
|
||||
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_with_euid(void); }
|
||||
SYS_GETEUID = 25 // { uid_t|sys||geteuid(void); }
|
||||
SYS_PTRACE = 26 // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); }
|
||||
SYS_RECVMSG = 27 // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); }
|
||||
SYS_SENDMSG = 28 // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); }
|
||||
SYS_RECVFROM = 29 // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
|
||||
SYS_ACCEPT = 30 // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); }
|
||||
SYS_GETPEERNAME = 31 // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
|
||||
SYS_GETSOCKNAME = 32 // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
|
||||
SYS_ACCESS = 33 // { int|sys||access(const char *path, int flags); }
|
||||
SYS_CHFLAGS = 34 // { int|sys||chflags(const char *path, u_long flags); }
|
||||
SYS_FCHFLAGS = 35 // { int|sys||fchflags(int fd, u_long flags); }
|
||||
SYS_SYNC = 36 // { void|sys||sync(void); }
|
||||
SYS_KILL = 37 // { int|sys||kill(pid_t pid, int signum); }
|
||||
SYS_GETPPID = 39 // { pid_t|sys||getppid(void); }
|
||||
SYS_DUP = 41 // { int|sys||dup(int fd); }
|
||||
SYS_PIPE = 42 // { int|sys||pipe(void); }
|
||||
SYS_GETEGID = 43 // { gid_t|sys||getegid(void); }
|
||||
SYS_PROFIL = 44 // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); }
|
||||
SYS_KTRACE = 45 // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); }
|
||||
SYS_GETGID = 47 // { gid_t|sys||getgid_with_egid(void); }
|
||||
SYS___GETLOGIN = 49 // { int|sys||__getlogin(char *namebuf, size_t namelen); }
|
||||
SYS___SETLOGIN = 50 // { int|sys||__setlogin(const char *namebuf); }
|
||||
SYS_ACCT = 51 // { int|sys||acct(const char *path); }
|
||||
SYS_IOCTL = 54 // { int|sys||ioctl(int fd, u_long com, ... void *data); }
|
||||
SYS_REVOKE = 56 // { int|sys||revoke(const char *path); }
|
||||
SYS_SYMLINK = 57 // { int|sys||symlink(const char *path, const char *link); }
|
||||
SYS_READLINK = 58 // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); }
|
||||
SYS_EXECVE = 59 // { int|sys||execve(const char *path, char * const *argp, char * const *envp); }
|
||||
SYS_UMASK = 60 // { mode_t|sys||umask(mode_t newmask); }
|
||||
SYS_CHROOT = 61 // { int|sys||chroot(const char *path); }
|
||||
SYS_VFORK = 66 // { int|sys||vfork(void); }
|
||||
SYS_SBRK = 69 // { int|sys||sbrk(intptr_t incr); }
|
||||
SYS_SSTK = 70 // { int|sys||sstk(int incr); }
|
||||
SYS_VADVISE = 72 // { int|sys||ovadvise(int anom); }
|
||||
SYS_MUNMAP = 73 // { int|sys||munmap(void *addr, size_t len); }
|
||||
SYS_MPROTECT = 74 // { int|sys||mprotect(void *addr, size_t len, int prot); }
|
||||
SYS_MADVISE = 75 // { int|sys||madvise(void *addr, size_t len, int behav); }
|
||||
SYS_MINCORE = 78 // { int|sys||mincore(void *addr, size_t len, char *vec); }
|
||||
SYS_GETGROUPS = 79 // { int|sys||getgroups(int gidsetsize, gid_t *gidset); }
|
||||
SYS_SETGROUPS = 80 // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); }
|
||||
SYS_GETPGRP = 81 // { int|sys||getpgrp(void); }
|
||||
SYS_SETPGID = 82 // { int|sys||setpgid(pid_t pid, pid_t pgid); }
|
||||
SYS_DUP2 = 90 // { int|sys||dup2(int from, int to); }
|
||||
SYS_FCNTL = 92 // { int|sys||fcntl(int fd, int cmd, ... void *arg); }
|
||||
SYS_FSYNC = 95 // { int|sys||fsync(int fd); }
|
||||
SYS_SETPRIORITY = 96 // { int|sys||setpriority(int which, id_t who, int prio); }
|
||||
SYS_CONNECT = 98 // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); }
|
||||
SYS_GETPRIORITY = 100 // { int|sys||getpriority(int which, id_t who); }
|
||||
SYS_BIND = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); }
|
||||
SYS_SETSOCKOPT = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
|
||||
SYS_LISTEN = 106 // { int|sys||listen(int s, int backlog); }
|
||||
SYS_GETSOCKOPT = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
|
||||
SYS_READV = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); }
|
||||
SYS_WRITEV = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); }
|
||||
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, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
|
||||
SYS_SHUTDOWN = 134 // { int|sys||shutdown(int s, int how); }
|
||||
SYS_SOCKETPAIR = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); }
|
||||
SYS_MKDIR = 136 // { int|sys||mkdir(const char *path, mode_t mode); }
|
||||
SYS_RMDIR = 137 // { int|sys||rmdir(const char *path); }
|
||||
SYS_SETSID = 147 // { int|sys||setsid(void); }
|
||||
SYS_SYSARCH = 165 // { int|sys||sysarch(int op, void *parms); }
|
||||
SYS_PREAD = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); }
|
||||
SYS_PWRITE = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); }
|
||||
SYS_NTP_ADJTIME = 176 // { int|sys||ntp_adjtime(struct timex *tp); }
|
||||
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_GETRLIMIT = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); }
|
||||
SYS_SETRLIMIT = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); }
|
||||
SYS_MMAP = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); }
|
||||
SYS_LSEEK = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); }
|
||||
SYS_TRUNCATE = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); }
|
||||
SYS_FTRUNCATE = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); }
|
||||
SYS___SYSCTL = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); }
|
||||
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_UNDELETE = 205 // { int|sys||undelete(const char *path); }
|
||||
SYS_GETPGID = 207 // { pid_t|sys||getpgid(pid_t pid); }
|
||||
SYS_REBOOT = 208 // { int|sys||reboot(int opt, char *bootstr); }
|
||||
SYS_POLL = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); }
|
||||
SYS_SEMGET = 221 // { int|sys||semget(key_t key, int nsems, int semflg); }
|
||||
SYS_SEMOP = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); }
|
||||
SYS_SEMCONFIG = 223 // { int|sys||semconfig(int flag); }
|
||||
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, int msgflg); }
|
||||
SYS_MSGRCV = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
|
||||
SYS_SHMAT = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); }
|
||||
SYS_SHMDT = 230 // { int|sys||shmdt(const void *shmaddr); }
|
||||
SYS_SHMGET = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); }
|
||||
SYS_TIMER_CREATE = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); }
|
||||
SYS_TIMER_DELETE = 236 // { int|sys||timer_delete(timer_t timerid); }
|
||||
SYS_TIMER_GETOVERRUN = 239 // { int|sys||timer_getoverrun(timer_t timerid); }
|
||||
SYS_FDATASYNC = 241 // { int|sys||fdatasync(int fd); }
|
||||
SYS_MLOCKALL = 242 // { int|sys||mlockall(int flags); }
|
||||
SYS_MUNLOCKALL = 243 // { int|sys||munlockall(void); }
|
||||
SYS_SIGQUEUEINFO = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); }
|
||||
SYS_MODCTL = 246 // { int|sys||modctl(int cmd, void *arg); }
|
||||
SYS___POSIX_RENAME = 270 // { int|sys||__posix_rename(const char *from, const char *to); }
|
||||
SYS_SWAPCTL = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); }
|
||||
SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); }
|
||||
SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); }
|
||||
SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); }
|
||||
SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); }
|
||||
SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); }
|
||||
SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); }
|
||||
SYS_GETSID = 286 // { pid_t|sys||getsid(pid_t pid); }
|
||||
SYS___CLONE = 287 // { pid_t|sys||__clone(int flags, void *stack); }
|
||||
SYS_FKTRACE = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); }
|
||||
SYS_PREADV = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }
|
||||
SYS_PWRITEV = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); }
|
||||
SYS___GETCWD = 296 // { int|sys||__getcwd(char *bufp, size_t length); }
|
||||
SYS_FCHROOT = 297 // { int|sys||fchroot(int fd); }
|
||||
SYS_LCHFLAGS = 304 // { int|sys||lchflags(const char *path, u_long flags); }
|
||||
SYS_ISSETUGID = 305 // { int|sys||issetugid(void); }
|
||||
SYS_UTRACE = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); }
|
||||
SYS_GETCONTEXT = 307 // { int|sys||getcontext(struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 308 // { int|sys||setcontext(const struct __ucontext *ucp); }
|
||||
SYS__LWP_CREATE = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); }
|
||||
SYS__LWP_EXIT = 310 // { int|sys||_lwp_exit(void); }
|
||||
SYS__LWP_SELF = 311 // { lwpid_t|sys||_lwp_self(void); }
|
||||
SYS__LWP_WAIT = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); }
|
||||
SYS__LWP_SUSPEND = 313 // { int|sys||_lwp_suspend(lwpid_t target); }
|
||||
SYS__LWP_CONTINUE = 314 // { int|sys||_lwp_continue(lwpid_t target); }
|
||||
SYS__LWP_WAKEUP = 315 // { int|sys||_lwp_wakeup(lwpid_t target); }
|
||||
SYS__LWP_GETPRIVATE = 316 // { void *|sys||_lwp_getprivate(void); }
|
||||
SYS__LWP_SETPRIVATE = 317 // { void|sys||_lwp_setprivate(void *ptr); }
|
||||
SYS__LWP_KILL = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); }
|
||||
SYS__LWP_DETACH = 319 // { int|sys||_lwp_detach(lwpid_t target); }
|
||||
SYS__LWP_UNPARK = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); }
|
||||
SYS__LWP_UNPARK_ALL = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); }
|
||||
SYS__LWP_SETNAME = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); }
|
||||
SYS__LWP_GETNAME = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); }
|
||||
SYS__LWP_CTL = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); }
|
||||
SYS_SA_REGISTER = 330 // { int|sys||sa_register(sa_upcall_t new, sa_upcall_t *old, int flags, ssize_t stackinfo_offset); }
|
||||
SYS_SA_STACKS = 331 // { int|sys||sa_stacks(int num, stack_t *stacks); }
|
||||
SYS_SA_ENABLE = 332 // { int|sys||sa_enable(void); }
|
||||
SYS_SA_SETCONCURRENCY = 333 // { int|sys||sa_setconcurrency(int concurrency); }
|
||||
SYS_SA_YIELD = 334 // { int|sys||sa_yield(void); }
|
||||
SYS_SA_PREEMPT = 335 // { int|sys||sa_preempt(int sa_id); }
|
||||
SYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); }
|
||||
SYS_PMC_GET_INFO = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); }
|
||||
SYS_PMC_CONTROL = 342 // { int|sys||pmc_control(int ctr, int op, void *args); }
|
||||
SYS_RASCTL = 343 // { int|sys||rasctl(void *addr, size_t len, int op); }
|
||||
SYS_KQUEUE = 344 // { int|sys||kqueue(void); }
|
||||
SYS__SCHED_SETPARAM = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); }
|
||||
SYS__SCHED_GETPARAM = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); }
|
||||
SYS__SCHED_SETAFFINITY = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); }
|
||||
SYS__SCHED_GETAFFINITY = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); }
|
||||
SYS_SCHED_YIELD = 350 // { int|sys||sched_yield(void); }
|
||||
SYS_FSYNC_RANGE = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); }
|
||||
SYS_UUIDGEN = 355 // { int|sys||uuidgen(struct uuid *store, int count); }
|
||||
SYS_GETVFSSTAT = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); }
|
||||
SYS_STATVFS1 = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); }
|
||||
SYS_FSTATVFS1 = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); }
|
||||
SYS_EXTATTRCTL = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_SET_FILE = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FILE = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_FILE = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_SET_FD = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FD = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_FD = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_SET_LINK = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_LINK = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_LINK = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_LIST_FD = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_FILE = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_LINK = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_SETXATTR = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); }
|
||||
SYS_LSETXATTR = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); }
|
||||
SYS_FSETXATTR = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); }
|
||||
SYS_GETXATTR = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); }
|
||||
SYS_LGETXATTR = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); }
|
||||
SYS_FGETXATTR = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); }
|
||||
SYS_LISTXATTR = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); }
|
||||
SYS_LLISTXATTR = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); }
|
||||
SYS_FLISTXATTR = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); }
|
||||
SYS_REMOVEXATTR = 384 // { int|sys||removexattr(const char *path, const char *name); }
|
||||
SYS_LREMOVEXATTR = 385 // { int|sys||lremovexattr(const char *path, const char *name); }
|
||||
SYS_FREMOVEXATTR = 386 // { int|sys||fremovexattr(int fd, const char *name); }
|
||||
SYS_GETDENTS = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); }
|
||||
SYS_SOCKET = 394 // { int|sys|30|socket(int domain, int type, int protocol); }
|
||||
SYS_GETFH = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); }
|
||||
SYS_MOUNT = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); }
|
||||
SYS_MREMAP = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); }
|
||||
SYS_PSET_CREATE = 412 // { int|sys||pset_create(psetid_t *psid); }
|
||||
SYS_PSET_DESTROY = 413 // { int|sys||pset_destroy(psetid_t psid); }
|
||||
SYS_PSET_ASSIGN = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); }
|
||||
SYS__PSET_BIND = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); }
|
||||
SYS_POSIX_FADVISE = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); }
|
||||
SYS_SELECT = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
|
||||
SYS_GETTIMEOFDAY = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); }
|
||||
SYS_SETTIMEOFDAY = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); }
|
||||
SYS_UTIMES = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); }
|
||||
SYS_ADJTIME = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); }
|
||||
SYS_FUTIMES = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); }
|
||||
SYS_LUTIMES = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); }
|
||||
SYS_SETITIMER = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
|
||||
SYS_GETITIMER = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); }
|
||||
SYS_CLOCK_GETTIME = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); }
|
||||
SYS_CLOCK_SETTIME = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); }
|
||||
SYS_CLOCK_GETRES = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); }
|
||||
SYS_NANOSLEEP = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
|
||||
SYS___SIGTIMEDWAIT = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); }
|
||||
SYS__LWP_PARK = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); }
|
||||
SYS_KEVENT = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); }
|
||||
SYS_PSELECT = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
|
||||
SYS_POLLTS = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
|
||||
SYS_STAT = 439 // { int|sys|50|stat(const char *path, struct stat *ub); }
|
||||
SYS_FSTAT = 440 // { int|sys|50|fstat(int fd, struct stat *sb); }
|
||||
SYS_LSTAT = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); }
|
||||
SYS___SEMCTL = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); }
|
||||
SYS_SHMCTL = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); }
|
||||
SYS_MSGCTL = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); }
|
||||
SYS_GETRUSAGE = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); }
|
||||
SYS_TIMER_SETTIME = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); }
|
||||
SYS_TIMER_GETTIME = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); }
|
||||
SYS_NTP_GETTIME = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); }
|
||||
SYS_WAIT4 = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
|
||||
SYS_MKNOD = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); }
|
||||
SYS_FHSTAT = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); }
|
||||
SYS_QUOTACTL = 452 // { int|sys|50|quotactl(const char *path, struct plistref *pref); }
|
||||
SYS_PIPE2 = 453 // { int|sys||pipe2(int *fildes, int flags); }
|
||||
SYS_DUP3 = 454 // { int|sys||dup3(int from, int to, int flags); }
|
||||
SYS_KQUEUE1 = 455 // { int|sys||kqueue1(int flags); }
|
||||
SYS_PACCEPT = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); }
|
||||
SYS_LINKAT = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); }
|
||||
SYS_RENAMEAT = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); }
|
||||
SYS_MKFIFOAT = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); }
|
||||
SYS_MKNODAT = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); }
|
||||
SYS_MKDIRAT = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); }
|
||||
SYS_FACCESSAT = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); }
|
||||
SYS_FCHMODAT = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); }
|
||||
SYS_FCHOWNAT = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); }
|
||||
SYS_FEXECVE = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); }
|
||||
SYS_FSTATAT = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); }
|
||||
SYS_UTIMENSAT = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); }
|
||||
SYS_OPENAT = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); }
|
||||
SYS_READLINKAT = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); }
|
||||
SYS_SYMLINKAT = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); }
|
||||
SYS_UNLINKAT = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); }
|
||||
SYS_FUTIMENS = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); }
|
||||
)
|
406
src/pkg/syscall/ztypes_netbsd_386.go
Normal file
406
src/pkg/syscall/ztypes_netbsd_386.go
Normal file
@ -0,0 +1,406 @@
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs types_netbsd.go
|
||||
|
||||
package syscall
|
||||
|
||||
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 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
|
||||
)
|
||||
|
||||
type Stat_t struct {
|
||||
Dev int32
|
||||
Ino uint32
|
||||
Mode uint32
|
||||
Nlink uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev int32
|
||||
Lspare0 int32
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
Size int64
|
||||
Blocks int64
|
||||
Blksize uint32
|
||||
Flags uint32
|
||||
Gen uint32
|
||||
Lspare1 int32
|
||||
X__st_birthtim Timespec
|
||||
Qspare [2]int64
|
||||
}
|
||||
|
||||
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 uint32
|
||||
F_spare [3]uint32
|
||||
F_fstypename [16]int8
|
||||
F_mntonname [90]int8
|
||||
F_mntfromname [90]int8
|
||||
Mount_info [160]byte
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
Start int64
|
||||
Len int64
|
||||
Pid int32
|
||||
Type int16
|
||||
Whence int16
|
||||
}
|
||||
|
||||
type Dirent struct {
|
||||
Fileno uint32
|
||||
Reclen uint16
|
||||
Type uint8
|
||||
Namlen uint8
|
||||
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 [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 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 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
|
||||
}
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = 0x10
|
||||
SizeofSockaddrInet6 = 0x1c
|
||||
SizeofSockaddrAny = 0x6c
|
||||
SizeofSockaddrUnix = 0x6a
|
||||
SizeofSockaddrDatalink = 0x20
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPv6Mreq = 0x14
|
||||
SizeofMsghdr = 0x1c
|
||||
SizeofCmsghdr = 0xc
|
||||
SizeofInet6Pktinfo = 0x14
|
||||
)
|
||||
|
||||
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]int32
|
||||
}
|
||||
|
||||
const (
|
||||
SizeofIfMsghdr = 0xe8
|
||||
SizeofIfData = 0xd0
|
||||
SizeofIfaMsghdr = 0x18
|
||||
SizeofRtMsghdr = 0x58
|
||||
SizeofRtMetrics = 0x30
|
||||
)
|
||||
|
||||
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
|
||||
Pad uint32
|
||||
Baudrate uint64
|
||||
Ipackets uint64
|
||||
Ierrors uint64
|
||||
Opackets uint64
|
||||
Oerrors uint64
|
||||
Collisions uint64
|
||||
Ibytes uint64
|
||||
Obytes uint64
|
||||
Imcasts uint64
|
||||
Omcasts uint64
|
||||
Iqdrops uint64
|
||||
Noproto uint64
|
||||
Capabilities uint32
|
||||
Lastchange Timeval
|
||||
Mclpool [7]Mclpool
|
||||
}
|
||||
|
||||
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 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
|
||||
Locks uint32
|
||||
Mtu uint32
|
||||
Expire uint32
|
||||
Refcnt uint32
|
||||
Hopcount uint32
|
||||
Recvpipe uint32
|
||||
Sendpipe uint32
|
||||
Ssthresh uint32
|
||||
Rtt uint32
|
||||
Rttvar uint32
|
||||
}
|
||||
|
||||
type Mclpool struct {
|
||||
Grown uint32
|
||||
Alive uint16
|
||||
Hwm uint16
|
||||
Cwm uint16
|
||||
Lwm uint16
|
||||
}
|
||||
|
||||
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 BpfTimeval
|
||||
Caplen uint32
|
||||
Datalen uint32
|
||||
Hdrlen uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
}
|
||||
|
||||
type BpfTimeval struct {
|
||||
Sec uint32
|
||||
Usec uint32
|
||||
}
|
412
src/pkg/syscall/ztypes_netbsd_amd64.go
Normal file
412
src/pkg/syscall/ztypes_netbsd_amd64.go
Normal file
@ -0,0 +1,412 @@
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs types_netbsd.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 int32
|
||||
Pad_cgo_0 [4]byte
|
||||
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
|
||||
)
|
||||
|
||||
type Stat_t struct {
|
||||
Dev int32
|
||||
Ino uint32
|
||||
Mode uint32
|
||||
Nlink uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev int32
|
||||
Lspare0 int32
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
Size int64
|
||||
Blocks int64
|
||||
Blksize uint32
|
||||
Flags uint32
|
||||
Gen uint32
|
||||
Lspare1 int32
|
||||
X__st_birthtim Timespec
|
||||
Qspare [2]int64
|
||||
}
|
||||
|
||||
type Statfs_t struct {
|
||||
F_flags uint32
|
||||
F_bsize uint32
|
||||
F_iosize uint32
|
||||
Pad_cgo_0 [4]byte
|
||||
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 uint32
|
||||
F_spare [3]uint32
|
||||
F_fstypename [16]int8
|
||||
F_mntonname [90]int8
|
||||
F_mntfromname [90]int8
|
||||
Pad_cgo_1 [4]byte
|
||||
Mount_info [160]byte
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
Start int64
|
||||
Len int64
|
||||
Pid int32
|
||||
Type int16
|
||||
Whence int16
|
||||
}
|
||||
|
||||
type Dirent struct {
|
||||
Fileno uint32
|
||||
Reclen uint16
|
||||
Type uint8
|
||||
Namlen uint8
|
||||
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 [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
|
||||
Pad_cgo_0 [4]byte
|
||||
Iov *Iovec
|
||||
Iovlen uint32
|
||||
Pad_cgo_1 [4]byte
|
||||
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
|
||||
}
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = 0x10
|
||||
SizeofSockaddrInet6 = 0x1c
|
||||
SizeofSockaddrAny = 0x6c
|
||||
SizeofSockaddrUnix = 0x6a
|
||||
SizeofSockaddrDatalink = 0x20
|
||||
SizeofLinger = 0x8
|
||||
SizeofIPMreq = 0x8
|
||||
SizeofIPv6Mreq = 0x14
|
||||
SizeofMsghdr = 0x30
|
||||
SizeofCmsghdr = 0xc
|
||||
SizeofInet6Pktinfo = 0x14
|
||||
)
|
||||
|
||||
const (
|
||||
PTRACE_TRACEME = 0x0
|
||||
PTRACE_CONT = 0x7
|
||||
PTRACE_KILL = 0x8
|
||||
)
|
||||
|
||||
type Kevent_t struct {
|
||||
Ident uint64
|
||||
Filter int16
|
||||
Flags uint16
|
||||
Fflags uint32
|
||||
Data int32
|
||||
Udata *byte
|
||||
}
|
||||
|
||||
type FdSet struct {
|
||||
Bits [32]int32
|
||||
}
|
||||
|
||||
const (
|
||||
SizeofIfMsghdr = 0xf0
|
||||
SizeofIfData = 0xd8
|
||||
SizeofIfaMsghdr = 0x18
|
||||
SizeofRtMsghdr = 0x58
|
||||
SizeofRtMetrics = 0x30
|
||||
)
|
||||
|
||||
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
|
||||
Pad uint32
|
||||
Baudrate uint64
|
||||
Ipackets uint64
|
||||
Ierrors uint64
|
||||
Opackets uint64
|
||||
Oerrors uint64
|
||||
Collisions uint64
|
||||
Ibytes uint64
|
||||
Obytes uint64
|
||||
Imcasts uint64
|
||||
Omcasts uint64
|
||||
Iqdrops uint64
|
||||
Noproto uint64
|
||||
Lastchange Timeval
|
||||
Mclpool [7]Mclpool
|
||||
Pad_cgo_0 [4]byte
|
||||
}
|
||||
|
||||
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 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
|
||||
Locks uint32
|
||||
Mtu uint32
|
||||
Expire uint32
|
||||
Refcnt uint32
|
||||
Hopcount uint32
|
||||
Recvpipe uint32
|
||||
Sendpipe uint32
|
||||
Ssthresh uint32
|
||||
Rtt uint32
|
||||
Rttvar uint32
|
||||
}
|
||||
|
||||
type Mclpool struct {
|
||||
Grown uint32
|
||||
Alive uint16
|
||||
Hwm uint16
|
||||
Cwm uint16
|
||||
Lwm uint16
|
||||
}
|
||||
|
||||
const (
|
||||
SizeofBpfVersion = 0x4
|
||||
SizeofBpfStat = 0x8
|
||||
SizeofBpfProgram = 0x10
|
||||
SizeofBpfInsn = 0x8
|
||||
SizeofBpfHdr = 0x14
|
||||
)
|
||||
|
||||
type BpfVersion struct {
|
||||
Major uint16
|
||||
Minor uint16
|
||||
}
|
||||
|
||||
type BpfStat struct {
|
||||
Recv uint32
|
||||
Drop uint32
|
||||
}
|
||||
|
||||
type BpfProgram struct {
|
||||
Len uint32
|
||||
Pad_cgo_0 [4]byte
|
||||
Insns *BpfInsn
|
||||
}
|
||||
|
||||
type BpfInsn struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
||||
type BpfHdr struct {
|
||||
Tstamp BpfTimeval
|
||||
Caplen uint32
|
||||
Datalen uint32
|
||||
Hdrlen uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
}
|
||||
|
||||
type BpfTimeval struct {
|
||||
Sec uint32
|
||||
Usec uint32
|
||||
}
|
Loading…
Reference in New Issue
Block a user