summaryrefslogtreecommitdiff
path: root/src/pkg/syscall
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/syscall')
-rw-r--r--src/pkg/syscall/asm_darwin_386.s142
-rw-r--r--src/pkg/syscall/asm_darwin_amd64.s106
-rw-r--r--src/pkg/syscall/asm_dragonfly_386.s139
-rw-r--r--src/pkg/syscall/asm_dragonfly_amd64.s133
-rw-r--r--src/pkg/syscall/asm_freebsd_386.s142
-rw-r--r--src/pkg/syscall/asm_freebsd_amd64.s141
-rw-r--r--src/pkg/syscall/asm_freebsd_arm.s129
-rw-r--r--src/pkg/syscall/asm_linux_386.s186
-rw-r--r--src/pkg/syscall/asm_linux_amd64.s126
-rw-r--r--src/pkg/syscall/asm_linux_arm.s155
-rw-r--r--src/pkg/syscall/asm_nacl_386.s43
-rw-r--r--src/pkg/syscall/asm_nacl_amd64p32.s41
-rw-r--r--src/pkg/syscall/asm_netbsd_386.s142
-rw-r--r--src/pkg/syscall/asm_netbsd_amd64.s135
-rw-r--r--src/pkg/syscall/asm_netbsd_arm.s126
-rw-r--r--src/pkg/syscall/asm_openbsd_386.s142
-rw-r--r--src/pkg/syscall/asm_openbsd_amd64.s135
-rw-r--r--src/pkg/syscall/asm_plan9_386.s164
-rw-r--r--src/pkg/syscall/asm_plan9_amd64.s170
-rw-r--r--src/pkg/syscall/asm_solaris_amd64.s7
-rw-r--r--src/pkg/syscall/asm_windows_386.s7
-rw-r--r--src/pkg/syscall/asm_windows_amd64.s7
-rw-r--r--src/pkg/syscall/bpf_bsd.go169
-rw-r--r--src/pkg/syscall/creds_test.go113
-rw-r--r--src/pkg/syscall/dir_plan9.go212
-rw-r--r--src/pkg/syscall/dll_windows.go279
-rw-r--r--src/pkg/syscall/env_plan9.go142
-rw-r--r--src/pkg/syscall/env_unix.go119
-rw-r--r--src/pkg/syscall/env_windows.go82
-rw-r--r--src/pkg/syscall/exec_bsd.go247
-rw-r--r--src/pkg/syscall/exec_linux.go262
-rw-r--r--src/pkg/syscall/exec_plan9.go650
-rw-r--r--src/pkg/syscall/exec_solaris.go243
-rw-r--r--src/pkg/syscall/exec_unix.go261
-rw-r--r--src/pkg/syscall/exec_windows.go341
-rw-r--r--src/pkg/syscall/fd_nacl.go326
-rw-r--r--src/pkg/syscall/flock.go22
-rw-r--r--src/pkg/syscall/flock_linux_32bit.go13
-rw-r--r--src/pkg/syscall/fs_nacl.go815
-rw-r--r--src/pkg/syscall/lsf_linux.go78
-rwxr-xr-xsrc/pkg/syscall/mkall.sh263
-rw-r--r--src/pkg/syscall/mkall_windows.bat21
-rwxr-xr-xsrc/pkg/syscall/mkerrors.sh433
-rwxr-xr-xsrc/pkg/syscall/mksyscall.pl313
-rwxr-xr-xsrc/pkg/syscall/mksyscall_solaris.pl279
-rw-r--r--src/pkg/syscall/mksyscall_windows.go662
-rwxr-xr-xsrc/pkg/syscall/mksysctl_openbsd.pl257
-rwxr-xr-xsrc/pkg/syscall/mksysnum_darwin.pl32
-rwxr-xr-xsrc/pkg/syscall/mksysnum_dragonfly.pl43
-rwxr-xr-xsrc/pkg/syscall/mksysnum_freebsd.pl56
-rwxr-xr-xsrc/pkg/syscall/mksysnum_linux.pl38
-rwxr-xr-xsrc/pkg/syscall/mksysnum_netbsd.pl51
-rwxr-xr-xsrc/pkg/syscall/mksysnum_openbsd.pl43
-rwxr-xr-xsrc/pkg/syscall/mksysnum_plan9.sh25
-rw-r--r--src/pkg/syscall/mmap_unix_test.go22
-rw-r--r--src/pkg/syscall/net_nacl.go912
-rw-r--r--src/pkg/syscall/netlink_linux.go177
-rw-r--r--src/pkg/syscall/race.go30
-rw-r--r--src/pkg/syscall/race0.go25
-rw-r--r--src/pkg/syscall/route_bsd.go224
-rw-r--r--src/pkg/syscall/route_darwin.go61
-rw-r--r--src/pkg/syscall/route_dragonfly.go72
-rw-r--r--src/pkg/syscall/route_freebsd.go78
-rw-r--r--src/pkg/syscall/route_freebsd_32bit.go24
-rw-r--r--src/pkg/syscall/route_freebsd_64bit.go14
-rw-r--r--src/pkg/syscall/route_netbsd.go35
-rw-r--r--src/pkg/syscall/route_openbsd.go35
-rw-r--r--src/pkg/syscall/security_windows.go384
-rw-r--r--src/pkg/syscall/so_solaris.go260
-rw-r--r--src/pkg/syscall/sockcmsg_linux.go36
-rw-r--r--src/pkg/syscall/sockcmsg_unix.go103
-rw-r--r--src/pkg/syscall/srpc_nacl.go822
-rw-r--r--src/pkg/syscall/str.go20
-rw-r--r--src/pkg/syscall/syscall.go81
-rw-r--r--src/pkg/syscall/syscall_bsd.go553
-rw-r--r--src/pkg/syscall/syscall_bsd_test.go34
-rw-r--r--src/pkg/syscall/syscall_darwin.go508
-rw-r--r--src/pkg/syscall/syscall_darwin_386.go70
-rw-r--r--src/pkg/syscall/syscall_darwin_amd64.go70
-rw-r--r--src/pkg/syscall/syscall_dragonfly.go408
-rw-r--r--src/pkg/syscall/syscall_dragonfly_386.go58
-rw-r--r--src/pkg/syscall/syscall_dragonfly_amd64.go58
-rw-r--r--src/pkg/syscall/syscall_freebsd.go430
-rw-r--r--src/pkg/syscall/syscall_freebsd_386.go58
-rw-r--r--src/pkg/syscall/syscall_freebsd_amd64.go58
-rw-r--r--src/pkg/syscall/syscall_freebsd_arm.go58
-rw-r--r--src/pkg/syscall/syscall_linux.go1025
-rw-r--r--src/pkg/syscall/syscall_linux_386.go356
-rw-r--r--src/pkg/syscall/syscall_linux_amd64.go115
-rw-r--r--src/pkg/syscall/syscall_linux_arm.go196
-rw-r--r--src/pkg/syscall/syscall_nacl.go311
-rw-r--r--src/pkg/syscall/syscall_nacl_386.go32
-rw-r--r--src/pkg/syscall/syscall_nacl_amd64p32.go32
-rw-r--r--src/pkg/syscall/syscall_netbsd.go489
-rw-r--r--src/pkg/syscall/syscall_netbsd_386.go42
-rw-r--r--src/pkg/syscall/syscall_netbsd_amd64.go42
-rw-r--r--src/pkg/syscall/syscall_netbsd_arm.go42
-rw-r--r--src/pkg/syscall/syscall_no_getwd.go11
-rw-r--r--src/pkg/syscall/syscall_openbsd.go299
-rw-r--r--src/pkg/syscall/syscall_openbsd_386.go42
-rw-r--r--src/pkg/syscall/syscall_openbsd_amd64.go42
-rw-r--r--src/pkg/syscall/syscall_plan9.go344
-rw-r--r--src/pkg/syscall/syscall_plan9_386.go32
-rw-r--r--src/pkg/syscall/syscall_plan9_amd64.go14
-rw-r--r--src/pkg/syscall/syscall_solaris.go523
-rw-r--r--src/pkg/syscall/syscall_solaris_amd64.go37
-rw-r--r--src/pkg/syscall/syscall_test.go30
-rw-r--r--src/pkg/syscall/syscall_unix.go299
-rw-r--r--src/pkg/syscall/syscall_unix_test.go314
-rw-r--r--src/pkg/syscall/syscall_windows.go936
-rw-r--r--src/pkg/syscall/syscall_windows_386.go5
-rw-r--r--src/pkg/syscall/syscall_windows_amd64.go5
-rw-r--r--src/pkg/syscall/syscall_windows_test.go72
-rw-r--r--src/pkg/syscall/tables_nacl.go324
-rw-r--r--src/pkg/syscall/time_nacl_386.s11
-rw-r--r--src/pkg/syscall/time_nacl_amd64p32.s11
-rw-r--r--src/pkg/syscall/types_darwin.go243
-rw-r--r--src/pkg/syscall/types_dragonfly.go242
-rw-r--r--src/pkg/syscall/types_freebsd.go342
-rw-r--r--src/pkg/syscall/types_linux.go484
-rw-r--r--src/pkg/syscall/types_netbsd.go232
-rw-r--r--src/pkg/syscall/types_openbsd.go244
-rw-r--r--src/pkg/syscall/types_plan9.c115
-rw-r--r--src/pkg/syscall/types_solaris.go222
-rw-r--r--src/pkg/syscall/unzip_nacl.go685
-rw-r--r--src/pkg/syscall/zerrors_darwin_386.go1421
-rw-r--r--src/pkg/syscall/zerrors_darwin_amd64.go1421
-rw-r--r--src/pkg/syscall/zerrors_dragonfly_386.go1526
-rw-r--r--src/pkg/syscall/zerrors_dragonfly_amd64.go1526
-rw-r--r--src/pkg/syscall/zerrors_freebsd_386.go1715
-rw-r--r--src/pkg/syscall/zerrors_freebsd_amd64.go1716
-rw-r--r--src/pkg/syscall/zerrors_freebsd_arm.go1715
-rw-r--r--src/pkg/syscall/zerrors_linux_386.go1544
-rw-r--r--src/pkg/syscall/zerrors_linux_amd64.go1545
-rw-r--r--src/pkg/syscall/zerrors_linux_arm.go1558
-rw-r--r--src/pkg/syscall/zerrors_netbsd_386.go1708
-rw-r--r--src/pkg/syscall/zerrors_netbsd_amd64.go1698
-rw-r--r--src/pkg/syscall/zerrors_netbsd_arm.go1684
-rw-r--r--src/pkg/syscall/zerrors_openbsd_386.go1580
-rw-r--r--src/pkg/syscall/zerrors_openbsd_amd64.go1579
-rw-r--r--src/pkg/syscall/zerrors_plan9_386.go48
-rw-r--r--src/pkg/syscall/zerrors_plan9_amd64.go48
-rw-r--r--src/pkg/syscall/zerrors_solaris_amd64.go1414
-rw-r--r--src/pkg/syscall/zerrors_windows.go283
-rw-r--r--src/pkg/syscall/zerrors_windows_386.go5
-rw-r--r--src/pkg/syscall/zerrors_windows_amd64.go5
-rw-r--r--src/pkg/syscall/zsyscall_darwin_386.go1387
-rw-r--r--src/pkg/syscall/zsyscall_darwin_amd64.go1387
-rw-r--r--src/pkg/syscall/zsyscall_dragonfly_386.go1287
-rw-r--r--src/pkg/syscall/zsyscall_dragonfly_amd64.go1287
-rw-r--r--src/pkg/syscall/zsyscall_freebsd_386.go1298
-rw-r--r--src/pkg/syscall/zsyscall_freebsd_amd64.go1298
-rw-r--r--src/pkg/syscall/zsyscall_freebsd_arm.go1298
-rw-r--r--src/pkg/syscall/zsyscall_linux_386.go1737
-rw-r--r--src/pkg/syscall/zsyscall_linux_amd64.go1930
-rw-r--r--src/pkg/syscall/zsyscall_linux_arm.go1885
-rw-r--r--src/pkg/syscall/zsyscall_nacl_386.go63
-rw-r--r--src/pkg/syscall/zsyscall_nacl_amd64p32.go63
-rw-r--r--src/pkg/syscall/zsyscall_netbsd_386.go1224
-rw-r--r--src/pkg/syscall/zsyscall_netbsd_amd64.go1224
-rw-r--r--src/pkg/syscall/zsyscall_netbsd_arm.go1224
-rw-r--r--src/pkg/syscall/zsyscall_openbsd_386.go1262
-rw-r--r--src/pkg/syscall/zsyscall_openbsd_amd64.go1262
-rw-r--r--src/pkg/syscall/zsyscall_plan9_386.go282
-rw-r--r--src/pkg/syscall/zsyscall_plan9_amd64.go282
-rw-r--r--src/pkg/syscall/zsyscall_solaris_amd64.go883
-rw-r--r--src/pkg/syscall/zsyscall_windows_386.go1760
-rw-r--r--src/pkg/syscall/zsyscall_windows_amd64.go1760
-rw-r--r--src/pkg/syscall/zsysctl_openbsd.go270
-rw-r--r--src/pkg/syscall/zsysnum_darwin_386.go360
-rw-r--r--src/pkg/syscall/zsysnum_darwin_amd64.go360
-rw-r--r--src/pkg/syscall/zsysnum_dragonfly_386.go302
-rw-r--r--src/pkg/syscall/zsysnum_dragonfly_amd64.go302
-rw-r--r--src/pkg/syscall/zsysnum_freebsd_386.go348
-rw-r--r--src/pkg/syscall/zsysnum_freebsd_amd64.go348
-rw-r--r--src/pkg/syscall/zsysnum_freebsd_arm.go348
-rw-r--r--src/pkg/syscall/zsysnum_linux_386.go345
-rw-r--r--src/pkg/syscall/zsysnum_linux_amd64.go310
-rw-r--r--src/pkg/syscall/zsysnum_linux_arm.go354
-rw-r--r--src/pkg/syscall/zsysnum_netbsd_386.go271
-rw-r--r--src/pkg/syscall/zsysnum_netbsd_amd64.go271
-rw-r--r--src/pkg/syscall/zsysnum_netbsd_arm.go271
-rw-r--r--src/pkg/syscall/zsysnum_openbsd_386.go205
-rw-r--r--src/pkg/syscall/zsysnum_openbsd_amd64.go205
-rw-r--r--src/pkg/syscall/zsysnum_plan9_386.go47
-rw-r--r--src/pkg/syscall/zsysnum_plan9_amd64.go48
-rw-r--r--src/pkg/syscall/zsysnum_solaris_amd64.go11
-rw-r--r--src/pkg/syscall/zsysnum_windows_386.go3
-rw-r--r--src/pkg/syscall/zsysnum_windows_amd64.go3
-rw-r--r--src/pkg/syscall/ztypes_darwin_386.go446
-rw-r--r--src/pkg/syscall/ztypes_darwin_amd64.go456
-rw-r--r--src/pkg/syscall/ztypes_dragonfly_386.go435
-rw-r--r--src/pkg/syscall/ztypes_dragonfly_amd64.go441
-rw-r--r--src/pkg/syscall/ztypes_freebsd_386.go492
-rw-r--r--src/pkg/syscall/ztypes_freebsd_amd64.go495
-rw-r--r--src/pkg/syscall/ztypes_freebsd_arm.go495
-rw-r--r--src/pkg/syscall/ztypes_linux_386.go690
-rw-r--r--src/pkg/syscall/ztypes_linux_amd64.go708
-rw-r--r--src/pkg/syscall/ztypes_linux_arm.go679
-rw-r--r--src/pkg/syscall/ztypes_netbsd_386.go394
-rw-r--r--src/pkg/syscall/ztypes_netbsd_amd64.go401
-rw-r--r--src/pkg/syscall/ztypes_netbsd_arm.go399
-rw-r--r--src/pkg/syscall/ztypes_openbsd_386.go439
-rw-r--r--src/pkg/syscall/ztypes_openbsd_amd64.go446
-rw-r--r--src/pkg/syscall/ztypes_plan9_386.go75
-rw-r--r--src/pkg/syscall/ztypes_plan9_amd64.go75
-rw-r--r--src/pkg/syscall/ztypes_solaris_amd64.go365
-rw-r--r--src/pkg/syscall/ztypes_windows.go1044
-rw-r--r--src/pkg/syscall/ztypes_windows_386.go22
-rw-r--r--src/pkg/syscall/ztypes_windows_amd64.go22
210 files changed, 0 insertions, 89851 deletions
diff --git a/src/pkg/syscall/asm_darwin_386.s b/src/pkg/syscall/asm_darwin_386.s
deleted file mode 100644
index 9b4dfa81d..000000000
--- a/src/pkg/syscall/asm_darwin_386.s
+++ /dev/null
@@ -1,142 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// System call support for 386, Darwin
-//
-
-// 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),NOSPLIT,$0-28
- 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),NOSPLIT,$0-40
- 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),NOSPLIT,$0-52
- 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),NOSPLIT,$0-28
- 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),NOSPLIT,$0-40
- 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
diff --git a/src/pkg/syscall/asm_darwin_amd64.s b/src/pkg/syscall/asm_darwin_amd64.s
deleted file mode 100644
index 19ea05be7..000000000
--- a/src/pkg/syscall/asm_darwin_amd64.s
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// System call support for AMD64, Darwin
-//
-
-// 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);
-// Trap # in AX, args in DI SI DX, return in AX DX
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- CALL runtime·entersyscall(SB)
- 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
- ADDQ $0x2000000, AX
- 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),NOSPLIT,$0-80
- CALL runtime·entersyscall(SB)
- 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
- ADDQ $0x2000000, AX
- 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 ·RawSyscall(SB),NOSPLIT,$0-56
- 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
- ADDQ $0x2000000, AX
- 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),NOSPLIT,$0-80
- 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
- ADDQ $0x2000000, AX
- 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
diff --git a/src/pkg/syscall/asm_dragonfly_386.s b/src/pkg/syscall/asm_dragonfly_386.s
deleted file mode 100644
index d24216fdd..000000000
--- a/src/pkg/syscall/asm_dragonfly_386.s
+++ /dev/null
@@ -1,139 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// System call support for 386, FreeBSD
-//
-
-// 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),NOSPLIT,$0-32
- 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),NOSPLIT,$0-44
- 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),NOSPLIT,$0-56
- 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),NOSPLIT,$0-32
- 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),NOSPLIT,$0-44
- 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
diff --git a/src/pkg/syscall/asm_dragonfly_amd64.s b/src/pkg/syscall/asm_dragonfly_amd64.s
deleted file mode 100644
index 31d107490..000000000
--- a/src/pkg/syscall/asm_dragonfly_amd64.s
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// System call support for AMD64, DragonFly
-//
-
-// 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),NOSPLIT,$0-64
- CALL runtime·entersyscall(SB)
- 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 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),NOSPLIT,$0-88
- CALL runtime·entersyscall(SB)
- 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 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),NOSPLIT,$0-112
- CALL runtime·entersyscall(SB)
- MOVQ 8(SP), AX
- MOVQ 16(SP), DI
- MOVQ 24(SP), SI
- MOVQ 32(SP), DX
- MOVQ 40(SP), R10
- MOVQ 48(SP), R8
- MOVQ 56(SP), R9
-
- // shift around the last three arguments so they're at the
- // top of the stack when the syscall is called.
- MOVQ 64(SP), R11 // arg 7
- MOVQ R11, 8(SP)
- MOVQ 72(SP), R11 // arg 8
- MOVQ R11, 16(SP)
- MOVQ 80(SP), R11 // arg 9
- MOVQ R11, 24(SP)
-
- SYSCALL
- JCC ok9
- MOVQ $-1, 88(SP) // r1
- MOVQ $0, 96(SP) // r2
- MOVQ AX, 104(SP) // errno
- CALL runtime·exitsyscall(SB)
- RET
-ok9:
- MOVQ AX, 88(SP) // r1
- MOVQ DX, 96(SP) // r2
- MOVQ $0, 104(SP) // errno
- CALL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-64
- 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),NOSPLIT,$0-88
- 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
diff --git a/src/pkg/syscall/asm_freebsd_386.s b/src/pkg/syscall/asm_freebsd_386.s
deleted file mode 100644
index 91a46b106..000000000
--- a/src/pkg/syscall/asm_freebsd_386.s
+++ /dev/null
@@ -1,142 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// System call support for 386, FreeBSD
-//
-
-// 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),NOSPLIT,$0-28
- 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),NOSPLIT,$0-40
- 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),NOSPLIT,$0-52
- 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),NOSPLIT,$0-28
- 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),NOSPLIT,$0-40
- 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
diff --git a/src/pkg/syscall/asm_freebsd_amd64.s b/src/pkg/syscall/asm_freebsd_amd64.s
deleted file mode 100644
index 7abb36828..000000000
--- a/src/pkg/syscall/asm_freebsd_amd64.s
+++ /dev/null
@@ -1,141 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// System call support for AMD64, FreeBSD
-//
-
-// The SYSCALL variant for invoking system calls is broken in FreeBSD.
-// See comment at top of ../runtime/sys_freebsd_amd64.c and
-// golang.org/issue/6372.
-#define SYSCALL MOVQ R10, CX; INT $0x80
-
-// 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),NOSPLIT,$0-56
- CALL runtime·entersyscall(SB)
- 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 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),NOSPLIT,$0-80
- CALL runtime·entersyscall(SB)
- 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 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),NOSPLIT,$0-104
- CALL runtime·entersyscall(SB)
- MOVQ 8(SP), AX
- MOVQ 16(SP), DI
- MOVQ 24(SP), SI
- MOVQ 32(SP), DX
- MOVQ 40(SP), R10
- MOVQ 48(SP), R8
- MOVQ 56(SP), R9
-
- // shift around the last three arguments so they're at the
- // top of the stack when the syscall is called.
- MOVQ 64(SP), R11 // arg 7
- MOVQ R11, 8(SP)
- MOVQ 72(SP), R11 // arg 8
- MOVQ R11, 16(SP)
- MOVQ 80(SP), R11 // arg 9
- MOVQ R11, 24(SP)
-
- SYSCALL
- JCC ok9
- MOVQ $-1, 88(SP) // r1
- MOVQ $0, 96(SP) // r2
- MOVQ AX, 104(SP) // errno
- CALL runtime·exitsyscall(SB)
- RET
-ok9:
- MOVQ AX, 88(SP) // r1
- MOVQ DX, 96(SP) // r2
- MOVQ $0, 104(SP) // errno
- CALL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- 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),NOSPLIT,$0-80
- 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
diff --git a/src/pkg/syscall/asm_freebsd_arm.s b/src/pkg/syscall/asm_freebsd_arm.s
deleted file mode 100644
index c01ce6feb..000000000
--- a/src/pkg/syscall/asm_freebsd_arm.s
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// System call support for ARM, FreeBSD
-//
-
-// func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, errno uintptr);
-// func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, errno uintptr);
-// func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2, errno uintptr)
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- BL runtime·entersyscall(SB)
- MOVW 0(FP), R7 // syscall number
- MOVW 4(FP), R0 // a1
- MOVW 8(FP), R1 // a2
- MOVW 12(FP), R2 // a3
- SWI $0 // syscall
- MOVW $0, R2
- BCS error
- MOVW R0, 16(FP) // r1
- MOVW R1, 20(FP) // r2
- MOVW R2, 24(FP) // errno
- BL runtime·exitsyscall(SB)
- RET
-error:
- MOVW $-1, R3
- MOVW R3, 16(FP) // r1
- MOVW R2, 20(FP) // r2
- MOVW R0, 24(FP) // errno
- BL runtime·exitsyscall(SB)
- RET
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- BL runtime·entersyscall(SB)
- MOVW 0(FP), R7 // syscall number
- MOVW 4(FP), R0 // a1
- MOVW 8(FP), R1 // a2
- MOVW 12(FP), R2 // a3
- MOVW 16(FP), R3 // a4
- MOVW R13, R4
- MOVW $20(FP), R13 // a5 to a6 are passed on stack
- SWI $0 // syscall
- MOVW R4, R13
- MOVW $0, R2
- BCS error6
- MOVW R0, 28(FP) // r1
- MOVW R1, 32(FP) // r2
- MOVW R2, 36(FP) // errno
- BL runtime·exitsyscall(SB)
- RET
-error6:
- MOVW $-1, R3
- MOVW R3, 28(FP) // r1
- MOVW R2, 32(FP) // r2
- MOVW R0, 36(FP) // errno
- BL runtime·exitsyscall(SB)
- RET
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- BL runtime·entersyscall(SB)
- MOVW 0(FP), R7 // syscall number
- MOVW 4(FP), R0 // a1
- MOVW 8(FP), R1 // a2
- MOVW 12(FP), R2 // a3
- MOVW 16(FP), R3 // a4
- MOVW R13, R4
- MOVW $20(FP), R13 // a5 to a9 are passed on stack
- SWI $0 // syscall
- MOVW R4, R13
- MOVW $0, R2
- BCS error9
- MOVW R0, 40(FP) // r1
- MOVW R1, 44(FP) // r2
- MOVW R2, 48(FP) // errno
- BL runtime·exitsyscall(SB)
- RET
-error9:
- MOVW $-1, R3
- MOVW R3, 40(FP) // r1
- MOVW R2, 44(FP) // r2
- MOVW R0, 48(FP) // errno
- BL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- MOVW 0(FP), R7 // syscall number
- MOVW 4(FP), R0 // a1
- MOVW 8(FP), R1 // a2
- MOVW 12(FP), R2 // a3
- SWI $0 // syscall
- MOVW $0, R2
- BCS errorr
- MOVW R0, 16(FP) // r1
- MOVW R1, 20(FP) // r2
- MOVW R2, 24(FP) // errno
- RET
-errorr:
- MOVW $-1, R3
- MOVW R3, 16(FP) // r1
- MOVW R2, 20(FP) // r2
- MOVW R0, 24(FP) // errno
- RET
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- MOVW 0(FP), R7 // syscall number
- MOVW 4(FP), R0 // a1
- MOVW 8(FP), R1 // a2
- MOVW 12(FP), R2 // a3
- MOVW 16(FP), R3 // a4
- MOVW R13, R4
- MOVW $20(FP), R13 // a5 to a6 are passed on stack
- SWI $0 // syscall
- MOVW R4, R13
- MOVW $0, R2
- BCS errorr6
- MOVW R0, 28(FP) // r1
- MOVW R1, 32(FP) // r2
- MOVW R2, 36(FP) // errno
- RET
-errorr6:
- MOVW $-1, R3
- MOVW R3, 28(FP) // r1
- MOVW R2, 32(FP) // r2
- MOVW R0, 36(FP) // errno
- RET
diff --git a/src/pkg/syscall/asm_linux_386.s b/src/pkg/syscall/asm_linux_386.s
deleted file mode 100644
index 30b22073d..000000000
--- a/src/pkg/syscall/asm_linux_386.s
+++ /dev/null
@@ -1,186 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// System calls for 386, Linux
-//
-
-// func Syscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-// Trap # in AX, args in BX CX DX SI DI, return in AX
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- CALL runtime·entersyscall(SB)
- MOVL 4(SP), AX // syscall entry
- MOVL 8(SP), BX
- MOVL 12(SP), CX
- MOVL 16(SP), DX
- MOVL $0, SI
- MOVL $0, DI
- CALL *runtime·_vdso(SB)
- CMPL AX, $0xfffff001
- JLS ok
- MOVL $-1, 20(SP) // r1
- MOVL $0, 24(SP) // r2
- NEGL AX
- 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
-
-// func Syscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- CALL runtime·entersyscall(SB)
- MOVL 4(SP), AX // syscall entry
- MOVL 8(SP), BX
- MOVL 12(SP), CX
- MOVL 16(SP), DX
- MOVL 20(SP), SI
- MOVL 24(SP), DI
- MOVL 28(SP), BP
- CALL *runtime·_vdso(SB)
- CMPL AX, $0xfffff001
- JLS ok6
- MOVL $-1, 32(SP) // r1
- MOVL $0, 36(SP) // r2
- NEGL AX
- 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
-
-// func RawSyscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- MOVL 4(SP), AX // syscall entry
- MOVL 8(SP), BX
- MOVL 12(SP), CX
- MOVL 16(SP), DX
- MOVL $0, SI
- MOVL $0, DI
- CALL *runtime·_vdso(SB)
- CMPL AX, $0xfffff001
- JLS ok1
- MOVL $-1, 20(SP) // r1
- MOVL $0, 24(SP) // r2
- NEGL AX
- MOVL AX, 28(SP) // errno
- RET
-ok1:
- MOVL AX, 20(SP) // r1
- MOVL DX, 24(SP) // r2
- MOVL $0, 28(SP) // errno
- RET
-
-// func RawSyscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- MOVL 4(SP), AX // syscall entry
- MOVL 8(SP), BX
- MOVL 12(SP), CX
- MOVL 16(SP), DX
- MOVL 20(SP), SI
- MOVL 24(SP), DI
- MOVL 28(SP), BP
- CALL *runtime·_vdso(SB)
- CMPL AX, $0xfffff001
- JLS ok2
- MOVL $-1, 32(SP) // r1
- MOVL $0, 36(SP) // r2
- NEGL AX
- MOVL AX, 40(SP) // errno
- RET
-ok2:
- MOVL AX, 32(SP) // r1
- MOVL DX, 36(SP) // r2
- MOVL $0, 40(SP) // errno
- RET
-
-#define SYS_SOCKETCALL 102 /* from zsysnum_linux_386.go */
-
-// func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, errno int)
-// Kernel interface gets call sub-number and pointer to a0.
-TEXT ·socketcall(SB),NOSPLIT,$0-36
- CALL runtime·entersyscall(SB)
- MOVL $SYS_SOCKETCALL, AX // syscall entry
- MOVL 4(SP), BX // socket call number
- LEAL 8(SP), CX // pointer to call arguments
- MOVL $0, DX
- MOVL $0, SI
- MOVL $0, DI
- CALL *runtime·_vdso(SB)
- CMPL AX, $0xfffff001
- JLS oksock
- MOVL $-1, 32(SP) // n
- NEGL AX
- MOVL AX, 36(SP) // errno
- CALL runtime·exitsyscall(SB)
- RET
-oksock:
- MOVL AX, 32(SP) // n
- MOVL $0, 36(SP) // errno
- CALL runtime·exitsyscall(SB)
- RET
-
-// func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, errno int)
-// Kernel interface gets call sub-number and pointer to a0.
-TEXT ·rawsocketcall(SB),NOSPLIT,$0-36
- MOVL $SYS_SOCKETCALL, AX // syscall entry
- MOVL 4(SP), BX // socket call number
- LEAL 8(SP), CX // pointer to call arguments
- MOVL $0, DX
- MOVL $0, SI
- MOVL $0, DI
- CALL *runtime·_vdso(SB)
- CMPL AX, $0xfffff001
- JLS oksock1
- MOVL $-1, 32(SP) // n
- NEGL AX
- MOVL AX, 36(SP) // errno
- RET
-oksock1:
- MOVL AX, 32(SP) // n
- MOVL $0, 36(SP) // errno
- RET
-
-#define SYS__LLSEEK 140 /* from zsysnum_linux_386.go */
-// func Seek(fd int, offset int64, whence int) (newoffset int64, errno int)
-// Implemented in assembly to avoid allocation when
-// taking the address of the return value newoffset.
-// Underlying system call is
-// llseek(int fd, int offhi, int offlo, int64 *result, int whence)
-TEXT ·seek(SB),NOSPLIT,$0-28
- CALL runtime·entersyscall(SB)
- MOVL $SYS__LLSEEK, AX // syscall entry
- MOVL 4(SP), BX // fd
- MOVL 12(SP), CX // offset-high
- MOVL 8(SP), DX // offset-low
- LEAL 20(SP), SI // result pointer
- MOVL 16(SP), DI // whence
- CALL *runtime·_vdso(SB)
- CMPL AX, $0xfffff001
- JLS okseek
- MOVL $-1, 20(SP) // newoffset low
- MOVL $-1, 24(SP) // newoffset high
- NEGL AX
- MOVL AX, 28(SP) // errno
- CALL runtime·exitsyscall(SB)
- RET
-okseek:
- // system call filled in newoffset already
- MOVL $0, 28(SP) // errno
- CALL runtime·exitsyscall(SB)
- RET
diff --git a/src/pkg/syscall/asm_linux_amd64.s b/src/pkg/syscall/asm_linux_amd64.s
deleted file mode 100644
index 995b60ecd..000000000
--- a/src/pkg/syscall/asm_linux_amd64.s
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// System calls for AMD64, Linux
-//
-
-// func Syscall(trap int64, a1, a2, a3 int64) (r1, r2, err int64);
-// Trap # in AX, args in DI SI DX R10 R8 R9, return in AX DX
-// Note that this differs from "standard" ABI convention, which
-// would pass 4th arg in CX, not R10.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- CALL runtime·entersyscall(SB)
- 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
- CMPQ AX, $0xfffffffffffff001
- JLS ok
- MOVQ $-1, 40(SP) // r1
- MOVQ $0, 48(SP) // r2
- NEGQ AX
- 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),NOSPLIT,$0-80
- CALL runtime·entersyscall(SB)
- 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
- CMPQ AX, $0xfffffffffffff001
- JLS ok6
- MOVQ $-1, 64(SP) // r1
- MOVQ $0, 72(SP) // r2
- NEGQ AX
- 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 ·RawSyscall(SB),NOSPLIT,$0-56
- 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
- CMPQ AX, $0xfffffffffffff001
- JLS ok1
- MOVQ $-1, 40(SP) // r1
- MOVQ $0, 48(SP) // r2
- NEGQ AX
- 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),NOSPLIT,$0-80
- 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
- CMPQ AX, $0xfffffffffffff001
- JLS ok2
- MOVQ $-1, 64(SP) // r1
- MOVQ $0, 72(SP) // r2
- NEGQ AX
- MOVQ AX, 80(SP) // errno
- RET
-ok2:
- MOVQ AX, 64(SP) // r1
- MOVQ DX, 72(SP) // r2
- MOVQ $0, 80(SP) // errno
- RET
-
-TEXT ·gettimeofday(SB),NOSPLIT,$0-16
- MOVQ 8(SP), DI
- MOVQ $0, SI
- MOVQ runtime·__vdso_gettimeofday_sym(SB), AX
- CALL AX
-
- CMPQ AX, $0xfffffffffffff001
- JLS ok7
- NEGQ AX
- MOVQ AX, 16(SP) // errno
- RET
-ok7:
- MOVQ $0, 16(SP) // errno
- RET
diff --git a/src/pkg/syscall/asm_linux_arm.s b/src/pkg/syscall/asm_linux_arm.s
deleted file mode 100644
index a28bc6cfc..000000000
--- a/src/pkg/syscall/asm_linux_arm.s
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// System calls for arm, Linux
-//
-
-// TODO(kaib): handle error returns
-
-// func Syscall(syscall uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- BL runtime·entersyscall(SB)
- MOVW 4(SP), R7
- MOVW 8(SP), R0
- MOVW 12(SP), R1
- MOVW 16(SP), R2
- SWI $0
- MOVW $0xfffff001, R1
- CMP R1, R0
- BLS ok
- MOVW $-1, R1
- MOVW R1, 20(SP) // r1
- MOVW $0, R2
- MOVW R2, 24(SP) // r2
- RSB $0, R0, R0
- MOVW R0, 28(SP) // errno
- BL runtime·exitsyscall(SB)
- RET
-ok:
- MOVW R0, 20(SP) // r1
- MOVW $0, R0
- MOVW R0, 24(SP) // r2
- MOVW R0, 28(SP) // errno
- BL runtime·exitsyscall(SB)
- RET
-
-// func Syscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
-// Actually Syscall5 but the rest of the code expects it to be named Syscall6.
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- BL runtime·entersyscall(SB)
- MOVW 4(SP), R7 // syscall entry
- MOVW 8(SP), R0
- MOVW 12(SP), R1
- MOVW 16(SP), R2
- MOVW 20(SP), R3
- MOVW 24(SP), R4
- MOVW 28(SP), R5
- SWI $0
- MOVW $0xfffff001, R6
- CMP R6, R0
- BLS ok6
- MOVW $-1, R1
- MOVW R1, 32(SP) // r1
- MOVW $0, R2
- MOVW R2, 36(SP) // r2
- RSB $0, R0, R0
- MOVW R0, 40(SP) // errno
- BL runtime·exitsyscall(SB)
- RET
-ok6:
- MOVW R0, 32(SP) // r1
- MOVW R1, 36(SP) // r2
- MOVW $0, R0
- MOVW R0, 40(SP) // errno
- BL runtime·exitsyscall(SB)
- RET
-
-// func RawSyscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
-// Actually RawSyscall5 but the rest of the code expects it to be named RawSyscall6.
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- MOVW 4(SP), R7 // syscall entry
- MOVW 8(SP), R0
- MOVW 12(SP), R1
- MOVW 16(SP), R2
- MOVW 20(SP), R3
- MOVW 24(SP), R4
- MOVW 28(SP), R5
- SWI $0
- MOVW $0xfffff001, R6
- CMP R6, R0
- BLS ok2
- MOVW $-1, R1
- MOVW R1, 32(SP) // r1
- MOVW $0, R2
- MOVW R2, 36(SP) // r2
- RSB $0, R0, R0
- MOVW R0, 40(SP) // errno
- RET
-ok2:
- MOVW R0, 32(SP) // r1
- MOVW R1, 36(SP) // r2
- MOVW $0, R0
- MOVW R0, 40(SP) // errno
- RET
-
-#define SYS__LLSEEK 140 /* from zsysnum_linux_arm.go */
-// func seek(fd int, offset int64, whence int) (newoffset int64, errno int)
-// Implemented in assembly to avoid allocation when
-// taking the address of the return value newoffset.
-// Underlying system call is
-// llseek(int fd, int offhi, int offlo, int64 *result, int whence)
-TEXT ·seek(SB),NOSPLIT,$0-32
- BL runtime·entersyscall(SB)
- MOVW $SYS__LLSEEK, R7 // syscall entry
- MOVW 4(SP), R0 // fd
- MOVW 12(SP), R1 // offset-high
- MOVW 8(SP), R2 // offset-low
- MOVW $20(SP), R3
- MOVW 16(SP), R4 // whence
- SWI $0
- MOVW $0xfffff001, R6
- CMP R6, R0
- BLS okseek
- MOVW $0, R1
- MOVW R1, 20(SP)
- MOVW R1, 24(SP)
- RSB $0, R0, R0
- MOVW R0, 28(SP) // errno
- BL runtime·exitsyscall(SB)
- RET
-okseek:
- // system call filled in newoffset already
- MOVW $0, R0
- MOVW R0, 28(SP) // errno
- BL runtime·exitsyscall(SB)
- RET
-
-// func RawSyscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- MOVW 4(SP), R7 // syscall entry
- MOVW 8(SP), R0
- MOVW 12(SP), R1
- MOVW 16(SP), R2
- SWI $0
- MOVW $0xfffff001, R1
- CMP R1, R0
- BLS ok1
- MOVW $-1, R1
- MOVW R1, 20(SP) // r1
- MOVW $0, R2
- MOVW R2, 24(SP) // r2
- RSB $0, R0, R0
- MOVW R0, 28(SP) // errno
- RET
-ok1:
- MOVW R0, 20(SP) // r1
- MOVW $0, R0
- MOVW R0, 24(SP) // r2
- MOVW R0, 28(SP) // errno
- RET
-
diff --git a/src/pkg/syscall/asm_nacl_386.s b/src/pkg/syscall/asm_nacl_386.s
deleted file mode 100644
index de7c3cc5d..000000000
--- a/src/pkg/syscall/asm_nacl_386.s
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "../../cmd/ld/textflag.h"
-#include "../runtime/syscall_nacl.h"
-
-//
-// System call support for 386, Native Client
-//
-
-#define NACL_SYSCALL(code) \
- MOVL $(0x10000 + ((code)<<5)), AX; CALL AX
-
-#define NACL_SYSJMP(code) \
- MOVL $(0x10000 + ((code)<<5)), AX; JMP AX
-
-TEXT syscall·Syscall(SB),NOSPLIT,$12-28
- CALL runtime·entersyscall(SB)
- MOVL trap+0(FP), AX
- MOVL a1+4(FP), BX
- MOVL BX, 0(SP)
- MOVL a2+8(FP), BX
- MOVL BX, 4(SP)
- MOVL a3+12(FP), BX
- MOVL BX, 8(SP)
- SHLL $5, AX
- ADDL $0x10000, AX
- CALL AX
- CMPL AX, $0
- JGE ok
- MOVL $-1, r1+16(FP)
- MOVL $-1, r2+20(FP)
- NEGL AX
- MOVL AX, err+24(FP)
- CALL runtime·exitsyscall(SB)
- RET
-ok:
- MOVL AX, r1+16(FP)
- MOVL DX, r2+20(FP)
- MOVL $0, err+24(FP)
- CALL runtime·exitsyscall(SB)
- RET
diff --git a/src/pkg/syscall/asm_nacl_amd64p32.s b/src/pkg/syscall/asm_nacl_amd64p32.s
deleted file mode 100644
index de030ec80..000000000
--- a/src/pkg/syscall/asm_nacl_amd64p32.s
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "../../cmd/ld/textflag.h"
-#include "../runtime/syscall_nacl.h"
-
-//
-// System call support for amd64, Native Client
-//
-
-#define NACL_SYSCALL(code) \
- MOVL $(0x10000 + ((code)<<5)), AX; CALL AX
-
-#define NACL_SYSJMP(code) \
- MOVL $(0x10000 + ((code)<<5)), AX; JMP AX
-
-TEXT syscall·Syscall(SB),NOSPLIT,$0-28
- CALL runtime·entersyscall(SB)
- MOVL trap+0(FP), AX
- MOVL a1+4(FP), DI
- MOVL a2+8(FP), SI
- MOVL a3+12(FP), DX
- // more args would use CX, R8, R9
- SHLL $5, AX
- ADDL $0x10000, AX
- CALL AX
- CMPL AX, $0
- JGE ok
- MOVL $-1, r1+16(FP)
- MOVL $-1, r2+20(FP)
- NEGL AX
- MOVL AX, err+24(FP)
- CALL runtime·exitsyscall(SB)
- RET
-ok:
- MOVL AX, r1+16(FP)
- MOVL DX, r2+20(FP)
- MOVL $0, err+24(FP)
- CALL runtime·exitsyscall(SB)
- RET
diff --git a/src/pkg/syscall/asm_netbsd_386.s b/src/pkg/syscall/asm_netbsd_386.s
deleted file mode 100644
index 40b30b405..000000000
--- a/src/pkg/syscall/asm_netbsd_386.s
+++ /dev/null
@@ -1,142 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// 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),NOSPLIT,$0-28
- 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),NOSPLIT,$0-40
- 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),NOSPLIT,$0-52
- 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),NOSPLIT,$0-28
- 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),NOSPLIT,$0-40
- 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
diff --git a/src/pkg/syscall/asm_netbsd_amd64.s b/src/pkg/syscall/asm_netbsd_amd64.s
deleted file mode 100644
index 94ad0284a..000000000
--- a/src/pkg/syscall/asm_netbsd_amd64.s
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// 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),NOSPLIT,$0-56
- 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),NOSPLIT,$0-80
- 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),NOSPLIT,$0-104
- 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, 88(SP) // r1
- MOVQ $0, 96(SP) // r2
- MOVQ AX, 104(SP) // errno
- CALL runtime·exitsyscall(SB)
- RET
-ok9:
- ADDQ $32, SP
- MOVQ AX, 88(SP) // r1
- MOVQ DX, 96(SP) // r2
- MOVQ $0, 104(SP) // errno
- CALL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- 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),NOSPLIT,$0-80
- 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
diff --git a/src/pkg/syscall/asm_netbsd_arm.s b/src/pkg/syscall/asm_netbsd_arm.s
deleted file mode 100644
index 2c0d65401..000000000
--- a/src/pkg/syscall/asm_netbsd_arm.s
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// System call support for ARM, 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);
-// func Syscall9(trap int32, a1, a2, a3, a4, a5, a6, a7, a8, a9 int64) (r1, r2, err int32)
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- BL runtime·entersyscall(SB)
- MOVW 0(FP), R0 // sigcall num
- MOVW 4(FP), R1 // a1
- MOVW 8(FP), R2 // a2
- MOVW 12(FP), R3 // a3
- SWI $0 // syscall
- MOVW $0, R2
- BCS error
- MOVW R0, 16(FP) // r1
- MOVW R1, 20(FP) // r2
- MOVW R2, 24(FP) // err
- BL runtime·exitsyscall(SB)
- RET
-error:
- MOVW $-1, R3
- MOVW R3, 16(FP) // r1
- MOVW R2, 20(FP) // r2
- MOVW R0, 24(FP) // err
- BL runtime·exitsyscall(SB)
- RET
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- BL runtime·entersyscall(SB)
- MOVW 0(FP), R0 // sigcall num
- MOVW 4(FP), R1 // a1
- MOVW 8(FP), R2 // a2
- MOVW 12(FP), R3 // a3
- MOVW R13, R4
- MOVW $16(FP), R13 // a4 to a6 are passed on stack
- SWI $0 // syscall
- MOVW R4, R13
- MOVW $0, R2
- BCS error6
- MOVW R0, 28(FP) // r1
- MOVW R1, 32(FP) // r2
- MOVW R2, 36(FP) // err
- BL runtime·exitsyscall(SB)
- RET
-error6:
- MOVW $-1, R3
- MOVW R3, 28(FP) // r1
- MOVW R2, 32(FP) // r2
- MOVW R0, 36(FP) // err
- BL runtime·exitsyscall(SB)
- RET
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- BL runtime·entersyscall(SB)
- MOVW 0(FP), R0 // sigcall num
- MOVW 4(FP), R1 // a1
- MOVW 8(FP), R2 // a2
- MOVW 12(FP), R3 // a3
- MOVW R13, R4
- MOVW $16(FP), R13 // a4 to a9 are passed on stack
- SWI $0 // syscall
- MOVW R4, R13
- MOVW $0, R2
- BCS error9
- MOVW R0, 40(FP) // r1
- MOVW R1, 44(FP) // r2
- MOVW R2, 48(FP) // err
- BL runtime·exitsyscall(SB)
- RET
-error9:
- MOVW $-1, R3
- MOVW R3, 40(FP) // r1
- MOVW R2, 44(FP) // r2
- MOVW R0, 48(FP) // err
- BL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- MOVW 0(FP), R0 // sigcall num
- MOVW 4(FP), R1 // a1
- MOVW 8(FP), R2 // a2
- MOVW 12(FP), R3 // a3
- SWI $0 // syscall
- MOVW $0, R2
- BCS errorr
- MOVW R0, 16(FP) // r1
- MOVW R1, 20(FP) // r2
- MOVW R2, 24(FP) // err
- RET
-errorr:
- MOVW $-1, R3
- MOVW R3, 16(FP) // r1
- MOVW R2, 20(FP) // r2
- MOVW R0, 24(FP) // err
- RET
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- MOVW 0(FP), R0 // sigcall num
- MOVW 4(FP), R1 // a1
- MOVW 8(FP), R2 // a2
- MOVW 12(FP), R3 // a3
- MOVW R13, R4
- MOVW $16(FP), R13 // a4 to a9 are passed on stack
- SWI $0 // syscall
- MOVW R4, R13
- MOVW $0, R2
- BCS errorr6
- MOVW R0, 28(FP) // r1
- MOVW R1, 32(FP) // r2
- MOVW R2, 36(FP) // err
- RET
-errorr6:
- MOVW $-1, R3
- MOVW R3, 28(FP) // r1
- MOVW R2, 32(FP) // r2
- MOVW R0, 36(FP) // err
- RET
diff --git a/src/pkg/syscall/asm_openbsd_386.s b/src/pkg/syscall/asm_openbsd_386.s
deleted file mode 100644
index 7dd2e373f..000000000
--- a/src/pkg/syscall/asm_openbsd_386.s
+++ /dev/null
@@ -1,142 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// System call support for 386, OpenBSD
-//
-
-// 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),NOSPLIT,$0-28
- 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),NOSPLIT,$0-40
- 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),NOSPLIT,$0-52
- 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),NOSPLIT,$0-28
- 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),NOSPLIT,$0-40
- 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
diff --git a/src/pkg/syscall/asm_openbsd_amd64.s b/src/pkg/syscall/asm_openbsd_amd64.s
deleted file mode 100644
index e127bf220..000000000
--- a/src/pkg/syscall/asm_openbsd_amd64.s
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// System call support for AMD64, OpenBSD
-//
-
-// 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),NOSPLIT,$0-56
- 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),NOSPLIT,$0-80
- 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),NOSPLIT,$0-104
- 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, 88(SP) // r1
- MOVQ $0, 96(SP) // r2
- MOVQ AX, 104(SP) // errno
- CALL runtime·exitsyscall(SB)
- RET
-ok9:
- ADDQ $32, SP
- MOVQ AX, 88(SP) // r1
- MOVQ DX, 96(SP) // r2
- MOVQ $0, 104(SP) // errno
- CALL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- 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),NOSPLIT,$0-80
- 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
diff --git a/src/pkg/syscall/asm_plan9_386.s b/src/pkg/syscall/asm_plan9_386.s
deleted file mode 100644
index f8c07c407..000000000
--- a/src/pkg/syscall/asm_plan9_386.s
+++ /dev/null
@@ -1,164 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// System call support for 386, Plan 9
-//
-
-//func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err string)
-//func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err string)
-//func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
-//func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
-
-// Trap # in AX, args on stack above caller pc.
-TEXT ·Syscall(SB),NOSPLIT,$0-32
- 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 $64
- MOVL AX, r1+20(SP)
- MOVL $0, r2+24(SP)
- CMPL AX, $-1
- JNE ok3
-
- SUBL $8, SP
- CALL runtime·errstr(SB)
- MOVL SP, SI
- ADDL $8, SP
- JMP copyresult3
-
-ok3:
- LEAL runtime·emptystring(SB), SI
-
-copyresult3:
- LEAL err+28(SP), DI
-
- CLD
- MOVSL
- MOVSL
-
- CALL runtime·exitsyscall(SB)
- RET
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-44
- 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 $64
- MOVL AX, r1+32(SP)
- MOVL $0, r2+36(SP)
- CMPL AX, $-1
- JNE ok4
-
- SUBL $8, SP
- CALL runtime·errstr(SB)
- MOVL SP, SI
- ADDL $8, SP
- JMP copyresult4
-
-ok4:
- LEAL runtime·emptystring(SB), SI
-
-copyresult4:
- LEAL err+40(SP), DI
-
- CLD
- MOVSL
- MOVSL
-
- CALL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- 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 $64
- MOVL AX, r1+20(SP)
- MOVL AX, r2+24(SP)
- MOVL AX, err+28(SP)
- RET
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- 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 $64
- MOVL AX, r1+32(SP)
- MOVL AX, r2+36(SP)
- MOVL AX, err+40(SP)
- RET
-
-#define SYS_SEEK 39 /* from zsysnum_plan9_386.go */
-
-//func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string)
-TEXT ·seek(SB),NOSPLIT,$0-36
- LEAL newoffset+24(SP), AX
- MOVL AX, placeholder+4(SP)
-
- MOVL $SYS_SEEK, AX // syscall entry
- INT $64
-
- CMPL AX, $-1
- JNE ok6
- MOVL AX, 24(SP) // newoffset low
- MOVL AX, 28(SP) // newoffset high
-
- SUBL $8, SP
- CALL syscall·errstr(SB)
- MOVL SP, SI
- ADDL $8, SP
- JMP copyresult6
-
-ok6:
- LEAL runtime·emptystring(SB), SI
-
-copyresult6:
- LEAL err+32(SP), DI
-
- CLD
- MOVSL
- MOVSL
- RET
-
-//func exit(code int)
-// Import runtime·exit for cleanly exiting.
-TEXT ·exit(SB),NOSPLIT,$4-4
- MOVL code+0(FP), AX
- MOVL AX, 0(SP)
- CALL runtime·exit(SB)
- RET
diff --git a/src/pkg/syscall/asm_plan9_amd64.s b/src/pkg/syscall/asm_plan9_amd64.s
deleted file mode 100644
index 2154a87d5..000000000
--- a/src/pkg/syscall/asm_plan9_amd64.s
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-#include "../../cmd/ld/textflag.h"
-
-//
-// System call support for Plan 9
-//
-
-//func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err string)
-//func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err string)
-//func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
-//func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
-
-// Trap # in BP, args on stack above caller pc.
-// NxM requires that Plan 9 system calls be
-// marked with $0x8000 in AX.
-TEXT ·Syscall(SB),NOSPLIT,$0-64
- CALL runtime·entersyscall(SB)
- MOVQ $0x8000, AX // for NxM
- MOVQ 8(SP), BP // syscall entry
- // slide args down on top of system call number
- LEAQ 16(SP), SI
- LEAQ 8(SP), DI
- CLD
- MOVSQ
- MOVSQ
- MOVSQ
- SYSCALL
- MOVQ AX, r1+40(SP)
- MOVQ $0, r2+48(SP)
- CMPL AX, $-1
- JNE ok3
-
- SUBQ $16, SP
- CALL runtime·errstr(SB)
- MOVQ SP, SI
- ADDQ $16, SP
- JMP copyresult3
-
-ok3:
- LEAQ runtime·emptystring(SB), SI
-
-copyresult3:
- LEAQ err+56(SP), DI
-
- CLD
- MOVSQ
- MOVSQ
-
- CALL runtime·exitsyscall(SB)
- RET
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-88
- CALL runtime·entersyscall(SB)
- MOVQ $0x8000, AX // for NxM
- MOVQ 8(SP), BP // syscall entry
- // slide args down on top of system call number
- LEAQ 16(SP), SI
- LEAQ 8(SP), DI
- CLD
- MOVSQ
- MOVSQ
- MOVSQ
- MOVSQ
- MOVSQ
- MOVSQ
- SYSCALL
- MOVQ AX, r1+64(SP)
- MOVQ $0, r2+72(SP)
- CMPL AX, $-1
- JNE ok4
-
- SUBQ $16, SP
- CALL runtime·errstr(SB)
- MOVQ SP, SI
- ADDQ $16, SP
- JMP copyresult4
-
-ok4:
- LEAQ runtime·emptystring(SB), SI
-
-copyresult4:
- LEAQ err+80(SP), DI
-
- CLD
- MOVSQ
- MOVSQ
-
- CALL runtime·exitsyscall(SB)
- RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- MOVQ $0x8000, AX // for NxM
- MOVQ 8(SP), BP // syscall entry
- // slide args down on top of system call number
- LEAQ 16(SP), SI
- LEAQ 8(SP), DI
- CLD
- MOVSQ
- MOVSQ
- MOVSQ
- SYSCALL
- MOVQ AX, r1+40(SP)
- MOVQ AX, r2+48(SP)
- MOVQ AX, err+56(SP)
- RET
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- MOVQ $0x8000, AX // for NxM
- MOVQ 8(SP), BP // syscall entry
- // slide args down on top of system call number
- LEAQ 16(SP), SI
- LEAQ 8(SP), DI
- CLD
- MOVSQ
- MOVSQ
- MOVSQ
- MOVSQ
- MOVSQ
- MOVSQ
- SYSCALL
- MOVQ AX, r1+64(SP)
- MOVQ AX, r2+72(SP)
- MOVQ AX, err+80(SP)
- RET
-
-#define SYS_SEEK 39 /* from zsysnum_plan9_amd64.go */
-
-//func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string)
-TEXT ·seek(SB),NOSPLIT,$0-56
- LEAQ newoffset+40(SP), AX
- MOVQ AX, placeholder+8(SP)
-
- MOVQ $0x8000, AX // for NxM
- MOVQ $SYS_SEEK, BP // syscall entry
- SYSCALL
-
- CMPL AX, $-1
- JNE ok6
- MOVQ $-1, newoffset+40(SP)
-
- SUBQ $16, SP
- CALL syscall·errstr(SB)
- MOVQ SP, SI
- ADDQ $16, SP
- JMP copyresult6
-
-ok6:
- LEAQ runtime·emptystring(SB), SI
-
-copyresult6:
- LEAQ err+48(SP), DI
-
- CLD
- MOVSQ
- MOVSQ
- RET
-
-//func exit(code int)
-// Import runtime·exit for cleanly exiting.
-TEXT ·exit(SB),NOSPLIT,$8-8
- MOVQ code+0(FP), AX
- MOVQ AX, 0(SP)
- CALL runtime·exit(SB)
- RET
diff --git a/src/pkg/syscall/asm_solaris_amd64.s b/src/pkg/syscall/asm_solaris_amd64.s
deleted file mode 100644
index 3735890fa..000000000
--- a/src/pkg/syscall/asm_solaris_amd64.s
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//
-// System calls for amd64, Solaris are implemented in ../runtime/syscall_solaris.goc
-//
diff --git a/src/pkg/syscall/asm_windows_386.s b/src/pkg/syscall/asm_windows_386.s
deleted file mode 100644
index 8b52fa985..000000000
--- a/src/pkg/syscall/asm_windows_386.s
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//
-// System calls for 386, Windows are implemented in ../runtime/syscall_windows.goc
-//
diff --git a/src/pkg/syscall/asm_windows_amd64.s b/src/pkg/syscall/asm_windows_amd64.s
deleted file mode 100644
index 5813404d1..000000000
--- a/src/pkg/syscall/asm_windows_amd64.s
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//
-// System calls for amd64, Windows are implemented in ../runtime/syscall_windows.goc
-//
diff --git a/src/pkg/syscall/bpf_bsd.go b/src/pkg/syscall/bpf_bsd.go
deleted file mode 100644
index cc6c1e77c..000000000
--- a/src/pkg/syscall/bpf_bsd.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// 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.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-// Berkeley packet filter for BSD variants
-
-package syscall
-
-import (
- "unsafe"
-)
-
-func BpfStmt(code, k int) *BpfInsn {
- return &BpfInsn{Code: uint16(code), K: uint32(k)}
-}
-
-func BpfJump(code, k, jt, jf int) *BpfInsn {
- return &BpfInsn{Code: uint16(code), Jt: uint8(jt), Jf: uint8(jf), K: uint32(k)}
-}
-
-func BpfBuflen(fd int) (int, error) {
- var l int
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCGBLEN, uintptr(unsafe.Pointer(&l)))
- if err != 0 {
- return 0, Errno(err)
- }
- return l, nil
-}
-
-func SetBpfBuflen(fd, l int) (int, error) {
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCSBLEN, uintptr(unsafe.Pointer(&l)))
- if err != 0 {
- return 0, Errno(err)
- }
- return l, nil
-}
-
-func BpfDatalink(fd int) (int, error) {
- var t int
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCGDLT, uintptr(unsafe.Pointer(&t)))
- if err != 0 {
- return 0, Errno(err)
- }
- return t, nil
-}
-
-func SetBpfDatalink(fd, t int) (int, error) {
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCSDLT, uintptr(unsafe.Pointer(&t)))
- if err != 0 {
- return 0, Errno(err)
- }
- return t, nil
-}
-
-func SetBpfPromisc(fd, m int) error {
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCPROMISC, uintptr(unsafe.Pointer(&m)))
- if err != 0 {
- return Errno(err)
- }
- return nil
-}
-
-func FlushBpf(fd int) error {
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCFLUSH, 0)
- if err != 0 {
- return Errno(err)
- }
- return nil
-}
-
-type ivalue struct {
- name [IFNAMSIZ]byte
- value int16
-}
-
-func BpfInterface(fd int, name string) (string, error) {
- var iv ivalue
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCGETIF, uintptr(unsafe.Pointer(&iv)))
- if err != 0 {
- return "", Errno(err)
- }
- return name, nil
-}
-
-func SetBpfInterface(fd int, name string) error {
- var iv ivalue
- copy(iv.name[:], []byte(name))
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCSETIF, uintptr(unsafe.Pointer(&iv)))
- if err != 0 {
- return Errno(err)
- }
- return nil
-}
-
-func BpfTimeout(fd int) (*Timeval, error) {
- var tv Timeval
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCGRTIMEOUT, uintptr(unsafe.Pointer(&tv)))
- if err != 0 {
- return nil, Errno(err)
- }
- return &tv, nil
-}
-
-func SetBpfTimeout(fd int, tv *Timeval) error {
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCSRTIMEOUT, uintptr(unsafe.Pointer(tv)))
- if err != 0 {
- return Errno(err)
- }
- return nil
-}
-
-func BpfStats(fd int) (*BpfStat, error) {
- var s BpfStat
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCGSTATS, uintptr(unsafe.Pointer(&s)))
- if err != 0 {
- return nil, Errno(err)
- }
- return &s, nil
-}
-
-func SetBpfImmediate(fd, m int) error {
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCIMMEDIATE, uintptr(unsafe.Pointer(&m)))
- if err != 0 {
- return Errno(err)
- }
- return nil
-}
-
-func SetBpf(fd int, i []BpfInsn) error {
- var p BpfProgram
- p.Len = uint32(len(i))
- p.Insns = (*BpfInsn)(unsafe.Pointer(&i[0]))
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCSETF, uintptr(unsafe.Pointer(&p)))
- if err != 0 {
- return Errno(err)
- }
- return nil
-}
-
-func CheckBpfVersion(fd int) error {
- var v BpfVersion
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCVERSION, uintptr(unsafe.Pointer(&v)))
- if err != 0 {
- return Errno(err)
- }
- if v.Major != BPF_MAJOR_VERSION || v.Minor != BPF_MINOR_VERSION {
- return EINVAL
- }
- return nil
-}
-
-func BpfHeadercmpl(fd int) (int, error) {
- var f int
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCGHDRCMPLT, uintptr(unsafe.Pointer(&f)))
- if err != 0 {
- return 0, Errno(err)
- }
- return f, nil
-}
-
-func SetBpfHeadercmpl(fd, f int) error {
- _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCSHDRCMPLT, uintptr(unsafe.Pointer(&f)))
- if err != 0 {
- return Errno(err)
- }
- return nil
-}
diff --git a/src/pkg/syscall/creds_test.go b/src/pkg/syscall/creds_test.go
deleted file mode 100644
index b1894c66b..000000000
--- a/src/pkg/syscall/creds_test.go
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-
-package syscall_test
-
-import (
- "bytes"
- "net"
- "os"
- "syscall"
- "testing"
-)
-
-// TestSCMCredentials tests the sending and receiving of credentials
-// (PID, UID, GID) in an ancillary message between two UNIX
-// sockets. The SO_PASSCRED socket option is enabled on the sending
-// socket for this to work.
-func TestSCMCredentials(t *testing.T) {
- fds, err := syscall.Socketpair(syscall.AF_LOCAL, syscall.SOCK_STREAM, 0)
- if err != nil {
- t.Fatalf("Socketpair: %v", err)
- }
- defer syscall.Close(fds[0])
- defer syscall.Close(fds[1])
-
- err = syscall.SetsockoptInt(fds[0], syscall.SOL_SOCKET, syscall.SO_PASSCRED, 1)
- if err != nil {
- t.Fatalf("SetsockoptInt: %v", err)
- }
-
- srvFile := os.NewFile(uintptr(fds[0]), "server")
- defer srvFile.Close()
- srv, err := net.FileConn(srvFile)
- if err != nil {
- t.Errorf("FileConn: %v", err)
- return
- }
- defer srv.Close()
-
- cliFile := os.NewFile(uintptr(fds[1]), "client")
- defer cliFile.Close()
- cli, err := net.FileConn(cliFile)
- if err != nil {
- t.Errorf("FileConn: %v", err)
- return
- }
- defer cli.Close()
-
- var ucred syscall.Ucred
- if os.Getuid() != 0 {
- ucred.Pid = int32(os.Getpid())
- ucred.Uid = 0
- ucred.Gid = 0
- oob := syscall.UnixCredentials(&ucred)
- _, _, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil)
- if err.(*net.OpError).Err != syscall.EPERM {
- t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err)
- }
- }
-
- ucred.Pid = int32(os.Getpid())
- ucred.Uid = uint32(os.Getuid())
- ucred.Gid = uint32(os.Getgid())
- oob := syscall.UnixCredentials(&ucred)
-
- // this is going to send a dummy byte
- n, oobn, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil)
- if err != nil {
- t.Fatalf("WriteMsgUnix: %v", err)
- }
- if n != 0 {
- t.Fatalf("WriteMsgUnix n = %d, want 0", n)
- }
- if oobn != len(oob) {
- t.Fatalf("WriteMsgUnix oobn = %d, want %d", oobn, len(oob))
- }
-
- oob2 := make([]byte, 10*len(oob))
- n, oobn2, flags, _, err := srv.(*net.UnixConn).ReadMsgUnix(nil, oob2)
- if err != nil {
- t.Fatalf("ReadMsgUnix: %v", err)
- }
- if flags != 0 {
- t.Fatalf("ReadMsgUnix flags = 0x%x, want 0", flags)
- }
- if n != 1 {
- t.Fatalf("ReadMsgUnix n = %d, want 1 (dummy byte)", n)
- }
- if oobn2 != oobn {
- // without SO_PASSCRED set on the socket, ReadMsgUnix will
- // return zero oob bytes
- t.Fatalf("ReadMsgUnix oobn = %d, want %d", oobn2, oobn)
- }
- oob2 = oob2[:oobn2]
- if !bytes.Equal(oob, oob2) {
- t.Fatal("ReadMsgUnix oob bytes don't match")
- }
-
- scm, err := syscall.ParseSocketControlMessage(oob2)
- if err != nil {
- t.Fatalf("ParseSocketControlMessage: %v", err)
- }
- newUcred, err := syscall.ParseUnixCredentials(&scm[0])
- if err != nil {
- t.Fatalf("ParseUnixCredentials: %v", err)
- }
- if *newUcred != ucred {
- t.Fatalf("ParseUnixCredentials = %+v, want %+v", newUcred, ucred)
- }
-}
diff --git a/src/pkg/syscall/dir_plan9.go b/src/pkg/syscall/dir_plan9.go
deleted file mode 100644
index 697bf5499..000000000
--- a/src/pkg/syscall/dir_plan9.go
+++ /dev/null
@@ -1,212 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Plan 9 directory marshalling. See intro(5).
-
-package syscall
-
-import "errors"
-
-var (
- ErrShortStat = errors.New("stat buffer too short")
- ErrBadStat = errors.New("malformed stat buffer")
- ErrBadName = errors.New("bad character in file name")
-)
-
-// A Qid represents a 9P server's unique identification for a file.
-type Qid struct {
- Path uint64 // the file server's unique identification for the file
- Vers uint32 // version number for given Path
- Type uint8 // the type of the file (syscall.QTDIR for example)
-}
-
-// A Dir contains the metadata for a file.
-type Dir struct {
- // system-modified data
- Type uint16 // server type
- Dev uint32 // server subtype
-
- // file data
- Qid Qid // unique id from server
- Mode uint32 // permissions
- Atime uint32 // last read time
- Mtime uint32 // last write time
- Length int64 // file length
- Name string // last element of path
- Uid string // owner name
- Gid string // group name
- Muid string // last modifier name
-}
-
-var nullDir = Dir{
- Type: ^uint16(0),
- Dev: ^uint32(0),
- Qid: Qid{
- Path: ^uint64(0),
- Vers: ^uint32(0),
- Type: ^uint8(0),
- },
- Mode: ^uint32(0),
- Atime: ^uint32(0),
- Mtime: ^uint32(0),
- Length: ^int64(0),
-}
-
-// Null assigns special "don't touch" values to members of d to
-// avoid modifying them during syscall.Wstat.
-func (d *Dir) Null() { *d = nullDir }
-
-// Marshal encodes a 9P stat message corresponding to d into b
-//
-// If there isn't enough space in b for a stat message, ErrShortStat is returned.
-func (d *Dir) Marshal(b []byte) (n int, err error) {
- n = STATFIXLEN + len(d.Name) + len(d.Uid) + len(d.Gid) + len(d.Muid)
- if n > len(b) {
- return n, ErrShortStat
- }
-
- for _, c := range d.Name {
- if c == '/' {
- return n, ErrBadName
- }
- }
-
- b = pbit16(b, uint16(n)-2)
- b = pbit16(b, d.Type)
- b = pbit32(b, d.Dev)
- b = pbit8(b, d.Qid.Type)
- b = pbit32(b, d.Qid.Vers)
- b = pbit64(b, d.Qid.Path)
- b = pbit32(b, d.Mode)
- b = pbit32(b, d.Atime)
- b = pbit32(b, d.Mtime)
- b = pbit64(b, uint64(d.Length))
- b = pstring(b, d.Name)
- b = pstring(b, d.Uid)
- b = pstring(b, d.Gid)
- b = pstring(b, d.Muid)
-
- return n, nil
-}
-
-// UnmarshalDir decodes a single 9P stat message from b and returns the resulting Dir.
-//
-// If b is too small to hold a valid stat message, ErrShortStat is returned.
-//
-// If the stat message itself is invalid, ErrBadStat is returned.
-func UnmarshalDir(b []byte) (*Dir, error) {
- if len(b) < STATFIXLEN {
- return nil, ErrShortStat
- }
- size, buf := gbit16(b)
- if len(b) != int(size)+2 {
- return nil, ErrBadStat
- }
- b = buf
-
- var d Dir
- d.Type, b = gbit16(b)
- d.Dev, b = gbit32(b)
- d.Qid.Type, b = gbit8(b)
- d.Qid.Vers, b = gbit32(b)
- d.Qid.Path, b = gbit64(b)
- d.Mode, b = gbit32(b)
- d.Atime, b = gbit32(b)
- d.Mtime, b = gbit32(b)
-
- n, b := gbit64(b)
- d.Length = int64(n)
-
- var ok bool
- if d.Name, b, ok = gstring(b); !ok {
- return nil, ErrBadStat
- }
- if d.Uid, b, ok = gstring(b); !ok {
- return nil, ErrBadStat
- }
- if d.Gid, b, ok = gstring(b); !ok {
- return nil, ErrBadStat
- }
- if d.Muid, b, ok = gstring(b); !ok {
- return nil, ErrBadStat
- }
-
- return &d, nil
-}
-
-// pbit8 copies the 8-bit number v to b and returns the remaining slice of b.
-func pbit8(b []byte, v uint8) []byte {
- b[0] = byte(v)
- return b[1:]
-}
-
-// pbit16 copies the 16-bit number v to b in little-endian order and returns the remaining slice of b.
-func pbit16(b []byte, v uint16) []byte {
- b[0] = byte(v)
- b[1] = byte(v >> 8)
- return b[2:]
-}
-
-// pbit32 copies the 32-bit number v to b in little-endian order and returns the remaining slice of b.
-func pbit32(b []byte, v uint32) []byte {
- b[0] = byte(v)
- b[1] = byte(v >> 8)
- b[2] = byte(v >> 16)
- b[3] = byte(v >> 24)
- return b[4:]
-}
-
-// pbit64 copies the 64-bit number v to b in little-endian order and returns the remaining slice of b.
-func pbit64(b []byte, v uint64) []byte {
- b[0] = byte(v)
- b[1] = byte(v >> 8)
- b[2] = byte(v >> 16)
- b[3] = byte(v >> 24)
- b[4] = byte(v >> 32)
- b[5] = byte(v >> 40)
- b[6] = byte(v >> 48)
- b[7] = byte(v >> 56)
- return b[8:]
-}
-
-// pstring copies the string s to b, prepending it with a 16-bit length in little-endian order, and
-// returning the remaining slice of b..
-func pstring(b []byte, s string) []byte {
- b = pbit16(b, uint16(len(s)))
- n := copy(b, s)
- return b[n:]
-}
-
-// gbit8 reads an 8-bit number from b and returns it with the remaining slice of b.
-func gbit8(b []byte) (uint8, []byte) {
- return uint8(b[0]), b[1:]
-}
-
-// gbit16 reads a 16-bit number in little-endian order from b and returns it with the remaining slice of b.
-func gbit16(b []byte) (uint16, []byte) {
- return uint16(b[0]) | uint16(b[1])<<8, b[2:]
-}
-
-// gbit32 reads a 32-bit number in little-endian order from b and returns it with the remaining slice of b.
-func gbit32(b []byte) (uint32, []byte) {
- return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24, b[4:]
-}
-
-// gbit64 reads a 64-bit number in little-endian order from b and returns it with the remaining slice of b.
-func gbit64(b []byte) (uint64, []byte) {
- lo := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
- hi := uint32(b[4]) | uint32(b[5])<<8 | uint32(b[6])<<16 | uint32(b[7])<<24
- return uint64(lo) | uint64(hi)<<32, b[8:]
-}
-
-// gstring reads a string from b, prefixed with a 16-bit length in little-endian order.
-// It returns the string with the remaining slice of b and a boolean. If the length is
-// greater than the number of bytes in b, the boolean will be false.
-func gstring(b []byte) (string, []byte, bool) {
- n, b := gbit16(b)
- if int(n) > len(b) {
- return "", b, false
- }
- return string(b[:n]), b[n:], true
-}
diff --git a/src/pkg/syscall/dll_windows.go b/src/pkg/syscall/dll_windows.go
deleted file mode 100644
index d29e9921c..000000000
--- a/src/pkg/syscall/dll_windows.go
+++ /dev/null
@@ -1,279 +0,0 @@
-// 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.
-
-package syscall
-
-import (
- "sync"
- "sync/atomic"
- "unsafe"
-)
-
-// DLLError describes reasons for DLL load failures.
-type DLLError struct {
- Err error
- ObjName string
- Msg string
-}
-
-func (e *DLLError) Error() string { return e.Msg }
-
-// Implemented in ../runtime/syscall_windows.goc.
-func Syscall(trap, nargs, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
-func Syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
-func Syscall9(trap, nargs, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno)
-func Syscall12(trap, nargs, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 uintptr) (r1, r2 uintptr, err Errno)
-func Syscall15(trap, nargs, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr) (r1, r2 uintptr, err Errno)
-func loadlibrary(filename *uint16) (handle uintptr, err Errno)
-func getprocaddress(handle uintptr, procname *uint8) (proc uintptr, err Errno)
-
-// A DLL implements access to a single DLL.
-type DLL struct {
- Name string
- Handle Handle
-}
-
-// LoadDLL loads DLL file into memory.
-func LoadDLL(name string) (dll *DLL, err error) {
- namep, err := UTF16PtrFromString(name)
- if err != nil {
- return nil, err
- }
- h, e := loadlibrary(namep)
- if e != 0 {
- return nil, &DLLError{
- Err: e,
- ObjName: name,
- Msg: "Failed to load " + name + ": " + e.Error(),
- }
- }
- d := &DLL{
- Name: name,
- Handle: Handle(h),
- }
- return d, nil
-}
-
-// MustLoadDLL is like LoadDLL but panics if load operation failes.
-func MustLoadDLL(name string) *DLL {
- d, e := LoadDLL(name)
- if e != nil {
- panic(e)
- }
- return d
-}
-
-// FindProc searches DLL d for procedure named name and returns *Proc
-// if found. It returns an error if search fails.
-func (d *DLL) FindProc(name string) (proc *Proc, err error) {
- namep, err := BytePtrFromString(name)
- if err != nil {
- return nil, err
- }
- a, e := getprocaddress(uintptr(d.Handle), namep)
- if e != 0 {
- return nil, &DLLError{
- Err: e,
- ObjName: name,
- Msg: "Failed to find " + name + " procedure in " + d.Name + ": " + e.Error(),
- }
- }
- p := &Proc{
- Dll: d,
- Name: name,
- addr: a,
- }
- return p, nil
-}
-
-// MustFindProc is like FindProc but panics if search fails.
-func (d *DLL) MustFindProc(name string) *Proc {
- p, e := d.FindProc(name)
- if e != nil {
- panic(e)
- }
- return p
-}
-
-// Release unloads DLL d from memory.
-func (d *DLL) Release() (err error) {
- return FreeLibrary(d.Handle)
-}
-
-// A Proc implements access to a procedure inside a DLL.
-type Proc struct {
- Dll *DLL
- Name string
- addr uintptr
-}
-
-// Addr returns the address of the procedure represented by p.
-// The return value can be passed to Syscall to run the procedure.
-func (p *Proc) Addr() uintptr {
- return p.addr
-}
-
-// Call executes procedure p with arguments a. It will panic, if more then 15 arguments
-// are supplied.
-//
-// The returned error is always non-nil, constructed from the result of GetLastError.
-// Callers must inspect the primary return value to decide whether an error occurred
-// (according to the semantics of the specific function being called) before consulting
-// the error. The error will be guaranteed to contain syscall.Errno.
-func (p *Proc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {
- switch len(a) {
- case 0:
- return Syscall(p.Addr(), uintptr(len(a)), 0, 0, 0)
- case 1:
- return Syscall(p.Addr(), uintptr(len(a)), a[0], 0, 0)
- case 2:
- return Syscall(p.Addr(), uintptr(len(a)), a[0], a[1], 0)
- case 3:
- return Syscall(p.Addr(), uintptr(len(a)), a[0], a[1], a[2])
- case 4:
- return Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], 0, 0)
- case 5:
- return Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], 0)
- case 6:
- return Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5])
- case 7:
- return Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], 0, 0)
- case 8:
- return Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], 0)
- case 9:
- return Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8])
- case 10:
- return Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], 0, 0)
- case 11:
- return Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], 0)
- case 12:
- return Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11])
- case 13:
- return Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], 0, 0)
- case 14:
- return Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], 0)
- case 15:
- return Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14])
- default:
- panic("Call " + p.Name + " with too many arguments " + itoa(len(a)) + ".")
- }
- return
-}
-
-// A LazyDLL implements access to a single DLL.
-// It will delay the load of the DLL until the first
-// call to its Handle method or to one of its
-// LazyProc's Addr method.
-type LazyDLL struct {
- mu sync.Mutex
- dll *DLL // non nil once DLL is loaded
- Name string
-}
-
-// Load loads DLL file d.Name into memory. It returns an error if fails.
-// Load will not try to load DLL, if it is already loaded into memory.
-func (d *LazyDLL) Load() error {
- // Non-racy version of:
- // if d.dll == nil {
- if atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&d.dll))) == nil {
- d.mu.Lock()
- defer d.mu.Unlock()
- if d.dll == nil {
- dll, e := LoadDLL(d.Name)
- if e != nil {
- return e
- }
- // Non-racy version of:
- // d.dll = dll
- atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&d.dll)), unsafe.Pointer(dll))
- }
- }
- return nil
-}
-
-// mustLoad is like Load but panics if search fails.
-func (d *LazyDLL) mustLoad() {
- e := d.Load()
- if e != nil {
- panic(e)
- }
-}
-
-// Handle returns d's module handle.
-func (d *LazyDLL) Handle() uintptr {
- d.mustLoad()
- return uintptr(d.dll.Handle)
-}
-
-// NewProc returns a LazyProc for accessing the named procedure in the DLL d.
-func (d *LazyDLL) NewProc(name string) *LazyProc {
- return &LazyProc{l: d, Name: name}
-}
-
-// NewLazyDLL creates new LazyDLL associated with DLL file.
-func NewLazyDLL(name string) *LazyDLL {
- return &LazyDLL{Name: name}
-}
-
-// A LazyProc implements access to a procedure inside a LazyDLL.
-// It delays the lookup until the Addr method is called.
-type LazyProc struct {
- mu sync.Mutex
- Name string
- l *LazyDLL
- proc *Proc
-}
-
-// Find searches DLL for procedure named p.Name. It returns
-// an error if search fails. Find will not search procedure,
-// if it is already found and loaded into memory.
-func (p *LazyProc) Find() error {
- // Non-racy version of:
- // if p.proc == nil {
- if atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&p.proc))) == nil {
- p.mu.Lock()
- defer p.mu.Unlock()
- if p.proc == nil {
- e := p.l.Load()
- if e != nil {
- return e
- }
- proc, e := p.l.dll.FindProc(p.Name)
- if e != nil {
- return e
- }
- // Non-racy version of:
- // p.proc = proc
- atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&p.proc)), unsafe.Pointer(proc))
- }
- }
- return nil
-}
-
-// mustFind is like Find but panics if search fails.
-func (p *LazyProc) mustFind() {
- e := p.Find()
- if e != nil {
- panic(e)
- }
-}
-
-// Addr returns the address of the procedure represented by p.
-// The return value can be passed to Syscall to run the procedure.
-func (p *LazyProc) Addr() uintptr {
- p.mustFind()
- return p.proc.Addr()
-}
-
-// Call executes procedure p with arguments a. It will panic, if more then 15 arguments
-// are supplied.
-//
-// The returned error is always non-nil, constructed from the result of GetLastError.
-// Callers must inspect the primary return value to decide whether an error occurred
-// (according to the semantics of the specific function being called) before consulting
-// the error. The error will be guaranteed to contain syscall.Errno.
-func (p *LazyProc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {
- p.mustFind()
- return p.proc.Call(a...)
-}
diff --git a/src/pkg/syscall/env_plan9.go b/src/pkg/syscall/env_plan9.go
deleted file mode 100644
index 9587ab5af..000000000
--- a/src/pkg/syscall/env_plan9.go
+++ /dev/null
@@ -1,142 +0,0 @@
-// 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.
-
-// Plan 9 environment variables.
-
-package syscall
-
-import (
- "errors"
- "sync"
-)
-
-var (
- // envOnce guards copyenv, which populates env.
- envOnce sync.Once
-
- // envLock guards env and envs.
- envLock sync.RWMutex
-
- // env maps from an environment variable to its value.
- env = make(map[string]string)
-
- // envs contains elements of env in the form "key=value".
- envs []string
-
- errZeroLengthKey = errors.New("zero length key")
- errShortWrite = errors.New("i/o count too small")
-)
-
-func readenv(key string) (string, error) {
- fd, err := Open("/env/"+key, O_RDONLY)
- if err != nil {
- return "", err
- }
- defer Close(fd)
- l, _ := Seek(fd, 0, 2)
- Seek(fd, 0, 0)
- buf := make([]byte, l)
- n, err := Read(fd, buf)
- if err != nil {
- return "", err
- }
- if n > 0 && buf[n-1] == 0 {
- buf = buf[:n-1]
- }
- return string(buf), nil
-}
-
-func writeenv(key, value string) error {
- fd, err := Create("/env/"+key, O_RDWR, 0666)
- if err != nil {
- return err
- }
- defer Close(fd)
- b := []byte(value)
- n, err := Write(fd, b)
- if err != nil {
- return err
- }
- if n != len(b) {
- return errShortWrite
- }
- return nil
-}
-
-func copyenv() {
- fd, err := Open("/env", O_RDONLY)
- if err != nil {
- return
- }
- defer Close(fd)
- files, err := readdirnames(fd)
- if err != nil {
- return
- }
- envs = make([]string, len(files))
- i := 0
- for _, key := range files {
- v, err := readenv(key)
- if err != nil {
- continue
- }
- env[key] = v
- envs[i] = key + "=" + v
- i++
- }
-}
-
-func Getenv(key string) (value string, found bool) {
- if len(key) == 0 {
- return "", false
- }
-
- envLock.RLock()
- defer envLock.RUnlock()
-
- if v, ok := env[key]; ok {
- return v, true
- }
- v, err := readenv(key)
- if err != nil {
- return "", false
- }
- env[key] = v
- envs = append(envs, key+"="+v)
- return v, true
-}
-
-func Setenv(key, value string) error {
- if len(key) == 0 {
- return errZeroLengthKey
- }
-
- envLock.Lock()
- defer envLock.Unlock()
-
- err := writeenv(key, value)
- if err != nil {
- return err
- }
- env[key] = value
- envs = append(envs, key+"="+value)
- return nil
-}
-
-func Clearenv() {
- envLock.Lock()
- defer envLock.Unlock()
-
- env = make(map[string]string)
- envs = []string{}
- RawSyscall(SYS_RFORK, RFCENVG, 0, 0)
-}
-
-func Environ() []string {
- envLock.RLock()
- defer envLock.RUnlock()
-
- envOnce.Do(copyenv)
- return append([]string(nil), envs...)
-}
diff --git a/src/pkg/syscall/env_unix.go b/src/pkg/syscall/env_unix.go
deleted file mode 100644
index ad354ed05..000000000
--- a/src/pkg/syscall/env_unix.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
-
-// Unix environment variables.
-
-package syscall
-
-import "sync"
-
-var (
- // envOnce guards initialization by copyenv, which populates env.
- envOnce sync.Once
-
- // envLock guards env and envs.
- envLock sync.RWMutex
-
- // env maps from an environment variable to its first occurrence in envs.
- env map[string]int
-
- // envs is provided by the runtime. elements are expected to be
- // of the form "key=value".
- envs []string
-)
-
-// setenv_c is provided by the runtime, but is a no-op if cgo isn't
-// loaded.
-func setenv_c(k, v string)
-
-func copyenv() {
- env = make(map[string]int)
- for i, s := range envs {
- for j := 0; j < len(s); j++ {
- if s[j] == '=' {
- key := s[:j]
- if _, ok := env[key]; !ok {
- env[key] = i
- }
- break
- }
- }
- }
-}
-
-func Getenv(key string) (value string, found bool) {
- envOnce.Do(copyenv)
- if len(key) == 0 {
- return "", false
- }
-
- envLock.RLock()
- defer envLock.RUnlock()
-
- i, ok := env[key]
- if !ok {
- return "", false
- }
- s := envs[i]
- for i := 0; i < len(s); i++ {
- if s[i] == '=' {
- return s[i+1:], true
- }
- }
- return "", false
-}
-
-func Setenv(key, value string) error {
- envOnce.Do(copyenv)
- if len(key) == 0 {
- return EINVAL
- }
- for i := 0; i < len(key); i++ {
- if key[i] == '=' || key[i] == 0 {
- return EINVAL
- }
- }
- for i := 0; i < len(value); i++ {
- if value[i] == 0 {
- return EINVAL
- }
- }
-
- envLock.Lock()
- defer envLock.Unlock()
-
- i, ok := env[key]
- kv := key + "=" + value
- if ok {
- envs[i] = kv
- } else {
- i = len(envs)
- envs = append(envs, kv)
- }
- env[key] = i
- setenv_c(key, value)
- return nil
-}
-
-func Clearenv() {
- envOnce.Do(copyenv) // prevent copyenv in Getenv/Setenv
-
- envLock.Lock()
- defer envLock.Unlock()
-
- env = make(map[string]int)
- envs = []string{}
- // TODO(bradfitz): pass through to C
-}
-
-func Environ() []string {
- envOnce.Do(copyenv)
- envLock.RLock()
- defer envLock.RUnlock()
- a := make([]string, len(envs))
- copy(a, envs)
- return a
-}
diff --git a/src/pkg/syscall/env_windows.go b/src/pkg/syscall/env_windows.go
deleted file mode 100644
index 420b38724..000000000
--- a/src/pkg/syscall/env_windows.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Windows environment variables.
-
-package syscall
-
-import (
- "unicode/utf16"
- "unsafe"
-)
-
-func Getenv(key string) (value string, found bool) {
- keyp, err := UTF16PtrFromString(key)
- if err != nil {
- return "", false
- }
- b := make([]uint16, 100)
- n, e := GetEnvironmentVariable(keyp, &b[0], uint32(len(b)))
- if n == 0 && e == ERROR_ENVVAR_NOT_FOUND {
- return "", false
- }
- if n > uint32(len(b)) {
- b = make([]uint16, n)
- n, e = GetEnvironmentVariable(keyp, &b[0], uint32(len(b)))
- if n > uint32(len(b)) {
- n = 0
- }
- }
- return string(utf16.Decode(b[0:n])), true
-}
-
-func Setenv(key, value string) error {
- v, err := UTF16PtrFromString(value)
- if err != nil {
- return err
- }
- keyp, err := UTF16PtrFromString(key)
- if err != nil {
- return err
- }
- e := SetEnvironmentVariable(keyp, v)
- if e != nil {
- return e
- }
- return nil
-}
-
-func Clearenv() {
- for _, s := range Environ() {
- // Environment variables can begin with =
- // so start looking for the separator = at j=1.
- // http://blogs.msdn.com/b/oldnewthing/archive/2010/05/06/10008132.aspx
- for j := 1; j < len(s); j++ {
- if s[j] == '=' {
- Setenv(s[0:j], "")
- break
- }
- }
- }
-}
-
-func Environ() []string {
- s, e := GetEnvironmentStrings()
- if e != nil {
- return nil
- }
- defer FreeEnvironmentStrings(s)
- r := make([]string, 0, 50) // Empty with room to grow.
- for from, i, p := 0, 0, (*[1 << 24]uint16)(unsafe.Pointer(s)); true; i++ {
- if p[i] == 0 {
- // empty string marks the end
- if i <= from {
- break
- }
- r = append(r, string(utf16.Decode(p[from:i])))
- from = i + 1
- }
- }
- return r
-}
diff --git a/src/pkg/syscall/exec_bsd.go b/src/pkg/syscall/exec_bsd.go
deleted file mode 100644
index ff78f197f..000000000
--- a/src/pkg/syscall/exec_bsd.go
+++ /dev/null
@@ -1,247 +0,0 @@
-// 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.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package syscall
-
-import (
- "runtime"
- "unsafe"
-)
-
-type SysProcAttr struct {
- Chroot string // Chroot.
- Credential *Credential // Credential.
- Ptrace bool // Enable tracing.
- Setsid bool // Create session.
- Setpgid bool // Set process group ID to new pid (SYSV setpgrp)
- Setctty bool // Set controlling terminal to fd 0
- Noctty bool // Detach fd 0 from controlling terminal
-}
-
-// Implemented in runtime package.
-func runtime_BeforeFork()
-func runtime_AfterFork()
-
-// Fork, dup fd onto 0..len(fd), and exec(argv0, argvv, envv) in child.
-// If a dup or exec fails, write the errno error to pipe.
-// (Pipe is close-on-exec so if exec succeeds, it will be closed.)
-// In the child, this function must not acquire any locks, because
-// they might have been locked at the time of the fork. This means
-// no rescheduling, no malloc calls, and no new stack segments.
-// For the same reason compiler does not race instrument it.
-// The calls to RawSyscall are okay because they are assembly
-// functions that do not grow the stack.
-func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr *ProcAttr, sys *SysProcAttr, pipe int) (pid int, err Errno) {
- // Declare all variables at top in case any
- // declarations require heap allocation (e.g., err1).
- var (
- r1, r2 uintptr
- err1 Errno
- nextfd int
- i int
- )
-
- // guard against side effects of shuffling fds below.
- // Make sure that nextfd is beyond any currently open files so
- // that we can't run the risk of overwriting any of them.
- fd := make([]int, len(attr.Files))
- nextfd = len(attr.Files)
- for i, ufd := range attr.Files {
- if nextfd < int(ufd) {
- nextfd = int(ufd)
- }
- fd[i] = int(ufd)
- }
- nextfd++
-
- darwin := runtime.GOOS == "darwin"
-
- // About to call fork.
- // No more allocation or calls of non-assembly functions.
- runtime_BeforeFork()
- r1, r2, err1 = RawSyscall(SYS_FORK, 0, 0, 0)
- if err1 != 0 {
- runtime_AfterFork()
- return 0, err1
- }
-
- // On Darwin:
- // r1 = child pid in both parent and child.
- // r2 = 0 in parent, 1 in child.
- // Convert to normal Unix r1 = 0 in child.
- if darwin && r2 == 1 {
- r1 = 0
- }
-
- if r1 != 0 {
- // parent; return PID
- runtime_AfterFork()
- return int(r1), 0
- }
-
- // Fork succeeded, now in child.
-
- // Enable tracing if requested.
- if sys.Ptrace {
- _, _, err1 = RawSyscall(SYS_PTRACE, uintptr(PTRACE_TRACEME), 0, 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Session ID
- if sys.Setsid {
- _, _, err1 = RawSyscall(SYS_SETSID, 0, 0, 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Set process group
- if sys.Setpgid {
- _, _, err1 = RawSyscall(SYS_SETPGID, 0, 0, 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Chroot
- if chroot != nil {
- _, _, err1 = RawSyscall(SYS_CHROOT, uintptr(unsafe.Pointer(chroot)), 0, 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // User and groups
- if cred := sys.Credential; cred != nil {
- ngroups := uintptr(len(cred.Groups))
- groups := uintptr(0)
- if ngroups > 0 {
- groups = uintptr(unsafe.Pointer(&cred.Groups[0]))
- }
- _, _, err1 = RawSyscall(SYS_SETGROUPS, ngroups, groups, 0)
- if err1 != 0 {
- goto childerror
- }
- _, _, err1 = RawSyscall(SYS_SETGID, uintptr(cred.Gid), 0, 0)
- if err1 != 0 {
- goto childerror
- }
- _, _, err1 = RawSyscall(SYS_SETUID, uintptr(cred.Uid), 0, 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Chdir
- if dir != nil {
- _, _, err1 = RawSyscall(SYS_CHDIR, uintptr(unsafe.Pointer(dir)), 0, 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Pass 1: look for fd[i] < i and move those up above len(fd)
- // so that pass 2 won't stomp on an fd it needs later.
- if pipe < nextfd {
- _, _, err1 = RawSyscall(SYS_DUP2, uintptr(pipe), uintptr(nextfd), 0)
- if err1 != 0 {
- goto childerror
- }
- RawSyscall(SYS_FCNTL, uintptr(nextfd), F_SETFD, FD_CLOEXEC)
- pipe = nextfd
- nextfd++
- }
- for i = 0; i < len(fd); i++ {
- if fd[i] >= 0 && fd[i] < int(i) {
- _, _, err1 = RawSyscall(SYS_DUP2, uintptr(fd[i]), uintptr(nextfd), 0)
- if err1 != 0 {
- goto childerror
- }
- RawSyscall(SYS_FCNTL, uintptr(nextfd), F_SETFD, FD_CLOEXEC)
- fd[i] = nextfd
- nextfd++
- if nextfd == pipe { // don't stomp on pipe
- nextfd++
- }
- }
- }
-
- // Pass 2: dup fd[i] down onto i.
- for i = 0; i < len(fd); i++ {
- if fd[i] == -1 {
- RawSyscall(SYS_CLOSE, uintptr(i), 0, 0)
- continue
- }
- if fd[i] == int(i) {
- // dup2(i, i) won't clear close-on-exec flag on Linux,
- // probably not elsewhere either.
- _, _, err1 = RawSyscall(SYS_FCNTL, uintptr(fd[i]), F_SETFD, 0)
- if err1 != 0 {
- goto childerror
- }
- continue
- }
- // The new fd is created NOT close-on-exec,
- // which is exactly what we want.
- _, _, err1 = RawSyscall(SYS_DUP2, uintptr(fd[i]), uintptr(i), 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // By convention, we don't close-on-exec the fds we are
- // started with, so if len(fd) < 3, close 0, 1, 2 as needed.
- // Programs that know they inherit fds >= 3 will need
- // to set them close-on-exec.
- for i = len(fd); i < 3; i++ {
- RawSyscall(SYS_CLOSE, uintptr(i), 0, 0)
- }
-
- // Detach fd 0 from tty
- if sys.Noctty {
- _, _, err1 = RawSyscall(SYS_IOCTL, 0, uintptr(TIOCNOTTY), 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Make fd 0 the tty
- if sys.Setctty {
- _, _, err1 = RawSyscall(SYS_IOCTL, 0, uintptr(TIOCSCTTY), 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Time to exec.
- _, _, err1 = RawSyscall(SYS_EXECVE,
- uintptr(unsafe.Pointer(argv0)),
- uintptr(unsafe.Pointer(&argv[0])),
- uintptr(unsafe.Pointer(&envv[0])))
-
-childerror:
- // send error code on pipe
- RawSyscall(SYS_WRITE, uintptr(pipe), uintptr(unsafe.Pointer(&err1)), unsafe.Sizeof(err1))
- for {
- RawSyscall(SYS_EXIT, 253, 0, 0)
- }
-}
-
-// Try to open a pipe with O_CLOEXEC set on both file descriptors.
-func forkExecPipe(p []int) error {
- err := Pipe(p)
- if err != nil {
- return err
- }
- _, err = fcntl(p[0], F_SETFD, FD_CLOEXEC)
- if err != nil {
- return err
- }
- _, err = fcntl(p[1], F_SETFD, FD_CLOEXEC)
- return err
-}
diff --git a/src/pkg/syscall/exec_linux.go b/src/pkg/syscall/exec_linux.go
deleted file mode 100644
index f27950f73..000000000
--- a/src/pkg/syscall/exec_linux.go
+++ /dev/null
@@ -1,262 +0,0 @@
-// 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.
-
-// +build linux
-
-package syscall
-
-import (
- "unsafe"
-)
-
-type SysProcAttr struct {
- Chroot string // Chroot.
- Credential *Credential // Credential.
- Ptrace bool // Enable tracing.
- Setsid bool // Create session.
- Setpgid bool // Set process group ID to new pid (SYSV setpgrp)
- Setctty bool // Set controlling terminal to fd Ctty (only meaningful if Setsid is set)
- Noctty bool // Detach fd 0 from controlling terminal
- Ctty int // Controlling TTY fd (Linux only)
- Pdeathsig Signal // Signal that the process will get when its parent dies (Linux only)
- Cloneflags uintptr // Flags for clone calls (Linux only)
-}
-
-// Implemented in runtime package.
-func runtime_BeforeFork()
-func runtime_AfterFork()
-
-// Fork, dup fd onto 0..len(fd), and exec(argv0, argvv, envv) in child.
-// If a dup or exec fails, write the errno error to pipe.
-// (Pipe is close-on-exec so if exec succeeds, it will be closed.)
-// In the child, this function must not acquire any locks, because
-// they might have been locked at the time of the fork. This means
-// no rescheduling, no malloc calls, and no new stack segments.
-// For the same reason compiler does not race instrument it.
-// The calls to RawSyscall are okay because they are assembly
-// functions that do not grow the stack.
-func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr *ProcAttr, sys *SysProcAttr, pipe int) (pid int, err Errno) {
- // Declare all variables at top in case any
- // declarations require heap allocation (e.g., err1).
- var (
- r1 uintptr
- err1 Errno
- nextfd int
- i int
- )
-
- // Guard against side effects of shuffling fds below.
- // Make sure that nextfd is beyond any currently open files so
- // that we can't run the risk of overwriting any of them.
- fd := make([]int, len(attr.Files))
- nextfd = len(attr.Files)
- for i, ufd := range attr.Files {
- if nextfd < int(ufd) {
- nextfd = int(ufd)
- }
- fd[i] = int(ufd)
- }
- nextfd++
-
- // About to call fork.
- // No more allocation or calls of non-assembly functions.
- runtime_BeforeFork()
- r1, _, err1 = RawSyscall6(SYS_CLONE, uintptr(SIGCHLD)|sys.Cloneflags, 0, 0, 0, 0, 0)
- if err1 != 0 {
- runtime_AfterFork()
- return 0, err1
- }
-
- if r1 != 0 {
- // parent; return PID
- runtime_AfterFork()
- return int(r1), 0
- }
-
- // Fork succeeded, now in child.
-
- // Parent death signal
- if sys.Pdeathsig != 0 {
- _, _, err1 = RawSyscall6(SYS_PRCTL, PR_SET_PDEATHSIG, uintptr(sys.Pdeathsig), 0, 0, 0, 0)
- if err1 != 0 {
- goto childerror
- }
-
- // Signal self if parent is already dead. This might cause a
- // duplicate signal in rare cases, but it won't matter when
- // using SIGKILL.
- r1, _, _ = RawSyscall(SYS_GETPPID, 0, 0, 0)
- if r1 == 1 {
- pid, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- _, _, err1 := RawSyscall(SYS_KILL, pid, uintptr(sys.Pdeathsig), 0)
- if err1 != 0 {
- goto childerror
- }
- }
- }
-
- // Enable tracing if requested.
- if sys.Ptrace {
- _, _, err1 = RawSyscall(SYS_PTRACE, uintptr(PTRACE_TRACEME), 0, 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Session ID
- if sys.Setsid {
- _, _, err1 = RawSyscall(SYS_SETSID, 0, 0, 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Set process group
- if sys.Setpgid {
- _, _, err1 = RawSyscall(SYS_SETPGID, 0, 0, 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Chroot
- if chroot != nil {
- _, _, err1 = RawSyscall(SYS_CHROOT, uintptr(unsafe.Pointer(chroot)), 0, 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // User and groups
- if cred := sys.Credential; cred != nil {
- ngroups := uintptr(len(cred.Groups))
- var groups unsafe.Pointer
- if ngroups > 0 {
- groups = unsafe.Pointer(&cred.Groups[0])
- }
- _, _, err1 = RawSyscall(SYS_SETGROUPS, ngroups, uintptr(groups), 0)
- if err1 != 0 {
- goto childerror
- }
- _, _, err1 = RawSyscall(SYS_SETGID, uintptr(cred.Gid), 0, 0)
- if err1 != 0 {
- goto childerror
- }
- _, _, err1 = RawSyscall(SYS_SETUID, uintptr(cred.Uid), 0, 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Chdir
- if dir != nil {
- _, _, err1 = RawSyscall(SYS_CHDIR, uintptr(unsafe.Pointer(dir)), 0, 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Pass 1: look for fd[i] < i and move those up above len(fd)
- // so that pass 2 won't stomp on an fd it needs later.
- if pipe < nextfd {
- _, _, err1 = RawSyscall(SYS_DUP2, uintptr(pipe), uintptr(nextfd), 0)
- if err1 != 0 {
- goto childerror
- }
- RawSyscall(SYS_FCNTL, uintptr(nextfd), F_SETFD, FD_CLOEXEC)
- pipe = nextfd
- nextfd++
- }
- for i = 0; i < len(fd); i++ {
- if fd[i] >= 0 && fd[i] < int(i) {
- _, _, err1 = RawSyscall(SYS_DUP2, uintptr(fd[i]), uintptr(nextfd), 0)
- if err1 != 0 {
- goto childerror
- }
- RawSyscall(SYS_FCNTL, uintptr(nextfd), F_SETFD, FD_CLOEXEC)
- fd[i] = nextfd
- nextfd++
- if nextfd == pipe { // don't stomp on pipe
- nextfd++
- }
- }
- }
-
- // Pass 2: dup fd[i] down onto i.
- for i = 0; i < len(fd); i++ {
- if fd[i] == -1 {
- RawSyscall(SYS_CLOSE, uintptr(i), 0, 0)
- continue
- }
- if fd[i] == int(i) {
- // dup2(i, i) won't clear close-on-exec flag on Linux,
- // probably not elsewhere either.
- _, _, err1 = RawSyscall(SYS_FCNTL, uintptr(fd[i]), F_SETFD, 0)
- if err1 != 0 {
- goto childerror
- }
- continue
- }
- // The new fd is created NOT close-on-exec,
- // which is exactly what we want.
- _, _, err1 = RawSyscall(SYS_DUP2, uintptr(fd[i]), uintptr(i), 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // By convention, we don't close-on-exec the fds we are
- // started with, so if len(fd) < 3, close 0, 1, 2 as needed.
- // Programs that know they inherit fds >= 3 will need
- // to set them close-on-exec.
- for i = len(fd); i < 3; i++ {
- RawSyscall(SYS_CLOSE, uintptr(i), 0, 0)
- }
-
- // Detach fd 0 from tty
- if sys.Noctty {
- _, _, err1 = RawSyscall(SYS_IOCTL, 0, uintptr(TIOCNOTTY), 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Set the controlling TTY to Ctty
- if sys.Setctty && sys.Ctty >= 0 {
- _, _, err1 = RawSyscall(SYS_IOCTL, uintptr(sys.Ctty), uintptr(TIOCSCTTY), 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Time to exec.
- _, _, err1 = RawSyscall(SYS_EXECVE,
- uintptr(unsafe.Pointer(argv0)),
- uintptr(unsafe.Pointer(&argv[0])),
- uintptr(unsafe.Pointer(&envv[0])))
-
-childerror:
- // send error code on pipe
- RawSyscall(SYS_WRITE, uintptr(pipe), uintptr(unsafe.Pointer(&err1)), unsafe.Sizeof(err1))
- for {
- RawSyscall(SYS_EXIT, 253, 0, 0)
- }
-}
-
-// Try to open a pipe with O_CLOEXEC set on both file descriptors.
-func forkExecPipe(p []int) (err error) {
- err = Pipe2(p, O_CLOEXEC)
- // pipe2 was added in 2.6.27 and our minimum requirement is 2.6.23, so it
- // might not be implemented.
- if err == ENOSYS {
- if err = Pipe(p); err != nil {
- return
- }
- if _, err = fcntl(p[0], F_SETFD, FD_CLOEXEC); err != nil {
- return
- }
- _, err = fcntl(p[1], F_SETFD, FD_CLOEXEC)
- }
- return
-}
diff --git a/src/pkg/syscall/exec_plan9.go b/src/pkg/syscall/exec_plan9.go
deleted file mode 100644
index 45ee542bb..000000000
--- a/src/pkg/syscall/exec_plan9.go
+++ /dev/null
@@ -1,650 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Fork, exec, wait, etc.
-
-package syscall
-
-import (
- "runtime"
- "sync"
- "unsafe"
-)
-
-// Lock synchronizing creation of new file descriptors with fork.
-//
-// We want the child in a fork/exec sequence to inherit only the
-// file descriptors we intend. To do that, we mark all file
-// descriptors close-on-exec and then, in the child, explicitly
-// unmark the ones we want the exec'ed program to keep.
-// Unix doesn't make this easy: there is, in general, no way to
-// allocate a new file descriptor close-on-exec. Instead you
-// have to allocate the descriptor and then mark it close-on-exec.
-// If a fork happens between those two events, the child's exec
-// will inherit an unwanted file descriptor.
-//
-// This lock solves that race: the create new fd/mark close-on-exec
-// operation is done holding ForkLock for reading, and the fork itself
-// is done holding ForkLock for writing. At least, that's the idea.
-// There are some complications.
-//
-// Some system calls that create new file descriptors can block
-// for arbitrarily long times: open on a hung NFS server or named
-// pipe, accept on a socket, and so on. We can't reasonably grab
-// the lock across those operations.
-//
-// It is worse to inherit some file descriptors than others.
-// If a non-malicious child accidentally inherits an open ordinary file,
-// that's not a big deal. On the other hand, if a long-lived child
-// accidentally inherits the write end of a pipe, then the reader
-// of that pipe will not see EOF until that child exits, potentially
-// causing the parent program to hang. This is a common problem
-// in threaded C programs that use popen.
-//
-// Luckily, the file descriptors that are most important not to
-// inherit are not the ones that can take an arbitrarily long time
-// to create: pipe returns instantly, and the net package uses
-// non-blocking I/O to accept on a listening socket.
-// The rules for which file descriptor-creating operations use the
-// ForkLock are as follows:
-//
-// 1) Pipe. Does not block. Use the ForkLock.
-// 2) Socket. Does not block. Use the ForkLock.
-// 3) Accept. If using non-blocking mode, use the ForkLock.
-// Otherwise, live with the race.
-// 4) Open. Can block. Use O_CLOEXEC if available (Linux).
-// Otherwise, live with the race.
-// 5) Dup. Does not block. Use the ForkLock.
-// On Linux, could use fcntl F_DUPFD_CLOEXEC
-// instead of the ForkLock, but only for dup(fd, -1).
-
-var ForkLock sync.RWMutex
-
-// StringSlicePtr is deprecated. Use SlicePtrFromStrings instead.
-// If any string contains a NUL byte this function panics instead
-// of returning an error.
-func StringSlicePtr(ss []string) []*byte {
- bb := make([]*byte, len(ss)+1)
- for i := 0; i < len(ss); i++ {
- bb[i] = StringBytePtr(ss[i])
- }
- bb[len(ss)] = nil
- return bb
-}
-
-// SlicePtrFromStrings converts a slice of strings to a slice of
-// pointers to NUL-terminated byte slices. If any string contains
-// a NUL byte, it returns (nil, EINVAL).
-func SlicePtrFromStrings(ss []string) ([]*byte, error) {
- var err error
- bb := make([]*byte, len(ss)+1)
- for i := 0; i < len(ss); i++ {
- bb[i], err = BytePtrFromString(ss[i])
- if err != nil {
- return nil, err
- }
- }
- bb[len(ss)] = nil
- return bb, nil
-}
-
-// readdirnames returns the names of files inside the directory represented by dirfd.
-func readdirnames(dirfd int) (names []string, err error) {
- names = make([]string, 0, 100)
- var buf [STATMAX]byte
-
- for {
- n, e := Read(dirfd, buf[:])
- if e != nil {
- return nil, e
- }
- if n == 0 {
- break
- }
- for i := 0; i < n; {
- m, _ := gbit16(buf[i:])
- m += 2
-
- if m < STATFIXLEN {
- return nil, ErrBadStat
- }
-
- s, _, ok := gstring(buf[i+41:])
- if !ok {
- return nil, ErrBadStat
- }
- names = append(names, s)
- i += int(m)
- }
- }
- return
-}
-
-// readdupdevice returns a list of currently opened fds (excluding stdin, stdout, stderr) from the dup device #d.
-// ForkLock should be write locked before calling, so that no new fds would be created while the fd list is being read.
-func readdupdevice() (fds []int, err error) {
- dupdevfd, err := Open("#d", O_RDONLY)
- if err != nil {
- return
- }
- defer Close(dupdevfd)
-
- names, err := readdirnames(dupdevfd)
- if err != nil {
- return
- }
-
- fds = make([]int, 0, len(names)/2)
- for _, name := range names {
- if n := len(name); n > 3 && name[n-3:n] == "ctl" {
- continue
- }
- fd := int(atoi([]byte(name)))
- switch fd {
- case 0, 1, 2, dupdevfd:
- continue
- }
- fds = append(fds, fd)
- }
- return
-}
-
-var startupFds []int
-
-// Plan 9 does not allow clearing the OCEXEC flag
-// from the underlying channel backing an open file descriptor,
-// therefore we store a list of already opened file descriptors
-// inside startupFds and skip them when manually closing descriptors
-// not meant to be passed to a child exec.
-func init() {
- startupFds, _ = readdupdevice()
-}
-
-// forkAndExecInChild forks the process, calling dup onto 0..len(fd)
-// and finally invoking exec(argv0, argvv, envv) in the child.
-// If a dup or exec fails, it writes the error string to pipe.
-// (The pipe write end is close-on-exec so if exec succeeds, it will be closed.)
-//
-// In the child, this function must not acquire any locks, because
-// they might have been locked at the time of the fork. This means
-// no rescheduling, no malloc calls, and no new stack segments.
-// The calls to RawSyscall are okay because they are assembly
-// functions that do not grow the stack.
-func forkAndExecInChild(argv0 *byte, argv []*byte, envv []envItem, dir *byte, attr *ProcAttr, fdsToClose []int, pipe int, rflag int) (pid int, err error) {
- // Declare all variables at top in case any
- // declarations require heap allocation (e.g., errbuf).
- var (
- r1 uintptr
- nextfd int
- i int
- clearenv int
- envfd int
- errbuf [ERRMAX]byte
- )
-
- // Guard against side effects of shuffling fds below.
- // Make sure that nextfd is beyond any currently open files so
- // that we can't run the risk of overwriting any of them.
- fd := make([]int, len(attr.Files))
- nextfd = len(attr.Files)
- for i, ufd := range attr.Files {
- if nextfd < int(ufd) {
- nextfd = int(ufd)
- }
- fd[i] = int(ufd)
- }
- nextfd++
-
- if envv != nil {
- clearenv = RFCENVG
- }
-
- // About to call fork.
- // No more allocation or calls of non-assembly functions.
- r1, _, _ = RawSyscall(SYS_RFORK, uintptr(RFPROC|RFFDG|RFREND|clearenv|rflag), 0, 0)
-
- if r1 != 0 {
- if int32(r1) == -1 {
- return 0, NewError(errstr())
- }
- // parent; return PID
- return int(r1), nil
- }
-
- // Fork succeeded, now in child.
-
- // Close fds we don't need.
- for i = 0; i < len(fdsToClose); i++ {
- r1, _, _ = RawSyscall(SYS_CLOSE, uintptr(fdsToClose[i]), 0, 0)
- if int32(r1) == -1 {
- goto childerror
- }
- }
-
- if envv != nil {
- // Write new environment variables.
- for i = 0; i < len(envv); i++ {
- r1, _, _ = RawSyscall(SYS_CREATE, uintptr(unsafe.Pointer(envv[i].name)), uintptr(O_WRONLY), uintptr(0666))
-
- if int32(r1) == -1 {
- goto childerror
- }
-
- envfd = int(r1)
-
- r1, _, _ = RawSyscall6(SYS_PWRITE, uintptr(envfd), uintptr(unsafe.Pointer(envv[i].value)), uintptr(envv[i].nvalue),
- ^uintptr(0), ^uintptr(0), 0)
-
- if int32(r1) == -1 || int(r1) != envv[i].nvalue {
- goto childerror
- }
-
- r1, _, _ = RawSyscall(SYS_CLOSE, uintptr(envfd), 0, 0)
-
- if int32(r1) == -1 {
- goto childerror
- }
- }
- }
-
- // Chdir
- if dir != nil {
- r1, _, _ = RawSyscall(SYS_CHDIR, uintptr(unsafe.Pointer(dir)), 0, 0)
- if int32(r1) == -1 {
- goto childerror
- }
- }
-
- // Pass 1: look for fd[i] < i and move those up above len(fd)
- // so that pass 2 won't stomp on an fd it needs later.
- if pipe < nextfd {
- r1, _, _ = RawSyscall(SYS_DUP, uintptr(pipe), uintptr(nextfd), 0)
- if int32(r1) == -1 {
- goto childerror
- }
- pipe = nextfd
- nextfd++
- }
- for i = 0; i < len(fd); i++ {
- if fd[i] >= 0 && fd[i] < int(i) {
- r1, _, _ = RawSyscall(SYS_DUP, uintptr(fd[i]), uintptr(nextfd), 0)
- if int32(r1) == -1 {
- goto childerror
- }
-
- fd[i] = nextfd
- nextfd++
- if nextfd == pipe { // don't stomp on pipe
- nextfd++
- }
- }
- }
-
- // Pass 2: dup fd[i] down onto i.
- for i = 0; i < len(fd); i++ {
- if fd[i] == -1 {
- RawSyscall(SYS_CLOSE, uintptr(i), 0, 0)
- continue
- }
- if fd[i] == int(i) {
- continue
- }
- r1, _, _ = RawSyscall(SYS_DUP, uintptr(fd[i]), uintptr(i), 0)
- if int32(r1) == -1 {
- goto childerror
- }
- }
-
- // Pass 3: close fd[i] if it was moved in the previous pass.
- for i = 0; i < len(fd); i++ {
- if fd[i] >= 0 && fd[i] != int(i) {
- RawSyscall(SYS_CLOSE, uintptr(fd[i]), 0, 0)
- }
- }
-
- // Time to exec.
- r1, _, _ = RawSyscall(SYS_EXEC,
- uintptr(unsafe.Pointer(argv0)),
- uintptr(unsafe.Pointer(&argv[0])), 0)
-
-childerror:
- // send error string on pipe
- RawSyscall(SYS_ERRSTR, uintptr(unsafe.Pointer(&errbuf[0])), uintptr(len(errbuf)), 0)
- errbuf[len(errbuf)-1] = 0
- i = 0
- for i < len(errbuf) && errbuf[i] != 0 {
- i++
- }
-
- RawSyscall6(SYS_PWRITE, uintptr(pipe), uintptr(unsafe.Pointer(&errbuf[0])), uintptr(i),
- ^uintptr(0), ^uintptr(0), 0)
-
- for {
- RawSyscall(SYS_EXITS, 0, 0, 0)
- }
-
- // Calling panic is not actually safe,
- // but the for loop above won't break
- // and this shuts up the compiler.
- panic("unreached")
-}
-
-func cexecPipe(p []int) error {
- e := Pipe(p)
- if e != nil {
- return e
- }
-
- fd, e := Open("#d/"+itoa(p[1]), O_CLOEXEC)
- if e != nil {
- Close(p[0])
- Close(p[1])
- return e
- }
-
- Close(fd)
- return nil
-}
-
-type envItem struct {
- name *byte
- value *byte
- nvalue int
-}
-
-type ProcAttr struct {
- Dir string // Current working directory.
- Env []string // Environment.
- Files []uintptr // File descriptors.
- Sys *SysProcAttr
-}
-
-type SysProcAttr struct {
- Rfork int // additional flags to pass to rfork
-}
-
-var zeroProcAttr ProcAttr
-var zeroSysProcAttr SysProcAttr
-
-func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error) {
- var (
- p [2]int
- n int
- errbuf [ERRMAX]byte
- wmsg Waitmsg
- )
-
- if attr == nil {
- attr = &zeroProcAttr
- }
- sys := attr.Sys
- if sys == nil {
- sys = &zeroSysProcAttr
- }
-
- p[0] = -1
- p[1] = -1
-
- // Convert args to C form.
- argv0p, err := BytePtrFromString(argv0)
- if err != nil {
- return 0, err
- }
- argvp, err := SlicePtrFromStrings(argv)
- if err != nil {
- return 0, err
- }
-
- var dir *byte
- if attr.Dir != "" {
- dir, err = BytePtrFromString(attr.Dir)
- if err != nil {
- return 0, err
- }
- }
- var envvParsed []envItem
- if attr.Env != nil {
- envvParsed = make([]envItem, 0, len(attr.Env))
- for _, v := range attr.Env {
- i := 0
- for i < len(v) && v[i] != '=' {
- i++
- }
-
- envname, err := BytePtrFromString("/env/" + v[:i])
- if err != nil {
- return 0, err
- }
- envvalue := make([]byte, len(v)-i)
- copy(envvalue, v[i+1:])
- envvParsed = append(envvParsed, envItem{envname, &envvalue[0], len(v) - i})
- }
- }
-
- // Acquire the fork lock to prevent other threads from creating new fds before we fork.
- ForkLock.Lock()
-
- // get a list of open fds, excluding stdin,stdout and stderr that need to be closed in the child.
- // no new fds can be created while we hold the ForkLock for writing.
- openFds, e := readdupdevice()
- if e != nil {
- ForkLock.Unlock()
- return 0, e
- }
-
- fdsToClose := make([]int, 0, len(openFds))
- for _, fd := range openFds {
- doClose := true
-
- // exclude files opened at startup.
- for _, sfd := range startupFds {
- if fd == sfd {
- doClose = false
- break
- }
- }
-
- // exclude files explicitly requested by the caller.
- for _, rfd := range attr.Files {
- if fd == int(rfd) {
- doClose = false
- break
- }
- }
-
- if doClose {
- fdsToClose = append(fdsToClose, fd)
- }
- }
-
- // Allocate child status pipe close on exec.
- e = cexecPipe(p[:])
-
- if e != nil {
- return 0, e
- }
- fdsToClose = append(fdsToClose, p[0])
-
- // Kick off child.
- pid, err = forkAndExecInChild(argv0p, argvp, envvParsed, dir, attr, fdsToClose, p[1], sys.Rfork)
-
- if err != nil {
- if p[0] >= 0 {
- Close(p[0])
- Close(p[1])
- }
- ForkLock.Unlock()
- return 0, err
- }
- ForkLock.Unlock()
-
- // Read child error status from pipe.
- Close(p[1])
- n, err = Read(p[0], errbuf[:])
- Close(p[0])
-
- if err != nil || n != 0 {
- if n != 0 {
- err = NewError(string(errbuf[:n]))
- }
-
- // Child failed; wait for it to exit, to make sure
- // the zombies don't accumulate.
- for wmsg.Pid != pid {
- Await(&wmsg)
- }
- return 0, err
- }
-
- // Read got EOF, so pipe closed on exec, so exec succeeded.
- return pid, nil
-}
-
-type waitErr struct {
- Waitmsg
- err error
-}
-
-var procs struct {
- sync.Mutex
- waits map[int]chan *waitErr
-}
-
-// startProcess starts a new goroutine, tied to the OS
-// thread, which runs the process and subsequently waits
-// for it to finish, communicating the process stats back
-// to any goroutines that may have been waiting on it.
-//
-// Such a dedicated goroutine is needed because on
-// Plan 9, only the parent thread can wait for a child,
-// whereas goroutines tend to jump OS threads (e.g.,
-// between starting a process and running Wait(), the
-// goroutine may have been rescheduled).
-func startProcess(argv0 string, argv []string, attr *ProcAttr) (pid int, err error) {
- type forkRet struct {
- pid int
- err error
- }
-
- forkc := make(chan forkRet, 1)
- go func() {
- runtime.LockOSThread()
- var ret forkRet
-
- ret.pid, ret.err = forkExec(argv0, argv, attr)
- // If fork fails there is nothing to wait for.
- if ret.err != nil || ret.pid == 0 {
- forkc <- ret
- return
- }
-
- waitc := make(chan *waitErr, 1)
-
- // Mark that the process is running.
- procs.Lock()
- if procs.waits == nil {
- procs.waits = make(map[int]chan *waitErr)
- }
- procs.waits[ret.pid] = waitc
- procs.Unlock()
-
- forkc <- ret
-
- var w waitErr
- for w.err == nil && w.Pid != ret.pid {
- w.err = Await(&w.Waitmsg)
- }
- waitc <- &w
- close(waitc)
- }()
- ret := <-forkc
- return ret.pid, ret.err
-}
-
-// Combination of fork and exec, careful to be thread safe.
-func ForkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error) {
- return startProcess(argv0, argv, attr)
-}
-
-// StartProcess wraps ForkExec for package os.
-func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid int, handle uintptr, err error) {
- pid, err = startProcess(argv0, argv, attr)
- return pid, 0, err
-}
-
-// Ordinary exec.
-func Exec(argv0 string, argv []string, envv []string) (err error) {
- if envv != nil {
- r1, _, _ := RawSyscall(SYS_RFORK, RFCENVG, 0, 0)
- if int32(r1) == -1 {
- return NewError(errstr())
- }
-
- for _, v := range envv {
- i := 0
- for i < len(v) && v[i] != '=' {
- i++
- }
-
- fd, e := Create("/env/"+v[:i], O_WRONLY, 0666)
- if e != nil {
- return e
- }
-
- _, e = Write(fd, []byte(v[i+1:]))
- if e != nil {
- Close(fd)
- return e
- }
- Close(fd)
- }
- }
-
- argv0p, err := BytePtrFromString(argv0)
- if err != nil {
- return err
- }
- argvp, err := SlicePtrFromStrings(argv)
- if err != nil {
- return err
- }
- _, _, e1 := Syscall(SYS_EXEC,
- uintptr(unsafe.Pointer(argv0p)),
- uintptr(unsafe.Pointer(&argvp[0])),
- 0)
-
- return e1
-}
-
-// WaitProcess waits until the pid of a
-// running process is found in the queue of
-// wait messages. It is used in conjunction
-// with ForkExec/StartProcess to wait for a
-// running process to exit.
-func WaitProcess(pid int, w *Waitmsg) (err error) {
- procs.Lock()
- ch := procs.waits[pid]
- procs.Unlock()
-
- var wmsg *waitErr
- if ch != nil {
- wmsg = <-ch
- procs.Lock()
- if procs.waits[pid] == ch {
- delete(procs.waits, pid)
- }
- procs.Unlock()
- }
- if wmsg == nil {
- // ch was missing or ch is closed
- return NewError("process not found")
- }
- if wmsg.err != nil {
- return wmsg.err
- }
- if w != nil {
- *w = wmsg.Waitmsg
- }
- return nil
-}
diff --git a/src/pkg/syscall/exec_solaris.go b/src/pkg/syscall/exec_solaris.go
deleted file mode 100644
index 97de6ca00..000000000
--- a/src/pkg/syscall/exec_solaris.go
+++ /dev/null
@@ -1,243 +0,0 @@
-// 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.
-
-package syscall
-
-import (
- "unsafe"
-)
-
-type SysProcAttr struct {
- Chroot string // Chroot.
- Credential *Credential // Credential.
- Setsid bool // Create session.
- Setpgid bool // Set process group ID to new pid (SYSV setpgrp)
- Setctty bool // Set controlling terminal to fd 0
- Noctty bool // Detach fd 0 from controlling terminal
-}
-
-// Implemented in runtime package.
-func runtime_BeforeFork()
-func runtime_AfterFork()
-
-func chdir(path uintptr) (err Errno)
-func chroot1(path uintptr) (err Errno)
-func close(fd uintptr) (err Errno)
-func execve(path uintptr, argv uintptr, envp uintptr) (err Errno)
-func exit(code uintptr)
-func fcntl1(fd uintptr, cmd uintptr, arg uintptr) (val uintptr, err Errno)
-func forkx(flags uintptr) (pid uintptr, err Errno)
-func ioctl(fd uintptr, req uintptr, arg uintptr) (err Errno)
-func setgid(gid uintptr) (err Errno)
-func setgroups1(ngid uintptr, gid uintptr) (err Errno)
-func setsid() (pid uintptr, err Errno)
-func setuid(uid uintptr) (err Errno)
-func setpgid(pid uintptr, pgid uintptr) (err Errno)
-func write1(fd uintptr, buf uintptr, nbyte uintptr) (n uintptr, err Errno)
-
-// Fork, dup fd onto 0..len(fd), and exec(argv0, argvv, envv) in child.
-// If a dup or exec fails, write the errno error to pipe.
-// (Pipe is close-on-exec so if exec succeeds, it will be closed.)
-// In the child, this function must not acquire any locks, because
-// they might have been locked at the time of the fork. This means
-// no rescheduling, no malloc calls, and no new stack segments.
-//
-// We call hand-crafted syscalls, implemented in
-// ../runtime/syscall_solaris.goc, rather than generated libc wrappers
-// because we need to avoid lazy-loading the functions (might malloc,
-// split the stack, or acquire mutexes). We can't call RawSyscall
-// because it's not safe even for BSD-subsystem calls.
-func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr *ProcAttr, sys *SysProcAttr, pipe int) (pid int, err Errno) {
- // Declare all variables at top in case any
- // declarations require heap allocation (e.g., err1).
- var (
- r1 uintptr
- err1 Errno
- nextfd int
- i int
- )
-
- // guard against side effects of shuffling fds below.
- // Make sure that nextfd is beyond any currently open files so
- // that we can't run the risk of overwriting any of them.
- fd := make([]int, len(attr.Files))
- nextfd = len(attr.Files)
- for i, ufd := range attr.Files {
- if nextfd < int(ufd) {
- nextfd = int(ufd)
- }
- fd[i] = int(ufd)
- }
- nextfd++
-
- // About to call fork.
- // No more allocation or calls of non-assembly functions.
- runtime_BeforeFork()
- r1, err1 = forkx(0x1) // FORK_NOSIGCHLD
- if err1 != 0 {
- runtime_AfterFork()
- return 0, err1
- }
-
- if r1 != 0 {
- // parent; return PID
- runtime_AfterFork()
- return int(r1), 0
- }
-
- // Fork succeeded, now in child.
-
- // Session ID
- if sys.Setsid {
- _, err1 = setsid()
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Set process group
- if sys.Setpgid {
- err1 = setpgid(0, 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Chroot
- if chroot != nil {
- err1 = chroot1(uintptr(unsafe.Pointer(chroot)))
- if err1 != 0 {
- goto childerror
- }
- }
-
- // User and groups
- if cred := sys.Credential; cred != nil {
- ngroups := uintptr(len(cred.Groups))
- groups := uintptr(0)
- if ngroups > 0 {
- groups = uintptr(unsafe.Pointer(&cred.Groups[0]))
- }
- err1 = setgroups1(ngroups, groups)
- if err1 != 0 {
- goto childerror
- }
- err1 = setgid(uintptr(cred.Gid))
- if err1 != 0 {
- goto childerror
- }
- err1 = setuid(uintptr(cred.Uid))
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Chdir
- if dir != nil {
- err1 = chdir(uintptr(unsafe.Pointer(dir)))
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Pass 1: look for fd[i] < i and move those up above len(fd)
- // so that pass 2 won't stomp on an fd it needs later.
- if pipe < nextfd {
- _, err1 = fcntl1(uintptr(pipe), F_DUP2FD, uintptr(nextfd))
- if err1 != 0 {
- goto childerror
- }
- fcntl1(uintptr(nextfd), F_SETFD, FD_CLOEXEC)
- pipe = nextfd
- nextfd++
- }
- for i = 0; i < len(fd); i++ {
- if fd[i] >= 0 && fd[i] < int(i) {
- _, err1 = fcntl1(uintptr(fd[i]), F_DUP2FD, uintptr(nextfd))
- if err1 != 0 {
- goto childerror
- }
- fcntl1(uintptr(nextfd), F_SETFD, FD_CLOEXEC)
- fd[i] = nextfd
- nextfd++
- if nextfd == pipe { // don't stomp on pipe
- nextfd++
- }
- }
- }
-
- // Pass 2: dup fd[i] down onto i.
- for i = 0; i < len(fd); i++ {
- if fd[i] == -1 {
- close(uintptr(i))
- continue
- }
- if fd[i] == int(i) {
- // dup2(i, i) won't clear close-on-exec flag on Linux,
- // probably not elsewhere either.
- _, err1 = fcntl1(uintptr(fd[i]), F_SETFD, 0)
- if err1 != 0 {
- goto childerror
- }
- continue
- }
- // The new fd is created NOT close-on-exec,
- // which is exactly what we want.
- _, err1 = fcntl1(uintptr(fd[i]), F_DUP2FD, uintptr(i))
- if err1 != 0 {
- goto childerror
- }
- }
-
- // By convention, we don't close-on-exec the fds we are
- // started with, so if len(fd) < 3, close 0, 1, 2 as needed.
- // Programs that know they inherit fds >= 3 will need
- // to set them close-on-exec.
- for i = len(fd); i < 3; i++ {
- close(uintptr(i))
- }
-
- // Detach fd 0 from tty
- if sys.Noctty {
- err1 = ioctl(0, uintptr(TIOCNOTTY), 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Make fd 0 the tty
- if sys.Setctty {
- err1 = ioctl(0, uintptr(TIOCSCTTY), 0)
- if err1 != 0 {
- goto childerror
- }
- }
-
- // Time to exec.
- err1 = execve(
- uintptr(unsafe.Pointer(argv0)),
- uintptr(unsafe.Pointer(&argv[0])),
- uintptr(unsafe.Pointer(&envv[0])))
-
-childerror:
- // send error code on pipe
- write1(uintptr(pipe), uintptr(unsafe.Pointer(&err1)), unsafe.Sizeof(err1))
- for {
- exit(253)
- }
-}
-
-// Try to open a pipe with O_CLOEXEC set on both file descriptors.
-func forkExecPipe(p []int) error {
- err := Pipe(p)
- if err != nil {
- return err
- }
- _, err = fcntl(p[0], F_SETFD, FD_CLOEXEC)
- if err != nil {
- return err
- }
- _, err = fcntl(p[1], F_SETFD, FD_CLOEXEC)
- return err
-}
diff --git a/src/pkg/syscall/exec_unix.go b/src/pkg/syscall/exec_unix.go
deleted file mode 100644
index 890bfdc22..000000000
--- a/src/pkg/syscall/exec_unix.go
+++ /dev/null
@@ -1,261 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-// Fork, exec, wait, etc.
-
-package syscall
-
-import (
- "runtime"
- "sync"
- "unsafe"
-)
-
-// Lock synchronizing creation of new file descriptors with fork.
-//
-// We want the child in a fork/exec sequence to inherit only the
-// file descriptors we intend. To do that, we mark all file
-// descriptors close-on-exec and then, in the child, explicitly
-// unmark the ones we want the exec'ed program to keep.
-// Unix doesn't make this easy: there is, in general, no way to
-// allocate a new file descriptor close-on-exec. Instead you
-// have to allocate the descriptor and then mark it close-on-exec.
-// If a fork happens between those two events, the child's exec
-// will inherit an unwanted file descriptor.
-//
-// This lock solves that race: the create new fd/mark close-on-exec
-// operation is done holding ForkLock for reading, and the fork itself
-// is done holding ForkLock for writing. At least, that's the idea.
-// There are some complications.
-//
-// Some system calls that create new file descriptors can block
-// for arbitrarily long times: open on a hung NFS server or named
-// pipe, accept on a socket, and so on. We can't reasonably grab
-// the lock across those operations.
-//
-// It is worse to inherit some file descriptors than others.
-// If a non-malicious child accidentally inherits an open ordinary file,
-// that's not a big deal. On the other hand, if a long-lived child
-// accidentally inherits the write end of a pipe, then the reader
-// of that pipe will not see EOF until that child exits, potentially
-// causing the parent program to hang. This is a common problem
-// in threaded C programs that use popen.
-//
-// Luckily, the file descriptors that are most important not to
-// inherit are not the ones that can take an arbitrarily long time
-// to create: pipe returns instantly, and the net package uses
-// non-blocking I/O to accept on a listening socket.
-// The rules for which file descriptor-creating operations use the
-// ForkLock are as follows:
-//
-// 1) Pipe. Does not block. Use the ForkLock.
-// 2) Socket. Does not block. Use the ForkLock.
-// 3) Accept. If using non-blocking mode, use the ForkLock.
-// Otherwise, live with the race.
-// 4) Open. Can block. Use O_CLOEXEC if available (Linux).
-// Otherwise, live with the race.
-// 5) Dup. Does not block. Use the ForkLock.
-// On Linux, could use fcntl F_DUPFD_CLOEXEC
-// instead of the ForkLock, but only for dup(fd, -1).
-
-var ForkLock sync.RWMutex
-
-// StringSlicePtr is deprecated. Use SlicePtrFromStrings instead.
-// If any string contains a NUL byte this function panics instead
-// of returning an error.
-func StringSlicePtr(ss []string) []*byte {
- bb := make([]*byte, len(ss)+1)
- for i := 0; i < len(ss); i++ {
- bb[i] = StringBytePtr(ss[i])
- }
- bb[len(ss)] = nil
- return bb
-}
-
-// SlicePtrFromStrings converts a slice of strings to a slice of
-// pointers to NUL-terminated byte slices. If any string contains
-// a NUL byte, it returns (nil, EINVAL).
-func SlicePtrFromStrings(ss []string) ([]*byte, error) {
- var err error
- bb := make([]*byte, len(ss)+1)
- for i := 0; i < len(ss); i++ {
- bb[i], err = BytePtrFromString(ss[i])
- if err != nil {
- return nil, err
- }
- }
- bb[len(ss)] = nil
- return bb, nil
-}
-
-func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }
-
-func SetNonblock(fd int, nonblocking bool) (err error) {
- flag, err := fcntl(fd, F_GETFL, 0)
- if err != nil {
- return err
- }
- if nonblocking {
- flag |= O_NONBLOCK
- } else {
- flag &= ^O_NONBLOCK
- }
- _, err = fcntl(fd, F_SETFL, flag)
- return err
-}
-
-// Credential holds user and group identities to be assumed
-// by a child process started by StartProcess.
-type Credential struct {
- Uid uint32 // User ID.
- Gid uint32 // Group ID.
- Groups []uint32 // Supplementary group IDs.
-}
-
-// ProcAttr holds attributes that will be applied to a new process started
-// by StartProcess.
-type ProcAttr struct {
- Dir string // Current working directory.
- Env []string // Environment.
- Files []uintptr // File descriptors.
- Sys *SysProcAttr
-}
-
-var zeroProcAttr ProcAttr
-var zeroSysProcAttr SysProcAttr
-
-func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error) {
- var p [2]int
- var n int
- var err1 Errno
- var wstatus WaitStatus
-
- if attr == nil {
- attr = &zeroProcAttr
- }
- sys := attr.Sys
- if sys == nil {
- sys = &zeroSysProcAttr
- }
-
- p[0] = -1
- p[1] = -1
-
- // Convert args to C form.
- argv0p, err := BytePtrFromString(argv0)
- if err != nil {
- return 0, err
- }
- argvp, err := SlicePtrFromStrings(argv)
- if err != nil {
- return 0, err
- }
- envvp, err := SlicePtrFromStrings(attr.Env)
- if err != nil {
- return 0, err
- }
-
- if (runtime.GOOS == "freebsd" || runtime.GOOS == "dragonfly") && len(argv[0]) > len(argv0) {
- argvp[0] = argv0p
- }
-
- var chroot *byte
- if sys.Chroot != "" {
- chroot, err = BytePtrFromString(sys.Chroot)
- if err != nil {
- return 0, err
- }
- }
- var dir *byte
- if attr.Dir != "" {
- dir, err = BytePtrFromString(attr.Dir)
- if err != nil {
- return 0, err
- }
- }
-
- // Acquire the fork lock so that no other threads
- // create new fds that are not yet close-on-exec
- // before we fork.
- ForkLock.Lock()
-
- // Allocate child status pipe close on exec.
- if err = forkExecPipe(p[:]); err != nil {
- goto error
- }
-
- // Kick off child.
- pid, err1 = forkAndExecInChild(argv0p, argvp, envvp, chroot, dir, attr, sys, p[1])
- if err1 != 0 {
- err = Errno(err1)
- goto error
- }
- ForkLock.Unlock()
-
- // Read child error status from pipe.
- Close(p[1])
- n, err = readlen(p[0], (*byte)(unsafe.Pointer(&err1)), int(unsafe.Sizeof(err1)))
- Close(p[0])
- if err != nil || n != 0 {
- if n == int(unsafe.Sizeof(err1)) {
- err = Errno(err1)
- }
- if err == nil {
- err = EPIPE
- }
-
- // Child failed; wait for it to exit, to make sure
- // the zombies don't accumulate.
- _, err1 := Wait4(pid, &wstatus, 0, nil)
- for err1 == EINTR {
- _, err1 = Wait4(pid, &wstatus, 0, nil)
- }
- return 0, err
- }
-
- // Read got EOF, so pipe closed on exec, so exec succeeded.
- return pid, nil
-
-error:
- if p[0] >= 0 {
- Close(p[0])
- Close(p[1])
- }
- ForkLock.Unlock()
- return 0, err
-}
-
-// Combination of fork and exec, careful to be thread safe.
-func ForkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error) {
- return forkExec(argv0, argv, attr)
-}
-
-// StartProcess wraps ForkExec for package os.
-func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid int, handle uintptr, err error) {
- pid, err = forkExec(argv0, argv, attr)
- return pid, 0, err
-}
-
-// Ordinary exec.
-func Exec(argv0 string, argv []string, envv []string) (err error) {
- argv0p, err := BytePtrFromString(argv0)
- if err != nil {
- return err
- }
- argvp, err := SlicePtrFromStrings(argv)
- if err != nil {
- return err
- }
- envvp, err := SlicePtrFromStrings(envv)
- if err != nil {
- return err
- }
- _, _, err1 := RawSyscall(SYS_EXECVE,
- uintptr(unsafe.Pointer(argv0p)),
- uintptr(unsafe.Pointer(&argvp[0])),
- uintptr(unsafe.Pointer(&envvp[0])))
- return Errno(err1)
-}
diff --git a/src/pkg/syscall/exec_windows.go b/src/pkg/syscall/exec_windows.go
deleted file mode 100644
index 82abc0715..000000000
--- a/src/pkg/syscall/exec_windows.go
+++ /dev/null
@@ -1,341 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Fork, exec, wait, etc.
-
-package syscall
-
-import (
- "sync"
- "unicode/utf16"
- "unsafe"
-)
-
-var ForkLock sync.RWMutex
-
-// EscapeArg rewrites command line argument s as prescribed
-// in http://msdn.microsoft.com/en-us/library/ms880421.
-// This function returns "" (2 double quotes) if s is empty.
-// Alternatively, these transformations are done:
-// - every back slash (\) is doubled, but only if immediately
-// followed by double quote (");
-// - every double quote (") is escaped by back slash (\);
-// - finally, s is wrapped with double quotes (arg -> "arg"),
-// but only if there is space or tab inside s.
-func EscapeArg(s string) string {
- if len(s) == 0 {
- return "\"\""
- }
- n := len(s)
- hasSpace := false
- for i := 0; i < len(s); i++ {
- switch s[i] {
- case '"', '\\':
- n++
- case ' ', '\t':
- hasSpace = true
- }
- }
- if hasSpace {
- n += 2
- }
- if n == len(s) {
- return s
- }
-
- qs := make([]byte, n)
- j := 0
- if hasSpace {
- qs[j] = '"'
- j++
- }
- slashes := 0
- for i := 0; i < len(s); i++ {
- switch s[i] {
- default:
- slashes = 0
- qs[j] = s[i]
- case '\\':
- slashes++
- qs[j] = s[i]
- case '"':
- for ; slashes > 0; slashes-- {
- qs[j] = '\\'
- j++
- }
- qs[j] = '\\'
- j++
- qs[j] = s[i]
- }
- j++
- }
- if hasSpace {
- for ; slashes > 0; slashes-- {
- qs[j] = '\\'
- j++
- }
- qs[j] = '"'
- j++
- }
- return string(qs[:j])
-}
-
-// makeCmdLine builds a command line out of args by escaping "special"
-// characters and joining the arguments with spaces.
-func makeCmdLine(args []string) string {
- var s string
- for _, v := range args {
- if s != "" {
- s += " "
- }
- s += EscapeArg(v)
- }
- return s
-}
-
-// createEnvBlock converts an array of environment strings into
-// the representation required by CreateProcess: a sequence of NUL
-// terminated strings followed by a nil.
-// Last bytes are two UCS-2 NULs, or four NUL bytes.
-func createEnvBlock(envv []string) *uint16 {
- if len(envv) == 0 {
- return &utf16.Encode([]rune("\x00\x00"))[0]
- }
- length := 0
- for _, s := range envv {
- length += len(s) + 1
- }
- length += 1
-
- b := make([]byte, length)
- i := 0
- for _, s := range envv {
- l := len(s)
- copy(b[i:i+l], []byte(s))
- copy(b[i+l:i+l+1], []byte{0})
- i = i + l + 1
- }
- copy(b[i:i+1], []byte{0})
-
- return &utf16.Encode([]rune(string(b)))[0]
-}
-
-func CloseOnExec(fd Handle) {
- SetHandleInformation(Handle(fd), HANDLE_FLAG_INHERIT, 0)
-}
-
-func SetNonblock(fd Handle, nonblocking bool) (err error) {
- return nil
-}
-
-// getFullPath retrieves the full path of the specified file.
-// Just a wrapper for Windows GetFullPathName api.
-func getFullPath(name string) (path string, err error) {
- p, err := UTF16PtrFromString(name)
- if err != nil {
- return "", err
- }
- buf := make([]uint16, 100)
- n, err := GetFullPathName(p, uint32(len(buf)), &buf[0], nil)
- if err != nil {
- return "", err
- }
- if n > uint32(len(buf)) {
- // Windows is asking for bigger buffer.
- buf = make([]uint16, n)
- n, err = GetFullPathName(p, uint32(len(buf)), &buf[0], nil)
- if err != nil {
- return "", err
- }
- if n > uint32(len(buf)) {
- return "", EINVAL
- }
- }
- return UTF16ToString(buf[:n]), nil
-}
-
-func isSlash(c uint8) bool {
- return c == '\\' || c == '/'
-}
-
-func normalizeDir(dir string) (name string, err error) {
- ndir, err := getFullPath(dir)
- if err != nil {
- return "", err
- }
- if len(ndir) > 2 && isSlash(ndir[0]) && isSlash(ndir[1]) {
- // dir cannot have \\server\share\path form
- return "", EINVAL
- }
- return ndir, nil
-}
-
-func volToUpper(ch int) int {
- if 'a' <= ch && ch <= 'z' {
- ch += 'A' - 'a'
- }
- return ch
-}
-
-func joinExeDirAndFName(dir, p string) (name string, err error) {
- if len(p) == 0 {
- return "", EINVAL
- }
- if len(p) > 2 && isSlash(p[0]) && isSlash(p[1]) {
- // \\server\share\path form
- return p, nil
- }
- if len(p) > 1 && p[1] == ':' {
- // has drive letter
- if len(p) == 2 {
- return "", EINVAL
- }
- if isSlash(p[2]) {
- return p, nil
- } else {
- d, err := normalizeDir(dir)
- if err != nil {
- return "", err
- }
- if volToUpper(int(p[0])) == volToUpper(int(d[0])) {
- return getFullPath(d + "\\" + p[2:])
- } else {
- return getFullPath(p)
- }
- }
- } else {
- // no drive letter
- d, err := normalizeDir(dir)
- if err != nil {
- return "", err
- }
- if isSlash(p[0]) {
- return getFullPath(d[:2] + p)
- } else {
- return getFullPath(d + "\\" + p)
- }
- }
- // we shouldn't be here
- return "", EINVAL
-}
-
-type ProcAttr struct {
- Dir string
- Env []string
- Files []uintptr
- Sys *SysProcAttr
-}
-
-type SysProcAttr struct {
- HideWindow bool
- CmdLine string // used if non-empty, else the windows command line is built by escaping the arguments passed to StartProcess
- CreationFlags uint32
-}
-
-var zeroProcAttr ProcAttr
-var zeroSysProcAttr SysProcAttr
-
-func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid int, handle uintptr, err error) {
- if len(argv0) == 0 {
- return 0, 0, EWINDOWS
- }
- if attr == nil {
- attr = &zeroProcAttr
- }
- sys := attr.Sys
- if sys == nil {
- sys = &zeroSysProcAttr
- }
-
- if len(attr.Files) > 3 {
- return 0, 0, EWINDOWS
- }
-
- if len(attr.Dir) != 0 {
- // StartProcess assumes that argv0 is relative to attr.Dir,
- // because it implies Chdir(attr.Dir) before executing argv0.
- // Windows CreateProcess assumes the opposite: it looks for
- // argv0 relative to the current directory, and, only once the new
- // process is started, it does Chdir(attr.Dir). We are adjusting
- // for that difference here by making argv0 absolute.
- var err error
- argv0, err = joinExeDirAndFName(attr.Dir, argv0)
- if err != nil {
- return 0, 0, err
- }
- }
- argv0p, err := UTF16PtrFromString(argv0)
- if err != nil {
- return 0, 0, err
- }
-
- var cmdline string
- // Windows CreateProcess takes the command line as a single string:
- // use attr.CmdLine if set, else build the command line by escaping
- // and joining each argument with spaces
- if sys.CmdLine != "" {
- cmdline = sys.CmdLine
- } else {
- cmdline = makeCmdLine(argv)
- }
-
- var argvp *uint16
- if len(cmdline) != 0 {
- argvp, err = UTF16PtrFromString(cmdline)
- if err != nil {
- return 0, 0, err
- }
- }
-
- var dirp *uint16
- if len(attr.Dir) != 0 {
- dirp, err = UTF16PtrFromString(attr.Dir)
- if err != nil {
- return 0, 0, err
- }
- }
-
- // Acquire the fork lock so that no other threads
- // create new fds that are not yet close-on-exec
- // before we fork.
- ForkLock.Lock()
- defer ForkLock.Unlock()
-
- p, _ := GetCurrentProcess()
- fd := make([]Handle, len(attr.Files))
- for i := range attr.Files {
- if attr.Files[i] > 0 {
- err := DuplicateHandle(p, Handle(attr.Files[i]), p, &fd[i], 0, true, DUPLICATE_SAME_ACCESS)
- if err != nil {
- return 0, 0, err
- }
- defer CloseHandle(Handle(fd[i]))
- }
- }
- si := new(StartupInfo)
- si.Cb = uint32(unsafe.Sizeof(*si))
- si.Flags = STARTF_USESTDHANDLES
- if sys.HideWindow {
- si.Flags |= STARTF_USESHOWWINDOW
- si.ShowWindow = SW_HIDE
- }
- si.StdInput = fd[0]
- si.StdOutput = fd[1]
- si.StdErr = fd[2]
-
- pi := new(ProcessInformation)
-
- flags := sys.CreationFlags | CREATE_UNICODE_ENVIRONMENT
- err = CreateProcess(argv0p, argvp, nil, nil, true, flags, createEnvBlock(attr.Env), dirp, si, pi)
- if err != nil {
- return 0, 0, err
- }
- defer CloseHandle(Handle(pi.Thread))
-
- return int(pi.ProcessId), uintptr(pi.Process), nil
-}
-
-func Exec(argv0 string, argv []string, envv []string) (err error) {
- return EWINDOWS
-}
diff --git a/src/pkg/syscall/fd_nacl.go b/src/pkg/syscall/fd_nacl.go
deleted file mode 100644
index 74324142a..000000000
--- a/src/pkg/syscall/fd_nacl.go
+++ /dev/null
@@ -1,326 +0,0 @@
-// Copyright 2013 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.
-
-// File descriptor support for Native Client.
-// We want to provide access to a broader range of (simulated) files than
-// Native Client allows, so we maintain our own file descriptor table exposed
-// to higher-level packages.
-
-package syscall
-
-import (
- "sync"
-)
-
-// files is the table indexed by a file descriptor.
-var files struct {
- sync.RWMutex
- tab []*file
-}
-
-// A file is an open file, something with a file descriptor.
-// A particular *file may appear in files multiple times, due to use of Dup or Dup2.
-type file struct {
- fdref int // uses in files.tab
- impl fileImpl // underlying implementation
-}
-
-// A fileImpl is the implementation of something that can be a file.
-type fileImpl interface {
- // Standard operations.
- // These can be called concurrently from multiple goroutines.
- stat(*Stat_t) error
- read([]byte) (int, error)
- write([]byte) (int, error)
- seek(int64, int) (int64, error)
- pread([]byte, int64) (int, error)
- pwrite([]byte, int64) (int, error)
-
- // Close is called when the last reference to a *file is removed
- // from the file descriptor table. It may be called concurrently
- // with active operations such as blocked read or write calls.
- close() error
-}
-
-// newFD adds impl to the file descriptor table,
-// returning the new file descriptor.
-// Like Unix, it uses the lowest available descriptor.
-func newFD(impl fileImpl) int {
- files.Lock()
- defer files.Unlock()
- f := &file{impl: impl, fdref: 1}
- for fd, oldf := range files.tab {
- if oldf == nil {
- files.tab[fd] = f
- return fd
- }
- }
- fd := len(files.tab)
- files.tab = append(files.tab, f)
- return fd
-}
-
-// Install Native Client stdin, stdout, stderr.
-func init() {
- newFD(&naclFile{naclFD: 0})
- newFD(&naclFile{naclFD: 1})
- newFD(&naclFile{naclFD: 2})
-}
-
-// fdToFile retrieves the *file corresponding to a file descriptor.
-func fdToFile(fd int) (*file, error) {
- files.Lock()
- defer files.Unlock()
- if fd < 0 || fd >= len(files.tab) || files.tab[fd] == nil {
- return nil, EBADF
- }
- return files.tab[fd], nil
-}
-
-func Close(fd int) error {
- files.Lock()
- if fd < 0 || fd >= len(files.tab) || files.tab[fd] == nil {
- files.Unlock()
- return EBADF
- }
- f := files.tab[fd]
- files.tab[fd] = nil
- f.fdref--
- fdref := f.fdref
- files.Unlock()
- if fdref > 0 {
- return nil
- }
- return f.impl.close()
-}
-
-func CloseOnExec(fd int) {
- // nothing to do - no exec
-}
-
-func Dup(fd int) (int, error) {
- files.Lock()
- defer files.Unlock()
- if fd < 0 || fd >= len(files.tab) || files.tab[fd] == nil {
- return -1, EBADF
- }
- f := files.tab[fd]
- f.fdref++
- for newfd, oldf := range files.tab {
- if oldf == nil {
- files.tab[newfd] = f
- return newfd, nil
- }
- }
- newfd := len(files.tab)
- files.tab = append(files.tab, f)
- return newfd, nil
-}
-
-func Dup2(fd, newfd int) error {
- files.Lock()
- defer files.Unlock()
- if fd < 0 || fd >= len(files.tab) || files.tab[fd] == nil || newfd < 0 || newfd >= len(files.tab)+100 {
- files.Unlock()
- return EBADF
- }
- f := files.tab[fd]
- f.fdref++
- for cap(files.tab) <= newfd {
- files.tab = append(files.tab[:cap(files.tab)], nil)
- }
- oldf := files.tab[newfd]
- var oldfdref int
- if oldf != nil {
- oldf.fdref--
- oldfdref = oldf.fdref
- }
- files.tab[newfd] = f
- files.Unlock()
- if oldf != nil {
- if oldfdref == 0 {
- oldf.impl.close()
- }
- }
- return nil
-}
-
-func Fstat(fd int, st *Stat_t) error {
- f, err := fdToFile(fd)
- if err != nil {
- return err
- }
- return f.impl.stat(st)
-}
-
-func Read(fd int, b []byte) (int, error) {
- f, err := fdToFile(fd)
- if err != nil {
- return 0, err
- }
- return f.impl.read(b)
-}
-
-var zerobuf [0]byte
-
-func Write(fd int, b []byte) (int, error) {
- if b == nil {
- // avoid nil in syscalls; nacl doesn't like that.
- b = zerobuf[:]
- }
- f, err := fdToFile(fd)
- if err != nil {
- return 0, err
- }
- return f.impl.write(b)
-}
-
-func Pread(fd int, b []byte, offset int64) (int, error) {
- f, err := fdToFile(fd)
- if err != nil {
- return 0, err
- }
- return f.impl.pread(b, offset)
-}
-
-func Pwrite(fd int, b []byte, offset int64) (int, error) {
- f, err := fdToFile(fd)
- if err != nil {
- return 0, err
- }
- return f.impl.pwrite(b, offset)
-}
-
-func Seek(fd int, offset int64, whence int) (int64, error) {
- f, err := fdToFile(fd)
- if err != nil {
- return 0, err
- }
- return f.impl.seek(offset, whence)
-}
-
-// defaulFileImpl implements fileImpl.
-// It can be embedded to complete a partial fileImpl implementation.
-type defaultFileImpl struct{}
-
-func (*defaultFileImpl) close() error { return nil }
-func (*defaultFileImpl) stat(*Stat_t) error { return ENOSYS }
-func (*defaultFileImpl) read([]byte) (int, error) { return 0, ENOSYS }
-func (*defaultFileImpl) write([]byte) (int, error) { return 0, ENOSYS }
-func (*defaultFileImpl) seek(int64, int) (int64, error) { return 0, ENOSYS }
-func (*defaultFileImpl) pread([]byte, int64) (int, error) { return 0, ENOSYS }
-func (*defaultFileImpl) pwrite([]byte, int64) (int, error) { return 0, ENOSYS }
-
-// naclFile is the fileImpl implementation for a Native Client file descriptor.
-type naclFile struct {
- defaultFileImpl
- naclFD int
-}
-
-func (f *naclFile) stat(st *Stat_t) error {
- return naclFstat(f.naclFD, st)
-}
-
-func (f *naclFile) read(b []byte) (int, error) {
- n, err := naclRead(f.naclFD, b)
- if err != nil {
- n = 0
- }
- return n, err
-}
-
-// implemented in package runtime, to add time header on playground
-func naclWrite(fd int, b []byte) int
-
-func (f *naclFile) write(b []byte) (int, error) {
- n := naclWrite(f.naclFD, b)
- if n < 0 {
- return 0, Errno(-n)
- }
- return n, nil
-}
-
-func (f *naclFile) seek(off int64, whence int) (int64, error) {
- old := off
- err := naclSeek(f.naclFD, &off, whence)
- if err != nil {
- return old, err
- }
- return off, nil
-}
-
-func (f *naclFile) prw(b []byte, offset int64, rw func([]byte) (int, error)) (int, error) {
- // NaCl has no pread; simulate with seek and hope for no races.
- old, err := f.seek(0, 1)
- if err != nil {
- return 0, err
- }
- if _, err := f.seek(offset, 0); err != nil {
- return 0, err
- }
- n, err := rw(b)
- f.seek(old, 0)
- return n, err
-}
-
-func (f *naclFile) pread(b []byte, offset int64) (int, error) {
- return f.prw(b, offset, f.read)
-}
-
-func (f *naclFile) pwrite(b []byte, offset int64) (int, error) {
- return f.prw(b, offset, f.write)
-}
-
-func (f *naclFile) close() error {
- err := naclClose(f.naclFD)
- f.naclFD = -1
- return err
-}
-
-// A pipeFile is an in-memory implementation of a pipe.
-// The byteq implementation is in net_nacl.go.
-type pipeFile struct {
- defaultFileImpl
- rd *byteq
- wr *byteq
-}
-
-func (f *pipeFile) close() error {
- if f.rd != nil {
- f.rd.close()
- }
- if f.wr != nil {
- f.wr.close()
- }
- return nil
-}
-
-func (f *pipeFile) read(b []byte) (int, error) {
- if f.rd == nil {
- return 0, EINVAL
- }
- n, err := f.rd.read(b, 0)
- if err == EAGAIN {
- err = nil
- }
- return n, err
-}
-
-func (f *pipeFile) write(b []byte) (int, error) {
- if f.wr == nil {
- return 0, EINVAL
- }
- n, err := f.wr.write(b, 0)
- if err == EAGAIN {
- err = EPIPE
- }
- return n, err
-}
-
-func Pipe(fd []int) error {
- q := newByteq()
- fd[0] = newFD(&pipeFile{rd: q})
- fd[1] = newFD(&pipeFile{wr: q})
- return nil
-}
diff --git a/src/pkg/syscall/flock.go b/src/pkg/syscall/flock.go
deleted file mode 100644
index 62736ae9d..000000000
--- a/src/pkg/syscall/flock.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// +build linux darwin freebsd openbsd netbsd dragonfly
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-import "unsafe"
-
-// fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
-// systems by flock_linux_32bit.go to be SYS_FCNTL64.
-var fcntl64Syscall uintptr = SYS_FCNTL
-
-// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
-func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
- _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
- if errno == 0 {
- return nil
- }
- return errno
-}
diff --git a/src/pkg/syscall/flock_linux_32bit.go b/src/pkg/syscall/flock_linux_32bit.go
deleted file mode 100644
index 500a97344..000000000
--- a/src/pkg/syscall/flock_linux_32bit.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build linux,386 linux,arm
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-func init() {
- // On 32-bit Linux systems, the fcntl syscall that matches Go's
- // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
- fcntl64Syscall = SYS_FCNTL64
-}
diff --git a/src/pkg/syscall/fs_nacl.go b/src/pkg/syscall/fs_nacl.go
deleted file mode 100644
index ac9239483..000000000
--- a/src/pkg/syscall/fs_nacl.go
+++ /dev/null
@@ -1,815 +0,0 @@
-// Copyright 2013 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.
-
-// A simulated Unix-like file system for use within NaCl.
-//
-// The simulation is not particularly tied to NaCl other than the reuse
-// of NaCl's definition for the Stat_t structure.
-//
-// The file system need never be written to disk, so it is represented as
-// in-memory Go data structures, never in a serialized form.
-//
-// TODO: Perhaps support symlinks, although they muck everything up.
-
-package syscall
-
-import (
- "sync"
- "unsafe"
-)
-
-// Provided by package runtime.
-func now() (sec int64, nsec int32)
-
-// An fsys is a file system.
-// Since there is no I/O (everything is in memory),
-// the global lock mu protects the whole file system state,
-// and that's okay.
-type fsys struct {
- mu sync.Mutex
- root *inode // root directory
- cwd *inode // process current directory
- inum uint64 // number of inodes created
- dev []func() (devFile, error) // table for opening devices
-}
-
-// A devFile is the implementation required of device files
-// like /dev/null or /dev/random.
-type devFile interface {
- pread([]byte, int64) (int, error)
- pwrite([]byte, int64) (int, error)
-}
-
-// An inode is a (possibly special) file in the file system.
-type inode struct {
- Stat_t
- data []byte
- dir []dirent
-}
-
-// A dirent describes a single directory entry.
-type dirent struct {
- name string
- inode *inode
-}
-
-// An fsysFile is the fileImpl implementation backed by the file system.
-type fsysFile struct {
- defaultFileImpl
- fsys *fsys
- inode *inode
- openmode int
- offset int64
- dev devFile
-}
-
-// newFsys creates a new file system.
-func newFsys() *fsys {
- fs := &fsys{}
- fs.mu.Lock()
- defer fs.mu.Unlock()
- ip := fs.newInode()
- ip.Mode = 0555 | S_IFDIR
- fs.dirlink(ip, ".", ip)
- fs.dirlink(ip, "..", ip)
- fs.cwd = ip
- fs.root = ip
- return fs
-}
-
-var fs = newFsys()
-
-func init() {
- Mkdir("/dev", 0555)
- Mkdir("/tmp", 0777)
- mkdev("/dev/null", 0666, openNull)
- mkdev("/dev/random", 0444, openRandom)
- mkdev("/dev/urandom", 0444, openRandom)
- mkdev("/dev/zero", 0666, openZero)
- chdirEnv()
-}
-
-func chdirEnv() {
- pwd, ok := Getenv("NACLPWD")
- if ok {
- Chdir(pwd)
- }
-}
-
-// Except where indicated otherwise, unexported methods on fsys
-// expect fs.mu to have been locked by the caller.
-
-// newInode creates a new inode.
-func (fs *fsys) newInode() *inode {
- fs.inum++
- ip := &inode{
- Stat_t: Stat_t{
- Ino: fs.inum,
- Blksize: 512,
- },
- }
- return ip
-}
-
-// atime sets ip.Atime to the current time.
-func (fs *fsys) atime(ip *inode) {
- sec, nsec := now()
- ip.Atime, ip.AtimeNsec = sec, int64(nsec)
-}
-
-// mtime sets ip.Mtime to the current time.
-func (fs *fsys) mtime(ip *inode) {
- sec, nsec := now()
- ip.Mtime, ip.MtimeNsec = sec, int64(nsec)
-}
-
-// dirlookup looks for an entry in the directory dp with the given name.
-// It returns the directory entry and its index within the directory.
-func (fs *fsys) dirlookup(dp *inode, name string) (de *dirent, index int, err error) {
- fs.atime(dp)
- for i := range dp.dir {
- de := &dp.dir[i]
- if de.name == name {
- fs.atime(de.inode)
- return de, i, nil
- }
- }
- return nil, 0, ENOENT
-}
-
-// dirlink adds to the directory dp an entry for name pointing at the inode ip.
-// If dp already contains an entry for name, that entry is overwritten.
-func (fs *fsys) dirlink(dp *inode, name string, ip *inode) {
- fs.mtime(dp)
- fs.atime(ip)
- ip.Nlink++
- for i := range dp.dir {
- if dp.dir[i].name == name {
- dp.dir[i] = dirent{name, ip}
- return
- }
- }
- dp.dir = append(dp.dir, dirent{name, ip})
- dp.dirSize()
-}
-
-func (dp *inode) dirSize() {
- dp.Size = int64(len(dp.dir)) * (8 + 8 + 2 + 256) // Dirent
-}
-
-// skipelem splits path into the first element and the remainder.
-// the returned first element contains no slashes, and the returned
-// remainder does not begin with a slash.
-func skipelem(path string) (elem, rest string) {
- for len(path) > 0 && path[0] == '/' {
- path = path[1:]
- }
- if len(path) == 0 {
- return "", ""
- }
- i := 0
- for i < len(path) && path[i] != '/' {
- i++
- }
- elem, path = path[:i], path[i:]
- for len(path) > 0 && path[0] == '/' {
- path = path[1:]
- }
- return elem, path
-}
-
-// namei translates a file system path name into an inode.
-// If parent is false, the returned ip corresponds to the given name, and elem is the empty string.
-// If parent is false, the walk stops at the next-to-last element in the name,
-// so that ip is the parent directory and elem is the final element in the path.
-func (fs *fsys) namei(path string, parent bool) (ip *inode, elem string, err error) {
- // Reject NUL in name.
- for i := 0; i < len(path); i++ {
- if path[i] == '\x00' {
- return nil, "", EINVAL
- }
- }
-
- // Reject empty name.
- if path == "" {
- return nil, "", EINVAL
- }
-
- if path[0] == '/' {
- ip = fs.root
- } else {
- ip = fs.cwd
- }
-
- for len(path) > 0 && path[len(path)-1] == '/' {
- path = path[:len(path)-1]
- }
-
- for {
- elem, rest := skipelem(path)
- if elem == "" {
- if parent && ip.Mode&S_IFMT == S_IFDIR {
- return ip, ".", nil
- }
- break
- }
- if ip.Mode&S_IFMT != S_IFDIR {
- return nil, "", ENOTDIR
- }
- if len(elem) >= 256 {
- return nil, "", ENAMETOOLONG
- }
- if parent && rest == "" {
- // Stop one level early.
- return ip, elem, nil
- }
- de, _, err := fs.dirlookup(ip, elem)
- if err != nil {
- return nil, "", err
- }
- ip = de.inode
- path = rest
- }
- if parent {
- return nil, "", ENOTDIR
- }
- return ip, "", nil
-}
-
-// open opens or creates a file with the given name, open mode,
-// and permission mode bits.
-func (fs *fsys) open(name string, openmode int, mode uint32) (fileImpl, error) {
- dp, elem, err := fs.namei(name, true)
- if err != nil {
- return nil, err
- }
- var (
- ip *inode
- dev devFile
- )
- de, _, err := fs.dirlookup(dp, elem)
- if err != nil {
- if openmode&O_CREATE == 0 {
- return nil, err
- }
- ip = fs.newInode()
- ip.Mode = mode
- fs.dirlink(dp, elem, ip)
- if ip.Mode&S_IFMT == S_IFDIR {
- fs.dirlink(ip, ".", ip)
- fs.dirlink(ip, "..", dp)
- }
- } else {
- ip = de.inode
- if openmode&(O_CREATE|O_EXCL) == O_CREATE|O_EXCL {
- return nil, EEXIST
- }
- if openmode&O_TRUNC != 0 {
- if ip.Mode&S_IFMT == S_IFDIR {
- return nil, EISDIR
- }
- ip.data = nil
- }
- if ip.Mode&S_IFMT == S_IFCHR {
- if ip.Rdev < 0 || ip.Rdev >= int64(len(fs.dev)) || fs.dev[ip.Rdev] == nil {
- return nil, ENODEV
- }
- dev, err = fs.dev[ip.Rdev]()
- if err != nil {
- return nil, err
- }
- }
- }
-
- switch openmode & O_ACCMODE {
- case O_WRONLY, O_RDWR:
- if ip.Mode&S_IFMT == S_IFDIR {
- return nil, EISDIR
- }
- }
-
- switch ip.Mode & S_IFMT {
- case S_IFDIR:
- if openmode&O_ACCMODE != O_RDONLY {
- return nil, EISDIR
- }
-
- case S_IFREG:
- // ok
-
- case S_IFCHR:
- // handled above
-
- default:
- // TODO: some kind of special file
- return nil, EPERM
- }
-
- f := &fsysFile{
- fsys: fs,
- inode: ip,
- openmode: openmode,
- dev: dev,
- }
- if openmode&O_APPEND != 0 {
- f.offset = ip.Size
- }
- return f, nil
-}
-
-// fsysFile methods to implement fileImpl.
-
-func (f *fsysFile) stat(st *Stat_t) error {
- f.fsys.mu.Lock()
- defer f.fsys.mu.Unlock()
- *st = f.inode.Stat_t
- return nil
-}
-
-func (f *fsysFile) read(b []byte) (int, error) {
- f.fsys.mu.Lock()
- defer f.fsys.mu.Unlock()
- n, err := f.preadLocked(b, f.offset)
- f.offset += int64(n)
- return n, err
-}
-
-func ReadDirent(fd int, buf []byte) (int, error) {
- f, err := fdToFsysFile(fd)
- if err != nil {
- return 0, err
- }
- f.fsys.mu.Lock()
- defer f.fsys.mu.Unlock()
- if f.inode.Mode&S_IFMT != S_IFDIR {
- return 0, EINVAL
- }
- n, err := f.preadLocked(buf, f.offset)
- f.offset += int64(n)
- return n, err
-}
-
-func (f *fsysFile) write(b []byte) (int, error) {
- f.fsys.mu.Lock()
- defer f.fsys.mu.Unlock()
- n, err := f.pwriteLocked(b, f.offset)
- f.offset += int64(n)
- return n, err
-}
-
-func (f *fsysFile) seek(offset int64, whence int) (int64, error) {
- f.fsys.mu.Lock()
- defer f.fsys.mu.Unlock()
- switch whence {
- case 1:
- offset += f.offset
- case 2:
- offset += f.inode.Size
- }
- if offset < 0 {
- return 0, EINVAL
- }
- if offset > f.inode.Size {
- return 0, EINVAL
- }
- f.offset = offset
- return offset, nil
-}
-
-func (f *fsysFile) pread(b []byte, offset int64) (int, error) {
- f.fsys.mu.Lock()
- defer f.fsys.mu.Unlock()
- return f.preadLocked(b, offset)
-}
-
-func (f *fsysFile) pwrite(b []byte, offset int64) (int, error) {
- f.fsys.mu.Lock()
- defer f.fsys.mu.Unlock()
- return f.pwriteLocked(b, offset)
-}
-
-func (f *fsysFile) preadLocked(b []byte, offset int64) (int, error) {
- if f.openmode&O_ACCMODE == O_WRONLY {
- return 0, EINVAL
- }
- if offset < 0 {
- return 0, EINVAL
- }
- if f.dev != nil {
- f.fsys.atime(f.inode)
- f.fsys.mu.Unlock()
- defer f.fsys.mu.Lock()
- return f.dev.pread(b, offset)
- }
- if offset > f.inode.Size {
- return 0, nil
- }
- if int64(len(b)) > f.inode.Size-offset {
- b = b[:f.inode.Size-offset]
- }
-
- if f.inode.Mode&S_IFMT == S_IFDIR {
- if offset%direntSize != 0 || len(b) != 0 && len(b) < direntSize {
- return 0, EINVAL
- }
- fs.atime(f.inode)
- n := 0
- for len(b) >= direntSize {
- src := f.inode.dir[int(offset/direntSize)]
- dst := (*Dirent)(unsafe.Pointer(&b[0]))
- dst.Ino = int64(src.inode.Ino)
- dst.Off = offset
- dst.Reclen = direntSize
- for i := range dst.Name {
- dst.Name[i] = 0
- }
- copy(dst.Name[:], src.name)
- n += direntSize
- offset += direntSize
- b = b[direntSize:]
- }
- return n, nil
- }
-
- fs.atime(f.inode)
- n := copy(b, f.inode.data[offset:])
- return n, nil
-}
-
-func (f *fsysFile) pwriteLocked(b []byte, offset int64) (int, error) {
- if f.openmode&O_ACCMODE == O_RDONLY {
- return 0, EINVAL
- }
- if offset < 0 {
- return 0, EINVAL
- }
- if f.dev != nil {
- f.fsys.atime(f.inode)
- f.fsys.mu.Unlock()
- defer f.fsys.mu.Lock()
- return f.dev.pwrite(b, offset)
- }
- if offset > f.inode.Size {
- return 0, EINVAL
- }
- f.fsys.mtime(f.inode)
- n := copy(f.inode.data[offset:], b)
- if n < len(b) {
- f.inode.data = append(f.inode.data, b[n:]...)
- f.inode.Size = int64(len(f.inode.data))
- }
- return len(b), nil
-}
-
-// Standard Unix system calls.
-
-func Open(path string, openmode int, perm uint32) (fd int, err error) {
- fs.mu.Lock()
- defer fs.mu.Unlock()
- f, err := fs.open(path, openmode, perm&0777|S_IFREG)
- if err != nil {
- return -1, err
- }
- return newFD(f), nil
-}
-
-func Mkdir(path string, perm uint32) error {
- fs.mu.Lock()
- defer fs.mu.Unlock()
- _, err := fs.open(path, O_CREATE|O_EXCL, perm&0777|S_IFDIR)
- return err
-}
-
-func Getcwd(buf []byte) (n int, err error) {
- // Force package os to default to the old algorithm using .. and directory reads.
- return 0, ENOSYS
-}
-
-func Stat(path string, st *Stat_t) error {
- fs.mu.Lock()
- defer fs.mu.Unlock()
- ip, _, err := fs.namei(path, false)
- if err != nil {
- return err
- }
- *st = ip.Stat_t
- return nil
-}
-
-func Lstat(path string, st *Stat_t) error {
- return Stat(path, st)
-}
-
-func unlink(path string, isdir bool) error {
- fs.mu.Lock()
- defer fs.mu.Unlock()
- dp, elem, err := fs.namei(path, true)
- if err != nil {
- return err
- }
- if elem == "." || elem == ".." {
- return EINVAL
- }
- de, _, err := fs.dirlookup(dp, elem)
- if err != nil {
- return err
- }
- if isdir {
- if de.inode.Mode&S_IFMT != S_IFDIR {
- return ENOTDIR
- }
- if len(de.inode.dir) != 2 {
- return ENOTEMPTY
- }
- } else {
- if de.inode.Mode&S_IFMT == S_IFDIR {
- return EISDIR
- }
- }
- de.inode.Nlink--
- *de = dp.dir[len(dp.dir)-1]
- dp.dir = dp.dir[:len(dp.dir)-1]
- dp.dirSize()
- return nil
-}
-
-func Unlink(path string) error {
- return unlink(path, false)
-}
-
-func Rmdir(path string) error {
- return unlink(path, true)
-}
-
-func Chmod(path string, mode uint32) error {
- fs.mu.Lock()
- defer fs.mu.Unlock()
- ip, _, err := fs.namei(path, false)
- if err != nil {
- return err
- }
- ip.Mode = ip.Mode&^0777 | mode&0777
- return nil
-}
-
-func Fchmod(fd int, mode uint32) error {
- f, err := fdToFsysFile(fd)
- if err != nil {
- return err
- }
- f.fsys.mu.Lock()
- defer f.fsys.mu.Unlock()
- f.inode.Mode = f.inode.Mode&^0777 | mode&0777
- return nil
-}
-
-func Chown(path string, uid, gid int) error {
- fs.mu.Lock()
- defer fs.mu.Unlock()
- ip, _, err := fs.namei(path, false)
- if err != nil {
- return err
- }
- ip.Uid = uint32(uid)
- ip.Gid = uint32(gid)
- return nil
-}
-
-func Fchown(fd int, uid, gid int) error {
- fs.mu.Lock()
- defer fs.mu.Unlock()
- f, err := fdToFsysFile(fd)
- if err != nil {
- return err
- }
- f.fsys.mu.Lock()
- defer f.fsys.mu.Unlock()
- f.inode.Uid = uint32(uid)
- f.inode.Gid = uint32(gid)
- return nil
-}
-
-func Lchown(path string, uid, gid int) error {
- return Chown(path, uid, gid)
-}
-
-func UtimesNano(path string, ts []Timespec) error {
- if len(ts) != 2 {
- return EINVAL
- }
- fs.mu.Lock()
- defer fs.mu.Unlock()
- ip, _, err := fs.namei(path, false)
- if err != nil {
- return err
- }
- ip.Atime = ts[0].Sec
- ip.AtimeNsec = int64(ts[0].Nsec)
- ip.Mtime = ts[1].Sec
- ip.MtimeNsec = int64(ts[1].Nsec)
- return nil
-}
-
-func Link(path, link string) error {
- ip, _, err := fs.namei(path, false)
- if err != nil {
- return err
- }
- dp, elem, err := fs.namei(link, true)
- if err != nil {
- return err
- }
- if ip.Mode&S_IFMT == S_IFDIR {
- return EPERM
- }
- fs.dirlink(dp, elem, ip)
- return nil
-}
-
-func Rename(from, to string) error {
- fdp, felem, err := fs.namei(from, true)
- if err != nil {
- return err
- }
- fde, _, err := fs.dirlookup(fdp, felem)
- if err != nil {
- return err
- }
- tdp, telem, err := fs.namei(to, true)
- if err != nil {
- return err
- }
- fs.dirlink(tdp, telem, fde.inode)
- fde.inode.Nlink--
- *fde = fdp.dir[len(fdp.dir)-1]
- fdp.dir = fdp.dir[:len(fdp.dir)-1]
- fdp.dirSize()
- return nil
-}
-
-func (fs *fsys) truncate(ip *inode, length int64) error {
- if length > 1e9 || ip.Mode&S_IFMT != S_IFREG {
- return EINVAL
- }
- if length < int64(len(ip.data)) {
- ip.data = ip.data[:length]
- } else {
- data := make([]byte, length)
- copy(data, ip.data)
- ip.data = data
- }
- ip.Size = int64(len(ip.data))
- return nil
-}
-
-func Truncate(path string, length int64) error {
- fs.mu.Lock()
- defer fs.mu.Unlock()
- ip, _, err := fs.namei(path, false)
- if err != nil {
- return err
- }
- return fs.truncate(ip, length)
-}
-
-func Ftruncate(fd int, length int64) error {
- f, err := fdToFsysFile(fd)
- if err != nil {
- return err
- }
- f.fsys.mu.Lock()
- defer f.fsys.mu.Unlock()
- return f.fsys.truncate(f.inode, length)
-}
-
-func Chdir(path string) error {
- fs.mu.Lock()
- defer fs.mu.Unlock()
- ip, _, err := fs.namei(path, false)
- if err != nil {
- return err
- }
- fs.cwd = ip
- return nil
-}
-
-func Fchdir(fd int) error {
- f, err := fdToFsysFile(fd)
- if err != nil {
- return err
- }
- f.fsys.mu.Lock()
- defer f.fsys.mu.Unlock()
- if f.inode.Mode&S_IFMT != S_IFDIR {
- return ENOTDIR
- }
- fs.cwd = f.inode
- return nil
-}
-
-func Readlink(path string, buf []byte) (n int, err error) {
- return 0, ENOSYS
-}
-
-func Symlink(path, link string) error {
- return ENOSYS
-}
-
-func Fsync(fd int) error {
- return nil
-}
-
-// Special devices.
-
-func mkdev(path string, mode uint32, open func() (devFile, error)) error {
- fs.mu.Lock()
- fs.mu.Unlock()
- f, err := fs.open(path, O_CREATE|O_RDONLY|O_EXCL, S_IFCHR|mode)
- if err != nil {
- return err
- }
- ip := f.(*fsysFile).inode
- ip.Rdev = int64(len(fs.dev))
- fs.dev = append(fs.dev, open)
- return nil
-}
-
-type nullFile struct{}
-
-func openNull() (devFile, error) { return &nullFile{}, nil }
-func (f *nullFile) close() error { return nil }
-func (f *nullFile) pread(b []byte, offset int64) (int, error) { return 0, nil }
-func (f *nullFile) pwrite(b []byte, offset int64) (int, error) { return len(b), nil }
-
-type zeroFile struct{}
-
-func openZero() (devFile, error) { return &zeroFile{}, nil }
-func (f *zeroFile) close() error { return nil }
-func (f *zeroFile) pwrite(b []byte, offset int64) (int, error) { return len(b), nil }
-
-func (f *zeroFile) pread(b []byte, offset int64) (int, error) {
- for i := range b {
- b[i] = 0
- }
- return len(b), nil
-}
-
-type randomFile struct {
- naclFD int
-}
-
-func openRandom() (devFile, error) {
- fd, err := openNamedService("SecureRandom", O_RDONLY)
- if err != nil {
- return nil, err
- }
- return &randomFile{naclFD: fd}, nil
-}
-
-func (f *randomFile) close() error {
- naclClose(f.naclFD)
- f.naclFD = -1
- return nil
-}
-
-func (f *randomFile) pread(b []byte, offset int64) (int, error) {
- return naclRead(f.naclFD, b)
-}
-
-func (f *randomFile) pwrite(b []byte, offset int64) (int, error) {
- return 0, EPERM
-}
-
-func fdToFsysFile(fd int) (*fsysFile, error) {
- f, err := fdToFile(fd)
- if err != nil {
- return nil, err
- }
- impl := f.impl
- fsysf, ok := impl.(*fsysFile)
- if !ok {
- return nil, EINVAL
- }
- return fsysf, nil
-}
-
-// create creates a file in the file system with the given name, mode, time, and data.
-// It is meant to be called when initializing the file system image.
-func create(name string, mode uint32, sec int64, data []byte) error {
- fs.mu.Lock()
- fs.mu.Unlock()
- f, err := fs.open(name, O_CREATE|O_EXCL, mode)
- if err != nil {
- return err
- }
- ip := f.(*fsysFile).inode
- ip.Atime = sec
- ip.Mtime = sec
- ip.Ctime = sec
- if len(data) > 0 {
- ip.Size = int64(len(data))
- ip.data = data
- }
- return nil
-}
diff --git a/src/pkg/syscall/lsf_linux.go b/src/pkg/syscall/lsf_linux.go
deleted file mode 100644
index ee07fea3f..000000000
--- a/src/pkg/syscall/lsf_linux.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// 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.
-
-// Linux socket filter
-
-package syscall
-
-import (
- "unsafe"
-)
-
-func LsfStmt(code, k int) *SockFilter {
- return &SockFilter{Code: uint16(code), K: uint32(k)}
-}
-
-func LsfJump(code, k, jt, jf int) *SockFilter {
- return &SockFilter{Code: uint16(code), Jt: uint8(jt), Jf: uint8(jf), K: uint32(k)}
-}
-
-func LsfSocket(ifindex, proto int) (int, error) {
- var lsall SockaddrLinklayer
- s, e := Socket(AF_PACKET, SOCK_RAW, proto)
- if e != nil {
- return 0, e
- }
- p := (*[2]byte)(unsafe.Pointer(&lsall.Protocol))
- p[0] = byte(proto >> 8)
- p[1] = byte(proto)
- lsall.Ifindex = ifindex
- e = Bind(s, &lsall)
- if e != nil {
- Close(s)
- return 0, e
- }
- return s, nil
-}
-
-type iflags struct {
- name [IFNAMSIZ]byte
- flags uint16
-}
-
-func SetLsfPromisc(name string, m bool) error {
- s, e := Socket(AF_INET, SOCK_DGRAM, 0)
- if e != nil {
- return e
- }
- defer Close(s)
- var ifl iflags
- copy(ifl.name[:], []byte(name))
- _, _, ep := Syscall(SYS_IOCTL, uintptr(s), SIOCGIFFLAGS, uintptr(unsafe.Pointer(&ifl)))
- if ep != 0 {
- return Errno(ep)
- }
- if m {
- ifl.flags |= uint16(IFF_PROMISC)
- } else {
- ifl.flags &= ^uint16(IFF_PROMISC)
- }
- _, _, ep = Syscall(SYS_IOCTL, uintptr(s), SIOCSIFFLAGS, uintptr(unsafe.Pointer(&ifl)))
- if ep != 0 {
- return Errno(ep)
- }
- return nil
-}
-
-func AttachLsf(fd int, i []SockFilter) error {
- var p SockFprog
- p.Len = uint16(len(i))
- p.Filter = (*SockFilter)(unsafe.Pointer(&i[0]))
- return setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, unsafe.Pointer(&p), unsafe.Sizeof(p))
-}
-
-func DetachLsf(fd int) error {
- var dummy int
- return setsockopt(fd, SOL_SOCKET, SO_DETACH_FILTER, unsafe.Pointer(&dummy), unsafe.Sizeof(dummy))
-}
diff --git a/src/pkg/syscall/mkall.sh b/src/pkg/syscall/mkall.sh
deleted file mode 100755
index 886db133c..000000000
--- a/src/pkg/syscall/mkall.sh
+++ /dev/null
@@ -1,263 +0,0 @@
-#!/usr/bin/env bash
-# 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.
-
-# The syscall package provides access to the raw system call
-# interface of the underlying operating system. Porting Go to
-# a new architecture/operating system combination requires
-# some manual effort, though there are tools that automate
-# much of the process. The auto-generated files have names
-# beginning with z.
-#
-# This script runs or (given -n) prints suggested commands to generate z files
-# for the current system. Running those commands is not automatic.
-# This script is documentation more than anything else.
-#
-# * asm_${GOOS}_${GOARCH}.s
-#
-# This hand-written assembly file implements system call dispatch.
-# There are three entry points:
-#
-# func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-# func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
-# func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-#
-# The first and second are the standard ones; they differ only in
-# how many arguments can be passed to the kernel.
-# The third is for low-level use by the ForkExec wrapper;
-# unlike the first two, it does not call into the scheduler to
-# let it know that a system call is running.
-#
-# * syscall_${GOOS}.go
-#
-# This hand-written Go file implements system calls that need
-# special handling and lists "//sys" comments giving prototypes
-# for ones that can be auto-generated. Mksyscall reads those
-# comments to generate the stubs.
-#
-# * syscall_${GOOS}_${GOARCH}.go
-#
-# Same as syscall_${GOOS}.go except that it contains code specific
-# to ${GOOS} on one particular architecture.
-#
-# * types_${GOOS}.c
-#
-# This hand-written C file includes standard C headers and then
-# creates typedef or enum names beginning with a dollar sign
-# (use of $ in variable names is a gcc extension). The hardest
-# part about preparing this file is figuring out which headers to
-# include and which symbols need to be #defined to get the
-# actual data structures that pass through to the kernel system calls.
-# Some C libraries present alternate versions for binary compatibility
-# and translate them on the way in and out of system calls, but
-# there is almost always a #define that can get the real ones.
-# See types_darwin.c and types_linux.c for examples.
-#
-# * zerror_${GOOS}_${GOARCH}.go
-#
-# This machine-generated file defines the system's error numbers,
-# error strings, and signal numbers. The generator is "mkerrors.sh".
-# Usually no arguments are needed, but mkerrors.sh will pass its
-# arguments on to godefs.
-#
-# * zsyscall_${GOOS}_${GOARCH}.go
-#
-# Generated by mksyscall.pl; see syscall_${GOOS}.go above.
-#
-# * zsysnum_${GOOS}_${GOARCH}.go
-#
-# Generated by mksysnum_${GOOS}.
-#
-# * ztypes_${GOOS}_${GOARCH}.go
-#
-# Generated by godefs; see types_${GOOS}.c above.
-
-GOOSARCH="${GOOS}_${GOARCH}"
-
-# defaults
-mksyscall="./mksyscall.pl"
-mkerrors="./mkerrors.sh"
-zerrors="zerrors_$GOOSARCH.go"
-mksysctl=""
-zsysctl="zsysctl_$GOOSARCH.go"
-mksysnum=
-mktypes=
-run="sh"
-
-case "$1" in
--syscalls)
- for i in zsyscall*go
- do
- sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i
- rm _$i
- done
- exit 0
- ;;
--n)
- run="cat"
- shift
-esac
-
-case "$#" in
-0)
- ;;
-*)
- echo 'usage: mkall.sh [-n]' 1>&2
- exit 2
-esac
-
-case "$GOOSARCH" in
-_* | *_ | _)
- echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
- exit 1
- ;;
-darwin_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-darwin_amd64)
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-dragonfly_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -dragonfly"
- mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-dragonfly_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -dragonfly"
- mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_amd64)
- mkerrors="$mkerrors -m64"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_arm)
- mkerrors="$mkerrors"
- mksyscall="./mksyscall.pl -l32 -arm"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- # Let the type of C char be singed for making the bare syscall
- # API consistent across over platforms.
- mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
- ;;
-linux_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="./mksysnum_linux.pl /usr/include/asm/unistd_32.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_amd64)
- unistd_h=$(ls -1 /usr/include/asm/unistd_64.h /usr/include/x86_64-linux-gnu/asm/unistd_64.h 2>/dev/null | head -1)
- if [ "$unistd_h" = "" ]; then
- echo >&2 cannot find unistd_64.h
- exit 1
- fi
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_linux.pl $unistd_h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_arm)
- mkerrors="$mkerrors"
- mksyscall="./mksyscall.pl -l32 -arm"
- mksysnum="curl -s 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/arch/arm/include/uapi/asm/unistd.h' | ./mksysnum_linux.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-nacl_386)
- mkerrors=""
- mksyscall="./mksyscall.pl -l32 -nacl"
- mksysnum=""
- mktypes=""
- ;;
-nacl_amd64p32)
- mkerrors=""
- mksyscall="./mksyscall.pl -nacl"
- mksysnum=""
- mktypes=""
- ;;
-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 go tool 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 go tool cgo -godefs"
- ;;
-openbsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -openbsd"
- mksysctl="./mksysctl_openbsd.pl"
- zsysctl="zsysctl_openbsd.go"
- mksysnum="curl -s 'http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-openbsd_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -openbsd"
- mksysctl="./mksysctl_openbsd.pl"
- zsysctl="zsysctl_openbsd.go"
- mksysnum="curl -s 'http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-plan9_386)
- mkerrors=
- mksyscall="./mksyscall.pl -l32 -plan9"
- mksysnum="./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h"
- mktypes="XXX"
- ;;
-solaris_amd64)
- mksyscall="./mksyscall_solaris.pl"
- mkerrors="$mkerrors -m64"
- mksysnum=
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-windows_*)
- mksyscall=
- mkerrors=
- zerrors=
- ;;
-*)
- echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
- exit 1
- ;;
-esac
-
-(
- if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi
- case "$GOOS" in
- windows)
- echo "GOOS= GOARCH= go build mksyscall_windows.go"
- echo "./mksyscall_windows syscall_windows.go security_windows.go syscall_$GOOSARCH.go |gofmt >zsyscall_$GOOSARCH.go"
- echo "rm -f ./mksyscall_windows"
- ;;
- *)
- syscall_goos="syscall_$GOOS.go"
- case "$GOOS" in
- darwin | dragonfly | freebsd | netbsd | openbsd)
- syscall_goos="syscall_bsd.go $syscall_goos"
- ;;
- esac
- if [ -n "$mksyscall" ]; then echo "$mksyscall $syscall_goos syscall_$GOOSARCH.go |gofmt >zsyscall_$GOOSARCH.go"; fi
- ;;
- esac
- if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
- if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
- if [ -n "$mktypes" ]; then echo "$mktypes types_$GOOS.go |gofmt >ztypes_$GOOSARCH.go"; fi
-) | $run
diff --git a/src/pkg/syscall/mkall_windows.bat b/src/pkg/syscall/mkall_windows.bat
deleted file mode 100644
index a4a3f1674..000000000
--- a/src/pkg/syscall/mkall_windows.bat
+++ /dev/null
@@ -1,21 +0,0 @@
-:: Copyright 2013 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.
-@echo off
-
-if exist mkall.sh goto dirok
-echo mkall_windows.bat must be run from src\pkg\syscall directory
-goto :end
-:dirok
-
-if "%1"=="386" goto :paramok
-if "%1"=="amd64" goto :paramok
-echo parameters must be 386 or amd64
-goto :end
-:paramok
-
-go build mksyscall_windows.go
-.\mksyscall_windows syscall_windows.go security_windows.go syscall_windows_%1.go |gofmt >zsyscall_windows_%1.go
-del mksyscall_windows.exe
-
-:end \ No newline at end of file
diff --git a/src/pkg/syscall/mkerrors.sh b/src/pkg/syscall/mkerrors.sh
deleted file mode 100755
index cf0afe0bd..000000000
--- a/src/pkg/syscall/mkerrors.sh
+++ /dev/null
@@ -1,433 +0,0 @@
-#!/usr/bin/env bash
-# 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 Go code listing errors and other #defined constant
-# values (ENAMETOOLONG etc.), by asking the preprocessor
-# about the definitions.
-
-unset LANG
-export LC_ALL=C
-export LC_CTYPE=C
-
-CC=${CC:-gcc}
-
-uname=$(uname)
-
-includes_Darwin='
-#define _DARWIN_C_SOURCE
-#define KERNEL
-#define _DARWIN_USE_64_BIT_INODE
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/ptrace.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/mman.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/ip.h>
-#include <netinet/ip_mroute.h>
-#include <termios.h>
-'
-
-includes_DragonFly='
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <termios.h>
-#include <netinet/ip.h>
-#include <net/ip_mroute/ip_mroute.h>
-'
-
-includes_FreeBSD='
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <termios.h>
-#include <netinet/ip.h>
-#include <netinet/ip_mroute.h>
-
-#if __FreeBSD__ >= 10
-#define IFT_CARP 0xf8 // IFT_CARP is deprecated in FreeBSD 10
-#undef SIOCAIFADDR
-#define SIOCAIFADDR _IOW(105, 26, struct oifaliasreq) // ifaliasreq contains if_data
-#undef SIOCSIFPHYADDR
-#define SIOCSIFPHYADDR _IOW(105, 70, struct oifaliasreq) // ifaliasreq contains if_data
-#endif
-'
-
-includes_Linux='
-#define _LARGEFILE_SOURCE
-#define _LARGEFILE64_SOURCE
-#define _FILE_OFFSET_BITS 64
-#define _GNU_SOURCE
-
-#include <bits/sockaddr.h>
-#include <sys/epoll.h>
-#include <sys/inotify.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/prctl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <linux/if.h>
-#include <linux/if_arp.h>
-#include <linux/if_ether.h>
-#include <linux/if_tun.h>
-#include <linux/if_packet.h>
-#include <linux/if_addr.h>
-#include <linux/filter.h>
-#include <linux/netlink.h>
-#include <linux/reboot.h>
-#include <linux/rtnetlink.h>
-#include <linux/ptrace.h>
-#include <linux/sched.h>
-#include <linux/wait.h>
-#include <linux/icmpv6.h>
-#include <net/route.h>
-#include <termios.h>
-
-#ifndef MSG_FASTOPEN
-#define MSG_FASTOPEN 0x20000000
-#endif
-'
-
-includes_NetBSD='
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/event.h>
-#include <sys/mman.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>
-
-// Needed since <sys/param.h> refers to it...
-#define schedppq 1
-'
-
-includes_OpenBSD='
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/event.h>
-#include <sys/mman.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/if_var.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>
-#include <net/if_bridge.h>
-
-// We keep some constants not supported in OpenBSD 5.5 and beyond for
-// the promise of compatibility.
-#define EMUL_ENABLED 0x1
-#define EMUL_NATIVE 0x2
-#define IPV6_FAITH 0x1d
-#define IPV6_OPTIONS 0x1
-#define IPV6_RTHDR_STRICT 0x1
-#define IPV6_SOCKOPT_RESERVED1 0x3
-#define SIOCGIFGENERIC 0xc020693a
-#define SIOCSIFGENERIC 0x80206939
-#define WALTSIG 0x4
-'
-
-includes_SunOS='
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_arp.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <termios.h>
-#include <netinet/ip.h>
-#include <netinet/ip_mroute.h>
-'
-
-includes='
-#include <sys/types.h>
-#include <sys/file.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/ip6.h>
-#include <netinet/tcp.h>
-#include <errno.h>
-#include <sys/signal.h>
-#include <signal.h>
-#include <sys/resource.h>
-'
-
-ccflags="$@"
-
-# Write go tool cgo -godefs input.
-(
- echo package syscall
- echo
- echo '/*'
- indirect="includes_$(uname)"
- echo "${!indirect} $includes"
- echo '*/'
- echo 'import "C"'
- echo
- echo 'const ('
-
- # The gcc command line prints all the #defines
- # it encounters while processing the input
- echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags |
- awk '
- $1 != "#define" || $2 ~ /\(/ || $3 == "" {next}
-
- $2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next} # 386 registers
- $2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next}
- $2 ~ /^(SCM_SRCRT)$/ {next}
- $2 ~ /^(MAP_FAILED)$/ {next}
-
- $2 !~ /^ETH_/ &&
- $2 !~ /^EPROC_/ &&
- $2 !~ /^EQUIV_/ &&
- $2 !~ /^EXPR_/ &&
- $2 ~ /^E[A-Z0-9_]+$/ ||
- $2 ~ /^B[0-9_]+$/ ||
- $2 ~ /^V[A-Z0-9]+$/ ||
- $2 ~ /^CS[A-Z0-9]/ ||
- $2 ~ /^I(SIG|CANON|CRNL|EXTEN|MAXBEL|STRIP|UTF8)$/ ||
- $2 ~ /^IGN/ ||
- $2 ~ /^IX(ON|ANY|OFF)$/ ||
- $2 ~ /^IN(LCR|PCK)$/ ||
- $2 ~ /(^FLU?SH)|(FLU?SH$)/ ||
- $2 ~ /^C(LOCAL|READ)$/ ||
- $2 == "BRKINT" ||
- $2 == "HUPCL" ||
- $2 == "PENDIN" ||
- $2 == "TOSTOP" ||
- $2 ~ /^PAR/ ||
- $2 ~ /^SIG[^_]/ ||
- $2 ~ /^O[CNPFP][A-Z]+[^_][A-Z]+$/ ||
- $2 ~ /^IN_/ ||
- $2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
- $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
- $2 == "ICMPV6_FILTER" ||
- $2 == "SOMAXCONN" ||
- $2 == "NAME_MAX" ||
- $2 == "IFNAMSIZ" ||
- $2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ ||
- $2 ~ /^SYSCTL_VERS/ ||
- $2 ~ /^(MS|MNT)_/ ||
- $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
- $2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ ||
- $2 ~ /^LINUX_REBOOT_CMD_/ ||
- $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
- $2 !~ "NLA_TYPE_MASK" &&
- $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ ||
- $2 ~ /^SIOC/ ||
- $2 ~ /^TIOC/ ||
- $2 !~ "RTF_BITS" &&
- $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
- $2 ~ /^BIOC/ ||
- $2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||
- $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ ||
- $2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
- $2 ~ /^CLONE_[A-Z_]+/ ||
- $2 !~ /^(BPF_TIMEVAL)$/ &&
- $2 ~ /^(BPF|DLT)_/ ||
- $2 !~ "WMESGLEN" &&
- $2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)}
- $2 ~ /^__WCOREFLAG$/ {next}
- $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
-
- {next}
- ' | sort
-
- echo ')'
-) >_const.go
-
-# Pull out the error names for later.
-errors=$(
- echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' |
- sort
-)
-
-# Pull out the signal names for later.
-signals=$(
- echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
- sort
-)
-
-# Again, writing regexps to a file.
-echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' |
- sort >_error.grep
-echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
- sort >_signal.grep
-
-echo '// mkerrors.sh' "$@"
-echo '// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT'
-echo
-go tool cgo -godefs -- "$@" _const.go >_error.out
-cat _error.out | grep -vf _error.grep | grep -vf _signal.grep
-echo
-echo '// Errors'
-echo 'const ('
-cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= Errno(\1)/'
-echo ')'
-
-echo
-echo '// Signals'
-echo 'const ('
-cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= Signal(\1)/'
-echo ')'
-
-# Run C program to print error and syscall strings.
-(
- echo -E "
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <ctype.h>
-#include <string.h>
-#include <signal.h>
-
-#define nelem(x) (sizeof(x)/sizeof((x)[0]))
-
-enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below
-
-int errors[] = {
-"
- for i in $errors
- do
- echo -E ' '$i,
- done
-
- echo -E "
-};
-
-int signals[] = {
-"
- for i in $signals
- do
- echo -E ' '$i,
- done
-
- # Use -E because on some systems bash builtin interprets \n itself.
- echo -E '
-};
-
-static int
-intcmp(const void *a, const void *b)
-{
- return *(int*)a - *(int*)b;
-}
-
-int
-main(void)
-{
- int i, j, e;
- char buf[1024], *p;
-
- printf("\n\n// Error table\n");
- printf("var errors = [...]string {\n");
- qsort(errors, nelem(errors), sizeof errors[0], intcmp);
- for(i=0; i<nelem(errors); i++) {
- e = errors[i];
- if(i > 0 && errors[i-1] == e)
- continue;
- strcpy(buf, strerror(e));
- // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
- if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
- buf[0] += a - A;
- printf("\t%d: \"%s\",\n", e, buf);
- }
- printf("}\n\n");
-
- printf("\n\n// Signal table\n");
- printf("var signals = [...]string {\n");
- qsort(signals, nelem(signals), sizeof signals[0], intcmp);
- for(i=0; i<nelem(signals); i++) {
- e = signals[i];
- if(i > 0 && signals[i-1] == e)
- continue;
- strcpy(buf, strsignal(e));
- // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
- if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
- buf[0] += a - A;
- // cut trailing : number.
- p = strrchr(buf, ":"[0]);
- if(p)
- *p = '\0';
- printf("\t%d: \"%s\",\n", e, buf);
- }
- printf("}\n\n");
-
- return 0;
-}
-
-'
-) >_errors.c
-
-$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out
diff --git a/src/pkg/syscall/mksyscall.pl b/src/pkg/syscall/mksyscall.pl
deleted file mode 100755
index 6d35fa689..000000000
--- a/src/pkg/syscall/mksyscall.pl
+++ /dev/null
@@ -1,313 +0,0 @@
-#!/usr/bin/env 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.
-
-# This program reads a file containing function prototypes
-# (like syscall_darwin.go) and generates system call bodies.
-# The prototypes are marked by lines beginning with "//sys"
-# and read like func declarations if //sys is replaced by func, but:
-# * The parameter lists must give a name for each argument.
-# This includes return parameters.
-# * The parameter lists must give a type for each argument:
-# the (x, y, z int) shorthand is not allowed.
-# * If the return parameter is an error number, it must be named errno.
-
-# A line beginning with //sysnb is like //sys, except that the
-# goroutine will not be suspended during the execution of the system
-# call. This must only be used for system calls which can never
-# block, as otherwise the system call could cause all goroutines to
-# hang.
-
-use strict;
-
-my $cmdline = "mksyscall.pl " . join(' ', @ARGV);
-my $errors = 0;
-my $_32bit = "";
-my $plan9 = 0;
-my $openbsd = 0;
-my $netbsd = 0;
-my $dragonfly = 0;
-my $nacl = 0;
-my $arm = 0; # 64-bit value should use (even, odd)-pair
-
-if($ARGV[0] eq "-b32") {
- $_32bit = "big-endian";
- shift;
-} elsif($ARGV[0] eq "-l32") {
- $_32bit = "little-endian";
- shift;
-}
-if($ARGV[0] eq "-plan9") {
- $plan9 = 1;
- shift;
-}
-if($ARGV[0] eq "-openbsd") {
- $openbsd = 1;
- shift;
-}
-if($ARGV[0] eq "-netbsd") {
- $netbsd = 1;
- shift;
-}
-if($ARGV[0] eq "-dragonfly") {
- $dragonfly = 1;
- shift;
-}
-if($ARGV[0] eq "-nacl") {
- $nacl = 1;
- shift;
-}
-if($ARGV[0] eq "-arm") {
- $arm = 1;
- shift;
-}
-
-if($ARGV[0] =~ /^-/) {
- print STDERR "usage: mksyscall.pl [-b32 | -l32] [file ...]\n";
- exit 1;
-}
-
-sub parseparamlist($) {
- my ($list) = @_;
- $list =~ s/^\s*//;
- $list =~ s/\s*$//;
- if($list eq "") {
- return ();
- }
- return split(/\s*,\s*/, $list);
-}
-
-sub parseparam($) {
- my ($p) = @_;
- if($p !~ /^(\S*) (\S*)$/) {
- print STDERR "$ARGV:$.: malformed parameter: $p\n";
- $errors = 1;
- return ("xx", "int");
- }
- return ($1, $2);
-}
-
-my $text = "";
-while(<>) {
- chomp;
- s/\s+/ /g;
- s/^\s+//;
- s/\s+$//;
- my $nonblock = /^\/\/sysnb /;
- next if !/^\/\/sys / && !$nonblock;
-
- # Line must be of the form
- # func Open(path string, mode int, perm int) (fd int, errno error)
- # Split into name, in params, out params.
- if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) {
- print STDERR "$ARGV:$.: malformed //sys declaration\n";
- $errors = 1;
- next;
- }
- my ($func, $in, $out, $sysname) = ($2, $3, $4, $5);
-
- # Split argument lists on comma.
- my @in = parseparamlist($in);
- my @out = parseparamlist($out);
-
- # Try in vain to keep people from editing this file.
- # The theory is that they jump into the middle of the file
- # without reading the header.
- $text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
-
- # Go function header.
- my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : "";
- $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl;
-
- # Check if err return available
- my $errvar = "";
- foreach my $p (@out) {
- my ($name, $type) = parseparam($p);
- if($type eq "error") {
- $errvar = $name;
- last;
- }
- }
-
- # Prepare arguments to Syscall.
- my @args = ();
- my $n = 0;
- foreach my $p (@in) {
- my ($name, $type) = parseparam($p);
- if($type =~ /^\*/) {
- push @args, "uintptr(unsafe.Pointer($name))";
- } elsif($type eq "string" && $errvar ne "") {
- $text .= "\tvar _p$n *byte\n";
- $text .= "\t_p$n, $errvar = BytePtrFromString($name)\n";
- $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type eq "string") {
- print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
- $text .= "\tvar _p$n *byte\n";
- $text .= "\t_p$n, _ = BytePtrFromString($name)\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type =~ /^\[\](.*)/) {
- # Convert slice into pointer, length.
- # Have to be careful not to take address of &a[0] if len == 0:
- # pass dummy pointer in that case.
- # Used to pass nil, but some OSes or simulators reject write(fd, nil, 0).
- $text .= "\tvar _p$n unsafe.Pointer\n";
- $text .= "\tif len($name) > 0 {\n\t\t_p$n = unsafe.Pointer(\&${name}[0])\n\t}";
- $text .= " else {\n\t\t_p$n = unsafe.Pointer(&_zero)\n\t}";
- $text .= "\n";
- push @args, "uintptr(_p$n)", "uintptr(len($name))";
- $n++;
- } elsif($type eq "int64" && ($openbsd || $netbsd)) {
- push @args, "0";
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name>>32)", "uintptr($name)";
- } elsif($_32bit eq "little-endian") {
- push @args, "uintptr($name)", "uintptr($name>>32)";
- } else {
- push @args, "uintptr($name)";
- }
- } elsif($type eq "int64" && $dragonfly) {
- if ($func !~ /^extp(read|write)/i) {
- push @args, "0";
- }
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name>>32)", "uintptr($name)";
- } elsif($_32bit eq "little-endian") {
- push @args, "uintptr($name)", "uintptr($name>>32)";
- } else {
- push @args, "uintptr($name)";
- }
- } elsif($type eq "int64" && $_32bit ne "") {
- if(@args % 2 && $arm) {
- # arm abi specifies 64-bit argument uses
- # (even, odd) pair
- push @args, "0"
- }
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name>>32)", "uintptr($name)";
- } else {
- push @args, "uintptr($name)", "uintptr($name>>32)";
- }
- } else {
- push @args, "uintptr($name)";
- }
- }
-
- # Determine which form to use; pad args with zeros.
- my $asm = "Syscall";
- if ($nonblock) {
- $asm = "RawSyscall";
- }
- if(@args <= 3) {
- while(@args < 3) {
- push @args, "0";
- }
- } elsif(@args <= 6) {
- $asm .= "6";
- while(@args < 6) {
- push @args, "0";
- }
- } elsif(@args <= 9) {
- $asm .= "9";
- while(@args < 9) {
- push @args, "0";
- }
- } else {
- print STDERR "$ARGV:$.: too many arguments to system call\n";
- }
-
- # System call number.
- if($sysname eq "") {
- $sysname = "SYS_$func";
- $sysname =~ s/([a-z])([A-Z])/${1}_$2/g; # turn FooBar into Foo_Bar
- $sysname =~ y/a-z/A-Z/;
- if($nacl) {
- $sysname =~ y/A-Z/a-z/;
- }
- }
-
- # Actual call.
- my $args = join(', ', @args);
- my $call = "$asm($sysname, $args)";
-
- # Assign return values.
- my $body = "";
- my @ret = ("_", "_", "_");
- my $do_errno = 0;
- for(my $i=0; $i<@out; $i++) {
- my $p = $out[$i];
- my ($name, $type) = parseparam($p);
- my $reg = "";
- if($name eq "err" && !$plan9) {
- $reg = "e1";
- $ret[2] = $reg;
- $do_errno = 1;
- } elsif($name eq "err" && $plan9) {
- $ret[0] = "r0";
- $ret[2] = "e1";
- next;
- } else {
- $reg = sprintf("r%d", $i);
- $ret[$i] = $reg;
- }
- if($type eq "bool") {
- $reg = "$reg != 0";
- }
- if($type eq "int64" && $_32bit ne "") {
- # 64-bit number in r1:r0 or r0:r1.
- if($i+2 > @out) {
- print STDERR "$ARGV:$.: not enough registers for int64 return\n";
- }
- if($_32bit eq "big-endian") {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
- } else {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
- }
- $ret[$i] = sprintf("r%d", $i);
- $ret[$i+1] = sprintf("r%d", $i+1);
- }
- if($reg ne "e1" || $plan9) {
- $body .= "\t$name = $type($reg)\n";
- }
- }
- if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
- $text .= "\t$call\n";
- } else {
- $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
- }
- $text .= $body;
-
- if ($plan9 && $ret[2] eq "e1") {
- $text .= "\tif int32(r0) == -1 {\n";
- $text .= "\t\terr = e1\n";
- $text .= "\t}\n";
- } elsif ($do_errno) {
- $text .= "\tif e1 != 0 {\n";
- $text .= "\t\terr = e1\n";
- $text .= "\t}\n";
- }
- $text .= "\treturn\n";
- $text .= "}\n\n";
-}
-
-chomp $text;
-chomp $text;
-
-if($errors) {
- exit 1;
-}
-
-print <<EOF;
-// $cmdline
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-$text
-EOF
-exit 0;
diff --git a/src/pkg/syscall/mksyscall_solaris.pl b/src/pkg/syscall/mksyscall_solaris.pl
deleted file mode 100755
index 130d043d9..000000000
--- a/src/pkg/syscall/mksyscall_solaris.pl
+++ /dev/null
@@ -1,279 +0,0 @@
-#!/usr/bin/env 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.
-
-# This program reads a file containing function prototypes
-# (like syscall_solaris.go) and generates system call bodies.
-# The prototypes are marked by lines beginning with "//sys"
-# and read like func declarations if //sys is replaced by func, but:
-# * The parameter lists must give a name for each argument.
-# This includes return parameters.
-# * The parameter lists must give a type for each argument:
-# the (x, y, z int) shorthand is not allowed.
-# * If the return parameter is an error number, it must be named err.
-# * If go func name needs to be different than its libc name,
-# * or the function is not in libc, name could be specified
-# * at the end, after "=" sign, like
-# //sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
-
-use strict;
-
-my $cmdline = "mksyscall_solaris.pl " . join(' ', @ARGV);
-my $errors = 0;
-my $_32bit = "";
-
-binmode STDOUT;
-
-if($ARGV[0] eq "-b32") {
- $_32bit = "big-endian";
- shift;
-} elsif($ARGV[0] eq "-l32") {
- $_32bit = "little-endian";
- shift;
-}
-
-if($ARGV[0] =~ /^-/) {
- print STDERR "usage: mksyscall_solaris.pl [-b32 | -l32] [file ...]\n";
- exit 1;
-}
-
-sub parseparamlist($) {
- my ($list) = @_;
- $list =~ s/^\s*//;
- $list =~ s/\s*$//;
- if($list eq "") {
- return ();
- }
- return split(/\s*,\s*/, $list);
-}
-
-sub parseparam($) {
- my ($p) = @_;
- if($p !~ /^(\S*) (\S*)$/) {
- print STDERR "$ARGV:$.: malformed parameter: $p\n";
- $errors = 1;
- return ("xx", "int");
- }
- return ($1, $2);
-}
-
-my $package = "";
-my $text = "";
-my $vars = "";
-my $mods = "";
-my $modnames = "";
-while(<>) {
- chomp;
- s/\s+/ /g;
- s/^\s+//;
- s/\s+$//;
- $package = $1 if !$package && /^package (\S+)$/;
- my $nonblock = /^\/\/sysnb /;
- next if !/^\/\/sys / && !$nonblock;
-
- my $syscalldot = "";
- $syscalldot = "syscall." if $package ne "syscall";
-
- # Line must be of the form
- # func Open(path string, mode int, perm int) (fd int, err error)
- # Split into name, in params, out params.
- if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) {
- print STDERR "$ARGV:$.: malformed //sys declaration\n";
- $errors = 1;
- next;
- }
- my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6);
-
- # Split argument lists on comma.
- my @in = parseparamlist($in);
- my @out = parseparamlist($out);
-
- # So file name.
- if($modname eq "") {
- $modname = "libc";
- }
- my $modvname = "mod$modname";
- if($modnames !~ /$modname/) {
- $modnames .= ".$modname";
- $mods .= "\t$modvname = ${syscalldot}newLazySO(\"$modname.so\")\n";
- }
-
- # System call name.
- if($sysname eq "") {
- $sysname = "$func";
- }
-
- # System call pointer variable name.
- my $sysvarname = "proc$sysname";
-
- my $strconvfunc = "BytePtrFromString";
- my $strconvtype = "*byte";
-
- # Library proc address variable.
- $sysname =~ y/A-Z/a-z/; # All libc functions are lowercase.
- $vars .= "\t$sysvarname = $modvname.NewProc(\"$sysname\")\n";
-
- # Go function header.
- $out = join(', ', @out);
- if($out ne "") {
- $out = " ($out)";
- }
- if($text ne "") {
- $text .= "\n"
- }
- $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out;
-
- # Check if err return available
- my $errvar = "";
- foreach my $p (@out) {
- my ($name, $type) = parseparam($p);
- if($type eq "error") {
- $errvar = $name;
- last;
- }
- }
-
- # Prepare arguments to Syscall.
- my @args = ();
- my $n = 0;
- my @pin= ();
- foreach my $p (@in) {
- my ($name, $type) = parseparam($p);
- if($type =~ /^\*/) {
- push @args, "uintptr(unsafe.Pointer($name))";
- } elsif($type eq "string" && $errvar ne "") {
- $text .= "\tvar _p$n $strconvtype\n";
- $text .= "\t_p$n, $errvar = $strconvfunc($name)\n";
- $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type eq "string") {
- print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
- $text .= "\tvar _p$n $strconvtype\n";
- $text .= "\t_p$n, _ = $strconvfunc($name)\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type =~ /^\[\](.*)/) {
- # Convert slice into pointer, length.
- # Have to be careful not to take address of &a[0] if len == 0:
- # pass nil in that case.
- $text .= "\tvar _p$n *$1\n";
- $text .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))", "uintptr(len($name))";
- $n++;
- } elsif($type eq "int64" && $_32bit ne "") {
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name >> 32)", "uintptr($name)";
- } else {
- push @args, "uintptr($name)", "uintptr($name >> 32)";
- }
- } elsif($type eq "bool") {
- $text .= "\tvar _p$n uint32\n";
- $text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n";
- push @args, "uintptr(_p$n)";
- $n++;
- } else {
- push @args, "uintptr($name)";
- }
- push @pin, sprintf "\"%s=\", %s, ", $name, $name;
- }
- my $nargs = @args;
-
- # Determine which form to use; pad args with zeros.
- my $asm = "${syscalldot}sysvicall6";
- if ($nonblock) {
- $asm = "${syscalldot}rawSysvicall6";
- }
- if(@args <= 6) {
- while(@args < 6) {
- push @args, "0";
- }
- } else {
- print STDERR "$ARGV:$.: too many arguments to system call\n";
- }
-
- # Actual call.
- my $args = join(', ', @args);
- my $call = "$asm($sysvarname.Addr(), $nargs, $args)";
-
- # Assign return values.
- my $body = "";
- my $failexpr = "";
- my @ret = ("_", "_", "_");
- my @pout= ();
- my $do_errno = 0;
- for(my $i=0; $i<@out; $i++) {
- my $p = $out[$i];
- my ($name, $type) = parseparam($p);
- my $reg = "";
- if($name eq "err") {
- $reg = "e1";
- $ret[2] = $reg;
- $do_errno = 1;
- } else {
- $reg = sprintf("r%d", $i);
- $ret[$i] = $reg;
- }
- if($type eq "bool") {
- $reg = "$reg != 0";
- }
- if($type eq "int64" && $_32bit ne "") {
- # 64-bit number in r1:r0 or r0:r1.
- if($i+2 > @out) {
- print STDERR "$ARGV:$.: not enough registers for int64 return\n";
- }
- if($_32bit eq "big-endian") {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
- } else {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
- }
- $ret[$i] = sprintf("r%d", $i);
- $ret[$i+1] = sprintf("r%d", $i+1);
- }
- if($reg ne "e1") {
- $body .= "\t$name = $type($reg)\n";
- }
- }
- if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
- $text .= "\t$call\n";
- } else {
- $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
- }
- $text .= $body;
-
- if ($do_errno) {
- $text .= "\tif e1 != 0 {\n";
- $text .= "\t\terr = e1\n";
- $text .= "\t}\n";
- }
- $text .= "\treturn\n";
- $text .= "}\n";
-}
-
-if($errors) {
- exit 1;
-}
-
-print <<EOF;
-// $cmdline
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package $package
-
-import "unsafe"
-EOF
-
-print "import \"syscall\"\n" if $package ne "syscall";
-
-print <<EOF;
-
-var (
-$mods
-$vars
-)
-
-$text
-
-EOF
-exit 0;
diff --git a/src/pkg/syscall/mksyscall_windows.go b/src/pkg/syscall/mksyscall_windows.go
deleted file mode 100644
index 4225588de..000000000
--- a/src/pkg/syscall/mksyscall_windows.go
+++ /dev/null
@@ -1,662 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-mksyscall_windows generates windows system call bodies
-
-It parses all files specified on command line containing function
-prototypes (like syscall_windows.go) and prints system call bodies
-to standard output.
-
-The prototypes are marked by lines beginning with "//sys" and read
-like func declarations if //sys is replaced by func, but:
-
-* The parameter lists must give a name for each argument. This
- includes return parameters.
-
-* The parameter lists must give a type for each argument:
- the (x, y, z int) shorthand is not allowed.
-
-* If the return parameter is an error number, it must be named err.
-
-* If go func name needs to be different from it's winapi dll name,
- the winapi name could be specified at the end, after "=" sign, like
- //sys LoadLibrary(libname string) (handle uint32, err error) = LoadLibraryA
-
-* Each function that returns err needs to supply a condition, that
- return value of winapi will be tested against to detect failure.
- This would set err to windows "last-error", otherwise it will be nil.
- The value can be provided at end of //sys declaration, like
- //sys LoadLibrary(libname string) (handle uint32, err error) [failretval==-1] = LoadLibraryA
- and is [failretval==0] by default.
-
-Usage:
- mksyscall_windows [flags] [path ...]
-
-The flags are:
- -trace
- Generate print statement after every syscall.
-*/
-package main
-
-import (
- "bufio"
- "errors"
- "flag"
- "fmt"
- "io"
- "log"
- "os"
- "strconv"
- "strings"
- "text/template"
-)
-
-var PrintTraceFlag = flag.Bool("trace", false, "generate print statement after every syscall")
-
-func trim(s string) string {
- return strings.Trim(s, " \t")
-}
-
-// Param is function parameter
-type Param struct {
- Name string
- Type string
- fn *Fn
- tmpVarIdx int
-}
-
-// tmpVar returns temp variable name that will be used to represent p during syscall.
-func (p *Param) tmpVar() string {
- if p.tmpVarIdx < 0 {
- p.tmpVarIdx = p.fn.curTmpVarIdx
- p.fn.curTmpVarIdx++
- }
- return fmt.Sprintf("_p%d", p.tmpVarIdx)
-}
-
-// BoolTmpVarCode returns source code for bool temp variable.
-func (p *Param) BoolTmpVarCode() string {
- const code = `var %s uint32
- if %s {
- %s = 1
- } else {
- %s = 0
- }`
- tmp := p.tmpVar()
- return fmt.Sprintf(code, tmp, p.Name, tmp, tmp)
-}
-
-// SliceTmpVarCode returns source code for slice temp variable.
-func (p *Param) SliceTmpVarCode() string {
- const code = `var %s *%s
- if len(%s) > 0 {
- %s = &%s[0]
- }`
- tmp := p.tmpVar()
- return fmt.Sprintf(code, tmp, p.Type[2:], p.Name, tmp, p.Name)
-}
-
-// StringTmpVarCode returns source code for string temp variable.
-func (p *Param) StringTmpVarCode() string {
- errvar := p.fn.Rets.ErrorVarName()
- if errvar == "" {
- errvar = "_"
- }
- tmp := p.tmpVar()
- const code = `var %s %s
- %s, %s = %s(%s)`
- s := fmt.Sprintf(code, tmp, p.fn.StrconvType(), tmp, errvar, p.fn.StrconvFunc(), p.Name)
- if errvar == "-" {
- return s
- }
- const morecode = `
- if %s != nil {
- return
- }`
- return s + fmt.Sprintf(morecode, errvar)
-}
-
-// TmpVarCode returns source code for temp variable.
-func (p *Param) TmpVarCode() string {
- switch {
- case p.Type == "string":
- return p.StringTmpVarCode()
- case p.Type == "bool":
- return p.BoolTmpVarCode()
- case strings.HasPrefix(p.Type, "[]"):
- return p.SliceTmpVarCode()
- default:
- return ""
- }
-}
-
-// SyscallArgList returns source code fragments representing p parameter
-// in syscall. Slices are translated into 2 syscall parameters: pointer to
-// the first element and length.
-func (p *Param) SyscallArgList() []string {
- var s string
- switch {
- case p.Type[0] == '*':
- s = fmt.Sprintf("unsafe.Pointer(%s)", p.Name)
- case p.Type == "string":
- s = fmt.Sprintf("unsafe.Pointer(%s)", p.tmpVar())
- case p.Type == "bool":
- s = p.tmpVar()
- case strings.HasPrefix(p.Type, "[]"):
- return []string{
- fmt.Sprintf("uintptr(unsafe.Pointer(%s))", p.tmpVar()),
- fmt.Sprintf("uintptr(len(%s))", p.Name),
- }
- default:
- s = p.Name
- }
- return []string{fmt.Sprintf("uintptr(%s)", s)}
-}
-
-// IsError determines if p parameter is used to return error.
-func (p *Param) IsError() bool {
- return p.Name == "err" && p.Type == "error"
-}
-
-// join concatenates parameters ps into a string with sep separator.
-// Each parameter is converted into string by applying fn to it
-// before conversion.
-func join(ps []*Param, fn func(*Param) string, sep string) string {
- if len(ps) == 0 {
- return ""
- }
- a := make([]string, 0)
- for _, p := range ps {
- a = append(a, fn(p))
- }
- return strings.Join(a, sep)
-}
-
-// Rets describes function return parameters.
-type Rets struct {
- Name string
- Type string
- ReturnsError bool
- FailCond string
-}
-
-// ErrorVarName returns error variable name for r.
-func (r *Rets) ErrorVarName() string {
- if r.ReturnsError {
- return "err"
- }
- if r.Type == "error" {
- return r.Name
- }
- return ""
-}
-
-// ToParams converts r into slice of *Param.
-func (r *Rets) ToParams() []*Param {
- ps := make([]*Param, 0)
- if len(r.Name) > 0 {
- ps = append(ps, &Param{Name: r.Name, Type: r.Type})
- }
- if r.ReturnsError {
- ps = append(ps, &Param{Name: "err", Type: "error"})
- }
- return ps
-}
-
-// List returns source code of syscall return parameters.
-func (r *Rets) List() string {
- s := join(r.ToParams(), func(p *Param) string { return p.Name + " " + p.Type }, ", ")
- if len(s) > 0 {
- s = "(" + s + ")"
- }
- return s
-}
-
-// PrintList returns source code of trace printing part correspondent
-// to syscall return values.
-func (r *Rets) PrintList() string {
- return join(r.ToParams(), func(p *Param) string { return fmt.Sprintf(`"%s=", %s, `, p.Name, p.Name) }, `", ", `)
-}
-
-// SetReturnValuesCode returns source code that accepts syscall return values.
-func (r *Rets) SetReturnValuesCode() string {
- if r.Name == "" && !r.ReturnsError {
- return ""
- }
- retvar := "r0"
- if r.Name == "" {
- retvar = "r1"
- }
- errvar := "_"
- if r.ReturnsError {
- errvar = "e1"
- }
- return fmt.Sprintf("%s, _, %s := ", retvar, errvar)
-}
-
-func (r *Rets) useLongHandleErrorCode(retvar string) string {
- const code = `if %s {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }`
- cond := retvar + " == 0"
- if r.FailCond != "" {
- cond = strings.Replace(r.FailCond, "failretval", retvar, 1)
- }
- return fmt.Sprintf(code, cond)
-}
-
-// SetErrorCode returns source code that sets return parameters.
-func (r *Rets) SetErrorCode() string {
- const code = `if r0 != 0 {
- %s = Errno(r0)
- }`
- if r.Name == "" && !r.ReturnsError {
- return ""
- }
- if r.Name == "" {
- return r.useLongHandleErrorCode("r1")
- }
- if r.Type == "error" {
- return fmt.Sprintf(code, r.Name)
- }
- s := ""
- if r.Type[0] == '*' {
- s = fmt.Sprintf("%s = (%s)(unsafe.Pointer(r0))", r.Name, r.Type)
- } else {
- s = fmt.Sprintf("%s = %s(r0)", r.Name, r.Type)
- }
- if !r.ReturnsError {
- return s
- }
- return s + "\n\t" + r.useLongHandleErrorCode(r.Name)
-}
-
-// Fn describes syscall function.
-type Fn struct {
- Name string
- Params []*Param
- Rets *Rets
- PrintTrace bool
- dllname string
- dllfuncname string
- src string
- // TODO: get rid of this field and just use parameter index instead
- curTmpVarIdx int // insure tmp variables have uniq names
-}
-
-// extractParams parses s to extract function parameters.
-func extractParams(s string, f *Fn) ([]*Param, error) {
- s = trim(s)
- if s == "" {
- return nil, nil
- }
- a := strings.Split(s, ",")
- ps := make([]*Param, len(a))
- for i := range ps {
- s2 := trim(a[i])
- b := strings.Split(s2, " ")
- if len(b) != 2 {
- b = strings.Split(s2, "\t")
- if len(b) != 2 {
- return nil, errors.New("Could not extract function parameter from \"" + s2 + "\"")
- }
- }
- ps[i] = &Param{
- Name: trim(b[0]),
- Type: trim(b[1]),
- fn: f,
- tmpVarIdx: -1,
- }
- }
- return ps, nil
-}
-
-// extractSection extracts text out of string s starting after start
-// and ending just before end. found return value will indicate success,
-// and prefix, body and suffix will contain correspondent parts of string s.
-func extractSection(s string, start, end rune) (prefix, body, suffix string, found bool) {
- s = trim(s)
- if strings.HasPrefix(s, string(start)) {
- // no prefix
- body = s[1:]
- } else {
- a := strings.SplitN(s, string(start), 2)
- if len(a) != 2 {
- return "", "", s, false
- }
- prefix = a[0]
- body = a[1]
- }
- a := strings.SplitN(body, string(end), 2)
- if len(a) != 2 {
- return "", "", "", false
- }
- return prefix, a[0], a[1], true
-}
-
-// newFn parses string s and return created function Fn.
-func newFn(s string) (*Fn, error) {
- s = trim(s)
- f := &Fn{
- Rets: &Rets{},
- src: s,
- PrintTrace: *PrintTraceFlag,
- }
- // function name and args
- prefix, body, s, found := extractSection(s, '(', ')')
- if !found || prefix == "" {
- return nil, errors.New("Could not extract function name and parameters from \"" + f.src + "\"")
- }
- f.Name = prefix
- var err error
- f.Params, err = extractParams(body, f)
- if err != nil {
- return nil, err
- }
- // return values
- _, body, s, found = extractSection(s, '(', ')')
- if found {
- r, err := extractParams(body, f)
- if err != nil {
- return nil, err
- }
- switch len(r) {
- case 0:
- case 1:
- if r[0].IsError() {
- f.Rets.ReturnsError = true
- } else {
- f.Rets.Name = r[0].Name
- f.Rets.Type = r[0].Type
- }
- case 2:
- if !r[1].IsError() {
- return nil, errors.New("Only last windows error is allowed as second return value in \"" + f.src + "\"")
- }
- f.Rets.ReturnsError = true
- f.Rets.Name = r[0].Name
- f.Rets.Type = r[0].Type
- default:
- return nil, errors.New("Too many return values in \"" + f.src + "\"")
- }
- }
- // fail condition
- _, body, s, found = extractSection(s, '[', ']')
- if found {
- f.Rets.FailCond = body
- }
- // dll and dll function names
- s = trim(s)
- if s == "" {
- return f, nil
- }
- if !strings.HasPrefix(s, "=") {
- return nil, errors.New("Could not extract dll name from \"" + f.src + "\"")
- }
- s = trim(s[1:])
- a := strings.Split(s, ".")
- switch len(a) {
- case 1:
- f.dllfuncname = a[0]
- case 2:
- f.dllname = a[0]
- f.dllfuncname = a[1]
- default:
- return nil, errors.New("Could not extract dll name from \"" + f.src + "\"")
- }
- return f, nil
-}
-
-// DLLName returns DLL name for function f.
-func (f *Fn) DLLName() string {
- if f.dllname == "" {
- return "kernel32"
- }
- return f.dllname
-}
-
-// DLLName returns DLL function name for function f.
-func (f *Fn) DLLFuncName() string {
- if f.dllfuncname == "" {
- return f.Name
- }
- return f.dllfuncname
-}
-
-// ParamList returns source code for function f parameters.
-func (f *Fn) ParamList() string {
- return join(f.Params, func(p *Param) string { return p.Name + " " + p.Type }, ", ")
-}
-
-// ParamPrintList returns source code of trace printing part correspondent
-// to syscall input parameters.
-func (f *Fn) ParamPrintList() string {
- return join(f.Params, func(p *Param) string { return fmt.Sprintf(`"%s=", %s, `, p.Name, p.Name) }, `", ", `)
-}
-
-// ParamCount return number of syscall parameters for function f.
-func (f *Fn) ParamCount() int {
- n := 0
- for _, p := range f.Params {
- n += len(p.SyscallArgList())
- }
- return n
-}
-
-// SyscallParamCount determines which version of Syscall/Syscall6/Syscall9/...
-// to use. It returns parameter count for correspondent SyscallX function.
-func (f *Fn) SyscallParamCount() int {
- n := f.ParamCount()
- switch {
- case n <= 3:
- return 3
- case n <= 6:
- return 6
- case n <= 9:
- return 9
- case n <= 12:
- return 12
- case n <= 15:
- return 15
- default:
- panic("too many arguments to system call")
- }
-}
-
-// Syscall determines which SyscallX function to use for function f.
-func (f *Fn) Syscall() string {
- c := f.SyscallParamCount()
- if c == 3 {
- return "Syscall"
- }
- return "Syscall" + strconv.Itoa(c)
-}
-
-// SyscallParamList returns source code for SyscallX parameters for function f.
-func (f *Fn) SyscallParamList() string {
- a := make([]string, 0)
- for _, p := range f.Params {
- a = append(a, p.SyscallArgList()...)
- }
- for len(a) < f.SyscallParamCount() {
- a = append(a, "0")
- }
- return strings.Join(a, ", ")
-}
-
-// IsUTF16 is true, if f is W (utf16) function. It is false
-// for all A (ascii) functions.
-func (f *Fn) IsUTF16() bool {
- s := f.DLLFuncName()
- return s[len(s)-1] == 'W'
-}
-
-// StrconvFunc returns name of Go string to OS string function for f.
-func (f *Fn) StrconvFunc() string {
- if f.IsUTF16() {
- return "UTF16PtrFromString"
- }
- return "BytePtrFromString"
-}
-
-// StrconvType returns Go type name used for OS string for f.
-func (f *Fn) StrconvType() string {
- if f.IsUTF16() {
- return "*uint16"
- }
- return "*byte"
-}
-
-// Source files and functions.
-type Source struct {
- Funcs []*Fn
- Files []string
-}
-
-// ParseFiles parses files listed in fs and extracts all syscall
-// functions listed in sys comments. It returns source files
-// and functions collection *Source if successful.
-func ParseFiles(fs []string) (*Source, error) {
- src := &Source{
- Funcs: make([]*Fn, 0),
- Files: make([]string, 0),
- }
- for _, file := range fs {
- if err := src.ParseFile(file); err != nil {
- return nil, err
- }
- }
- return src, nil
-}
-
-// DLLs return dll names for a source set src.
-func (src *Source) DLLs() []string {
- uniq := make(map[string]bool)
- r := make([]string, 0)
- for _, f := range src.Funcs {
- name := f.DLLName()
- if _, found := uniq[name]; !found {
- uniq[name] = true
- r = append(r, name)
- }
- }
- return r
-}
-
-// ParseFile adds adition file path to a source set src.
-func (src *Source) ParseFile(path string) error {
- file, err := os.Open(path)
- if err != nil {
- return err
- }
- defer file.Close()
-
- s := bufio.NewScanner(file)
- for s.Scan() {
- t := trim(s.Text())
- if len(t) < 7 {
- continue
- }
- if !strings.HasPrefix(t, "//sys") {
- continue
- }
- t = t[5:]
- if !(t[0] == ' ' || t[0] == '\t') {
- continue
- }
- f, err := newFn(t[1:])
- if err != nil {
- return err
- }
- src.Funcs = append(src.Funcs, f)
- }
- if err := s.Err(); err != nil {
- return err
- }
- src.Files = append(src.Files, path)
- return nil
-}
-
-// Generate output source file from a source set src.
-func (src *Source) Generate(w io.Writer) error {
- t := template.Must(template.New("main").Parse(srcTemplate))
- err := t.Execute(w, src)
- if err != nil {
- return errors.New("Failed to execute template: " + err.Error())
- }
- return nil
-}
-
-func usage() {
- fmt.Fprintf(os.Stderr, "usage: mksyscall_windows [flags] [path ...]\n")
- flag.PrintDefaults()
- os.Exit(1)
-}
-
-func main() {
- flag.Usage = usage
- flag.Parse()
- if len(os.Args) <= 1 {
- fmt.Fprintf(os.Stderr, "no files to parse provided\n")
- usage()
- }
- src, err := ParseFiles(os.Args[1:])
- if err != nil {
- log.Fatal(err)
- }
- if err := src.Generate(os.Stdout); err != nil {
- log.Fatal(err)
- }
-}
-
-// TODO: use println instead to print in the following template
-const srcTemplate = `
-
-{{define "main"}}// go build mksyscall_windows.go && ./mksyscall_windows{{range .Files}} {{.}}{{end}}
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-var (
-{{template "dlls" .}}
-{{template "funcnames" .}})
-{{range .Funcs}}{{template "funcbody" .}}{{end}}
-{{end}}
-
-{{/* help functions */}}
-
-{{define "dlls"}}{{range .DLLs}} mod{{.}} = NewLazyDLL("{{.}}.dll")
-{{end}}{{end}}
-
-{{define "funcnames"}}{{range .Funcs}} proc{{.DLLFuncName}} = mod{{.DLLName}}.NewProc("{{.DLLFuncName}}")
-{{end}}{{end}}
-
-{{define "funcbody"}}
-func {{.Name}}({{.ParamList}}) {{if .Rets.List}}{{.Rets.List}} {{end}}{
-{{template "tmpvars" .}} {{template "syscall" .}}
-{{template "seterror" .}}{{template "printtrace" .}} return
-}
-{{end}}
-
-{{define "tmpvars"}}{{range .Params}}{{if .TmpVarCode}} {{.TmpVarCode}}
-{{end}}{{end}}{{end}}
-
-{{define "syscall"}}{{.Rets.SetReturnValuesCode}}{{.Syscall}}(proc{{.DLLFuncName}}.Addr(), {{.ParamCount}}, {{.SyscallParamList}}){{end}}
-
-{{define "seterror"}}{{if .Rets.SetErrorCode}} {{.Rets.SetErrorCode}}
-{{end}}{{end}}
-
-{{define "printtrace"}}{{if .PrintTrace}} print("SYSCALL: {{.Name}}(", {{.ParamPrintList}}") (", {{.Rets.PrintList}}")\n")
-{{end}}{{end}}
-
-`
diff --git a/src/pkg/syscall/mksysctl_openbsd.pl b/src/pkg/syscall/mksysctl_openbsd.pl
deleted file mode 100755
index c2e2ea925..000000000
--- a/src/pkg/syscall/mksysctl_openbsd.pl
+++ /dev/null
@@ -1,257 +0,0 @@
-#!/usr/bin/env perl
-
-# 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.
-
-#
-# Parse the header files for OpenBSD and generate a Go usable sysctl MIB.
-#
-# Build a MIB with each entry being an array containing the level, type and
-# a hash that will contain additional entries if the current entry is a node.
-# We then walk this MIB and create a flattened sysctl name to OID hash.
-#
-
-use strict;
-
-my $debug = 0;
-my %ctls = ();
-
-my @headers = qw (
- sys/sysctl.h
- sys/socket.h
- sys/tty.h
- sys/malloc.h
- sys/mount.h
- sys/namei.h
- sys/sem.h
- sys/shm.h
- sys/vmmeter.h
- uvm/uvm_param.h
- uvm/uvm_swap_encrypt.h
- ddb/db_var.h
- net/if.h
- net/if_pfsync.h
- net/pipex.h
- netinet/in.h
- netinet/icmp_var.h
- netinet/igmp_var.h
- netinet/ip_ah.h
- netinet/ip_carp.h
- netinet/ip_divert.h
- netinet/ip_esp.h
- netinet/ip_ether.h
- netinet/ip_gre.h
- netinet/ip_ipcomp.h
- netinet/ip_ipip.h
- netinet/pim_var.h
- netinet/tcp_var.h
- netinet/udp_var.h
- netinet6/in6.h
- netinet6/ip6_divert.h
- netinet6/pim6_var.h
- netinet/icmp6.h
- netmpls/mpls.h
-);
-
-my @ctls = qw (
- kern
- vm
- fs
- net
- #debug # Special handling required
- hw
- #machdep # Arch specific
- user
- ddb
- #vfs # Special handling required
- fs.posix
- kern.forkstat
- kern.intrcnt
- kern.malloc
- kern.nchstats
- kern.seminfo
- kern.shminfo
- kern.timecounter
- kern.tty
- kern.watchdog
- net.bpf
- net.ifq
- net.inet
- net.inet.ah
- net.inet.carp
- net.inet.divert
- net.inet.esp
- net.inet.etherip
- net.inet.gre
- net.inet.icmp
- net.inet.igmp
- net.inet.ip
- net.inet.ip.ifq
- net.inet.ipcomp
- net.inet.ipip
- net.inet.mobileip
- net.inet.pfsync
- net.inet.pim
- net.inet.tcp
- net.inet.udp
- net.inet6
- net.inet6.divert
- net.inet6.ip6
- net.inet6.icmp6
- net.inet6.pim6
- net.inet6.tcp6
- net.inet6.udp6
- net.mpls
- net.mpls.ifq
- net.key
- net.pflow
- net.pfsync
- net.pipex
- net.rt
- vm.swapencrypt
- #vfsgenctl # Special handling required
-);
-
-# Node name "fixups"
-my %ctl_map = (
- "ipproto" => "net.inet",
- "net.inet.ipproto" => "net.inet",
- "net.inet6.ipv6proto" => "net.inet6",
- "net.inet6.ipv6" => "net.inet6.ip6",
- "net.inet.icmpv6" => "net.inet6.icmp6",
- "net.inet6.divert6" => "net.inet6.divert",
- "net.inet6.tcp6" => "net.inet.tcp",
- "net.inet6.udp6" => "net.inet.udp",
- "mpls" => "net.mpls",
- "swpenc" => "vm.swapencrypt"
-);
-
-# Node mappings
-my %node_map = (
- "net.inet.ip.ifq" => "net.ifq",
- "net.inet.pfsync" => "net.pfsync",
- "net.mpls.ifq" => "net.ifq"
-);
-
-my $ctlname;
-my %mib = ();
-my %sysctl = ();
-my $node;
-
-sub debug() {
- print STDERR "$_[0]\n" if $debug;
-}
-
-# Walk the MIB and build a sysctl name to OID mapping.
-sub build_sysctl() {
- my ($node, $name, $oid) = @_;
- my %node = %{$node};
- my @oid = @{$oid};
-
- foreach my $key (sort keys %node) {
- my @node = @{$node{$key}};
- my $nodename = $name.($name ne '' ? '.' : '').$key;
- my @nodeoid = (@oid, $node[0]);
- if ($node[1] eq 'CTLTYPE_NODE') {
- if (exists $node_map{$nodename}) {
- $node = \%mib;
- $ctlname = $node_map{$nodename};
- foreach my $part (split /\./, $ctlname) {
- $node = \%{@{$$node{$part}}[2]};
- }
- } else {
- $node = $node[2];
- }
- &build_sysctl($node, $nodename, \@nodeoid);
- } elsif ($node[1] ne '') {
- $sysctl{$nodename} = \@nodeoid;
- }
- }
-}
-
-foreach my $ctl (@ctls) {
- $ctls{$ctl} = $ctl;
-}
-
-# Build MIB
-foreach my $header (@headers) {
- &debug("Processing $header...");
- open HEADER, "/usr/include/$header" ||
- print STDERR "Failed to open $header\n";
- while (<HEADER>) {
- if ($_ =~ /^#define\s+(CTL_NAMES)\s+{/ ||
- $_ =~ /^#define\s+(CTL_(.*)_NAMES)\s+{/ ||
- $_ =~ /^#define\s+((.*)CTL_NAMES)\s+{/) {
- if ($1 eq 'CTL_NAMES') {
- # Top level.
- $node = \%mib;
- } else {
- # Node.
- my $nodename = lc($2);
- if ($header =~ /^netinet\//) {
- $ctlname = "net.inet.$nodename";
- } elsif ($header =~ /^netinet6\//) {
- $ctlname = "net.inet6.$nodename";
- } elsif ($header =~ /^net\//) {
- $ctlname = "net.$nodename";
- } else {
- $ctlname = "$nodename";
- $ctlname =~ s/^(fs|net|kern)_/$1\./;
- }
- if (exists $ctl_map{$ctlname}) {
- $ctlname = $ctl_map{$ctlname};
- }
- if (not exists $ctls{$ctlname}) {
- &debug("Ignoring $ctlname...");
- next;
- }
-
- # Walk down from the top of the MIB.
- $node = \%mib;
- foreach my $part (split /\./, $ctlname) {
- if (not exists $$node{$part}) {
- &debug("Missing node $part");
- $$node{$part} = [ 0, '', {} ];
- }
- $node = \%{@{$$node{$part}}[2]};
- }
- }
-
- # Populate current node with entries.
- my $i = -1;
- while (defined($_) && $_ !~ /^}/) {
- $_ = <HEADER>;
- $i++ if $_ =~ /{.*}/;
- next if $_ !~ /{\s+"(\w+)",\s+(CTLTYPE_[A-Z]+)\s+}/;
- $$node{$1} = [ $i, $2, {} ];
- }
- }
- }
- close HEADER;
-}
-
-&build_sysctl(\%mib, "", []);
-
-print <<EOF;
-// mksysctl_openbsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall;
-
-type mibentry struct {
- ctlname string
- ctloid []_C_int
-}
-
-var sysctlMib = []mibentry {
-EOF
-
-foreach my $name (sort keys %sysctl) {
- my @oid = @{$sysctl{$name}};
- print "\t{ \"$name\", []_C_int{ ", join(', ', @oid), " } }, \n";
-}
-
-print <<EOF;
-}
-EOF
diff --git a/src/pkg/syscall/mksysnum_darwin.pl b/src/pkg/syscall/mksysnum_darwin.pl
deleted file mode 100755
index e3470435d..000000000
--- a/src/pkg/syscall/mksysnum_darwin.pl
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env 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 Darwin from sys/syscall.h
-
-use strict;
-
-my $command = "mksysnum_darwin.pl " . join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
-EOF
-
-while(<>){
- if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){
- my $name = $1;
- my $num = $2;
- $name =~ y/a-z/A-Z/;
- print " SYS_$name = $num;"
- }
-}
-
-print <<EOF;
-)
-EOF
diff --git a/src/pkg/syscall/mksysnum_dragonfly.pl b/src/pkg/syscall/mksysnum_dragonfly.pl
deleted file mode 100755
index 3eba3ab3d..000000000
--- a/src/pkg/syscall/mksysnum_dragonfly.pl
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env 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 DragonFly from master list
-# (for example, /usr/src/sys/kern/syscalls.master).
-
-use strict;
-
-my $command = "mksysnum_dragonfly.pl " . join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
-EOF
-
-while(<>){
- if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){
- my $num = $1;
- my $proto = $2;
- my $name = "SYS_$3";
- $name =~ y/a-z/A-Z/;
-
- # There are multiple entries for enosys and nosys, so comment them out.
- if($name =~ /^SYS_E?NOSYS$/){
- $name = "// $name";
- }
- if($name eq 'SYS_SYS_EXIT'){
- $name = 'SYS_EXIT';
- }
-
- print " $name = $num; // $proto\n";
- }
-}
-
-print <<EOF;
-)
-EOF
diff --git a/src/pkg/syscall/mksysnum_freebsd.pl b/src/pkg/syscall/mksysnum_freebsd.pl
deleted file mode 100755
index cd675780b..000000000
--- a/src/pkg/syscall/mksysnum_freebsd.pl
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env 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 FreeBSD from master list
-# (for example, /usr/src/sys/kern/syscalls.master).
-
-use strict;
-
-my $command = "mksysnum_freebsd.pl " . join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
-EOF
-
-while(<>){
- if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){
- my $num = $1;
- my $proto = $2;
- my $name = "SYS_$3";
- $name =~ y/a-z/A-Z/;
-
- # There are multiple entries for enosys and nosys, so comment them out.
- if($name =~ /^SYS_E?NOSYS$/){
- $name = "// $name";
- }
- if($name eq 'SYS_SYS_EXIT'){
- $name = 'SYS_EXIT';
- }
- if($name =~ /^SYS_CAP_+/ || $name =~ /^SYS___CAP_+/){
- next
- }
-
- print " $name = $num; // $proto\n";
-
- # We keep Capsicum syscall numbers for FreeBSD
- # 9-STABLE here because we are not sure whether they
- # are mature and stable.
- if($num == 513){
- print " SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }\n";
- print " SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \\\n";
- print " SYS_CAP_ENTER = 516 // { int cap_enter(void); }\n";
- print " SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }\n";
- }
- }
-}
-
-print <<EOF;
-)
-EOF
diff --git a/src/pkg/syscall/mksysnum_linux.pl b/src/pkg/syscall/mksysnum_linux.pl
deleted file mode 100755
index c7e5cf73a..000000000
--- a/src/pkg/syscall/mksysnum_linux.pl
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env 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.
-
-use strict;
-
-my $command = "mksysnum_linux.pl ". join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const(
-EOF
-
-sub fmt {
- my ($name, $num) = @_;
- $name =~ y/a-z/A-Z/;
- print " SYS_$name = $num;\n";
-}
-
-my $prev;
-while(<>){
- if(/^#define __NR_(\w+)\s+([0-9]+)/){
- $prev = $2;
- fmt($1, $2);
- }
- elsif(/^#define __NR_(\w+)\s+\(\w+\+\s*([0-9]+)\)/){
- fmt($1, $prev+$2)
- }
-}
-
-print <<EOF;
-)
-EOF
diff --git a/src/pkg/syscall/mksysnum_netbsd.pl b/src/pkg/syscall/mksysnum_netbsd.pl
deleted file mode 100755
index f1534ed58..000000000
--- a/src/pkg/syscall/mksysnum_netbsd.pl
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env 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
diff --git a/src/pkg/syscall/mksysnum_openbsd.pl b/src/pkg/syscall/mksysnum_openbsd.pl
deleted file mode 100755
index ad1ccc12a..000000000
--- a/src/pkg/syscall/mksysnum_openbsd.pl
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env 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_openbsd.pl " . join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
-EOF
-
-while(<>){
- if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){
- my $num = $1;
- my $proto = $3;
- my $name = $4;
- $name =~ y/a-z/A-Z/;
-
- # There are multiple entries for enosys and nosys, so comment them out.
- if($name =~ /^SYS_E?NOSYS$/){
- $name = "// $name";
- }
- if($name eq 'SYS_SYS_EXIT'){
- $name = 'SYS_EXIT';
- }
-
- print " $name = $num; // $proto\n";
- }
-}
-
-print <<EOF;
-)
-EOF
diff --git a/src/pkg/syscall/mksysnum_plan9.sh b/src/pkg/syscall/mksysnum_plan9.sh
deleted file mode 100755
index fc619f090..000000000
--- a/src/pkg/syscall/mksysnum_plan9.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-# 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.# 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.
-
-COMMAND="mksysnum_plan9.sh $@"
-
-cat <<EOF
-// $COMMAND
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const(
-EOF
-
-SP='[ ]' # space or tab
-sed "s/^#define${SP}\\([A-Z0-9_][A-Z0-9_]*\\)${SP}${SP}*\\([0-9][0-9]*\\)/SYS_\\1=\\2/g" \
- < $1 | grep -v SYS__
-
-cat <<EOF
-)
-EOF
diff --git a/src/pkg/syscall/mmap_unix_test.go b/src/pkg/syscall/mmap_unix_test.go
deleted file mode 100644
index 01f778302..000000000
--- a/src/pkg/syscall/mmap_unix_test.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd
-
-package syscall_test
-
-import (
- "syscall"
- "testing"
-)
-
-func TestMmap(t *testing.T) {
- b, err := syscall.Mmap(-1, 0, syscall.Getpagesize(), syscall.PROT_NONE, syscall.MAP_ANON|syscall.MAP_PRIVATE)
- if err != nil {
- t.Fatalf("Mmap: %v", err)
- }
- if err := syscall.Munmap(b); err != nil {
- t.Fatalf("Munmap: %v", err)
- }
-}
diff --git a/src/pkg/syscall/net_nacl.go b/src/pkg/syscall/net_nacl.go
deleted file mode 100644
index b9488f48d..000000000
--- a/src/pkg/syscall/net_nacl.go
+++ /dev/null
@@ -1,912 +0,0 @@
-// Copyright 2013 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.
-
-// A simulated network for use within NaCl.
-// The simulation is not particularly tied to NaCl,
-// but other systems have real networks.
-
-package syscall
-
-import (
- "sync"
- "sync/atomic"
-)
-
-// Interface to timers implemented in package runtime.
-// Must be in sync with ../runtime/runtime.h:/^struct.Timer$
-// Really for use by package time, but we cannot import time here.
-
-type runtimeTimer struct {
- i int32
- when int64
- period int64
- f func(int64, interface{}) // NOTE: must not be closure
- arg interface{}
-}
-
-func startTimer(*runtimeTimer)
-func stopTimer(*runtimeTimer) bool
-
-type timer struct {
- expired bool
- q *queue
- r runtimeTimer
-}
-
-func (t *timer) start(q *queue, deadline int64) {
- if deadline == 0 {
- return
- }
- t.q = q
- t.r.when = deadline
- t.r.f = timerExpired
- t.r.arg = t
- startTimer(&t.r)
-}
-
-func (t *timer) stop() {
- stopTimer(&t.r)
-}
-
-func timerExpired(now int64, i interface{}) {
- t := i.(*timer)
- go func() {
- t.q.Lock()
- defer t.q.Unlock()
- t.expired = true
- t.q.canRead.Broadcast()
- t.q.canWrite.Broadcast()
- }()
-}
-
-// Network constants and data structures. These match the traditional values.
-
-const (
- AF_UNSPEC = iota
- AF_UNIX
- AF_INET
- AF_INET6
-)
-
-const (
- SHUT_RD = iota
- SHUT_WR
- SHUT_RDWR
-)
-
-const (
- SOCK_STREAM = 1 + iota
- SOCK_DGRAM
- SOCK_RAW
- SOCK_SEQPACKET
-)
-
-const (
- IPPROTO_IP = 0
- IPPROTO_IPV4 = 4
- IPPROTO_IPV6 = 0x29
- IPPROTO_TCP = 6
- IPPROTO_UDP = 0x11
-)
-
-// Misc constants expected by package net but not supported.
-const (
- _ = iota
- SOL_SOCKET
- SO_TYPE
- NET_RT_IFLIST
- IFNAMSIZ
- IFF_UP
- IFF_BROADCAST
- IFF_LOOPBACK
- IFF_POINTOPOINT
- IFF_MULTICAST
- IPV6_V6ONLY
- SOMAXCONN
- F_DUPFD_CLOEXEC
- SO_BROADCAST
- SO_REUSEADDR
- SO_REUSEPORT
- SO_RCVBUF
- SO_SNDBUF
- SO_KEEPALIVE
- SO_LINGER
- SO_ERROR
- IP_PORTRANGE
- IP_PORTRANGE_DEFAULT
- IP_PORTRANGE_LOW
- IP_PORTRANGE_HIGH
- IP_MULTICAST_IF
- IP_MULTICAST_LOOP
- IP_ADD_MEMBERSHIP
- IPV6_PORTRANGE
- IPV6_PORTRANGE_DEFAULT
- IPV6_PORTRANGE_LOW
- IPV6_PORTRANGE_HIGH
- IPV6_MULTICAST_IF
- IPV6_MULTICAST_LOOP
- IPV6_JOIN_GROUP
- TCP_NODELAY
- TCP_KEEPINTVL
- TCP_KEEPIDLE
-
- SYS_FCNTL = 500 // unsupported
-)
-
-var SocketDisableIPv6 bool
-
-// A Sockaddr is one of the SockaddrXxx structs.
-type Sockaddr interface {
- // copy returns a copy of the underlying data.
- copy() Sockaddr
-
- // key returns the value of the underlying data,
- // for comparison as a map key.
- key() interface{}
-}
-
-type SockaddrInet4 struct {
- Port int
- Addr [4]byte
-}
-
-func (sa *SockaddrInet4) copy() Sockaddr {
- sa1 := *sa
- return &sa1
-}
-
-func (sa *SockaddrInet4) key() interface{} { return *sa }
-
-type SockaddrInet6 struct {
- Port int
- ZoneId uint32
- Addr [16]byte
-}
-
-func (sa *SockaddrInet6) copy() Sockaddr {
- sa1 := *sa
- return &sa1
-}
-
-func (sa *SockaddrInet6) key() interface{} { return *sa }
-
-type SockaddrUnix struct {
- Name string
-}
-
-func (sa *SockaddrUnix) copy() Sockaddr {
- sa1 := *sa
- return &sa1
-}
-
-func (sa *SockaddrUnix) key() interface{} { return *sa }
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
-}
-
-func (sa *SockaddrDatalink) copy() Sockaddr {
- sa1 := *sa
- return &sa1
-}
-
-func (sa *SockaddrDatalink) key() interface{} { return *sa }
-
-// RoutingMessage represents a routing message.
-type RoutingMessage interface {
- unimplemented()
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-// A queue is the bookkeeping for a synchronized buffered queue.
-// We do not use channels because we need to be able to handle
-// writes after and during close, and because a chan byte would
-// require too many send and receive operations in real use.
-type queue struct {
- sync.Mutex
- canRead sync.Cond
- canWrite sync.Cond
- r int // total read index
- w int // total write index
- m int // index mask
- closed bool
-}
-
-func (q *queue) init(size int) {
- if size&(size-1) != 0 {
- panic("invalid queue size - must be power of two")
- }
- q.canRead.L = &q.Mutex
- q.canWrite.L = &q.Mutex
- q.m = size - 1
-}
-
-func past(deadline int64) bool {
- sec, nsec := now()
- return deadline > 0 && deadline < sec*1e9+int64(nsec)
-}
-
-func (q *queue) waitRead(n int, deadline int64) (int, error) {
- if past(deadline) {
- return 0, EAGAIN
- }
- var t timer
- t.start(q, deadline)
- for q.w-q.r == 0 && !q.closed && !t.expired {
- q.canRead.Wait()
- }
- t.stop()
- m := q.w - q.r
- if m == 0 && t.expired {
- return 0, EAGAIN
- }
- if m > n {
- m = n
- q.canRead.Signal() // wake up next reader too
- }
- q.canWrite.Signal()
- return m, nil
-}
-
-func (q *queue) waitWrite(n int, deadline int64) (int, error) {
- if past(deadline) {
- return 0, EAGAIN
- }
- var t timer
- t.start(q, deadline)
- for q.w-q.r > q.m && !q.closed && !t.expired {
- q.canWrite.Wait()
- }
- t.stop()
- m := q.m + 1 - (q.w - q.r)
- if m == 0 && t.expired {
- return 0, EAGAIN
- }
- if m == 0 {
- return 0, EAGAIN
- }
- if m > n {
- m = n
- q.canWrite.Signal() // wake up next writer too
- }
- q.canRead.Signal()
- return m, nil
-}
-
-func (q *queue) close() {
- q.Lock()
- defer q.Unlock()
- q.closed = true
- q.canRead.Broadcast()
- q.canWrite.Broadcast()
-}
-
-// A byteq is a byte queue.
-type byteq struct {
- queue
- data []byte
-}
-
-func newByteq() *byteq {
- q := &byteq{
- data: make([]byte, 4096),
- }
- q.init(len(q.data))
- return q
-}
-
-func (q *byteq) read(b []byte, deadline int64) (int, error) {
- q.Lock()
- defer q.Unlock()
- n, err := q.waitRead(len(b), deadline)
- if err != nil {
- return 0, err
- }
- b = b[:n]
- for len(b) > 0 {
- m := copy(b, q.data[q.r&q.m:])
- q.r += m
- b = b[m:]
- }
- return n, nil
-}
-
-func (q *byteq) write(b []byte, deadline int64) (n int, err error) {
- q.Lock()
- defer q.Unlock()
- for n < len(b) {
- nn, err := q.waitWrite(len(b[n:]), deadline)
- if err != nil {
- return n, err
- }
- bb := b[n : n+nn]
- n += nn
- for len(bb) > 0 {
- m := copy(q.data[q.w&q.m:], bb)
- q.w += m
- bb = bb[m:]
- }
- }
- return n, nil
-}
-
-// A msgq is a queue of messages.
-type msgq struct {
- queue
- data []interface{}
-}
-
-func newMsgq() *msgq {
- q := &msgq{
- data: make([]interface{}, 32),
- }
- q.init(len(q.data))
- return q
-}
-
-func (q *msgq) read(deadline int64) (interface{}, error) {
- q.Lock()
- defer q.Unlock()
- n, err := q.waitRead(1, deadline)
- if err != nil {
- return nil, err
- }
- if n == 0 {
- return nil, nil
- }
- m := q.data[q.r&q.m]
- q.r++
- return m, nil
-}
-
-func (q *msgq) write(m interface{}, deadline int64) error {
- q.Lock()
- defer q.Unlock()
- _, err := q.waitWrite(1, deadline)
- if err != nil {
- return err
- }
- q.data[q.w&q.m] = m
- q.w++
- return nil
-}
-
-// An addr is a sequence of bytes uniquely identifying a network address.
-// It is not human-readable.
-type addr string
-
-// A conn is one side of a stream-based network connection.
-// That is, a stream-based network connection is a pair of cross-connected conns.
-type conn struct {
- rd *byteq
- wr *byteq
- local addr
- remote addr
-}
-
-// A pktconn is one side of a packet-based network connection.
-// That is, a packet-based network connection is a pair of cross-connected pktconns.
-type pktconn struct {
- rd *msgq
- wr *msgq
- local addr
- remote addr
-}
-
-// A listener accepts incoming stream-based network connections.
-type listener struct {
- rd *msgq
- local addr
-}
-
-// A netFile is an open network file.
-type netFile struct {
- defaultFileImpl
- proto *netproto
- sotype int
- listener *msgq
- packet *msgq
- rd *byteq
- wr *byteq
- rddeadline int64
- wrdeadline int64
- addr Sockaddr
- raddr Sockaddr
-}
-
-// A netAddr is a network address in the global listener map.
-// All the fields must have defined == operations.
-type netAddr struct {
- proto *netproto
- sotype int
- addr interface{}
-}
-
-// net records the state of the network.
-// It maps a network address to the listener on that address.
-var net = struct {
- sync.Mutex
- listener map[netAddr]*netFile
-}{
- listener: make(map[netAddr]*netFile),
-}
-
-// TODO(rsc): Some day, do a better job with port allocation.
-// For playground programs, incrementing is fine.
-var nextport = 2
-
-// A netproto contains protocol-specific functionality
-// (one for AF_INET, one for AF_INET6 and so on).
-// It is a struct instead of an interface because the
-// implementation needs no state, and I expect to
-// add some data fields at some point.
-type netproto struct {
- bind func(*netFile, Sockaddr) error
-}
-
-var netprotoAF_INET = &netproto{
- bind: func(f *netFile, sa Sockaddr) error {
- if sa == nil {
- f.addr = &SockaddrInet4{
- Port: nextport,
- Addr: [4]byte{127, 0, 0, 1},
- }
- nextport++
- return nil
- }
- addr, ok := sa.(*SockaddrInet4)
- if !ok {
- return EINVAL
- }
- addr = addr.copy().(*SockaddrInet4)
- if addr.Port == 0 {
- addr.Port = nextport
- nextport++
- }
- f.addr = addr
- return nil
- },
-}
-
-var netprotos = map[int]*netproto{
- AF_INET: netprotoAF_INET,
-}
-
-// These functions implement the usual BSD socket operations.
-
-func (f *netFile) bind(sa Sockaddr) error {
- if f.addr != nil {
- return EISCONN
- }
- if err := f.proto.bind(f, sa); err != nil {
- return err
- }
- if f.sotype == SOCK_DGRAM {
- _, ok := net.listener[netAddr{f.proto, f.sotype, f.addr.key()}]
- if ok {
- f.addr = nil
- return EADDRINUSE
- }
- net.listener[netAddr{f.proto, f.sotype, f.addr.key()}] = f
- f.packet = newMsgq()
- }
- return nil
-}
-
-func (f *netFile) listen(backlog int) error {
- net.Lock()
- defer net.Unlock()
- if f.listener != nil {
- return EINVAL
- }
- _, ok := net.listener[netAddr{f.proto, f.sotype, f.addr.key()}]
- if ok {
- return EADDRINUSE
- }
- net.listener[netAddr{f.proto, f.sotype, f.addr.key()}] = f
- f.listener = newMsgq()
- return nil
-}
-
-func (f *netFile) accept() (fd int, sa Sockaddr, err error) {
- msg, err := f.listener.read(f.readDeadline())
- if err != nil {
- return -1, nil, err
- }
- newf, ok := msg.(*netFile)
- if !ok {
- // must be eof
- return -1, nil, EAGAIN
- }
- return newFD(newf), newf.raddr.copy(), nil
-}
-
-func (f *netFile) connect(sa Sockaddr) error {
- if past(f.writeDeadline()) {
- return EAGAIN
- }
- if f.addr == nil {
- if err := f.bind(nil); err != nil {
- return err
- }
- }
- net.Lock()
- if sa == nil {
- net.Unlock()
- return EINVAL
- }
- sa = sa.copy()
- if f.raddr != nil {
- net.Unlock()
- return EISCONN
- }
- if f.sotype == SOCK_DGRAM {
- net.Unlock()
- f.raddr = sa
- return nil
- }
- if f.listener != nil {
- net.Unlock()
- return EISCONN
- }
- l, ok := net.listener[netAddr{f.proto, f.sotype, sa.key()}]
- if !ok {
- net.Unlock()
- return ECONNREFUSED
- }
- f.raddr = sa
- f.rd = newByteq()
- f.wr = newByteq()
- newf := &netFile{
- proto: f.proto,
- sotype: f.sotype,
- addr: f.raddr,
- raddr: f.addr,
- rd: f.wr,
- wr: f.rd,
- }
- net.Unlock()
- l.listener.write(newf, f.writeDeadline())
- return nil
-}
-
-func (f *netFile) read(b []byte) (int, error) {
- if f.rd == nil {
- if f.raddr != nil {
- n, _, err := f.recvfrom(b, 0)
- return n, err
- }
- return 0, ENOTCONN
- }
- return f.rd.read(b, f.readDeadline())
-}
-
-func (f *netFile) write(b []byte) (int, error) {
- if f.wr == nil {
- if f.raddr != nil {
- err := f.sendto(b, 0, f.raddr)
- var n int
- if err == nil {
- n = len(b)
- }
- return n, err
- }
- return 0, ENOTCONN
- }
- return f.wr.write(b, f.writeDeadline())
-}
-
-type pktmsg struct {
- buf []byte
- addr Sockaddr
-}
-
-func (f *netFile) recvfrom(p []byte, flags int) (n int, from Sockaddr, err error) {
- if f.sotype != SOCK_DGRAM {
- return 0, nil, EINVAL
- }
- if f.packet == nil {
- return 0, nil, ENOTCONN
- }
- msg1, err := f.packet.read(f.readDeadline())
- if err != nil {
- return 0, nil, err
- }
- msg, ok := msg1.(*pktmsg)
- if !ok {
- return 0, nil, EAGAIN
- }
- return copy(p, msg.buf), msg.addr, nil
-}
-
-func (f *netFile) sendto(p []byte, flags int, to Sockaddr) error {
- if f.sotype != SOCK_DGRAM {
- return EINVAL
- }
- if f.packet == nil {
- if err := f.bind(nil); err != nil {
- return err
- }
- }
- net.Lock()
- if to == nil {
- net.Unlock()
- return EINVAL
- }
- to = to.copy()
- l, ok := net.listener[netAddr{f.proto, f.sotype, to.key()}]
- if !ok || l.packet == nil {
- net.Unlock()
- return ECONNREFUSED
- }
- net.Unlock()
- msg := &pktmsg{
- buf: make([]byte, len(p)),
- addr: f.addr,
- }
- copy(msg.buf, p)
- l.packet.write(msg, f.writeDeadline())
- return nil
-}
-
-func (f *netFile) close() error {
- if f.listener != nil {
- f.listener.close()
- }
- if f.packet != nil {
- f.packet.close()
- }
- if f.rd != nil {
- f.rd.close()
- }
- if f.wr != nil {
- f.wr.close()
- }
- return nil
-}
-
-func fdToNetFile(fd int) (*netFile, error) {
- f, err := fdToFile(fd)
- if err != nil {
- return nil, err
- }
- impl := f.impl
- netf, ok := impl.(*netFile)
- if !ok {
- return nil, EINVAL
- }
- return netf, nil
-}
-
-func Socket(proto, sotype, unused int) (fd int, err error) {
- p := netprotos[proto]
- if p == nil {
- return -1, EPROTONOSUPPORT
- }
- if sotype != SOCK_STREAM && sotype != SOCK_DGRAM {
- return -1, ESOCKTNOSUPPORT
- }
- f := &netFile{
- proto: p,
- sotype: sotype,
- }
- return newFD(f), nil
-}
-
-func Bind(fd int, sa Sockaddr) error {
- f, err := fdToNetFile(fd)
- if err != nil {
- return err
- }
- return f.bind(sa)
-}
-
-func StopIO(fd int) error {
- f, err := fdToNetFile(fd)
- if err != nil {
- return err
- }
- f.close()
- return nil
-}
-
-func Listen(fd int, backlog int) error {
- f, err := fdToNetFile(fd)
- if err != nil {
- return err
- }
- return f.listen(backlog)
-}
-
-func Accept(fd int) (newfd int, sa Sockaddr, err error) {
- f, err := fdToNetFile(fd)
- if err != nil {
- return 0, nil, err
- }
- return f.accept()
-}
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
- f, err := fdToNetFile(fd)
- if err != nil {
- return nil, err
- }
- if f.addr == nil {
- return nil, ENOTCONN
- }
- return f.addr.copy(), nil
-}
-
-func Getpeername(fd int) (sa Sockaddr, err error) {
- f, err := fdToNetFile(fd)
- if err != nil {
- return nil, err
- }
- if f.raddr == nil {
- return nil, ENOTCONN
- }
- return f.raddr.copy(), nil
-}
-
-func Connect(fd int, sa Sockaddr) error {
- f, err := fdToNetFile(fd)
- if err != nil {
- return err
- }
- return f.connect(sa)
-}
-
-func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
- f, err := fdToNetFile(fd)
- if err != nil {
- return 0, nil, err
- }
- return f.recvfrom(p, flags)
-}
-
-func Sendto(fd int, p []byte, flags int, to Sockaddr) error {
- f, err := fdToNetFile(fd)
- if err != nil {
- return err
- }
- return f.sendto(p, flags, to)
-}
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn, recvflags int, from Sockaddr, err error) {
- f, err := fdToNetFile(fd)
- if err != nil {
- return
- }
- n, from, err = f.recvfrom(p, flags)
- return
-}
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) error {
- _, err := SendmsgN(fd, p, oob, to, flags)
- return err
-}
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- f, err := fdToNetFile(fd)
- if err != nil {
- return 0, err
- }
- switch f.sotype {
- case SOCK_STREAM:
- n, err = f.write(p)
- case SOCK_DGRAM:
- n = len(p)
- err = f.sendto(p, flags, to)
- }
- if err != nil {
- return 0, err
- }
- return n, nil
-}
-
-func GetsockoptInt(fd, level, opt int) (value int, err error) {
- f, err := fdToNetFile(fd)
- if err != nil {
- return 0, err
- }
- switch {
- case level == SOL_SOCKET && opt == SO_TYPE:
- return f.sotype, nil
- }
- return 0, ENOTSUP
-}
-
-func SetsockoptInt(fd, level, opt int, value int) error {
- return nil
-}
-
-func SetsockoptByte(fd, level, opt int, value byte) error {
- _, err := fdToNetFile(fd)
- if err != nil {
- return err
- }
- return ENOTSUP
-}
-
-func SetsockoptLinger(fd, level, opt int, l *Linger) error {
- return nil
-}
-
-func SetReadDeadline(fd int, t int64) error {
- f, err := fdToNetFile(fd)
- if err != nil {
- return err
- }
- atomic.StoreInt64(&f.rddeadline, t)
- return nil
-}
-
-func (f *netFile) readDeadline() int64 {
- return atomic.LoadInt64(&f.rddeadline)
-}
-
-func SetWriteDeadline(fd int, t int64) error {
- f, err := fdToNetFile(fd)
- if err != nil {
- return err
- }
- atomic.StoreInt64(&f.wrdeadline, t)
- return nil
-}
-
-func (f *netFile) writeDeadline() int64 {
- return atomic.LoadInt64(&f.wrdeadline)
-}
-
-func Shutdown(fd int, how int) error {
- f, err := fdToNetFile(fd)
- if err != nil {
- return err
- }
- switch how {
- case SHUT_RD:
- f.rd.close()
- case SHUT_WR:
- f.wr.close()
- case SHUT_RDWR:
- f.rd.close()
- f.wr.close()
- }
- return nil
-}
-
-func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error { panic("SetsockoptICMPv") }
-func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) error { panic("SetsockoptIPMreq") }
-func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) error { panic("SetsockoptIPv") }
-func SetsockoptInet4Addr(fd, level, opt int, value [4]byte) error { panic("SetsockoptInet") }
-func SetsockoptString(fd, level, opt int, s string) error { panic("SetsockoptString") }
-func SetsockoptTimeval(fd, level, opt int, tv *Timeval) error { panic("SetsockoptTimeval") }
-func Socketpair(domain, typ, proto int) (fd [2]int, err error) { panic("Socketpair") }
-
-func SetNonblock(fd int, nonblocking bool) error { return nil }
diff --git a/src/pkg/syscall/netlink_linux.go b/src/pkg/syscall/netlink_linux.go
deleted file mode 100644
index 49550ea2f..000000000
--- a/src/pkg/syscall/netlink_linux.go
+++ /dev/null
@@ -1,177 +0,0 @@
-// 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.
-
-// Netlink sockets and messages
-
-package syscall
-
-import "unsafe"
-
-// Round the length of a netlink message up to align it properly.
-func nlmAlignOf(msglen int) int {
- return (msglen + NLMSG_ALIGNTO - 1) & ^(NLMSG_ALIGNTO - 1)
-}
-
-// Round the length of a netlink route attribute up to align it
-// properly.
-func rtaAlignOf(attrlen int) int {
- return (attrlen + RTA_ALIGNTO - 1) & ^(RTA_ALIGNTO - 1)
-}
-
-// NetlinkRouteRequest represents a request message to receive routing
-// and link states from the kernel.
-type NetlinkRouteRequest struct {
- Header NlMsghdr
- Data RtGenmsg
-}
-
-func (rr *NetlinkRouteRequest) toWireFormat() []byte {
- b := make([]byte, rr.Header.Len)
- *(*uint32)(unsafe.Pointer(&b[0:4][0])) = rr.Header.Len
- *(*uint16)(unsafe.Pointer(&b[4:6][0])) = rr.Header.Type
- *(*uint16)(unsafe.Pointer(&b[6:8][0])) = rr.Header.Flags
- *(*uint32)(unsafe.Pointer(&b[8:12][0])) = rr.Header.Seq
- *(*uint32)(unsafe.Pointer(&b[12:16][0])) = rr.Header.Pid
- b[16] = byte(rr.Data.Family)
- return b
-}
-
-func newNetlinkRouteRequest(proto, seq, family int) []byte {
- rr := &NetlinkRouteRequest{}
- rr.Header.Len = uint32(NLMSG_HDRLEN + SizeofRtGenmsg)
- rr.Header.Type = uint16(proto)
- rr.Header.Flags = NLM_F_DUMP | NLM_F_REQUEST
- rr.Header.Seq = uint32(seq)
- rr.Data.Family = uint8(family)
- return rr.toWireFormat()
-}
-
-// NetlinkRIB returns routing information base, as known as RIB, which
-// consists of network facility information, states and parameters.
-func NetlinkRIB(proto, family int) ([]byte, error) {
- s, err := Socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)
- if err != nil {
- return nil, err
- }
- defer Close(s)
- lsa := &SockaddrNetlink{Family: AF_NETLINK}
- if err := Bind(s, lsa); err != nil {
- return nil, err
- }
- wb := newNetlinkRouteRequest(proto, 1, family)
- if err := Sendto(s, wb, 0, lsa); err != nil {
- return nil, err
- }
- var tab []byte
-done:
- for {
- rb := make([]byte, Getpagesize())
- nr, _, err := Recvfrom(s, rb, 0)
- if err != nil {
- return nil, err
- }
- if nr < NLMSG_HDRLEN {
- return nil, EINVAL
- }
- rb = rb[:nr]
- tab = append(tab, rb...)
- msgs, err := ParseNetlinkMessage(rb)
- if err != nil {
- return nil, err
- }
- for _, m := range msgs {
- lsa, err := Getsockname(s)
- if err != nil {
- return nil, err
- }
- switch v := lsa.(type) {
- case *SockaddrNetlink:
- if m.Header.Seq != 1 || m.Header.Pid != v.Pid {
- return nil, EINVAL
- }
- default:
- return nil, EINVAL
- }
- if m.Header.Type == NLMSG_DONE {
- break done
- }
- if m.Header.Type == NLMSG_ERROR {
- return nil, EINVAL
- }
- }
- }
- return tab, nil
-}
-
-// NetlinkMessage represents a netlink message.
-type NetlinkMessage struct {
- Header NlMsghdr
- Data []byte
-}
-
-// ParseNetlinkMessage parses b as an array of netlink messages and
-// returns the slice containing the NetlinkMessage structures.
-func ParseNetlinkMessage(b []byte) ([]NetlinkMessage, error) {
- var msgs []NetlinkMessage
- for len(b) >= NLMSG_HDRLEN {
- h, dbuf, dlen, err := netlinkMessageHeaderAndData(b)
- if err != nil {
- return nil, err
- }
- m := NetlinkMessage{Header: *h, Data: dbuf[:int(h.Len)-NLMSG_HDRLEN]}
- msgs = append(msgs, m)
- b = b[dlen:]
- }
- return msgs, nil
-}
-
-func netlinkMessageHeaderAndData(b []byte) (*NlMsghdr, []byte, int, error) {
- h := (*NlMsghdr)(unsafe.Pointer(&b[0]))
- if int(h.Len) < NLMSG_HDRLEN || int(h.Len) > len(b) {
- return nil, nil, 0, EINVAL
- }
- return h, b[NLMSG_HDRLEN:], nlmAlignOf(int(h.Len)), nil
-}
-
-// NetlinkRouteAttr represents a netlink route attribute.
-type NetlinkRouteAttr struct {
- Attr RtAttr
- Value []byte
-}
-
-// ParseNetlinkRouteAttr parses m's payload as an array of netlink
-// route attributes and returns the slice containing the
-// NetlinkRouteAttr structures.
-func ParseNetlinkRouteAttr(m *NetlinkMessage) ([]NetlinkRouteAttr, error) {
- var b []byte
- switch m.Header.Type {
- case RTM_NEWLINK, RTM_DELLINK:
- b = m.Data[SizeofIfInfomsg:]
- case RTM_NEWADDR, RTM_DELADDR:
- b = m.Data[SizeofIfAddrmsg:]
- case RTM_NEWROUTE, RTM_DELROUTE:
- b = m.Data[SizeofRtMsg:]
- default:
- return nil, EINVAL
- }
- var attrs []NetlinkRouteAttr
- for len(b) >= SizeofRtAttr {
- a, vbuf, alen, err := netlinkRouteAttrAndValue(b)
- if err != nil {
- return nil, err
- }
- ra := NetlinkRouteAttr{Attr: *a, Value: vbuf[:int(a.Len)-SizeofRtAttr]}
- attrs = append(attrs, ra)
- b = b[alen:]
- }
- return attrs, nil
-}
-
-func netlinkRouteAttrAndValue(b []byte) (*RtAttr, []byte, int, error) {
- a := (*RtAttr)(unsafe.Pointer(&b[0]))
- if int(a.Len) < SizeofRtAttr || int(a.Len) > len(b) {
- return nil, nil, 0, EINVAL
- }
- return a, b[SizeofRtAttr:], rtaAlignOf(int(a.Len)), nil
-}
diff --git a/src/pkg/syscall/race.go b/src/pkg/syscall/race.go
deleted file mode 100644
index e69c1119a..000000000
--- a/src/pkg/syscall/race.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build race
-
-package syscall
-
-import (
- "runtime"
- "unsafe"
-)
-
-const raceenabled = true
-
-func raceAcquire(addr unsafe.Pointer) {
- runtime.RaceAcquire(addr)
-}
-
-func raceReleaseMerge(addr unsafe.Pointer) {
- runtime.RaceReleaseMerge(addr)
-}
-
-func raceReadRange(addr unsafe.Pointer, len int) {
- runtime.RaceReadRange(addr, len)
-}
-
-func raceWriteRange(addr unsafe.Pointer, len int) {
- runtime.RaceWriteRange(addr, len)
-}
diff --git a/src/pkg/syscall/race0.go b/src/pkg/syscall/race0.go
deleted file mode 100644
index b02f882fd..000000000
--- a/src/pkg/syscall/race0.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !race
-
-package syscall
-
-import (
- "unsafe"
-)
-
-const raceenabled = false
-
-func raceAcquire(addr unsafe.Pointer) {
-}
-
-func raceReleaseMerge(addr unsafe.Pointer) {
-}
-
-func raceReadRange(addr unsafe.Pointer, len int) {
-}
-
-func raceWriteRange(addr unsafe.Pointer, len int) {
-}
diff --git a/src/pkg/syscall/route_bsd.go b/src/pkg/syscall/route_bsd.go
deleted file mode 100644
index 48af58745..000000000
--- a/src/pkg/syscall/route_bsd.go
+++ /dev/null
@@ -1,224 +0,0 @@
-// 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.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-// Routing sockets and messages
-
-package syscall
-
-import "unsafe"
-
-// Round the length of a raw sockaddr up to align it properly.
-func rsaAlignOf(salen int) int {
- salign := sizeofPtr
- // NOTE: It seems like 64-bit Darwin kernel still requires
- // 32-bit aligned access to BSD subsystem. Also NetBSD 6
- // kernel and beyond require 64-bit aligned access to routing
- // facilities.
- if darwin64Bit {
- salign = 4
- } else if netbsd32Bit {
- salign = 8
- }
- if salen == 0 {
- return salign
- }
- return (salen + salign - 1) & ^(salign - 1)
-}
-
-// RouteRIB returns routing information base, as known as RIB,
-// which consists of network facility information, states and
-// parameters.
-func RouteRIB(facility, param int) ([]byte, error) {
- mib := []_C_int{CTL_NET, AF_ROUTE, 0, 0, _C_int(facility), _C_int(param)}
- // Find size.
- n := uintptr(0)
- if err := sysctl(mib, nil, &n, nil, 0); err != nil {
- return nil, err
- }
- if n == 0 {
- return nil, nil
- }
- tab := make([]byte, n)
- if err := sysctl(mib, &tab[0], &n, nil, 0); err != nil {
- return nil, err
- }
- return tab[:n], nil
-}
-
-// RoutingMessage represents a routing message.
-type RoutingMessage interface {
- sockaddr() []Sockaddr
-}
-
-const anyMessageLen = int(unsafe.Sizeof(anyMessage{}))
-
-type anyMessage struct {
- Msglen uint16
- Version uint8
- Type uint8
-}
-
-// RouteMessage represents a routing message containing routing
-// entries.
-type RouteMessage struct {
- Header RtMsghdr
- Data []byte
-}
-
-const rtaRtMask = RTA_DST | RTA_GATEWAY | RTA_NETMASK | RTA_GENMASK
-
-func (m *RouteMessage) sockaddr() []Sockaddr {
- var (
- af int
- sas [4]Sockaddr
- )
- b := m.Data[:]
- for i := uint(0); i < RTAX_MAX; i++ {
- if m.Header.Addrs&rtaRtMask&(1<<i) == 0 {
- continue
- }
- rsa := (*RawSockaddr)(unsafe.Pointer(&b[0]))
- switch i {
- case RTAX_DST, RTAX_GATEWAY:
- sa, err := anyToSockaddr((*RawSockaddrAny)(unsafe.Pointer(rsa)))
- if err != nil {
- return nil
- }
- if i == RTAX_DST {
- af = int(rsa.Family)
- }
- sas[i] = sa
- case RTAX_NETMASK, RTAX_GENMASK:
- switch af {
- case AF_INET:
- rsa4 := (*RawSockaddrInet4)(unsafe.Pointer(&b[0]))
- sa := new(SockaddrInet4)
- for j := 0; rsa4.Len > 0 && j < int(rsa4.Len)-int(unsafe.Offsetof(rsa4.Addr)); j++ {
- sa.Addr[j] = rsa4.Addr[j]
- }
- sas[i] = sa
- case AF_INET6:
- rsa6 := (*RawSockaddrInet6)(unsafe.Pointer(&b[0]))
- sa := new(SockaddrInet6)
- for j := 0; rsa6.Len > 0 && j < int(rsa6.Len)-int(unsafe.Offsetof(rsa6.Addr)); j++ {
- sa.Addr[j] = rsa6.Addr[j]
- }
- sas[i] = sa
- }
- }
- b = b[rsaAlignOf(int(rsa.Len)):]
- }
- return sas[:]
-}
-
-// InterfaceMessage represents a routing message containing
-// network interface entries.
-type InterfaceMessage struct {
- Header IfMsghdr
- Data []byte
-}
-
-func (m *InterfaceMessage) sockaddr() (sas []Sockaddr) {
- if m.Header.Addrs&RTA_IFP == 0 {
- return nil
- }
- sa, err := anyToSockaddr((*RawSockaddrAny)(unsafe.Pointer(&m.Data[0])))
- if err != nil {
- return nil
- }
- return append(sas, sa)
-}
-
-// InterfaceAddrMessage represents a routing message containing
-// network interface address entries.
-type InterfaceAddrMessage struct {
- Header IfaMsghdr
- Data []byte
-}
-
-const rtaIfaMask = RTA_IFA | RTA_NETMASK | RTA_BRD
-
-func (m *InterfaceAddrMessage) sockaddr() (sas []Sockaddr) {
- if m.Header.Addrs&rtaIfaMask == 0 {
- return nil
- }
- b := m.Data[:]
- // We still see AF_UNSPEC in socket addresses on some
- // platforms. To identify each address family correctly, we
- // will use the address family of RTAX_NETMASK as a preferred
- // one on the 32-bit NetBSD kernel, also use the length of
- // RTAX_NETMASK socket address on the FreeBSD kernel.
- preferredFamily := uint8(AF_UNSPEC)
- for i := uint(0); i < RTAX_MAX; i++ {
- if m.Header.Addrs&rtaIfaMask&(1<<i) == 0 {
- continue
- }
- rsa := (*RawSockaddr)(unsafe.Pointer(&b[0]))
- switch i {
- case RTAX_IFA:
- if rsa.Family == AF_UNSPEC {
- rsa.Family = preferredFamily
- }
- sa, err := anyToSockaddr((*RawSockaddrAny)(unsafe.Pointer(rsa)))
- if err != nil {
- return nil
- }
- sas = append(sas, sa)
- case RTAX_NETMASK:
- switch rsa.Family {
- case AF_UNSPEC:
- switch rsa.Len {
- case SizeofSockaddrInet4:
- rsa.Family = AF_INET
- case SizeofSockaddrInet6:
- rsa.Family = AF_INET6
- default:
- rsa.Family = AF_INET // an old fashion, AF_UNSPEC means AF_INET
- }
- case AF_INET, AF_INET6:
- preferredFamily = rsa.Family
- default:
- return nil
- }
- sa, err := anyToSockaddr((*RawSockaddrAny)(unsafe.Pointer(rsa)))
- if err != nil {
- return nil
- }
- sas = append(sas, sa)
- case RTAX_BRD:
- // nothing to do
- }
- b = b[rsaAlignOf(int(rsa.Len)):]
- }
- return sas
-}
-
-// ParseRoutingMessage parses b as routing messages and returns the
-// slice containing the RoutingMessage interfaces.
-func ParseRoutingMessage(b []byte) (msgs []RoutingMessage, err error) {
- msgCount := 0
- for len(b) >= anyMessageLen {
- msgCount++
- any := (*anyMessage)(unsafe.Pointer(&b[0]))
- if any.Version != RTM_VERSION {
- b = b[any.Msglen:]
- continue
- }
- msgs = append(msgs, any.toRoutingMessage(b))
- b = b[any.Msglen:]
- }
- // We failed to parse any of the messages - version mismatch?
- if msgCount > 0 && len(msgs) == 0 {
- return nil, EINVAL
- }
- return msgs, nil
-}
-
-// ParseRoutingMessage parses msg's payload as raw sockaddrs and
-// returns the slice containing the Sockaddr interfaces.
-func ParseRoutingSockaddr(msg RoutingMessage) (sas []Sockaddr, err error) {
- return append(sas, msg.sockaddr()...), nil
-}
diff --git a/src/pkg/syscall/route_darwin.go b/src/pkg/syscall/route_darwin.go
deleted file mode 100644
index ad2790723..000000000
--- a/src/pkg/syscall/route_darwin.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// 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 Darwin
-
-package syscall
-
-import "unsafe"
-
-func (any *anyMessage) toRoutingMessage(b []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))
- return &RouteMessage{Header: p.Header, Data: b[SizeofRtMsghdr:any.Msglen]}
- case RTM_IFINFO:
- p := (*InterfaceMessage)(unsafe.Pointer(any))
- return &InterfaceMessage{Header: p.Header, Data: b[SizeofIfMsghdr:any.Msglen]}
- case RTM_NEWADDR, RTM_DELADDR:
- p := (*InterfaceAddrMessage)(unsafe.Pointer(any))
- return &InterfaceAddrMessage{Header: p.Header, Data: b[SizeofIfaMsghdr:any.Msglen]}
- case RTM_NEWMADDR2, RTM_DELMADDR:
- p := (*InterfaceMulticastAddrMessage)(unsafe.Pointer(any))
- return &InterfaceMulticastAddrMessage{Header: p.Header, Data: b[SizeofIfmaMsghdr2:any.Msglen]}
- }
- return nil
-}
-
-// InterfaceMulticastAddrMessage represents a routing message
-// containing network interface address entries.
-type InterfaceMulticastAddrMessage struct {
- Header IfmaMsghdr2
- Data []byte
-}
-
-const rtaIfmaMask = RTA_GATEWAY | RTA_IFP | RTA_IFA
-
-func (m *InterfaceMulticastAddrMessage) sockaddr() (sas []Sockaddr) {
- if m.Header.Addrs&rtaIfmaMask == 0 {
- return nil
- }
- b := m.Data[:]
- for i := uint(0); i < RTAX_MAX; i++ {
- if m.Header.Addrs&rtaIfmaMask&(1<<i) == 0 {
- continue
- }
- rsa := (*RawSockaddr)(unsafe.Pointer(&b[0]))
- switch i {
- case RTAX_IFA:
- sa, e := anyToSockaddr((*RawSockaddrAny)(unsafe.Pointer(rsa)))
- if e != nil {
- return nil
- }
- sas = append(sas, sa)
- case RTAX_GATEWAY, RTAX_IFP:
- // nothing to do
- }
- b = b[rsaAlignOf(int(rsa.Len)):]
- }
- return sas
-}
diff --git a/src/pkg/syscall/route_dragonfly.go b/src/pkg/syscall/route_dragonfly.go
deleted file mode 100644
index 79190d2b0..000000000
--- a/src/pkg/syscall/route_dragonfly.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// 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 Dragonfly
-
-package syscall
-
-import "unsafe"
-
-func (any *anyMessage) toRoutingMessage(b []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))
- return &RouteMessage{Header: p.Header, Data: b[SizeofRtMsghdr:any.Msglen]}
- case RTM_IFINFO:
- p := (*InterfaceMessage)(unsafe.Pointer(any))
- return &InterfaceMessage{Header: p.Header, Data: b[SizeofIfMsghdr:any.Msglen]}
- case RTM_IFANNOUNCE:
- p := (*InterfaceAnnounceMessage)(unsafe.Pointer(any))
- return &InterfaceAnnounceMessage{Header: p.Header}
- case RTM_NEWADDR, RTM_DELADDR:
- p := (*InterfaceAddrMessage)(unsafe.Pointer(any))
- return &InterfaceAddrMessage{Header: p.Header, Data: b[SizeofIfaMsghdr:any.Msglen]}
- case RTM_NEWMADDR, RTM_DELMADDR:
- p := (*InterfaceMulticastAddrMessage)(unsafe.Pointer(any))
- return &InterfaceMulticastAddrMessage{Header: p.Header, Data: b[SizeofIfmaMsghdr:any.Msglen]}
- }
- return nil
-}
-
-// InterfaceAnnounceMessage represents a routing message containing
-// network interface arrival and departure information.
-type InterfaceAnnounceMessage struct {
- Header IfAnnounceMsghdr
-}
-
-func (m *InterfaceAnnounceMessage) sockaddr() (sas []Sockaddr) { return nil }
-
-// InterfaceMulticastAddrMessage represents a routing message
-// containing network interface address entries.
-type InterfaceMulticastAddrMessage struct {
- Header IfmaMsghdr
- Data []byte
-}
-
-const rtaIfmaMask = RTA_GATEWAY | RTA_IFP | RTA_IFA
-
-func (m *InterfaceMulticastAddrMessage) sockaddr() (sas []Sockaddr) {
- if m.Header.Addrs&rtaIfmaMask == 0 {
- return nil
- }
- b := m.Data[:]
- for i := uint(0); i < RTAX_MAX; i++ {
- if m.Header.Addrs&rtaIfmaMask&(1<<i) == 0 {
- continue
- }
- rsa := (*RawSockaddr)(unsafe.Pointer(&b[0]))
- switch i {
- case RTAX_IFA:
- sa, e := anyToSockaddr((*RawSockaddrAny)(unsafe.Pointer(rsa)))
- if e != nil {
- return nil
- }
- sas = append(sas, sa)
- case RTAX_GATEWAY, RTAX_IFP:
- // nothing to do
- }
- b = b[rsaAlignOf(int(rsa.Len)):]
- }
- return sas
-}
diff --git a/src/pkg/syscall/route_freebsd.go b/src/pkg/syscall/route_freebsd.go
deleted file mode 100644
index 15897b1ac..000000000
--- a/src/pkg/syscall/route_freebsd.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// 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 FreeBSD
-
-package syscall
-
-import "unsafe"
-
-// See http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html.
-var freebsdVersion uint32
-
-func init() {
- freebsdVersion, _ = SysctlUint32("kern.osreldate")
-}
-
-func (any *anyMessage) toRoutingMessage(b []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))
- return &RouteMessage{Header: p.Header, Data: b[SizeofRtMsghdr:any.Msglen]}
- case RTM_IFINFO:
- return any.parseInterfaceMessage(b)
- case RTM_IFANNOUNCE:
- p := (*InterfaceAnnounceMessage)(unsafe.Pointer(any))
- return &InterfaceAnnounceMessage{Header: p.Header}
- case RTM_NEWADDR, RTM_DELADDR:
- p := (*InterfaceAddrMessage)(unsafe.Pointer(any))
- return &InterfaceAddrMessage{Header: p.Header, Data: b[SizeofIfaMsghdr:any.Msglen]}
- case RTM_NEWMADDR, RTM_DELMADDR:
- p := (*InterfaceMulticastAddrMessage)(unsafe.Pointer(any))
- return &InterfaceMulticastAddrMessage{Header: p.Header, Data: b[SizeofIfmaMsghdr:any.Msglen]}
- }
- return nil
-}
-
-// InterfaceAnnounceMessage represents a routing message containing
-// network interface arrival and departure information.
-type InterfaceAnnounceMessage struct {
- Header IfAnnounceMsghdr
-}
-
-func (m *InterfaceAnnounceMessage) sockaddr() (sas []Sockaddr) { return nil }
-
-// InterfaceMulticastAddrMessage represents a routing message
-// containing network interface address entries.
-type InterfaceMulticastAddrMessage struct {
- Header IfmaMsghdr
- Data []byte
-}
-
-const rtaIfmaMask = RTA_GATEWAY | RTA_IFP | RTA_IFA
-
-func (m *InterfaceMulticastAddrMessage) sockaddr() (sas []Sockaddr) {
- if m.Header.Addrs&rtaIfmaMask == 0 {
- return nil
- }
- b := m.Data[:]
- for i := uint(0); i < RTAX_MAX; i++ {
- if m.Header.Addrs&rtaIfmaMask&(1<<i) == 0 {
- continue
- }
- rsa := (*RawSockaddr)(unsafe.Pointer(&b[0]))
- switch i {
- case RTAX_IFA:
- sa, e := anyToSockaddr((*RawSockaddrAny)(unsafe.Pointer(rsa)))
- if e != nil {
- return nil
- }
- sas = append(sas, sa)
- case RTAX_GATEWAY, RTAX_IFP:
- // nothing to do
- }
- b = b[rsaAlignOf(int(rsa.Len)):]
- }
- return sas
-}
diff --git a/src/pkg/syscall/route_freebsd_32bit.go b/src/pkg/syscall/route_freebsd_32bit.go
deleted file mode 100644
index 93efdddb3..000000000
--- a/src/pkg/syscall/route_freebsd_32bit.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build freebsd,386 freebsd,arm
-
-package syscall
-
-import "unsafe"
-
-func (any *anyMessage) parseInterfaceMessage(b []byte) *InterfaceMessage {
- p := (*InterfaceMessage)(unsafe.Pointer(any))
- // FreeBSD 10 and beyond have a restructured mbuf
- // packet header view.
- // See http://svnweb.freebsd.org/base?view=revision&revision=254804.
- if freebsdVersion >= 1000000 {
- m := (*ifMsghdr)(unsafe.Pointer(any))
- p.Header.Data.Hwassist = uint32(m.Data.Hwassist)
- p.Header.Data.Epoch = m.Data.Epoch
- p.Header.Data.Lastchange = m.Data.Lastchange
- return &InterfaceMessage{Header: p.Header, Data: b[sizeofIfMsghdr:any.Msglen]}
- }
- return &InterfaceMessage{Header: p.Header, Data: b[SizeofIfMsghdr:any.Msglen]}
-}
diff --git a/src/pkg/syscall/route_freebsd_64bit.go b/src/pkg/syscall/route_freebsd_64bit.go
deleted file mode 100644
index 9377f2fed..000000000
--- a/src/pkg/syscall/route_freebsd_64bit.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build freebsd,amd64
-
-package syscall
-
-import "unsafe"
-
-func (any *anyMessage) parseInterfaceMessage(b []byte) *InterfaceMessage {
- p := (*InterfaceMessage)(unsafe.Pointer(any))
- return &InterfaceMessage{Header: p.Header, Data: b[SizeofIfMsghdr:any.Msglen]}
-}
diff --git a/src/pkg/syscall/route_netbsd.go b/src/pkg/syscall/route_netbsd.go
deleted file mode 100644
index 9883aebaf..000000000
--- a/src/pkg/syscall/route_netbsd.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// 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(b []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))
- return &RouteMessage{Header: p.Header, Data: b[SizeofRtMsghdr:any.Msglen]}
- case RTM_IFINFO:
- p := (*InterfaceMessage)(unsafe.Pointer(any))
- return &InterfaceMessage{Header: p.Header, Data: b[SizeofIfMsghdr:any.Msglen]}
- case RTM_IFANNOUNCE:
- p := (*InterfaceAnnounceMessage)(unsafe.Pointer(any))
- return &InterfaceAnnounceMessage{Header: p.Header}
- case RTM_NEWADDR, RTM_DELADDR:
- p := (*InterfaceAddrMessage)(unsafe.Pointer(any))
- return &InterfaceAddrMessage{Header: p.Header, Data: b[SizeofIfaMsghdr:any.Msglen]}
- }
- return nil
-}
-
-// InterfaceAnnounceMessage represents a routing message containing
-// network interface arrival and departure information.
-type InterfaceAnnounceMessage struct {
- Header IfAnnounceMsghdr
-}
-
-func (m *InterfaceAnnounceMessage) sockaddr() (sas []Sockaddr) { return nil }
diff --git a/src/pkg/syscall/route_openbsd.go b/src/pkg/syscall/route_openbsd.go
deleted file mode 100644
index 19f902db7..000000000
--- a/src/pkg/syscall/route_openbsd.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// 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 OpenBSD
-
-package syscall
-
-import "unsafe"
-
-func (any *anyMessage) toRoutingMessage(b []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))
- return &RouteMessage{Header: p.Header, Data: b[SizeofRtMsghdr:any.Msglen]}
- case RTM_IFINFO:
- p := (*InterfaceMessage)(unsafe.Pointer(any))
- return &InterfaceMessage{Header: p.Header, Data: b[SizeofIfMsghdr:any.Msglen]}
- case RTM_IFANNOUNCE:
- p := (*InterfaceAnnounceMessage)(unsafe.Pointer(any))
- return &InterfaceAnnounceMessage{Header: p.Header}
- case RTM_NEWADDR, RTM_DELADDR:
- p := (*InterfaceAddrMessage)(unsafe.Pointer(any))
- return &InterfaceAddrMessage{Header: p.Header, Data: b[SizeofIfaMsghdr:any.Msglen]}
- }
- return nil
-}
-
-// InterfaceAnnounceMessage represents a routing message containing
-// network interface arrival and departure information.
-type InterfaceAnnounceMessage struct {
- Header IfAnnounceMsghdr
-}
-
-func (m *InterfaceAnnounceMessage) sockaddr() (sas []Sockaddr) { return nil }
diff --git a/src/pkg/syscall/security_windows.go b/src/pkg/syscall/security_windows.go
deleted file mode 100644
index b22ecf578..000000000
--- a/src/pkg/syscall/security_windows.go
+++ /dev/null
@@ -1,384 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-import (
- "unsafe"
-)
-
-const (
- STANDARD_RIGHTS_REQUIRED = 0xf0000
- STANDARD_RIGHTS_READ = 0x20000
- STANDARD_RIGHTS_WRITE = 0x20000
- STANDARD_RIGHTS_EXECUTE = 0x20000
- STANDARD_RIGHTS_ALL = 0x1F0000
-)
-
-const (
- NameUnknown = 0
- NameFullyQualifiedDN = 1
- NameSamCompatible = 2
- NameDisplay = 3
- NameUniqueId = 6
- NameCanonical = 7
- NameUserPrincipal = 8
- NameCanonicalEx = 9
- NameServicePrincipal = 10
- NameDnsDomain = 12
-)
-
-// This function returns 1 byte BOOLEAN rather than the 4 byte BOOL.
-// http://blogs.msdn.com/b/drnick/archive/2007/12/19/windows-and-upn-format-credentials.aspx
-//sys TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) [failretval&0xff==0] = secur32.TranslateNameW
-//sys GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) [failretval&0xff==0] = secur32.GetUserNameExW
-
-// TranslateAccountName converts a directory service
-// object name from one format to another.
-func TranslateAccountName(username string, from, to uint32, initSize int) (string, error) {
- u, e := UTF16PtrFromString(username)
- if e != nil {
- return "", e
- }
- b := make([]uint16, 50)
- n := uint32(len(b))
- e = TranslateName(u, from, to, &b[0], &n)
- if e != nil {
- if e != ERROR_INSUFFICIENT_BUFFER {
- return "", e
- }
- // make receive buffers of requested size and try again
- b = make([]uint16, n)
- e = TranslateName(u, from, to, &b[0], &n)
- if e != nil {
- return "", e
- }
- }
- return UTF16ToString(b), nil
-}
-
-const (
- // do not reorder
- NetSetupUnknownStatus = iota
- NetSetupUnjoined
- NetSetupWorkgroupName
- NetSetupDomainName
-)
-
-type UserInfo10 struct {
- Name *uint16
- Comment *uint16
- UsrComment *uint16
- FullName *uint16
-}
-
-//sys NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) = netapi32.NetUserGetInfo
-//sys NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) = netapi32.NetGetJoinInformation
-//sys NetApiBufferFree(buf *byte) (neterr error) = netapi32.NetApiBufferFree
-
-const (
- // do not reorder
- SidTypeUser = 1 + iota
- SidTypeGroup
- SidTypeDomain
- SidTypeAlias
- SidTypeWellKnownGroup
- SidTypeDeletedAccount
- SidTypeInvalid
- SidTypeUnknown
- SidTypeComputer
- SidTypeLabel
-)
-
-//sys LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) = advapi32.LookupAccountSidW
-//sys LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) = advapi32.LookupAccountNameW
-//sys ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) = advapi32.ConvertSidToStringSidW
-//sys ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) = advapi32.ConvertStringSidToSidW
-//sys GetLengthSid(sid *SID) (len uint32) = advapi32.GetLengthSid
-//sys CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) = advapi32.CopySid
-
-// The security identifier (SID) structure is a variable-length
-// structure used to uniquely identify users or groups.
-type SID struct{}
-
-// StringToSid converts a string-format security identifier
-// sid into a valid, functional sid.
-func StringToSid(s string) (*SID, error) {
- var sid *SID
- p, e := UTF16PtrFromString(s)
- if e != nil {
- return nil, e
- }
- e = ConvertStringSidToSid(p, &sid)
- if e != nil {
- return nil, e
- }
- defer LocalFree((Handle)(unsafe.Pointer(sid)))
- return sid.Copy()
-}
-
-// LookupSID retrieves a security identifier sid for the account
-// and the name of the domain on which the account was found.
-// System specify target computer to search.
-func LookupSID(system, account string) (sid *SID, domain string, accType uint32, err error) {
- if len(account) == 0 {
- return nil, "", 0, EINVAL
- }
- acc, e := UTF16PtrFromString(account)
- if e != nil {
- return nil, "", 0, e
- }
- var sys *uint16
- if len(system) > 0 {
- sys, e = UTF16PtrFromString(system)
- if e != nil {
- return nil, "", 0, e
- }
- }
- db := make([]uint16, 50)
- dn := uint32(len(db))
- b := make([]byte, 50)
- n := uint32(len(b))
- sid = (*SID)(unsafe.Pointer(&b[0]))
- e = LookupAccountName(sys, acc, sid, &n, &db[0], &dn, &accType)
- if e != nil {
- if e != ERROR_INSUFFICIENT_BUFFER {
- return nil, "", 0, e
- }
- // make receive buffers of requested size and try again
- b = make([]byte, n)
- sid = (*SID)(unsafe.Pointer(&b[0]))
- db = make([]uint16, dn)
- e = LookupAccountName(sys, acc, sid, &n, &db[0], &dn, &accType)
- if e != nil {
- return nil, "", 0, e
- }
- }
- return sid, UTF16ToString(db), accType, nil
-}
-
-// String converts sid to a string format
-// suitable for display, storage, or transmission.
-func (sid *SID) String() (string, error) {
- var s *uint16
- e := ConvertSidToStringSid(sid, &s)
- if e != nil {
- return "", e
- }
- defer LocalFree((Handle)(unsafe.Pointer(s)))
- return UTF16ToString((*[256]uint16)(unsafe.Pointer(s))[:]), nil
-}
-
-// Len returns the length, in bytes, of a valid security identifier sid.
-func (sid *SID) Len() int {
- return int(GetLengthSid(sid))
-}
-
-// Copy creates a duplicate of security identifier sid.
-func (sid *SID) Copy() (*SID, error) {
- b := make([]byte, sid.Len())
- sid2 := (*SID)(unsafe.Pointer(&b[0]))
- e := CopySid(uint32(len(b)), sid2, sid)
- if e != nil {
- return nil, e
- }
- return sid2, nil
-}
-
-// LookupAccount retrieves the name of the account for this sid
-// and the name of the first domain on which this sid is found.
-// System specify target computer to search for.
-func (sid *SID) LookupAccount(system string) (account, domain string, accType uint32, err error) {
- var sys *uint16
- if len(system) > 0 {
- sys, err = UTF16PtrFromString(system)
- if err != nil {
- return "", "", 0, err
- }
- }
- b := make([]uint16, 50)
- n := uint32(len(b))
- db := make([]uint16, 50)
- dn := uint32(len(db))
- e := LookupAccountSid(sys, sid, &b[0], &n, &db[0], &dn, &accType)
- if e != nil {
- if e != ERROR_INSUFFICIENT_BUFFER {
- return "", "", 0, e
- }
- // make receive buffers of requested size and try again
- b = make([]uint16, n)
- db = make([]uint16, dn)
- e = LookupAccountSid(nil, sid, &b[0], &n, &db[0], &dn, &accType)
- if e != nil {
- return "", "", 0, e
- }
- }
- return UTF16ToString(b), UTF16ToString(db), accType, nil
-}
-
-const (
- // do not reorder
- TOKEN_ASSIGN_PRIMARY = 1 << iota
- TOKEN_DUPLICATE
- TOKEN_IMPERSONATE
- TOKEN_QUERY
- TOKEN_QUERY_SOURCE
- TOKEN_ADJUST_PRIVILEGES
- TOKEN_ADJUST_GROUPS
- TOKEN_ADJUST_DEFAULT
-
- TOKEN_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED |
- TOKEN_ASSIGN_PRIMARY |
- TOKEN_DUPLICATE |
- TOKEN_IMPERSONATE |
- TOKEN_QUERY |
- TOKEN_QUERY_SOURCE |
- TOKEN_ADJUST_PRIVILEGES |
- TOKEN_ADJUST_GROUPS |
- TOKEN_ADJUST_DEFAULT
- TOKEN_READ = STANDARD_RIGHTS_READ | TOKEN_QUERY
- TOKEN_WRITE = STANDARD_RIGHTS_WRITE |
- TOKEN_ADJUST_PRIVILEGES |
- TOKEN_ADJUST_GROUPS |
- TOKEN_ADJUST_DEFAULT
- TOKEN_EXECUTE = STANDARD_RIGHTS_EXECUTE
-)
-
-const (
- // do not reorder
- TokenUser = 1 + iota
- TokenGroups
- TokenPrivileges
- TokenOwner
- TokenPrimaryGroup
- TokenDefaultDacl
- TokenSource
- TokenType
- TokenImpersonationLevel
- TokenStatistics
- TokenRestrictedSids
- TokenSessionId
- TokenGroupsAndPrivileges
- TokenSessionReference
- TokenSandBoxInert
- TokenAuditPolicy
- TokenOrigin
- TokenElevationType
- TokenLinkedToken
- TokenElevation
- TokenHasRestrictions
- TokenAccessInformation
- TokenVirtualizationAllowed
- TokenVirtualizationEnabled
- TokenIntegrityLevel
- TokenUIAccess
- TokenMandatoryPolicy
- TokenLogonSid
- MaxTokenInfoClass
-)
-
-type SIDAndAttributes struct {
- Sid *SID
- Attributes uint32
-}
-
-type Tokenuser struct {
- User SIDAndAttributes
-}
-
-type Tokenprimarygroup struct {
- PrimaryGroup *SID
-}
-
-//sys OpenProcessToken(h Handle, access uint32, token *Token) (err error) = advapi32.OpenProcessToken
-//sys GetTokenInformation(t Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) = advapi32.GetTokenInformation
-//sys GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) = userenv.GetUserProfileDirectoryW
-
-// An access token contains the security information for a logon session.
-// The system creates an access token when a user logs on, and every
-// process executed on behalf of the user has a copy of the token.
-// The token identifies the user, the user's groups, and the user's
-// privileges. The system uses the token to control access to securable
-// objects and to control the ability of the user to perform various
-// system-related operations on the local computer.
-type Token Handle
-
-// OpenCurrentProcessToken opens the access token
-// associated with current process.
-func OpenCurrentProcessToken() (Token, error) {
- p, e := GetCurrentProcess()
- if e != nil {
- return 0, e
- }
- var t Token
- e = OpenProcessToken(p, TOKEN_QUERY, &t)
- if e != nil {
- return 0, e
- }
- return t, nil
-}
-
-// Close releases access to access token.
-func (t Token) Close() error {
- return CloseHandle(Handle(t))
-}
-
-// getInfo retrieves a specified type of information about an access token.
-func (t Token) getInfo(class uint32, initSize int) (unsafe.Pointer, error) {
- b := make([]byte, initSize)
- var n uint32
- e := GetTokenInformation(t, class, &b[0], uint32(len(b)), &n)
- if e != nil {
- if e != ERROR_INSUFFICIENT_BUFFER {
- return nil, e
- }
- // make receive buffers of requested size and try again
- b = make([]byte, n)
- e = GetTokenInformation(t, class, &b[0], uint32(len(b)), &n)
- if e != nil {
- return nil, e
- }
- }
- return unsafe.Pointer(&b[0]), nil
-}
-
-// GetTokenUser retrieves access token t user account information.
-func (t Token) GetTokenUser() (*Tokenuser, error) {
- i, e := t.getInfo(TokenUser, 50)
- if e != nil {
- return nil, e
- }
- return (*Tokenuser)(i), nil
-}
-
-// GetTokenPrimaryGroup retrieves access token t primary group information.
-// A pointer to a SID structure representing a group that will become
-// the primary group of any objects created by a process using this access token.
-func (t Token) GetTokenPrimaryGroup() (*Tokenprimarygroup, error) {
- i, e := t.getInfo(TokenPrimaryGroup, 50)
- if e != nil {
- return nil, e
- }
- return (*Tokenprimarygroup)(i), nil
-}
-
-// GetUserProfileDirectory retrieves path to the
-// root directory of the access token t user's profile.
-func (t Token) GetUserProfileDirectory() (string, error) {
- b := make([]uint16, 100)
- n := uint32(len(b))
- e := GetUserProfileDirectory(t, &b[0], &n)
- if e != nil {
- if e != ERROR_INSUFFICIENT_BUFFER {
- return "", e
- }
- // make receive buffers of requested size and try again
- b = make([]uint16, n)
- e = GetUserProfileDirectory(t, &b[0], &n)
- if e != nil {
- return "", e
- }
- }
- return UTF16ToString(b), nil
-}
diff --git a/src/pkg/syscall/so_solaris.go b/src/pkg/syscall/so_solaris.go
deleted file mode 100644
index 659cd67c1..000000000
--- a/src/pkg/syscall/so_solaris.go
+++ /dev/null
@@ -1,260 +0,0 @@
-// 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.
-
-package syscall
-
-import (
- "sync"
- "sync/atomic"
- "unsafe"
-)
-
-// soError describes reasons for shared library load failures.
-type soError struct {
- Err error
- ObjName string
- Msg string
-}
-
-func (e *soError) Error() string { return e.Msg }
-
-// Implemented in ../runtime/syscall_solaris.goc.
-func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
-func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
-func dlclose(handle uintptr) (err Errno)
-func dlopen(name *uint8, mode uintptr) (handle uintptr, err Errno)
-func dlsym(handle uintptr, name *uint8) (proc uintptr, err Errno)
-
-// A so implements access to a single shared library object.
-type so struct {
- Name string
- Handle uintptr
-}
-
-// loadSO loads shared library file into memory.
-func loadSO(name string) (*so, error) {
- namep, err := BytePtrFromString(name)
- if err != nil {
- return nil, err
- }
- h, e := dlopen(namep, 1) // RTLD_LAZY
- if e != 0 {
- return nil, &soError{
- Err: e,
- ObjName: name,
- Msg: "Failed to load " + name + ": " + e.Error(),
- }
- }
- d := &so{
- Name: name,
- Handle: uintptr(h),
- }
- return d, nil
-}
-
-// mustLoadSO is like loadSO but panics if load operation fails.
-func mustLoadSO(name string) *so {
- d, e := loadSO(name)
- if e != nil {
- panic(e)
- }
- return d
-}
-
-// FindProc searches shared library d for procedure named name and returns
-// *proc if found. It returns an error if the search fails.
-func (d *so) FindProc(name string) (*proc, error) {
- namep, err := BytePtrFromString(name)
- if err != nil {
- return nil, err
- }
- a, _ := dlsym(uintptr(d.Handle), namep)
- if a == 0 {
- return nil, &soError{
- Err: ENOSYS,
- ObjName: name,
- Msg: "Failed to find " + name + " procedure in " + d.Name,
- }
- }
- p := &proc{
- SO: d,
- Name: name,
- addr: a,
- }
- return p, nil
-}
-
-// MustFindProc is like FindProc but panics if search fails.
-func (d *so) MustFindProc(name string) *proc {
- p, e := d.FindProc(name)
- if e != nil {
- panic(e)
- }
- return p
-}
-
-// Release unloads shared library d from memory.
-func (d *so) Release() (err error) {
- return dlclose(d.Handle)
-}
-
-// A proc implements access to a procedure inside a shared library.
-type proc struct {
- SO *so
- Name string
- addr uintptr
-}
-
-// Addr returns the address of the procedure represented by p.
-// The return value can be passed to Syscall to run the procedure.
-func (p *proc) Addr() uintptr {
- return p.addr
-}
-
-// Call executes procedure p with arguments a. It will panic, if more then
-// 6 arguments are supplied.
-//
-// The returned error is always non-nil, constructed from the result of
-// GetLastError. Callers must inspect the primary return value to decide
-// whether an error occurred (according to the semantics of the specific
-// function being called) before consulting the error. The error will be
-// guaranteed to contain syscall.Errno.
-func (p *proc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {
- switch len(a) {
- case 0:
- return sysvicall6(p.Addr(), uintptr(len(a)), 0, 0, 0, 0, 0, 0)
- case 1:
- return sysvicall6(p.Addr(), uintptr(len(a)), a[0], 0, 0, 0, 0, 0)
- case 2:
- return sysvicall6(p.Addr(), uintptr(len(a)), a[0], a[1], 0, 0, 0, 0)
- case 3:
- return sysvicall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], 0, 0, 0)
- case 4:
- return sysvicall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], 0, 0)
- case 5:
- return sysvicall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], 0)
- case 6:
- return sysvicall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5])
- default:
- panic("Call " + p.Name + " with too many arguments " + itoa(len(a)) + ".")
- }
- return
-}
-
-// A lazySO implements access to a single shared library. It will delay
-// the load of the shared library until the first call to its Handle method
-// or to one of its lazyProc's Addr method.
-type lazySO struct {
- mu sync.Mutex
- so *so // non nil once SO is loaded
- Name string
-}
-
-// Load loads single shared file d.Name into memory. It returns an error if
-// fails. Load will not try to load SO, if it is already loaded into memory.
-func (d *lazySO) Load() error {
- // Non-racy version of:
- // if d.so == nil {
- if atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&d.so))) == nil {
- d.mu.Lock()
- defer d.mu.Unlock()
- if d.so == nil {
- so, e := loadSO(d.Name)
- if e != nil {
- return e
- }
- // Non-racy version of:
- // d.so = so
- atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&d.so)), unsafe.Pointer(so))
- }
- }
- return nil
-}
-
-// mustLoad is like Load but panics if search fails.
-func (d *lazySO) mustLoad() {
- e := d.Load()
- if e != nil {
- panic(e)
- }
-}
-
-// Handle returns d's module handle.
-func (d *lazySO) Handle() uintptr {
- d.mustLoad()
- return uintptr(d.so.Handle)
-}
-
-// NewProc returns a lazyProc for accessing the named procedure in the SO d.
-func (d *lazySO) NewProc(name string) *lazyProc {
- return &lazyProc{l: d, Name: name}
-}
-
-// newLazySO creates new lazySO associated with SO file.
-func newLazySO(name string) *lazySO {
- return &lazySO{Name: name}
-}
-
-// A lazyProc implements access to a procedure inside a lazySO.
-// It delays the lookup until the Addr method is called.
-type lazyProc struct {
- mu sync.Mutex
- Name string
- l *lazySO
- proc *proc
-}
-
-// Find searches the shared library for procedure named p.Name. It returns an
-// error if search fails. Find will not search procedure, if it is already
-// found and loaded into memory.
-func (p *lazyProc) Find() error {
- // Non-racy version of:
- // if p.proc == nil {
- if atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&p.proc))) == nil {
- p.mu.Lock()
- defer p.mu.Unlock()
- if p.proc == nil {
- e := p.l.Load()
- if e != nil {
- return e
- }
- proc, e := p.l.so.FindProc(p.Name)
- if e != nil {
- return e
- }
- // Non-racy version of:
- // p.proc = proc
- atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&p.proc)), unsafe.Pointer(proc))
- }
- }
- return nil
-}
-
-// mustFind is like Find but panics if search fails.
-func (p *lazyProc) mustFind() {
- e := p.Find()
- if e != nil {
- panic(e)
- }
-}
-
-// Addr returns the address of the procedure represented by p.
-// The return value can be passed to Syscall to run the procedure.
-func (p *lazyProc) Addr() uintptr {
- p.mustFind()
- return p.proc.Addr()
-}
-
-// Call executes procedure p with arguments a. It will panic, if more then
-// 6 arguments are supplied.
-//
-// The returned error is always non-nil, constructed from the result of
-// GetLastError. Callers must inspect the primary return value to decide
-// whether an error occurred (according to the semantics of the specific
-// function being called) before consulting the error. The error will be
-// guaranteed to contain syscall.Errno.
-func (p *lazyProc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {
- p.mustFind()
- return p.proc.Call(a...)
-}
diff --git a/src/pkg/syscall/sockcmsg_linux.go b/src/pkg/syscall/sockcmsg_linux.go
deleted file mode 100644
index a2e26a1f4..000000000
--- a/src/pkg/syscall/sockcmsg_linux.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// 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.
-
-// Socket control messages
-
-package syscall
-
-import "unsafe"
-
-// UnixCredentials encodes credentials into a socket control message
-// for sending to another process. This can be used for
-// authentication.
-func UnixCredentials(ucred *Ucred) []byte {
- b := make([]byte, CmsgSpace(SizeofUcred))
- h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
- h.Level = SOL_SOCKET
- h.Type = SCM_CREDENTIALS
- h.SetLen(CmsgLen(SizeofUcred))
- *((*Ucred)(cmsgData(h))) = *ucred
- return b
-}
-
-// ParseUnixCredentials decodes a socket control message that contains
-// credentials in a Ucred structure. To receive such a message, the
-// SO_PASSCRED option must be enabled on the socket.
-func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
- if m.Header.Level != SOL_SOCKET {
- return nil, EINVAL
- }
- if m.Header.Type != SCM_CREDENTIALS {
- return nil, EINVAL
- }
- ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
- return &ucred, nil
-}
diff --git a/src/pkg/syscall/sockcmsg_unix.go b/src/pkg/syscall/sockcmsg_unix.go
deleted file mode 100644
index 045a012c0..000000000
--- a/src/pkg/syscall/sockcmsg_unix.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// 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.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-// Socket control messages
-
-package syscall
-
-import "unsafe"
-
-// Round the length of a raw sockaddr up to align it properly.
-func cmsgAlignOf(salen int) int {
- salign := sizeofPtr
- // NOTE: It seems like 64-bit Darwin and DragonFly BSD kernels
- // still require 32-bit aligned access to network subsystem.
- if darwin64Bit || dragonfly64Bit {
- salign = 4
- }
- return (salen + salign - 1) & ^(salign - 1)
-}
-
-// CmsgLen returns the value to store in the Len field of the Cmsghdr
-// structure, taking into account any necessary alignment.
-func CmsgLen(datalen int) int {
- return cmsgAlignOf(SizeofCmsghdr) + datalen
-}
-
-// CmsgSpace returns the number of bytes an ancillary element with
-// payload of the passed data length occupies.
-func CmsgSpace(datalen int) int {
- return cmsgAlignOf(SizeofCmsghdr) + cmsgAlignOf(datalen)
-}
-
-func cmsgData(h *Cmsghdr) unsafe.Pointer {
- return unsafe.Pointer(uintptr(unsafe.Pointer(h)) + uintptr(cmsgAlignOf(SizeofCmsghdr)))
-}
-
-// SocketControlMessage represents a socket control message.
-type SocketControlMessage struct {
- Header Cmsghdr
- Data []byte
-}
-
-// ParseSocketControlMessage parses b as an array of socket control
-// messages.
-func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) {
- var msgs []SocketControlMessage
- i := 0
- for i+CmsgLen(0) <= len(b) {
- h, dbuf, err := socketControlMessageHeaderAndData(b[i:])
- if err != nil {
- return nil, err
- }
- m := SocketControlMessage{Header: *h, Data: dbuf}
- msgs = append(msgs, m)
- i += cmsgAlignOf(int(h.Len))
- }
- return msgs, nil
-}
-
-func socketControlMessageHeaderAndData(b []byte) (*Cmsghdr, []byte, error) {
- h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
- if h.Len < SizeofCmsghdr || int(h.Len) > len(b) {
- return nil, nil, EINVAL
- }
- return h, b[cmsgAlignOf(SizeofCmsghdr):h.Len], nil
-}
-
-// UnixRights encodes a set of open file descriptors into a socket
-// control message for sending to another process.
-func UnixRights(fds ...int) []byte {
- datalen := len(fds) * 4
- b := make([]byte, CmsgSpace(datalen))
- h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
- h.Level = SOL_SOCKET
- h.Type = SCM_RIGHTS
- h.SetLen(CmsgLen(datalen))
- data := uintptr(cmsgData(h))
- for _, fd := range fds {
- *(*int32)(unsafe.Pointer(data)) = int32(fd)
- data += 4
- }
- return b
-}
-
-// ParseUnixRights decodes a socket control message that contains an
-// integer array of open file descriptors from another process.
-func ParseUnixRights(m *SocketControlMessage) ([]int, error) {
- if m.Header.Level != SOL_SOCKET {
- return nil, EINVAL
- }
- if m.Header.Type != SCM_RIGHTS {
- return nil, EINVAL
- }
- fds := make([]int, len(m.Data)>>2)
- for i, j := 0, 0; i < len(m.Data); i += 4 {
- fds[j] = int(*(*int32)(unsafe.Pointer(&m.Data[i])))
- j++
- }
- return fds, nil
-}
diff --git a/src/pkg/syscall/srpc_nacl.go b/src/pkg/syscall/srpc_nacl.go
deleted file mode 100644
index dd07373d1..000000000
--- a/src/pkg/syscall/srpc_nacl.go
+++ /dev/null
@@ -1,822 +0,0 @@
-// Copyright 2013 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.
-
-// Native Client SRPC message passing.
-// This code is needed to invoke SecureRandom, the NaCl equivalent of /dev/random.
-
-package syscall
-
-import (
- "errors"
- "sync"
- "unsafe"
-)
-
-// An srpcClient represents the client side of an SRPC connection.
-type srpcClient struct {
- fd int // to server
- r msgReceiver
- s msgSender
- service map[string]srpcService // services by name
-
- outMu sync.Mutex // protects writing to connection
-
- mu sync.Mutex // protects following fields
- muxer bool // is someone reading and muxing responses
- pending map[uint32]*srpc
- idGen uint32 // generator for request IDs
-}
-
-// An srpcService is a single method that the server offers.
-type srpcService struct {
- num uint32 // method number
- fmt string // argument format; see "parsing of RPC messages" below
-}
-
-// An srpc represents a single srpc issued by a client.
-type srpc struct {
- Ret []interface{}
- Done chan *srpc
- Err error
- c *srpcClient
- id uint32
-}
-
-// newClient allocates a new SRPC client using the file descriptor fd.
-func newClient(fd int) (*srpcClient, error) {
- c := new(srpcClient)
- c.fd = fd
- c.r.fd = fd
- c.s.fd = fd
- c.service = make(map[string]srpcService)
- c.pending = make(map[uint32]*srpc)
-
- // service discovery request
- m := &msg{
- isRequest: 1,
- template: []interface{}{[]byte(nil)},
- size: []int{4000}, // max size to accept for returned byte slice
- }
- if err := m.pack(); err != nil {
- return nil, errors.New("Native Client SRPC service_discovery: preparing request: " + err.Error())
- }
- c.s.send(m)
- m, err := c.r.recv()
- if err != nil {
- return nil, err
- }
- m.unpack()
- if m.status != uint32(srpcOK) {
- return nil, errors.New("Native Client SRPC service_discovery: " + srpcErrno(m.status).Error())
- }
- list := m.value[0].([]byte)
- var n uint32
- for len(list) > 0 {
- var line []byte
- i := byteIndex(list, '\n')
- if i < 0 {
- line, list = list, nil
- } else {
- line, list = list[:i], list[i+1:]
- }
- i = byteIndex(line, ':')
- if i >= 0 {
- c.service[string(line)] = srpcService{n, string(line[i+1:])}
- }
- n++
- }
-
- return c, nil
-}
-
-func byteIndex(b []byte, c byte) int {
- for i, bi := range b {
- if bi == c {
- return i
- }
- }
- return -1
-}
-
-var yourTurn srpc
-
-func (c *srpcClient) wait(r *srpc) {
- var rx *srpc
- for rx = range r.Done {
- if rx != &yourTurn {
- break
- }
- c.input()
- }
- return
-}
-
-func (c *srpcClient) input() {
- // read message
- m, err := c.r.recv()
- if err != nil {
- println("Native Client SRPC receive error:", err.Error())
- return
- }
- if m.unpack(); m.status != uint32(srpcOK) {
- println("Native Client SRPC receive error: invalid message: ", srpcErrno(m.status).Error())
- return
- }
-
- // deliver to intended recipient
- c.mu.Lock()
- rpc, ok := c.pending[m.id]
- if ok {
- delete(c.pending, m.id)
- }
-
- // wake a new muxer if there are more RPCs to read
- c.muxer = false
- for _, rpc := range c.pending {
- c.muxer = true
- rpc.Done <- &yourTurn
- break
- }
- c.mu.Unlock()
- if !ok {
- println("Native Client: unexpected response for ID", m.id)
- return
- }
- rpc.Ret = m.value
- rpc.Done <- rpc
-}
-
-// Wait blocks until the RPC has finished.
-func (r *srpc) Wait() {
- r.c.wait(r)
-}
-
-// Start issues an RPC request for method name with the given arguments.
-// The RPC r must not be in use for another pending request.
-// To wait for the RPC to finish, receive from r.Done and then
-// inspect r.Ret and r.Errno.
-func (r *srpc) Start(name string, arg []interface{}) {
- r.Err = nil
- r.c.mu.Lock()
- srv, ok := r.c.service[name]
- if !ok {
- r.c.mu.Unlock()
- r.Err = srpcErrBadRPCNumber
- r.Done <- r
- return
- }
- r.c.pending[r.id] = r
- if !r.c.muxer {
- r.c.muxer = true
- r.Done <- &yourTurn
- }
- r.c.mu.Unlock()
-
- var m msg
- m.id = r.id
- m.isRequest = 1
- m.rpc = srv.num
- m.value = arg
-
- // Fill in the return values and sizes to generate
- // the right type chars. We'll take most any size.
-
- // Skip over input arguments.
- // We could check them against arg, but the server
- // will do that anyway.
- i := 0
- for srv.fmt[i] != ':' {
- i++
- }
- format := srv.fmt[i+1:]
-
- // Now the return prototypes.
- m.template = make([]interface{}, len(format))
- m.size = make([]int, len(format))
- for i := 0; i < len(format); i++ {
- switch format[i] {
- default:
- println("Native Client SRPC: unexpected service type " + string(format[i]))
- r.Err = srpcErrBadRPCNumber
- r.Done <- r
- return
- case 'b':
- m.template[i] = false
- case 'C':
- m.template[i] = []byte(nil)
- m.size[i] = 1 << 30
- case 'd':
- m.template[i] = float64(0)
- case 'D':
- m.template[i] = []float64(nil)
- m.size[i] = 1 << 30
- case 'h':
- m.template[i] = int(-1)
- case 'i':
- m.template[i] = int32(0)
- case 'I':
- m.template[i] = []int32(nil)
- m.size[i] = 1 << 30
- case 's':
- m.template[i] = ""
- m.size[i] = 1 << 30
- }
- }
-
- if err := m.pack(); err != nil {
- r.Err = errors.New("Native Client RPC Start " + name + ": preparing request: " + err.Error())
- r.Done <- r
- return
- }
-
- r.c.outMu.Lock()
- r.c.s.send(&m)
- r.c.outMu.Unlock()
-}
-
-// Call is a convenience wrapper that starts the RPC request,
-// waits for it to finish, and then returns the results.
-// Its implementation is:
-//
-// r.Start(name, arg)
-// r.Wait()
-// return r.Ret, r.Errno
-//
-func (c *srpcClient) Call(name string, arg ...interface{}) (ret []interface{}, err error) {
- r := c.NewRPC(nil)
- r.Start(name, arg)
- r.Wait()
- return r.Ret, r.Err
-}
-
-// NewRPC creates a new RPC on the client connection.
-func (c *srpcClient) NewRPC(done chan *srpc) *srpc {
- if done == nil {
- done = make(chan *srpc, 1)
- }
- c.mu.Lock()
- id := c.idGen
- c.idGen++
- c.mu.Unlock()
- return &srpc{Done: done, c: c, id: id}
-}
-
-// The current protocol number.
-// Kind of useless, since there have been backwards-incompatible changes
-// to the wire protocol that did not update the protocol number.
-// At this point it's really just a sanity check.
-const protocol = 0xc0da0002
-
-// An srpcErrno is an SRPC status code.
-type srpcErrno uint32
-
-const (
- srpcOK srpcErrno = 256 + iota
- srpcErrBreak
- srpcErrMessageTruncated
- srpcErrNoMemory
- srpcErrProtocolMismatch
- srpcErrBadRPCNumber
- srpcErrBadArgType
- srpcErrTooFewArgs
- srpcErrTooManyArgs
- srpcErrInArgTypeMismatch
- srpcErrOutArgTypeMismatch
- srpcErrInternalError
- srpcErrAppError
-)
-
-var srpcErrstr = [...]string{
- srpcOK - srpcOK: "ok",
- srpcErrBreak - srpcOK: "break",
- srpcErrMessageTruncated - srpcOK: "message truncated",
- srpcErrNoMemory - srpcOK: "out of memory",
- srpcErrProtocolMismatch - srpcOK: "protocol mismatch",
- srpcErrBadRPCNumber - srpcOK: "invalid RPC method number",
- srpcErrBadArgType - srpcOK: "unexpected argument type",
- srpcErrTooFewArgs - srpcOK: "too few arguments",
- srpcErrTooManyArgs - srpcOK: "too many arguments",
- srpcErrInArgTypeMismatch - srpcOK: "input argument type mismatch",
- srpcErrOutArgTypeMismatch - srpcOK: "output argument type mismatch",
- srpcErrInternalError - srpcOK: "internal error",
- srpcErrAppError - srpcOK: "application error",
-}
-
-func (e srpcErrno) Error() string {
- if e < srpcOK || int(e-srpcOK) >= len(srpcErrstr) {
- return "srpcErrno(" + itoa(int(e)) + ")"
- }
- return srpcErrstr[e-srpcOK]
-}
-
-// A msgHdr is the data argument to the imc_recvmsg
-// and imc_sendmsg system calls.
-type msgHdr struct {
- iov *iov
- niov int32
- desc *int32
- ndesc int32
- flags uint32
-}
-
-// A single region for I/O.
-type iov struct {
- base *byte
- len int32
-}
-
-const maxMsgSize = 1<<16 - 4*4
-
-// A msgReceiver receives messages from a file descriptor.
-type msgReceiver struct {
- fd int
- data [maxMsgSize]byte
- desc [8]int32
- hdr msgHdr
- iov iov
-}
-
-func (r *msgReceiver) recv() (*msg, error) {
- // Init pointers to buffers where syscall recvmsg can write.
- r.iov.base = &r.data[0]
- r.iov.len = int32(len(r.data))
- r.hdr.iov = &r.iov
- r.hdr.niov = 1
- r.hdr.desc = &r.desc[0]
- r.hdr.ndesc = int32(len(r.desc))
- n, _, e := Syscall(sys_imc_recvmsg, uintptr(r.fd), uintptr(unsafe.Pointer(&r.hdr)), 0)
- if e != 0 {
- println("Native Client imc_recvmsg: ", e.Error())
- return nil, e
- }
-
- // Make a copy of the data so that the next recvmsg doesn't
- // smash it. The system call did not update r.iov.len. Instead it
- // returned the total byte count as n.
- m := new(msg)
- m.data = make([]byte, n)
- copy(m.data, r.data[0:])
-
- // Make a copy of the desc too.
- // The system call *did* update r.hdr.ndesc.
- if r.hdr.ndesc > 0 {
- m.desc = make([]int32, r.hdr.ndesc)
- copy(m.desc, r.desc[:])
- }
-
- return m, nil
-}
-
-// A msgSender sends messages on a file descriptor.
-type msgSender struct {
- fd int
- hdr msgHdr
- iov iov
-}
-
-func (s *msgSender) send(m *msg) error {
- if len(m.data) > 0 {
- s.iov.base = &m.data[0]
- }
- s.iov.len = int32(len(m.data))
- s.hdr.iov = &s.iov
- s.hdr.niov = 1
- s.hdr.desc = nil
- s.hdr.ndesc = 0
- _, _, e := Syscall(sys_imc_sendmsg, uintptr(s.fd), uintptr(unsafe.Pointer(&s.hdr)), 0)
- if e != 0 {
- println("Native Client imc_sendmsg: ", e.Error())
- return e
- }
- return nil
-}
-
-// A msg is the Go representation of an SRPC message.
-type msg struct {
- data []byte // message data
- desc []int32 // message file descriptors
-
- // parsed version of message
- id uint32
- isRequest uint32
- rpc uint32
- status uint32
- value []interface{}
- template []interface{}
- size []int
- format string
- broken bool
-}
-
-// reading from a msg
-
-func (m *msg) uint32() uint32 {
- if m.broken {
- return 0
- }
- if len(m.data) < 4 {
- m.broken = true
- return 0
- }
- b := m.data[:4]
- x := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
- m.data = m.data[4:]
- return x
-}
-
-func (m *msg) uint64() uint64 {
- x := uint64(m.uint32()) | uint64(m.uint32())<<32
- if m.broken {
- return 0
- }
- return x
-}
-
-func (m *msg) bytes(n int) []byte {
- if m.broken {
- return nil
- }
- if len(m.data) < n {
- m.broken = true
- return nil
- }
- x := m.data[0:n]
- m.data = m.data[n:]
- return x
-}
-
-// writing to a msg
-
-func (m *msg) wuint32(x uint32) {
- m.data = append(m.data, byte(x), byte(x>>8), byte(x>>16), byte(x>>24))
-}
-
-func (m *msg) wuint64(x uint64) {
- lo := uint32(x)
- hi := uint32(x >> 32)
- m.data = append(m.data, byte(lo), byte(lo>>8), byte(lo>>16), byte(lo>>24), byte(hi), byte(hi>>8), byte(hi>>16), byte(hi>>24))
-}
-
-func (m *msg) wbytes(p []byte) {
- m.data = append(m.data, p...)
-}
-
-func (m *msg) wstring(s string) {
- m.data = append(m.data, s...)
-}
-
-// Parsing of RPC messages.
-//
-// Each message begins with
-// total_size uint32
-// total_descs uint32
-// fragment_size uint32
-// fragment_descs uint32
-//
-// If fragment_size < total_size or fragment_descs < total_descs, the actual
-// message is broken up in multiple messages; follow-up messages omit
-// the "total" fields and begin with the "fragment" fields.
-// We do not support putting fragmented messages back together.
-// To do this we would need to change the message receiver.
-//
-// After that size information, the message header follows:
-// protocol uint32
-// requestID uint32
-// isRequest uint32
-// rpcNumber uint32
-// status uint32
-// numValue uint32
-// numTemplate uint32
-//
-// After the header come numTemplate fixed-size arguments,
-// numValue fixed-size arguments, and then the variable-sized
-// part of the values. The templates describe the expected results
-// and have no associated variable sized data in the request.
-//
-// Each fixed-size argument has the form:
-// tag uint32 // really a char, like 'b' or 'C'
-// pad uint32 // unused
-// val1 uint32
-// val2 uint32
-//
-// The tags are:
-// 'b': bool; val1 == 0 or 1
-// 'C': []byte; val1 == len, data in variable-sized section
-// 'd': float64; (val1, val2) is data
-// 'D': []float64; val1 == len, data in variable-sized section
-// 'h': int; val1 == file descriptor
-// 'i': int32; descriptor in next entry in m.desc
-// 'I': []int; val1 == len, data in variable-sized section
-// 's': string; val1 == len, data in variable-sized section
-//
-
-func (m *msg) pack() error {
- m.data = m.data[:0]
- m.desc = m.desc[:0]
-
- // sizes, to fill in later
- m.wuint32(0)
- m.wuint32(0)
- m.wuint32(0)
- m.wuint32(0)
-
- // message header
- m.wuint32(protocol)
- m.wuint32(m.id)
- m.wuint32(m.isRequest)
- m.wuint32(m.rpc)
- m.wuint32(m.status)
- m.wuint32(uint32(len(m.value)))
- m.wuint32(uint32(len(m.template)))
-
- // fixed-size templates
- for i, x := range m.template {
- var tag, val1, val2 uint32
- switch x.(type) {
- default:
- return errors.New("unexpected template type")
- case bool:
- tag = 'b'
- case []byte:
- tag = 'C'
- val1 = uint32(m.size[i])
- case float64:
- tag = 'd'
- case []float64:
- tag = 'D'
- val1 = uint32(m.size[i])
- case int:
- tag = 'h'
- case int32:
- tag = 'i'
- case []int32:
- tag = 'I'
- val1 = uint32(m.size[i])
- case string:
- tag = 's'
- val1 = uint32(m.size[i])
- }
- m.wuint32(tag)
- m.wuint32(0)
- m.wuint32(val1)
- m.wuint32(val2)
- }
-
- // fixed-size values
- for _, x := range m.value {
- var tag, val1, val2 uint32
- switch x := x.(type) {
- default:
- return errors.New("unexpected value type")
- case bool:
- tag = 'b'
- if x {
- val1 = 1
- }
- case []byte:
- tag = 'C'
- val1 = uint32(len(x))
- case float64:
- tag = 'd'
- v := float64bits(x)
- val1 = uint32(v)
- val2 = uint32(v >> 32)
- case []float64:
- tag = 'D'
- val1 = uint32(len(x))
- case int32:
- tag = 'i'
- m.desc = append(m.desc, x)
- case []int32:
- tag = 'I'
- val1 = uint32(len(x))
- case string:
- tag = 's'
- val1 = uint32(len(x) + 1)
- }
- m.wuint32(tag)
- m.wuint32(0)
- m.wuint32(val1)
- m.wuint32(val2)
- }
-
- // variable-length data for values
- for _, x := range m.value {
- switch x := x.(type) {
- case []byte:
- m.wbytes(x)
- case []float64:
- for _, f := range x {
- m.wuint64(float64bits(f))
- }
- case []int32:
- for _, j := range x {
- m.wuint32(uint32(j))
- }
- case string:
- m.wstring(x)
- m.wstring("\x00")
- }
- }
-
- // fill in sizes
- data := m.data
- m.data = m.data[:0]
- m.wuint32(uint32(len(data)))
- m.wuint32(uint32(len(m.desc)))
- m.wuint32(uint32(len(data)))
- m.wuint32(uint32(len(m.desc)))
- m.data = data
-
- return nil
-}
-
-func (m *msg) unpack() error {
- totalSize := m.uint32()
- totalDesc := m.uint32()
- fragSize := m.uint32()
- fragDesc := m.uint32()
- if totalSize != fragSize || totalDesc != fragDesc {
- return errors.New("Native Client: fragmented RPC messages not supported")
- }
- if m.uint32() != protocol {
- return errors.New("Native Client: RPC protocol mismatch")
- }
-
- // message header
- m.id = m.uint32()
- m.isRequest = m.uint32()
- m.rpc = m.uint32()
- m.status = m.uint32()
- m.value = make([]interface{}, m.uint32())
- m.template = make([]interface{}, m.uint32())
- m.size = make([]int, len(m.template))
- if m.broken {
- return errors.New("Native Client: malformed message")
- }
-
- // fixed-size templates
- for i := range m.template {
- tag := m.uint32()
- m.uint32() // padding
- val1 := m.uint32()
- m.uint32() // val2
- switch tag {
- default:
- return errors.New("Native Client: unexpected template type " + string(rune(tag)))
- case 'b':
- m.template[i] = false
- case 'C':
- m.template[i] = []byte(nil)
- m.size[i] = int(val1)
- case 'd':
- m.template[i] = float64(0)
- case 'D':
- m.template[i] = []float64(nil)
- m.size[i] = int(val1)
- case 'i':
- m.template[i] = int32(0)
- case 'I':
- m.template[i] = []int32(nil)
- m.size[i] = int(val1)
- case 'h':
- m.template[i] = int(0)
- case 's':
- m.template[i] = ""
- m.size[i] = int(val1)
- }
- }
-
- // fixed-size values
- var (
- strsize []uint32
- d int
- )
- for i := range m.value {
- tag := m.uint32()
- m.uint32() // padding
- val1 := m.uint32()
- val2 := m.uint32()
- switch tag {
- default:
- return errors.New("Native Client: unexpected value type " + string(rune(tag)))
- case 'b':
- m.value[i] = val1 > 0
- case 'C':
- m.value[i] = []byte(nil)
- strsize = append(strsize, val1)
- case 'd':
- m.value[i] = float64frombits(uint64(val1) | uint64(val2)<<32)
- case 'D':
- m.value[i] = make([]float64, val1)
- case 'i':
- m.value[i] = int32(val1)
- case 'I':
- m.value[i] = make([]int32, val1)
- case 'h':
- m.value[i] = int(m.desc[d])
- d++
- case 's':
- m.value[i] = ""
- strsize = append(strsize, val1)
- }
- }
-
- // variable-sized parts of values
- for i, x := range m.value {
- switch x := x.(type) {
- case []byte:
- m.value[i] = m.bytes(int(strsize[0]))
- strsize = strsize[1:]
- case []float64:
- for i := range x {
- x[i] = float64frombits(m.uint64())
- }
- case []int32:
- for i := range x {
- x[i] = int32(m.uint32())
- }
- case string:
- m.value[i] = string(m.bytes(int(strsize[0])))
- strsize = strsize[1:]
- }
- }
-
- if len(m.data) > 0 {
- return errors.New("Native Client: junk at end of message")
- }
- return nil
-}
-
-func float64bits(x float64) uint64 {
- return *(*uint64)(unsafe.Pointer(&x))
-}
-
-func float64frombits(x uint64) float64 {
- return *(*float64)(unsafe.Pointer(&x))
-}
-
-// At startup, connect to the name service.
-var nsClient = nsConnect()
-
-func nsConnect() *srpcClient {
- var ns int32 = -1
- _, _, errno := Syscall(sys_nameservice, uintptr(unsafe.Pointer(&ns)), 0, 0)
- if errno != 0 {
- println("Native Client nameservice:", errno.Error())
- return nil
- }
-
- sock, _, errno := Syscall(sys_imc_connect, uintptr(ns), 0, 0)
- if errno != 0 {
- println("Native Client nameservice connect:", errno.Error())
- return nil
- }
-
- c, err := newClient(int(sock))
- if err != nil {
- println("Native Client nameservice init:", err.Error())
- return nil
- }
-
- return c
-}
-
-const (
- nsSuccess = 0
- nsNameNotFound = 1
- nsDuplicateName = 2
- nsInsufficientResources = 3
- nsPermissionDenied = 4
- nsInvalidArgument = 5
-)
-
-func openNamedService(name string, mode int32) (fd int, err error) {
- if nsClient == nil {
- return 0, errors.New("no name service")
- }
- ret, err := nsClient.Call("lookup:si:ih", name, int32(mode))
- if err != nil {
- return 0, err
- }
- status := ret[0].(int32)
- fd = ret[1].(int)
- switch status {
- case nsSuccess:
- // ok
- case nsNameNotFound:
- return -1, ENOENT
- case nsDuplicateName:
- return -1, EEXIST
- case nsInsufficientResources:
- return -1, EWOULDBLOCK
- case nsPermissionDenied:
- return -1, EPERM
- case nsInvalidArgument:
- return -1, EINVAL
- default:
- return -1, EINVAL
- }
- return fd, nil
-}
diff --git a/src/pkg/syscall/str.go b/src/pkg/syscall/str.go
deleted file mode 100644
index 0fce842e8..000000000
--- a/src/pkg/syscall/str.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-func itoa(val int) string { // do it here rather than with fmt to avoid dependency
- if val < 0 {
- return "-" + itoa(-val)
- }
- var buf [32]byte // big enough for int64
- i := len(buf) - 1
- for val >= 10 {
- buf[i] = byte(val%10 + '0')
- i--
- val /= 10
- }
- buf[i] = byte(val + '0')
- return string(buf[i:])
-}
diff --git a/src/pkg/syscall/syscall.go b/src/pkg/syscall/syscall.go
deleted file mode 100644
index f7473fd5a..000000000
--- a/src/pkg/syscall/syscall.go
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package syscall contains an interface to the low-level operating system
-// primitives. The details vary depending on the underlying system, and
-// by default, godoc will display the syscall documentation for the current
-// system. If you want godoc to display syscall documentation for another
-// system, set $GOOS and $GOARCH to the desired system. For example, if
-// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS
-// to freebsd and $GOARCH to arm.
-// The primary use of syscall is inside other packages that provide a more
-// portable interface to the system, such as "os", "time" and "net". Use
-// those packages rather than this one if you can.
-// For details of the functions and data types in this package consult
-// the manuals for the appropriate operating system.
-// These calls return err == nil to indicate success; otherwise
-// err is an operating system error describing the failure.
-// On most systems, that error has type syscall.Errno.
-package syscall
-
-// StringByteSlice is deprecated. Use ByteSliceFromString instead.
-// If s contains a NUL byte this function panics instead of
-// returning an error.
-func StringByteSlice(s string) []byte {
- a, err := ByteSliceFromString(s)
- if err != nil {
- panic("syscall: string with NUL passed to StringByteSlice")
- }
- return a
-}
-
-// ByteSliceFromString returns a NUL-terminated slice of bytes
-// containing the text of s. If s contains a NUL byte at any
-// location, it returns (nil, EINVAL).
-func ByteSliceFromString(s string) ([]byte, error) {
- for i := 0; i < len(s); i++ {
- if s[i] == 0 {
- return nil, EINVAL
- }
- }
- a := make([]byte, len(s)+1)
- copy(a, s)
- return a, nil
-}
-
-// StringBytePtr is deprecated. Use BytePtrFromString instead.
-// If s contains a NUL byte this function panics instead of
-// returning an error.
-func StringBytePtr(s string) *byte { return &StringByteSlice(s)[0] }
-
-// BytePtrFromString returns a pointer to a NUL-terminated array of
-// bytes containing the text of s. If s contains a NUL byte at any
-// location, it returns (nil, EINVAL).
-func BytePtrFromString(s string) (*byte, error) {
- a, err := ByteSliceFromString(s)
- if err != nil {
- return nil, err
- }
- return &a[0], nil
-}
-
-// Single-word zero for use when we need a valid pointer to 0 bytes.
-// See mksyscall.pl.
-var _zero uintptr
-
-func (ts *Timespec) Unix() (sec int64, nsec int64) {
- return int64(ts.Sec), int64(ts.Nsec)
-}
-
-func (tv *Timeval) Unix() (sec int64, nsec int64) {
- return int64(tv.Sec), int64(tv.Usec) * 1000
-}
-
-func (ts *Timespec) Nano() int64 {
- return int64(ts.Sec)*1e9 + int64(ts.Nsec)
-}
-
-func (tv *Timeval) Nano() int64 {
- return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
-}
diff --git a/src/pkg/syscall/syscall_bsd.go b/src/pkg/syscall/syscall_bsd.go
deleted file mode 100644
index b042841a5..000000000
--- a/src/pkg/syscall/syscall_bsd.go
+++ /dev/null
@@ -1,553 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-// BSD system call wrappers shared by *BSD based systems
-// including OS X (Darwin) and FreeBSD. Like the other
-// syscall_*.go files it is compiled as Go code but also
-// used as input to mksyscall which parses the //sys
-// lines and generates system call stubs.
-
-package syscall
-
-import (
- "runtime"
- "unsafe"
-)
-
-/*
- * Wrapped
- */
-
-//sysnb getgroups(ngid int, gid *_Gid_t) (n int, err error)
-//sysnb setgroups(ngid int, gid *_Gid_t) (err error)
-
-func Getgroups() (gids []int, err error) {
- n, err := getgroups(0, nil)
- if err != nil {
- return nil, err
- }
- if n == 0 {
- return nil, nil
- }
-
- // Sanity check group count. Max is 16 on BSD.
- if n < 0 || n > 1000 {
- return nil, EINVAL
- }
-
- a := make([]_Gid_t, n)
- n, err = getgroups(n, &a[0])
- if err != nil {
- return nil, err
- }
- gids = make([]int, n)
- for i, v := range a[0:n] {
- gids[i] = int(v)
- }
- return
-}
-
-func Setgroups(gids []int) (err error) {
- if len(gids) == 0 {
- return setgroups(0, nil)
- }
-
- a := make([]_Gid_t, len(gids))
- for i, v := range gids {
- a[i] = _Gid_t(v)
- }
- return setgroups(len(a), &a[0])
-}
-
-func ReadDirent(fd int, buf []byte) (n int, err error) {
- // Final argument is (basep *uintptr) and the syscall doesn't take nil.
- // 64 bits should be enough. (32 bits isn't even on 386). Since the
- // actual system call is getdirentries64, 64 is a good guess.
- // TODO(rsc): Can we use a single global basep for all calls?
- var base = (*uintptr)(unsafe.Pointer(new(uint64)))
- return Getdirentries(fd, buf, base)
-}
-
-// Wait status is 7 bits at bottom, either 0 (exited),
-// 0x7F (stopped), or a signal number that caused an exit.
-// The 0x80 bit is whether there was a core dump.
-// An extra number (exit code, signal causing a stop)
-// is in the high bits.
-
-type WaitStatus uint32
-
-const (
- mask = 0x7F
- core = 0x80
- shift = 8
-
- exited = 0
- stopped = 0x7F
-)
-
-func (w WaitStatus) Exited() bool { return w&mask == exited }
-
-func (w WaitStatus) ExitStatus() int {
- if w&mask != exited {
- return -1
- }
- return int(w >> shift)
-}
-
-func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 }
-
-func (w WaitStatus) Signal() Signal {
- sig := Signal(w & mask)
- if sig == stopped || sig == 0 {
- return -1
- }
- return sig
-}
-
-func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
-
-func (w WaitStatus) Stopped() bool { return w&mask == stopped && Signal(w>>shift) != SIGSTOP }
-
-func (w WaitStatus) Continued() bool { return w&mask == stopped && Signal(w>>shift) == SIGSTOP }
-
-func (w WaitStatus) StopSignal() Signal {
- if !w.Stopped() {
- return -1
- }
- return Signal(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) TrapCause() int { return -1 }
-
-//sys wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error)
-
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
- var status _C_int
- wpid, err = wait4(pid, &status, options, rusage)
- if wstatus != nil {
- *wstatus = WaitStatus(status)
- }
- return
-}
-
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys Shutdown(s int, how int) (err error)
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Len = SizeofSockaddrInet4
- sa.raw.Family = AF_INET
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Len = SizeofSockaddrInet6
- sa.raw.Family = AF_INET6
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
- name := sa.Name
- n := len(name)
- if n >= len(sa.raw.Path) || n == 0 {
- return nil, 0, EINVAL
- }
- sa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL
- sa.raw.Family = AF_UNIX
- for i := 0; i < n; i++ {
- sa.raw.Path[i] = int8(name[i])
- }
- return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
-}
-
-func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Index == 0 {
- return nil, 0, EINVAL
- }
- sa.raw.Len = sa.Len
- sa.raw.Family = AF_LINK
- sa.raw.Index = sa.Index
- sa.raw.Type = sa.Type
- sa.raw.Nlen = sa.Nlen
- sa.raw.Alen = sa.Alen
- sa.raw.Slen = sa.Slen
- for i := 0; i < len(sa.raw.Data); i++ {
- sa.raw.Data[i] = sa.Data[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
-}
-
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
- switch rsa.Addr.Family {
- case AF_LINK:
- pp := (*RawSockaddrDatalink)(unsafe.Pointer(rsa))
- sa := new(SockaddrDatalink)
- sa.Len = pp.Len
- sa.Family = pp.Family
- sa.Index = pp.Index
- sa.Type = pp.Type
- sa.Nlen = pp.Nlen
- sa.Alen = pp.Alen
- sa.Slen = pp.Slen
- for i := 0; i < len(sa.Data); i++ {
- sa.Data[i] = pp.Data[i]
- }
- return sa, nil
-
- case AF_UNIX:
- pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
- if pp.Len < 2 || pp.Len > SizeofSockaddrUnix {
- return nil, EINVAL
- }
- sa := new(SockaddrUnix)
-
- // Some BSDs include the trailing NUL in the length, whereas
- // others do not. Work around this by subtracting the leading
- // family and len. The path is then scanned to see if a NUL
- // terminator still exists within the length.
- n := int(pp.Len) - 2 // subtract leading Family, Len
- for i := 0; i < n; i++ {
- if pp.Path[i] == 0 {
- // found early NUL; assume Len included the NUL
- // or was overestimating.
- n = i
- break
- }
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
- sa.Name = string(bytes)
- return sa, nil
-
- case AF_INET:
- pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet4)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_INET6:
- pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet6)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
- }
- return nil, EAFNOSUPPORT
-}
-
-func Accept(fd int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept(fd, &rsa, &len)
- if err != nil {
- return
- }
- if runtime.GOOS == "darwin" && len == 0 {
- // Accepted socket has no address.
- // This is likely due to a bug in xnu kernels,
- // where instead of ECONNABORTED error socket
- // is accepted, but has no address.
- Close(nfd)
- return 0, nil, ECONNABORTED
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getsockname(fd, &rsa, &len); err != nil {
- return
- }
- // TODO(jsing): DragonFly has a "bug" (see issue 3349), which should be
- // reported upstream.
- if runtime.GOOS == "dragonfly" && rsa.Addr.Family == AF_UNSPEC && rsa.Addr.Len == 0 {
- rsa.Addr.Family = AF_UNIX
- rsa.Addr.Len = SizeofSockaddrUnix
- }
- return anyToSockaddr(&rsa)
-}
-
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-
-func GetsockoptByte(fd, level, opt int) (value byte, err error) {
- var n byte
- vallen := _Socklen(1)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
- return n, err
-}
-
-func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {
- vallen := _Socklen(4)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
- return value, err
-}
-
-func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {
- var value IPMreq
- vallen := _Socklen(SizeofIPMreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {
- var value IPv6Mreq
- vallen := _Socklen(SizeofIPv6Mreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
- var value IPv6MTUInfo
- vallen := _Socklen(SizeofIPv6MTUInfo)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
- var value ICMPv6Filter
- vallen := _Socklen(SizeofICMPv6Filter)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
- var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
- msg.Namelen = uint32(SizeofSockaddrAny)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // receive at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = recvmsg(fd, &msg, flags); err != nil {
- return
- }
- oobn = int(msg.Controllen)
- recvflags = int(msg.Flags)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
- return
-}
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- var ptr unsafe.Pointer
- var salen _Socklen
- if to != nil {
- ptr, salen, err = to.sockaddr()
- if err != nil {
- return 0, err
- }
- }
- var msg Msghdr
- msg.Name = (*byte)(unsafe.Pointer(ptr))
- msg.Namelen = uint32(salen)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // send at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = sendmsg(fd, &msg, flags); err != nil {
- return 0, err
- }
- if len(oob) > 0 && len(p) == 0 {
- n = 0
- }
- return n, nil
-}
-
-//sys kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error)
-
-func Kevent(kq int, changes, events []Kevent_t, timeout *Timespec) (n int, err error) {
- var change, event unsafe.Pointer
- if len(changes) > 0 {
- change = unsafe.Pointer(&changes[0])
- }
- if len(events) > 0 {
- event = unsafe.Pointer(&events[0])
- }
- return kevent(kq, change, len(changes), event, len(events), timeout)
-}
-
-//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
-
-func Sysctl(name string) (value string, err error) {
- // Translate name to mib number.
- mib, err := nametomib(name)
- if err != nil {
- return "", err
- }
-
- // Find size.
- n := uintptr(0)
- if err = sysctl(mib, nil, &n, nil, 0); err != nil {
- return "", err
- }
- if n == 0 {
- return "", nil
- }
-
- // Read into buffer of that size.
- buf := make([]byte, n)
- if err = sysctl(mib, &buf[0], &n, nil, 0); err != nil {
- return "", err
- }
-
- // Throw away terminating NUL.
- if n > 0 && buf[n-1] == '\x00' {
- n--
- }
- return string(buf[0:n]), nil
-}
-
-func SysctlUint32(name string) (value uint32, err error) {
- // Translate name to mib number.
- mib, err := nametomib(name)
- if err != nil {
- return 0, err
- }
-
- // Read into buffer of that size.
- n := uintptr(4)
- buf := make([]byte, 4)
- if err = sysctl(mib, &buf[0], &n, nil, 0); err != nil {
- return 0, err
- }
- if n != 4 {
- return 0, EIO
- }
- return *(*uint32)(unsafe.Pointer(&buf[0])), nil
-}
-
-//sys utimes(path string, timeval *[2]Timeval) (err error)
-func Utimes(path string, tv []Timeval) (err error) {
- if len(tv) != 2 {
- return EINVAL
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func UtimesNano(path string, ts []Timespec) error {
- // TODO: The BSDs can do utimensat with SYS_UTIMENSAT but it
- // isn't supported by darwin so this uses utimes instead
- if len(ts) != 2 {
- return EINVAL
- }
- // Not as efficient as it could be because Timespec and
- // Timeval have different types in the different OSes
- tv := [2]Timeval{
- NsecToTimeval(TimespecToNsec(ts[0])),
- NsecToTimeval(TimespecToNsec(ts[1])),
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys futimes(fd int, timeval *[2]Timeval) (err error)
-func Futimes(fd int, tv []Timeval) (err error) {
- if len(tv) != 2 {
- return EINVAL
- }
- return futimes(fd, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys fcntl(fd int, cmd int, arg int) (val int, err error)
-
-// TODO: wrap
-// Acct(name nil-string) (err error)
-// Gethostuuid(uuid *byte, timeout *Timespec) (err error)
-// Madvise(addr *byte, len int, behav int) (err error)
-// Mprotect(addr *byte, len int, prot int) (err error)
-// Msync(addr *byte, len int, flags int) (err error)
-// Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error)
-
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
diff --git a/src/pkg/syscall/syscall_bsd_test.go b/src/pkg/syscall/syscall_bsd_test.go
deleted file mode 100644
index c2ea089d5..000000000
--- a/src/pkg/syscall/syscall_bsd_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd openbsd
-
-package syscall_test
-
-import (
- "syscall"
- "testing"
-)
-
-const MNT_WAIT = 1
-
-func TestGetfsstat(t *testing.T) {
- n, err := syscall.Getfsstat(nil, MNT_WAIT)
- if err != nil {
- t.Fatal(err)
- }
-
- data := make([]syscall.Statfs_t, n)
- n, err = syscall.Getfsstat(data, MNT_WAIT)
- if err != nil {
- t.Fatal(err)
- }
-
- empty := syscall.Statfs_t{}
- for _, stat := range data {
- if stat == empty {
- t.Fatal("an empty Statfs_t struct was returned")
- }
- }
-}
diff --git a/src/pkg/syscall/syscall_darwin.go b/src/pkg/syscall/syscall_darwin.go
deleted file mode 100644
index 97414dcda..000000000
--- a/src/pkg/syscall/syscall_darwin.go
+++ /dev/null
@@ -1,508 +0,0 @@
-// 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.
-
-// Darwin 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 (
- errorspkg "errors"
- "unsafe"
-)
-
-const ImplementsGetwd = true
-
-func Getwd() (string, error) {
- buf := make([]byte, 2048)
- attrs, err := getAttrList(".", attrList{CommonAttr: attrCmnFullpath}, buf, 0)
- if err == nil && len(attrs) == 1 && len(attrs[0]) >= 2 {
- wd := string(attrs[0])
- // Sanity check that it's an absolute path and ends
- // in a null byte, which we then strip.
- if wd[0] == '/' && wd[len(wd)-1] == 0 {
- return wd[:len(wd)-1], nil
- }
- }
- // If pkg/os/getwd.go gets ENOTSUP, it will fall back to the
- // slow algorithm.
- return "", ENOTSUP
-}
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
- raw RawSockaddrDatalink
-}
-
-// Translate "kern.hostname" to []_C_int{0,1,2,3}.
-func nametomib(name string) (mib []_C_int, err error) {
- const siz = unsafe.Sizeof(mib[0])
-
- // NOTE(rsc): It seems strange to set the buffer to have
- // size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
- // kernel uses +2 for its own implementation of this function.
- // I am scared that if we don't include the +2 here, the kernel
- // will silently write 2 words farther than we specify
- // and we'll get memory corruption.
- var buf [CTL_MAXNAME + 2]_C_int
- n := uintptr(CTL_MAXNAME) * siz
-
- p := (*byte)(unsafe.Pointer(&buf[0]))
- bytes, err := ByteSliceFromString(name)
- if err != nil {
- return nil, err
- }
-
- // Magic sysctl: "setting" 0.3 to a string name
- // lets you read back the array of integers form.
- if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
- return nil, err
- }
- return buf[0 : n/siz], nil
-}
-
-// 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.Ino == 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
-}
-
-//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
-func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
-func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
-
-const (
- attrBitMapCount = 5
- attrCmnFullpath = 0x08000000
-)
-
-type attrList struct {
- bitmapCount uint16
- _ uint16
- CommonAttr uint32
- VolAttr uint32
- DirAttr uint32
- FileAttr uint32
- Forkattr uint32
-}
-
-func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (attrs [][]byte, err error) {
- if len(attrBuf) < 4 {
- return nil, errorspkg.New("attrBuf too small")
- }
- attrList.bitmapCount = attrBitMapCount
-
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return nil, err
- }
-
- _, _, e1 := Syscall6(
- SYS_GETATTRLIST,
- uintptr(unsafe.Pointer(_p0)),
- uintptr(unsafe.Pointer(&attrList)),
- uintptr(unsafe.Pointer(&attrBuf[0])),
- uintptr(len(attrBuf)),
- uintptr(options),
- 0,
- )
- if e1 != 0 {
- return nil, e1
- }
- size := *(*uint32)(unsafe.Pointer(&attrBuf[0]))
-
- // dat is the section of attrBuf that contains valid data,
- // without the 4 byte length header. All attribute offsets
- // are relative to dat.
- dat := attrBuf
- if int(size) < len(attrBuf) {
- dat = dat[:size]
- }
- dat = dat[4:] // remove length prefix
-
- for i := uint32(0); int(i) < len(dat); {
- header := dat[i:]
- if len(header) < 8 {
- return attrs, errorspkg.New("truncated attribute header")
- }
- datOff := *(*int32)(unsafe.Pointer(&header[0]))
- attrLen := *(*uint32)(unsafe.Pointer(&header[4]))
- if datOff < 0 || uint32(datOff)+attrLen > uint32(len(dat)) {
- return attrs, errorspkg.New("truncated results; attrBuf too small")
- }
- end := uint32(datOff) + attrLen
- attrs = append(attrs, dat[datOff:end])
- i = end
- if r := i % 4; r != 0 {
- i += (4 - r)
- }
- }
- return
-}
-
-//sysnb pipe() (r int, w int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(_p0), bufsize, uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-/*
- * Wrapped
- */
-
-//sys kill(pid int, signum int, posix int) (err error)
-
-func Kill(pid int, signum Signal) (err error) { return kill(pid, int(signum), 1) }
-
-/*
- * 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 Exchangedata(path1 string, path2 string, options int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, 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_FSTAT64
-//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
-//sys Getdtablesize() (size int)
-//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 Getuid() (uid int)
-//sysnb Issetugid() (tainted bool)
-//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_LSTAT64
-//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 Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (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)
-//sys Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Setlogin(name string) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sys Setprivexec(flag 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_STAT64
-//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
-//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 Undelete(path string) (err error)
-//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 readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Mmap
-// Mlock
-// Munlock
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Poll
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// Mlockall
-// Munlockall
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// sendfile
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Msync_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat
diff --git a/src/pkg/syscall/syscall_darwin_386.go b/src/pkg/syscall/syscall_darwin_386.go
deleted file mode 100644
index 2074e7ac2..000000000
--- a/src/pkg/syscall/syscall_darwin_386.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-import "unsafe"
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func 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
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = int32(sec)
- tv.Usec = int32(usec)
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var length = uint64(count)
-
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
-
- written = int(length)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // sic
diff --git a/src/pkg/syscall/syscall_darwin_amd64.go b/src/pkg/syscall/syscall_darwin_amd64.go
deleted file mode 100644
index 81b1fd3d2..000000000
--- a/src/pkg/syscall/syscall_darwin_amd64.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-import "unsafe"
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func 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 = int64(nsec / 1e9)
- return
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = sec
- tv.Usec = usec
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- 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)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var length = uint64(count)
-
- _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
-
- written = int(length)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // sic
diff --git a/src/pkg/syscall/syscall_dragonfly.go b/src/pkg/syscall/syscall_dragonfly.go
deleted file mode 100644
index 39c51df7e..000000000
--- a/src/pkg/syscall/syscall_dragonfly.go
+++ /dev/null
@@ -1,408 +0,0 @@
-// 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.
-
-// FreeBSD 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"
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
- Rcf uint16
- Route [16]uint16
- raw RawSockaddrDatalink
-}
-
-// Translate "kern.hostname" to []_C_int{0,1,2,3}.
-func nametomib(name string) (mib []_C_int, err error) {
- const siz = unsafe.Sizeof(mib[0])
-
- // NOTE(rsc): It seems strange to set the buffer to have
- // size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
- // kernel uses +2 for its own implementation of this function.
- // I am scared that if we don't include the +2 here, the kernel
- // will silently write 2 words farther than we specify
- // and we'll get memory corruption.
- var buf [CTL_MAXNAME + 2]_C_int
- n := uintptr(CTL_MAXNAME) * siz
-
- p := (*byte)(unsafe.Pointer(&buf[0]))
- bytes, err := ByteSliceFromString(name)
- if err != nil {
- return nil, err
- }
-
- // Magic sysctl: "setting" 0.3 to a string name
- // lets you read back the array of integers form.
- if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
- return nil, err
- }
- return buf[0 : n/siz], nil
-}
-
-// 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]))
- reclen := int(16+dirent.Namlen+1+7) & ^7
- buf = buf[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() (r int, w int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-//sys extpread(fd int, p []byte, flags int, offset int64) (n int, err error)
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- return extpread(fd, p, 0, offset)
-}
-
-//sys extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error)
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- return extpwrite(fd, p, 0, offset)
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-/*
- * 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(fd int, 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 Fstatfs(fd int, stat *Statfs_t) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sys Getdtablesize() (size int)
-//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 Signal) (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 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)
-//sys Setlogin(name string) (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 Statfs(path string, stat *Statfs_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 Undelete(path string) (err error)
-//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 readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- * TODO(jsing): Update this list for DragonFly.
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Mmap
-// Mlock
-// Munlock
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Poll
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// Mlockall
-// Munlockall
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Msync_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat
diff --git a/src/pkg/syscall/syscall_dragonfly_386.go b/src/pkg/syscall/syscall_dragonfly_386.go
deleted file mode 100644
index ebd3d4c9c..000000000
--- a/src/pkg/syscall/syscall_dragonfly_386.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-import "unsafe"
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int32(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // sic
diff --git a/src/pkg/syscall/syscall_dragonfly_amd64.go b/src/pkg/syscall/syscall_dragonfly_amd64.go
deleted file mode 100644
index 70c2ffb03..000000000
--- a/src/pkg/syscall/syscall_dragonfly_amd64.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-import "unsafe"
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func 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)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno)
diff --git a/src/pkg/syscall/syscall_freebsd.go b/src/pkg/syscall/syscall_freebsd.go
deleted file mode 100644
index 3d834f52b..000000000
--- a/src/pkg/syscall/syscall_freebsd.go
+++ /dev/null
@@ -1,430 +0,0 @@
-// 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.
-
-// FreeBSD 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"
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [46]int8
- raw RawSockaddrDatalink
-}
-
-// Translate "kern.hostname" to []_C_int{0,1,2,3}.
-func nametomib(name string) (mib []_C_int, err error) {
- const siz = unsafe.Sizeof(mib[0])
-
- // NOTE(rsc): It seems strange to set the buffer to have
- // size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
- // kernel uses +2 for its own implementation of this function.
- // I am scared that if we don't include the +2 here, the kernel
- // will silently write 2 words farther than we specify
- // and we'll get memory corruption.
- var buf [CTL_MAXNAME + 2]_C_int
- n := uintptr(CTL_MAXNAME) * siz
-
- p := (*byte)(unsafe.Pointer(&buf[0]))
- bytes, err := ByteSliceFromString(name)
- if err != nil {
- return nil, err
- }
-
- // Magic sysctl: "setting" 0.3 to a string name
- // lets you read back the array of integers form.
- if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
- return nil, err
- }
- return buf[0 : n/siz], nil
-}
-
-// 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() (r int, w int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
- var value IPMreqn
- vallen := _Socklen(SizeofIPMreqn)
- errno := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, errno
-}
-
-func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
-}
-
-func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept4(fd, &rsa, &len, flags)
- if err != nil {
- return
- }
- if len > SizeofSockaddrAny {
- panic("RawSockaddrAny too small")
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-/*
- * 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(fd int, 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 Fstatfs(fd int, stat *Statfs_t) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sys Getdtablesize() (size int)
-//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 Signal) (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)
-//sys Setlogin(name string) (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 Statfs(path string, stat *Statfs_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 Undelete(path string) (err error)
-//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 readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
-
-/*
- * Unimplemented
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Mmap
-// Mlock
-// Munlock
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Poll
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// Mlockall
-// Munlockall
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Msync_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat
diff --git a/src/pkg/syscall/syscall_freebsd_386.go b/src/pkg/syscall/syscall_freebsd_386.go
deleted file mode 100644
index ebd3d4c9c..000000000
--- a/src/pkg/syscall/syscall_freebsd_386.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-import "unsafe"
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int32(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // sic
diff --git a/src/pkg/syscall/syscall_freebsd_amd64.go b/src/pkg/syscall/syscall_freebsd_amd64.go
deleted file mode 100644
index 70c2ffb03..000000000
--- a/src/pkg/syscall/syscall_freebsd_amd64.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-import "unsafe"
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func 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)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno)
diff --git a/src/pkg/syscall/syscall_freebsd_arm.go b/src/pkg/syscall/syscall_freebsd_arm.go
deleted file mode 100644
index ab72871dd..000000000
--- a/src/pkg/syscall/syscall_freebsd_arm.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-import "unsafe"
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return ts.Sec*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return 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 = nsec / 1e9
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // sic
diff --git a/src/pkg/syscall/syscall_linux.go b/src/pkg/syscall/syscall_linux.go
deleted file mode 100644
index fa0d7ea3c..000000000
--- a/src/pkg/syscall/syscall_linux.go
+++ /dev/null
@@ -1,1025 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Linux 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.
-
-package syscall
-
-import "unsafe"
-
-/*
- * Wrapped
- */
-
-//sys open(path string, mode int, perm uint32) (fd int, err error)
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- return open(path, mode|O_LARGEFILE, perm)
-}
-
-//sys openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
-
-func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- return openat(dirfd, path, flags|O_LARGEFILE, mode)
-}
-
-//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
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sys utimes(path string, times *[2]Timeval) (err error)
-
-func Utimes(path string, tv []Timeval) (err error) {
- if len(tv) != 2 {
- return EINVAL
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys utimensat(dirfd int, path string, times *[2]Timespec) (err error)
-
-func UtimesNano(path string, ts []Timespec) (err error) {
- if len(ts) != 2 {
- return EINVAL
- }
- err = utimensat(_AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])))
- if err != ENOSYS {
- return err
- }
- // If the utimensat syscall isn't available (utimensat was added to Linux
- // in 2.6.22, Released, 8 July 2007) then fall back to utimes
- var tv [2]Timeval
- for i := 0; i < 2; i++ {
- tv[i].Sec = ts[i].Sec
- tv[i].Usec = ts[i].Nsec / 1000
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys futimesat(dirfd int, path *byte, times *[2]Timeval) (err error)
-
-func Futimesat(dirfd int, path string, tv []Timeval) (err error) {
- if len(tv) != 2 {
- return EINVAL
- }
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func Futimes(fd int, tv []Timeval) (err error) {
- // Believe it or not, this is the best we can do on Linux
- // (and is what glibc does).
- return Utimes("/proc/self/fd/"+itoa(fd), tv)
-}
-
-const ImplementsGetwd = true
-
-//sys Getcwd(buf []byte) (n int, err error)
-
-func Getwd() (wd string, err error) {
- var buf [PathMax]byte
- n, err := Getcwd(buf[0:])
- if err != nil {
- return "", err
- }
- // Getcwd returns the number of bytes written to buf, including the NUL.
- if n < 1 || n > len(buf) || buf[n-1] != 0 {
- return "", EINVAL
- }
- return string(buf[0 : n-1]), nil
-}
-
-func Getgroups() (gids []int, err error) {
- n, err := getgroups(0, nil)
- if err != nil {
- return nil, err
- }
- if n == 0 {
- return nil, nil
- }
-
- // Sanity check group count. Max is 1<<16 on Linux.
- if n < 0 || n > 1<<20 {
- return nil, EINVAL
- }
-
- a := make([]_Gid_t, n)
- n, err = getgroups(n, &a[0])
- if err != nil {
- return nil, err
- }
- gids = make([]int, n)
- for i, v := range a[0:n] {
- gids[i] = int(v)
- }
- return
-}
-
-func Setgroups(gids []int) (err error) {
- if len(gids) == 0 {
- return setgroups(0, nil)
- }
-
- a := make([]_Gid_t, len(gids))
- for i, v := range gids {
- a[i] = _Gid_t(v)
- }
- return setgroups(len(a), &a[0])
-}
-
-type WaitStatus uint32
-
-// Wait status is 7 bits at bottom, either 0 (exited),
-// 0x7F (stopped), or a signal number that caused an exit.
-// The 0x80 bit is whether there was a core dump.
-// An extra number (exit code, signal causing a stop)
-// is in the high bits. At least that's the idea.
-// There are various irregularities. For example, the
-// "continued" status is 0xFFFF, distinguishing itself
-// from stopped via the core dump bit.
-
-const (
- mask = 0x7F
- core = 0x80
- exited = 0x00
- stopped = 0x7F
- shift = 8
-)
-
-func (w WaitStatus) Exited() bool { return w&mask == exited }
-
-func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited }
-
-func (w WaitStatus) Stopped() bool { return w&0xFF == stopped }
-
-func (w WaitStatus) Continued() bool { return w == 0xFFFF }
-
-func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
-
-func (w WaitStatus) ExitStatus() int {
- if !w.Exited() {
- return -1
- }
- return int(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) Signal() Signal {
- if !w.Signaled() {
- return -1
- }
- return Signal(w & mask)
-}
-
-func (w WaitStatus) StopSignal() Signal {
- if !w.Stopped() {
- return -1
- }
- return Signal(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) TrapCause() int {
- if w.StopSignal() != SIGTRAP {
- return -1
- }
- return int(w>>shift) >> 8
-}
-
-//sys wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error)
-
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
- var status _C_int
- wpid, err = wait4(pid, &status, options, rusage)
- if wstatus != nil {
- *wstatus = WaitStatus(status)
- }
- return
-}
-
-func Mkfifo(path string, mode uint32) (err error) {
- return Mknod(path, mode|S_IFIFO, 0)
-}
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET6
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
- name := sa.Name
- n := len(name)
- if n >= len(sa.raw.Path) {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_UNIX
- for i := 0; i < n; i++ {
- sa.raw.Path[i] = int8(name[i])
- }
- // length is family (uint16), name, NUL.
- sl := _Socklen(2)
- if n > 0 {
- sl += _Socklen(n) + 1
- }
- if sa.raw.Path[0] == '@' {
- sa.raw.Path[0] = 0
- // Don't count trailing NUL for abstract address.
- sl--
- }
-
- return unsafe.Pointer(&sa.raw), sl, nil
-}
-
-type SockaddrLinklayer struct {
- Protocol uint16
- Ifindex int
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]byte
- raw RawSockaddrLinklayer
-}
-
-func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_PACKET
- sa.raw.Protocol = sa.Protocol
- sa.raw.Ifindex = int32(sa.Ifindex)
- sa.raw.Hatype = sa.Hatype
- sa.raw.Pkttype = sa.Pkttype
- sa.raw.Halen = sa.Halen
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
-}
-
-type SockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
- raw RawSockaddrNetlink
-}
-
-func (sa *SockaddrNetlink) sockaddr() (unsafe.Pointer, _Socklen, error) {
- sa.raw.Family = AF_NETLINK
- sa.raw.Pad = sa.Pad
- sa.raw.Pid = sa.Pid
- sa.raw.Groups = sa.Groups
- return unsafe.Pointer(&sa.raw), SizeofSockaddrNetlink, nil
-}
-
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
- switch rsa.Addr.Family {
- case AF_NETLINK:
- pp := (*RawSockaddrNetlink)(unsafe.Pointer(rsa))
- sa := new(SockaddrNetlink)
- sa.Family = pp.Family
- sa.Pad = pp.Pad
- sa.Pid = pp.Pid
- sa.Groups = pp.Groups
- return sa, nil
-
- case AF_PACKET:
- pp := (*RawSockaddrLinklayer)(unsafe.Pointer(rsa))
- sa := new(SockaddrLinklayer)
- sa.Protocol = pp.Protocol
- sa.Ifindex = int(pp.Ifindex)
- sa.Hatype = pp.Hatype
- sa.Pkttype = pp.Pkttype
- sa.Halen = pp.Halen
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_UNIX:
- pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
- sa := new(SockaddrUnix)
- if pp.Path[0] == 0 {
- // "Abstract" Unix domain socket.
- // Rewrite leading NUL as @ for textual display.
- // (This is the standard convention.)
- // Not friendly to overwrite in place,
- // but the callers below don't care.
- pp.Path[0] = '@'
- }
-
- // Assume path ends at NUL.
- // This is not technically the Linux semantics for
- // abstract Unix domain sockets--they are supposed
- // to be uninterpreted fixed-size binary blobs--but
- // everyone uses this convention.
- n := 0
- for n < len(pp.Path) && pp.Path[n] != 0 {
- n++
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
- sa.Name = string(bytes)
- return sa, nil
-
- case AF_INET:
- pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet4)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_INET6:
- pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet6)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
- }
- return nil, EAFNOSUPPORT
-}
-
-func Accept(fd int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept(fd, &rsa, &len)
- if err != nil {
- return
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept4(fd, &rsa, &len, flags)
- if err != nil {
- return
- }
- if len > SizeofSockaddrAny {
- panic("RawSockaddrAny too small")
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getsockname(fd, &rsa, &len); err != nil {
- return
- }
- return anyToSockaddr(&rsa)
-}
-
-func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {
- vallen := _Socklen(4)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
- return value, err
-}
-
-func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {
- var value IPMreq
- vallen := _Socklen(SizeofIPMreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
- var value IPMreqn
- vallen := _Socklen(SizeofIPMreqn)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {
- var value IPv6Mreq
- vallen := _Socklen(SizeofIPv6Mreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
- var value IPv6MTUInfo
- vallen := _Socklen(SizeofIPv6MTUInfo)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
- var value ICMPv6Filter
- vallen := _Socklen(SizeofICMPv6Filter)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptUcred(fd, level, opt int) (*Ucred, error) {
- var value Ucred
- vallen := _Socklen(SizeofUcred)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
-}
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
- var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
- msg.Namelen = uint32(SizeofSockaddrAny)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // receive at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = recvmsg(fd, &msg, flags); err != nil {
- return
- }
- oobn = int(msg.Controllen)
- recvflags = int(msg.Flags)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
- return
-}
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- var ptr unsafe.Pointer
- var salen _Socklen
- if to != nil {
- var err error
- ptr, salen, err = to.sockaddr()
- if err != nil {
- return 0, err
- }
- }
- var msg Msghdr
- msg.Name = (*byte)(unsafe.Pointer(ptr))
- msg.Namelen = uint32(salen)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // send at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = sendmsg(fd, &msg, flags); err != nil {
- return 0, err
- }
- if len(oob) > 0 && len(p) == 0 {
- n = 0
- }
- return n, nil
-}
-
-// BindToDevice binds the socket associated with fd to device.
-func BindToDevice(fd int, device string) (err error) {
- return SetsockoptString(fd, SOL_SOCKET, SO_BINDTODEVICE, device)
-}
-
-//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
-
-func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err error) {
- // The peek requests are machine-size oriented, so we wrap it
- // to retrieve arbitrary-length data.
-
- // The ptrace syscall differs from glibc's ptrace.
- // Peeks returns the word in *data, not as the return value.
-
- var buf [sizeofPtr]byte
-
- // Leading edge. PEEKTEXT/PEEKDATA don't require aligned
- // access (PEEKUSER warns that it might), but if we don't
- // align our reads, we might straddle an unmapped page
- // boundary and not get the bytes leading up to the page
- // boundary.
- n := 0
- if addr%sizeofPtr != 0 {
- err = ptrace(req, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return 0, err
- }
- n += copy(out, buf[addr%sizeofPtr:])
- out = out[n:]
- }
-
- // Remainder.
- for len(out) > 0 {
- // We use an internal buffer to guarantee alignment.
- // It's not documented if this is necessary, but we're paranoid.
- err = ptrace(req, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return n, err
- }
- copied := copy(out, buf[0:])
- n += copied
- out = out[copied:]
- }
-
- return n, nil
-}
-
-func PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error) {
- return ptracePeek(PTRACE_PEEKTEXT, pid, addr, out)
-}
-
-func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
- return ptracePeek(PTRACE_PEEKDATA, pid, addr, out)
-}
-
-func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (count int, err error) {
- // As for ptracePeek, we need to align our accesses to deal
- // with the possibility of straddling an invalid page.
-
- // Leading edge.
- n := 0
- if addr%sizeofPtr != 0 {
- var buf [sizeofPtr]byte
- err = ptrace(peekReq, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return 0, err
- }
- n += copy(buf[addr%sizeofPtr:], data)
- word := *((*uintptr)(unsafe.Pointer(&buf[0])))
- err = ptrace(pokeReq, pid, addr-addr%sizeofPtr, word)
- if err != nil {
- return 0, err
- }
- data = data[n:]
- }
-
- // Interior.
- for len(data) > sizeofPtr {
- word := *((*uintptr)(unsafe.Pointer(&data[0])))
- err = ptrace(pokeReq, pid, addr+uintptr(n), word)
- if err != nil {
- return n, err
- }
- n += sizeofPtr
- data = data[sizeofPtr:]
- }
-
- // Trailing edge.
- if len(data) > 0 {
- var buf [sizeofPtr]byte
- err = ptrace(peekReq, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return n, err
- }
- copy(buf[0:], data)
- word := *((*uintptr)(unsafe.Pointer(&buf[0])))
- err = ptrace(pokeReq, pid, addr+uintptr(n), word)
- if err != nil {
- return n, err
- }
- n += len(data)
- }
-
- return n, nil
-}
-
-func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {
- return ptracePoke(PTRACE_POKETEXT, PTRACE_PEEKTEXT, pid, addr, data)
-}
-
-func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) {
- return ptracePoke(PTRACE_POKEDATA, PTRACE_PEEKDATA, pid, addr, data)
-}
-
-func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
- return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
-}
-
-func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
- return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
-}
-
-func PtraceSetOptions(pid int, options int) (err error) {
- return ptrace(PTRACE_SETOPTIONS, pid, 0, uintptr(options))
-}
-
-func PtraceGetEventMsg(pid int) (msg uint, err error) {
- var data _C_long
- err = ptrace(PTRACE_GETEVENTMSG, pid, 0, uintptr(unsafe.Pointer(&data)))
- msg = uint(data)
- return
-}
-
-func PtraceCont(pid int, signal int) (err error) {
- return ptrace(PTRACE_CONT, pid, 0, uintptr(signal))
-}
-
-func PtraceSyscall(pid int, signal int) (err error) {
- return ptrace(PTRACE_SYSCALL, pid, 0, uintptr(signal))
-}
-
-func PtraceSingleStep(pid int) (err error) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) }
-
-func PtraceAttach(pid int) (err error) { return ptrace(PTRACE_ATTACH, pid, 0, 0) }
-
-func PtraceDetach(pid int) (err error) { return ptrace(PTRACE_DETACH, pid, 0, 0) }
-
-//sys reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error)
-
-func Reboot(cmd int) (err error) {
- return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, "")
-}
-
-func clen(n []byte) int {
- for i := 0; i < len(n); i++ {
- if n[i] == 0 {
- return i
- }
- }
- return len(n)
-}
-
-func ReadDirent(fd int, buf []byte) (n int, err error) {
- return Getdents(fd, buf)
-}
-
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- count = 0
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- buf = buf[dirent.Reclen:]
- if dirent.Ino == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:clen(bytes[:])])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-//sys mount(source string, target string, fstype string, flags uintptr, data *byte) (err error)
-
-func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) {
- // Certain file systems get rather angry and EINVAL if you give
- // them an empty string of data, rather than NULL.
- if data == "" {
- return mount(source, target, fstype, flags, nil)
- }
- datap, err := BytePtrFromString(data)
- if err != nil {
- return err
- }
- return mount(source, target, fstype, flags, datap)
-}
-
-// Sendto
-// Recvfrom
-// Socketpair
-
-/*
- * Direct access
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Acct(path string) (err error)
-//sys Adjtimex(buf *Timex) (state int, err error)
-//sys Chdir(path string) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Creat(path string, mode uint32) (fd int, err error)
-//sysnb Dup(oldfd int) (fd int, err error)
-//sysnb Dup2(oldfd int, newfd int) (err error)
-//sysnb Dup3(oldfd int, newfd int, flags int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
-//sysnb EpollCreate1(flag int) (fd int, err error)
-//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Exit(code int) = SYS_EXIT_GROUP
-//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
-//sys Fallocate(fd int, mode uint32, off int64, len int64) (err error)
-//sys Fchdir(fd int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
-//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
-//sys fcntl(fd int, cmd int, arg int) (val int, err error)
-//sys Fdatasync(fd int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fsync(fd int) (err error)
-//sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pid int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Gettid() (tid int)
-//sys Getxattr(path string, attr string, dest []byte) (sz int, err error)
-//sys InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error)
-//sysnb InotifyInit() (fd int, err error)
-//sysnb InotifyInit1(flags int) (fd int, err error)
-//sysnb InotifyRmWatch(fd int, watchdesc uint32) (success int, err error)
-//sysnb Kill(pid int, sig Signal) (err error)
-//sys Klogctl(typ int, buf []byte) (n int, err error) = SYS_SYSLOG
-//sys Link(oldpath string, newpath string) (err error)
-//sys Listxattr(path string, dest []byte) (sz int, err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Pause() (err error)
-//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
-//sysnb prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) = SYS_PRLIMIT64
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Removexattr(path string, attr string) (err error)
-//sys Rename(oldpath string, newpath string) (err error)
-//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Setdomainname(p []byte) (err error)
-//sys Sethostname(p []byte) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tv *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sys Setxattr(path string, attr string, data []byte, flags int) (err error)
-//sys Symlink(oldpath string, newpath string) (err error)
-//sys Sync()
-//sysnb Sysinfo(info *Sysinfo_t) (err error)
-//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
-//sysnb Tgkill(tgid int, tid int, sig Signal) (err error)
-//sysnb Times(tms *Tms) (ticks uintptr, err error)
-//sysnb Umask(mask int) (oldmask int)
-//sysnb Uname(buf *Utsname) (err error)
-//sys Unlink(path string) (err error)
-//sys Unlinkat(dirfd int, path string) (err error)
-//sys Unmount(target string, flags int) (err error) = SYS_UMOUNT2
-//sys Unshare(flags int) (err error)
-//sys Ustat(dev int, ubuf *Ustat_t) (err error)
-//sys Utime(path string, buf *Utimbuf) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys exitThread(code int) (err error) = SYS_EXIT
-//sys readlen(fd int, p *byte, np int) (n int, err error) = SYS_READ
-//sys writelen(fd int, p *byte, np int) (n int, err error) = SYS_WRITE
-
-// mmap varies by architecture; see syscall_linux_*.go.
-//sys munmap(addr uintptr, length uintptr) (err error)
-
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
-
-//sys Madvise(b []byte, advice int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Munlockall() (err error)
-
-/*
- * Unimplemented
- */
-// AddKey
-// AfsSyscall
-// Alarm
-// ArchPrctl
-// Brk
-// Capget
-// Capset
-// ClockGetres
-// ClockGettime
-// ClockNanosleep
-// ClockSettime
-// Clone
-// CreateModule
-// DeleteModule
-// EpollCtlOld
-// EpollPwait
-// EpollWaitOld
-// Eventfd
-// Execve
-// Fadvise64
-// Fgetxattr
-// Flistxattr
-// Fork
-// Fremovexattr
-// Fsetxattr
-// Futex
-// GetKernelSyms
-// GetMempolicy
-// GetRobustList
-// GetThreadArea
-// Getitimer
-// Getpmsg
-// IoCancel
-// IoDestroy
-// IoGetevents
-// IoSetup
-// IoSubmit
-// Ioctl
-// IoprioGet
-// IoprioSet
-// KexecLoad
-// Keyctl
-// Lgetxattr
-// Llistxattr
-// LookupDcookie
-// Lremovexattr
-// Lsetxattr
-// Mbind
-// MigratePages
-// Mincore
-// ModifyLdt
-// Mount
-// MovePages
-// Mprotect
-// MqGetsetattr
-// MqNotify
-// MqOpen
-// MqTimedreceive
-// MqTimedsend
-// MqUnlink
-// Mremap
-// Msgctl
-// Msgget
-// Msgrcv
-// Msgsnd
-// Msync
-// Newfstatat
-// Nfsservctl
-// Personality
-// Poll
-// Ppoll
-// Prctl
-// Pselect6
-// Ptrace
-// Putpmsg
-// QueryModule
-// Quotactl
-// Readahead
-// Readv
-// RemapFilePages
-// RequestKey
-// RestartSyscall
-// RtSigaction
-// RtSigpending
-// RtSigprocmask
-// RtSigqueueinfo
-// RtSigreturn
-// RtSigsuspend
-// RtSigtimedwait
-// SchedGetPriorityMax
-// SchedGetPriorityMin
-// SchedGetaffinity
-// SchedGetparam
-// SchedGetscheduler
-// SchedRrGetInterval
-// SchedSetaffinity
-// SchedSetparam
-// SchedYield
-// Security
-// Semctl
-// Semget
-// Semop
-// Semtimedop
-// SetMempolicy
-// SetRobustList
-// SetThreadArea
-// SetTidAddress
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Sigaltstack
-// Signalfd
-// Swapoff
-// Swapon
-// Sysfs
-// TimerCreate
-// TimerDelete
-// TimerGetoverrun
-// TimerGettime
-// TimerSettime
-// Timerfd
-// Tkill (obsolete)
-// Tuxcall
-// Umount2
-// Uselib
-// Utimensat
-// Vfork
-// Vhangup
-// Vmsplice
-// Vserver
-// Waitid
-// _Sysctl
diff --git a/src/pkg/syscall/syscall_linux_386.go b/src/pkg/syscall/syscall_linux_386.go
deleted file mode 100644
index c491a286c..000000000
--- a/src/pkg/syscall/syscall_linux_386.go
+++ /dev/null
@@ -1,356 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-package syscall
-
-import "unsafe"
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func 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.Sec = int32(nsec / 1e9)
- tv.Usec = int32(nsec % 1e9 / 1e3)
- return
-}
-
-// 64-bit file system and 32-bit uid calls
-// (386 default is 32-bit file system and 16-bit uid).
-//sys Chown(path string, uid int, gid int) (err error) = SYS_CHOWN32
-//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
-//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
-//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
-//sysnb Getegid() (egid int) = SYS_GETEGID32
-//sysnb Geteuid() (euid int) = SYS_GETEUID32
-//sysnb Getgid() (gid int) = SYS_GETGID32
-//sysnb Getuid() (uid int) = SYS_GETUID32
-//sys Ioperm(from int, num int, on int) (err error)
-//sys Iopl(level int) (err error)
-//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
-//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
-//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
-//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32
-//sysnb Setgid(gid int) (err error) = SYS_SETGID32
-//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
-//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
-//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
-//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32
-//sysnb setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
-
-//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- page := uintptr(offset / 4096)
- if offset != int64(page)*4096 {
- return 0, EINVAL
- }
- return mmap2(addr, length, prot, flags, fd, page)
-}
-
-type rlimit32 struct {
- Cur uint32
- Max uint32
-}
-
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
-
-const rlimInf32 = ^uint32(0)
-const rlimInf64 = ^uint64(0)
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, nil, rlim)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- err = getrlimit(resource, &rl)
- if err != nil {
- return
- }
-
- if rl.Cur == rlimInf32 {
- rlim.Cur = rlimInf64
- } else {
- rlim.Cur = uint64(rl.Cur)
- }
-
- if rl.Max == rlimInf32 {
- rlim.Max = rlimInf64
- } else {
- rlim.Max = uint64(rl.Max)
- }
- return
-}
-
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, rlim, nil)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- if rlim.Cur == rlimInf64 {
- rl.Cur = rlimInf32
- } else if rlim.Cur < uint64(rlimInf32) {
- rl.Cur = uint32(rlim.Cur)
- } else {
- return EINVAL
- }
- if rlim.Max == rlimInf64 {
- rl.Max = rlimInf32
- } else if rlim.Max < uint64(rlimInf32) {
- rl.Max = uint32(rlim.Max)
- } else {
- return EINVAL
- }
-
- return setrlimit(resource, &rl)
-}
-
-// Underlying system call writes to newoffset via pointer.
-// Implemented in assembly to avoid allocation.
-func seek(fd int, offset int64, whence int) (newoffset int64, err Errno)
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- newoffset, errno := seek(fd, offset, whence)
- if errno != 0 {
- return 0, errno
- }
- return newoffset, nil
-}
-
-// Vsyscalls on amd64.
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Time(t *Time_t) (tt Time_t, err error)
-
-// On x86 Linux, all the socket calls go through an extra indirection,
-// I think because the 5-register system call interface can't handle
-// the 6-argument calls like sendto and recvfrom. Instead the
-// arguments to the underlying system call are the number below
-// and a pointer to an array of uintptr. We hide the pointer in the
-// socketcall assembly to avoid allocation on every system call.
-
-const (
- // see linux/net.h
- _SOCKET = 1
- _BIND = 2
- _CONNECT = 3
- _LISTEN = 4
- _ACCEPT = 5
- _GETSOCKNAME = 6
- _GETPEERNAME = 7
- _SOCKETPAIR = 8
- _SEND = 9
- _RECV = 10
- _SENDTO = 11
- _RECVFROM = 12
- _SHUTDOWN = 13
- _SETSOCKOPT = 14
- _GETSOCKOPT = 15
- _SENDMSG = 16
- _RECVMSG = 17
- _ACCEPT4 = 18
- _RECVMMSG = 19
- _SENDMMSG = 20
-)
-
-func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err Errno)
-func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err Errno)
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- fd, e := socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
- fd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, e := rawsocketcall(_GETSOCKNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, e := rawsocketcall(_GETPEERNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) {
- _, e := rawsocketcall(_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, e := socketcall(_BIND, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, e := socketcall(_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- fd, e := rawsocketcall(_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, e := socketcall(_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, e := socketcall(_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), vallen, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var base uintptr
- if len(p) > 0 {
- base = uintptr(unsafe.Pointer(&p[0]))
- }
- n, e := socketcall(_RECVFROM, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var base uintptr
- if len(p) > 0 {
- base = uintptr(unsafe.Pointer(&p[0]))
- }
- _, e := socketcall(_SENDTO, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e != 0 {
- err = e
- }
- return
-}
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- n, e := socketcall(_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- n, e := socketcall(_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func Listen(s int, n int) (err error) {
- _, e := socketcall(_LISTEN, uintptr(s), uintptr(n), 0, 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func Shutdown(s, how int) (err error) {
- _, e := socketcall(_SHUTDOWN, uintptr(s), uintptr(how), 0, 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func (r *PtraceRegs) PC() uint64 { return uint64(uint32(r.Eip)) }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Eip = int32(pc) }
-
-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)
-}
diff --git a/src/pkg/syscall/syscall_linux_amd64.go b/src/pkg/syscall/syscall_linux_amd64.go
deleted file mode 100644
index 8915ed83b..000000000
--- a/src/pkg/syscall/syscall_linux_amd64.go
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (euid int)
-//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Getuid() (uid int)
-//sys Ioperm(from int, num int, on int) (err error)
-//sys Iopl(level int) (err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Listen(s int, n int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys Setfsgid(gid int) (err error)
-//sys Setfsuid(uid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, buf *Statfs_t) (err error)
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb setgroups(n int, list *_Gid_t) (err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func Getpagesize() int { return 4096 }
-
-//go:noescape
-func gettimeofday(tv *Timeval) (err Errno)
-
-func Gettimeofday(tv *Timeval) (err error) {
- errno := gettimeofday(tv)
- if errno != 0 {
- return errno
- }
- return nil
-}
-
-func Time(t *Time_t) (tt Time_t, err error) {
- var tv Timeval
- errno := gettimeofday(&tv)
- if errno != 0 {
- return 0, errno
- }
- if t != nil {
- *t = Time_t(tv.Sec)
- }
- return Time_t(tv.Sec), nil
-}
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func 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.Sec = nsec / 1e9
- tv.Usec = nsec % 1e9 / 1e3
- return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Rip }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint64(length)
-}
diff --git a/src/pkg/syscall/syscall_linux_arm.go b/src/pkg/syscall/syscall_linux_arm.go
deleted file mode 100644
index 9fe80232a..000000000
--- a/src/pkg/syscall/syscall_linux_arm.go
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-import "unsafe"
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = int32(nsec / 1e9)
- tv.Usec = int32(nsec % 1e9 / 1e3)
- return
-}
-
-// Underlying system call writes to newoffset via pointer.
-// Implemented in assembly to avoid allocation.
-func seek(fd int, offset int64, whence int) (newoffset int64, err Errno)
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- newoffset, errno := seek(fd, offset, whence)
- if errno != 0 {
- return 0, errno
- }
- return newoffset, nil
-}
-
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32
-//sysnb setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb socketpair(domain int, typ int, flags int, fd *[2]int32) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-
-// 64-bit file system and 32-bit uid calls
-// (16-bit uid calls are not always supported in newer kernels)
-//sys Chown(path string, uid int, gid int) (err error) = SYS_CHOWN32
-//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
-//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
-//sysnb Getegid() (egid int) = SYS_GETEGID32
-//sysnb Geteuid() (euid int) = SYS_GETEUID32
-//sysnb Getgid() (gid int) = SYS_GETGID32
-//sysnb Getuid() (uid int) = SYS_GETUID32
-//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
-//sys Listen(s int, n int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
-//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
-//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32
-//sysnb Setgid(gid int) (err error) = SYS_SETGID32
-//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
-//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
-//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
-//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
-
-// Vsyscalls on amd64.
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Time(t *Time_t) (tt Time_t, err error)
-
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
-//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
-
-//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- page := uintptr(offset / 4096)
- if offset != int64(page)*4096 {
- return 0, EINVAL
- }
- return mmap2(addr, length, prot, flags, fd, page)
-}
-
-type rlimit32 struct {
- Cur uint32
- Max uint32
-}
-
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
-
-const rlimInf32 = ^uint32(0)
-const rlimInf64 = ^uint64(0)
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, nil, rlim)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- err = getrlimit(resource, &rl)
- if err != nil {
- return
- }
-
- if rl.Cur == rlimInf32 {
- rlim.Cur = rlimInf64
- } else {
- rlim.Cur = uint64(rl.Cur)
- }
-
- if rl.Max == rlimInf32 {
- rlim.Max = rlimInf64
- } else {
- rlim.Max = uint64(rl.Max)
- }
- return
-}
-
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, rlim, nil)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- if rlim.Cur == rlimInf64 {
- rl.Cur = rlimInf32
- } else if rlim.Cur < uint64(rlimInf32) {
- rl.Cur = uint32(rlim.Cur)
- } else {
- return EINVAL
- }
- if rlim.Max == rlimInf64 {
- rl.Max = rlimInf32
- } else if rlim.Max < uint64(rlimInf32) {
- rl.Max = uint32(rlim.Max)
- } else {
- return EINVAL
- }
-
- return setrlimit(resource, &rl)
-}
-
-func (r *PtraceRegs) PC() uint64 { return uint64(r.Uregs[15]) }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Uregs[15] = uint32(pc) }
-
-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)
-}
diff --git a/src/pkg/syscall/syscall_nacl.go b/src/pkg/syscall/syscall_nacl.go
deleted file mode 100644
index c2788b20a..000000000
--- a/src/pkg/syscall/syscall_nacl.go
+++ /dev/null
@@ -1,311 +0,0 @@
-// Copyright 2013 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
-
-import (
- "sync"
- "unsafe"
-)
-
-//sys naclClose(fd int) (err error) = sys_close
-//sys Exit(code int) (err error)
-//sys naclFstat(fd int, stat *Stat_t) (err error) = sys_fstat
-//sys naclRead(fd int, b []byte) (n int, err error) = sys_read
-//sys naclSeek(fd int, off *int64, whence int) (err error) = sys_lseek
-
-const direntSize = 8 + 8 + 2 + 256
-
-// native_client/src/trusted/service_runtime/include/sys/dirent.h
-type Dirent struct {
- Ino int64
- Off int64
- Reclen uint16
- Name [256]byte
-}
-
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- count = 0
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- buf = buf[dirent.Reclen:]
- if dirent.Ino == 0 { // File absent in directory.
- continue
- }
- bytes := (*[512 + PathMax]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:clen(bytes[:])])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-func clen(n []byte) int {
- for i := 0; i < len(n); i++ {
- if n[i] == 0 {
- return i
- }
- }
- return len(n)
-}
-
-const PathMax = 256
-
-// An Errno is an unsigned number describing an error condition.
-// It implements the error interface. The zero Errno is by convention
-// a non-error, so code to convert from Errno to error should use:
-// err = nil
-// if errno != 0 {
-// err = errno
-// }
-type Errno uintptr
-
-func (e Errno) Error() string {
- if 0 <= int(e) && int(e) < len(errorstr) {
- s := errorstr[e]
- if s != "" {
- return s
- }
- }
- return "errno " + itoa(int(e))
-}
-
-func (e Errno) Temporary() bool {
- return e == EINTR || e == EMFILE || e.Timeout()
-}
-
-func (e Errno) Timeout() bool {
- return e == EAGAIN || e == EWOULDBLOCK || e == ETIMEDOUT
-}
-
-// A Signal is a number describing a process signal.
-// It implements the os.Signal interface.
-type Signal int
-
-const (
- _ Signal = iota
- SIGCHLD
- SIGINT
- SIGKILL
- SIGTRAP
- SIGQUIT
-)
-
-func (s Signal) Signal() {}
-
-func (s Signal) String() string {
- if 0 <= s && int(s) < len(signals) {
- str := signals[s]
- if str != "" {
- return str
- }
- }
- return "signal " + itoa(int(s))
-}
-
-var signals = [...]string{}
-
-// File system
-
-const (
- Stdin = 0
- Stdout = 1
- Stderr = 2
-)
-
-// native_client/src/trusted/service_runtime/include/sys/fcntl.h
-const (
- O_RDONLY = 0
- O_WRONLY = 1
- O_RDWR = 2
- O_ACCMODE = 3
-
- O_CREAT = 0100
- O_CREATE = O_CREAT // for ken
- O_TRUNC = 01000
- O_APPEND = 02000
- O_EXCL = 0200
- O_NONBLOCK = 04000
- O_NDELAY = O_NONBLOCK
- O_SYNC = 010000
- O_FSYNC = O_SYNC
- O_ASYNC = 020000
-
- O_CLOEXEC = 0
-
- FD_CLOEXEC = 1
-)
-
-// native_client/src/trusted/service_runtime/include/sys/fcntl.h
-const (
- F_DUPFD = 0
- F_GETFD = 1
- F_SETFD = 2
- F_GETFL = 3
- F_SETFL = 4
- F_GETOWN = 5
- F_SETOWN = 6
- F_GETLK = 7
- F_SETLK = 8
- F_SETLKW = 9
- F_RGETLK = 10
- F_RSETLK = 11
- F_CNVT = 12
- F_RSETLKW = 13
-
- F_RDLCK = 1
- F_WRLCK = 2
- F_UNLCK = 3
- F_UNLKSYS = 4
-)
-
-// native_client/src/trusted/service_runtime/include/bits/stat.h
-const (
- S_IFMT = 0000370000
- S_IFSHM_SYSV = 0000300000
- S_IFSEMA = 0000270000
- S_IFCOND = 0000260000
- S_IFMUTEX = 0000250000
- S_IFSHM = 0000240000
- S_IFBOUNDSOCK = 0000230000
- S_IFSOCKADDR = 0000220000
- S_IFDSOCK = 0000210000
-
- S_IFSOCK = 0000140000
- S_IFLNK = 0000120000
- S_IFREG = 0000100000
- S_IFBLK = 0000060000
- S_IFDIR = 0000040000
- S_IFCHR = 0000020000
- S_IFIFO = 0000010000
-
- S_UNSUP = 0000370000
-
- S_ISUID = 0004000
- S_ISGID = 0002000
- S_ISVTX = 0001000
-
- S_IREAD = 0400
- S_IWRITE = 0200
- S_IEXEC = 0100
-
- S_IRWXU = 0700
- S_IRUSR = 0400
- S_IWUSR = 0200
- S_IXUSR = 0100
-
- S_IRWXG = 070
- S_IRGRP = 040
- S_IWGRP = 020
- S_IXGRP = 010
-
- S_IRWXO = 07
- S_IROTH = 04
- S_IWOTH = 02
- S_IXOTH = 01
-)
-
-// native_client/src/trusted/service_runtime/include/sys/stat.h
-// native_client/src/trusted/service_runtime/include/machine/_types.h
-type Stat_t struct {
- Dev int64
- Ino uint64
- Mode uint32
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev int64
- Size int64
- Blksize int32
- Blocks int32
- Atime int64
- AtimeNsec int64
- Mtime int64
- MtimeNsec int64
- Ctime int64
- CtimeNsec int64
-}
-
-// Processes
-// Not supported on NaCl - just enough for package os.
-
-var ForkLock sync.RWMutex
-
-type WaitStatus uint32
-
-func (w WaitStatus) Exited() bool { return false }
-func (w WaitStatus) ExitStatus() int { return 0 }
-func (w WaitStatus) Signaled() bool { return false }
-func (w WaitStatus) Signal() Signal { return 0 }
-func (w WaitStatus) CoreDump() bool { return false }
-func (w WaitStatus) Stopped() bool { return false }
-func (w WaitStatus) Continued() bool { return false }
-func (w WaitStatus) StopSignal() Signal { return 0 }
-func (w WaitStatus) TrapCause() int { return 0 }
-
-// XXX made up
-type Rusage struct {
- Utime Timeval
- Stime Timeval
-}
-
-// XXX made up
-type ProcAttr struct {
- Dir string
- Env []string
- Files []uintptr
- Sys *SysProcAttr
-}
-
-type SysProcAttr struct {
-}
-
-// System
-
-func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) { return 0, 0, ENOSYS }
-func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) { return 0, 0, ENOSYS }
-func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) {
- return 0, 0, ENOSYS
-}
-
-func Sysctl(key string) (string, error) {
- if key == "kern.hostname" {
- return "naclbox", nil
- }
- return "", ENOSYS
-}
-
-// Unimplemented Unix midden heap.
-
-const ImplementsGetwd = false
-
-func Getwd() (wd string, err error) { return "", ENOSYS }
-func Getegid() int { return 1 }
-func Geteuid() int { return 1 }
-func Getgid() int { return 1 }
-func Getgroups() ([]int, error) { return []int{1}, nil }
-func Getpagesize() int { return 65536 }
-func Getppid() int { return 2 }
-func Getpid() int { return 3 }
-func Getuid() int { return 1 }
-func Kill(pid int, signum Signal) error { return ENOSYS }
-func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- return 0, ENOSYS
-}
-func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid int, handle uintptr, err error) {
- return 0, 0, ENOSYS
-}
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
- return 0, ENOSYS
-}
-func RouteRIB(facility, param int) ([]byte, error) { return nil, ENOSYS }
-func ParseRoutingMessage(b []byte) ([]RoutingMessage, error) { return nil, ENOSYS }
-func ParseRoutingSockaddr(msg RoutingMessage) ([]Sockaddr, error) { return nil, ENOSYS }
-func SysctlUint32(name string) (value uint32, err error) { return 0, ENOSYS }
diff --git a/src/pkg/syscall/syscall_nacl_386.go b/src/pkg/syscall/syscall_nacl_386.go
deleted file mode 100644
index d12f8e2d6..000000000
--- a/src/pkg/syscall/syscall_nacl_386.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2013 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
-
-type Timespec struct {
- Sec int64
- Nsec int32
-}
-
-type Timeval struct {
- Sec int64
- Usec int32
-}
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int64(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func 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 = int64(nsec / 1e9)
- return
-}
diff --git a/src/pkg/syscall/syscall_nacl_amd64p32.go b/src/pkg/syscall/syscall_nacl_amd64p32.go
deleted file mode 100644
index d12f8e2d6..000000000
--- a/src/pkg/syscall/syscall_nacl_amd64p32.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2013 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
-
-type Timespec struct {
- Sec int64
- Nsec int32
-}
-
-type Timeval struct {
- Sec int64
- Usec int32
-}
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int64(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func 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 = int64(nsec / 1e9)
- return
-}
diff --git a/src/pkg/syscall/syscall_netbsd.go b/src/pkg/syscall/syscall_netbsd.go
deleted file mode 100644
index 97812717f..000000000
--- a/src/pkg/syscall/syscall_netbsd.go
+++ /dev/null
@@ -1,489 +0,0 @@
-// 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"
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
- raw RawSockaddrDatalink
-}
-
-func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno)
-
-func sysctlNodes(mib []_C_int) (nodes []Sysctlnode, err error) {
- var olen uintptr
-
- // Get a list of all sysctl nodes below the given MIB by performing
- // a sysctl for the given MIB with CTL_QUERY appended.
- mib = append(mib, CTL_QUERY)
- qnode := Sysctlnode{Flags: SYSCTL_VERS_1}
- qp := (*byte)(unsafe.Pointer(&qnode))
- sz := unsafe.Sizeof(qnode)
- if err = sysctl(mib, nil, &olen, qp, sz); err != nil {
- return nil, err
- }
-
- // Now that we know the size, get the actual nodes.
- nodes = make([]Sysctlnode, olen/sz)
- np := (*byte)(unsafe.Pointer(&nodes[0]))
- if err = sysctl(mib, np, &olen, qp, sz); err != nil {
- return nil, err
- }
-
- return nodes, nil
-}
-
-func nametomib(name string) (mib []_C_int, err error) {
-
- // Split name into components.
- var parts []string
- last := 0
- for i := 0; i < len(name); i++ {
- if name[i] == '.' {
- parts = append(parts, name[last:i])
- last = i + 1
- }
- }
- parts = append(parts, name[last:])
-
- // Discover the nodes and construct the MIB OID.
- for partno, part := range parts {
- nodes, err := sysctlNodes(mib)
- if err != nil {
- return nil, err
- }
- for _, node := range nodes {
- n := make([]byte, 0)
- for i := range node.Name {
- if node.Name[i] != 0 {
- n = append(n, byte(node.Name[i]))
- }
- }
- if string(n) == part {
- mib = append(mib, _C_int(node.Num))
- break
- }
- }
- if len(mib) != partno+1 {
- return nil, EINVAL
- }
- }
-
- return mib, nil
-}
-
-// 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() (fd1 int, fd2 int, err error)
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-//sys getdents(fd int, buf []byte) (n int, err error)
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- return getdents(fd, buf)
-}
-
-// TODO
-func sendfile(outfd int, infd int, offset *int64, count int) (written 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(fd int, 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 Signal) (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 readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// ____semctl13
-// __clone
-// __fhopen40
-// __fhstat40
-// __fhstatvfs140
-// __fstat30
-// __getcwd
-// __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
diff --git a/src/pkg/syscall/syscall_netbsd_386.go b/src/pkg/syscall/syscall_netbsd_386.go
deleted file mode 100644
index 2dbff07f1..000000000
--- a/src/pkg/syscall/syscall_netbsd_386.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-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 = int64(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 = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = uint32(mode)
- k.Flags = uint32(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)
-}
diff --git a/src/pkg/syscall/syscall_netbsd_amd64.go b/src/pkg/syscall/syscall_netbsd_amd64.go
deleted file mode 100644
index 5784db99a..000000000
--- a/src/pkg/syscall/syscall_netbsd_amd64.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-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 = int64(nsec / 1e9)
- ts.Nsec = int64(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 = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = uint32(mode)
- k.Flags = uint32(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)
-}
diff --git a/src/pkg/syscall/syscall_netbsd_arm.go b/src/pkg/syscall/syscall_netbsd_arm.go
deleted file mode 100644
index 659698aac..000000000
--- a/src/pkg/syscall/syscall_netbsd_arm.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2013 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 = int64(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 = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = uint32(mode)
- k.Flags = uint32(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)
-}
diff --git a/src/pkg/syscall/syscall_no_getwd.go b/src/pkg/syscall/syscall_no_getwd.go
deleted file mode 100644
index 0080c5ca0..000000000
--- a/src/pkg/syscall/syscall_no_getwd.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build dragonfly freebsd netbsd openbsd
-
-package syscall
-
-const ImplementsGetwd = false
-
-func Getwd() (string, error) { return "", ENOTSUP }
diff --git a/src/pkg/syscall/syscall_openbsd.go b/src/pkg/syscall/syscall_openbsd.go
deleted file mode 100644
index 8d3f825f8..000000000
--- a/src/pkg/syscall/syscall_openbsd.go
+++ /dev/null
@@ -1,299 +0,0 @@
-// 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.
-
-// OpenBSD 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"
-
-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) {
-
- // Perform lookup via a binary search
- left := 0
- right := len(sysctlMib) - 1
- for {
- idx := left + (right-left)/2
- switch {
- case name == sysctlMib[idx].ctlname:
- return sysctlMib[idx].ctloid, nil
- case name > sysctlMib[idx].ctlname:
- left = idx + 1
- default:
- right = idx - 1
- }
- if left > right {
- break
- }
- }
- 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
-}
-
-//sys getdents(fd int, buf []byte) (n int, err error)
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- return getdents(fd, buf)
-}
-
-// TODO
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- return -1, ENOSYS
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-/*
- * 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(fd int, 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 Fstatfs(fd int, stat *Statfs_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 Signal) (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)
-//sys Setlogin(name string) (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 Statfs(path string, stat *Statfs_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 readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// __getcwd
-// __semctl
-// __syscall
-// __sysctl
-// adjfreq
-// break
-// clock_getres
-// clock_gettime
-// clock_settime
-// closefrom
-// execve
-// faccessat
-// fchmodat
-// fchownat
-// fcntl
-// fhopen
-// fhstat
-// fhstatfs
-// fork
-// fstatat
-// futimens
-// getfh
-// getgid
-// getitimer
-// getlogin
-// getresgid
-// getresuid
-// getrtable
-// getthrid
-// ioctl
-// ktrace
-// lfs_bmapv
-// lfs_markv
-// lfs_segclean
-// lfs_segwait
-// linkat
-// mincore
-// minherit
-// mkdirat
-// mkfifoat
-// mknodat
-// mlock
-// mlockall
-// mount
-// mquery
-// msgctl
-// msgget
-// msgrcv
-// msgsnd
-// munlock
-// munlockall
-// nfssvc
-// nnpfspioctl
-// openat
-// poll
-// preadv
-// profil
-// pwritev
-// quotactl
-// readlinkat
-// readv
-// reboot
-// renameat
-// rfork
-// sched_yield
-// semget
-// semop
-// setgroups
-// setitimer
-// setresgid
-// setresuid
-// setrtable
-// setsockopt
-// shmat
-// shmctl
-// shmdt
-// shmget
-// sigaction
-// sigaltstack
-// sigpending
-// sigprocmask
-// sigreturn
-// sigsuspend
-// symlinkat
-// sysarch
-// syscall
-// threxit
-// thrsigdivert
-// thrsleep
-// thrwakeup
-// unlinkat
-// utimensat
-// vfork
-// writev
diff --git a/src/pkg/syscall/syscall_openbsd_386.go b/src/pkg/syscall/syscall_openbsd_386.go
deleted file mode 100644
index ad5ae14bf..000000000
--- a/src/pkg/syscall/syscall_openbsd_386.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-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 = int64(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 = int64(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)
-}
diff --git a/src/pkg/syscall/syscall_openbsd_amd64.go b/src/pkg/syscall/syscall_openbsd_amd64.go
deleted file mode 100644
index 6181344cd..000000000
--- a/src/pkg/syscall/syscall_openbsd_amd64.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-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 = 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 = 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)
-}
diff --git a/src/pkg/syscall/syscall_plan9.go b/src/pkg/syscall/syscall_plan9.go
deleted file mode 100644
index a8c340541..000000000
--- a/src/pkg/syscall/syscall_plan9.go
+++ /dev/null
@@ -1,344 +0,0 @@
-// 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.
-
-// Plan 9 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.
-
-package syscall
-
-import "unsafe"
-
-const ImplementsGetwd = true
-
-// ErrorString implements Error's String method by returning itself.
-type ErrorString string
-
-func (e ErrorString) Error() string { return string(e) }
-
-// NewError converts s to an ErrorString, which satisfies the Error interface.
-func NewError(s string) error { return ErrorString(s) }
-
-func (e ErrorString) Temporary() bool {
- return e == EINTR || e == EMFILE || e.Timeout()
-}
-
-func (e ErrorString) Timeout() bool {
- return e == EBUSY || e == ETIMEDOUT
-}
-
-// A Note is a string describing a process note.
-// It implements the os.Signal interface.
-type Note string
-
-func (n Note) Signal() {}
-
-func (n Note) String() string {
- return string(n)
-}
-
-var (
- Stdin = 0
- Stdout = 1
- Stderr = 2
-)
-
-// For testing: clients can set this flag to force
-// creation of IPv6 sockets to return EAFNOSUPPORT.
-var SocketDisableIPv6 bool
-
-func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err ErrorString)
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err ErrorString)
-func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
-func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
-
-func atoi(b []byte) (n uint) {
- n = 0
- for i := 0; i < len(b); i++ {
- n = n*10 + uint(b[i]-'0')
- }
- return
-}
-
-func cstring(s []byte) string {
- for i := range s {
- if s[i] == 0 {
- return string(s[0:i])
- }
- }
- return string(s)
-}
-
-func errstr() string {
- var buf [ERRMAX]byte
-
- RawSyscall(SYS_ERRSTR, uintptr(unsafe.Pointer(&buf[0])), uintptr(len(buf)), 0)
-
- buf[len(buf)-1] = 0
- return cstring(buf[:])
-}
-
-// Implemented in assembly to import from runtime.
-func exit(code int)
-
-func Exit(code int) { exit(code) }
-
-func readnum(path string) (uint, error) {
- var b [12]byte
-
- fd, e := Open(path, O_RDONLY)
- if e != nil {
- return 0, e
- }
- defer Close(fd)
-
- n, e := Pread(fd, b[:], 0)
-
- if e != nil {
- return 0, e
- }
-
- m := 0
- for ; m < n && b[m] == ' '; m++ {
- }
-
- return atoi(b[m : n-1]), nil
-}
-
-func Getpid() (pid int) {
- n, _ := readnum("#c/pid")
- return int(n)
-}
-
-func Getppid() (ppid int) {
- n, _ := readnum("#c/ppid")
- return int(n)
-}
-
-func Read(fd int, p []byte) (n int, err error) {
- return Pread(fd, p, -1)
-}
-
-func Write(fd int, p []byte) (n int, err error) {
- return Pwrite(fd, p, -1)
-}
-
-var ioSync int64
-
-func Getwd() (wd string, err error) {
- fd, e := Open(".", O_RDONLY)
-
- if e != nil {
- return "", e
- }
- defer Close(fd)
-
- return Fd2path(fd)
-}
-
-//sys fd2path(fd int, buf []byte) (err error)
-func Fd2path(fd int) (path string, err error) {
- var buf [512]byte
-
- e := fd2path(fd, buf[:])
- if e != nil {
- return "", e
- }
- return cstring(buf[:]), nil
-}
-
-//sys pipe(p *[2]_C_int) (err error)
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return NewError("bad arg in system call")
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-// Underlying system call writes to newoffset via pointer.
-// Implemented in assembly to avoid allocation.
-func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string)
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- newoffset, e := seek(0, fd, offset, whence)
-
- if newoffset == -1 {
- err = NewError(e)
- }
- return
-}
-
-func Mkdir(path string, mode uint32) (err error) {
- fd, err := Create(path, O_RDONLY, DMDIR|mode)
-
- if fd != -1 {
- Close(fd)
- }
-
- return
-}
-
-type Waitmsg struct {
- Pid int
- Time [3]uint32
- Msg string
-}
-
-func (w Waitmsg) Exited() bool { return true }
-func (w Waitmsg) Signaled() bool { return false }
-
-func (w Waitmsg) ExitStatus() int {
- if len(w.Msg) == 0 {
- // a normal exit returns no message
- return 0
- }
- return 1
-}
-
-//sys await(s []byte) (n int, err error)
-func Await(w *Waitmsg) (err error) {
- var buf [512]byte
- var f [5][]byte
-
- n, err := await(buf[:])
-
- if err != nil || w == nil {
- return
- }
-
- nf := 0
- p := 0
- for i := 0; i < n && nf < len(f)-1; i++ {
- if buf[i] == ' ' {
- f[nf] = buf[p:i]
- p = i + 1
- nf++
- }
- }
- f[nf] = buf[p:]
- nf++
-
- if nf != len(f) {
- return NewError("invalid wait message")
- }
- w.Pid = int(atoi(f[0]))
- w.Time[0] = uint32(atoi(f[1]))
- w.Time[1] = uint32(atoi(f[2]))
- w.Time[2] = uint32(atoi(f[3]))
- w.Msg = cstring(f[4])
- if w.Msg == "''" {
- // await() returns '' for no error
- w.Msg = ""
- }
- return
-}
-
-func Unmount(name, old string) (err error) {
- oldp, err := BytePtrFromString(old)
- if err != nil {
- return err
- }
- oldptr := uintptr(unsafe.Pointer(oldp))
-
- var r0 uintptr
- var e ErrorString
-
- // bind(2) man page: If name is zero, everything bound or mounted upon old is unbound or unmounted.
- if name == "" {
- r0, _, e = Syscall(SYS_UNMOUNT, _zero, oldptr, 0)
- } else {
- namep, err := BytePtrFromString(name)
- if err != nil {
- return err
- }
- r0, _, e = Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(namep)), oldptr, 0)
- }
-
- if int32(r0) == -1 {
- err = e
- }
- return
-}
-
-func Fchdir(fd int) (err error) {
- path, err := Fd2path(fd)
-
- if err != nil {
- return
- }
-
- return Chdir(path)
-}
-
-type Timespec struct {
- Sec int32
- Nsec int32
-}
-
-type Timeval struct {
- Sec int32
- Usec int32
-}
-
-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 DecodeBintime(b []byte) (nsec int64, err error) {
- if len(b) != 8 {
- return -1, NewError("bad /dev/bintime format")
- }
- nsec = int64(b[0])<<56 |
- int64(b[1])<<48 |
- int64(b[2])<<40 |
- int64(b[3])<<32 |
- int64(b[4])<<24 |
- int64(b[5])<<16 |
- int64(b[6])<<8 |
- int64(b[7])
- return
-}
-
-func Gettimeofday(tv *Timeval) error {
- nsec, e := nanotime()
- if e != nil {
- return e
- }
- *tv = NsecToTimeval(nsec)
- return e
-}
-
-func Getegid() (egid int) { return -1 }
-func Geteuid() (euid int) { return -1 }
-func Getgid() (gid int) { return -1 }
-func Getuid() (uid int) { return -1 }
-
-func Getgroups() (gids []int, err error) {
- return make([]int, 0), nil
-}
-
-//sys Dup(oldfd int, newfd int) (fd int, err error)
-//sys Open(path string, mode int) (fd int, err error)
-//sys Create(path string, mode int, perm uint32) (fd int, err error)
-//sys Remove(path string) (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 Close(fd int) (err error)
-//sys Chdir(path string) (err error)
-//sys Bind(name string, old string, flag int) (err error)
-//sys Mount(fd int, afd int, old string, flag int, aname string) (err error)
-//sys Stat(path string, edir []byte) (n int, err error)
-//sys Fstat(fd int, edir []byte) (n int, err error)
-//sys Wstat(path string, edir []byte) (err error)
-//sys Fwstat(fd int, edir []byte) (err error)
diff --git a/src/pkg/syscall/syscall_plan9_386.go b/src/pkg/syscall/syscall_plan9_386.go
deleted file mode 100644
index 7357e0ba6..000000000
--- a/src/pkg/syscall/syscall_plan9_386.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-func Getpagesize() int { return 0x1000 }
-
-func nanotime() (nsec int64, err error) {
- // TODO(paulzhol):
- // avoid reopening a file descriptor for /dev/bintime on each call,
- // use lower-level calls to avoid allocation.
-
- var b [8]byte
- nsec = -1
-
- fd, err := Open("/dev/bintime", O_RDONLY)
- if err != nil {
- return
- }
- defer Close(fd)
-
- if _, err = Pread(fd, b[:], 0); err != nil {
- return
- }
-
- if nsec, err = DecodeBintime(b[:]); err != nil {
- return -1, err
- }
-
- return
-}
diff --git a/src/pkg/syscall/syscall_plan9_amd64.go b/src/pkg/syscall/syscall_plan9_amd64.go
deleted file mode 100644
index 9387db3e5..000000000
--- a/src/pkg/syscall/syscall_plan9_amd64.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-func Getpagesize() int { return 0x200000 }
-
-// Used by Gettimeofday, which expects
-// an error return value.
-func nanotime() (int64, error) {
- r1, _, _ := RawSyscall(SYS_NANOTIME, 0, 0, 0)
- return int64(r1), nil
-}
diff --git a/src/pkg/syscall/syscall_solaris.go b/src/pkg/syscall/syscall_solaris.go
deleted file mode 100644
index adc52b1f7..000000000
--- a/src/pkg/syscall/syscall_solaris.go
+++ /dev/null
@@ -1,523 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Solaris 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_solaris.go or syscall_unix.go.
-
-package syscall
-
-import "unsafe"
-
-type SockaddrDatalink struct {
- Family uint16
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [244]int8
- raw RawSockaddrDatalink
-}
-
-func clen(n []byte) int {
- for i := 0; i < len(n); i++ {
- if n[i] == 0 {
- return i
- }
- }
- return len(n)
-}
-
-// 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.Ino == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:clen(bytes[:])])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
-}
-
-func pipe() (r uintptr, w uintptr, err uintptr)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- r0, w0, e1 := pipe()
- if e1 != 0 {
- err = Errno(e1)
- }
- p[0], p[1] = int(r0), int(w0)
- return
-}
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET6
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
- name := sa.Name
- n := len(name)
- if n >= len(sa.raw.Path) {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_UNIX
- for i := 0; i < n; i++ {
- sa.raw.Path[i] = int8(name[i])
- }
- // length is family (uint16), name, NUL.
- sl := _Socklen(2)
- if n > 0 {
- sl += _Socklen(n) + 1
- }
- if sa.raw.Path[0] == '@' {
- sa.raw.Path[0] = 0
- // Don't count trailing NUL for abstract address.
- sl--
- }
-
- return unsafe.Pointer(&sa.raw), sl, nil
-}
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getsockname(fd, &rsa, &len); err != nil {
- return
- }
- return anyToSockaddr(&rsa)
-}
-
-// The const provides a compile-time constant so clients
-// can adjust to whether there is a working Getwd and avoid
-// even linking this function into the binary. See ../os/getwd.go.
-const ImplementsGetwd = false
-
-func Getwd() (string, error) { return "", ENOTSUP }
-
-/*
- * Wrapped
- */
-
-//sysnb getgroups(ngid int, gid *_Gid_t) (n int, err error)
-//sysnb setgroups(ngid int, gid *_Gid_t) (err error)
-
-func Getgroups() (gids []int, err error) {
- n, err := getgroups(0, nil)
- if err != nil {
- return nil, err
- }
- if n == 0 {
- return nil, nil
- }
-
- // Sanity check group count. Max is 16 on BSD.
- if n < 0 || n > 1000 {
- return nil, EINVAL
- }
-
- a := make([]_Gid_t, n)
- n, err = getgroups(n, &a[0])
- if err != nil {
- return nil, err
- }
- gids = make([]int, n)
- for i, v := range a[0:n] {
- gids[i] = int(v)
- }
- return
-}
-
-func Setgroups(gids []int) (err error) {
- if len(gids) == 0 {
- return setgroups(0, nil)
- }
-
- a := make([]_Gid_t, len(gids))
- for i, v := range gids {
- a[i] = _Gid_t(v)
- }
- return setgroups(len(a), &a[0])
-}
-
-func ReadDirent(fd int, buf []byte) (n int, err error) {
- // Final argument is (basep *uintptr) and the syscall doesn't take nil.
- // TODO(rsc): Can we use a single global basep for all calls?
- return Getdents(fd, buf, new(uintptr))
-}
-
-// Wait status is 7 bits at bottom, either 0 (exited),
-// 0x7F (stopped), or a signal number that caused an exit.
-// The 0x80 bit is whether there was a core dump.
-// An extra number (exit code, signal causing a stop)
-// is in the high bits.
-
-type WaitStatus uint32
-
-const (
- mask = 0x7F
- core = 0x80
- shift = 8
-
- exited = 0
- stopped = 0x7F
-)
-
-func (w WaitStatus) Exited() bool { return w&mask == exited }
-
-func (w WaitStatus) ExitStatus() int {
- if w&mask != exited {
- return -1
- }
- return int(w >> shift)
-}
-
-func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 }
-
-func (w WaitStatus) Signal() Signal {
- sig := Signal(w & mask)
- if sig == stopped || sig == 0 {
- return -1
- }
- return sig
-}
-
-func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
-
-func (w WaitStatus) Stopped() bool { return w&mask == stopped && Signal(w>>shift) != SIGSTOP }
-
-func (w WaitStatus) Continued() bool { return w&mask == stopped && Signal(w>>shift) == SIGSTOP }
-
-func (w WaitStatus) StopSignal() Signal {
- if !w.Stopped() {
- return -1
- }
- return Signal(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) TrapCause() int { return -1 }
-
-func wait4(pid uintptr, wstatus *WaitStatus, options uintptr, rusage *Rusage) (wpid uintptr, err uintptr)
-
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
- r0, e1 := wait4(uintptr(pid), wstatus, uintptr(options), rusage)
- if e1 != 0 {
- err = Errno(e1)
- }
- return int(r0), err
-}
-
-func gethostname() (name string, err uintptr)
-
-func Gethostname() (name string, err error) {
- name, e1 := gethostname()
- if e1 != 0 {
- err = Errno(e1)
- }
- return name, err
-}
-
-func UtimesNano(path string, ts []Timespec) (err error) {
- if len(ts) != 2 {
- return EINVAL
- }
- var tv [2]Timeval
- for i := 0; i < 2; i++ {
- tv[i].Sec = ts[i].Sec
- tv[i].Usec = ts[i].Nsec / 1000
- }
- return Utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys fcntl(fd int, cmd int, arg int) (val int, err error)
-
-// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
-func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
- _, _, e1 := sysvicall6(procfcntl.Addr(), 3, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(lk)), 0, 0, 0)
- if e1 != 0 {
- return e1
- }
- return nil
-}
-
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
- switch rsa.Addr.Family {
- case AF_UNIX:
- pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
- sa := new(SockaddrUnix)
- // Assume path ends at NUL.
- // This is not technically the Solaris semantics for
- // abstract Unix domain sockets -- they are supposed
- // to be uninterpreted fixed-size binary blobs -- but
- // everyone uses this convention.
- n := 0
- for n < len(pp.Path) && pp.Path[n] != 0 {
- n++
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
- sa.Name = string(bytes)
- return sa, nil
-
- case AF_INET:
- pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet4)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_INET6:
- pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet6)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
- }
- return nil, EAFNOSUPPORT
-}
-
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = libsocket.accept
-
-func Accept(fd int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept(fd, &rsa, &len)
- if err != nil {
- return
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
- var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
- msg.Namelen = uint32(SizeofSockaddrAny)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*int8)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy int8
- if len(oob) > 0 {
- // receive at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = recvmsg(fd, &msg, flags); err != nil {
- return
- }
- oobn = int(msg.Accrightslen)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
- return
-}
-
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.sendmsg
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- var ptr unsafe.Pointer
- var salen _Socklen
- if to != nil {
- ptr, salen, err = to.sockaddr()
- if err != nil {
- return 0, err
- }
- }
- var msg Msghdr
- msg.Name = (*byte)(unsafe.Pointer(ptr))
- msg.Namelen = uint32(salen)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*int8)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy int8
- if len(oob) > 0 {
- // send at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = sendmsg(fd, &msg, flags); err != nil {
- return 0, err
- }
- if len(oob) > 0 && len(p) == 0 {
- n = 0
- }
- return n, nil
-}
-
-/*
- * 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 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)
-//sys Dup(fd int) (nfd int, err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Getdents(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sysnb Getgid() (gid int)
-//sysnb Getpid() (pid int)
-//sys Geteuid() (euid int)
-//sys Getegid() (egid int)
-//sys Getppid() (ppid int)
-//sys Getpriority(which int, who int) (n int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Kill(pid int, signum Signal) (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) = libsocket.listen
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Mkdir(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 Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = lseek
-//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 Setuid(uid int) (err error)
-//sys Shutdown(s int, how int) (err error) = libsocket.shutdown
-//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 Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Unlink(path string) (err error)
-//sys Utimes(path string, times *[2]Timeval) (err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.bind
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.connect
-//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 sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.sendto
-//sys socket(domain int, typ int, proto int) (fd int, err error) = libsocket.socket
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.socketpair
-//sys write(fd int, p []byte) (n int, err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) = libsocket.getsockopt
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getpeername
-//sys getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getsockname
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) = libsocket.setsockopt
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = libsocket.recvfrom
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.recvmsg
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := sysvicall6(procread.Addr(), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := sysvicall6(procwrite.Addr(), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/syscall_solaris_amd64.go b/src/pkg/syscall/syscall_solaris_amd64.go
deleted file mode 100644
index 37cf06d70..000000000
--- a/src/pkg/syscall/syscall_solaris_amd64.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-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 = 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 (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- // TODO(aram): implement this, see issue 5847.
- panic("unimplemented")
-}
diff --git a/src/pkg/syscall/syscall_test.go b/src/pkg/syscall/syscall_test.go
deleted file mode 100644
index 2a39b54f1..000000000
--- a/src/pkg/syscall/syscall_test.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2013 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_test
-
-import (
- "syscall"
- "testing"
-)
-
-func testSetGetenv(t *testing.T, key, value string) {
- err := syscall.Setenv(key, value)
- if err != nil {
- t.Fatalf("Setenv failed to set %q: %v", value, err)
- }
- newvalue, found := syscall.Getenv(key)
- if !found {
- t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value)
- }
- if newvalue != value {
- t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value)
- }
-}
-
-func TestEnv(t *testing.T) {
- testSetGetenv(t, "TESTENV", "AVALUE")
- // make sure TESTENV gets set to "", not deleted
- testSetGetenv(t, "TESTENV", "")
-}
diff --git a/src/pkg/syscall/syscall_unix.go b/src/pkg/syscall/syscall_unix.go
deleted file mode 100644
index b28891568..000000000
--- a/src/pkg/syscall/syscall_unix.go
+++ /dev/null
@@ -1,299 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package syscall
-
-import (
- "runtime"
- "sync"
- "unsafe"
-)
-
-var (
- Stdin = 0
- Stdout = 1
- Stderr = 2
-)
-
-const (
- darwin64Bit = runtime.GOOS == "darwin" && sizeofPtr == 8
- dragonfly64Bit = runtime.GOOS == "dragonfly" && sizeofPtr == 8
- netbsd32Bit = runtime.GOOS == "netbsd" && sizeofPtr == 4
-)
-
-func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
-func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
-func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
-
-// Mmap manager, for use by operating system-specific implementations.
-
-type mmapper struct {
- sync.Mutex
- active map[*byte][]byte // active mappings; key is last byte in mapping
- mmap func(addr, length uintptr, prot, flags, fd int, offset int64) (uintptr, error)
- munmap func(addr uintptr, length uintptr) error
-}
-
-func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- if length <= 0 {
- return nil, EINVAL
- }
-
- // Map the requested memory.
- addr, errno := m.mmap(0, uintptr(length), prot, flags, fd, offset)
- if errno != nil {
- return nil, errno
- }
-
- // Slice memory layout
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{addr, length, length}
-
- // Use unsafeto turn sl into a []byte.
- b := *(*[]byte)(unsafe.Pointer(&sl))
-
- // Register mapping in m and return it.
- p := &b[cap(b)-1]
- m.Lock()
- defer m.Unlock()
- m.active[p] = b
- return b, nil
-}
-
-func (m *mmapper) Munmap(data []byte) (err error) {
- if len(data) == 0 || len(data) != cap(data) {
- return EINVAL
- }
-
- // Find the base of the mapping.
- p := &data[cap(data)-1]
- m.Lock()
- defer m.Unlock()
- b := m.active[p]
- if b == nil || &b[0] != &data[0] {
- return EINVAL
- }
-
- // Unmap the memory and update m.
- if errno := m.munmap(uintptr(unsafe.Pointer(&b[0])), uintptr(len(b))); errno != nil {
- return errno
- }
- delete(m.active, p)
- return nil
-}
-
-// An Errno is an unsigned number describing an error condition.
-// It implements the error interface. The zero Errno is by convention
-// a non-error, so code to convert from Errno to error should use:
-// err = nil
-// if errno != 0 {
-// err = errno
-// }
-type Errno uintptr
-
-func (e Errno) Error() string {
- if 0 <= int(e) && int(e) < len(errors) {
- s := errors[e]
- if s != "" {
- return s
- }
- }
- return "errno " + itoa(int(e))
-}
-
-func (e Errno) Temporary() bool {
- return e == EINTR || e == EMFILE || e.Timeout()
-}
-
-func (e Errno) Timeout() bool {
- return e == EAGAIN || e == EWOULDBLOCK || e == ETIMEDOUT
-}
-
-// A Signal is a number describing a process signal.
-// It implements the os.Signal interface.
-type Signal int
-
-func (s Signal) Signal() {}
-
-func (s Signal) String() string {
- if 0 <= s && int(s) < len(signals) {
- str := signals[s]
- if str != "" {
- return str
- }
- }
- return "signal " + itoa(int(s))
-}
-
-func Read(fd int, p []byte) (n int, err error) {
- n, err = read(fd, p)
- if raceenabled {
- if n > 0 {
- raceWriteRange(unsafe.Pointer(&p[0]), n)
- }
- if err == nil {
- raceAcquire(unsafe.Pointer(&ioSync))
- }
- }
- return
-}
-
-func Write(fd int, p []byte) (n int, err error) {
- if raceenabled {
- raceReleaseMerge(unsafe.Pointer(&ioSync))
- }
- n, err = write(fd, p)
- if raceenabled && n > 0 {
- raceReadRange(unsafe.Pointer(&p[0]), n)
- }
- return
-}
-
-// For testing: clients can set this flag to force
-// creation of IPv6 sockets to return EAFNOSUPPORT.
-var SocketDisableIPv6 bool
-
-type Sockaddr interface {
- sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs
-}
-
-type SockaddrInet4 struct {
- Port int
- Addr [4]byte
- raw RawSockaddrInet4
-}
-
-type SockaddrInet6 struct {
- Port int
- ZoneId uint32
- Addr [16]byte
- raw RawSockaddrInet6
-}
-
-type SockaddrUnix struct {
- Name string
- raw RawSockaddrUnix
-}
-
-func Bind(fd int, sa Sockaddr) (err error) {
- ptr, n, err := sa.sockaddr()
- if err != nil {
- return err
- }
- return bind(fd, ptr, n)
-}
-
-func Connect(fd int, sa Sockaddr) (err error) {
- ptr, n, err := sa.sockaddr()
- if err != nil {
- return err
- }
- return connect(fd, ptr, n)
-}
-
-func Getpeername(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getpeername(fd, &rsa, &len); err != nil {
- return
- }
- return anyToSockaddr(&rsa)
-}
-
-func GetsockoptInt(fd, level, opt int) (value int, err error) {
- var n int32
- vallen := _Socklen(4)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
- return int(n), err
-}
-
-func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if n, err = recvfrom(fd, p, flags, &rsa, &len); err != nil {
- return
- }
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
- ptr, n, err := to.sockaddr()
- if err != nil {
- return err
- }
- return sendto(fd, p, flags, ptr, n)
-}
-
-func SetsockoptByte(fd, level, opt int, value byte) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(&value), 1)
-}
-
-func SetsockoptInt(fd, level, opt int, value int) (err error) {
- var n = int32(value)
- return setsockopt(fd, level, opt, unsafe.Pointer(&n), 4)
-}
-
-func SetsockoptInet4Addr(fd, level, opt int, value [4]byte) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(&value[0]), 4)
-}
-
-func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPMreq)
-}
-
-func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPv6Mreq)
-}
-
-func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error {
- return setsockopt(fd, level, opt, unsafe.Pointer(filter), SizeofICMPv6Filter)
-}
-
-func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(l), SizeofLinger)
-}
-
-func SetsockoptString(fd, level, opt int, s string) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(&[]byte(s)[0]), uintptr(len(s)))
-}
-
-func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv))
-}
-
-func Socket(domain, typ, proto int) (fd int, err error) {
- if domain == AF_INET6 && SocketDisableIPv6 {
- return -1, EAFNOSUPPORT
- }
- fd, err = socket(domain, typ, proto)
- return
-}
-
-func Socketpair(domain, typ, proto int) (fd [2]int, err error) {
- var fdx [2]int32
- err = socketpair(domain, typ, proto, &fdx)
- if err == nil {
- fd[0] = int(fdx[0])
- fd[1] = int(fdx[1])
- }
- return
-}
-
-func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- if raceenabled {
- raceReleaseMerge(unsafe.Pointer(&ioSync))
- }
- return sendfile(outfd, infd, offset, count)
-}
-
-var ioSync int64
diff --git a/src/pkg/syscall/syscall_unix_test.go b/src/pkg/syscall/syscall_unix_test.go
deleted file mode 100644
index a0afb91fc..000000000
--- a/src/pkg/syscall/syscall_unix_test.go
+++ /dev/null
@@ -1,314 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package syscall_test
-
-import (
- "flag"
- "fmt"
- "io/ioutil"
- "net"
- "os"
- "os/exec"
- "path/filepath"
- "runtime"
- "syscall"
- "testing"
- "time"
-)
-
-// Tests that below functions, structures and constants are consistent
-// on all Unix-like systems.
-func _() {
- // program scheduling priority functions and constants
- var (
- _ func(int, int, int) error = syscall.Setpriority
- _ func(int, int) (int, error) = syscall.Getpriority
- )
- const (
- _ int = syscall.PRIO_USER
- _ int = syscall.PRIO_PROCESS
- _ int = syscall.PRIO_PGRP
- )
-
- // termios constants
- const (
- _ int = syscall.TCIFLUSH
- _ int = syscall.TCIOFLUSH
- _ int = syscall.TCOFLUSH
- )
-
- // fcntl file locking structure and constants
- var (
- _ = syscall.Flock_t{
- Type: int16(0),
- Whence: int16(0),
- Start: int64(0),
- Len: int64(0),
- Pid: int32(0),
- }
- )
- const (
- _ = syscall.F_GETLK
- _ = syscall.F_SETLK
- _ = syscall.F_SETLKW
- )
-}
-
-// TestFcntlFlock tests whether the file locking structure matches
-// the calling convention of each kernel.
-func TestFcntlFlock(t *testing.T) {
- name := filepath.Join(os.TempDir(), "TestFcntlFlock")
- fd, err := syscall.Open(name, syscall.O_CREAT|syscall.O_RDWR|syscall.O_CLOEXEC, 0)
- if err != nil {
- t.Fatalf("Open failed: %v", err)
- }
- defer syscall.Unlink(name)
- defer syscall.Close(fd)
- flock := syscall.Flock_t{
- Type: syscall.F_RDLCK,
- Start: 0, Len: 0, Whence: 1,
- }
- if err := syscall.FcntlFlock(uintptr(fd), syscall.F_GETLK, &flock); err != nil {
- t.Fatalf("FcntlFlock failed: %v", err)
- }
-}
-
-// TestPassFD tests passing a file descriptor over a Unix socket.
-//
-// This test involved both a parent and child process. The parent
-// process is invoked as a normal test, with "go test", which then
-// runs the child process by running the current test binary with args
-// "-test.run=^TestPassFD$" and an environment variable used to signal
-// that the test should become the child process instead.
-func TestPassFD(t *testing.T) {
- switch runtime.GOOS {
- case "dragonfly":
- // TODO(jsing): Figure out why sendmsg is returning EINVAL.
- t.Skip("skipping test on dragonfly")
- case "solaris":
- // TODO(aram): Figure out why ReadMsgUnix is returning empty message.
- t.Skip("skipping test on solaris, see issue 7402")
- }
- if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" {
- passFDChild()
- return
- }
-
- tempDir, err := ioutil.TempDir("", "TestPassFD")
- if err != nil {
- t.Fatal(err)
- }
- defer os.RemoveAll(tempDir)
-
- fds, err := syscall.Socketpair(syscall.AF_LOCAL, syscall.SOCK_STREAM, 0)
- if err != nil {
- t.Fatalf("Socketpair: %v", err)
- }
- defer syscall.Close(fds[0])
- defer syscall.Close(fds[1])
- writeFile := os.NewFile(uintptr(fds[0]), "child-writes")
- readFile := os.NewFile(uintptr(fds[1]), "parent-reads")
- defer writeFile.Close()
- defer readFile.Close()
-
- cmd := exec.Command(os.Args[0], "-test.run=^TestPassFD$", "--", tempDir)
- cmd.Env = []string{"GO_WANT_HELPER_PROCESS=1"}
- cmd.ExtraFiles = []*os.File{writeFile}
-
- out, err := cmd.CombinedOutput()
- if len(out) > 0 || err != nil {
- t.Fatalf("child process: %q, %v", out, err)
- }
-
- c, err := net.FileConn(readFile)
- if err != nil {
- t.Fatalf("FileConn: %v", err)
- }
- defer c.Close()
-
- uc, ok := c.(*net.UnixConn)
- if !ok {
- t.Fatalf("unexpected FileConn type; expected UnixConn, got %T", c)
- }
-
- buf := make([]byte, 32) // expect 1 byte
- oob := make([]byte, 32) // expect 24 bytes
- closeUnix := time.AfterFunc(5*time.Second, func() {
- t.Logf("timeout reading from unix socket")
- uc.Close()
- })
- _, oobn, _, _, err := uc.ReadMsgUnix(buf, oob)
- closeUnix.Stop()
-
- scms, err := syscall.ParseSocketControlMessage(oob[:oobn])
- if err != nil {
- t.Fatalf("ParseSocketControlMessage: %v", err)
- }
- if len(scms) != 1 {
- t.Fatalf("expected 1 SocketControlMessage; got scms = %#v", scms)
- }
- scm := scms[0]
- gotFds, err := syscall.ParseUnixRights(&scm)
- if err != nil {
- t.Fatalf("syscall.ParseUnixRights: %v", err)
- }
- if len(gotFds) != 1 {
- t.Fatalf("wanted 1 fd; got %#v", gotFds)
- }
-
- f := os.NewFile(uintptr(gotFds[0]), "fd-from-child")
- defer f.Close()
-
- got, err := ioutil.ReadAll(f)
- want := "Hello from child process!\n"
- if string(got) != want {
- t.Errorf("child process ReadAll: %q, %v; want %q", got, err, want)
- }
-}
-
-// passFDChild is the child process used by TestPassFD.
-func passFDChild() {
- defer os.Exit(0)
-
- // Look for our fd. It should be fd 3, but we work around an fd leak
- // bug here (http://golang.org/issue/2603) to let it be elsewhere.
- var uc *net.UnixConn
- for fd := uintptr(3); fd <= 10; fd++ {
- f := os.NewFile(fd, "unix-conn")
- var ok bool
- netc, _ := net.FileConn(f)
- uc, ok = netc.(*net.UnixConn)
- if ok {
- break
- }
- }
- if uc == nil {
- fmt.Println("failed to find unix fd")
- return
- }
-
- // Make a file f to send to our parent process on uc.
- // We make it in tempDir, which our parent will clean up.
- flag.Parse()
- tempDir := flag.Arg(0)
- f, err := ioutil.TempFile(tempDir, "")
- if err != nil {
- fmt.Printf("TempFile: %v", err)
- return
- }
-
- f.Write([]byte("Hello from child process!\n"))
- f.Seek(0, 0)
-
- rights := syscall.UnixRights(int(f.Fd()))
- dummyByte := []byte("x")
- n, oobn, err := uc.WriteMsgUnix(dummyByte, rights, nil)
- if err != nil {
- fmt.Printf("WriteMsgUnix: %v", err)
- return
- }
- if n != 1 || oobn != len(rights) {
- fmt.Printf("WriteMsgUnix = %d, %d; want 1, %d", n, oobn, len(rights))
- return
- }
-}
-
-// TestUnixRightsRoundtrip tests that UnixRights, ParseSocketControlMessage,
-// and ParseUnixRights are able to successfully round-trip lists of file descriptors.
-func TestUnixRightsRoundtrip(t *testing.T) {
- testCases := [...][][]int{
- {{42}},
- {{1, 2}},
- {{3, 4, 5}},
- {{}},
- {{1, 2}, {3, 4, 5}, {}, {7}},
- }
- for _, testCase := range testCases {
- b := []byte{}
- var n int
- for _, fds := range testCase {
- // Last assignment to n wins
- n = len(b) + syscall.CmsgLen(4*len(fds))
- b = append(b, syscall.UnixRights(fds...)...)
- }
- // Truncate b
- b = b[:n]
-
- scms, err := syscall.ParseSocketControlMessage(b)
- if err != nil {
- t.Fatalf("ParseSocketControlMessage: %v", err)
- }
- if len(scms) != len(testCase) {
- t.Fatalf("expected %v SocketControlMessage; got scms = %#v", len(testCase), scms)
- }
- for i, scm := range scms {
- gotFds, err := syscall.ParseUnixRights(&scm)
- if err != nil {
- t.Fatalf("ParseUnixRights: %v", err)
- }
- wantFds := testCase[i]
- if len(gotFds) != len(wantFds) {
- t.Fatalf("expected %v fds, got %#v", len(wantFds), gotFds)
- }
- for j, fd := range gotFds {
- if fd != wantFds[j] {
- t.Fatalf("expected fd %v, got %v", wantFds[j], fd)
- }
- }
- }
- }
-}
-
-func TestRlimit(t *testing.T) {
- var rlimit, zero syscall.Rlimit
- err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlimit)
- if err != nil {
- t.Fatalf("Getrlimit: save failed: %v", err)
- }
- if zero == rlimit {
- t.Fatalf("Getrlimit: save failed: got zero value %#v", rlimit)
- }
- set := rlimit
- set.Cur = set.Max - 1
- err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &set)
- if err != nil {
- t.Fatalf("Setrlimit: set failed: %#v %v", set, err)
- }
- var get syscall.Rlimit
- err = syscall.Getrlimit(syscall.RLIMIT_NOFILE, &get)
- if err != nil {
- t.Fatalf("Getrlimit: get failed: %v", err)
- }
- set = rlimit
- set.Cur = set.Max - 1
- if set != get {
- // Seems like Darwin requires some privilege to
- // increase the soft limit of rlimit sandbox, though
- // Setrlimit never reports an error.
- switch runtime.GOOS {
- case "darwin":
- default:
- t.Fatalf("Rlimit: change failed: wanted %#v got %#v", set, get)
- }
- }
- err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rlimit)
- if err != nil {
- t.Fatalf("Setrlimit: restore failed: %#v %v", rlimit, err)
- }
-}
-
-func TestSeekFailure(t *testing.T) {
- _, err := syscall.Seek(-1, 0, 0)
- if err == nil {
- t.Fatalf("Seek(-1, 0, 0) did not fail")
- }
- str := err.Error() // used to crash on Linux
- t.Logf("Seek: %v", str)
- if str == "" {
- t.Fatalf("Seek(-1, 0, 0) return error with empty message")
- }
-}
diff --git a/src/pkg/syscall/syscall_windows.go b/src/pkg/syscall/syscall_windows.go
deleted file mode 100644
index f9733f6ce..000000000
--- a/src/pkg/syscall/syscall_windows.go
+++ /dev/null
@@ -1,936 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Windows system calls.
-
-package syscall
-
-import (
- errorspkg "errors"
- "sync"
- "unicode/utf16"
- "unsafe"
-)
-
-type Handle uintptr
-
-const InvalidHandle = ^Handle(0)
-
-// StringToUTF16 is deprecated. Use UTF16FromString instead.
-// If s contains a NUL byte this function panics instead of
-// returning an error.
-func StringToUTF16(s string) []uint16 {
- a, err := UTF16FromString(s)
- if err != nil {
- panic("syscall: string with NUL passed to StringToUTF16")
- }
- return a
-}
-
-// UTF16FromString returns the UTF-16 encoding of the UTF-8 string
-// s, with a terminating NUL added. If s contains a NUL byte at any
-// location, it returns (nil, EINVAL).
-func UTF16FromString(s string) ([]uint16, error) {
- for i := 0; i < len(s); i++ {
- if s[i] == 0 {
- return nil, EINVAL
- }
- }
- return utf16.Encode([]rune(s + "\x00")), nil
-}
-
-// UTF16ToString returns the UTF-8 encoding of the UTF-16 sequence s,
-// with a terminating NUL removed.
-func UTF16ToString(s []uint16) string {
- for i, v := range s {
- if v == 0 {
- s = s[0:i]
- break
- }
- }
- return string(utf16.Decode(s))
-}
-
-// StringToUTF16Ptr is deprecated. Use UTF16PtrFromString instead.
-// If s contains a NUL byte this function panics instead of
-// returning an error.
-func StringToUTF16Ptr(s string) *uint16 { return &StringToUTF16(s)[0] }
-
-// UTF16PtrFromString returns pointer to the UTF-16 encoding of
-// the UTF-8 string s, with a terminating NUL added. If s
-// contains a NUL byte at any location, it returns (nil, EINVAL).
-func UTF16PtrFromString(s string) (*uint16, error) {
- a, err := UTF16FromString(s)
- if err != nil {
- return nil, err
- }
- return &a[0], nil
-}
-
-func Getpagesize() int { return 4096 }
-
-// Errno is the Windows error number.
-type Errno uintptr
-
-func langid(pri, sub uint16) uint32 { return uint32(sub)<<10 | uint32(pri) }
-
-func (e Errno) Error() string {
- // deal with special go errors
- idx := int(e - APPLICATION_ERROR)
- if 0 <= idx && idx < len(errors) {
- return errors[idx]
- }
- // ask windows for the remaining errors
- var flags uint32 = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ARGUMENT_ARRAY | FORMAT_MESSAGE_IGNORE_INSERTS
- b := make([]uint16, 300)
- n, err := FormatMessage(flags, 0, uint32(e), langid(LANG_ENGLISH, SUBLANG_ENGLISH_US), b, nil)
- if err != nil {
- n, err = FormatMessage(flags, 0, uint32(e), 0, b, nil)
- if err != nil {
- return "winapi error #" + itoa(int(e))
- }
- }
- // trim terminating \r and \n
- for ; n > 0 && (b[n-1] == '\n' || b[n-1] == '\r'); n-- {
- }
- return string(utf16.Decode(b[:n]))
-}
-
-func (e Errno) Temporary() bool {
- return e == EINTR || e == EMFILE || e.Timeout()
-}
-
-func (e Errno) Timeout() bool {
- return e == EAGAIN || e == EWOULDBLOCK || e == ETIMEDOUT
-}
-
-// Converts a Go function to a function pointer conforming
-// to the stdcall or cdecl calling convention. This is useful when
-// interoperating with Windows code requiring callbacks.
-// Implemented in ../runtime/syscall_windows.goc
-func NewCallback(fn interface{}) uintptr
-func NewCallbackCDecl(fn interface{}) uintptr
-
-// windows api calls
-
-//sys GetLastError() (lasterr error)
-//sys LoadLibrary(libname string) (handle Handle, err error) = LoadLibraryW
-//sys FreeLibrary(handle Handle) (err error)
-//sys GetProcAddress(module Handle, procname string) (proc uintptr, err error)
-//sys GetVersion() (ver uint32, err error)
-//sys FormatMessage(flags uint32, msgsrc uint32, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) = FormatMessageW
-//sys ExitProcess(exitcode uint32)
-//sys CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW
-//sys ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
-//sys WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
-//sys SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) [failretval==0xffffffff]
-//sys CloseHandle(handle Handle) (err error)
-//sys GetStdHandle(stdhandle int) (handle Handle, err error) [failretval==InvalidHandle]
-//sys findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) [failretval==InvalidHandle] = FindFirstFileW
-//sys findNextFile1(handle Handle, data *win32finddata1) (err error) = FindNextFileW
-//sys FindClose(handle Handle) (err error)
-//sys GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error)
-//sys GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) = GetCurrentDirectoryW
-//sys SetCurrentDirectory(path *uint16) (err error) = SetCurrentDirectoryW
-//sys CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) = CreateDirectoryW
-//sys RemoveDirectory(path *uint16) (err error) = RemoveDirectoryW
-//sys DeleteFile(path *uint16) (err error) = DeleteFileW
-//sys MoveFile(from *uint16, to *uint16) (err error) = MoveFileW
-//sys GetComputerName(buf *uint16, n *uint32) (err error) = GetComputerNameW
-//sys SetEndOfFile(handle Handle) (err error)
-//sys GetSystemTimeAsFileTime(time *Filetime)
-//sys GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) [failretval==0xffffffff]
-//sys CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error)
-//sys GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error)
-//sys PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error)
-//sys CancelIo(s Handle) (err error)
-//sys CancelIoEx(s Handle, o *Overlapped) (err error)
-//sys CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) = CreateProcessW
-//sys OpenProcess(da uint32, inheritHandle bool, pid uint32) (handle Handle, err error)
-//sys TerminateProcess(handle Handle, exitcode uint32) (err error)
-//sys GetExitCodeProcess(handle Handle, exitcode *uint32) (err error)
-//sys GetStartupInfo(startupInfo *StartupInfo) (err error) = GetStartupInfoW
-//sys GetCurrentProcess() (pseudoHandle Handle, err error)
-//sys GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error)
-//sys DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error)
-//sys WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) [failretval==0xffffffff]
-//sys GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) = GetTempPathW
-//sys CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error)
-//sys GetFileType(filehandle Handle) (n uint32, err error)
-//sys CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) = advapi32.CryptAcquireContextW
-//sys CryptReleaseContext(provhandle Handle, flags uint32) (err error) = advapi32.CryptReleaseContext
-//sys CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) = advapi32.CryptGenRandom
-//sys GetEnvironmentStrings() (envs *uint16, err error) [failretval==nil] = kernel32.GetEnvironmentStringsW
-//sys FreeEnvironmentStrings(envs *uint16) (err error) = kernel32.FreeEnvironmentStringsW
-//sys GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) = kernel32.GetEnvironmentVariableW
-//sys SetEnvironmentVariable(name *uint16, value *uint16) (err error) = kernel32.SetEnvironmentVariableW
-//sys SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error)
-//sys GetFileAttributes(name *uint16) (attrs uint32, err error) [failretval==INVALID_FILE_ATTRIBUTES] = kernel32.GetFileAttributesW
-//sys SetFileAttributes(name *uint16, attrs uint32) (err error) = kernel32.SetFileAttributesW
-//sys GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) = kernel32.GetFileAttributesExW
-//sys GetCommandLine() (cmd *uint16) = kernel32.GetCommandLineW
-//sys CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) [failretval==nil] = shell32.CommandLineToArgvW
-//sys LocalFree(hmem Handle) (handle Handle, err error) [failretval!=0]
-//sys SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error)
-//sys FlushFileBuffers(handle Handle) (err error)
-//sys GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) = kernel32.GetFullPathNameW
-//sys GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) = kernel32.GetLongPathNameW
-//sys GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) = kernel32.GetShortPathNameW
-//sys CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) = kernel32.CreateFileMappingW
-//sys MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error)
-//sys UnmapViewOfFile(addr uintptr) (err error)
-//sys FlushViewOfFile(addr uintptr, length uintptr) (err error)
-//sys VirtualLock(addr uintptr, length uintptr) (err error)
-//sys VirtualUnlock(addr uintptr, length uintptr) (err error)
-//sys TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) = mswsock.TransmitFile
-//sys ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) = kernel32.ReadDirectoryChangesW
-//sys CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) = crypt32.CertOpenSystemStoreW
-//sys CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) [failretval==InvalidHandle] = crypt32.CertOpenStore
-//sys CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) [failretval==nil] = crypt32.CertEnumCertificatesInStore
-//sys CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) = crypt32.CertAddCertificateContextToStore
-//sys CertCloseStore(store Handle, flags uint32) (err error) = crypt32.CertCloseStore
-//sys CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) = crypt32.CertGetCertificateChain
-//sys CertFreeCertificateChain(ctx *CertChainContext) = crypt32.CertFreeCertificateChain
-//sys CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) [failretval==nil] = crypt32.CertCreateCertificateContext
-//sys CertFreeCertificateContext(ctx *CertContext) (err error) = crypt32.CertFreeCertificateContext
-//sys CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) = crypt32.CertVerifyCertificateChainPolicy
-//sys RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) = advapi32.RegOpenKeyExW
-//sys RegCloseKey(key Handle) (regerrno error) = advapi32.RegCloseKey
-//sys RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegQueryInfoKeyW
-//sys RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegEnumKeyExW
-//sys RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) = advapi32.RegQueryValueExW
-//sys getCurrentProcessId() (pid uint32) = kernel32.GetCurrentProcessId
-//sys GetConsoleMode(console Handle, mode *uint32) (err error) = kernel32.GetConsoleMode
-//sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW
-//sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW
-
-// syscall interface implementation for other packages
-
-func Exit(code int) { ExitProcess(uint32(code)) }
-
-func makeInheritSa() *SecurityAttributes {
- var sa SecurityAttributes
- sa.Length = uint32(unsafe.Sizeof(sa))
- sa.InheritHandle = 1
- return &sa
-}
-
-func Open(path string, mode int, perm uint32) (fd Handle, err error) {
- if len(path) == 0 {
- return InvalidHandle, ERROR_FILE_NOT_FOUND
- }
- pathp, err := UTF16PtrFromString(path)
- if err != nil {
- return InvalidHandle, err
- }
- var access uint32
- switch mode & (O_RDONLY | O_WRONLY | O_RDWR) {
- case O_RDONLY:
- access = GENERIC_READ
- case O_WRONLY:
- access = GENERIC_WRITE
- case O_RDWR:
- access = GENERIC_READ | GENERIC_WRITE
- }
- if mode&O_CREAT != 0 {
- access |= GENERIC_WRITE
- }
- if mode&O_APPEND != 0 {
- access &^= GENERIC_WRITE
- access |= FILE_APPEND_DATA
- }
- sharemode := uint32(FILE_SHARE_READ | FILE_SHARE_WRITE)
- var sa *SecurityAttributes
- if mode&O_CLOEXEC == 0 {
- sa = makeInheritSa()
- }
- var createmode uint32
- switch {
- case mode&(O_CREAT|O_EXCL) == (O_CREAT | O_EXCL):
- createmode = CREATE_NEW
- case mode&(O_CREAT|O_TRUNC) == (O_CREAT | O_TRUNC):
- createmode = CREATE_ALWAYS
- case mode&O_CREAT == O_CREAT:
- createmode = OPEN_ALWAYS
- case mode&O_TRUNC == O_TRUNC:
- createmode = TRUNCATE_EXISTING
- default:
- createmode = OPEN_EXISTING
- }
- h, e := CreateFile(pathp, access, sharemode, sa, createmode, FILE_ATTRIBUTE_NORMAL, 0)
- return h, e
-}
-
-func Read(fd Handle, p []byte) (n int, err error) {
- var done uint32
- e := ReadFile(fd, p, &done, nil)
- if e != nil {
- if e == ERROR_BROKEN_PIPE {
- // NOTE(brainman): work around ERROR_BROKEN_PIPE is returned on reading EOF from stdin
- return 0, nil
- }
- return 0, e
- }
- if raceenabled {
- if done > 0 {
- raceWriteRange(unsafe.Pointer(&p[0]), int(done))
- }
- raceAcquire(unsafe.Pointer(&ioSync))
- }
- return int(done), nil
-}
-
-func Write(fd Handle, p []byte) (n int, err error) {
- if raceenabled {
- raceReleaseMerge(unsafe.Pointer(&ioSync))
- }
- var done uint32
- e := WriteFile(fd, p, &done, nil)
- if e != nil {
- return 0, e
- }
- if raceenabled && done > 0 {
- raceReadRange(unsafe.Pointer(&p[0]), int(done))
- }
- return int(done), nil
-}
-
-var ioSync int64
-
-func Seek(fd Handle, offset int64, whence int) (newoffset int64, err error) {
- var w uint32
- switch whence {
- case 0:
- w = FILE_BEGIN
- case 1:
- w = FILE_CURRENT
- case 2:
- w = FILE_END
- }
- hi := int32(offset >> 32)
- lo := int32(offset)
- // use GetFileType to check pipe, pipe can't do seek
- ft, _ := GetFileType(fd)
- if ft == FILE_TYPE_PIPE {
- return 0, EPIPE
- }
- rlo, e := SetFilePointer(fd, lo, &hi, w)
- if e != nil {
- return 0, e
- }
- return int64(hi)<<32 + int64(rlo), nil
-}
-
-func Close(fd Handle) (err error) {
- return CloseHandle(fd)
-}
-
-var (
- Stdin = getStdHandle(STD_INPUT_HANDLE)
- Stdout = getStdHandle(STD_OUTPUT_HANDLE)
- Stderr = getStdHandle(STD_ERROR_HANDLE)
-)
-
-func getStdHandle(h int) (fd Handle) {
- r, _ := GetStdHandle(h)
- CloseOnExec(r)
- return r
-}
-
-const ImplementsGetwd = true
-
-func Getwd() (wd string, err error) {
- b := make([]uint16, 300)
- n, e := GetCurrentDirectory(uint32(len(b)), &b[0])
- if e != nil {
- return "", e
- }
- return string(utf16.Decode(b[0:n])), nil
-}
-
-func Chdir(path string) (err error) {
- pathp, err := UTF16PtrFromString(path)
- if err != nil {
- return err
- }
- return SetCurrentDirectory(pathp)
-}
-
-func Mkdir(path string, mode uint32) (err error) {
- pathp, err := UTF16PtrFromString(path)
- if err != nil {
- return err
- }
- return CreateDirectory(pathp, nil)
-}
-
-func Rmdir(path string) (err error) {
- pathp, err := UTF16PtrFromString(path)
- if err != nil {
- return err
- }
- return RemoveDirectory(pathp)
-}
-
-func Unlink(path string) (err error) {
- pathp, err := UTF16PtrFromString(path)
- if err != nil {
- return err
- }
- return DeleteFile(pathp)
-}
-
-func Rename(oldpath, newpath string) (err error) {
- from, err := UTF16PtrFromString(oldpath)
- if err != nil {
- return err
- }
- to, err := UTF16PtrFromString(newpath)
- if err != nil {
- return err
- }
- return MoveFile(from, to)
-}
-
-func ComputerName() (name string, err error) {
- var n uint32 = MAX_COMPUTERNAME_LENGTH + 1
- b := make([]uint16, n)
- e := GetComputerName(&b[0], &n)
- if e != nil {
- return "", e
- }
- return string(utf16.Decode(b[0:n])), nil
-}
-
-func Ftruncate(fd Handle, length int64) (err error) {
- curoffset, e := Seek(fd, 0, 1)
- if e != nil {
- return e
- }
- defer Seek(fd, curoffset, 0)
- _, e = Seek(fd, length, 0)
- if e != nil {
- return e
- }
- e = SetEndOfFile(fd)
- if e != nil {
- return e
- }
- return nil
-}
-
-func Gettimeofday(tv *Timeval) (err error) {
- var ft Filetime
- GetSystemTimeAsFileTime(&ft)
- *tv = NsecToTimeval(ft.Nanoseconds())
- return nil
-}
-
-func Pipe(p []Handle) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var r, w Handle
- e := CreatePipe(&r, &w, makeInheritSa(), 0)
- if e != nil {
- return e
- }
- p[0] = r
- p[1] = w
- return nil
-}
-
-func Utimes(path string, tv []Timeval) (err error) {
- if len(tv) != 2 {
- return EINVAL
- }
- pathp, e := UTF16PtrFromString(path)
- if e != nil {
- return e
- }
- h, e := CreateFile(pathp,
- FILE_WRITE_ATTRIBUTES, FILE_SHARE_WRITE, nil,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)
- if e != nil {
- return e
- }
- defer Close(h)
- a := NsecToFiletime(tv[0].Nanoseconds())
- w := NsecToFiletime(tv[1].Nanoseconds())
- return SetFileTime(h, nil, &a, &w)
-}
-
-func UtimesNano(path string, ts []Timespec) (err error) {
- if len(ts) != 2 {
- return EINVAL
- }
- pathp, e := UTF16PtrFromString(path)
- if e != nil {
- return e
- }
- h, e := CreateFile(pathp,
- FILE_WRITE_ATTRIBUTES, FILE_SHARE_WRITE, nil,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)
- if e != nil {
- return e
- }
- defer Close(h)
- a := NsecToFiletime(TimespecToNsec(ts[0]))
- w := NsecToFiletime(TimespecToNsec(ts[1]))
- return SetFileTime(h, nil, &a, &w)
-}
-
-func Fsync(fd Handle) (err error) {
- return FlushFileBuffers(fd)
-}
-
-func Chmod(path string, mode uint32) (err error) {
- if mode == 0 {
- return EINVAL
- }
- p, e := UTF16PtrFromString(path)
- if e != nil {
- return e
- }
- attrs, e := GetFileAttributes(p)
- if e != nil {
- return e
- }
- if mode&S_IWRITE != 0 {
- attrs &^= FILE_ATTRIBUTE_READONLY
- } else {
- attrs |= FILE_ATTRIBUTE_READONLY
- }
- return SetFileAttributes(p, attrs)
-}
-
-func LoadCancelIoEx() error {
- return procCancelIoEx.Find()
-}
-
-func LoadSetFileCompletionNotificationModes() error {
- return procSetFileCompletionNotificationModes.Find()
-}
-
-// net api calls
-
-const socket_error = uintptr(^uint32(0))
-
-//sys WSAStartup(verreq uint32, data *WSAData) (sockerr error) = ws2_32.WSAStartup
-//sys WSACleanup() (err error) [failretval==socket_error] = ws2_32.WSACleanup
-//sys WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) [failretval==socket_error] = ws2_32.WSAIoctl
-//sys socket(af int32, typ int32, protocol int32) (handle Handle, err error) [failretval==InvalidHandle] = ws2_32.socket
-//sys Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) [failretval==socket_error] = ws2_32.setsockopt
-//sys Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) [failretval==socket_error] = ws2_32.getsockopt
-//sys bind(s Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socket_error] = ws2_32.bind
-//sys connect(s Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socket_error] = ws2_32.connect
-//sys getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) [failretval==socket_error] = ws2_32.getsockname
-//sys getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) [failretval==socket_error] = ws2_32.getpeername
-//sys listen(s Handle, backlog int32) (err error) [failretval==socket_error] = ws2_32.listen
-//sys shutdown(s Handle, how int32) (err error) [failretval==socket_error] = ws2_32.shutdown
-//sys Closesocket(s Handle) (err error) [failretval==socket_error] = ws2_32.closesocket
-//sys AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) = mswsock.AcceptEx
-//sys GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) = mswsock.GetAcceptExSockaddrs
-//sys WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecv
-//sys WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASend
-//sys WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecvFrom
-//sys WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASendTo
-//sys GetHostByName(name string) (h *Hostent, err error) [failretval==nil] = ws2_32.gethostbyname
-//sys GetServByName(name string, proto string) (s *Servent, err error) [failretval==nil] = ws2_32.getservbyname
-//sys Ntohs(netshort uint16) (u uint16) = ws2_32.ntohs
-//sys GetProtoByName(name string) (p *Protoent, err error) [failretval==nil] = ws2_32.getprotobyname
-//sys DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) = dnsapi.DnsQuery_W
-//sys DnsRecordListFree(rl *DNSRecord, freetype uint32) = dnsapi.DnsRecordListFree
-//sys GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) = ws2_32.GetAddrInfoW
-//sys FreeAddrInfoW(addrinfo *AddrinfoW) = ws2_32.FreeAddrInfoW
-//sys GetIfEntry(pIfRow *MibIfRow) (errcode error) = iphlpapi.GetIfEntry
-//sys GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) = iphlpapi.GetAdaptersInfo
-//sys SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) = kernel32.SetFileCompletionNotificationModes
-//sys WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) [failretval==-1] = ws2_32.WSAEnumProtocolsW
-
-// For testing: clients can set this flag to force
-// creation of IPv6 sockets to return EAFNOSUPPORT.
-var SocketDisableIPv6 bool
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [96]int8
-}
-
-type Sockaddr interface {
- sockaddr() (ptr unsafe.Pointer, len int32, err error) // lowercase; only we can define Sockaddrs
-}
-
-type SockaddrInet4 struct {
- Port int
- Addr [4]byte
- raw RawSockaddrInet4
-}
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, int32, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil
-}
-
-type SockaddrInet6 struct {
- Port int
- ZoneId uint32
- Addr [16]byte
- raw RawSockaddrInet6
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, int32, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET6
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil
-}
-
-type SockaddrUnix struct {
- Name string
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, int32, error) {
- // TODO(brainman): implement SockaddrUnix.sockaddr()
- return nil, 0, EWINDOWS
-}
-
-func (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) {
- switch rsa.Addr.Family {
- case AF_UNIX:
- return nil, EWINDOWS
-
- case AF_INET:
- pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet4)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_INET6:
- pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet6)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
- }
- return nil, EAFNOSUPPORT
-}
-
-func Socket(domain, typ, proto int) (fd Handle, err error) {
- if domain == AF_INET6 && SocketDisableIPv6 {
- return InvalidHandle, EAFNOSUPPORT
- }
- return socket(int32(domain), int32(typ), int32(proto))
-}
-
-func SetsockoptInt(fd Handle, level, opt int, value int) (err error) {
- v := int32(value)
- return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&v)), int32(unsafe.Sizeof(v)))
-}
-
-func Bind(fd Handle, sa Sockaddr) (err error) {
- ptr, n, err := sa.sockaddr()
- if err != nil {
- return err
- }
- return bind(fd, ptr, n)
-}
-
-func Connect(fd Handle, sa Sockaddr) (err error) {
- ptr, n, err := sa.sockaddr()
- if err != nil {
- return err
- }
- return connect(fd, ptr, n)
-}
-
-func Getsockname(fd Handle) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- l := int32(unsafe.Sizeof(rsa))
- if err = getsockname(fd, &rsa, &l); err != nil {
- return
- }
- return rsa.Sockaddr()
-}
-
-func Getpeername(fd Handle) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- l := int32(unsafe.Sizeof(rsa))
- if err = getpeername(fd, &rsa, &l); err != nil {
- return
- }
- return rsa.Sockaddr()
-}
-
-func Listen(s Handle, n int) (err error) {
- return listen(s, int32(n))
-}
-
-func Shutdown(fd Handle, how int) (err error) {
- return shutdown(fd, int32(how))
-}
-
-func WSASendto(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to Sockaddr, overlapped *Overlapped, croutine *byte) (err error) {
- rsa, l, err := to.sockaddr()
- if err != nil {
- return err
- }
- return WSASendTo(s, bufs, bufcnt, sent, flags, (*RawSockaddrAny)(unsafe.Pointer(rsa)), l, overlapped, croutine)
-}
-
-func LoadGetAddrInfo() error {
- return procGetAddrInfoW.Find()
-}
-
-var connectExFunc struct {
- once sync.Once
- addr uintptr
- err error
-}
-
-func LoadConnectEx() error {
- connectExFunc.once.Do(func() {
- var s Handle
- s, connectExFunc.err = Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)
- if connectExFunc.err != nil {
- return
- }
- defer CloseHandle(s)
- var n uint32
- connectExFunc.err = WSAIoctl(s,
- SIO_GET_EXTENSION_FUNCTION_POINTER,
- (*byte)(unsafe.Pointer(&WSAID_CONNECTEX)),
- uint32(unsafe.Sizeof(WSAID_CONNECTEX)),
- (*byte)(unsafe.Pointer(&connectExFunc.addr)),
- uint32(unsafe.Sizeof(connectExFunc.addr)),
- &n, nil, 0)
- })
- return connectExFunc.err
-}
-
-func connectEx(s Handle, name unsafe.Pointer, namelen int32, sendBuf *byte, sendDataLen uint32, bytesSent *uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := Syscall9(connectExFunc.addr, 7, uintptr(s), uintptr(name), uintptr(namelen), uintptr(unsafe.Pointer(sendBuf)), uintptr(sendDataLen), uintptr(unsafe.Pointer(bytesSent)), uintptr(unsafe.Pointer(overlapped)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func ConnectEx(fd Handle, sa Sockaddr, sendBuf *byte, sendDataLen uint32, bytesSent *uint32, overlapped *Overlapped) error {
- err := LoadConnectEx()
- if err != nil {
- return errorspkg.New("failed to find ConnectEx: " + err.Error())
- }
- ptr, n, err := sa.sockaddr()
- if err != nil {
- return err
- }
- return connectEx(fd, ptr, n, sendBuf, sendDataLen, bytesSent, overlapped)
-}
-
-// Invented structures to support what package os expects.
-type Rusage struct {
- CreationTime Filetime
- ExitTime Filetime
- KernelTime Filetime
- UserTime Filetime
-}
-
-type WaitStatus struct {
- ExitCode uint32
-}
-
-func (w WaitStatus) Exited() bool { return true }
-
-func (w WaitStatus) ExitStatus() int { return int(w.ExitCode) }
-
-func (w WaitStatus) Signal() Signal { return -1 }
-
-func (w WaitStatus) CoreDump() bool { return false }
-
-func (w WaitStatus) Stopped() bool { return false }
-
-func (w WaitStatus) Continued() bool { return false }
-
-func (w WaitStatus) StopSignal() Signal { return -1 }
-
-func (w WaitStatus) Signaled() bool { return false }
-
-func (w WaitStatus) TrapCause() int { return -1 }
-
-// Timespec is an invented structure on Windows, but here for
-// consistency with the syscall package for other operating systems.
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-// TODO(brainman): fix all needed for net
-
-func Accept(fd Handle) (nfd Handle, sa Sockaddr, err error) { return 0, nil, EWINDOWS }
-func Recvfrom(fd Handle, p []byte, flags int) (n int, from Sockaddr, err error) {
- return 0, nil, EWINDOWS
-}
-func Sendto(fd Handle, p []byte, flags int, to Sockaddr) (err error) { return EWINDOWS }
-func SetsockoptTimeval(fd Handle, level, opt int, tv *Timeval) (err error) { return EWINDOWS }
-
-// The Linger struct is wrong but we only noticed after Go 1.
-// sysLinger is the real system call structure.
-
-// BUG(brainman): The definition of Linger is not appropriate for direct use
-// with Setsockopt and Getsockopt.
-// Use SetsockoptLinger instead.
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type sysLinger struct {
- Onoff uint16
- Linger uint16
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-func GetsockoptInt(fd Handle, level, opt int) (int, error) { return -1, EWINDOWS }
-
-func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) {
- sys := sysLinger{Onoff: uint16(l.Onoff), Linger: uint16(l.Linger)}
- return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&sys)), int32(unsafe.Sizeof(sys)))
-}
-
-func SetsockoptInet4Addr(fd Handle, level, opt int, value [4]byte) (err error) {
- return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&value[0])), 4)
-}
-func SetsockoptIPMreq(fd Handle, level, opt int, mreq *IPMreq) (err error) {
- return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(mreq)), int32(unsafe.Sizeof(*mreq)))
-}
-func SetsockoptIPv6Mreq(fd Handle, level, opt int, mreq *IPv6Mreq) (err error) { return EWINDOWS }
-
-func Getpid() (pid int) { return int(getCurrentProcessId()) }
-
-func FindFirstFile(name *uint16, data *Win32finddata) (handle Handle, err error) {
- // NOTE(rsc): The Win32finddata struct is wrong for the system call:
- // the two paths are each one uint16 short. Use the correct struct,
- // a win32finddata1, and then copy the results out.
- // There is no loss of expressivity here, because the final
- // uint16, if it is used, is supposed to be a NUL, and Go doesn't need that.
- // For Go 1.1, we might avoid the allocation of win32finddata1 here
- // by adding a final Bug [2]uint16 field to the struct and then
- // adjusting the fields in the result directly.
- var data1 win32finddata1
- handle, err = findFirstFile1(name, &data1)
- if err == nil {
- copyFindData(data, &data1)
- }
- return
-}
-
-func FindNextFile(handle Handle, data *Win32finddata) (err error) {
- var data1 win32finddata1
- err = findNextFile1(handle, &data1)
- if err == nil {
- copyFindData(data, &data1)
- }
- return
-}
-
-// TODO(brainman): fix all needed for os
-func Getppid() (ppid int) { return -1 }
-
-func Fchdir(fd Handle) (err error) { return EWINDOWS }
-func Link(oldpath, newpath string) (err error) { return EWINDOWS }
-func Symlink(path, link string) (err error) { return EWINDOWS }
-func Readlink(path string, buf []byte) (n int, err error) { return 0, EWINDOWS }
-
-func Fchmod(fd Handle, mode uint32) (err error) { return EWINDOWS }
-func Chown(path string, uid int, gid int) (err error) { return EWINDOWS }
-func Lchown(path string, uid int, gid int) (err error) { return EWINDOWS }
-func Fchown(fd Handle, uid int, gid int) (err error) { return EWINDOWS }
-
-func Getuid() (uid int) { return -1 }
-func Geteuid() (euid int) { return -1 }
-func Getgid() (gid int) { return -1 }
-func Getegid() (egid int) { return -1 }
-func Getgroups() (gids []int, err error) { return nil, EWINDOWS }
-
-type Signal int
-
-func (s Signal) Signal() {}
-
-func (s Signal) String() string {
- if 0 <= s && int(s) < len(signals) {
- str := signals[s]
- if str != "" {
- return str
- }
- }
- return "signal " + itoa(int(s))
-}
diff --git a/src/pkg/syscall/syscall_windows_386.go b/src/pkg/syscall/syscall_windows_386.go
deleted file mode 100644
index 61d2d8cb6..000000000
--- a/src/pkg/syscall/syscall_windows_386.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
diff --git a/src/pkg/syscall/syscall_windows_amd64.go b/src/pkg/syscall/syscall_windows_amd64.go
deleted file mode 100644
index 61d2d8cb6..000000000
--- a/src/pkg/syscall/syscall_windows_amd64.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
diff --git a/src/pkg/syscall/syscall_windows_test.go b/src/pkg/syscall/syscall_windows_test.go
deleted file mode 100644
index 86842f2ad..000000000
--- a/src/pkg/syscall/syscall_windows_test.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall_test
-
-import (
- "io/ioutil"
- "os"
- "path/filepath"
- "syscall"
- "testing"
-)
-
-func TestWin32finddata(t *testing.T) {
- dir, err := ioutil.TempDir("", "go-build")
- if err != nil {
- t.Fatalf("failed to create temp directory: %v", err)
- }
- defer os.RemoveAll(dir)
-
- path := filepath.Join(dir, "long_name.and_extension")
- f, err := os.Create(path)
- if err != nil {
- t.Fatalf("failed to create %v: %v", path, err)
- }
- f.Close()
-
- type X struct {
- fd syscall.Win32finddata
- got byte
- pad [10]byte // to protect ourselves
-
- }
- var want byte = 2 // it is unlikely to have this character in the filename
- x := X{got: want}
-
- pathp, _ := syscall.UTF16PtrFromString(path)
- h, err := syscall.FindFirstFile(pathp, &(x.fd))
- if err != nil {
- t.Fatalf("FindFirstFile failed: %v", err)
- }
- err = syscall.FindClose(h)
- if err != nil {
- t.Fatalf("FindClose failed: %v", err)
- }
-
- if x.got != want {
- t.Fatalf("memory corruption: want=%d got=%d", want, x.got)
- }
-}
-
-func abort(funcname string, err error) {
- panic(funcname + " failed: " + err.Error())
-}
-
-func ExampleLoadLibrary() {
- h, err := syscall.LoadLibrary("kernel32.dll")
- if err != nil {
- abort("LoadLibrary", err)
- }
- defer syscall.FreeLibrary(h)
- proc, err := syscall.GetProcAddress(h, "GetVersion")
- if err != nil {
- abort("GetProcAddress", err)
- }
- r, _, _ := syscall.Syscall(uintptr(proc), 0, 0, 0, 0)
- major := byte(r)
- minor := uint8(r >> 8)
- build := uint16(r >> 16)
- print("windows version ", major, ".", minor, " (Build ", build, ")\n")
-}
diff --git a/src/pkg/syscall/tables_nacl.go b/src/pkg/syscall/tables_nacl.go
deleted file mode 100644
index 08f4ced53..000000000
--- a/src/pkg/syscall/tables_nacl.go
+++ /dev/null
@@ -1,324 +0,0 @@
-// Copyright 2013 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
-
-// TODO: generate with runtime/mknacl.sh, allow override with IRT.
-const (
- sys_null = 1
- sys_nameservice = 2
- sys_dup = 8
- sys_dup2 = 9
- sys_open = 10
- sys_close = 11
- sys_read = 12
- sys_write = 13
- sys_lseek = 14
- sys_ioctl = 15
- sys_stat = 16
- sys_fstat = 17
- sys_chmod = 18
- sys_brk = 20
- sys_mmap = 21
- sys_munmap = 22
- sys_getdents = 23
- sys_mprotect = 24
- sys_list_mappings = 25
- sys_exit = 30
- sys_getpid = 31
- sys_sched_yield = 32
- sys_sysconf = 33
- sys_gettimeofday = 40
- sys_clock = 41
- sys_nanosleep = 42
- sys_clock_getres = 43
- sys_clock_gettime = 44
- sys_mkdir = 45
- sys_rmdir = 46
- sys_chdir = 47
- sys_getcwd = 48
- sys_unlink = 49
- sys_imc_makeboundsock = 60
- sys_imc_accept = 61
- sys_imc_connect = 62
- sys_imc_sendmsg = 63
- sys_imc_recvmsg = 64
- sys_imc_mem_obj_create = 65
- sys_imc_socketpair = 66
- sys_mutex_create = 70
- sys_mutex_lock = 71
- sys_mutex_trylock = 72
- sys_mutex_unlock = 73
- sys_cond_create = 74
- sys_cond_wait = 75
- sys_cond_signal = 76
- sys_cond_broadcast = 77
- sys_cond_timed_wait_abs = 79
- sys_thread_create = 80
- sys_thread_exit = 81
- sys_tls_init = 82
- sys_thread_nice = 83
- sys_tls_get = 84
- sys_second_tls_set = 85
- sys_second_tls_get = 86
- sys_exception_handler = 87
- sys_exception_stack = 88
- sys_exception_clear_flag = 89
- sys_sem_create = 100
- sys_sem_wait = 101
- sys_sem_post = 102
- sys_sem_get_value = 103
- sys_dyncode_create = 104
- sys_dyncode_modify = 105
- sys_dyncode_delete = 106
- sys_test_infoleak = 109
- sys_test_crash = 110
- sys_test_syscall_1 = 111
- sys_test_syscall_2 = 112
-)
-
-// TODO: Auto-generate some day. (Hard-coded in binaries so not likely to change.)
-const (
- // native_client/src/trusted/service_runtime/include/sys/errno.h
- // The errors are mainly copied from Linux.
- EPERM Errno = 1 /* Operation not permitted */
- ENOENT Errno = 2 /* No such file or directory */
- ESRCH Errno = 3 /* No such process */
- EINTR Errno = 4 /* Interrupted system call */
- EIO Errno = 5 /* I/O error */
- ENXIO Errno = 6 /* No such device or address */
- E2BIG Errno = 7 /* Argument list too long */
- ENOEXEC Errno = 8 /* Exec format error */
- EBADF Errno = 9 /* Bad file number */
- ECHILD Errno = 10 /* No child processes */
- EAGAIN Errno = 11 /* Try again */
- ENOMEM Errno = 12 /* Out of memory */
- EACCES Errno = 13 /* Permission denied */
- EFAULT Errno = 14 /* Bad address */
- EBUSY Errno = 16 /* Device or resource busy */
- EEXIST Errno = 17 /* File exists */
- EXDEV Errno = 18 /* Cross-device link */
- ENODEV Errno = 19 /* No such device */
- ENOTDIR Errno = 20 /* Not a directory */
- EISDIR Errno = 21 /* Is a directory */
- EINVAL Errno = 22 /* Invalid argument */
- ENFILE Errno = 23 /* File table overflow */
- EMFILE Errno = 24 /* Too many open files */
- ENOTTY Errno = 25 /* Not a typewriter */
- EFBIG Errno = 27 /* File too large */
- ENOSPC Errno = 28 /* No space left on device */
- ESPIPE Errno = 29 /* Illegal seek */
- EROFS Errno = 30 /* Read-only file system */
- EMLINK Errno = 31 /* Too many links */
- EPIPE Errno = 32 /* Broken pipe */
- ENAMETOOLONG Errno = 36 /* File name too long */
- ENOSYS Errno = 38 /* Function not implemented */
- EDQUOT Errno = 122 /* Quota exceeded */
- EDOM Errno = 33 /* Math arg out of domain of func */
- ERANGE Errno = 34 /* Math result not representable */
- EDEADLK Errno = 35 /* Deadlock condition */
- ENOLCK Errno = 37 /* No record locks available */
- ENOTEMPTY Errno = 39 /* Directory not empty */
- ELOOP Errno = 40 /* Too many symbolic links */
- ENOMSG Errno = 42 /* No message of desired type */
- EIDRM Errno = 43 /* Identifier removed */
- ECHRNG Errno = 44 /* Channel number out of range */
- EL2NSYNC Errno = 45 /* Level 2 not synchronized */
- EL3HLT Errno = 46 /* Level 3 halted */
- EL3RST Errno = 47 /* Level 3 reset */
- ELNRNG Errno = 48 /* Link number out of range */
- EUNATCH Errno = 49 /* Protocol driver not attached */
- ENOCSI Errno = 50 /* No CSI structure available */
- EL2HLT Errno = 51 /* Level 2 halted */
- EBADE Errno = 52 /* Invalid exchange */
- EBADR Errno = 53 /* Invalid request descriptor */
- EXFULL Errno = 54 /* Exchange full */
- ENOANO Errno = 55 /* No anode */
- EBADRQC Errno = 56 /* Invalid request code */
- EBADSLT Errno = 57 /* Invalid slot */
- EDEADLOCK Errno = EDEADLK /* File locking deadlock error */
- EBFONT Errno = 59 /* Bad font file fmt */
- ENOSTR Errno = 60 /* Device not a stream */
- ENODATA Errno = 61 /* No data (for no delay io) */
- ETIME Errno = 62 /* Timer expired */
- ENOSR Errno = 63 /* Out of streams resources */
- ENONET Errno = 64 /* Machine is not on the network */
- ENOPKG Errno = 65 /* Package not installed */
- EREMOTE Errno = 66 /* The object is remote */
- ENOLINK Errno = 67 /* The link has been severed */
- EADV Errno = 68 /* Advertise error */
- ESRMNT Errno = 69 /* Srmount error */
- ECOMM Errno = 70 /* Communication error on send */
- EPROTO Errno = 71 /* Protocol error */
- EMULTIHOP Errno = 72 /* Multihop attempted */
- EDOTDOT Errno = 73 /* Cross mount point (not really error) */
- EBADMSG Errno = 74 /* Trying to read unreadable message */
- EOVERFLOW Errno = 75 /* Value too large for defined data type */
- ENOTUNIQ Errno = 76 /* Given log. name not unique */
- EBADFD Errno = 77 /* f.d. invalid for this operation */
- EREMCHG Errno = 78 /* Remote address changed */
- ELIBACC Errno = 79 /* Can't access a needed shared lib */
- ELIBBAD Errno = 80 /* Accessing a corrupted shared lib */
- ELIBSCN Errno = 81 /* .lib section in a.out corrupted */
- ELIBMAX Errno = 82 /* Attempting to link in too many libs */
- ELIBEXEC Errno = 83 /* Attempting to exec a shared library */
- EILSEQ Errno = 84
- EUSERS Errno = 87
- ENOTSOCK Errno = 88 /* Socket operation on non-socket */
- EDESTADDRREQ Errno = 89 /* Destination address required */
- EMSGSIZE Errno = 90 /* Message too long */
- EPROTOTYPE Errno = 91 /* Protocol wrong type for socket */
- ENOPROTOOPT Errno = 92 /* Protocol not available */
- EPROTONOSUPPORT Errno = 93 /* Unknown protocol */
- ESOCKTNOSUPPORT Errno = 94 /* Socket type not supported */
- EOPNOTSUPP Errno = 95 /* Operation not supported on transport endpoint */
- EPFNOSUPPORT Errno = 96 /* Protocol family not supported */
- EAFNOSUPPORT Errno = 97 /* Address family not supported by protocol family */
- EADDRINUSE Errno = 98 /* Address already in use */
- EADDRNOTAVAIL Errno = 99 /* Address not available */
- ENETDOWN Errno = 100 /* Network interface is not configured */
- ENETUNREACH Errno = 101 /* Network is unreachable */
- ENETRESET Errno = 102
- ECONNABORTED Errno = 103 /* Connection aborted */
- ECONNRESET Errno = 104 /* Connection reset by peer */
- ENOBUFS Errno = 105 /* No buffer space available */
- EISCONN Errno = 106 /* Socket is already connected */
- ENOTCONN Errno = 107 /* Socket is not connected */
- ESHUTDOWN Errno = 108 /* Can't send after socket shutdown */
- ETOOMANYREFS Errno = 109
- ETIMEDOUT Errno = 110 /* Connection timed out */
- ECONNREFUSED Errno = 111 /* Connection refused */
- EHOSTDOWN Errno = 112 /* Host is down */
- EHOSTUNREACH Errno = 113 /* Host is unreachable */
- EALREADY Errno = 114 /* Socket already connected */
- EINPROGRESS Errno = 115 /* Connection already in progress */
- ESTALE Errno = 116
- ENOTSUP Errno = EOPNOTSUPP /* Not supported */
- ENOMEDIUM Errno = 123 /* No medium (in tape drive) */
- ECANCELED Errno = 125 /* Operation canceled. */
- ELBIN Errno = 2048 /* Inode is remote (not really error) */
- EFTYPE Errno = 2049 /* Inappropriate file type or format */
- ENMFILE Errno = 2050 /* No more files */
- EPROCLIM Errno = 2051
- ENOSHARE Errno = 2052 /* No such host or network path */
- ECASECLASH Errno = 2053 /* Filename exists with different case */
- EWOULDBLOCK Errno = EAGAIN /* Operation would block */
-)
-
-// TODO: Auto-generate some day. (Hard-coded in binaries so not likely to change.)
-var errorstr = [...]string{
- EPERM: "Operation not permitted",
- ENOENT: "No such file or directory",
- ESRCH: "No such process",
- EINTR: "Interrupted system call",
- EIO: "I/O error",
- ENXIO: "No such device or address",
- E2BIG: "Argument list too long",
- ENOEXEC: "Exec format error",
- EBADF: "Bad file number",
- ECHILD: "No child processes",
- EAGAIN: "Try again",
- ENOMEM: "Out of memory",
- EACCES: "Permission denied",
- EFAULT: "Bad address",
- EBUSY: "Device or resource busy",
- EEXIST: "File exists",
- EXDEV: "Cross-device link",
- ENODEV: "No such device",
- ENOTDIR: "Not a directory",
- EISDIR: "Is a directory",
- EINVAL: "Invalid argument",
- ENFILE: "File table overflow",
- EMFILE: "Too many open files",
- ENOTTY: "Not a typewriter",
- EFBIG: "File too large",
- ENOSPC: "No space left on device",
- ESPIPE: "Illegal seek",
- EROFS: "Read-only file system",
- EMLINK: "Too many links",
- EPIPE: "Broken pipe",
- ENAMETOOLONG: "File name too long",
- ENOSYS: "not implemented on Native Client",
- EDQUOT: "Quota exceeded",
- EDOM: "Math arg out of domain of func",
- ERANGE: "Math result not representable",
- EDEADLK: "Deadlock condition",
- ENOLCK: "No record locks available",
- ENOTEMPTY: "Directory not empty",
- ELOOP: "Too many symbolic links",
- ENOMSG: "No message of desired type",
- EIDRM: "Identifier removed",
- ECHRNG: "Channel number out of range",
- EL2NSYNC: "Level 2 not synchronized",
- EL3HLT: "Level 3 halted",
- EL3RST: "Level 3 reset",
- ELNRNG: "Link number out of range",
- EUNATCH: "Protocol driver not attached",
- ENOCSI: "No CSI structure available",
- EL2HLT: "Level 2 halted",
- EBADE: "Invalid exchange",
- EBADR: "Invalid request descriptor",
- EXFULL: "Exchange full",
- ENOANO: "No anode",
- EBADRQC: "Invalid request code",
- EBADSLT: "Invalid slot",
- EBFONT: "Bad font file fmt",
- ENOSTR: "Device not a stream",
- ENODATA: "No data (for no delay io)",
- ETIME: "Timer expired",
- ENOSR: "Out of streams resources",
- ENONET: "Machine is not on the network",
- ENOPKG: "Package not installed",
- EREMOTE: "The object is remote",
- ENOLINK: "The link has been severed",
- EADV: "Advertise error",
- ESRMNT: "Srmount error",
- ECOMM: "Communication error on send",
- EPROTO: "Protocol error",
- EMULTIHOP: "Multihop attempted",
- EDOTDOT: "Cross mount point (not really error)",
- EBADMSG: "Trying to read unreadable message",
- EOVERFLOW: "Value too large for defined data type",
- ENOTUNIQ: "Given log. name not unique",
- EBADFD: "f.d. invalid for this operation",
- EREMCHG: "Remote address changed",
- ELIBACC: "Can't access a needed shared lib",
- ELIBBAD: "Accessing a corrupted shared lib",
- ELIBSCN: ".lib section in a.out corrupted",
- ELIBMAX: "Attempting to link in too many libs",
- ELIBEXEC: "Attempting to exec a shared library",
- ENOTSOCK: "Socket operation on non-socket",
- EDESTADDRREQ: "Destination address required",
- EMSGSIZE: "Message too long",
- EPROTOTYPE: "Protocol wrong type for socket",
- ENOPROTOOPT: "Protocol not available",
- EPROTONOSUPPORT: "Unknown protocol",
- ESOCKTNOSUPPORT: "Socket type not supported",
- EOPNOTSUPP: "Operation not supported on transport endpoint",
- EPFNOSUPPORT: "Protocol family not supported",
- EAFNOSUPPORT: "Address family not supported by protocol family",
- EADDRINUSE: "Address already in use",
- EADDRNOTAVAIL: "Address not available",
- ENETDOWN: "Network interface is not configured",
- ENETUNREACH: "Network is unreachable",
- ECONNABORTED: "Connection aborted",
- ECONNRESET: "Connection reset by peer",
- ENOBUFS: "No buffer space available",
- EISCONN: "Socket is already connected",
- ENOTCONN: "Socket is not connected",
- ESHUTDOWN: "Can't send after socket shutdown",
- ETIMEDOUT: "Connection timed out",
- ECONNREFUSED: "Connection refused",
- EHOSTDOWN: "Host is down",
- EHOSTUNREACH: "Host is unreachable",
- EALREADY: "Socket already connected",
- EINPROGRESS: "Connection already in progress",
- ENOMEDIUM: "No medium (in tape drive)",
- ECANCELED: "Operation canceled.",
- ELBIN: "Inode is remote (not really error)",
- EFTYPE: "Inappropriate file type or format",
- ENMFILE: "No more files",
- ENOSHARE: "No such host or network path",
- ECASECLASH: "Filename exists with different case",
-}
diff --git a/src/pkg/syscall/time_nacl_386.s b/src/pkg/syscall/time_nacl_386.s
deleted file mode 100644
index b5a22d31b..000000000
--- a/src/pkg/syscall/time_nacl_386.s
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "../../cmd/ld/textflag.h"
-
-TEXT ·startTimer(SB),NOSPLIT,$0
- JMP time·startTimer(SB)
-
-TEXT ·stopTimer(SB),NOSPLIT,$0
- JMP time·stopTimer(SB)
diff --git a/src/pkg/syscall/time_nacl_amd64p32.s b/src/pkg/syscall/time_nacl_amd64p32.s
deleted file mode 100644
index b5a22d31b..000000000
--- a/src/pkg/syscall/time_nacl_amd64p32.s
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "../../cmd/ld/textflag.h"
-
-TEXT ·startTimer(SB),NOSPLIT,$0
- JMP time·startTimer(SB)
-
-TEXT ·stopTimer(SB),NOSPLIT,$0
- JMP time·stopTimer(SB)
diff --git a/src/pkg/syscall/types_darwin.go b/src/pkg/syscall/types_darwin.go
deleted file mode 100644
index a043071f2..000000000
--- a/src/pkg/syscall/types_darwin.go
+++ /dev/null
@@ -1,243 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package syscall
-
-/*
-#define __DARWIN_UNIX03 0
-#define KERNEL
-#define _DARWIN_USE_64_BIT_INODE
-#include <dirent.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <termios.h>
-#include <unistd.h>
-#include <mach/mach.h>
-#include <mach/message.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/if_var.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-type Timeval32 C.struct_timeval32
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-type Stat_t C.struct_stat64
-
-type Statfs_t C.struct_statfs64
-
-type Flock_t C.struct_flock
-
-type Fstore_t C.struct_fstore
-
-type Radvisory_t C.struct_radvisory
-
-type Fbootstraptransfer_t C.struct_fbootstraptransfer
-
-type Log2phys_t C.struct_log2phys
-
-type Fsid C.struct_fsid
-
-type Dirent C.struct_dirent
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet4Pktinfo C.struct_in_pktinfo
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
- PTRACE_TRACEME = C.PT_TRACE_ME
- PTRACE_CONT = C.PT_CONTINUE
- PTRACE_KILL = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfData = C.sizeof_struct_if_data
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
- SizeofIfmaMsghdr2 = C.sizeof_struct_ifma_msghdr2
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfmaMsghdr C.struct_ifma_msghdr
-
-type IfmaMsghdr2 C.struct_ifma_msghdr2
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-// Terminal handling
-
-type Termios C.struct_termios
diff --git a/src/pkg/syscall/types_dragonfly.go b/src/pkg/syscall/types_dragonfly.go
deleted file mode 100644
index fb7fd1bb4..000000000
--- a/src/pkg/syscall/types_dragonfly.go
+++ /dev/null
@@ -1,242 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +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 <termios.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-const ( // Directory mode bits
- S_IFMT = C.S_IFMT
- S_IFIFO = C.S_IFIFO
- S_IFCHR = C.S_IFCHR
- S_IFDIR = C.S_IFDIR
- S_IFBLK = C.S_IFBLK
- S_IFREG = C.S_IFREG
- S_IFLNK = C.S_IFLNK
- S_IFSOCK = C.S_IFSOCK
- S_ISUID = C.S_ISUID
- S_ISGID = C.S_ISGID
- S_ISVTX = C.S_ISVTX
- S_IRUSR = C.S_IRUSR
- S_IWUSR = C.S_IWUSR
- S_IXUSR = C.S_IXUSR
-)
-
-type Stat_t C.struct_stat
-
-type Statfs_t C.struct_statfs
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-type Fsid C.struct_fsid
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
- PTRACE_TRACEME = C.PT_TRACE_ME
- PTRACE_CONT = C.PT_CONTINUE
- PTRACE_KILL = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfData = C.sizeof_struct_if_data
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
- SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfmaMsghdr C.struct_ifma_msghdr
-
-type IfAnnounceMsghdr C.struct_if_announcemsghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-// Terminal handling
-
-type Termios C.struct_termios
diff --git a/src/pkg/syscall/types_freebsd.go b/src/pkg/syscall/types_freebsd.go
deleted file mode 100644
index 68a69312b..000000000
--- a/src/pkg/syscall/types_freebsd.go
+++ /dev/null
@@ -1,342 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +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 <termios.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-// This structure is a duplicate of stat on FreeBSD 8-STABLE.
-// See /usr/include/sys/stat.h.
-struct stat8 {
-#undef st_atimespec st_atim
-#undef st_mtimespec st_mtim
-#undef st_ctimespec st_ctim
-#undef st_birthtimespec st_birthtim
- __dev_t st_dev;
- ino_t st_ino;
- mode_t st_mode;
- nlink_t st_nlink;
- uid_t st_uid;
- gid_t st_gid;
- __dev_t st_rdev;
-#if __BSD_VISIBLE
- struct timespec st_atimespec;
- struct timespec st_mtimespec;
- struct timespec st_ctimespec;
-#else
- time_t st_atime;
- long __st_atimensec;
- time_t st_mtime;
- long __st_mtimensec;
- time_t st_ctime;
- long __st_ctimensec;
-#endif
- off_t st_size;
- blkcnt_t st_blocks;
- blksize_t st_blksize;
- fflags_t st_flags;
- __uint32_t st_gen;
- __int32_t st_lspare;
-#if __BSD_VISIBLE
- struct timespec st_birthtimespec;
- unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
- unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
-#else
- time_t st_birthtime;
- long st_birthtimensec;
- unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
- unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
-#endif
-};
-
-// This structure is a duplicate of if_data on FreeBSD 8-STABLE.
-// See /usr/include/net/if.h.
-struct if_data8 {
- u_char ifi_type;
- u_char ifi_physical;
- u_char ifi_addrlen;
- u_char ifi_hdrlen;
- u_char ifi_link_state;
- u_char ifi_spare_char1;
- u_char ifi_spare_char2;
- u_char ifi_datalen;
- u_long ifi_mtu;
- u_long ifi_metric;
- u_long ifi_baudrate;
- u_long ifi_ipackets;
- u_long ifi_ierrors;
- u_long ifi_opackets;
- u_long ifi_oerrors;
- u_long ifi_collisions;
- u_long ifi_ibytes;
- u_long ifi_obytes;
- u_long ifi_imcasts;
- u_long ifi_omcasts;
- u_long ifi_iqdrops;
- u_long ifi_noproto;
- u_long ifi_hwassist;
- time_t ifi_epoch;
- struct timeval ifi_lastchange;
-};
-
-// This structure is a duplicate of if_msghdr on FreeBSD 8-STABLE.
-// See /usr/include/net/if.h.
-struct if_msghdr8 {
- u_short ifm_msglen;
- u_char ifm_version;
- u_char ifm_type;
- int ifm_addrs;
- int ifm_flags;
- u_short ifm_index;
- struct if_data8 ifm_data;
-};
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-const ( // Directory mode bits
- S_IFMT = C.S_IFMT
- S_IFIFO = C.S_IFIFO
- S_IFCHR = C.S_IFCHR
- S_IFDIR = C.S_IFDIR
- S_IFBLK = C.S_IFBLK
- S_IFREG = C.S_IFREG
- S_IFLNK = C.S_IFLNK
- S_IFSOCK = C.S_IFSOCK
- S_ISUID = C.S_ISUID
- S_ISGID = C.S_ISGID
- S_ISVTX = C.S_ISVTX
- S_IRUSR = C.S_IRUSR
- S_IWUSR = C.S_IWUSR
- S_IXUSR = C.S_IXUSR
-)
-
-type Stat_t C.struct_stat8
-
-type Statfs_t C.struct_statfs
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-type Fsid C.struct_fsid
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPMreqn C.struct_ip_mreqn
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPMreqn = C.sizeof_struct_ip_mreqn
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
- PTRACE_TRACEME = C.PT_TRACE_ME
- PTRACE_CONT = C.PT_CONTINUE
- PTRACE_KILL = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
- sizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr8
- sizeofIfData = C.sizeof_struct_if_data
- SizeofIfData = C.sizeof_struct_if_data8
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
- SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type ifMsghdr C.struct_if_msghdr
-
-type IfMsghdr C.struct_if_msghdr8
-
-type ifData C.struct_if_data
-
-type IfData C.struct_if_data8
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfmaMsghdr C.struct_ifma_msghdr
-
-type IfAnnounceMsghdr C.struct_if_announcemsghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfZbuf = C.sizeof_struct_bpf_zbuf
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
- SizeofBpfZbufHeader = C.sizeof_struct_bpf_zbuf_header
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfZbuf C.struct_bpf_zbuf
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-type BpfZbufHeader C.struct_bpf_zbuf_header
-
-// Terminal handling
-
-type Termios C.struct_termios
diff --git a/src/pkg/syscall/types_linux.go b/src/pkg/syscall/types_linux.go
deleted file mode 100644
index e8396a41f..000000000
--- a/src/pkg/syscall/types_linux.go
+++ /dev/null
@@ -1,484 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package syscall
-
-/*
-#define _LARGEFILE_SOURCE
-#define _LARGEFILE64_SOURCE
-#define _FILE_OFFSET_BITS 64
-#define _GNU_SOURCE
-
-#include <dirent.h>
-#include <fcntl.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <netpacket/packet.h>
-#include <signal.h>
-#include <stdio.h>
-#include <sys/epoll.h>
-#include <sys/inotify.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/sysinfo.h>
-#include <sys/time.h>
-#include <sys/times.h>
-#include <sys/timex.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <sys/user.h>
-#include <sys/utsname.h>
-#include <sys/wait.h>
-#include <linux/filter.h>
-#include <linux/netlink.h>
-#include <linux/rtnetlink.h>
-#include <linux/icmpv6.h>
-#include <termios.h>
-#include <time.h>
-#include <unistd.h>
-#include <ustat.h>
-#include <utime.h>
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_ll s5;
- struct sockaddr_nl s6;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-// copied from /usr/include/linux/un.h
-struct my_sockaddr_un {
- sa_family_t sun_family;
-#ifdef __ARM_EABI__
- // on ARM char is by default unsigned
- signed char sun_path[108];
-#else
- char sun_path[108];
-#endif
-};
-
-#ifdef __ARM_EABI__
-typedef struct user_regs PtraceRegs;
-#else
-typedef struct user_regs_struct PtraceRegs;
-#endif
-
-// The real epoll_event is a union, and godefs doesn't handle it well.
-struct my_epoll_event {
- uint32_t events;
-#ifdef __ARM_EABI__
- // padding is not specified in linux/eventpoll.h but added to conform to the
- // alignment requirements of EABI
- int32_t padFd;
-#endif
- int32_t fd;
- int32_t pad;
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
- PathMax = C.PATH_MAX
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-type Timex C.struct_timex
-
-type Time_t C.time_t
-
-type Tms C.struct_tms
-
-type Utimbuf C.struct_utimbuf
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-type Stat_t C.struct_stat
-
-type Statfs_t C.struct_statfs
-
-type Dirent C.struct_dirent
-
-type Fsid C.fsid_t
-
-type Flock_t C.struct_flock
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_my_sockaddr_un
-
-type RawSockaddrLinklayer C.struct_sockaddr_ll
-
-type RawSockaddrNetlink C.struct_sockaddr_nl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPMreqn C.struct_ip_mreqn
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet4Pktinfo C.struct_in_pktinfo
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-type Ucred C.struct_ucred
-
-type TCPInfo C.struct_tcp_info
-
-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
- SizeofSockaddrLinklayer = C.sizeof_struct_sockaddr_ll
- SizeofSockaddrNetlink = C.sizeof_struct_sockaddr_nl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPMreqn = C.sizeof_struct_ip_mreqn
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
- SizeofUcred = C.sizeof_struct_ucred
- SizeofTCPInfo = C.sizeof_struct_tcp_info
-)
-
-// Netlink routing and interface messages
-
-const (
- IFA_UNSPEC = C.IFA_UNSPEC
- IFA_ADDRESS = C.IFA_ADDRESS
- IFA_LOCAL = C.IFA_LOCAL
- IFA_LABEL = C.IFA_LABEL
- IFA_BROADCAST = C.IFA_BROADCAST
- IFA_ANYCAST = C.IFA_ANYCAST
- IFA_CACHEINFO = C.IFA_CACHEINFO
- IFA_MULTICAST = C.IFA_MULTICAST
- IFLA_UNSPEC = C.IFLA_UNSPEC
- IFLA_ADDRESS = C.IFLA_ADDRESS
- IFLA_BROADCAST = C.IFLA_BROADCAST
- IFLA_IFNAME = C.IFLA_IFNAME
- IFLA_MTU = C.IFLA_MTU
- IFLA_LINK = C.IFLA_LINK
- IFLA_QDISC = C.IFLA_QDISC
- IFLA_STATS = C.IFLA_STATS
- IFLA_COST = C.IFLA_COST
- IFLA_PRIORITY = C.IFLA_PRIORITY
- IFLA_MASTER = C.IFLA_MASTER
- IFLA_WIRELESS = C.IFLA_WIRELESS
- IFLA_PROTINFO = C.IFLA_PROTINFO
- IFLA_TXQLEN = C.IFLA_TXQLEN
- IFLA_MAP = C.IFLA_MAP
- IFLA_WEIGHT = C.IFLA_WEIGHT
- IFLA_OPERSTATE = C.IFLA_OPERSTATE
- IFLA_LINKMODE = C.IFLA_LINKMODE
- IFLA_LINKINFO = C.IFLA_LINKINFO
- IFLA_NET_NS_PID = C.IFLA_NET_NS_PID
- IFLA_IFALIAS = C.IFLA_IFALIAS
- IFLA_MAX = C.IFLA_MAX
- RT_SCOPE_UNIVERSE = C.RT_SCOPE_UNIVERSE
- RT_SCOPE_SITE = C.RT_SCOPE_SITE
- RT_SCOPE_LINK = C.RT_SCOPE_LINK
- RT_SCOPE_HOST = C.RT_SCOPE_HOST
- RT_SCOPE_NOWHERE = C.RT_SCOPE_NOWHERE
- RT_TABLE_UNSPEC = C.RT_TABLE_UNSPEC
- RT_TABLE_COMPAT = C.RT_TABLE_COMPAT
- RT_TABLE_DEFAULT = C.RT_TABLE_DEFAULT
- RT_TABLE_MAIN = C.RT_TABLE_MAIN
- RT_TABLE_LOCAL = C.RT_TABLE_LOCAL
- RT_TABLE_MAX = C.RT_TABLE_MAX
- RTA_UNSPEC = C.RTA_UNSPEC
- RTA_DST = C.RTA_DST
- RTA_SRC = C.RTA_SRC
- RTA_IIF = C.RTA_IIF
- RTA_OIF = C.RTA_OIF
- RTA_GATEWAY = C.RTA_GATEWAY
- RTA_PRIORITY = C.RTA_PRIORITY
- RTA_PREFSRC = C.RTA_PREFSRC
- RTA_METRICS = C.RTA_METRICS
- RTA_MULTIPATH = C.RTA_MULTIPATH
- RTA_FLOW = C.RTA_FLOW
- RTA_CACHEINFO = C.RTA_CACHEINFO
- RTA_TABLE = C.RTA_TABLE
- RTN_UNSPEC = C.RTN_UNSPEC
- RTN_UNICAST = C.RTN_UNICAST
- RTN_LOCAL = C.RTN_LOCAL
- RTN_BROADCAST = C.RTN_BROADCAST
- RTN_ANYCAST = C.RTN_ANYCAST
- RTN_MULTICAST = C.RTN_MULTICAST
- RTN_BLACKHOLE = C.RTN_BLACKHOLE
- RTN_UNREACHABLE = C.RTN_UNREACHABLE
- RTN_PROHIBIT = C.RTN_PROHIBIT
- RTN_THROW = C.RTN_THROW
- RTN_NAT = C.RTN_NAT
- RTN_XRESOLVE = C.RTN_XRESOLVE
- RTNLGRP_NONE = C.RTNLGRP_NONE
- RTNLGRP_LINK = C.RTNLGRP_LINK
- RTNLGRP_NOTIFY = C.RTNLGRP_NOTIFY
- RTNLGRP_NEIGH = C.RTNLGRP_NEIGH
- RTNLGRP_TC = C.RTNLGRP_TC
- RTNLGRP_IPV4_IFADDR = C.RTNLGRP_IPV4_IFADDR
- RTNLGRP_IPV4_MROUTE = C.RTNLGRP_IPV4_MROUTE
- RTNLGRP_IPV4_ROUTE = C.RTNLGRP_IPV4_ROUTE
- RTNLGRP_IPV4_RULE = C.RTNLGRP_IPV4_RULE
- RTNLGRP_IPV6_IFADDR = C.RTNLGRP_IPV6_IFADDR
- RTNLGRP_IPV6_MROUTE = C.RTNLGRP_IPV6_MROUTE
- RTNLGRP_IPV6_ROUTE = C.RTNLGRP_IPV6_ROUTE
- RTNLGRP_IPV6_IFINFO = C.RTNLGRP_IPV6_IFINFO
- RTNLGRP_IPV6_PREFIX = C.RTNLGRP_IPV6_PREFIX
- RTNLGRP_IPV6_RULE = C.RTNLGRP_IPV6_RULE
- RTNLGRP_ND_USEROPT = C.RTNLGRP_ND_USEROPT
- SizeofNlMsghdr = C.sizeof_struct_nlmsghdr
- SizeofNlMsgerr = C.sizeof_struct_nlmsgerr
- SizeofRtGenmsg = C.sizeof_struct_rtgenmsg
- SizeofNlAttr = C.sizeof_struct_nlattr
- SizeofRtAttr = C.sizeof_struct_rtattr
- SizeofIfInfomsg = C.sizeof_struct_ifinfomsg
- SizeofIfAddrmsg = C.sizeof_struct_ifaddrmsg
- SizeofRtMsg = C.sizeof_struct_rtmsg
- SizeofRtNexthop = C.sizeof_struct_rtnexthop
-)
-
-type NlMsghdr C.struct_nlmsghdr
-
-type NlMsgerr C.struct_nlmsgerr
-
-type RtGenmsg C.struct_rtgenmsg
-
-type NlAttr C.struct_nlattr
-
-type RtAttr C.struct_rtattr
-
-type IfInfomsg C.struct_ifinfomsg
-
-type IfAddrmsg C.struct_ifaddrmsg
-
-type RtMsg C.struct_rtmsg
-
-type RtNexthop C.struct_rtnexthop
-
-// Linux socket filter
-
-const (
- SizeofSockFilter = C.sizeof_struct_sock_filter
- SizeofSockFprog = C.sizeof_struct_sock_fprog
-)
-
-type SockFilter C.struct_sock_filter
-
-type SockFprog C.struct_sock_fprog
-
-// Inotify
-
-type InotifyEvent C.struct_inotify_event
-
-const SizeofInotifyEvent = C.sizeof_struct_inotify_event
-
-// Ptrace
-
-// Register structures
-type PtraceRegs C.PtraceRegs
-
-// Misc
-
-type FdSet C.fd_set
-
-type Sysinfo_t C.struct_sysinfo
-
-type Utsname C.struct_utsname
-
-type Ustat_t C.struct_ustat
-
-type EpollEvent C.struct_my_epoll_event
-
-const (
- _AT_FDCWD = C.AT_FDCWD
-)
-
-// Terminal handling
-
-type Termios C.struct_termios
-
-const (
- VINTR = C.VINTR
- VQUIT = C.VQUIT
- VERASE = C.VERASE
- VKILL = C.VKILL
- VEOF = C.VEOF
- VTIME = C.VTIME
- VMIN = C.VMIN
- VSWTC = C.VSWTC
- VSTART = C.VSTART
- VSTOP = C.VSTOP
- VSUSP = C.VSUSP
- VEOL = C.VEOL
- VREPRINT = C.VREPRINT
- VDISCARD = C.VDISCARD
- VWERASE = C.VWERASE
- VLNEXT = C.VLNEXT
- VEOL2 = C.VEOL2
- IGNBRK = C.IGNBRK
- BRKINT = C.BRKINT
- IGNPAR = C.IGNPAR
- PARMRK = C.PARMRK
- INPCK = C.INPCK
- ISTRIP = C.ISTRIP
- INLCR = C.INLCR
- IGNCR = C.IGNCR
- ICRNL = C.ICRNL
- IUCLC = C.IUCLC
- IXON = C.IXON
- IXANY = C.IXANY
- IXOFF = C.IXOFF
- IMAXBEL = C.IMAXBEL
- IUTF8 = C.IUTF8
- OPOST = C.OPOST
- OLCUC = C.OLCUC
- ONLCR = C.ONLCR
- OCRNL = C.OCRNL
- ONOCR = C.ONOCR
- ONLRET = C.ONLRET
- OFILL = C.OFILL
- OFDEL = C.OFDEL
- B0 = C.B0
- B50 = C.B50
- B75 = C.B75
- B110 = C.B110
- B134 = C.B134
- B150 = C.B150
- B200 = C.B200
- B300 = C.B300
- B600 = C.B600
- B1200 = C.B1200
- B1800 = C.B1800
- B2400 = C.B2400
- B4800 = C.B4800
- B9600 = C.B9600
- B19200 = C.B19200
- B38400 = C.B38400
- CSIZE = C.CSIZE
- CS5 = C.CS5
- CS6 = C.CS6
- CS7 = C.CS7
- CS8 = C.CS8
- CSTOPB = C.CSTOPB
- CREAD = C.CREAD
- PARENB = C.PARENB
- PARODD = C.PARODD
- HUPCL = C.HUPCL
- CLOCAL = C.CLOCAL
- B57600 = C.B57600
- B115200 = C.B115200
- B230400 = C.B230400
- B460800 = C.B460800
- B500000 = C.B500000
- B576000 = C.B576000
- B921600 = C.B921600
- B1000000 = C.B1000000
- B1152000 = C.B1152000
- B1500000 = C.B1500000
- B2000000 = C.B2000000
- B2500000 = C.B2500000
- B3000000 = C.B3000000
- B3500000 = C.B3500000
- B4000000 = C.B4000000
- ISIG = C.ISIG
- ICANON = C.ICANON
- XCASE = C.XCASE
- ECHO = C.ECHO
- ECHOE = C.ECHOE
- ECHOK = C.ECHOK
- ECHONL = C.ECHONL
- NOFLSH = C.NOFLSH
- TOSTOP = C.TOSTOP
- ECHOCTL = C.ECHOCTL
- ECHOPRT = C.ECHOPRT
- ECHOKE = C.ECHOKE
- FLUSHO = C.FLUSHO
- PENDIN = C.PENDIN
- IEXTEN = C.IEXTEN
- TCGETS = C.TCGETS
- TCSETS = C.TCSETS
-)
diff --git a/src/pkg/syscall/types_netbsd.go b/src/pkg/syscall/types_netbsd.go
deleted file mode 100644
index 04354a32a..000000000
--- a/src/pkg/syscall/types_netbsd.go
+++ /dev/null
@@ -1,232 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +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 <termios.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/sysctl.h>
-#include <sys/time.h>
-#include <sys/uio.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-type Stat_t C.struct_stat
-
-type Statfs_t C.struct_statfs
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-type Fsid C.fsid_t
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
- PTRACE_TRACEME = C.PT_TRACE_ME
- PTRACE_CONT = C.PT_CONTINUE
- PTRACE_KILL = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfData = C.sizeof_struct_if_data
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfAnnounceMsghdr C.struct_if_announcemsghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-type Mclpool C.struct_mclpool
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-type BpfTimeval C.struct_bpf_timeval
-
-// Terminal handling
-
-type Termios C.struct_termios
-
-// Sysctl
-
-type Sysctlnode C.struct_sysctlnode
diff --git a/src/pkg/syscall/types_openbsd.go b/src/pkg/syscall/types_openbsd.go
deleted file mode 100644
index e6d1ea704..000000000
--- a/src/pkg/syscall/types_openbsd.go
+++ /dev/null
@@ -1,244 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +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 <termios.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/uio.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-const ( // Directory mode bits
- S_IFMT = C.S_IFMT
- S_IFIFO = C.S_IFIFO
- S_IFCHR = C.S_IFCHR
- S_IFDIR = C.S_IFDIR
- S_IFBLK = C.S_IFBLK
- S_IFREG = C.S_IFREG
- S_IFLNK = C.S_IFLNK
- S_IFSOCK = C.S_IFSOCK
- S_ISUID = C.S_ISUID
- S_ISGID = C.S_ISGID
- S_ISVTX = C.S_ISVTX
- S_IRUSR = C.S_IRUSR
- S_IWUSR = C.S_IWUSR
- S_IXUSR = C.S_IXUSR
-)
-
-type Stat_t C.struct_stat
-
-type Statfs_t C.struct_statfs
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-type Fsid C.fsid_t
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
- PTRACE_TRACEME = C.PT_TRACE_ME
- PTRACE_CONT = C.PT_CONTINUE
- PTRACE_KILL = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfData = C.sizeof_struct_if_data
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfAnnounceMsghdr C.struct_if_announcemsghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-type Mclpool C.struct_mclpool
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-type BpfTimeval C.struct_bpf_timeval
-
-// Terminal handling
-
-type Termios C.struct_termios
diff --git a/src/pkg/syscall/types_plan9.c b/src/pkg/syscall/types_plan9.c
deleted file mode 100644
index cd9e15fa8..000000000
--- a/src/pkg/syscall/types_plan9.c
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to godefs. See also mkerrors.sh and mkall.sh
-*/
-
-typedef unsigned short ushort;
-typedef unsigned char uchar;
-typedef unsigned long ulong;
-typedef unsigned int uint;
-typedef long long vlong;
-typedef unsigned long long uvlong;
-
-typedef int $_C_int;
-
-enum {
- OREAD = 0, // open for read
- OWRITE = 1, // write
- ORDWR = 2, // read and write
- OEXEC = 3, // execute, == read but check execute permission
- OTRUNC = 16, // or'ed in (except for exec), truncate file first
- OCEXEC = 32, // or'ed in, close on exec
- ORCLOSE = 64, // or'ed in, remove on close
- OEXCL = 0x1000, // or'ed in, exclusive use (create only)
-
- $O_RDONLY = OREAD,
- $O_WRONLY = OWRITE,
- $O_RDWR = ORDWR,
- $O_TRUNC = OTRUNC,
- $O_CLOEXEC = OCEXEC,
- $O_EXCL = OEXCL,
-
- $STATMAX = 65535U,
- $ERRMAX = 128,
-
- $MORDER = 0x0003, // mask for bits defining order of mounting
- $MREPL = 0x0000, // mount replaces object
- $MBEFORE = 0x0001, // mount goes before others in union directory
- $MAFTER = 0x0002, // mount goes after others in union directory
- $MCREATE = 0x0004, // permit creation in mounted directory
- $MCACHE = 0x0010, // cache some data
- $MMASK = 0x0017, // all bits on
-
- $RFNAMEG = (1<<0),
- $RFENVG = (1<<1),
- $RFFDG = (1<<2),
- $RFNOTEG = (1<<3),
- $RFPROC = (1<<4),
- $RFMEM = (1<<5),
- $RFNOWAIT = (1<<6),
- $RFCNAMEG = (1<<10),
- $RFCENVG = (1<<11),
- $RFCFDG = (1<<12),
- $RFREND = (1<<13),
- $RFNOMNT = (1<<14),
-
- // bits in Qid.type
- $QTDIR = 0x80, // type bit for directories
- $QTAPPEND = 0x40, // type bit for append only files
- $QTEXCL = 0x20, // type bit for exclusive use files
- $QTMOUNT = 0x10, // type bit for mounted channel
- $QTAUTH = 0x08, // type bit for authentication file
- $QTTMP = 0x04, // type bit for not-backed-up file
- $QTFILE = 0x00, // plain file
-
-
- // bits in Dir.mode
- $DMDIR = 0x80000000, // mode bit for directories
- $DMAPPEND = 0x40000000, // mode bit for append only files
- $DMEXCL = 0x20000000, // mode bit for exclusive use files
- $DMMOUNT = 0x10000000, // mode bit for mounted channel
- $DMAUTH = 0x08000000, // mode bit for authentication file
- $DMTMP = 0x04000000, // mode bit for non-backed-up files
- $DMREAD = 0x4, // mode bit for read permission
- $DMWRITE = 0x2, // mode bit for write permission
- $DMEXEC = 0x1, // mode bit for execute permission
-
- BIT8SZ = 1,
- BIT16SZ = 2,
- BIT32SZ = 4,
- BIT64SZ = 8,
- QIDSZ = BIT8SZ+BIT32SZ+BIT64SZ,
-
- // STATFIXLEN includes leading 16-bit count
- // The count, however, excludes itself; total size is BIT16SZ+count
- $STATFIXLEN = BIT16SZ+QIDSZ+5*BIT16SZ+4*BIT32SZ+1*BIT64SZ, // amount of fixed length data in a stat buffer
-};
-
-
-struct Prof // Per process profiling
-{
- struct Plink *pp; // known to be 0(ptr)
- struct Plink *next; // known to be 4(ptr)
- struct Plink *last;
- struct Plink *first;
- ulong pid;
- ulong what;
-};
-
-struct Tos {
- struct Prof prof;
- uvlong cyclefreq; // cycle clock frequency if there is one, 0 otherwise
- vlong kcycles; // cycles spent in kernel
- vlong pcycles; // cycles spent in process (kernel + user)
- ulong pid; // might as well put the pid here
- ulong clock;
- // top of stack is here
-};
-
-typedef struct Prof $Prof;
-typedef struct Tos $Tos;
diff --git a/src/pkg/syscall/types_solaris.go b/src/pkg/syscall/types_solaris.go
deleted file mode 100644
index 53fa35068..000000000
--- a/src/pkg/syscall/types_solaris.go
+++ /dev/null
@@ -1,222 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +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 <termios.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-type Timeval32 C.struct_timeval32
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-const ( // Directory mode bits
- S_IFMT = C.S_IFMT
- S_IFIFO = C.S_IFIFO
- S_IFCHR = C.S_IFCHR
- S_IFDIR = C.S_IFDIR
- S_IFBLK = C.S_IFBLK
- S_IFREG = C.S_IFREG
- S_IFLNK = C.S_IFLNK
- S_IFSOCK = C.S_IFSOCK
- S_ISUID = C.S_ISUID
- S_ISGID = C.S_ISGID
- S_ISVTX = C.S_ISVTX
- S_IRUSR = C.S_IRUSR
- S_IWUSR = C.S_IWUSR
- S_IXUSR = C.S_IXUSR
-)
-
-type Stat_t C.struct_stat
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfData = C.sizeof_struct_if_data
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfTimeval C.struct_bpf_timeval
-
-type BpfHdr C.struct_bpf_hdr
-
-// Terminal handling
-
-type Termios C.struct_termios
diff --git a/src/pkg/syscall/unzip_nacl.go b/src/pkg/syscall/unzip_nacl.go
deleted file mode 100644
index 5845e44f0..000000000
--- a/src/pkg/syscall/unzip_nacl.go
+++ /dev/null
@@ -1,685 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Small in-memory unzip implementation.
-// A simplified copy of the pre-Go 1 compress/flate/inflate.go
-// and a modified copy of the zip reader in package time.
-// (The one in package time does not support decompression; this one does.)
-
-package syscall
-
-const (
- maxCodeLen = 16 // max length of Huffman code
- maxHist = 32768 // max history required
- maxLit = 286
- maxDist = 32
- numCodes = 19 // number of codes in Huffman meta-code
-)
-
-type decompressor struct {
- in string // compressed input
- out []byte // uncompressed output
- b uint32 // input bits, at top of b
- nb uint
- err bool // invalid input
- eof bool // reached EOF
-
- h1, h2 huffmanDecoder // decoders for literal/length, distance
- bits [maxLit + maxDist]int // lengths defining Huffman codes
- codebits [numCodes]int
-}
-
-func (f *decompressor) nextBlock() {
- for f.nb < 1+2 {
- if f.moreBits(); f.err {
- return
- }
- }
- f.eof = f.b&1 == 1
- f.b >>= 1
- typ := f.b & 3
- f.b >>= 2
- f.nb -= 1 + 2
- switch typ {
- case 0:
- f.dataBlock()
- case 1:
- // compressed, fixed Huffman tables
- f.huffmanBlock(&fixedHuffmanDecoder, nil)
- case 2:
- // compressed, dynamic Huffman tables
- if f.readHuffman(); f.err {
- break
- }
- f.huffmanBlock(&f.h1, &f.h2)
- default:
- // 3 is reserved.
- f.err = true
- }
-}
-
-// RFC 1951 section 3.2.7.
-// Compression with dynamic Huffman codes
-
-var codeOrder = [...]int{16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}
-
-func (f *decompressor) readHuffman() {
- // HLIT[5], HDIST[5], HCLEN[4].
- for f.nb < 5+5+4 {
- if f.moreBits(); f.err {
- return
- }
- }
- nlit := int(f.b&0x1F) + 257
- f.b >>= 5
- ndist := int(f.b&0x1F) + 1
- f.b >>= 5
- nclen := int(f.b&0xF) + 4
- f.b >>= 4
- f.nb -= 5 + 5 + 4
-
- // (HCLEN+4)*3 bits: code lengths in the magic codeOrder order.
- for i := 0; i < nclen; i++ {
- for f.nb < 3 {
- if f.moreBits(); f.err {
- return
- }
- }
- f.codebits[codeOrder[i]] = int(f.b & 0x7)
- f.b >>= 3
- f.nb -= 3
- }
- for i := nclen; i < len(codeOrder); i++ {
- f.codebits[codeOrder[i]] = 0
- }
- if !f.h1.init(f.codebits[0:]) {
- f.err = true
- return
- }
-
- // HLIT + 257 code lengths, HDIST + 1 code lengths,
- // using the code length Huffman code.
- for i, n := 0, nlit+ndist; i < n; {
- x := f.huffSym(&f.h1)
- if f.err {
- return
- }
- if x < 16 {
- // Actual length.
- f.bits[i] = x
- i++
- continue
- }
- // Repeat previous length or zero.
- var rep int
- var nb uint
- var b int
- switch x {
- default:
- f.err = true
- return
- case 16:
- rep = 3
- nb = 2
- if i == 0 {
- f.err = true
- return
- }
- b = f.bits[i-1]
- case 17:
- rep = 3
- nb = 3
- b = 0
- case 18:
- rep = 11
- nb = 7
- b = 0
- }
- for f.nb < nb {
- if f.moreBits(); f.err {
- return
- }
- }
- rep += int(f.b & uint32(1<<nb-1))
- f.b >>= nb
- f.nb -= nb
- if i+rep > n {
- f.err = true
- return
- }
- for j := 0; j < rep; j++ {
- f.bits[i] = b
- i++
- }
- }
-
- if !f.h1.init(f.bits[0:nlit]) || !f.h2.init(f.bits[nlit:nlit+ndist]) {
- f.err = true
- return
- }
-}
-
-// Decode a single Huffman block from f.
-// hl and hd are the Huffman states for the lit/length values
-// and the distance values, respectively. If hd == nil, using the
-// fixed distance encoding associated with fixed Huffman blocks.
-func (f *decompressor) huffmanBlock(hl, hd *huffmanDecoder) {
- for {
- v := f.huffSym(hl)
- if f.err {
- return
- }
- var n uint // number of bits extra
- var length int
- switch {
- case v < 256:
- f.out = append(f.out, byte(v))
- continue
- case v == 256:
- // Done with huffman block; read next block.
- return
- // otherwise, reference to older data
- case v < 265:
- length = v - (257 - 3)
- n = 0
- case v < 269:
- length = v*2 - (265*2 - 11)
- n = 1
- case v < 273:
- length = v*4 - (269*4 - 19)
- n = 2
- case v < 277:
- length = v*8 - (273*8 - 35)
- n = 3
- case v < 281:
- length = v*16 - (277*16 - 67)
- n = 4
- case v < 285:
- length = v*32 - (281*32 - 131)
- n = 5
- default:
- length = 258
- n = 0
- }
- if n > 0 {
- for f.nb < n {
- if f.moreBits(); f.err {
- return
- }
- }
- length += int(f.b & uint32(1<<n-1))
- f.b >>= n
- f.nb -= n
- }
-
- var dist int
- if hd == nil {
- for f.nb < 5 {
- if f.moreBits(); f.err {
- return
- }
- }
- dist = int(reverseByte[(f.b&0x1F)<<3])
- f.b >>= 5
- f.nb -= 5
- } else {
- if dist = f.huffSym(hd); f.err {
- return
- }
- }
-
- switch {
- case dist < 4:
- dist++
- case dist >= 30:
- f.err = true
- return
- default:
- nb := uint(dist-2) >> 1
- // have 1 bit in bottom of dist, need nb more.
- extra := (dist & 1) << nb
- for f.nb < nb {
- if f.moreBits(); f.err {
- return
- }
- }
- extra |= int(f.b & uint32(1<<nb-1))
- f.b >>= nb
- f.nb -= nb
- dist = 1<<(nb+1) + 1 + extra
- }
-
- // Copy [-dist:-dist+length] into output.
- // Encoding can be prescient, so no check on length.
- if dist > len(f.out) {
- f.err = true
- return
- }
-
- p := len(f.out) - dist
- for i := 0; i < length; i++ {
- f.out = append(f.out, f.out[p])
- p++
- }
- }
-}
-
-// Copy a single uncompressed data block from input to output.
-func (f *decompressor) dataBlock() {
- // Uncompressed.
- // Discard current half-byte.
- f.nb = 0
- f.b = 0
-
- if len(f.in) < 4 {
- f.err = true
- return
- }
-
- buf := f.in[:4]
- f.in = f.in[4:]
- n := int(buf[0]) | int(buf[1])<<8
- nn := int(buf[2]) | int(buf[3])<<8
- if uint16(nn) != uint16(^n) {
- f.err = true
- return
- }
-
- if len(f.in) < n {
- f.err = true
- return
- }
- f.out = append(f.out, f.in[:n]...)
- f.in = f.in[n:]
-}
-
-func (f *decompressor) moreBits() {
- if len(f.in) == 0 {
- f.err = true
- return
- }
- c := f.in[0]
- f.in = f.in[1:]
- f.b |= uint32(c) << f.nb
- f.nb += 8
-}
-
-// Read the next Huffman-encoded symbol from f according to h.
-func (f *decompressor) huffSym(h *huffmanDecoder) int {
- for n := uint(h.min); n <= uint(h.max); n++ {
- lim := h.limit[n]
- if lim == -1 {
- continue
- }
- for f.nb < n {
- if f.moreBits(); f.err {
- return 0
- }
- }
- v := int(f.b & uint32(1<<n-1))
- v <<= 16 - n
- v = int(reverseByte[v>>8]) | int(reverseByte[v&0xFF])<<8 // reverse bits
- if v <= lim {
- f.b >>= n
- f.nb -= n
- return h.codes[v-h.base[n]]
- }
- }
- f.err = true
- return 0
-}
-
-var reverseByte = [256]byte{
- 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
- 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
- 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
- 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
- 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
- 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
- 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
- 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
- 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
- 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
- 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
- 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
- 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
- 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
- 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
- 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
- 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
- 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
- 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
- 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
- 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
- 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
- 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
- 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
- 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
- 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
- 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
- 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
- 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
- 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
- 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
- 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
-}
-
-// Hard-coded Huffman tables for DEFLATE algorithm.
-// See RFC 1951, section 3.2.6.
-var fixedHuffmanDecoder = huffmanDecoder{
- 7, 9,
- [maxCodeLen + 1]int{7: 23, 199, 511},
- [maxCodeLen + 1]int{7: 0, 24, 224},
- []int{
- // length 7: 256-279
- 256, 257, 258, 259, 260, 261, 262,
- 263, 264, 265, 266, 267, 268, 269,
- 270, 271, 272, 273, 274, 275, 276,
- 277, 278, 279,
-
- // length 8: 0-143
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
- 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
- 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
- 92, 93, 94, 95, 96, 97, 98, 99, 100,
- 101, 102, 103, 104, 105, 106, 107, 108,
- 109, 110, 111, 112, 113, 114, 115, 116,
- 117, 118, 119, 120, 121, 122, 123, 124,
- 125, 126, 127, 128, 129, 130, 131, 132,
- 133, 134, 135, 136, 137, 138, 139, 140,
- 141, 142, 143,
-
- // length 8: 280-287
- 280, 281, 282, 283, 284, 285, 286, 287,
-
- // length 9: 144-255
- 144, 145, 146, 147, 148, 149, 150, 151,
- 152, 153, 154, 155, 156, 157, 158, 159,
- 160, 161, 162, 163, 164, 165, 166, 167,
- 168, 169, 170, 171, 172, 173, 174, 175,
- 176, 177, 178, 179, 180, 181, 182, 183,
- 184, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 194, 195, 196, 197, 198, 199,
- 200, 201, 202, 203, 204, 205, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215,
- 216, 217, 218, 219, 220, 221, 222, 223,
- 224, 225, 226, 227, 228, 229, 230, 231,
- 232, 233, 234, 235, 236, 237, 238, 239,
- 240, 241, 242, 243, 244, 245, 246, 247,
- 248, 249, 250, 251, 252, 253, 254, 255,
- },
-}
-
-// Huffman decoder is based on
-// J. Brian Connell, ``A Huffman-Shannon-Fano Code,''
-// Proceedings of the IEEE, 61(7) (July 1973), pp 1046-1047.
-type huffmanDecoder struct {
- // min, max code length
- min, max int
-
- // limit[i] = largest code word of length i
- // Given code v of length n,
- // need more bits if v > limit[n].
- limit [maxCodeLen + 1]int
-
- // base[i] = smallest code word of length i - seq number
- base [maxCodeLen + 1]int
-
- // codes[seq number] = output code.
- // Given code v of length n, value is
- // codes[v - base[n]].
- codes []int
-}
-
-// Initialize Huffman decoding tables from array of code lengths.
-func (h *huffmanDecoder) init(bits []int) bool {
- // Count number of codes of each length,
- // compute min and max length.
- var count [maxCodeLen + 1]int
- var min, max int
- for _, n := range bits {
- if n == 0 {
- continue
- }
- if min == 0 || n < min {
- min = n
- }
- if n > max {
- max = n
- }
- count[n]++
- }
- if max == 0 {
- return false
- }
-
- h.min = min
- h.max = max
-
- // For each code range, compute
- // nextcode (first code of that length),
- // limit (last code of that length), and
- // base (offset from first code to sequence number).
- code := 0
- seq := 0
- var nextcode [maxCodeLen]int
- for i := min; i <= max; i++ {
- n := count[i]
- nextcode[i] = code
- h.base[i] = code - seq
- code += n
- seq += n
- h.limit[i] = code - 1
- code <<= 1
- }
-
- // Make array mapping sequence numbers to codes.
- if len(h.codes) < len(bits) {
- h.codes = make([]int, len(bits))
- }
- for i, n := range bits {
- if n == 0 {
- continue
- }
- code := nextcode[n]
- nextcode[n]++
- seq := code - h.base[n]
- h.codes[seq] = i
- }
- return true
-}
-
-func inflate(in string) (out []byte) {
- var d decompressor
- d.in = in
- for !d.err && !d.eof {
- d.nextBlock()
- }
- if len(d.in) != 0 {
- println("fs unzip: junk at end of compressed data")
- return nil
- }
- return d.out
-}
-
-// get4 returns the little-endian 32-bit value in b.
-func zget4(b string) int {
- if len(b) < 4 {
- return 0
- }
- return int(b[0]) | int(b[1])<<8 | int(b[2])<<16 | int(b[3])<<24
-}
-
-// get2 returns the little-endian 16-bit value in b.
-func zget2(b string) int {
- if len(b) < 2 {
- return 0
- }
- return int(b[0]) | int(b[1])<<8
-}
-
-func unzip(data string) {
- const (
- zecheader = 0x06054b50
- zcheader = 0x02014b50
- ztailsize = 22
- zheadersize = 30
- zheader = 0x04034b50
- )
-
- buf := data[len(data)-ztailsize:]
- n := zget2(buf[10:])
- size := zget4(buf[12:])
- off := zget4(buf[16:])
-
- hdr := data[off : off+size]
- for i := 0; i < n; i++ {
- // zip entry layout:
- // 0 magic[4]
- // 4 madevers[1]
- // 5 madeos[1]
- // 6 extvers[1]
- // 7 extos[1]
- // 8 flags[2]
- // 10 meth[2]
- // 12 modtime[2]
- // 14 moddate[2]
- // 16 crc[4]
- // 20 csize[4]
- // 24 uncsize[4]
- // 28 namelen[2]
- // 30 xlen[2]
- // 32 fclen[2]
- // 34 disknum[2]
- // 36 iattr[2]
- // 38 eattr[4]
- // 42 off[4]
- // 46 name[namelen]
- // 46+namelen+xlen+fclen - next header
- //
- if zget4(hdr) != zcheader {
- println("fs unzip: bad magic")
- break
- }
- meth := zget2(hdr[10:])
- mtime := zget2(hdr[12:])
- mdate := zget2(hdr[14:])
- csize := zget4(hdr[20:])
- size := zget4(hdr[24:])
- namelen := zget2(hdr[28:])
- xlen := zget2(hdr[30:])
- fclen := zget2(hdr[32:])
- xattr := uint32(zget4(hdr[38:])) >> 16
- off := zget4(hdr[42:])
- name := hdr[46 : 46+namelen]
- hdr = hdr[46+namelen+xlen+fclen:]
-
- // zip per-file header layout:
- // 0 magic[4]
- // 4 extvers[1]
- // 5 extos[1]
- // 6 flags[2]
- // 8 meth[2]
- // 10 modtime[2]
- // 12 moddate[2]
- // 14 crc[4]
- // 18 csize[4]
- // 22 uncsize[4]
- // 26 namelen[2]
- // 28 xlen[2]
- // 30 name[namelen]
- // 30+namelen+xlen - file data
- //
- buf := data[off : off+zheadersize+namelen]
- if zget4(buf) != zheader ||
- zget2(buf[8:]) != meth ||
- zget2(buf[26:]) != namelen ||
- buf[30:30+namelen] != name {
- println("fs unzip: inconsistent zip file")
- return
- }
- xlen = zget2(buf[28:])
-
- off += zheadersize + namelen + xlen
-
- var fdata []byte
- switch meth {
- case 0:
- // buf is uncompressed
- buf = data[off : off+size]
- fdata = []byte(buf)
- case 8:
- // buf is deflate-compressed
- buf = data[off : off+csize]
- fdata = inflate(buf)
- if len(fdata) != size {
- println("fs unzip: inconsistent size in zip file")
- return
- }
- }
-
- if xattr&S_IFMT == 0 {
- if xattr&0777 == 0 {
- xattr |= 0666
- }
- if len(name) > 0 && name[len(name)-1] == '/' {
- xattr |= S_IFDIR
- xattr |= 0111
- } else {
- xattr |= S_IFREG
- }
- }
-
- if err := create(name, xattr, zipToTime(mdate, mtime), fdata); err != nil {
- print("fs unzip: create ", name, ": ", err.Error(), "\n")
- }
- }
-
- chdirEnv()
-}
-
-func zipToTime(date, time int) int64 {
- dd := date & 0x1f
- mm := date >> 5 & 0xf
- yy := date >> 9 // since 1980
-
- sec := int64(315532800) // jan 1 1980
- sec += int64(yy) * 365 * 86400
- sec += int64(yy) / 4 * 86400
- if yy%4 > 0 || mm >= 3 {
- sec += 86400
- }
- sec += int64(daysBeforeMonth[mm]) * 86400
- sec += int64(dd-1) * 86400
-
- h := time >> 11
- m := time >> 5 & 0x3F
- s := time & 0x1f * 2
- sec += int64(h*3600 + m*60 + s)
-
- return sec
-}
-
-var daysBeforeMonth = [...]int32{
- 0,
- 0,
- 31,
- 31 + 28,
- 31 + 28 + 31,
- 31 + 28 + 31 + 30,
- 31 + 28 + 31 + 30 + 31,
- 31 + 28 + 31 + 30 + 31 + 30,
- 31 + 28 + 31 + 30 + 31 + 30 + 31,
- 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31,
- 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30,
- 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31,
- 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30,
- 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31,
-}
diff --git a/src/pkg/syscall/zerrors_darwin_386.go b/src/pkg/syscall/zerrors_darwin_386.go
deleted file mode 100644
index bb3a1610c..000000000
--- a/src/pkg/syscall/zerrors_darwin_386.go
+++ /dev/null
@@ -1,1421 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package syscall
-
-const (
- AF_APPLETALK = 0x10
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1c
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1e
- AF_IPX = 0x17
- AF_ISDN = 0x1c
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x26
- AF_NATM = 0x1f
- AF_NDRV = 0x1b
- AF_NETBIOS = 0x21
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PPP = 0x22
- AF_PUP = 0x4
- AF_RESERVED_36 = 0x24
- AF_ROUTE = 0x11
- AF_SIP = 0x18
- AF_SNA = 0xb
- AF_SYSTEM = 0x20
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc00c4279
- BIOCGETIF = 0x4020426b
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4008426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044278
- BIOCSETF = 0x80084267
- BIOCSETIF = 0x8020426c
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8008426d
- BIOCSSEESENT = 0x80044277
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AX25 = 0x3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_C_HDLC = 0x68
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_FDDI = 0xa
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_NULL = 0x0
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_SERIAL = 0x32
- DLT_PRONET = 0x4
- DLT_RAW = 0xc
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_FS = -0x9
- EVFILT_MACHPORT = -0x8
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xc
- EVFILT_THREADMARKER = 0xc
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xa
- EVFILT_VM = -0xc
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG0 = 0x1000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_OOBAND = 0x2000
- EV_POLL = 0x1000
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_ADDFILESIGS = 0x3d
- F_ADDSIGS = 0x3b
- F_ALLOCATEALL = 0x4
- F_ALLOCATECONTIG = 0x2
- F_CHKCLEAN = 0x29
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x43
- F_FLUSH_DATA = 0x28
- F_FREEZE_FS = 0x35
- F_FULLFSYNC = 0x33
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETLKPID = 0x42
- F_GETNOSIGPIPE = 0x4a
- F_GETOWN = 0x5
- F_GETPATH = 0x32
- F_GETPATH_MTMINFO = 0x47
- F_GETPROTECTIONCLASS = 0x3f
- F_GLOBAL_NOCACHE = 0x37
- F_LOG2PHYS = 0x31
- F_LOG2PHYS_EXT = 0x41
- F_MARKDEPENDENCY = 0x3c
- F_NOCACHE = 0x30
- F_NODIRECT = 0x3e
- F_OK = 0x0
- F_PATHPKG_CHECK = 0x34
- F_PEOFPOSMODE = 0x3
- F_PREALLOCATE = 0x2a
- F_RDADVISE = 0x2c
- F_RDAHEAD = 0x2d
- F_RDLCK = 0x1
- F_READBOOTSTRAP = 0x2e
- F_SETBACKINGSTORE = 0x46
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETNOSIGPIPE = 0x49
- F_SETOWN = 0x6
- F_SETPROTECTIONCLASS = 0x40
- F_SETSIZE = 0x2b
- F_THAW_FS = 0x36
- F_UNLCK = 0x2
- F_VOLPOSMODE = 0x4
- F_WRITEBOOTSTRAP = 0x2f
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_AAL5 = 0x31
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ATM = 0x25
- IFT_BRIDGE = 0xd1
- IFT_CARP = 0xf8
- IFT_CELLULAR = 0xff
- IFT_CEPT = 0x13
- IFT_DS3 = 0x1e
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_ETHER = 0x6
- IFT_FAITH = 0x38
- IFT_FDDI = 0xf
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_GIF = 0x37
- IFT_HDH1822 = 0x3
- IFT_HIPPI = 0x2f
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IEEE1394 = 0x90
- IFT_IEEE8023ADLAG = 0x88
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88026 = 0xa
- IFT_L2VLAN = 0x87
- IFT_LAPB = 0x10
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_NSIP = 0x1b
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PDP = 0xff
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PPP = 0x17
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PTPSERIAL = 0x16
- IFT_RS232 = 0x21
- IFT_SDLC = 0x11
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_STARLAN = 0xb
- IFT_STF = 0x39
- IFT_T1 = 0x12
- IFT_ULTRA = 0x1d
- IFT_V35 = 0x2d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LINKLOCALNETNUM = 0xa9fe0000
- IN_LOOPBACKNET = 0x7f
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0xfe
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEP = 0x21
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_2292DSTOPTS = 0x17
- IPV6_2292HOPLIMIT = 0x14
- IPV6_2292HOPOPTS = 0x16
- IPV6_2292NEXTHOP = 0x15
- IPV6_2292PKTINFO = 0x13
- IPV6_2292PKTOPTIONS = 0x19
- IPV6_2292RTHDR = 0x18
- IPV6_BINDV6ONLY = 0x1b
- IPV6_BOUND_IF = 0x7d
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVTCLASS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x24
- IPV6_UNICAST_HOPS = 0x4
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BLOCK_SOURCE = 0x48
- IP_BOUND_IF = 0x19
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW_ADD = 0x28
- IP_FW_DEL = 0x29
- IP_FW_FLUSH = 0x2a
- IP_FW_GET = 0x2c
- IP_FW_RESETLOG = 0x2d
- IP_FW_ZERO = 0x2b
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MF = 0x2000
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_IFINDEX = 0x42
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_NAT__XXX = 0x37
- IP_OFFMASK = 0x1fff
- IP_OLD_FW_ADD = 0x32
- IP_OLD_FW_DEL = 0x33
- IP_OLD_FW_FLUSH = 0x34
- IP_OLD_FW_GET = 0x36
- IP_OLD_FW_RESETLOG = 0x38
- IP_OLD_FW_ZERO = 0x35
- IP_OPTIONS = 0x1
- IP_PKTINFO = 0x1a
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVPKTINFO = 0x1a
- IP_RECVRETOPTS = 0x6
- IP_RECVTTL = 0x18
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_STRIPHDR = 0x17
- IP_TOS = 0x3
- IP_TRAFFIC_MGT_BACKGROUND = 0x41
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_CAN_REUSE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_FREE_REUSABLE = 0x7
- MADV_FREE_REUSE = 0x8
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MADV_ZERO_WIRED_PAGES = 0x6
- MAP_ANON = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_JIT = 0x800
- MAP_NOCACHE = 0x400
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_SHARED = 0x1
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_FLUSH = 0x400
- MSG_HAVEMORE = 0x2000
- MSG_HOLD = 0x800
- MSG_NEEDSA = 0x10000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_RCVMORE = 0x4000
- MSG_SEND = 0x1000
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MSG_WAITSTREAM = 0x200
- MS_ASYNC = 0x1
- MS_DEACTIVATE = 0x8
- MS_INVALIDATE = 0x2
- MS_KILLPAGES = 0x4
- MS_SYNC = 0x10
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_DUMP2 = 0x7
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xa
- NET_RT_STAT = 0x4
- NET_RT_TRASH = 0x5
- NOFLSH = 0x80000000
- NOTE_ABSOLUTE = 0x8
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXITSTATUS = 0x4000000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_NONE = 0x80
- NOTE_NSECONDS = 0x4
- NOTE_PCTRLMASK = -0x100000
- NOTE_PDATAMASK = 0xfffff
- NOTE_REAP = 0x10000000
- NOTE_RENAME = 0x20
- NOTE_RESOURCEEND = 0x2000000
- NOTE_REVOKE = 0x40
- NOTE_SECONDS = 0x1
- NOTE_SIGNAL = 0x8000000
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_USECONDS = 0x2
- NOTE_VM_ERROR = 0x10000000
- NOTE_VM_PRESSURE = 0x80000000
- NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
- NOTE_VM_PRESSURE_TERMINATE = 0x40000000
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFDEL = 0x20000
- OFILL = 0x80
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_ALERT = 0x20000000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x1000000
- O_CREAT = 0x200
- O_DIRECTORY = 0x100000
- O_DSYNC = 0x400000
- O_EVTONLY = 0x8000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x20000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_POPUP = 0x80000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYMLINK = 0x200000
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PT_ATTACH = 0xa
- PT_ATTACHEXC = 0xe
- PT_CONTINUE = 0x7
- PT_DENY_ATTACH = 0x1f
- PT_DETACH = 0xb
- PT_FIRSTMACH = 0x20
- PT_FORCEQUOTA = 0x1e
- PT_KILL = 0x8
- PT_READ_D = 0x2
- PT_READ_I = 0x1
- PT_READ_U = 0x3
- PT_SIGEXC = 0xc
- PT_STEP = 0x9
- PT_THUPDATE = 0xd
- PT_TRACE_ME = 0x0
- PT_WRITE_D = 0x5
- PT_WRITE_I = 0x4
- PT_WRITE_U = 0x6
- RLIMIT_AS = 0x5
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_CLONING = 0x100
- RTF_CONDEMNED = 0x2000000
- RTF_DELCLONE = 0x80
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_IFREF = 0x4000000
- RTF_IFSCOPE = 0x1000000
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_REJECT = 0x8
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_WASCLONED = 0x20000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_GET2 = 0x14
- RTM_IFINFO = 0xe
- RTM_IFINFO2 = 0x12
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_NEWMADDR2 = 0x13
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SCM_TIMESTAMP_MONOTONIC = 0x4
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCAIFADDR = 0x8040691a
- SIOCALIFADDR = 0x8118691d
- SIOCARPIPLL = 0xc0206928
- SIOCATMARK = 0x40047307
- SIOCAUTOADDR = 0xc0206926
- SIOCAUTONETMASK = 0x80206927
- SIOCDELMULTI = 0x80206932
- SIOCDIFADDR = 0x80206919
- SIOCDIFPHYADDR = 0x80206941
- SIOCDLIFADDR = 0x8118691f
- SIOCGDRVSPEC = 0xc01c697b
- SIOCGETSGCNT = 0xc014721c
- SIOCGETVIFCNT = 0xc014721b
- SIOCGETVLAN = 0xc020697f
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFALTMTU = 0xc0206948
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBOND = 0xc0206947
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020695b
- SIOCGIFCONF = 0xc0086924
- SIOCGIFDEVMTU = 0xc0206944
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFKPI = 0xc0206987
- SIOCGIFMAC = 0xc0206982
- SIOCGIFMEDIA = 0xc0286938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206940
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc020693f
- SIOCGIFSTATUS = 0xc331693d
- SIOCGIFVLAN = 0xc020697f
- SIOCGIFWAKEFLAGS = 0xc0206988
- SIOCGLIFADDR = 0xc118691e
- SIOCGLIFPHYADDR = 0xc1186943
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCIFCREATE = 0xc0206978
- SIOCIFCREATE2 = 0xc020697a
- SIOCIFDESTROY = 0x80206979
- SIOCRSLVMULTI = 0xc008693b
- SIOCSDRVSPEC = 0x801c697b
- SIOCSETVLAN = 0x8020697e
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFALTMTU = 0x80206945
- SIOCSIFASYNCMAP = 0x8020697d
- SIOCSIFBOND = 0x80206946
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020695a
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFKPI = 0x80206986
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206983
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x8040693e
- SIOCSIFPHYS = 0x80206936
- SIOCSIFVLAN = 0x8020697e
- SIOCSLIFPHYADDR = 0x81186942
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_DONTTRUNC = 0x2000
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1010
- SO_LINGER = 0x80
- SO_LINGER_SEC = 0x1080
- SO_NKE = 0x1021
- SO_NOADDRERR = 0x1023
- SO_NOSIGPIPE = 0x1022
- SO_NOTIFYCONFLICT = 0x1026
- SO_NP_EXTENSIONS = 0x1083
- SO_NREAD = 0x1020
- SO_NWRITE = 0x1024
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1011
- SO_RANDOMPORT = 0x1082
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_RESTRICTIONS = 0x1081
- SO_RESTRICT_DENYIN = 0x1
- SO_RESTRICT_DENYOUT = 0x2
- SO_RESTRICT_DENYSET = 0x80000000
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_REUSESHAREUID = 0x1025
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TIMESTAMP_MONOTONIC = 0x800
- SO_TYPE = 0x1008
- SO_UPCALLCLOSEWAIT = 0x1027
- SO_USELOOPBACK = 0x40
- SO_WANTMORE = 0x4000
- SO_WANTOOBFLAG = 0x8000
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CONNECTIONTIMEOUT = 0x20
- TCP_KEEPALIVE = 0x10
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x3
- TCP_MAX_WINSHIFT = 0xe
- TCP_MINMSS = 0xd8
- TCP_MINMSSOVERLOAD = 0x3e8
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_RXT_CONNDROPTIME = 0x80
- TCP_RXT_FINDROP = 0x100
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40087458
- TIOCDRAIN = 0x2000745e
- TIOCDSIMICROCODE = 0x20007455
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGWINSZ = 0x40087468
- TIOCIXOFF = 0x20007480
- TIOCIXON = 0x20007481
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x40047403
- TIOCMODS = 0x80047404
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTYGNAME = 0x40807453
- TIOCPTYGRANT = 0x20007454
- TIOCPTYUNLK = 0x20007452
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCONS = 0x20007463
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2000745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40087459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x10
- WCOREFLAG = 0x80
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOWAIT = 0x20
- WORDSIZE = 0x20
- WSTOPPED = 0x8
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x30)
- EADDRNOTAVAIL = Errno(0x31)
- EAFNOSUPPORT = Errno(0x2f)
- EAGAIN = Errno(0x23)
- EALREADY = Errno(0x25)
- EAUTH = Errno(0x50)
- EBADARCH = Errno(0x56)
- EBADEXEC = Errno(0x55)
- EBADF = Errno(0x9)
- EBADMACHO = Errno(0x58)
- EBADMSG = Errno(0x5e)
- EBADRPC = Errno(0x48)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x59)
- ECHILD = Errno(0xa)
- ECONNABORTED = Errno(0x35)
- ECONNREFUSED = Errno(0x3d)
- ECONNRESET = Errno(0x36)
- EDEADLK = Errno(0xb)
- EDESTADDRREQ = Errno(0x27)
- EDEVERR = Errno(0x53)
- EDOM = Errno(0x21)
- EDQUOT = Errno(0x45)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EFTYPE = Errno(0x4f)
- EHOSTDOWN = Errno(0x40)
- EHOSTUNREACH = Errno(0x41)
- EIDRM = Errno(0x5a)
- EILSEQ = Errno(0x5c)
- EINPROGRESS = Errno(0x24)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EISCONN = Errno(0x38)
- EISDIR = Errno(0x15)
- ELAST = Errno(0x69)
- ELOOP = Errno(0x3e)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x28)
- EMULTIHOP = Errno(0x5f)
- ENAMETOOLONG = Errno(0x3f)
- ENEEDAUTH = Errno(0x51)
- ENETDOWN = Errno(0x32)
- ENETRESET = Errno(0x34)
- ENETUNREACH = Errno(0x33)
- ENFILE = Errno(0x17)
- ENOATTR = Errno(0x5d)
- ENOBUFS = Errno(0x37)
- ENODATA = Errno(0x60)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOLCK = Errno(0x4d)
- ENOLINK = Errno(0x61)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x5b)
- ENOPOLICY = Errno(0x67)
- ENOPROTOOPT = Errno(0x2a)
- ENOSPC = Errno(0x1c)
- ENOSR = Errno(0x62)
- ENOSTR = Errno(0x63)
- ENOSYS = Errno(0x4e)
- ENOTBLK = Errno(0xf)
- ENOTCONN = Errno(0x39)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x42)
- ENOTRECOVERABLE = Errno(0x68)
- ENOTSOCK = Errno(0x26)
- ENOTSUP = Errno(0x2d)
- ENOTTY = Errno(0x19)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x66)
- EOVERFLOW = Errno(0x54)
- EOWNERDEAD = Errno(0x69)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x2e)
- EPIPE = Errno(0x20)
- EPROCLIM = Errno(0x43)
- EPROCUNAVAIL = Errno(0x4c)
- EPROGMISMATCH = Errno(0x4b)
- EPROGUNAVAIL = Errno(0x4a)
- EPROTO = Errno(0x64)
- EPROTONOSUPPORT = Errno(0x2b)
- EPROTOTYPE = Errno(0x29)
- EPWROFF = Errno(0x52)
- ERANGE = Errno(0x22)
- EREMOTE = Errno(0x47)
- EROFS = Errno(0x1e)
- ERPCMISMATCH = Errno(0x49)
- ESHLIBVERS = Errno(0x57)
- ESHUTDOWN = Errno(0x3a)
- ESOCKTNOSUPPORT = Errno(0x2c)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESTALE = Errno(0x46)
- ETIME = Errno(0x65)
- ETIMEDOUT = Errno(0x3c)
- ETOOMANYREFS = Errno(0x3b)
- ETXTBSY = Errno(0x1a)
- EUSERS = Errno(0x44)
- EWOULDBLOCK = Errno(0x23)
- EXDEV = Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0xa)
- SIGCHLD = Signal(0x14)
- SIGCONT = Signal(0x13)
- SIGEMT = Signal(0x7)
- SIGFPE = Signal(0x8)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINFO = Signal(0x1d)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x17)
- SIGIOT = Signal(0x6)
- SIGKILL = Signal(0x9)
- SIGPIPE = Signal(0xd)
- SIGPROF = Signal(0x1b)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTOP = Signal(0x11)
- SIGSYS = Signal(0xc)
- SIGTERM = Signal(0xf)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x12)
- SIGTTIN = Signal(0x15)
- SIGTTOU = Signal(0x16)
- SIGURG = Signal(0x10)
- SIGUSR1 = Signal(0x1e)
- SIGUSR2 = Signal(0x1f)
- SIGVTALRM = Signal(0x1a)
- SIGWINCH = Signal(0x1c)
- SIGXCPU = Signal(0x18)
- SIGXFSZ = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "resource busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "operation timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "device power is off",
- 83: "device error",
- 84: "value too large to be stored in data type",
- 85: "bad executable (or shared library)",
- 86: "bad CPU type in executable",
- 87: "shared library version mismatch",
- 88: "malformed Mach-o file",
- 89: "operation canceled",
- 90: "identifier removed",
- 91: "no message of desired type",
- 92: "illegal byte sequence",
- 93: "attribute not found",
- 94: "bad message",
- 95: "EMULTIHOP (Reserved)",
- 96: "no message available on STREAM",
- 97: "ENOLINK (Reserved)",
- 98: "no STREAM resources",
- 99: "not a STREAM",
- 100: "protocol error",
- 101: "STREAM ioctl timeout",
- 102: "operation not supported on socket",
- 103: "policy not found",
- 104: "state not recoverable",
- 105: "previous owner died",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "suspended (signal)",
- 18: "suspended",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
-}
diff --git a/src/pkg/syscall/zerrors_darwin_amd64.go b/src/pkg/syscall/zerrors_darwin_amd64.go
deleted file mode 100644
index 05ab48ee3..000000000
--- a/src/pkg/syscall/zerrors_darwin_amd64.go
+++ /dev/null
@@ -1,1421 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package syscall
-
-const (
- AF_APPLETALK = 0x10
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1c
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1e
- AF_IPX = 0x17
- AF_ISDN = 0x1c
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x26
- AF_NATM = 0x1f
- AF_NDRV = 0x1b
- AF_NETBIOS = 0x21
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PPP = 0x22
- AF_PUP = 0x4
- AF_RESERVED_36 = 0x24
- AF_ROUTE = 0x11
- AF_SIP = 0x18
- AF_SNA = 0xb
- AF_SYSTEM = 0x20
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc00c4279
- BIOCGETIF = 0x4020426b
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4010426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044278
- BIOCSETF = 0x80104267
- BIOCSETIF = 0x8020426c
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8010426d
- BIOCSSEESENT = 0x80044277
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AX25 = 0x3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_C_HDLC = 0x68
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_FDDI = 0xa
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_NULL = 0x0
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_SERIAL = 0x32
- DLT_PRONET = 0x4
- DLT_RAW = 0xc
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_FS = -0x9
- EVFILT_MACHPORT = -0x8
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xc
- EVFILT_THREADMARKER = 0xc
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xa
- EVFILT_VM = -0xc
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG0 = 0x1000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_OOBAND = 0x2000
- EV_POLL = 0x1000
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_ADDFILESIGS = 0x3d
- F_ADDSIGS = 0x3b
- F_ALLOCATEALL = 0x4
- F_ALLOCATECONTIG = 0x2
- F_CHKCLEAN = 0x29
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x43
- F_FLUSH_DATA = 0x28
- F_FREEZE_FS = 0x35
- F_FULLFSYNC = 0x33
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETLKPID = 0x42
- F_GETNOSIGPIPE = 0x4a
- F_GETOWN = 0x5
- F_GETPATH = 0x32
- F_GETPATH_MTMINFO = 0x47
- F_GETPROTECTIONCLASS = 0x3f
- F_GLOBAL_NOCACHE = 0x37
- F_LOG2PHYS = 0x31
- F_LOG2PHYS_EXT = 0x41
- F_MARKDEPENDENCY = 0x3c
- F_NOCACHE = 0x30
- F_NODIRECT = 0x3e
- F_OK = 0x0
- F_PATHPKG_CHECK = 0x34
- F_PEOFPOSMODE = 0x3
- F_PREALLOCATE = 0x2a
- F_RDADVISE = 0x2c
- F_RDAHEAD = 0x2d
- F_RDLCK = 0x1
- F_READBOOTSTRAP = 0x2e
- F_SETBACKINGSTORE = 0x46
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETNOSIGPIPE = 0x49
- F_SETOWN = 0x6
- F_SETPROTECTIONCLASS = 0x40
- F_SETSIZE = 0x2b
- F_THAW_FS = 0x36
- F_UNLCK = 0x2
- F_VOLPOSMODE = 0x4
- F_WRITEBOOTSTRAP = 0x2f
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_AAL5 = 0x31
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ATM = 0x25
- IFT_BRIDGE = 0xd1
- IFT_CARP = 0xf8
- IFT_CELLULAR = 0xff
- IFT_CEPT = 0x13
- IFT_DS3 = 0x1e
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_ETHER = 0x6
- IFT_FAITH = 0x38
- IFT_FDDI = 0xf
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_GIF = 0x37
- IFT_HDH1822 = 0x3
- IFT_HIPPI = 0x2f
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IEEE1394 = 0x90
- IFT_IEEE8023ADLAG = 0x88
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88026 = 0xa
- IFT_L2VLAN = 0x87
- IFT_LAPB = 0x10
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_NSIP = 0x1b
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PDP = 0xff
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PPP = 0x17
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PTPSERIAL = 0x16
- IFT_RS232 = 0x21
- IFT_SDLC = 0x11
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_STARLAN = 0xb
- IFT_STF = 0x39
- IFT_T1 = 0x12
- IFT_ULTRA = 0x1d
- IFT_V35 = 0x2d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LINKLOCALNETNUM = 0xa9fe0000
- IN_LOOPBACKNET = 0x7f
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0xfe
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEP = 0x21
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_2292DSTOPTS = 0x17
- IPV6_2292HOPLIMIT = 0x14
- IPV6_2292HOPOPTS = 0x16
- IPV6_2292NEXTHOP = 0x15
- IPV6_2292PKTINFO = 0x13
- IPV6_2292PKTOPTIONS = 0x19
- IPV6_2292RTHDR = 0x18
- IPV6_BINDV6ONLY = 0x1b
- IPV6_BOUND_IF = 0x7d
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVTCLASS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x24
- IPV6_UNICAST_HOPS = 0x4
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BLOCK_SOURCE = 0x48
- IP_BOUND_IF = 0x19
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW_ADD = 0x28
- IP_FW_DEL = 0x29
- IP_FW_FLUSH = 0x2a
- IP_FW_GET = 0x2c
- IP_FW_RESETLOG = 0x2d
- IP_FW_ZERO = 0x2b
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MF = 0x2000
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_IFINDEX = 0x42
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_NAT__XXX = 0x37
- IP_OFFMASK = 0x1fff
- IP_OLD_FW_ADD = 0x32
- IP_OLD_FW_DEL = 0x33
- IP_OLD_FW_FLUSH = 0x34
- IP_OLD_FW_GET = 0x36
- IP_OLD_FW_RESETLOG = 0x38
- IP_OLD_FW_ZERO = 0x35
- IP_OPTIONS = 0x1
- IP_PKTINFO = 0x1a
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVPKTINFO = 0x1a
- IP_RECVRETOPTS = 0x6
- IP_RECVTTL = 0x18
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_STRIPHDR = 0x17
- IP_TOS = 0x3
- IP_TRAFFIC_MGT_BACKGROUND = 0x41
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_CAN_REUSE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_FREE_REUSABLE = 0x7
- MADV_FREE_REUSE = 0x8
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MADV_ZERO_WIRED_PAGES = 0x6
- MAP_ANON = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_JIT = 0x800
- MAP_NOCACHE = 0x400
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_SHARED = 0x1
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_FLUSH = 0x400
- MSG_HAVEMORE = 0x2000
- MSG_HOLD = 0x800
- MSG_NEEDSA = 0x10000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_RCVMORE = 0x4000
- MSG_SEND = 0x1000
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MSG_WAITSTREAM = 0x200
- MS_ASYNC = 0x1
- MS_DEACTIVATE = 0x8
- MS_INVALIDATE = 0x2
- MS_KILLPAGES = 0x4
- MS_SYNC = 0x10
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_DUMP2 = 0x7
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xa
- NET_RT_STAT = 0x4
- NET_RT_TRASH = 0x5
- NOFLSH = 0x80000000
- NOTE_ABSOLUTE = 0x8
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXITSTATUS = 0x4000000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_NONE = 0x80
- NOTE_NSECONDS = 0x4
- NOTE_PCTRLMASK = -0x100000
- NOTE_PDATAMASK = 0xfffff
- NOTE_REAP = 0x10000000
- NOTE_RENAME = 0x20
- NOTE_RESOURCEEND = 0x2000000
- NOTE_REVOKE = 0x40
- NOTE_SECONDS = 0x1
- NOTE_SIGNAL = 0x8000000
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_USECONDS = 0x2
- NOTE_VM_ERROR = 0x10000000
- NOTE_VM_PRESSURE = 0x80000000
- NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
- NOTE_VM_PRESSURE_TERMINATE = 0x40000000
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFDEL = 0x20000
- OFILL = 0x80
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_ALERT = 0x20000000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x1000000
- O_CREAT = 0x200
- O_DIRECTORY = 0x100000
- O_DSYNC = 0x400000
- O_EVTONLY = 0x8000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x20000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_POPUP = 0x80000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYMLINK = 0x200000
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PT_ATTACH = 0xa
- PT_ATTACHEXC = 0xe
- PT_CONTINUE = 0x7
- PT_DENY_ATTACH = 0x1f
- PT_DETACH = 0xb
- PT_FIRSTMACH = 0x20
- PT_FORCEQUOTA = 0x1e
- PT_KILL = 0x8
- PT_READ_D = 0x2
- PT_READ_I = 0x1
- PT_READ_U = 0x3
- PT_SIGEXC = 0xc
- PT_STEP = 0x9
- PT_THUPDATE = 0xd
- PT_TRACE_ME = 0x0
- PT_WRITE_D = 0x5
- PT_WRITE_I = 0x4
- PT_WRITE_U = 0x6
- RLIMIT_AS = 0x5
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_CLONING = 0x100
- RTF_CONDEMNED = 0x2000000
- RTF_DELCLONE = 0x80
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_IFREF = 0x4000000
- RTF_IFSCOPE = 0x1000000
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_REJECT = 0x8
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_WASCLONED = 0x20000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_GET2 = 0x14
- RTM_IFINFO = 0xe
- RTM_IFINFO2 = 0x12
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_NEWMADDR2 = 0x13
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SCM_TIMESTAMP_MONOTONIC = 0x4
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCAIFADDR = 0x8040691a
- SIOCALIFADDR = 0x8118691d
- SIOCARPIPLL = 0xc0206928
- SIOCATMARK = 0x40047307
- SIOCAUTOADDR = 0xc0206926
- SIOCAUTONETMASK = 0x80206927
- SIOCDELMULTI = 0x80206932
- SIOCDIFADDR = 0x80206919
- SIOCDIFPHYADDR = 0x80206941
- SIOCDLIFADDR = 0x8118691f
- SIOCGDRVSPEC = 0xc028697b
- SIOCGETSGCNT = 0xc014721c
- SIOCGETVIFCNT = 0xc014721b
- SIOCGETVLAN = 0xc020697f
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFALTMTU = 0xc0206948
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBOND = 0xc0206947
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020695b
- SIOCGIFCONF = 0xc00c6924
- SIOCGIFDEVMTU = 0xc0206944
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFKPI = 0xc0206987
- SIOCGIFMAC = 0xc0206982
- SIOCGIFMEDIA = 0xc02c6938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206940
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc020693f
- SIOCGIFSTATUS = 0xc331693d
- SIOCGIFVLAN = 0xc020697f
- SIOCGIFWAKEFLAGS = 0xc0206988
- SIOCGLIFADDR = 0xc118691e
- SIOCGLIFPHYADDR = 0xc1186943
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCIFCREATE = 0xc0206978
- SIOCIFCREATE2 = 0xc020697a
- SIOCIFDESTROY = 0x80206979
- SIOCRSLVMULTI = 0xc010693b
- SIOCSDRVSPEC = 0x8028697b
- SIOCSETVLAN = 0x8020697e
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFALTMTU = 0x80206945
- SIOCSIFASYNCMAP = 0x8020697d
- SIOCSIFBOND = 0x80206946
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020695a
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFKPI = 0x80206986
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206983
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x8040693e
- SIOCSIFPHYS = 0x80206936
- SIOCSIFVLAN = 0x8020697e
- SIOCSLIFPHYADDR = 0x81186942
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_DONTTRUNC = 0x2000
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1010
- SO_LINGER = 0x80
- SO_LINGER_SEC = 0x1080
- SO_NKE = 0x1021
- SO_NOADDRERR = 0x1023
- SO_NOSIGPIPE = 0x1022
- SO_NOTIFYCONFLICT = 0x1026
- SO_NP_EXTENSIONS = 0x1083
- SO_NREAD = 0x1020
- SO_NWRITE = 0x1024
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1011
- SO_RANDOMPORT = 0x1082
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_RESTRICTIONS = 0x1081
- SO_RESTRICT_DENYIN = 0x1
- SO_RESTRICT_DENYOUT = 0x2
- SO_RESTRICT_DENYSET = 0x80000000
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_REUSESHAREUID = 0x1025
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TIMESTAMP_MONOTONIC = 0x800
- SO_TYPE = 0x1008
- SO_UPCALLCLOSEWAIT = 0x1027
- SO_USELOOPBACK = 0x40
- SO_WANTMORE = 0x4000
- SO_WANTOOBFLAG = 0x8000
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CONNECTIONTIMEOUT = 0x20
- TCP_KEEPALIVE = 0x10
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x3
- TCP_MAX_WINSHIFT = 0xe
- TCP_MINMSS = 0xd8
- TCP_MINMSSOVERLOAD = 0x3e8
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_RXT_CONNDROPTIME = 0x80
- TCP_RXT_FINDROP = 0x100
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40107458
- TIOCDRAIN = 0x2000745e
- TIOCDSIMICROCODE = 0x20007455
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x40487413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGWINSZ = 0x40087468
- TIOCIXOFF = 0x20007480
- TIOCIXON = 0x20007481
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x40047403
- TIOCMODS = 0x80047404
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTYGNAME = 0x40807453
- TIOCPTYGRANT = 0x20007454
- TIOCPTYUNLK = 0x20007452
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCONS = 0x20007463
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x80487414
- TIOCSETAF = 0x80487416
- TIOCSETAW = 0x80487415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2000745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40107459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x10
- WCOREFLAG = 0x80
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOWAIT = 0x20
- WORDSIZE = 0x40
- WSTOPPED = 0x8
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x30)
- EADDRNOTAVAIL = Errno(0x31)
- EAFNOSUPPORT = Errno(0x2f)
- EAGAIN = Errno(0x23)
- EALREADY = Errno(0x25)
- EAUTH = Errno(0x50)
- EBADARCH = Errno(0x56)
- EBADEXEC = Errno(0x55)
- EBADF = Errno(0x9)
- EBADMACHO = Errno(0x58)
- EBADMSG = Errno(0x5e)
- EBADRPC = Errno(0x48)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x59)
- ECHILD = Errno(0xa)
- ECONNABORTED = Errno(0x35)
- ECONNREFUSED = Errno(0x3d)
- ECONNRESET = Errno(0x36)
- EDEADLK = Errno(0xb)
- EDESTADDRREQ = Errno(0x27)
- EDEVERR = Errno(0x53)
- EDOM = Errno(0x21)
- EDQUOT = Errno(0x45)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EFTYPE = Errno(0x4f)
- EHOSTDOWN = Errno(0x40)
- EHOSTUNREACH = Errno(0x41)
- EIDRM = Errno(0x5a)
- EILSEQ = Errno(0x5c)
- EINPROGRESS = Errno(0x24)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EISCONN = Errno(0x38)
- EISDIR = Errno(0x15)
- ELAST = Errno(0x69)
- ELOOP = Errno(0x3e)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x28)
- EMULTIHOP = Errno(0x5f)
- ENAMETOOLONG = Errno(0x3f)
- ENEEDAUTH = Errno(0x51)
- ENETDOWN = Errno(0x32)
- ENETRESET = Errno(0x34)
- ENETUNREACH = Errno(0x33)
- ENFILE = Errno(0x17)
- ENOATTR = Errno(0x5d)
- ENOBUFS = Errno(0x37)
- ENODATA = Errno(0x60)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOLCK = Errno(0x4d)
- ENOLINK = Errno(0x61)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x5b)
- ENOPOLICY = Errno(0x67)
- ENOPROTOOPT = Errno(0x2a)
- ENOSPC = Errno(0x1c)
- ENOSR = Errno(0x62)
- ENOSTR = Errno(0x63)
- ENOSYS = Errno(0x4e)
- ENOTBLK = Errno(0xf)
- ENOTCONN = Errno(0x39)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x42)
- ENOTRECOVERABLE = Errno(0x68)
- ENOTSOCK = Errno(0x26)
- ENOTSUP = Errno(0x2d)
- ENOTTY = Errno(0x19)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x66)
- EOVERFLOW = Errno(0x54)
- EOWNERDEAD = Errno(0x69)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x2e)
- EPIPE = Errno(0x20)
- EPROCLIM = Errno(0x43)
- EPROCUNAVAIL = Errno(0x4c)
- EPROGMISMATCH = Errno(0x4b)
- EPROGUNAVAIL = Errno(0x4a)
- EPROTO = Errno(0x64)
- EPROTONOSUPPORT = Errno(0x2b)
- EPROTOTYPE = Errno(0x29)
- EPWROFF = Errno(0x52)
- ERANGE = Errno(0x22)
- EREMOTE = Errno(0x47)
- EROFS = Errno(0x1e)
- ERPCMISMATCH = Errno(0x49)
- ESHLIBVERS = Errno(0x57)
- ESHUTDOWN = Errno(0x3a)
- ESOCKTNOSUPPORT = Errno(0x2c)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESTALE = Errno(0x46)
- ETIME = Errno(0x65)
- ETIMEDOUT = Errno(0x3c)
- ETOOMANYREFS = Errno(0x3b)
- ETXTBSY = Errno(0x1a)
- EUSERS = Errno(0x44)
- EWOULDBLOCK = Errno(0x23)
- EXDEV = Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0xa)
- SIGCHLD = Signal(0x14)
- SIGCONT = Signal(0x13)
- SIGEMT = Signal(0x7)
- SIGFPE = Signal(0x8)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINFO = Signal(0x1d)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x17)
- SIGIOT = Signal(0x6)
- SIGKILL = Signal(0x9)
- SIGPIPE = Signal(0xd)
- SIGPROF = Signal(0x1b)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTOP = Signal(0x11)
- SIGSYS = Signal(0xc)
- SIGTERM = Signal(0xf)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x12)
- SIGTTIN = Signal(0x15)
- SIGTTOU = Signal(0x16)
- SIGURG = Signal(0x10)
- SIGUSR1 = Signal(0x1e)
- SIGUSR2 = Signal(0x1f)
- SIGVTALRM = Signal(0x1a)
- SIGWINCH = Signal(0x1c)
- SIGXCPU = Signal(0x18)
- SIGXFSZ = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "resource busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "operation timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "device power is off",
- 83: "device error",
- 84: "value too large to be stored in data type",
- 85: "bad executable (or shared library)",
- 86: "bad CPU type in executable",
- 87: "shared library version mismatch",
- 88: "malformed Mach-o file",
- 89: "operation canceled",
- 90: "identifier removed",
- 91: "no message of desired type",
- 92: "illegal byte sequence",
- 93: "attribute not found",
- 94: "bad message",
- 95: "EMULTIHOP (Reserved)",
- 96: "no message available on STREAM",
- 97: "ENOLINK (Reserved)",
- 98: "no STREAM resources",
- 99: "not a STREAM",
- 100: "protocol error",
- 101: "STREAM ioctl timeout",
- 102: "operation not supported on socket",
- 103: "policy not found",
- 104: "state not recoverable",
- 105: "previous owner died",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "suspended (signal)",
- 18: "suspended",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
-}
diff --git a/src/pkg/syscall/zerrors_dragonfly_386.go b/src/pkg/syscall/zerrors_dragonfly_386.go
deleted file mode 100644
index 701a1c381..000000000
--- a/src/pkg/syscall/zerrors_dragonfly_386.go
+++ /dev/null
@@ -1,1526 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package syscall
-
-const (
- AF_APPLETALK = 0x10
- AF_ATM = 0x1e
- AF_BLUETOOTH = 0x21
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x23
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1c
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x24
- AF_MPLS = 0x22
- AF_NATM = 0x1d
- AF_NETGRAPH = 0x20
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x11
- AF_SIP = 0x18
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc0084279
- BIOCGETIF = 0x4020426b
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4008426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCLOCK = 0x2000427a
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044278
- BIOCSETF = 0x80084267
- BIOCSETIF = 0x8020426c
- BIOCSETWF = 0x8008427b
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8008426d
- BIOCSSEESENT = 0x80044277
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DEFAULTBUFSIZE = 0x1000
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MAX_CLONES = 0x80
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DOCSIS = 0x8f
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_REDBACK_SMARTEDGE = 0x20
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DBF = 0xf
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_EXCEPT = -0x8
- EVFILT_MARKER = 0xf
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0x8
- EVFILT_TIMER = -0x7
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_NODATA = 0x1000
- EV_ONESHOT = 0x10
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTEXIT_LWP = 0x10000
- EXTEXIT_PROC = 0x0
- EXTEXIT_SETINT = 0x1
- EXTEXIT_SIMPLE = 0x0
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_DUP2FD = 0xa
- F_DUP2FD_CLOEXEC = 0x12
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x11
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETOWN = 0x5
- F_OK = 0x0
- F_RDLCK = 0x1
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x118e72
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MONITOR = 0x40000
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NPOLLING = 0x100000
- IFF_OACTIVE = 0x400
- IFF_OACTIVE_COMPAT = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_POLLING = 0x10000
- IFF_POLLING_COMPAT = 0x10000
- IFF_PPROMISC = 0x20000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_SMART = 0x20
- IFF_STATICARP = 0x80000
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf8
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PLC = 0xae
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xf3
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VOICEEM = 0x64
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CARP = 0x70
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0xfe
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MOBILE = 0x37
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEP = 0x21
- IPPROTO_SKIP = 0x39
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TLSP = 0x38
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_UNKNOWN = 0x102
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_BINDV6ONLY = 0x1b
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXPACKET = 0xffff
- IPV6_MMTU = 0x500
- IPV6_MSFILTER = 0x4a
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PKTOPTIONS = 0x34
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_PREFER_TEMPADDR = 0x3f
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0xd
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW_ADD = 0x32
- IP_FW_DEL = 0x33
- IP_FW_FLUSH = 0x34
- IP_FW_GET = 0x36
- IP_FW_RESETLOG = 0x37
- IP_FW_ZERO = 0x35
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x42
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x1
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVTTL = 0x41
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_TOS = 0x3
- IP_TTL = 0x4
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_AUTOSYNC = 0x7
- MADV_CONTROL_END = 0xb
- MADV_CONTROL_START = 0xa
- MADV_CORE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_INVAL = 0xa
- MADV_NOCORE = 0x8
- MADV_NORMAL = 0x0
- MADV_NOSYNC = 0x6
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_SETMAP = 0xb
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_INHERIT = 0x80
- MAP_NOCORE = 0x20000
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_NOSYNC = 0x800
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_SIZEALIGN = 0x40000
- MAP_STACK = 0x400
- MAP_TRYFIXED = 0x10000
- MAP_VPAGETABLE = 0x2000
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_FBLOCKING = 0x10000
- MSG_FMASK = 0xffff0000
- MSG_FNONBLOCKING = 0x20000
- MSG_NOSIGNAL = 0x400
- MSG_NOTIFICATION = 0x200
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_SYNC = 0x800
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x2
- MS_SYNC = 0x0
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_MAXID = 0x4
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_OOB = 0x2
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x20000
- O_CREAT = 0x200
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x8000000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FAPPEND = 0x100000
- O_FASYNCWRITE = 0x800000
- O_FBLOCKING = 0x40000
- O_FBUFFERED = 0x2000000
- O_FMASK = 0x7fc0000
- O_FNONBLOCKING = 0x80000
- O_FOFFSET = 0x200000
- O_FSYNC = 0x80
- O_FSYNCWRITE = 0x400000
- O_FUNBUFFERED = 0x1000000
- O_MAPONREAD = 0x4000000
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_AS = 0xa
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0xb
- RTAX_MPLS1 = 0x8
- RTAX_MPLS2 = 0x9
- RTAX_MPLS3 = 0xa
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_MPLS1 = 0x100
- RTA_MPLS2 = 0x200
- RTA_MPLS3 = 0x400
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_CLONING = 0x100
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MPLSOPS = 0x1000000
- RTF_MULTICAST = 0x800000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_REJECT = 0x8
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_WASCLONED = 0x20000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_IEEE80211 = 0x12
- RTM_IFANNOUNCE = 0x11
- RTM_IFINFO = 0xe
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x6
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_IWCAPSEGS = 0x400
- RTV_IWMAXSEGS = 0x200
- RTV_MSL = 0x100
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCADDRT = 0x8030720a
- SIOCAIFADDR = 0x8040691a
- SIOCALIFADDR = 0x8118691b
- SIOCATMARK = 0x40047307
- SIOCDELMULTI = 0x80206932
- SIOCDELRT = 0x8030720b
- SIOCDIFADDR = 0x80206919
- SIOCDIFPHYADDR = 0x80206949
- SIOCDLIFADDR = 0x8118691d
- SIOCGDRVSPEC = 0xc01c697b
- SIOCGETSGCNT = 0xc0147210
- SIOCGETVIFCNT = 0xc014720f
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020691f
- SIOCGIFCONF = 0xc0086924
- SIOCGIFDATA = 0xc0206926
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFGMEMB = 0xc024698a
- SIOCGIFINDEX = 0xc0206920
- SIOCGIFMEDIA = 0xc0286938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206948
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPOLLCPU = 0xc020697e
- SIOCGIFPSRCADDR = 0xc0206947
- SIOCGIFSTATUS = 0xc331693b
- SIOCGIFTSOLEN = 0xc0206980
- SIOCGLIFADDR = 0xc118691c
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGPRIVATE_0 = 0xc0206950
- SIOCGPRIVATE_1 = 0xc0206951
- SIOCIFCREATE = 0xc020697a
- SIOCIFCREATE2 = 0xc020697c
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc00c6978
- SIOCSDRVSPEC = 0x801c697b
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020691e
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNAME = 0x80206928
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSIFPHYS = 0x80206936
- SIOCSIFPOLLCPU = 0x8020697d
- SIOCSIFTSOLEN = 0x8020697f
- SIOCSLIFPHYADDR = 0x8118694a
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ACCEPTFILTER = 0x1000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_NOSIGPIPE = 0x800
- SO_OOBINLINE = 0x100
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDSPACE = 0x100a
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_FASTKEEP = 0x80
- TCP_KEEPCNT = 0x400
- TCP_KEEPIDLE = 0x100
- TCP_KEEPINIT = 0x20
- TCP_KEEPINTVL = 0x200
- TCP_MAXBURST = 0x4
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MINMSS = 0x100
- TCP_MIN_WINSHIFT = 0x5
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_SIGNATURE_ENABLE = 0x10
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40087458
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGSID = 0x40047463
- TIOCGSIZE = 0x40087468
- TIOCGWINSZ = 0x40087468
- TIOCISPTMASTER = 0x20007455
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x40047403
- TIOCMODS = 0x80047404
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2000745f
- TIOCSPGRP = 0x80047476
- TIOCSSIZE = 0x80087467
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40087459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VCHECKPT = 0x13
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VERASE2 = 0x7
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x4
- WCOREFLAG = 0x80
- WLINUXCLONE = 0x80000000
- WNOHANG = 0x1
- WSTOPPED = 0x7f
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x30)
- EADDRNOTAVAIL = Errno(0x31)
- EAFNOSUPPORT = Errno(0x2f)
- EAGAIN = Errno(0x23)
- EALREADY = Errno(0x25)
- EASYNC = Errno(0x63)
- EAUTH = Errno(0x50)
- EBADF = Errno(0x9)
- EBADMSG = Errno(0x59)
- EBADRPC = Errno(0x48)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x55)
- ECHILD = Errno(0xa)
- ECONNABORTED = Errno(0x35)
- ECONNREFUSED = Errno(0x3d)
- ECONNRESET = Errno(0x36)
- EDEADLK = Errno(0xb)
- EDESTADDRREQ = Errno(0x27)
- EDOM = Errno(0x21)
- EDOOFUS = Errno(0x58)
- EDQUOT = Errno(0x45)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EFTYPE = Errno(0x4f)
- EHOSTDOWN = Errno(0x40)
- EHOSTUNREACH = Errno(0x41)
- EIDRM = Errno(0x52)
- EILSEQ = Errno(0x56)
- EINPROGRESS = Errno(0x24)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EISCONN = Errno(0x38)
- EISDIR = Errno(0x15)
- ELAST = Errno(0x63)
- ELOOP = Errno(0x3e)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x28)
- EMULTIHOP = Errno(0x5a)
- ENAMETOOLONG = Errno(0x3f)
- ENEEDAUTH = Errno(0x51)
- ENETDOWN = Errno(0x32)
- ENETRESET = Errno(0x34)
- ENETUNREACH = Errno(0x33)
- ENFILE = Errno(0x17)
- ENOATTR = Errno(0x57)
- ENOBUFS = Errno(0x37)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOLCK = Errno(0x4d)
- ENOLINK = Errno(0x5b)
- ENOMEDIUM = Errno(0x5d)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x53)
- ENOPROTOOPT = Errno(0x2a)
- ENOSPC = Errno(0x1c)
- ENOSYS = Errno(0x4e)
- ENOTBLK = Errno(0xf)
- ENOTCONN = Errno(0x39)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x42)
- ENOTSOCK = Errno(0x26)
- ENOTSUP = Errno(0x2d)
- ENOTTY = Errno(0x19)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x2d)
- EOVERFLOW = Errno(0x54)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x2e)
- EPIPE = Errno(0x20)
- EPROCLIM = Errno(0x43)
- EPROCUNAVAIL = Errno(0x4c)
- EPROGMISMATCH = Errno(0x4b)
- EPROGUNAVAIL = Errno(0x4a)
- EPROTO = Errno(0x5c)
- EPROTONOSUPPORT = Errno(0x2b)
- EPROTOTYPE = Errno(0x29)
- ERANGE = Errno(0x22)
- EREMOTE = Errno(0x47)
- EROFS = Errno(0x1e)
- ERPCMISMATCH = Errno(0x49)
- ESHUTDOWN = Errno(0x3a)
- ESOCKTNOSUPPORT = Errno(0x2c)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESTALE = Errno(0x46)
- ETIMEDOUT = Errno(0x3c)
- ETOOMANYREFS = Errno(0x3b)
- ETXTBSY = Errno(0x1a)
- EUNUSED94 = Errno(0x5e)
- EUNUSED95 = Errno(0x5f)
- EUNUSED96 = Errno(0x60)
- EUNUSED97 = Errno(0x61)
- EUNUSED98 = Errno(0x62)
- EUSERS = Errno(0x44)
- EWOULDBLOCK = Errno(0x23)
- EXDEV = Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0xa)
- SIGCHLD = Signal(0x14)
- SIGCKPT = Signal(0x21)
- SIGCKPTEXIT = Signal(0x22)
- SIGCONT = Signal(0x13)
- SIGEMT = Signal(0x7)
- SIGFPE = Signal(0x8)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINFO = Signal(0x1d)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x17)
- SIGIOT = Signal(0x6)
- SIGKILL = Signal(0x9)
- SIGPIPE = Signal(0xd)
- SIGPROF = Signal(0x1b)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTOP = Signal(0x11)
- SIGSYS = Signal(0xc)
- SIGTERM = Signal(0xf)
- SIGTHR = Signal(0x20)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x12)
- SIGTTIN = Signal(0x15)
- SIGTTOU = Signal(0x16)
- SIGURG = Signal(0x10)
- SIGUSR1 = Signal(0x1e)
- SIGUSR2 = Signal(0x1f)
- SIGVTALRM = Signal(0x1a)
- SIGWINCH = Signal(0x1c)
- SIGXCPU = Signal(0x18)
- SIGXFSZ = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "operation timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "identifier removed",
- 83: "no message of desired type",
- 84: "value too large to be stored in data type",
- 85: "operation canceled",
- 86: "illegal byte sequence",
- 87: "attribute not found",
- 88: "programming error",
- 89: "bad message",
- 90: "multihop attempted",
- 91: "link has been severed",
- 92: "protocol error",
- 93: "no medium found",
- 94: "unknown error: 94",
- 95: "unknown error: 95",
- 96: "unknown error: 96",
- 97: "unknown error: 97",
- 98: "unknown error: 98",
- 99: "unknown error: 99",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "suspended (signal)",
- 18: "suspended",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "thread Scheduler",
- 33: "checkPoint",
- 34: "checkPointExit",
-}
diff --git a/src/pkg/syscall/zerrors_dragonfly_amd64.go b/src/pkg/syscall/zerrors_dragonfly_amd64.go
deleted file mode 100644
index 59bff751c..000000000
--- a/src/pkg/syscall/zerrors_dragonfly_amd64.go
+++ /dev/null
@@ -1,1526 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package syscall
-
-const (
- AF_APPLETALK = 0x10
- AF_ATM = 0x1e
- AF_BLUETOOTH = 0x21
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x23
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1c
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x24
- AF_MPLS = 0x22
- AF_NATM = 0x1d
- AF_NETGRAPH = 0x20
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x11
- AF_SIP = 0x18
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc0104279
- BIOCGETIF = 0x4020426b
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4010426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCLOCK = 0x2000427a
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044278
- BIOCSETF = 0x80104267
- BIOCSETIF = 0x8020426c
- BIOCSETWF = 0x8010427b
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8010426d
- BIOCSSEESENT = 0x80044277
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x8
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DEFAULTBUFSIZE = 0x1000
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MAX_CLONES = 0x80
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DOCSIS = 0x8f
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_REDBACK_SMARTEDGE = 0x20
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DBF = 0xf
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_EXCEPT = -0x8
- EVFILT_MARKER = 0xf
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0x8
- EVFILT_TIMER = -0x7
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_NODATA = 0x1000
- EV_ONESHOT = 0x10
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTEXIT_LWP = 0x10000
- EXTEXIT_PROC = 0x0
- EXTEXIT_SETINT = 0x1
- EXTEXIT_SIMPLE = 0x0
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_DUP2FD = 0xa
- F_DUP2FD_CLOEXEC = 0x12
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x11
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETOWN = 0x5
- F_OK = 0x0
- F_RDLCK = 0x1
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x118e72
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MONITOR = 0x40000
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NPOLLING = 0x100000
- IFF_OACTIVE = 0x400
- IFF_OACTIVE_COMPAT = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_POLLING = 0x10000
- IFF_POLLING_COMPAT = 0x10000
- IFF_PPROMISC = 0x20000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_SMART = 0x20
- IFF_STATICARP = 0x80000
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf8
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PLC = 0xae
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xf3
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VOICEEM = 0x64
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CARP = 0x70
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0xfe
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MOBILE = 0x37
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEP = 0x21
- IPPROTO_SKIP = 0x39
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TLSP = 0x38
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_UNKNOWN = 0x102
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_BINDV6ONLY = 0x1b
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXPACKET = 0xffff
- IPV6_MMTU = 0x500
- IPV6_MSFILTER = 0x4a
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PKTOPTIONS = 0x34
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_PREFER_TEMPADDR = 0x3f
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0xd
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW_ADD = 0x32
- IP_FW_DEL = 0x33
- IP_FW_FLUSH = 0x34
- IP_FW_GET = 0x36
- IP_FW_RESETLOG = 0x37
- IP_FW_ZERO = 0x35
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x42
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x1
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVTTL = 0x41
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_TOS = 0x3
- IP_TTL = 0x4
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_AUTOSYNC = 0x7
- MADV_CONTROL_END = 0xb
- MADV_CONTROL_START = 0xa
- MADV_CORE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_INVAL = 0xa
- MADV_NOCORE = 0x8
- MADV_NORMAL = 0x0
- MADV_NOSYNC = 0x6
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_SETMAP = 0xb
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_INHERIT = 0x80
- MAP_NOCORE = 0x20000
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_NOSYNC = 0x800
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_SIZEALIGN = 0x40000
- MAP_STACK = 0x400
- MAP_TRYFIXED = 0x10000
- MAP_VPAGETABLE = 0x2000
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_FBLOCKING = 0x10000
- MSG_FMASK = 0xffff0000
- MSG_FNONBLOCKING = 0x20000
- MSG_NOSIGNAL = 0x400
- MSG_NOTIFICATION = 0x200
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_SYNC = 0x800
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x2
- MS_SYNC = 0x0
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_MAXID = 0x4
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_OOB = 0x2
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x20000
- O_CREAT = 0x200
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x8000000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FAPPEND = 0x100000
- O_FASYNCWRITE = 0x800000
- O_FBLOCKING = 0x40000
- O_FBUFFERED = 0x2000000
- O_FMASK = 0x7fc0000
- O_FNONBLOCKING = 0x80000
- O_FOFFSET = 0x200000
- O_FSYNC = 0x80
- O_FSYNCWRITE = 0x400000
- O_FUNBUFFERED = 0x1000000
- O_MAPONREAD = 0x4000000
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_AS = 0xa
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0xb
- RTAX_MPLS1 = 0x8
- RTAX_MPLS2 = 0x9
- RTAX_MPLS3 = 0xa
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_MPLS1 = 0x100
- RTA_MPLS2 = 0x200
- RTA_MPLS3 = 0x400
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_CLONING = 0x100
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MPLSOPS = 0x1000000
- RTF_MULTICAST = 0x800000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_REJECT = 0x8
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_WASCLONED = 0x20000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_IEEE80211 = 0x12
- RTM_IFANNOUNCE = 0x11
- RTM_IFINFO = 0xe
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x6
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_IWCAPSEGS = 0x400
- RTV_IWMAXSEGS = 0x200
- RTV_MSL = 0x100
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCADDRT = 0x8040720a
- SIOCAIFADDR = 0x8040691a
- SIOCALIFADDR = 0x8118691b
- SIOCATMARK = 0x40047307
- SIOCDELMULTI = 0x80206932
- SIOCDELRT = 0x8040720b
- SIOCDIFADDR = 0x80206919
- SIOCDIFPHYADDR = 0x80206949
- SIOCDLIFADDR = 0x8118691d
- SIOCGDRVSPEC = 0xc028697b
- SIOCGETSGCNT = 0xc0207210
- SIOCGETVIFCNT = 0xc028720f
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020691f
- SIOCGIFCONF = 0xc0106924
- SIOCGIFDATA = 0xc0206926
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFGMEMB = 0xc028698a
- SIOCGIFINDEX = 0xc0206920
- SIOCGIFMEDIA = 0xc0306938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206948
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPOLLCPU = 0xc020697e
- SIOCGIFPSRCADDR = 0xc0206947
- SIOCGIFSTATUS = 0xc331693b
- SIOCGIFTSOLEN = 0xc0206980
- SIOCGLIFADDR = 0xc118691c
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGPRIVATE_0 = 0xc0206950
- SIOCGPRIVATE_1 = 0xc0206951
- SIOCIFCREATE = 0xc020697a
- SIOCIFCREATE2 = 0xc020697c
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106978
- SIOCSDRVSPEC = 0x8028697b
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020691e
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNAME = 0x80206928
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSIFPHYS = 0x80206936
- SIOCSIFPOLLCPU = 0x8020697d
- SIOCSIFTSOLEN = 0x8020697f
- SIOCSLIFPHYADDR = 0x8118694a
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ACCEPTFILTER = 0x1000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_NOSIGPIPE = 0x800
- SO_OOBINLINE = 0x100
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDSPACE = 0x100a
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_FASTKEEP = 0x80
- TCP_KEEPCNT = 0x400
- TCP_KEEPIDLE = 0x100
- TCP_KEEPINIT = 0x20
- TCP_KEEPINTVL = 0x200
- TCP_MAXBURST = 0x4
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MINMSS = 0x100
- TCP_MIN_WINSHIFT = 0x5
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_SIGNATURE_ENABLE = 0x10
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40107458
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGSID = 0x40047463
- TIOCGSIZE = 0x40087468
- TIOCGWINSZ = 0x40087468
- TIOCISPTMASTER = 0x20007455
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x40047403
- TIOCMODS = 0x80047404
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2000745f
- TIOCSPGRP = 0x80047476
- TIOCSSIZE = 0x80087467
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40107459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VCHECKPT = 0x13
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VERASE2 = 0x7
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x4
- WCOREFLAG = 0x80
- WLINUXCLONE = 0x80000000
- WNOHANG = 0x1
- WSTOPPED = 0x7f
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x30)
- EADDRNOTAVAIL = Errno(0x31)
- EAFNOSUPPORT = Errno(0x2f)
- EAGAIN = Errno(0x23)
- EALREADY = Errno(0x25)
- EASYNC = Errno(0x63)
- EAUTH = Errno(0x50)
- EBADF = Errno(0x9)
- EBADMSG = Errno(0x59)
- EBADRPC = Errno(0x48)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x55)
- ECHILD = Errno(0xa)
- ECONNABORTED = Errno(0x35)
- ECONNREFUSED = Errno(0x3d)
- ECONNRESET = Errno(0x36)
- EDEADLK = Errno(0xb)
- EDESTADDRREQ = Errno(0x27)
- EDOM = Errno(0x21)
- EDOOFUS = Errno(0x58)
- EDQUOT = Errno(0x45)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EFTYPE = Errno(0x4f)
- EHOSTDOWN = Errno(0x40)
- EHOSTUNREACH = Errno(0x41)
- EIDRM = Errno(0x52)
- EILSEQ = Errno(0x56)
- EINPROGRESS = Errno(0x24)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EISCONN = Errno(0x38)
- EISDIR = Errno(0x15)
- ELAST = Errno(0x63)
- ELOOP = Errno(0x3e)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x28)
- EMULTIHOP = Errno(0x5a)
- ENAMETOOLONG = Errno(0x3f)
- ENEEDAUTH = Errno(0x51)
- ENETDOWN = Errno(0x32)
- ENETRESET = Errno(0x34)
- ENETUNREACH = Errno(0x33)
- ENFILE = Errno(0x17)
- ENOATTR = Errno(0x57)
- ENOBUFS = Errno(0x37)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOLCK = Errno(0x4d)
- ENOLINK = Errno(0x5b)
- ENOMEDIUM = Errno(0x5d)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x53)
- ENOPROTOOPT = Errno(0x2a)
- ENOSPC = Errno(0x1c)
- ENOSYS = Errno(0x4e)
- ENOTBLK = Errno(0xf)
- ENOTCONN = Errno(0x39)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x42)
- ENOTSOCK = Errno(0x26)
- ENOTSUP = Errno(0x2d)
- ENOTTY = Errno(0x19)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x2d)
- EOVERFLOW = Errno(0x54)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x2e)
- EPIPE = Errno(0x20)
- EPROCLIM = Errno(0x43)
- EPROCUNAVAIL = Errno(0x4c)
- EPROGMISMATCH = Errno(0x4b)
- EPROGUNAVAIL = Errno(0x4a)
- EPROTO = Errno(0x5c)
- EPROTONOSUPPORT = Errno(0x2b)
- EPROTOTYPE = Errno(0x29)
- ERANGE = Errno(0x22)
- EREMOTE = Errno(0x47)
- EROFS = Errno(0x1e)
- ERPCMISMATCH = Errno(0x49)
- ESHUTDOWN = Errno(0x3a)
- ESOCKTNOSUPPORT = Errno(0x2c)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESTALE = Errno(0x46)
- ETIMEDOUT = Errno(0x3c)
- ETOOMANYREFS = Errno(0x3b)
- ETXTBSY = Errno(0x1a)
- EUNUSED94 = Errno(0x5e)
- EUNUSED95 = Errno(0x5f)
- EUNUSED96 = Errno(0x60)
- EUNUSED97 = Errno(0x61)
- EUNUSED98 = Errno(0x62)
- EUSERS = Errno(0x44)
- EWOULDBLOCK = Errno(0x23)
- EXDEV = Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0xa)
- SIGCHLD = Signal(0x14)
- SIGCKPT = Signal(0x21)
- SIGCKPTEXIT = Signal(0x22)
- SIGCONT = Signal(0x13)
- SIGEMT = Signal(0x7)
- SIGFPE = Signal(0x8)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINFO = Signal(0x1d)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x17)
- SIGIOT = Signal(0x6)
- SIGKILL = Signal(0x9)
- SIGPIPE = Signal(0xd)
- SIGPROF = Signal(0x1b)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTOP = Signal(0x11)
- SIGSYS = Signal(0xc)
- SIGTERM = Signal(0xf)
- SIGTHR = Signal(0x20)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x12)
- SIGTTIN = Signal(0x15)
- SIGTTOU = Signal(0x16)
- SIGURG = Signal(0x10)
- SIGUSR1 = Signal(0x1e)
- SIGUSR2 = Signal(0x1f)
- SIGVTALRM = Signal(0x1a)
- SIGWINCH = Signal(0x1c)
- SIGXCPU = Signal(0x18)
- SIGXFSZ = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "operation timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "identifier removed",
- 83: "no message of desired type",
- 84: "value too large to be stored in data type",
- 85: "operation canceled",
- 86: "illegal byte sequence",
- 87: "attribute not found",
- 88: "programming error",
- 89: "bad message",
- 90: "multihop attempted",
- 91: "link has been severed",
- 92: "protocol error",
- 93: "no medium found",
- 94: "unknown error: 94",
- 95: "unknown error: 95",
- 96: "unknown error: 96",
- 97: "unknown error: 97",
- 98: "unknown error: 98",
- 99: "unknown error: 99",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "suspended (signal)",
- 18: "suspended",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "thread Scheduler",
- 33: "checkPoint",
- 34: "checkPointExit",
-}
diff --git a/src/pkg/syscall/zerrors_freebsd_386.go b/src/pkg/syscall/zerrors_freebsd_386.go
deleted file mode 100644
index cd3aa80a9..000000000
--- a/src/pkg/syscall/zerrors_freebsd_386.go
+++ /dev/null
@@ -1,1715 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package syscall
-
-const (
- AF_APPLETALK = 0x10
- AF_ARP = 0x23
- AF_ATM = 0x1e
- AF_BLUETOOTH = 0x24
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1c
- AF_INET6_SDP = 0x2a
- AF_INET_SDP = 0x28
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x2a
- AF_NATM = 0x1d
- AF_NETBIOS = 0x6
- AF_NETGRAPH = 0x20
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x11
- AF_SCLUSTER = 0x22
- AF_SIP = 0x18
- AF_SLOW = 0x21
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VENDOR00 = 0x27
- AF_VENDOR01 = 0x29
- AF_VENDOR02 = 0x2b
- AF_VENDOR03 = 0x2d
- AF_VENDOR04 = 0x2f
- AF_VENDOR05 = 0x31
- AF_VENDOR06 = 0x33
- AF_VENDOR07 = 0x35
- AF_VENDOR08 = 0x37
- AF_VENDOR09 = 0x39
- AF_VENDOR10 = 0x3b
- AF_VENDOR11 = 0x3d
- AF_VENDOR12 = 0x3f
- AF_VENDOR13 = 0x41
- AF_VENDOR14 = 0x43
- AF_VENDOR15 = 0x45
- AF_VENDOR16 = 0x47
- AF_VENDOR17 = 0x49
- AF_VENDOR18 = 0x4b
- AF_VENDOR19 = 0x4d
- AF_VENDOR20 = 0x4f
- AF_VENDOR21 = 0x51
- AF_VENDOR22 = 0x53
- AF_VENDOR23 = 0x55
- AF_VENDOR24 = 0x57
- AF_VENDOR25 = 0x59
- AF_VENDOR26 = 0x5b
- AF_VENDOR27 = 0x5d
- AF_VENDOR28 = 0x5f
- AF_VENDOR29 = 0x61
- AF_VENDOR30 = 0x63
- AF_VENDOR31 = 0x65
- AF_VENDOR32 = 0x67
- AF_VENDOR33 = 0x69
- AF_VENDOR34 = 0x6b
- AF_VENDOR35 = 0x6d
- AF_VENDOR36 = 0x6f
- AF_VENDOR37 = 0x71
- AF_VENDOR38 = 0x73
- AF_VENDOR39 = 0x75
- AF_VENDOR40 = 0x77
- AF_VENDOR41 = 0x79
- AF_VENDOR42 = 0x7b
- AF_VENDOR43 = 0x7d
- AF_VENDOR44 = 0x7f
- AF_VENDOR45 = 0x81
- AF_VENDOR46 = 0x83
- AF_VENDOR47 = 0x85
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B460800 = 0x70800
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B921600 = 0xe1000
- B9600 = 0x2580
- BIOCFEEDBACK = 0x8004427c
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDIRECTION = 0x40044276
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc0084279
- BIOCGETBUFMODE = 0x4004427d
- BIOCGETIF = 0x4020426b
- BIOCGETZMAX = 0x4004427f
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4008426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCGTSTAMP = 0x40044283
- BIOCIMMEDIATE = 0x80044270
- BIOCLOCK = 0x2000427a
- BIOCPROMISC = 0x20004269
- BIOCROTZBUF = 0x400c4280
- BIOCSBLEN = 0xc0044266
- BIOCSDIRECTION = 0x80044277
- BIOCSDLT = 0x80044278
- BIOCSETBUFMODE = 0x8004427e
- BIOCSETF = 0x80084267
- BIOCSETFNR = 0x80084282
- BIOCSETIF = 0x8020426c
- BIOCSETWF = 0x8008427b
- BIOCSETZBUF = 0x800c4281
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8008426d
- BIOCSSEESENT = 0x80044277
- BIOCSTSTAMP = 0x80044284
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_BUFMODE_BUFFER = 0x1
- BPF_BUFMODE_ZBUF = 0x2
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_T_BINTIME = 0x2
- BPF_T_BINTIME_FAST = 0x102
- BPF_T_BINTIME_MONOTONIC = 0x202
- BPF_T_BINTIME_MONOTONIC_FAST = 0x302
- BPF_T_FAST = 0x100
- BPF_T_FLAG_MASK = 0x300
- BPF_T_FORMAT_MASK = 0x3
- BPF_T_MICROTIME = 0x0
- BPF_T_MICROTIME_FAST = 0x100
- BPF_T_MICROTIME_MONOTONIC = 0x200
- BPF_T_MICROTIME_MONOTONIC_FAST = 0x300
- BPF_T_MONOTONIC = 0x200
- BPF_T_MONOTONIC_FAST = 0x300
- BPF_T_NANOTIME = 0x1
- BPF_T_NANOTIME_FAST = 0x101
- BPF_T_NANOTIME_MONOTONIC = 0x201
- BPF_T_NANOTIME_MONOTONIC_FAST = 0x301
- BPF_T_NONE = 0x3
- BPF_T_NORMAL = 0x0
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0x18
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DBUS = 0xe7
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_DVB_CI = 0xeb
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NOFCS = 0xe6
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPOIB = 0xf2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_ATM_CEMIC = 0xee
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FIBRECHANNEL = 0xea
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_SRX_E2E = 0xe9
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_JUNIPER_VS = 0xe8
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_PPP_WITHDIRECTION = 0xa6
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0xf6
- DLT_MATCHING_MIN = 0x68
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPEG_2_TS = 0xf3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_MUX27010 = 0xec
- DLT_NETANALYZER = 0xf0
- DLT_NETANALYZER_TRANSPARENT = 0xf1
- DLT_NFC_LLCP = 0xf5
- DLT_NFLOG = 0xef
- DLT_NG40 = 0xf4
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x79
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PPP_WITH_DIRECTION = 0xa6
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_STANAG_5066_D_PDU = 0xed
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_USER0 = 0x93
- DLT_USER1 = 0x94
- DLT_USER10 = 0x9d
- DLT_USER11 = 0x9e
- DLT_USER12 = 0x9f
- DLT_USER13 = 0xa0
- DLT_USER14 = 0xa1
- DLT_USER15 = 0xa2
- DLT_USER2 = 0x95
- DLT_USER3 = 0x96
- DLT_USER4 = 0x97
- DLT_USER5 = 0x98
- DLT_USER6 = 0x99
- DLT_USER7 = 0x9a
- DLT_USER8 = 0x9b
- DLT_USER9 = 0x9c
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_FS = -0x9
- EVFILT_LIO = -0xa
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xb
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xb
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_DROP = 0x1000
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_CANCEL = 0x5
- F_DUP2FD = 0xa
- F_DUP2FD_CLOEXEC = 0x12
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x11
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0xb
- F_GETOWN = 0x5
- F_OGETLK = 0x7
- F_OK = 0x0
- F_OSETLK = 0x8
- F_OSETLKW = 0x9
- F_RDAHEAD = 0x10
- F_RDLCK = 0x1
- F_READAHEAD = 0xf
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0xc
- F_SETLKW = 0xd
- F_SETLK_REMOTE = 0xe
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_UNLCKSYS = 0x4
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x218f72
- IFF_CANTCONFIG = 0x10000
- IFF_DEBUG = 0x4
- IFF_DRV_OACTIVE = 0x400
- IFF_DRV_RUNNING = 0x40
- IFF_DYING = 0x200000
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MONITOR = 0x40000
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PPROMISC = 0x20000
- IFF_PROMISC = 0x100
- IFF_RENAMING = 0x400000
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_SMART = 0x20
- IFF_STATICARP = 0x80000
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf8
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_IPXIP = 0xf9
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf6
- IFT_PFSYNC = 0xf7
- IFT_PLC = 0xae
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xd7
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VOICEEM = 0x64
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IN_RFC3021_MASK = 0xfffffffe
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CARP = 0x70
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0x102
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MH = 0x87
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MOBILE = 0x37
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OLD_DIVERT = 0xfe
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEND = 0x103
- IPPROTO_SEP = 0x21
- IPPROTO_SKIP = 0x39
- IPPROTO_SPACER = 0x7fff
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TLSP = 0x38
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_BINDANY = 0x40
- IPV6_BINDV6ONLY = 0x1b
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MSFILTER = 0x4a
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_PREFER_TEMPADDR = 0x3f
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BINDANY = 0x18
- IP_BLOCK_SOURCE = 0x48
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DONTFRAG = 0x43
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET3 = 0x31
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW3 = 0x30
- IP_FW_ADD = 0x32
- IP_FW_DEL = 0x33
- IP_FW_FLUSH = 0x34
- IP_FW_GET = 0x36
- IP_FW_NAT_CFG = 0x38
- IP_FW_NAT_DEL = 0x39
- IP_FW_NAT_GET_CONFIG = 0x3a
- IP_FW_NAT_GET_LOG = 0x3b
- IP_FW_RESETLOG = 0x37
- IP_FW_TABLE_ADD = 0x28
- IP_FW_TABLE_DEL = 0x29
- IP_FW_TABLE_FLUSH = 0x2a
- IP_FW_TABLE_GETSIZE = 0x2b
- IP_FW_TABLE_LIST = 0x2c
- IP_FW_ZERO = 0x35
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MAX_SOURCE_FILTER = 0x400
- IP_MF = 0x2000
- IP_MINTTL = 0x42
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_OFFMASK = 0x1fff
- IP_ONESBCAST = 0x17
- IP_OPTIONS = 0x1
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVTOS = 0x44
- IP_RECVTTL = 0x41
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_SENDSRCADDR = 0x7
- IP_TOS = 0x3
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_AUTOSYNC = 0x7
- MADV_CORE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_NOCORE = 0x8
- MADV_NORMAL = 0x0
- MADV_NOSYNC = 0x6
- MADV_PROTECT = 0xa
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MAP_ALIGNED_SUPER = 0x1000000
- MAP_ALIGNMENT_MASK = -0x1000000
- MAP_ALIGNMENT_SHIFT = 0x18
- MAP_ANON = 0x1000
- MAP_ANONYMOUS = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_NOCORE = 0x20000
- MAP_NORESERVE = 0x40
- MAP_NOSYNC = 0x800
- MAP_PREFAULT_READ = 0x40000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_RESERVED0100 = 0x100
- MAP_SHARED = 0x1
- MAP_STACK = 0x400
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CMSG_CLOEXEC = 0x40000
- MSG_COMPAT = 0x8000
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_NBIO = 0x4000
- MSG_NOSIGNAL = 0x20000
- MSG_NOTIFICATION = 0x2000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x2
- MS_SYNC = 0x0
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_IFLISTL = 0x5
- NET_RT_IFMALIST = 0x4
- NET_RT_MAXID = 0x6
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x100000
- O_CREAT = 0x200
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x20000
- O_EXCL = 0x800
- O_EXEC = 0x40000
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_TTY_INIT = 0x80000
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_AS = 0xa
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_FMASK = 0x1004d808
- RTF_GATEWAY = 0x2
- RTF_GWFLAG_COMPAT = 0x80000000
- RTF_HOST = 0x4
- RTF_LLDATA = 0x400
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_REJECT = 0x8
- RTF_RNH_LOCKED = 0x40000000
- RTF_STATIC = 0x800
- RTF_STICKY = 0x10000000
- RTF_UP = 0x1
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_IEEE80211 = 0x12
- RTM_IFANNOUNCE = 0x11
- RTM_IFINFO = 0xe
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RTV_WEIGHT = 0x100
- RT_CACHING_CONTEXT = 0x1
- RT_DEFAULT_FIB = 0x0
- RT_NORTREF = 0x2
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_BINTIME = 0x4
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCADDRT = 0x8030720a
- SIOCAIFADDR = 0x8040691a
- SIOCAIFGROUP = 0x80246987
- SIOCALIFADDR = 0x8118691b
- SIOCATMARK = 0x40047307
- SIOCDELMULTI = 0x80206932
- SIOCDELRT = 0x8030720b
- SIOCDIFADDR = 0x80206919
- SIOCDIFGROUP = 0x80246989
- SIOCDIFPHYADDR = 0x80206949
- SIOCDLIFADDR = 0x8118691d
- SIOCGDRVSPEC = 0xc01c697b
- SIOCGETSGCNT = 0xc0147210
- SIOCGETVIFCNT = 0xc014720f
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020691f
- SIOCGIFCONF = 0xc0086924
- SIOCGIFDESCR = 0xc020692a
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFIB = 0xc020695c
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFGMEMB = 0xc024698a
- SIOCGIFGROUP = 0xc0246988
- SIOCGIFINDEX = 0xc0206920
- SIOCGIFMAC = 0xc0206926
- SIOCGIFMEDIA = 0xc0286938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206948
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc0206947
- SIOCGIFSTATUS = 0xc331693b
- SIOCGLIFADDR = 0xc118691c
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGPRIVATE_0 = 0xc0206950
- SIOCGPRIVATE_1 = 0xc0206951
- SIOCIFCREATE = 0xc020697a
- SIOCIFCREATE2 = 0xc020697c
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc00c6978
- SIOCSDRVSPEC = 0x801c697b
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020691e
- SIOCSIFDESCR = 0x80206929
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFIB = 0x8020695d
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206927
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNAME = 0x80206928
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSIFPHYS = 0x80206936
- SIOCSIFRVNET = 0xc020695b
- SIOCSIFVNET = 0xc020695a
- SIOCSLIFPHYADDR = 0x8118694a
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_CLOEXEC = 0x10000000
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_NONBLOCK = 0x20000000
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ACCEPTFILTER = 0x1000
- SO_BINTIME = 0x2000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1009
- SO_LINGER = 0x80
- SO_LISTENINCQLEN = 0x1013
- SO_LISTENQLEN = 0x1012
- SO_LISTENQLIMIT = 0x1011
- SO_NOSIGPIPE = 0x800
- SO_NO_DDP = 0x8000
- SO_NO_OFFLOAD = 0x4000
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1010
- SO_PROTOCOL = 0x1016
- SO_PROTOTYPE = 0x1016
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_SETFIB = 0x1014
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- SO_USER_COOKIE = 0x1015
- SO_VENDOR = 0x80000000
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CA_NAME_MAX = 0x10
- TCP_CONGESTION = 0x40
- TCP_INFO = 0x20
- TCP_KEEPCNT = 0x400
- TCP_KEEPIDLE = 0x100
- TCP_KEEPINIT = 0x80
- TCP_KEEPINTVL = 0x200
- TCP_MAXBURST = 0x4
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x4
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x10
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x218
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_VENDOR = 0x80000000
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGPTN = 0x4004740f
- TIOCGSID = 0x40047463
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DCD = 0x40
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTMASTER = 0x2000741c
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2004745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40087459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VERASE2 = 0x7
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x4
- WCOREFLAG = 0x80
- WEXITED = 0x10
- WLINUXCLONE = 0x80000000
- WNOHANG = 0x1
- WNOWAIT = 0x8
- WSTOPPED = 0x2
- WTRAPPED = 0x20
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x30)
- EADDRNOTAVAIL = Errno(0x31)
- EAFNOSUPPORT = Errno(0x2f)
- EAGAIN = Errno(0x23)
- EALREADY = Errno(0x25)
- EAUTH = Errno(0x50)
- EBADF = Errno(0x9)
- EBADMSG = Errno(0x59)
- EBADRPC = Errno(0x48)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x55)
- ECAPMODE = Errno(0x5e)
- ECHILD = Errno(0xa)
- ECONNABORTED = Errno(0x35)
- ECONNREFUSED = Errno(0x3d)
- ECONNRESET = Errno(0x36)
- EDEADLK = Errno(0xb)
- EDESTADDRREQ = Errno(0x27)
- EDOM = Errno(0x21)
- EDOOFUS = Errno(0x58)
- EDQUOT = Errno(0x45)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EFTYPE = Errno(0x4f)
- EHOSTDOWN = Errno(0x40)
- EHOSTUNREACH = Errno(0x41)
- EIDRM = Errno(0x52)
- EILSEQ = Errno(0x56)
- EINPROGRESS = Errno(0x24)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EISCONN = Errno(0x38)
- EISDIR = Errno(0x15)
- ELAST = Errno(0x60)
- ELOOP = Errno(0x3e)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x28)
- EMULTIHOP = Errno(0x5a)
- ENAMETOOLONG = Errno(0x3f)
- ENEEDAUTH = Errno(0x51)
- ENETDOWN = Errno(0x32)
- ENETRESET = Errno(0x34)
- ENETUNREACH = Errno(0x33)
- ENFILE = Errno(0x17)
- ENOATTR = Errno(0x57)
- ENOBUFS = Errno(0x37)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOLCK = Errno(0x4d)
- ENOLINK = Errno(0x5b)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x53)
- ENOPROTOOPT = Errno(0x2a)
- ENOSPC = Errno(0x1c)
- ENOSYS = Errno(0x4e)
- ENOTBLK = Errno(0xf)
- ENOTCAPABLE = Errno(0x5d)
- ENOTCONN = Errno(0x39)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x42)
- ENOTRECOVERABLE = Errno(0x5f)
- ENOTSOCK = Errno(0x26)
- ENOTSUP = Errno(0x2d)
- ENOTTY = Errno(0x19)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x2d)
- EOVERFLOW = Errno(0x54)
- EOWNERDEAD = Errno(0x60)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x2e)
- EPIPE = Errno(0x20)
- EPROCLIM = Errno(0x43)
- EPROCUNAVAIL = Errno(0x4c)
- EPROGMISMATCH = Errno(0x4b)
- EPROGUNAVAIL = Errno(0x4a)
- EPROTO = Errno(0x5c)
- EPROTONOSUPPORT = Errno(0x2b)
- EPROTOTYPE = Errno(0x29)
- ERANGE = Errno(0x22)
- EREMOTE = Errno(0x47)
- EROFS = Errno(0x1e)
- ERPCMISMATCH = Errno(0x49)
- ESHUTDOWN = Errno(0x3a)
- ESOCKTNOSUPPORT = Errno(0x2c)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESTALE = Errno(0x46)
- ETIMEDOUT = Errno(0x3c)
- ETOOMANYREFS = Errno(0x3b)
- ETXTBSY = Errno(0x1a)
- EUSERS = Errno(0x44)
- EWOULDBLOCK = Errno(0x23)
- EXDEV = Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0xa)
- SIGCHLD = Signal(0x14)
- SIGCONT = Signal(0x13)
- SIGEMT = Signal(0x7)
- SIGFPE = Signal(0x8)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINFO = Signal(0x1d)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x17)
- SIGIOT = Signal(0x6)
- SIGKILL = Signal(0x9)
- SIGLIBRT = Signal(0x21)
- SIGLWP = Signal(0x20)
- SIGPIPE = Signal(0xd)
- SIGPROF = Signal(0x1b)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTOP = Signal(0x11)
- SIGSYS = Signal(0xc)
- SIGTERM = Signal(0xf)
- SIGTHR = Signal(0x20)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x12)
- SIGTTIN = Signal(0x15)
- SIGTTOU = Signal(0x16)
- SIGURG = Signal(0x10)
- SIGUSR1 = Signal(0x1e)
- SIGUSR2 = Signal(0x1f)
- SIGVTALRM = Signal(0x1a)
- SIGWINCH = Signal(0x1c)
- SIGXCPU = Signal(0x18)
- SIGXFSZ = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "operation timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "identifier removed",
- 83: "no message of desired type",
- 84: "value too large to be stored in data type",
- 85: "operation canceled",
- 86: "illegal byte sequence",
- 87: "attribute not found",
- 88: "programming error",
- 89: "bad message",
- 90: "multihop attempted",
- 91: "link has been severed",
- 92: "protocol error",
- 93: "capabilities insufficient",
- 94: "not permitted in capability mode",
- 95: "state not recoverable",
- 96: "previous owner died",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "suspended (signal)",
- 18: "suspended",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "unknown signal",
- 33: "unknown signal",
-}
diff --git a/src/pkg/syscall/zerrors_freebsd_amd64.go b/src/pkg/syscall/zerrors_freebsd_amd64.go
deleted file mode 100644
index 9edce6e2f..000000000
--- a/src/pkg/syscall/zerrors_freebsd_amd64.go
+++ /dev/null
@@ -1,1716 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package syscall
-
-const (
- AF_APPLETALK = 0x10
- AF_ARP = 0x23
- AF_ATM = 0x1e
- AF_BLUETOOTH = 0x24
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1c
- AF_INET6_SDP = 0x2a
- AF_INET_SDP = 0x28
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x2a
- AF_NATM = 0x1d
- AF_NETBIOS = 0x6
- AF_NETGRAPH = 0x20
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x11
- AF_SCLUSTER = 0x22
- AF_SIP = 0x18
- AF_SLOW = 0x21
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VENDOR00 = 0x27
- AF_VENDOR01 = 0x29
- AF_VENDOR02 = 0x2b
- AF_VENDOR03 = 0x2d
- AF_VENDOR04 = 0x2f
- AF_VENDOR05 = 0x31
- AF_VENDOR06 = 0x33
- AF_VENDOR07 = 0x35
- AF_VENDOR08 = 0x37
- AF_VENDOR09 = 0x39
- AF_VENDOR10 = 0x3b
- AF_VENDOR11 = 0x3d
- AF_VENDOR12 = 0x3f
- AF_VENDOR13 = 0x41
- AF_VENDOR14 = 0x43
- AF_VENDOR15 = 0x45
- AF_VENDOR16 = 0x47
- AF_VENDOR17 = 0x49
- AF_VENDOR18 = 0x4b
- AF_VENDOR19 = 0x4d
- AF_VENDOR20 = 0x4f
- AF_VENDOR21 = 0x51
- AF_VENDOR22 = 0x53
- AF_VENDOR23 = 0x55
- AF_VENDOR24 = 0x57
- AF_VENDOR25 = 0x59
- AF_VENDOR26 = 0x5b
- AF_VENDOR27 = 0x5d
- AF_VENDOR28 = 0x5f
- AF_VENDOR29 = 0x61
- AF_VENDOR30 = 0x63
- AF_VENDOR31 = 0x65
- AF_VENDOR32 = 0x67
- AF_VENDOR33 = 0x69
- AF_VENDOR34 = 0x6b
- AF_VENDOR35 = 0x6d
- AF_VENDOR36 = 0x6f
- AF_VENDOR37 = 0x71
- AF_VENDOR38 = 0x73
- AF_VENDOR39 = 0x75
- AF_VENDOR40 = 0x77
- AF_VENDOR41 = 0x79
- AF_VENDOR42 = 0x7b
- AF_VENDOR43 = 0x7d
- AF_VENDOR44 = 0x7f
- AF_VENDOR45 = 0x81
- AF_VENDOR46 = 0x83
- AF_VENDOR47 = 0x85
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B460800 = 0x70800
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B921600 = 0xe1000
- B9600 = 0x2580
- BIOCFEEDBACK = 0x8004427c
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDIRECTION = 0x40044276
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc0104279
- BIOCGETBUFMODE = 0x4004427d
- BIOCGETIF = 0x4020426b
- BIOCGETZMAX = 0x4008427f
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4010426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCGTSTAMP = 0x40044283
- BIOCIMMEDIATE = 0x80044270
- BIOCLOCK = 0x2000427a
- BIOCPROMISC = 0x20004269
- BIOCROTZBUF = 0x40184280
- BIOCSBLEN = 0xc0044266
- BIOCSDIRECTION = 0x80044277
- BIOCSDLT = 0x80044278
- BIOCSETBUFMODE = 0x8004427e
- BIOCSETF = 0x80104267
- BIOCSETFNR = 0x80104282
- BIOCSETIF = 0x8020426c
- BIOCSETWF = 0x8010427b
- BIOCSETZBUF = 0x80184281
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8010426d
- BIOCSSEESENT = 0x80044277
- BIOCSTSTAMP = 0x80044284
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x8
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_BUFMODE_BUFFER = 0x1
- BPF_BUFMODE_ZBUF = 0x2
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_T_BINTIME = 0x2
- BPF_T_BINTIME_FAST = 0x102
- BPF_T_BINTIME_MONOTONIC = 0x202
- BPF_T_BINTIME_MONOTONIC_FAST = 0x302
- BPF_T_FAST = 0x100
- BPF_T_FLAG_MASK = 0x300
- BPF_T_FORMAT_MASK = 0x3
- BPF_T_MICROTIME = 0x0
- BPF_T_MICROTIME_FAST = 0x100
- BPF_T_MICROTIME_MONOTONIC = 0x200
- BPF_T_MICROTIME_MONOTONIC_FAST = 0x300
- BPF_T_MONOTONIC = 0x200
- BPF_T_MONOTONIC_FAST = 0x300
- BPF_T_NANOTIME = 0x1
- BPF_T_NANOTIME_FAST = 0x101
- BPF_T_NANOTIME_MONOTONIC = 0x201
- BPF_T_NANOTIME_MONOTONIC_FAST = 0x301
- BPF_T_NONE = 0x3
- BPF_T_NORMAL = 0x0
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0x18
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DBUS = 0xe7
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_DVB_CI = 0xeb
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NOFCS = 0xe6
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPOIB = 0xf2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_ATM_CEMIC = 0xee
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FIBRECHANNEL = 0xea
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_SRX_E2E = 0xe9
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_JUNIPER_VS = 0xe8
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_PPP_WITHDIRECTION = 0xa6
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0xf6
- DLT_MATCHING_MIN = 0x68
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPEG_2_TS = 0xf3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_MUX27010 = 0xec
- DLT_NETANALYZER = 0xf0
- DLT_NETANALYZER_TRANSPARENT = 0xf1
- DLT_NFC_LLCP = 0xf5
- DLT_NFLOG = 0xef
- DLT_NG40 = 0xf4
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x79
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PPP_WITH_DIRECTION = 0xa6
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_STANAG_5066_D_PDU = 0xed
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_USER0 = 0x93
- DLT_USER1 = 0x94
- DLT_USER10 = 0x9d
- DLT_USER11 = 0x9e
- DLT_USER12 = 0x9f
- DLT_USER13 = 0xa0
- DLT_USER14 = 0xa1
- DLT_USER15 = 0xa2
- DLT_USER2 = 0x95
- DLT_USER3 = 0x96
- DLT_USER4 = 0x97
- DLT_USER5 = 0x98
- DLT_USER6 = 0x99
- DLT_USER7 = 0x9a
- DLT_USER8 = 0x9b
- DLT_USER9 = 0x9c
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_FS = -0x9
- EVFILT_LIO = -0xa
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xb
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xb
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_DROP = 0x1000
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_CANCEL = 0x5
- F_DUP2FD = 0xa
- F_DUP2FD_CLOEXEC = 0x12
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x11
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0xb
- F_GETOWN = 0x5
- F_OGETLK = 0x7
- F_OK = 0x0
- F_OSETLK = 0x8
- F_OSETLKW = 0x9
- F_RDAHEAD = 0x10
- F_RDLCK = 0x1
- F_READAHEAD = 0xf
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0xc
- F_SETLKW = 0xd
- F_SETLK_REMOTE = 0xe
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_UNLCKSYS = 0x4
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x218f72
- IFF_CANTCONFIG = 0x10000
- IFF_DEBUG = 0x4
- IFF_DRV_OACTIVE = 0x400
- IFF_DRV_RUNNING = 0x40
- IFF_DYING = 0x200000
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MONITOR = 0x40000
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PPROMISC = 0x20000
- IFF_PROMISC = 0x100
- IFF_RENAMING = 0x400000
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_SMART = 0x20
- IFF_STATICARP = 0x80000
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf8
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_IPXIP = 0xf9
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf6
- IFT_PFSYNC = 0xf7
- IFT_PLC = 0xae
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xd7
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VOICEEM = 0x64
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IN_RFC3021_MASK = 0xfffffffe
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CARP = 0x70
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0x102
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MH = 0x87
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MOBILE = 0x37
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OLD_DIVERT = 0xfe
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEND = 0x103
- IPPROTO_SEP = 0x21
- IPPROTO_SKIP = 0x39
- IPPROTO_SPACER = 0x7fff
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TLSP = 0x38
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_BINDANY = 0x40
- IPV6_BINDV6ONLY = 0x1b
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MSFILTER = 0x4a
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_PREFER_TEMPADDR = 0x3f
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BINDANY = 0x18
- IP_BLOCK_SOURCE = 0x48
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DONTFRAG = 0x43
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET3 = 0x31
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW3 = 0x30
- IP_FW_ADD = 0x32
- IP_FW_DEL = 0x33
- IP_FW_FLUSH = 0x34
- IP_FW_GET = 0x36
- IP_FW_NAT_CFG = 0x38
- IP_FW_NAT_DEL = 0x39
- IP_FW_NAT_GET_CONFIG = 0x3a
- IP_FW_NAT_GET_LOG = 0x3b
- IP_FW_RESETLOG = 0x37
- IP_FW_TABLE_ADD = 0x28
- IP_FW_TABLE_DEL = 0x29
- IP_FW_TABLE_FLUSH = 0x2a
- IP_FW_TABLE_GETSIZE = 0x2b
- IP_FW_TABLE_LIST = 0x2c
- IP_FW_ZERO = 0x35
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MAX_SOURCE_FILTER = 0x400
- IP_MF = 0x2000
- IP_MINTTL = 0x42
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_OFFMASK = 0x1fff
- IP_ONESBCAST = 0x17
- IP_OPTIONS = 0x1
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVTOS = 0x44
- IP_RECVTTL = 0x41
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_SENDSRCADDR = 0x7
- IP_TOS = 0x3
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_AUTOSYNC = 0x7
- MADV_CORE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_NOCORE = 0x8
- MADV_NORMAL = 0x0
- MADV_NOSYNC = 0x6
- MADV_PROTECT = 0xa
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MAP_32BIT = 0x80000
- MAP_ALIGNED_SUPER = 0x1000000
- MAP_ALIGNMENT_MASK = -0x1000000
- MAP_ALIGNMENT_SHIFT = 0x18
- MAP_ANON = 0x1000
- MAP_ANONYMOUS = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_NOCORE = 0x20000
- MAP_NORESERVE = 0x40
- MAP_NOSYNC = 0x800
- MAP_PREFAULT_READ = 0x40000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_RESERVED0100 = 0x100
- MAP_SHARED = 0x1
- MAP_STACK = 0x400
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CMSG_CLOEXEC = 0x40000
- MSG_COMPAT = 0x8000
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_NBIO = 0x4000
- MSG_NOSIGNAL = 0x20000
- MSG_NOTIFICATION = 0x2000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x2
- MS_SYNC = 0x0
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_IFLISTL = 0x5
- NET_RT_IFMALIST = 0x4
- NET_RT_MAXID = 0x6
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x100000
- O_CREAT = 0x200
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x20000
- O_EXCL = 0x800
- O_EXEC = 0x40000
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_TTY_INIT = 0x80000
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_AS = 0xa
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_FMASK = 0x1004d808
- RTF_GATEWAY = 0x2
- RTF_GWFLAG_COMPAT = 0x80000000
- RTF_HOST = 0x4
- RTF_LLDATA = 0x400
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_REJECT = 0x8
- RTF_RNH_LOCKED = 0x40000000
- RTF_STATIC = 0x800
- RTF_STICKY = 0x10000000
- RTF_UP = 0x1
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_IEEE80211 = 0x12
- RTM_IFANNOUNCE = 0x11
- RTM_IFINFO = 0xe
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RTV_WEIGHT = 0x100
- RT_CACHING_CONTEXT = 0x1
- RT_DEFAULT_FIB = 0x0
- RT_NORTREF = 0x2
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_BINTIME = 0x4
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCADDRT = 0x8040720a
- SIOCAIFADDR = 0x8040691a
- SIOCAIFGROUP = 0x80286987
- SIOCALIFADDR = 0x8118691b
- SIOCATMARK = 0x40047307
- SIOCDELMULTI = 0x80206932
- SIOCDELRT = 0x8040720b
- SIOCDIFADDR = 0x80206919
- SIOCDIFGROUP = 0x80286989
- SIOCDIFPHYADDR = 0x80206949
- SIOCDLIFADDR = 0x8118691d
- SIOCGDRVSPEC = 0xc028697b
- SIOCGETSGCNT = 0xc0207210
- SIOCGETVIFCNT = 0xc028720f
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020691f
- SIOCGIFCONF = 0xc0106924
- SIOCGIFDESCR = 0xc020692a
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFIB = 0xc020695c
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFGMEMB = 0xc028698a
- SIOCGIFGROUP = 0xc0286988
- SIOCGIFINDEX = 0xc0206920
- SIOCGIFMAC = 0xc0206926
- SIOCGIFMEDIA = 0xc0306938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206948
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc0206947
- SIOCGIFSTATUS = 0xc331693b
- SIOCGLIFADDR = 0xc118691c
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGPRIVATE_0 = 0xc0206950
- SIOCGPRIVATE_1 = 0xc0206951
- SIOCIFCREATE = 0xc020697a
- SIOCIFCREATE2 = 0xc020697c
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106978
- SIOCSDRVSPEC = 0x8028697b
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020691e
- SIOCSIFDESCR = 0x80206929
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFIB = 0x8020695d
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206927
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNAME = 0x80206928
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSIFPHYS = 0x80206936
- SIOCSIFRVNET = 0xc020695b
- SIOCSIFVNET = 0xc020695a
- SIOCSLIFPHYADDR = 0x8118694a
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_CLOEXEC = 0x10000000
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_NONBLOCK = 0x20000000
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ACCEPTFILTER = 0x1000
- SO_BINTIME = 0x2000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1009
- SO_LINGER = 0x80
- SO_LISTENINCQLEN = 0x1013
- SO_LISTENQLEN = 0x1012
- SO_LISTENQLIMIT = 0x1011
- SO_NOSIGPIPE = 0x800
- SO_NO_DDP = 0x8000
- SO_NO_OFFLOAD = 0x4000
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1010
- SO_PROTOCOL = 0x1016
- SO_PROTOTYPE = 0x1016
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_SETFIB = 0x1014
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- SO_USER_COOKIE = 0x1015
- SO_VENDOR = 0x80000000
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CA_NAME_MAX = 0x10
- TCP_CONGESTION = 0x40
- TCP_INFO = 0x20
- TCP_KEEPCNT = 0x400
- TCP_KEEPIDLE = 0x100
- TCP_KEEPINIT = 0x80
- TCP_KEEPINTVL = 0x200
- TCP_MAXBURST = 0x4
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x4
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x10
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x218
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_VENDOR = 0x80000000
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGPTN = 0x4004740f
- TIOCGSID = 0x40047463
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DCD = 0x40
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTMASTER = 0x2000741c
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2004745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40107459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VERASE2 = 0x7
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x4
- WCOREFLAG = 0x80
- WEXITED = 0x10
- WLINUXCLONE = 0x80000000
- WNOHANG = 0x1
- WNOWAIT = 0x8
- WSTOPPED = 0x2
- WTRAPPED = 0x20
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x30)
- EADDRNOTAVAIL = Errno(0x31)
- EAFNOSUPPORT = Errno(0x2f)
- EAGAIN = Errno(0x23)
- EALREADY = Errno(0x25)
- EAUTH = Errno(0x50)
- EBADF = Errno(0x9)
- EBADMSG = Errno(0x59)
- EBADRPC = Errno(0x48)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x55)
- ECAPMODE = Errno(0x5e)
- ECHILD = Errno(0xa)
- ECONNABORTED = Errno(0x35)
- ECONNREFUSED = Errno(0x3d)
- ECONNRESET = Errno(0x36)
- EDEADLK = Errno(0xb)
- EDESTADDRREQ = Errno(0x27)
- EDOM = Errno(0x21)
- EDOOFUS = Errno(0x58)
- EDQUOT = Errno(0x45)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EFTYPE = Errno(0x4f)
- EHOSTDOWN = Errno(0x40)
- EHOSTUNREACH = Errno(0x41)
- EIDRM = Errno(0x52)
- EILSEQ = Errno(0x56)
- EINPROGRESS = Errno(0x24)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EISCONN = Errno(0x38)
- EISDIR = Errno(0x15)
- ELAST = Errno(0x60)
- ELOOP = Errno(0x3e)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x28)
- EMULTIHOP = Errno(0x5a)
- ENAMETOOLONG = Errno(0x3f)
- ENEEDAUTH = Errno(0x51)
- ENETDOWN = Errno(0x32)
- ENETRESET = Errno(0x34)
- ENETUNREACH = Errno(0x33)
- ENFILE = Errno(0x17)
- ENOATTR = Errno(0x57)
- ENOBUFS = Errno(0x37)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOLCK = Errno(0x4d)
- ENOLINK = Errno(0x5b)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x53)
- ENOPROTOOPT = Errno(0x2a)
- ENOSPC = Errno(0x1c)
- ENOSYS = Errno(0x4e)
- ENOTBLK = Errno(0xf)
- ENOTCAPABLE = Errno(0x5d)
- ENOTCONN = Errno(0x39)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x42)
- ENOTRECOVERABLE = Errno(0x5f)
- ENOTSOCK = Errno(0x26)
- ENOTSUP = Errno(0x2d)
- ENOTTY = Errno(0x19)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x2d)
- EOVERFLOW = Errno(0x54)
- EOWNERDEAD = Errno(0x60)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x2e)
- EPIPE = Errno(0x20)
- EPROCLIM = Errno(0x43)
- EPROCUNAVAIL = Errno(0x4c)
- EPROGMISMATCH = Errno(0x4b)
- EPROGUNAVAIL = Errno(0x4a)
- EPROTO = Errno(0x5c)
- EPROTONOSUPPORT = Errno(0x2b)
- EPROTOTYPE = Errno(0x29)
- ERANGE = Errno(0x22)
- EREMOTE = Errno(0x47)
- EROFS = Errno(0x1e)
- ERPCMISMATCH = Errno(0x49)
- ESHUTDOWN = Errno(0x3a)
- ESOCKTNOSUPPORT = Errno(0x2c)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESTALE = Errno(0x46)
- ETIMEDOUT = Errno(0x3c)
- ETOOMANYREFS = Errno(0x3b)
- ETXTBSY = Errno(0x1a)
- EUSERS = Errno(0x44)
- EWOULDBLOCK = Errno(0x23)
- EXDEV = Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0xa)
- SIGCHLD = Signal(0x14)
- SIGCONT = Signal(0x13)
- SIGEMT = Signal(0x7)
- SIGFPE = Signal(0x8)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINFO = Signal(0x1d)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x17)
- SIGIOT = Signal(0x6)
- SIGKILL = Signal(0x9)
- SIGLIBRT = Signal(0x21)
- SIGLWP = Signal(0x20)
- SIGPIPE = Signal(0xd)
- SIGPROF = Signal(0x1b)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTOP = Signal(0x11)
- SIGSYS = Signal(0xc)
- SIGTERM = Signal(0xf)
- SIGTHR = Signal(0x20)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x12)
- SIGTTIN = Signal(0x15)
- SIGTTOU = Signal(0x16)
- SIGURG = Signal(0x10)
- SIGUSR1 = Signal(0x1e)
- SIGUSR2 = Signal(0x1f)
- SIGVTALRM = Signal(0x1a)
- SIGWINCH = Signal(0x1c)
- SIGXCPU = Signal(0x18)
- SIGXFSZ = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "operation timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "identifier removed",
- 83: "no message of desired type",
- 84: "value too large to be stored in data type",
- 85: "operation canceled",
- 86: "illegal byte sequence",
- 87: "attribute not found",
- 88: "programming error",
- 89: "bad message",
- 90: "multihop attempted",
- 91: "link has been severed",
- 92: "protocol error",
- 93: "capabilities insufficient",
- 94: "not permitted in capability mode",
- 95: "state not recoverable",
- 96: "previous owner died",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "suspended (signal)",
- 18: "suspended",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "unknown signal",
- 33: "unknown signal",
-}
diff --git a/src/pkg/syscall/zerrors_freebsd_arm.go b/src/pkg/syscall/zerrors_freebsd_arm.go
deleted file mode 100644
index f29dd057b..000000000
--- a/src/pkg/syscall/zerrors_freebsd_arm.go
+++ /dev/null
@@ -1,1715 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-package syscall
-
-const (
- AF_APPLETALK = 0x10
- AF_ARP = 0x23
- AF_ATM = 0x1e
- AF_BLUETOOTH = 0x24
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1c
- AF_INET6_SDP = 0x2a
- AF_INET_SDP = 0x28
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x2a
- AF_NATM = 0x1d
- AF_NETBIOS = 0x6
- AF_NETGRAPH = 0x20
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x11
- AF_SCLUSTER = 0x22
- AF_SIP = 0x18
- AF_SLOW = 0x21
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VENDOR00 = 0x27
- AF_VENDOR01 = 0x29
- AF_VENDOR02 = 0x2b
- AF_VENDOR03 = 0x2d
- AF_VENDOR04 = 0x2f
- AF_VENDOR05 = 0x31
- AF_VENDOR06 = 0x33
- AF_VENDOR07 = 0x35
- AF_VENDOR08 = 0x37
- AF_VENDOR09 = 0x39
- AF_VENDOR10 = 0x3b
- AF_VENDOR11 = 0x3d
- AF_VENDOR12 = 0x3f
- AF_VENDOR13 = 0x41
- AF_VENDOR14 = 0x43
- AF_VENDOR15 = 0x45
- AF_VENDOR16 = 0x47
- AF_VENDOR17 = 0x49
- AF_VENDOR18 = 0x4b
- AF_VENDOR19 = 0x4d
- AF_VENDOR20 = 0x4f
- AF_VENDOR21 = 0x51
- AF_VENDOR22 = 0x53
- AF_VENDOR23 = 0x55
- AF_VENDOR24 = 0x57
- AF_VENDOR25 = 0x59
- AF_VENDOR26 = 0x5b
- AF_VENDOR27 = 0x5d
- AF_VENDOR28 = 0x5f
- AF_VENDOR29 = 0x61
- AF_VENDOR30 = 0x63
- AF_VENDOR31 = 0x65
- AF_VENDOR32 = 0x67
- AF_VENDOR33 = 0x69
- AF_VENDOR34 = 0x6b
- AF_VENDOR35 = 0x6d
- AF_VENDOR36 = 0x6f
- AF_VENDOR37 = 0x71
- AF_VENDOR38 = 0x73
- AF_VENDOR39 = 0x75
- AF_VENDOR40 = 0x77
- AF_VENDOR41 = 0x79
- AF_VENDOR42 = 0x7b
- AF_VENDOR43 = 0x7d
- AF_VENDOR44 = 0x7f
- AF_VENDOR45 = 0x81
- AF_VENDOR46 = 0x83
- AF_VENDOR47 = 0x85
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B460800 = 0x70800
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B921600 = 0xe1000
- B9600 = 0x2580
- BIOCFEEDBACK = 0x8004427c
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDIRECTION = 0x40044276
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc0084279
- BIOCGETBUFMODE = 0x4004427d
- BIOCGETIF = 0x4020426b
- BIOCGETZMAX = 0x4004427f
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4010426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCGTSTAMP = 0x40044283
- BIOCIMMEDIATE = 0x80044270
- BIOCLOCK = 0x2000427a
- BIOCPROMISC = 0x20004269
- BIOCROTZBUF = 0x400c4280
- BIOCSBLEN = 0xc0044266
- BIOCSDIRECTION = 0x80044277
- BIOCSDLT = 0x80044278
- BIOCSETBUFMODE = 0x8004427e
- BIOCSETF = 0x80084267
- BIOCSETFNR = 0x80084282
- BIOCSETIF = 0x8020426c
- BIOCSETWF = 0x8008427b
- BIOCSETZBUF = 0x800c4281
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8010426d
- BIOCSSEESENT = 0x80044277
- BIOCSTSTAMP = 0x80044284
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_BUFMODE_BUFFER = 0x1
- BPF_BUFMODE_ZBUF = 0x2
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_T_BINTIME = 0x2
- BPF_T_BINTIME_FAST = 0x102
- BPF_T_BINTIME_MONOTONIC = 0x202
- BPF_T_BINTIME_MONOTONIC_FAST = 0x302
- BPF_T_FAST = 0x100
- BPF_T_FLAG_MASK = 0x300
- BPF_T_FORMAT_MASK = 0x3
- BPF_T_MICROTIME = 0x0
- BPF_T_MICROTIME_FAST = 0x100
- BPF_T_MICROTIME_MONOTONIC = 0x200
- BPF_T_MICROTIME_MONOTONIC_FAST = 0x300
- BPF_T_MONOTONIC = 0x200
- BPF_T_MONOTONIC_FAST = 0x300
- BPF_T_NANOTIME = 0x1
- BPF_T_NANOTIME_FAST = 0x101
- BPF_T_NANOTIME_MONOTONIC = 0x201
- BPF_T_NANOTIME_MONOTONIC_FAST = 0x301
- BPF_T_NONE = 0x3
- BPF_T_NORMAL = 0x0
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0x18
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DBUS = 0xe7
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_DVB_CI = 0xeb
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NOFCS = 0xe6
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPOIB = 0xf2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_ATM_CEMIC = 0xee
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FIBRECHANNEL = 0xea
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_SRX_E2E = 0xe9
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_JUNIPER_VS = 0xe8
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_PPP_WITHDIRECTION = 0xa6
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0xf6
- DLT_MATCHING_MIN = 0x68
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPEG_2_TS = 0xf3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_MUX27010 = 0xec
- DLT_NETANALYZER = 0xf0
- DLT_NETANALYZER_TRANSPARENT = 0xf1
- DLT_NFC_LLCP = 0xf5
- DLT_NFLOG = 0xef
- DLT_NG40 = 0xf4
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x79
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PPP_WITH_DIRECTION = 0xa6
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_STANAG_5066_D_PDU = 0xed
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_USER0 = 0x93
- DLT_USER1 = 0x94
- DLT_USER10 = 0x9d
- DLT_USER11 = 0x9e
- DLT_USER12 = 0x9f
- DLT_USER13 = 0xa0
- DLT_USER14 = 0xa1
- DLT_USER15 = 0xa2
- DLT_USER2 = 0x95
- DLT_USER3 = 0x96
- DLT_USER4 = 0x97
- DLT_USER5 = 0x98
- DLT_USER6 = 0x99
- DLT_USER7 = 0x9a
- DLT_USER8 = 0x9b
- DLT_USER9 = 0x9c
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_FS = -0x9
- EVFILT_LIO = -0xa
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xb
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xb
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_DROP = 0x1000
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_CANCEL = 0x5
- F_DUP2FD = 0xa
- F_DUP2FD_CLOEXEC = 0x12
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x11
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0xb
- F_GETOWN = 0x5
- F_OGETLK = 0x7
- F_OK = 0x0
- F_OSETLK = 0x8
- F_OSETLKW = 0x9
- F_RDAHEAD = 0x10
- F_RDLCK = 0x1
- F_READAHEAD = 0xf
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0xc
- F_SETLKW = 0xd
- F_SETLK_REMOTE = 0xe
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_UNLCKSYS = 0x4
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x218f72
- IFF_CANTCONFIG = 0x10000
- IFF_DEBUG = 0x4
- IFF_DRV_OACTIVE = 0x400
- IFF_DRV_RUNNING = 0x40
- IFF_DYING = 0x200000
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MONITOR = 0x40000
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PPROMISC = 0x20000
- IFF_PROMISC = 0x100
- IFF_RENAMING = 0x400000
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_SMART = 0x20
- IFF_STATICARP = 0x80000
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf8
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_IPXIP = 0xf9
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf6
- IFT_PFSYNC = 0xf7
- IFT_PLC = 0xae
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xd7
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VOICEEM = 0x64
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IN_RFC3021_MASK = 0xfffffffe
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CARP = 0x70
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0x102
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MH = 0x87
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MOBILE = 0x37
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OLD_DIVERT = 0xfe
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEND = 0x103
- IPPROTO_SEP = 0x21
- IPPROTO_SKIP = 0x39
- IPPROTO_SPACER = 0x7fff
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TLSP = 0x38
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_BINDANY = 0x40
- IPV6_BINDV6ONLY = 0x1b
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MSFILTER = 0x4a
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_PREFER_TEMPADDR = 0x3f
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BINDANY = 0x18
- IP_BLOCK_SOURCE = 0x48
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DONTFRAG = 0x43
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET3 = 0x31
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW3 = 0x30
- IP_FW_ADD = 0x32
- IP_FW_DEL = 0x33
- IP_FW_FLUSH = 0x34
- IP_FW_GET = 0x36
- IP_FW_NAT_CFG = 0x38
- IP_FW_NAT_DEL = 0x39
- IP_FW_NAT_GET_CONFIG = 0x3a
- IP_FW_NAT_GET_LOG = 0x3b
- IP_FW_RESETLOG = 0x37
- IP_FW_TABLE_ADD = 0x28
- IP_FW_TABLE_DEL = 0x29
- IP_FW_TABLE_FLUSH = 0x2a
- IP_FW_TABLE_GETSIZE = 0x2b
- IP_FW_TABLE_LIST = 0x2c
- IP_FW_ZERO = 0x35
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MAX_SOURCE_FILTER = 0x400
- IP_MF = 0x2000
- IP_MINTTL = 0x42
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_OFFMASK = 0x1fff
- IP_ONESBCAST = 0x17
- IP_OPTIONS = 0x1
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVTOS = 0x44
- IP_RECVTTL = 0x41
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_SENDSRCADDR = 0x7
- IP_TOS = 0x3
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_AUTOSYNC = 0x7
- MADV_CORE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_NOCORE = 0x8
- MADV_NORMAL = 0x0
- MADV_NOSYNC = 0x6
- MADV_PROTECT = 0xa
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MAP_ALIGNED_SUPER = 0x1000000
- MAP_ALIGNMENT_MASK = -0x1000000
- MAP_ALIGNMENT_SHIFT = 0x18
- MAP_ANON = 0x1000
- MAP_ANONYMOUS = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_NOCORE = 0x20000
- MAP_NORESERVE = 0x40
- MAP_NOSYNC = 0x800
- MAP_PREFAULT_READ = 0x40000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_RESERVED0100 = 0x100
- MAP_SHARED = 0x1
- MAP_STACK = 0x400
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CMSG_CLOEXEC = 0x40000
- MSG_COMPAT = 0x8000
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_NBIO = 0x4000
- MSG_NOSIGNAL = 0x20000
- MSG_NOTIFICATION = 0x2000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x2
- MS_SYNC = 0x0
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_IFLISTL = 0x5
- NET_RT_IFMALIST = 0x4
- NET_RT_MAXID = 0x6
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x100000
- O_CREAT = 0x200
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x20000
- O_EXCL = 0x800
- O_EXEC = 0x40000
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_TTY_INIT = 0x80000
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_AS = 0xa
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_FMASK = 0x1004d808
- RTF_GATEWAY = 0x2
- RTF_GWFLAG_COMPAT = 0x80000000
- RTF_HOST = 0x4
- RTF_LLDATA = 0x400
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_REJECT = 0x8
- RTF_RNH_LOCKED = 0x40000000
- RTF_STATIC = 0x800
- RTF_STICKY = 0x10000000
- RTF_UP = 0x1
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_IEEE80211 = 0x12
- RTM_IFANNOUNCE = 0x11
- RTM_IFINFO = 0xe
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RTV_WEIGHT = 0x100
- RT_CACHING_CONTEXT = 0x1
- RT_DEFAULT_FIB = 0x0
- RT_NORTREF = 0x2
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_BINTIME = 0x4
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCADDRT = 0x8030720a
- SIOCAIFADDR = 0x8040691a
- SIOCAIFGROUP = 0x80246987
- SIOCALIFADDR = 0x8118691b
- SIOCATMARK = 0x40047307
- SIOCDELMULTI = 0x80206932
- SIOCDELRT = 0x8030720b
- SIOCDIFADDR = 0x80206919
- SIOCDIFGROUP = 0x80246989
- SIOCDIFPHYADDR = 0x80206949
- SIOCDLIFADDR = 0x8118691d
- SIOCGDRVSPEC = 0xc01c697b
- SIOCGETSGCNT = 0xc0147210
- SIOCGETVIFCNT = 0xc014720f
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020691f
- SIOCGIFCONF = 0xc0086924
- SIOCGIFDESCR = 0xc020692a
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFIB = 0xc020695c
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFGMEMB = 0xc024698a
- SIOCGIFGROUP = 0xc0246988
- SIOCGIFINDEX = 0xc0206920
- SIOCGIFMAC = 0xc0206926
- SIOCGIFMEDIA = 0xc0286938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206948
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc0206947
- SIOCGIFSTATUS = 0xc331693b
- SIOCGLIFADDR = 0xc118691c
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGPRIVATE_0 = 0xc0206950
- SIOCGPRIVATE_1 = 0xc0206951
- SIOCIFCREATE = 0xc020697a
- SIOCIFCREATE2 = 0xc020697c
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc00c6978
- SIOCSDRVSPEC = 0x801c697b
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020691e
- SIOCSIFDESCR = 0x80206929
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFIB = 0x8020695d
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206927
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNAME = 0x80206928
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSIFPHYS = 0x80206936
- SIOCSIFRVNET = 0xc020695b
- SIOCSIFVNET = 0xc020695a
- SIOCSLIFPHYADDR = 0x8118694a
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_CLOEXEC = 0x10000000
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_NONBLOCK = 0x20000000
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ACCEPTFILTER = 0x1000
- SO_BINTIME = 0x2000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1009
- SO_LINGER = 0x80
- SO_LISTENINCQLEN = 0x1013
- SO_LISTENQLEN = 0x1012
- SO_LISTENQLIMIT = 0x1011
- SO_NOSIGPIPE = 0x800
- SO_NO_DDP = 0x8000
- SO_NO_OFFLOAD = 0x4000
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1010
- SO_PROTOCOL = 0x1016
- SO_PROTOTYPE = 0x1016
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_SETFIB = 0x1014
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- SO_USER_COOKIE = 0x1015
- SO_VENDOR = 0x80000000
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CA_NAME_MAX = 0x10
- TCP_CONGESTION = 0x40
- TCP_INFO = 0x20
- TCP_KEEPCNT = 0x400
- TCP_KEEPIDLE = 0x100
- TCP_KEEPINIT = 0x80
- TCP_KEEPINTVL = 0x200
- TCP_MAXBURST = 0x4
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x4
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x10
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x218
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_VENDOR = 0x80000000
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGPTN = 0x4004740f
- TIOCGSID = 0x40047463
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DCD = 0x40
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTMASTER = 0x2000741c
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2004745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40107459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VERASE2 = 0x7
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x4
- WCOREFLAG = 0x80
- WEXITED = 0x10
- WLINUXCLONE = 0x80000000
- WNOHANG = 0x1
- WNOWAIT = 0x8
- WSTOPPED = 0x2
- WTRAPPED = 0x20
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x30)
- EADDRNOTAVAIL = Errno(0x31)
- EAFNOSUPPORT = Errno(0x2f)
- EAGAIN = Errno(0x23)
- EALREADY = Errno(0x25)
- EAUTH = Errno(0x50)
- EBADF = Errno(0x9)
- EBADMSG = Errno(0x59)
- EBADRPC = Errno(0x48)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x55)
- ECAPMODE = Errno(0x5e)
- ECHILD = Errno(0xa)
- ECONNABORTED = Errno(0x35)
- ECONNREFUSED = Errno(0x3d)
- ECONNRESET = Errno(0x36)
- EDEADLK = Errno(0xb)
- EDESTADDRREQ = Errno(0x27)
- EDOM = Errno(0x21)
- EDOOFUS = Errno(0x58)
- EDQUOT = Errno(0x45)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EFTYPE = Errno(0x4f)
- EHOSTDOWN = Errno(0x40)
- EHOSTUNREACH = Errno(0x41)
- EIDRM = Errno(0x52)
- EILSEQ = Errno(0x56)
- EINPROGRESS = Errno(0x24)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EISCONN = Errno(0x38)
- EISDIR = Errno(0x15)
- ELAST = Errno(0x60)
- ELOOP = Errno(0x3e)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x28)
- EMULTIHOP = Errno(0x5a)
- ENAMETOOLONG = Errno(0x3f)
- ENEEDAUTH = Errno(0x51)
- ENETDOWN = Errno(0x32)
- ENETRESET = Errno(0x34)
- ENETUNREACH = Errno(0x33)
- ENFILE = Errno(0x17)
- ENOATTR = Errno(0x57)
- ENOBUFS = Errno(0x37)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOLCK = Errno(0x4d)
- ENOLINK = Errno(0x5b)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x53)
- ENOPROTOOPT = Errno(0x2a)
- ENOSPC = Errno(0x1c)
- ENOSYS = Errno(0x4e)
- ENOTBLK = Errno(0xf)
- ENOTCAPABLE = Errno(0x5d)
- ENOTCONN = Errno(0x39)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x42)
- ENOTRECOVERABLE = Errno(0x5f)
- ENOTSOCK = Errno(0x26)
- ENOTSUP = Errno(0x2d)
- ENOTTY = Errno(0x19)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x2d)
- EOVERFLOW = Errno(0x54)
- EOWNERDEAD = Errno(0x60)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x2e)
- EPIPE = Errno(0x20)
- EPROCLIM = Errno(0x43)
- EPROCUNAVAIL = Errno(0x4c)
- EPROGMISMATCH = Errno(0x4b)
- EPROGUNAVAIL = Errno(0x4a)
- EPROTO = Errno(0x5c)
- EPROTONOSUPPORT = Errno(0x2b)
- EPROTOTYPE = Errno(0x29)
- ERANGE = Errno(0x22)
- EREMOTE = Errno(0x47)
- EROFS = Errno(0x1e)
- ERPCMISMATCH = Errno(0x49)
- ESHUTDOWN = Errno(0x3a)
- ESOCKTNOSUPPORT = Errno(0x2c)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESTALE = Errno(0x46)
- ETIMEDOUT = Errno(0x3c)
- ETOOMANYREFS = Errno(0x3b)
- ETXTBSY = Errno(0x1a)
- EUSERS = Errno(0x44)
- EWOULDBLOCK = Errno(0x23)
- EXDEV = Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0xa)
- SIGCHLD = Signal(0x14)
- SIGCONT = Signal(0x13)
- SIGEMT = Signal(0x7)
- SIGFPE = Signal(0x8)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINFO = Signal(0x1d)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x17)
- SIGIOT = Signal(0x6)
- SIGKILL = Signal(0x9)
- SIGLIBRT = Signal(0x21)
- SIGLWP = Signal(0x20)
- SIGPIPE = Signal(0xd)
- SIGPROF = Signal(0x1b)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTOP = Signal(0x11)
- SIGSYS = Signal(0xc)
- SIGTERM = Signal(0xf)
- SIGTHR = Signal(0x20)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x12)
- SIGTTIN = Signal(0x15)
- SIGTTOU = Signal(0x16)
- SIGURG = Signal(0x10)
- SIGUSR1 = Signal(0x1e)
- SIGUSR2 = Signal(0x1f)
- SIGVTALRM = Signal(0x1a)
- SIGWINCH = Signal(0x1c)
- SIGXCPU = Signal(0x18)
- SIGXFSZ = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "operation timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "identifier removed",
- 83: "no message of desired type",
- 84: "value too large to be stored in data type",
- 85: "operation canceled",
- 86: "illegal byte sequence",
- 87: "attribute not found",
- 88: "programming error",
- 89: "bad message",
- 90: "multihop attempted",
- 91: "link has been severed",
- 92: "protocol error",
- 93: "capabilities insufficient",
- 94: "not permitted in capability mode",
- 95: "state not recoverable",
- 96: "previous owner died",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "suspended (signal)",
- 18: "suspended",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "unknown signal",
- 33: "unknown signal",
-}
diff --git a/src/pkg/syscall/zerrors_linux_386.go b/src/pkg/syscall/zerrors_linux_386.go
deleted file mode 100644
index 7aa8ff07a..000000000
--- a/src/pkg/syscall/zerrors_linux_386.go
+++ /dev/null
@@ -1,1544 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package syscall
-
-const (
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x27
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_PHY = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_X25 = 0x10f
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- EPOLLERR = 0x8
- EPOLLET = -0x80000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EPOLL_NONBLOCK = 0x800
- ETH_P_1588 = 0x88f7
- ETH_P_8021Q = 0x8100
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_AARP = 0x80f3
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0xc
- F_GETLK64 = 0xc
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0xd
- F_SETLK64 = 0xd
- F_SETLKW = 0xe
- F_SETLKW64 = 0xe
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- ICMPV6_FILTER = 0x1
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_NODAD = 0x2
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0x7
- IFF_ALLMULTI = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DYNAMIC = 0x8000
- IFF_LOOPBACK = 0x8
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFNAMSIZ = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IPPROTO_AH = 0x33
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_CHECKSUM = 0x7
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_UNICAST_HOPS = 0x10
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BLOCK_SOURCE = 0x26
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_XFRM_POLICY = 0x11
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DOFORK = 0xb
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MAP_32BIT = 0x40
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_STACK = 0x20000
- MAP_TYPE = 0xf
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- NAME_MAX = 0xff
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CONNECTOR = 0xb
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_ROUTE = 0x0
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x4000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x8000
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x800
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_BROADCAST = 0x1
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FASTROUTE = 0x6
- PACKET_HOST = 0x0
- PACKET_LOOPBACK = 0x5
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MULTICAST = 0x2
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_KEEPCAPS = 0x8
- PR_SET_NAME = 0xf
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETFPXREGS = 0x12
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_KILL = 0x8
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_MASK = 0x7f
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETFPXREGS = 0x13
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SINGLEBLOCK = 0x21
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSEMU = 0x1f
- PTRACE_SYSEMU_SINGLESTEP = 0x20
- PTRACE_TRACEME = 0x0
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x7
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x1
- RTAX_ADVMSS = 0x8
- RTAX_CWND = 0x7
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0xe
- RTAX_MTU = 0x2
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x10
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELLINK = 0x11
- RTM_DELNEIGH = 0x1d
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x4f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWLINK = 0x10
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x10
- RTM_NR_MSGTYPES = 0x40
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_F_DEAD = 0x1
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTN_MAX = 0xb
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_GATED = 0x8
- RTPROT_KERNEL = 0x2
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPNS = 0x23
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCGARP = 0x8954
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGPGRP = 0x8904
- SIOCGRARP = 0x8961
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ATM = 0x108
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_PACKET = 0x107
- SOL_RAW = 0xff
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_X25 = 0x106
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_FILTER = 0x1a
- SO_BINDTODEVICE = 0x19
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_DEBUG = 0x1
- SO_DETACH_FILTER = 0x1b
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_ERROR = 0x4
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_MARK = 0x24
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEERCRED = 0x11
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_REUSEADDR = 0x2
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TYPE = 0x3
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TCIFLUSH = 0x0
- TCIOFLUSH = 0x2
- TCOFLUSH = 0x1
- TCP_CONGESTION = 0xd
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_INFO = 0xb
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_QUICKACK = 0xc
- TCP_SYNCNT = 0x7
- TCP_WINDOW_CLAMP = 0xa
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGICOUNT = 0x545d
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPTN = 0x80045430
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TUNATTACHFILTER = 0x400854d5
- TUNDETACHFILTER = 0x400854d6
- TUNGETFEATURES = 0x800454cf
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETHDRSZ = 0x800454d7
- TUNSETDEBUG = 0x400454c9
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETSNDBUF = 0x400454d4
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETHDRSZ = 0x400454d8
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x20
- WSTOPPED = 0x2
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x62)
- EADDRNOTAVAIL = Errno(0x63)
- EADV = Errno(0x44)
- EAFNOSUPPORT = Errno(0x61)
- EAGAIN = Errno(0xb)
- EALREADY = Errno(0x72)
- EBADE = Errno(0x34)
- EBADF = Errno(0x9)
- EBADFD = Errno(0x4d)
- EBADMSG = Errno(0x4a)
- EBADR = Errno(0x35)
- EBADRQC = Errno(0x38)
- EBADSLT = Errno(0x39)
- EBFONT = Errno(0x3b)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x7d)
- ECHILD = Errno(0xa)
- ECHRNG = Errno(0x2c)
- ECOMM = Errno(0x46)
- ECONNABORTED = Errno(0x67)
- ECONNREFUSED = Errno(0x6f)
- ECONNRESET = Errno(0x68)
- EDEADLK = Errno(0x23)
- EDEADLOCK = Errno(0x23)
- EDESTADDRREQ = Errno(0x59)
- EDOM = Errno(0x21)
- EDOTDOT = Errno(0x49)
- EDQUOT = Errno(0x7a)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EHOSTDOWN = Errno(0x70)
- EHOSTUNREACH = Errno(0x71)
- EIDRM = Errno(0x2b)
- EILSEQ = Errno(0x54)
- EINPROGRESS = Errno(0x73)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EISCONN = Errno(0x6a)
- EISDIR = Errno(0x15)
- EISNAM = Errno(0x78)
- EKEYEXPIRED = Errno(0x7f)
- EKEYREJECTED = Errno(0x81)
- EKEYREVOKED = Errno(0x80)
- EL2HLT = Errno(0x33)
- EL2NSYNC = Errno(0x2d)
- EL3HLT = Errno(0x2e)
- EL3RST = Errno(0x2f)
- ELIBACC = Errno(0x4f)
- ELIBBAD = Errno(0x50)
- ELIBEXEC = Errno(0x53)
- ELIBMAX = Errno(0x52)
- ELIBSCN = Errno(0x51)
- ELNRNG = Errno(0x30)
- ELOOP = Errno(0x28)
- EMEDIUMTYPE = Errno(0x7c)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x5a)
- EMULTIHOP = Errno(0x48)
- ENAMETOOLONG = Errno(0x24)
- ENAVAIL = Errno(0x77)
- ENETDOWN = Errno(0x64)
- ENETRESET = Errno(0x66)
- ENETUNREACH = Errno(0x65)
- ENFILE = Errno(0x17)
- ENOANO = Errno(0x37)
- ENOBUFS = Errno(0x69)
- ENOCSI = Errno(0x32)
- ENODATA = Errno(0x3d)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOKEY = Errno(0x7e)
- ENOLCK = Errno(0x25)
- ENOLINK = Errno(0x43)
- ENOMEDIUM = Errno(0x7b)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x2a)
- ENONET = Errno(0x40)
- ENOPKG = Errno(0x41)
- ENOPROTOOPT = Errno(0x5c)
- ENOSPC = Errno(0x1c)
- ENOSR = Errno(0x3f)
- ENOSTR = Errno(0x3c)
- ENOSYS = Errno(0x26)
- ENOTBLK = Errno(0xf)
- ENOTCONN = Errno(0x6b)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x27)
- ENOTNAM = Errno(0x76)
- ENOTRECOVERABLE = Errno(0x83)
- ENOTSOCK = Errno(0x58)
- ENOTSUP = Errno(0x5f)
- ENOTTY = Errno(0x19)
- ENOTUNIQ = Errno(0x4c)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x5f)
- EOVERFLOW = Errno(0x4b)
- EOWNERDEAD = Errno(0x82)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x60)
- EPIPE = Errno(0x20)
- EPROTO = Errno(0x47)
- EPROTONOSUPPORT = Errno(0x5d)
- EPROTOTYPE = Errno(0x5b)
- ERANGE = Errno(0x22)
- EREMCHG = Errno(0x4e)
- EREMOTE = Errno(0x42)
- EREMOTEIO = Errno(0x79)
- ERESTART = Errno(0x55)
- ERFKILL = Errno(0x84)
- EROFS = Errno(0x1e)
- ESHUTDOWN = Errno(0x6c)
- ESOCKTNOSUPPORT = Errno(0x5e)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESRMNT = Errno(0x45)
- ESTALE = Errno(0x74)
- ESTRPIPE = Errno(0x56)
- ETIME = Errno(0x3e)
- ETIMEDOUT = Errno(0x6e)
- ETOOMANYREFS = Errno(0x6d)
- ETXTBSY = Errno(0x1a)
- EUCLEAN = Errno(0x75)
- EUNATCH = Errno(0x31)
- EUSERS = Errno(0x57)
- EWOULDBLOCK = Errno(0xb)
- EXDEV = Errno(0x12)
- EXFULL = Errno(0x36)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0x7)
- SIGCHLD = Signal(0x11)
- SIGCLD = Signal(0x11)
- SIGCONT = Signal(0x12)
- SIGFPE = Signal(0x8)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x1d)
- SIGIOT = Signal(0x6)
- SIGKILL = Signal(0x9)
- SIGPIPE = Signal(0xd)
- SIGPOLL = Signal(0x1d)
- SIGPROF = Signal(0x1b)
- SIGPWR = Signal(0x1e)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTKFLT = Signal(0x10)
- SIGSTOP = Signal(0x13)
- SIGSYS = Signal(0x1f)
- SIGTERM = Signal(0xf)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x14)
- SIGTTIN = Signal(0x15)
- SIGTTOU = Signal(0x16)
- SIGUNUSED = Signal(0x1f)
- SIGURG = Signal(0x17)
- SIGUSR1 = Signal(0xa)
- SIGUSR2 = Signal(0xc)
- SIGVTALRM = Signal(0x1a)
- SIGWINCH = Signal(0x1c)
- SIGXCPU = Signal(0x18)
- SIGXFSZ = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "no such device or address",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource temporarily unavailable",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device or resource busy",
- 17: "file exists",
- 18: "invalid cross-device link",
- 19: "no such device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "numerical result out of range",
- 35: "resource deadlock avoided",
- 36: "file name too long",
- 37: "no locks available",
- 38: "function not implemented",
- 39: "directory not empty",
- 40: "too many levels of symbolic links",
- 42: "no message of desired type",
- 43: "identifier removed",
- 44: "channel number out of range",
- 45: "level 2 not synchronized",
- 46: "level 3 halted",
- 47: "level 3 reset",
- 48: "link number out of range",
- 49: "protocol driver not attached",
- 50: "no CSI structure available",
- 51: "level 2 halted",
- 52: "invalid exchange",
- 53: "invalid request descriptor",
- 54: "exchange full",
- 55: "no anode",
- 56: "invalid request code",
- 57: "invalid slot",
- 59: "bad font file format",
- 60: "device not a stream",
- 61: "no data available",
- 62: "timer expired",
- 63: "out of streams resources",
- 64: "machine is not on the network",
- 65: "package not installed",
- 66: "object is remote",
- 67: "link has been severed",
- 68: "advertise error",
- 69: "srmount error",
- 70: "communication error on send",
- 71: "protocol error",
- 72: "multihop attempted",
- 73: "RFS specific error",
- 74: "bad message",
- 75: "value too large for defined data type",
- 76: "name not unique on network",
- 77: "file descriptor in bad state",
- 78: "remote address changed",
- 79: "can not access a needed shared library",
- 80: "accessing a corrupted shared library",
- 81: ".lib section in a.out corrupted",
- 82: "attempting to link in too many shared libraries",
- 83: "cannot exec a shared library directly",
- 84: "invalid or incomplete multibyte or wide character",
- 85: "interrupted system call should be restarted",
- 86: "streams pipe error",
- 87: "too many users",
- 88: "socket operation on non-socket",
- 89: "destination address required",
- 90: "message too long",
- 91: "protocol wrong type for socket",
- 92: "protocol not available",
- 93: "protocol not supported",
- 94: "socket type not supported",
- 95: "operation not supported",
- 96: "protocol family not supported",
- 97: "address family not supported by protocol",
- 98: "address already in use",
- 99: "cannot assign requested address",
- 100: "network is down",
- 101: "network is unreachable",
- 102: "network dropped connection on reset",
- 103: "software caused connection abort",
- 104: "connection reset by peer",
- 105: "no buffer space available",
- 106: "transport endpoint is already connected",
- 107: "transport endpoint is not connected",
- 108: "cannot send after transport endpoint shutdown",
- 109: "too many references: cannot splice",
- 110: "connection timed out",
- 111: "connection refused",
- 112: "host is down",
- 113: "no route to host",
- 114: "operation already in progress",
- 115: "operation now in progress",
- 116: "stale NFS file handle",
- 117: "structure needs cleaning",
- 118: "not a XENIX named type file",
- 119: "no XENIX semaphores available",
- 120: "is a named type file",
- 121: "remote I/O error",
- 122: "disk quota exceeded",
- 123: "no medium found",
- 124: "wrong medium type",
- 125: "operation canceled",
- 126: "required key not available",
- 127: "key has expired",
- 128: "key has been revoked",
- 129: "key was rejected by service",
- 130: "owner died",
- 131: "state not recoverable",
- 132: "operation not possible due to RF-kill",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/breakpoint trap",
- 6: "aborted",
- 7: "bus error",
- 8: "floating point exception",
- 9: "killed",
- 10: "user defined signal 1",
- 11: "segmentation fault",
- 12: "user defined signal 2",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "stack fault",
- 17: "child exited",
- 18: "continued",
- 19: "stopped (signal)",
- 20: "stopped",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "urgent I/O condition",
- 24: "CPU time limit exceeded",
- 25: "file size limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window changed",
- 29: "I/O possible",
- 30: "power failure",
- 31: "bad system call",
-}
diff --git a/src/pkg/syscall/zerrors_linux_amd64.go b/src/pkg/syscall/zerrors_linux_amd64.go
deleted file mode 100644
index 94d051d8a..000000000
--- a/src/pkg/syscall/zerrors_linux_amd64.go
+++ /dev/null
@@ -1,1545 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package syscall
-
-const (
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x27
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_PHY = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_X25 = 0x10f
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- EPOLLERR = 0x8
- EPOLLET = -0x80000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EPOLL_NONBLOCK = 0x800
- ETH_P_1588 = 0x88f7
- ETH_P_8021Q = 0x8100
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_AARP = 0x80f3
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0x5
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- ICMPV6_FILTER = 0x1
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_NODAD = 0x2
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0x7
- IFF_ALLMULTI = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DYNAMIC = 0x8000
- IFF_LOOPBACK = 0x8
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFNAMSIZ = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IPPROTO_AH = 0x33
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_CHECKSUM = 0x7
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_UNICAST_HOPS = 0x10
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BLOCK_SOURCE = 0x26
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_XFRM_POLICY = 0x11
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DOFORK = 0xb
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MAP_32BIT = 0x40
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_STACK = 0x20000
- MAP_TYPE = 0xf
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- NAME_MAX = 0xff
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CONNECTOR = 0xb
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_ROUTE = 0x0
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x4000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x800
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_BROADCAST = 0x1
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FASTROUTE = 0x6
- PACKET_HOST = 0x0
- PACKET_LOOPBACK = 0x5
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MULTICAST = 0x2
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_KEEPCAPS = 0x8
- PR_SET_NAME = 0xf
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PTRACE_ARCH_PRCTL = 0x1e
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETFPXREGS = 0x12
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_KILL = 0x8
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_MASK = 0x7f
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETFPXREGS = 0x13
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SINGLEBLOCK = 0x21
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSEMU = 0x1f
- PTRACE_SYSEMU_SINGLESTEP = 0x20
- PTRACE_TRACEME = 0x0
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x7
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x1
- RTAX_ADVMSS = 0x8
- RTAX_CWND = 0x7
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0xe
- RTAX_MTU = 0x2
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x10
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELLINK = 0x11
- RTM_DELNEIGH = 0x1d
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x4f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWLINK = 0x10
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x10
- RTM_NR_MSGTYPES = 0x40
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_F_DEAD = 0x1
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTN_MAX = 0xb
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_GATED = 0x8
- RTPROT_KERNEL = 0x2
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPNS = 0x23
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCGARP = 0x8954
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGPGRP = 0x8904
- SIOCGRARP = 0x8961
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ATM = 0x108
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_PACKET = 0x107
- SOL_RAW = 0xff
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_X25 = 0x106
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_FILTER = 0x1a
- SO_BINDTODEVICE = 0x19
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_DEBUG = 0x1
- SO_DETACH_FILTER = 0x1b
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_ERROR = 0x4
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_MARK = 0x24
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEERCRED = 0x11
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_REUSEADDR = 0x2
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TYPE = 0x3
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TCIFLUSH = 0x0
- TCIOFLUSH = 0x2
- TCOFLUSH = 0x1
- TCP_CONGESTION = 0xd
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_INFO = 0xb
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_QUICKACK = 0xc
- TCP_SYNCNT = 0x7
- TCP_WINDOW_CLAMP = 0xa
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGICOUNT = 0x545d
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPTN = 0x80045430
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TUNATTACHFILTER = 0x401054d5
- TUNDETACHFILTER = 0x401054d6
- TUNGETFEATURES = 0x800454cf
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETHDRSZ = 0x800454d7
- TUNSETDEBUG = 0x400454c9
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETSNDBUF = 0x400454d4
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETHDRSZ = 0x400454d8
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x62)
- EADDRNOTAVAIL = Errno(0x63)
- EADV = Errno(0x44)
- EAFNOSUPPORT = Errno(0x61)
- EAGAIN = Errno(0xb)
- EALREADY = Errno(0x72)
- EBADE = Errno(0x34)
- EBADF = Errno(0x9)
- EBADFD = Errno(0x4d)
- EBADMSG = Errno(0x4a)
- EBADR = Errno(0x35)
- EBADRQC = Errno(0x38)
- EBADSLT = Errno(0x39)
- EBFONT = Errno(0x3b)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x7d)
- ECHILD = Errno(0xa)
- ECHRNG = Errno(0x2c)
- ECOMM = Errno(0x46)
- ECONNABORTED = Errno(0x67)
- ECONNREFUSED = Errno(0x6f)
- ECONNRESET = Errno(0x68)
- EDEADLK = Errno(0x23)
- EDEADLOCK = Errno(0x23)
- EDESTADDRREQ = Errno(0x59)
- EDOM = Errno(0x21)
- EDOTDOT = Errno(0x49)
- EDQUOT = Errno(0x7a)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EHOSTDOWN = Errno(0x70)
- EHOSTUNREACH = Errno(0x71)
- EIDRM = Errno(0x2b)
- EILSEQ = Errno(0x54)
- EINPROGRESS = Errno(0x73)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EISCONN = Errno(0x6a)
- EISDIR = Errno(0x15)
- EISNAM = Errno(0x78)
- EKEYEXPIRED = Errno(0x7f)
- EKEYREJECTED = Errno(0x81)
- EKEYREVOKED = Errno(0x80)
- EL2HLT = Errno(0x33)
- EL2NSYNC = Errno(0x2d)
- EL3HLT = Errno(0x2e)
- EL3RST = Errno(0x2f)
- ELIBACC = Errno(0x4f)
- ELIBBAD = Errno(0x50)
- ELIBEXEC = Errno(0x53)
- ELIBMAX = Errno(0x52)
- ELIBSCN = Errno(0x51)
- ELNRNG = Errno(0x30)
- ELOOP = Errno(0x28)
- EMEDIUMTYPE = Errno(0x7c)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x5a)
- EMULTIHOP = Errno(0x48)
- ENAMETOOLONG = Errno(0x24)
- ENAVAIL = Errno(0x77)
- ENETDOWN = Errno(0x64)
- ENETRESET = Errno(0x66)
- ENETUNREACH = Errno(0x65)
- ENFILE = Errno(0x17)
- ENOANO = Errno(0x37)
- ENOBUFS = Errno(0x69)
- ENOCSI = Errno(0x32)
- ENODATA = Errno(0x3d)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOKEY = Errno(0x7e)
- ENOLCK = Errno(0x25)
- ENOLINK = Errno(0x43)
- ENOMEDIUM = Errno(0x7b)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x2a)
- ENONET = Errno(0x40)
- ENOPKG = Errno(0x41)
- ENOPROTOOPT = Errno(0x5c)
- ENOSPC = Errno(0x1c)
- ENOSR = Errno(0x3f)
- ENOSTR = Errno(0x3c)
- ENOSYS = Errno(0x26)
- ENOTBLK = Errno(0xf)
- ENOTCONN = Errno(0x6b)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x27)
- ENOTNAM = Errno(0x76)
- ENOTRECOVERABLE = Errno(0x83)
- ENOTSOCK = Errno(0x58)
- ENOTSUP = Errno(0x5f)
- ENOTTY = Errno(0x19)
- ENOTUNIQ = Errno(0x4c)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x5f)
- EOVERFLOW = Errno(0x4b)
- EOWNERDEAD = Errno(0x82)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x60)
- EPIPE = Errno(0x20)
- EPROTO = Errno(0x47)
- EPROTONOSUPPORT = Errno(0x5d)
- EPROTOTYPE = Errno(0x5b)
- ERANGE = Errno(0x22)
- EREMCHG = Errno(0x4e)
- EREMOTE = Errno(0x42)
- EREMOTEIO = Errno(0x79)
- ERESTART = Errno(0x55)
- ERFKILL = Errno(0x84)
- EROFS = Errno(0x1e)
- ESHUTDOWN = Errno(0x6c)
- ESOCKTNOSUPPORT = Errno(0x5e)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESRMNT = Errno(0x45)
- ESTALE = Errno(0x74)
- ESTRPIPE = Errno(0x56)
- ETIME = Errno(0x3e)
- ETIMEDOUT = Errno(0x6e)
- ETOOMANYREFS = Errno(0x6d)
- ETXTBSY = Errno(0x1a)
- EUCLEAN = Errno(0x75)
- EUNATCH = Errno(0x31)
- EUSERS = Errno(0x57)
- EWOULDBLOCK = Errno(0xb)
- EXDEV = Errno(0x12)
- EXFULL = Errno(0x36)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0x7)
- SIGCHLD = Signal(0x11)
- SIGCLD = Signal(0x11)
- SIGCONT = Signal(0x12)
- SIGFPE = Signal(0x8)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x1d)
- SIGIOT = Signal(0x6)
- SIGKILL = Signal(0x9)
- SIGPIPE = Signal(0xd)
- SIGPOLL = Signal(0x1d)
- SIGPROF = Signal(0x1b)
- SIGPWR = Signal(0x1e)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTKFLT = Signal(0x10)
- SIGSTOP = Signal(0x13)
- SIGSYS = Signal(0x1f)
- SIGTERM = Signal(0xf)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x14)
- SIGTTIN = Signal(0x15)
- SIGTTOU = Signal(0x16)
- SIGUNUSED = Signal(0x1f)
- SIGURG = Signal(0x17)
- SIGUSR1 = Signal(0xa)
- SIGUSR2 = Signal(0xc)
- SIGVTALRM = Signal(0x1a)
- SIGWINCH = Signal(0x1c)
- SIGXCPU = Signal(0x18)
- SIGXFSZ = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "no such device or address",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource temporarily unavailable",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device or resource busy",
- 17: "file exists",
- 18: "invalid cross-device link",
- 19: "no such device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "numerical result out of range",
- 35: "resource deadlock avoided",
- 36: "file name too long",
- 37: "no locks available",
- 38: "function not implemented",
- 39: "directory not empty",
- 40: "too many levels of symbolic links",
- 42: "no message of desired type",
- 43: "identifier removed",
- 44: "channel number out of range",
- 45: "level 2 not synchronized",
- 46: "level 3 halted",
- 47: "level 3 reset",
- 48: "link number out of range",
- 49: "protocol driver not attached",
- 50: "no CSI structure available",
- 51: "level 2 halted",
- 52: "invalid exchange",
- 53: "invalid request descriptor",
- 54: "exchange full",
- 55: "no anode",
- 56: "invalid request code",
- 57: "invalid slot",
- 59: "bad font file format",
- 60: "device not a stream",
- 61: "no data available",
- 62: "timer expired",
- 63: "out of streams resources",
- 64: "machine is not on the network",
- 65: "package not installed",
- 66: "object is remote",
- 67: "link has been severed",
- 68: "advertise error",
- 69: "srmount error",
- 70: "communication error on send",
- 71: "protocol error",
- 72: "multihop attempted",
- 73: "RFS specific error",
- 74: "bad message",
- 75: "value too large for defined data type",
- 76: "name not unique on network",
- 77: "file descriptor in bad state",
- 78: "remote address changed",
- 79: "can not access a needed shared library",
- 80: "accessing a corrupted shared library",
- 81: ".lib section in a.out corrupted",
- 82: "attempting to link in too many shared libraries",
- 83: "cannot exec a shared library directly",
- 84: "invalid or incomplete multibyte or wide character",
- 85: "interrupted system call should be restarted",
- 86: "streams pipe error",
- 87: "too many users",
- 88: "socket operation on non-socket",
- 89: "destination address required",
- 90: "message too long",
- 91: "protocol wrong type for socket",
- 92: "protocol not available",
- 93: "protocol not supported",
- 94: "socket type not supported",
- 95: "operation not supported",
- 96: "protocol family not supported",
- 97: "address family not supported by protocol",
- 98: "address already in use",
- 99: "cannot assign requested address",
- 100: "network is down",
- 101: "network is unreachable",
- 102: "network dropped connection on reset",
- 103: "software caused connection abort",
- 104: "connection reset by peer",
- 105: "no buffer space available",
- 106: "transport endpoint is already connected",
- 107: "transport endpoint is not connected",
- 108: "cannot send after transport endpoint shutdown",
- 109: "too many references: cannot splice",
- 110: "connection timed out",
- 111: "connection refused",
- 112: "host is down",
- 113: "no route to host",
- 114: "operation already in progress",
- 115: "operation now in progress",
- 116: "stale NFS file handle",
- 117: "structure needs cleaning",
- 118: "not a XENIX named type file",
- 119: "no XENIX semaphores available",
- 120: "is a named type file",
- 121: "remote I/O error",
- 122: "disk quota exceeded",
- 123: "no medium found",
- 124: "wrong medium type",
- 125: "operation canceled",
- 126: "required key not available",
- 127: "key has expired",
- 128: "key has been revoked",
- 129: "key was rejected by service",
- 130: "owner died",
- 131: "state not recoverable",
- 132: "operation not possible due to RF-kill",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/breakpoint trap",
- 6: "aborted",
- 7: "bus error",
- 8: "floating point exception",
- 9: "killed",
- 10: "user defined signal 1",
- 11: "segmentation fault",
- 12: "user defined signal 2",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "stack fault",
- 17: "child exited",
- 18: "continued",
- 19: "stopped (signal)",
- 20: "stopped",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "urgent I/O condition",
- 24: "CPU time limit exceeded",
- 25: "file size limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window changed",
- 29: "I/O possible",
- 30: "power failure",
- 31: "bad system call",
-}
diff --git a/src/pkg/syscall/zerrors_linux_arm.go b/src/pkg/syscall/zerrors_linux_arm.go
deleted file mode 100644
index dcaaef742..000000000
--- a/src/pkg/syscall/zerrors_linux_arm.go
+++ /dev/null
@@ -1,1558 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-package syscall
-
-const (
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x27
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_PHY = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_X25 = 0x10f
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ELF_NGREG = 0x12
- ELF_PRARGSZ = 0x50
- EPOLLERR = 0x8
- EPOLLET = -0x80000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EPOLL_NONBLOCK = 0x800
- ETH_P_1588 = 0x88f7
- ETH_P_8021Q = 0x8100
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_AARP = 0x80f3
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0xc
- F_GETLK64 = 0xc
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0xd
- F_SETLK64 = 0xd
- F_SETLKW = 0xe
- F_SETLKW64 = 0xe
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- ICMPV6_FILTER = 0x1
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_NODAD = 0x2
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0x7
- IFF_ALLMULTI = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DYNAMIC = 0x8000
- IFF_LOOPBACK = 0x8
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFNAMSIZ = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IPPROTO_AH = 0x33
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_CHECKSUM = 0x7
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_UNICAST_HOPS = 0x10
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BLOCK_SOURCE = 0x26
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_XFRM_POLICY = 0x11
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DOFORK = 0xb
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_GROWSDOWN = 0x100
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_TYPE = 0xf
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- NAME_MAX = 0xff
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CONNECTOR = 0xb
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x4000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x1000
- O_LARGEFILE = 0x20000
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x8000
- O_NONBLOCK = 0x800
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x1000
- O_SYNC = 0x1000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_BROADCAST = 0x1
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FASTROUTE = 0x6
- PACKET_HOST = 0x0
- PACKET_LOOPBACK = 0x5
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MULTICAST = 0x2
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CLEAR_SECCOMP_FILTER = 0x25
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECCOMP_FILTER = 0x23
- PR_GET_SECUREBITS = 0x1b
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_SECCOMP_FILTER_EVENT = 0x1
- PR_SECCOMP_FILTER_SYSCALL = 0x0
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_KEEPCAPS = 0x8
- PR_SET_NAME = 0xf
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_SECCOMP = 0x16
- PR_SET_SECCOMP_FILTER = 0x24
- PR_SET_SECUREBITS = 0x1c
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETCRUNCHREGS = 0x19
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETHBPREGS = 0x1d
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETVFPREGS = 0x1b
- PTRACE_GETWMMXREGS = 0x12
- PTRACE_GET_THREAD_AREA = 0x16
- PTRACE_KILL = 0x8
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_MASK = 0x7f
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SETCRUNCHREGS = 0x1a
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETHBPREGS = 0x1e
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETVFPREGS = 0x1c
- PTRACE_SETWMMXREGS = 0x13
- PTRACE_SET_SYSCALL = 0x17
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_TRACEME = 0x0
- PT_DATA_ADDR = 0x10004
- PT_TEXT_ADDR = 0x10000
- PT_TEXT_END_ADDR = 0x10008
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x7
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x1
- RTAX_ADVMSS = 0x8
- RTAX_CWND = 0x7
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0xe
- RTAX_MTU = 0x2
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x10
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELLINK = 0x11
- RTM_DELNEIGH = 0x1d
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x4f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWLINK = 0x10
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x10
- RTM_NR_MSGTYPES = 0x40
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_F_DEAD = 0x1
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTN_MAX = 0xb
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_GATED = 0x8
- RTPROT_KERNEL = 0x2
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPNS = 0x23
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCGARP = 0x8954
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGPGRP = 0x8904
- SIOCGRARP = 0x8961
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ATM = 0x108
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_PACKET = 0x107
- SOL_RAW = 0xff
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_X25 = 0x106
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_FILTER = 0x1a
- SO_BINDTODEVICE = 0x19
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_DEBUG = 0x1
- SO_DETACH_FILTER = 0x1b
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_ERROR = 0x4
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_MARK = 0x24
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEERCRED = 0x11
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_REUSEADDR = 0x2
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TYPE = 0x3
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TCIFLUSH = 0x0
- TCIOFLUSH = 0x2
- TCOFLUSH = 0x1
- TCP_CONGESTION = 0xd
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_INFO = 0xb
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_QUICKACK = 0xc
- TCP_SYNCNT = 0x7
- TCP_WINDOW_CLAMP = 0xa
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGICOUNT = 0x545d
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPTN = 0x80045430
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TUNATTACHFILTER = 0x400854d5
- TUNDETACHFILTER = 0x400854d6
- TUNGETFEATURES = 0x800454cf
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETHDRSZ = 0x800454d7
- TUNSETDEBUG = 0x400454c9
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETSNDBUF = 0x400454d4
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETHDRSZ = 0x400454d8
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x20
- WSTOPPED = 0x2
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x62)
- EADDRNOTAVAIL = Errno(0x63)
- EADV = Errno(0x44)
- EAFNOSUPPORT = Errno(0x61)
- EAGAIN = Errno(0xb)
- EALREADY = Errno(0x72)
- EBADE = Errno(0x34)
- EBADF = Errno(0x9)
- EBADFD = Errno(0x4d)
- EBADMSG = Errno(0x4a)
- EBADR = Errno(0x35)
- EBADRQC = Errno(0x38)
- EBADSLT = Errno(0x39)
- EBFONT = Errno(0x3b)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x7d)
- ECHILD = Errno(0xa)
- ECHRNG = Errno(0x2c)
- ECOMM = Errno(0x46)
- ECONNABORTED = Errno(0x67)
- ECONNREFUSED = Errno(0x6f)
- ECONNRESET = Errno(0x68)
- EDEADLK = Errno(0x23)
- EDEADLOCK = Errno(0x23)
- EDESTADDRREQ = Errno(0x59)
- EDOM = Errno(0x21)
- EDOTDOT = Errno(0x49)
- EDQUOT = Errno(0x7a)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EHOSTDOWN = Errno(0x70)
- EHOSTUNREACH = Errno(0x71)
- EHWPOISON = Errno(0x85)
- EIDRM = Errno(0x2b)
- EILSEQ = Errno(0x54)
- EINPROGRESS = Errno(0x73)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EISCONN = Errno(0x6a)
- EISDIR = Errno(0x15)
- EISNAM = Errno(0x78)
- EKEYEXPIRED = Errno(0x7f)
- EKEYREJECTED = Errno(0x81)
- EKEYREVOKED = Errno(0x80)
- EL2HLT = Errno(0x33)
- EL2NSYNC = Errno(0x2d)
- EL3HLT = Errno(0x2e)
- EL3RST = Errno(0x2f)
- ELIBACC = Errno(0x4f)
- ELIBBAD = Errno(0x50)
- ELIBEXEC = Errno(0x53)
- ELIBMAX = Errno(0x52)
- ELIBSCN = Errno(0x51)
- ELNRNG = Errno(0x30)
- ELOOP = Errno(0x28)
- EMEDIUMTYPE = Errno(0x7c)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x5a)
- EMULTIHOP = Errno(0x48)
- ENAMETOOLONG = Errno(0x24)
- ENAVAIL = Errno(0x77)
- ENETDOWN = Errno(0x64)
- ENETRESET = Errno(0x66)
- ENETUNREACH = Errno(0x65)
- ENFILE = Errno(0x17)
- ENOANO = Errno(0x37)
- ENOBUFS = Errno(0x69)
- ENOCSI = Errno(0x32)
- ENODATA = Errno(0x3d)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOKEY = Errno(0x7e)
- ENOLCK = Errno(0x25)
- ENOLINK = Errno(0x43)
- ENOMEDIUM = Errno(0x7b)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x2a)
- ENONET = Errno(0x40)
- ENOPKG = Errno(0x41)
- ENOPROTOOPT = Errno(0x5c)
- ENOSPC = Errno(0x1c)
- ENOSR = Errno(0x3f)
- ENOSTR = Errno(0x3c)
- ENOSYS = Errno(0x26)
- ENOTBLK = Errno(0xf)
- ENOTCONN = Errno(0x6b)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x27)
- ENOTNAM = Errno(0x76)
- ENOTRECOVERABLE = Errno(0x83)
- ENOTSOCK = Errno(0x58)
- ENOTSUP = Errno(0x5f)
- ENOTTY = Errno(0x19)
- ENOTUNIQ = Errno(0x4c)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x5f)
- EOVERFLOW = Errno(0x4b)
- EOWNERDEAD = Errno(0x82)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x60)
- EPIPE = Errno(0x20)
- EPROTO = Errno(0x47)
- EPROTONOSUPPORT = Errno(0x5d)
- EPROTOTYPE = Errno(0x5b)
- ERANGE = Errno(0x22)
- EREMCHG = Errno(0x4e)
- EREMOTE = Errno(0x42)
- EREMOTEIO = Errno(0x79)
- ERESTART = Errno(0x55)
- ERFKILL = Errno(0x84)
- EROFS = Errno(0x1e)
- ESHUTDOWN = Errno(0x6c)
- ESOCKTNOSUPPORT = Errno(0x5e)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESRMNT = Errno(0x45)
- ESTALE = Errno(0x74)
- ESTRPIPE = Errno(0x56)
- ETIME = Errno(0x3e)
- ETIMEDOUT = Errno(0x6e)
- ETOOMANYREFS = Errno(0x6d)
- ETXTBSY = Errno(0x1a)
- EUCLEAN = Errno(0x75)
- EUNATCH = Errno(0x31)
- EUSERS = Errno(0x57)
- EWOULDBLOCK = Errno(0xb)
- EXDEV = Errno(0x12)
- EXFULL = Errno(0x36)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0x7)
- SIGCHLD = Signal(0x11)
- SIGCLD = Signal(0x11)
- SIGCONT = Signal(0x12)
- SIGFPE = Signal(0x8)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x1d)
- SIGIOT = Signal(0x6)
- SIGKILL = Signal(0x9)
- SIGPIPE = Signal(0xd)
- SIGPOLL = Signal(0x1d)
- SIGPROF = Signal(0x1b)
- SIGPWR = Signal(0x1e)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTKFLT = Signal(0x10)
- SIGSTOP = Signal(0x13)
- SIGSYS = Signal(0x1f)
- SIGTERM = Signal(0xf)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x14)
- SIGTTIN = Signal(0x15)
- SIGTTOU = Signal(0x16)
- SIGUNUSED = Signal(0x1f)
- SIGURG = Signal(0x17)
- SIGUSR1 = Signal(0xa)
- SIGUSR2 = Signal(0xc)
- SIGVTALRM = Signal(0x1a)
- SIGWINCH = Signal(0x1c)
- SIGXCPU = Signal(0x18)
- SIGXFSZ = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "no such device or address",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource temporarily unavailable",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device or resource busy",
- 17: "file exists",
- 18: "invalid cross-device link",
- 19: "no such device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "numerical result out of range",
- 35: "resource deadlock avoided",
- 36: "file name too long",
- 37: "no locks available",
- 38: "function not implemented",
- 39: "directory not empty",
- 40: "too many levels of symbolic links",
- 42: "no message of desired type",
- 43: "identifier removed",
- 44: "channel number out of range",
- 45: "level 2 not synchronized",
- 46: "level 3 halted",
- 47: "level 3 reset",
- 48: "link number out of range",
- 49: "protocol driver not attached",
- 50: "no CSI structure available",
- 51: "level 2 halted",
- 52: "invalid exchange",
- 53: "invalid request descriptor",
- 54: "exchange full",
- 55: "no anode",
- 56: "invalid request code",
- 57: "invalid slot",
- 59: "bad font file format",
- 60: "device not a stream",
- 61: "no data available",
- 62: "timer expired",
- 63: "out of streams resources",
- 64: "machine is not on the network",
- 65: "package not installed",
- 66: "object is remote",
- 67: "link has been severed",
- 68: "advertise error",
- 69: "srmount error",
- 70: "communication error on send",
- 71: "protocol error",
- 72: "multihop attempted",
- 73: "RFS specific error",
- 74: "bad message",
- 75: "value too large for defined data type",
- 76: "name not unique on network",
- 77: "file descriptor in bad state",
- 78: "remote address changed",
- 79: "can not access a needed shared library",
- 80: "accessing a corrupted shared library",
- 81: ".lib section in a.out corrupted",
- 82: "attempting to link in too many shared libraries",
- 83: "cannot exec a shared library directly",
- 84: "invalid or incomplete multibyte or wide character",
- 85: "interrupted system call should be restarted",
- 86: "streams pipe error",
- 87: "too many users",
- 88: "socket operation on non-socket",
- 89: "destination address required",
- 90: "message too long",
- 91: "protocol wrong type for socket",
- 92: "protocol not available",
- 93: "protocol not supported",
- 94: "socket type not supported",
- 95: "operation not supported",
- 96: "protocol family not supported",
- 97: "address family not supported by protocol",
- 98: "address already in use",
- 99: "cannot assign requested address",
- 100: "network is down",
- 101: "network is unreachable",
- 102: "network dropped connection on reset",
- 103: "software caused connection abort",
- 104: "connection reset by peer",
- 105: "no buffer space available",
- 106: "transport endpoint is already connected",
- 107: "transport endpoint is not connected",
- 108: "cannot send after transport endpoint shutdown",
- 109: "too many references: cannot splice",
- 110: "connection timed out",
- 111: "connection refused",
- 112: "host is down",
- 113: "no route to host",
- 114: "operation already in progress",
- 115: "operation now in progress",
- 116: "stale NFS file handle",
- 117: "structure needs cleaning",
- 118: "not a XENIX named type file",
- 119: "no XENIX semaphores available",
- 120: "is a named type file",
- 121: "remote I/O error",
- 122: "disk quota exceeded",
- 123: "no medium found",
- 124: "wrong medium type",
- 125: "operation canceled",
- 126: "required key not available",
- 127: "key has expired",
- 128: "key has been revoked",
- 129: "key was rejected by service",
- 130: "owner died",
- 131: "state not recoverable",
- 132: "operation not possible due to RF-kill",
- 133: "unknown error 133",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/breakpoint trap",
- 6: "aborted",
- 7: "bus error",
- 8: "floating point exception",
- 9: "killed",
- 10: "user defined signal 1",
- 11: "segmentation fault",
- 12: "user defined signal 2",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "stack fault",
- 17: "child exited",
- 18: "continued",
- 19: "stopped (signal)",
- 20: "stopped",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "urgent I/O condition",
- 24: "CPU time limit exceeded",
- 25: "file size limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window changed",
- 29: "I/O possible",
- 30: "power failure",
- 31: "bad system call",
-}
diff --git a/src/pkg/syscall/zerrors_netbsd_386.go b/src/pkg/syscall/zerrors_netbsd_386.go
deleted file mode 100644
index 1e3dff7fa..000000000
--- a/src/pkg/syscall/zerrors_netbsd_386.go
+++ /dev/null
@@ -1,1708 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package syscall
-
-const (
- AF_APPLETALK = 0x10
- AF_ARP = 0x1c
- AF_BLUETOOTH = 0x1f
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x20
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x18
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x23
- AF_MPLS = 0x21
- AF_NATM = 0x1b
- AF_NS = 0x6
- AF_OROUTE = 0x11
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x22
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- ARPHRD_ARCNET = 0x7
- ARPHRD_ETHER = 0x1
- ARPHRD_FRELAY = 0xf
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_STRIP = 0x17
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B460800 = 0x70800
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B921600 = 0xe1000
- B9600 = 0x2580
- BIOCFEEDBACK = 0x8004427d
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc0084277
- BIOCGETIF = 0x4090426b
- BIOCGFEEDBACK = 0x4004427c
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRTIMEOUT = 0x400c427b
- BIOCGSEESENT = 0x40044278
- BIOCGSTATS = 0x4080426f
- BIOCGSTATSOLD = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044276
- BIOCSETF = 0x80084267
- BIOCSETIF = 0x8090426c
- BIOCSFEEDBACK = 0x8004427d
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRTIMEOUT = 0x800c427a
- BIOCSSEESENT = 0x80044279
- BIOCSTCPF = 0x80084272
- BIOCSUDPF = 0x80084273
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALIGNMENT32 = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DFLTBUFSIZE = 0x100000
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x1000000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CLONE_CSIGNAL = 0xff
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_PID = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SIGHAND = 0x800
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- CTL_QUERY = -0x2
- DIOCBSFLUSH = 0x20006478
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HDLC = 0x10
- DLT_HHDLC = 0x79
- DLT_HIPPI = 0xf
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0xe
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RAWAF_MASK = 0x2240000
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xd
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EMUL_LINUX = 0x1
- EMUL_LINUX32 = 0x5
- EMUL_MAXID = 0x6
- EN_SW_CTL_INF = 0x1000
- EN_SW_CTL_PREC = 0x300
- EN_SW_CTL_ROUND = 0xc00
- EN_SW_DATACHAIN = 0x80
- EN_SW_DENORM = 0x2
- EN_SW_INVOP = 0x1
- EN_SW_OVERFLOW = 0x8
- EN_SW_PRECLOSS = 0x20
- EN_SW_UNDERFLOW = 0x10
- EN_SW_ZERODIV = 0x4
- ETHERCAP_JUMBO_MTU = 0x4
- ETHERCAP_VLAN_HWTAGGING = 0x2
- ETHERCAP_VLAN_MTU = 0x1
- ETHERMIN = 0x2e
- ETHERMTU = 0x5dc
- ETHERMTU_JUMBO = 0x2328
- ETHERTYPE_8023 = 0x4
- ETHERTYPE_AARP = 0x80f3
- ETHERTYPE_ACCTON = 0x8390
- ETHERTYPE_AEONIC = 0x8036
- ETHERTYPE_ALPHA = 0x814a
- ETHERTYPE_AMBER = 0x6008
- ETHERTYPE_AMOEBA = 0x8145
- ETHERTYPE_APOLLO = 0x80f7
- ETHERTYPE_APOLLODOMAIN = 0x8019
- ETHERTYPE_APPLETALK = 0x809b
- ETHERTYPE_APPLITEK = 0x80c7
- ETHERTYPE_ARGONAUT = 0x803a
- ETHERTYPE_ARP = 0x806
- ETHERTYPE_AT = 0x809b
- ETHERTYPE_ATALK = 0x809b
- ETHERTYPE_ATOMIC = 0x86df
- ETHERTYPE_ATT = 0x8069
- ETHERTYPE_ATTSTANFORD = 0x8008
- ETHERTYPE_AUTOPHON = 0x806a
- ETHERTYPE_AXIS = 0x8856
- ETHERTYPE_BCLOOP = 0x9003
- ETHERTYPE_BOFL = 0x8102
- ETHERTYPE_CABLETRON = 0x7034
- ETHERTYPE_CHAOS = 0x804
- ETHERTYPE_COMDESIGN = 0x806c
- ETHERTYPE_COMPUGRAPHIC = 0x806d
- ETHERTYPE_COUNTERPOINT = 0x8062
- ETHERTYPE_CRONUS = 0x8004
- ETHERTYPE_CRONUSVLN = 0x8003
- ETHERTYPE_DCA = 0x1234
- ETHERTYPE_DDE = 0x807b
- ETHERTYPE_DEBNI = 0xaaaa
- ETHERTYPE_DECAM = 0x8048
- ETHERTYPE_DECCUST = 0x6006
- ETHERTYPE_DECDIAG = 0x6005
- ETHERTYPE_DECDNS = 0x803c
- ETHERTYPE_DECDTS = 0x803e
- ETHERTYPE_DECEXPER = 0x6000
- ETHERTYPE_DECLAST = 0x8041
- ETHERTYPE_DECLTM = 0x803f
- ETHERTYPE_DECMUMPS = 0x6009
- ETHERTYPE_DECNETBIOS = 0x8040
- ETHERTYPE_DELTACON = 0x86de
- ETHERTYPE_DIDDLE = 0x4321
- ETHERTYPE_DLOG1 = 0x660
- ETHERTYPE_DLOG2 = 0x661
- ETHERTYPE_DN = 0x6003
- ETHERTYPE_DOGFIGHT = 0x1989
- ETHERTYPE_DSMD = 0x8039
- ETHERTYPE_ECMA = 0x803
- ETHERTYPE_ENCRYPT = 0x803d
- ETHERTYPE_ES = 0x805d
- ETHERTYPE_EXCELAN = 0x8010
- ETHERTYPE_EXPERDATA = 0x8049
- ETHERTYPE_FLIP = 0x8146
- ETHERTYPE_FLOWCONTROL = 0x8808
- ETHERTYPE_FRARP = 0x808
- ETHERTYPE_GENDYN = 0x8068
- ETHERTYPE_HAYES = 0x8130
- ETHERTYPE_HIPPI_FP = 0x8180
- ETHERTYPE_HITACHI = 0x8820
- ETHERTYPE_HP = 0x8005
- ETHERTYPE_IEEEPUP = 0xa00
- ETHERTYPE_IEEEPUPAT = 0xa01
- ETHERTYPE_IMLBL = 0x4c42
- ETHERTYPE_IMLBLDIAG = 0x424c
- ETHERTYPE_IP = 0x800
- ETHERTYPE_IPAS = 0x876c
- ETHERTYPE_IPV6 = 0x86dd
- ETHERTYPE_IPX = 0x8137
- ETHERTYPE_IPXNEW = 0x8037
- ETHERTYPE_KALPANA = 0x8582
- ETHERTYPE_LANBRIDGE = 0x8038
- ETHERTYPE_LANPROBE = 0x8888
- ETHERTYPE_LAT = 0x6004
- ETHERTYPE_LBACK = 0x9000
- ETHERTYPE_LITTLE = 0x8060
- ETHERTYPE_LOGICRAFT = 0x8148
- ETHERTYPE_LOOPBACK = 0x9000
- ETHERTYPE_MATRA = 0x807a
- ETHERTYPE_MAX = 0xffff
- ETHERTYPE_MERIT = 0x807c
- ETHERTYPE_MICP = 0x873a
- ETHERTYPE_MOPDL = 0x6001
- ETHERTYPE_MOPRC = 0x6002
- ETHERTYPE_MOTOROLA = 0x818d
- ETHERTYPE_MPLS = 0x8847
- ETHERTYPE_MPLS_MCAST = 0x8848
- ETHERTYPE_MUMPS = 0x813f
- ETHERTYPE_NBPCC = 0x3c04
- ETHERTYPE_NBPCLAIM = 0x3c09
- ETHERTYPE_NBPCLREQ = 0x3c05
- ETHERTYPE_NBPCLRSP = 0x3c06
- ETHERTYPE_NBPCREQ = 0x3c02
- ETHERTYPE_NBPCRSP = 0x3c03
- ETHERTYPE_NBPDG = 0x3c07
- ETHERTYPE_NBPDGB = 0x3c08
- ETHERTYPE_NBPDLTE = 0x3c0a
- ETHERTYPE_NBPRAR = 0x3c0c
- ETHERTYPE_NBPRAS = 0x3c0b
- ETHERTYPE_NBPRST = 0x3c0d
- ETHERTYPE_NBPSCD = 0x3c01
- ETHERTYPE_NBPVCD = 0x3c00
- ETHERTYPE_NBS = 0x802
- ETHERTYPE_NCD = 0x8149
- ETHERTYPE_NESTAR = 0x8006
- ETHERTYPE_NETBEUI = 0x8191
- ETHERTYPE_NOVELL = 0x8138
- ETHERTYPE_NS = 0x600
- ETHERTYPE_NSAT = 0x601
- ETHERTYPE_NSCOMPAT = 0x807
- ETHERTYPE_NTRAILER = 0x10
- ETHERTYPE_OS9 = 0x7007
- ETHERTYPE_OS9NET = 0x7009
- ETHERTYPE_PACER = 0x80c6
- ETHERTYPE_PAE = 0x888e
- ETHERTYPE_PCS = 0x4242
- ETHERTYPE_PLANNING = 0x8044
- ETHERTYPE_PPP = 0x880b
- ETHERTYPE_PPPOE = 0x8864
- ETHERTYPE_PPPOEDISC = 0x8863
- ETHERTYPE_PRIMENTS = 0x7031
- ETHERTYPE_PUP = 0x200
- ETHERTYPE_PUPAT = 0x200
- ETHERTYPE_RACAL = 0x7030
- ETHERTYPE_RATIONAL = 0x8150
- ETHERTYPE_RAWFR = 0x6559
- ETHERTYPE_RCL = 0x1995
- ETHERTYPE_RDP = 0x8739
- ETHERTYPE_RETIX = 0x80f2
- ETHERTYPE_REVARP = 0x8035
- ETHERTYPE_SCA = 0x6007
- ETHERTYPE_SECTRA = 0x86db
- ETHERTYPE_SECUREDATA = 0x876d
- ETHERTYPE_SGITW = 0x817e
- ETHERTYPE_SG_BOUNCE = 0x8016
- ETHERTYPE_SG_DIAG = 0x8013
- ETHERTYPE_SG_NETGAMES = 0x8014
- ETHERTYPE_SG_RESV = 0x8015
- ETHERTYPE_SIMNET = 0x5208
- ETHERTYPE_SLOWPROTOCOLS = 0x8809
- ETHERTYPE_SNA = 0x80d5
- ETHERTYPE_SNMP = 0x814c
- ETHERTYPE_SONIX = 0xfaf5
- ETHERTYPE_SPIDER = 0x809f
- ETHERTYPE_SPRITE = 0x500
- ETHERTYPE_STP = 0x8181
- ETHERTYPE_TALARIS = 0x812b
- ETHERTYPE_TALARISMC = 0x852b
- ETHERTYPE_TCPCOMP = 0x876b
- ETHERTYPE_TCPSM = 0x9002
- ETHERTYPE_TEC = 0x814f
- ETHERTYPE_TIGAN = 0x802f
- ETHERTYPE_TRAIL = 0x1000
- ETHERTYPE_TRANSETHER = 0x6558
- ETHERTYPE_TYMSHARE = 0x802e
- ETHERTYPE_UBBST = 0x7005
- ETHERTYPE_UBDEBUG = 0x900
- ETHERTYPE_UBDIAGLOOP = 0x7002
- ETHERTYPE_UBDL = 0x7000
- ETHERTYPE_UBNIU = 0x7001
- ETHERTYPE_UBNMC = 0x7003
- ETHERTYPE_VALID = 0x1600
- ETHERTYPE_VARIAN = 0x80dd
- ETHERTYPE_VAXELN = 0x803b
- ETHERTYPE_VEECO = 0x8067
- ETHERTYPE_VEXP = 0x805b
- ETHERTYPE_VGLAB = 0x8131
- ETHERTYPE_VINES = 0xbad
- ETHERTYPE_VINESECHO = 0xbaf
- ETHERTYPE_VINESLOOP = 0xbae
- ETHERTYPE_VITAL = 0xff00
- ETHERTYPE_VLAN = 0x8100
- ETHERTYPE_VLTLMAN = 0x8080
- ETHERTYPE_VPROD = 0x805c
- ETHERTYPE_VURESERVED = 0x8147
- ETHERTYPE_WATERLOO = 0x8130
- ETHERTYPE_WELLFLEET = 0x8103
- ETHERTYPE_X25 = 0x805
- ETHERTYPE_X75 = 0x801
- ETHERTYPE_XNSSM = 0x9001
- ETHERTYPE_XTP = 0x817d
- ETHER_ADDR_LEN = 0x6
- ETHER_CRC_LEN = 0x4
- ETHER_CRC_POLY_BE = 0x4c11db6
- ETHER_CRC_POLY_LE = 0xedb88320
- ETHER_HDR_LEN = 0xe
- ETHER_MAX_LEN = 0x5ee
- ETHER_MAX_LEN_JUMBO = 0x233a
- ETHER_MIN_LEN = 0x40
- ETHER_PPPOE_ENCAP_LEN = 0x8
- ETHER_TYPE_LEN = 0x2
- ETHER_VLAN_ENCAP_LEN = 0x4
- EVFILT_AIO = 0x2
- EVFILT_PROC = 0x4
- EVFILT_READ = 0x0
- EVFILT_SIGNAL = 0x5
- EVFILT_SYSCOUNT = 0x7
- EVFILT_TIMER = 0x6
- EVFILT_VNODE = 0x3
- EVFILT_WRITE = 0x1
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x100
- FLUSHO = 0x800000
- F_CLOSEM = 0xa
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0xc
- F_FSCTL = -0x80000000
- F_FSDIRMASK = 0x70000000
- F_FSIN = 0x10000000
- F_FSINOUT = 0x30000000
- F_FSOUT = 0x20000000
- F_FSPRIV = 0x8000
- F_FSVOID = 0x40000000
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETNOSIGPIPE = 0xd
- F_GETOWN = 0x5
- F_MAXFD = 0xb
- F_OK = 0x0
- F_PARAM_MASK = 0xfff
- F_PARAM_MAX = 0xfff
- F_RDLCK = 0x1
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETNOSIGPIPE = 0xe
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFA_ROUTE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x8f52
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf8
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ECONET = 0xce
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LINEGROUP = 0xd2
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PLC = 0xae
- IFT_PON155 = 0xcf
- IFT_PON622 = 0xd0
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPATM = 0xc5
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_Q2931 = 0xc9
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SIPSIG = 0xcc
- IFT_SIPTG = 0xcb
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xd7
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TELINK = 0xc8
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VIRTUALTG = 0xca
- IFT_VOICEDID = 0xd5
- IFT_VOICEEM = 0x64
- IFT_VOICEEMFGD = 0xd3
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFGDEANA = 0xd4
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERCABLE = 0xc6
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IPPROTO_AH = 0x33
- IPPROTO_CARP = 0x70
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IPV6_ICMP = 0x3a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MOBILE = 0x37
- IPPROTO_NONE = 0x3b
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_VRRP = 0x70
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXPACKET = 0xffff
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0xd
- IP_EF = 0x8000
- IP_ERRORMTU = 0x15
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x16
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINFRAGSIZE = 0x45
- IP_MINTTL = 0x18
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x1
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVTTL = 0x17
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_TOS = 0x3
- IP_TTL = 0x4
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x6
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_SPACEAVAIL = 0x5
- MADV_WILLNEED = 0x3
- MAP_ALIGNMENT_16MB = 0x18000000
- MAP_ALIGNMENT_1TB = 0x28000000
- MAP_ALIGNMENT_256TB = 0x30000000
- MAP_ALIGNMENT_4GB = 0x20000000
- MAP_ALIGNMENT_64KB = 0x10000000
- MAP_ALIGNMENT_64PB = 0x38000000
- MAP_ALIGNMENT_MASK = -0x1000000
- MAP_ALIGNMENT_SHIFT = 0x18
- MAP_ANON = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_INHERIT = 0x80
- MAP_INHERIT_COPY = 0x1
- MAP_INHERIT_DEFAULT = 0x1
- MAP_INHERIT_DONATE_COPY = 0x3
- MAP_INHERIT_NONE = 0x2
- MAP_INHERIT_SHARE = 0x0
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_STACK = 0x2000
- MAP_TRYFIXED = 0x400
- MAP_WIRED = 0x800
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_BCAST = 0x100
- MSG_CMSG_CLOEXEC = 0x800
- MSG_CONTROLMBUF = 0x2000000
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOR = 0x8
- MSG_IOVUSRSPACE = 0x4000000
- MSG_LENUSRSPACE = 0x8000000
- MSG_MCAST = 0x200
- MSG_NAMEMBUF = 0x1000000
- MSG_NBIO = 0x1000
- MSG_NOSIGNAL = 0x400
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_USERFLAGS = 0xffffff
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x2
- MS_SYNC = 0x4
- NAME_MAX = 0x1ff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x5
- NET_RT_MAXID = 0x6
- NET_RT_OIFLIST = 0x4
- NET_RT_OOIFLIST = 0x3
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFIOGETBMAP = 0xc004667a
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_ALT_IO = 0x40000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x400000
- O_CREAT = 0x200
- O_DIRECT = 0x80000
- O_DIRECTORY = 0x200000
- O_DSYNC = 0x10000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_NOSIGPIPE = 0x1000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x20000
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PRI_IOFLUSH = 0x7c
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_AS = 0xa
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x9
- RTAX_NETMASK = 0x2
- RTAX_TAG = 0x8
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTA_TAG = 0x100
- RTF_ANNOUNCE = 0x20000
- RTF_BLACKHOLE = 0x1000
- RTF_CLONED = 0x2000
- RTF_CLONING = 0x100
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_LLINFO = 0x400
- RTF_MASK = 0x80
- RTF_MODIFIED = 0x20
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_REJECT = 0x8
- RTF_SRC = 0x10000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_CHGADDR = 0x15
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_GET = 0x4
- RTM_IEEE80211 = 0x11
- RTM_IFANNOUNCE = 0x10
- RTM_IFINFO = 0x14
- RTM_LLINFO_UPD = 0x13
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_OIFINFO = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_OOIFINFO = 0xe
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_SETGATE = 0x12
- RTM_VERSION = 0x4
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x4
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x8
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80906931
- SIOCADDRT = 0x8030720a
- SIOCAIFADDR = 0x8040691a
- SIOCALIFADDR = 0x8118691c
- SIOCATMARK = 0x40047307
- SIOCDELMULTI = 0x80906932
- SIOCDELRT = 0x8030720b
- SIOCDIFADDR = 0x80906919
- SIOCDIFPHYADDR = 0x80906949
- SIOCDLIFADDR = 0x8118691e
- SIOCGDRVSPEC = 0xc01c697b
- SIOCGETPFSYNC = 0xc09069f8
- SIOCGETSGCNT = 0xc0147534
- SIOCGETVIFCNT = 0xc0147533
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0906921
- SIOCGIFADDRPREF = 0xc0946920
- SIOCGIFALIAS = 0xc040691b
- SIOCGIFBRDADDR = 0xc0906923
- SIOCGIFCAP = 0xc0206976
- SIOCGIFCONF = 0xc0086926
- SIOCGIFDATA = 0xc0946985
- SIOCGIFDLT = 0xc0906977
- SIOCGIFDSTADDR = 0xc0906922
- SIOCGIFFLAGS = 0xc0906911
- SIOCGIFGENERIC = 0xc090693a
- SIOCGIFMEDIA = 0xc0286936
- SIOCGIFMETRIC = 0xc0906917
- SIOCGIFMTU = 0xc090697e
- SIOCGIFNETMASK = 0xc0906925
- SIOCGIFPDSTADDR = 0xc0906948
- SIOCGIFPSRCADDR = 0xc0906947
- SIOCGLIFADDR = 0xc118691d
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCGLINKSTR = 0xc01c6987
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGVH = 0xc0906983
- SIOCIFCREATE = 0x8090697a
- SIOCIFDESTROY = 0x80906979
- SIOCIFGCLONERS = 0xc00c6978
- SIOCINITIFADDR = 0xc0446984
- SIOCSDRVSPEC = 0x801c697b
- SIOCSETPFSYNC = 0x809069f7
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8090690c
- SIOCSIFADDRPREF = 0x8094691f
- SIOCSIFBRDADDR = 0x80906913
- SIOCSIFCAP = 0x80206975
- SIOCSIFDSTADDR = 0x8090690e
- SIOCSIFFLAGS = 0x80906910
- SIOCSIFGENERIC = 0x80906939
- SIOCSIFMEDIA = 0xc0906935
- SIOCSIFMETRIC = 0x80906918
- SIOCSIFMTU = 0x8090697f
- SIOCSIFNETMASK = 0x80906916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSLIFPHYADDR = 0x8118694a
- SIOCSLINKSTR = 0x801c6988
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SIOCSVH = 0xc0906982
- SIOCZIFDATA = 0xc0946986
- SOCK_CLOEXEC = 0x10000000
- SOCK_DGRAM = 0x2
- SOCK_FLAGS_MASK = 0xf0000000
- SOCK_NONBLOCK = 0x20000000
- SOCK_NOSIGPIPE = 0x40000000
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ACCEPTFILTER = 0x1000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_NOHEADER = 0x100a
- SO_NOSIGPIPE = 0x800
- SO_OOBINLINE = 0x100
- SO_OVERFLOWED = 0x1009
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x100c
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x100b
- SO_TIMESTAMP = 0x2000
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- SYSCTL_VERSION = 0x1000000
- SYSCTL_VERS_0 = 0x0
- SYSCTL_VERS_1 = 0x1000000
- SYSCTL_VERS_MASK = 0xff000000
- S_ARCH1 = 0x10000
- S_ARCH2 = 0x20000
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- S_LOGIN_SET = 0x1
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CONGCTL = 0x20
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x3
- TCP_KEEPINIT = 0x7
- TCP_KEEPINTVL = 0x5
- TCP_MAXBURST = 0x4
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x10
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x218
- TCP_NODELAY = 0x1
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x400c7458
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLAG_CDTRCTS = 0x10
- TIOCFLAG_CLOCAL = 0x2
- TIOCFLAG_CRTSCTS = 0x4
- TIOCFLAG_MDMBUF = 0x8
- TIOCFLAG_SOFTCAR = 0x1
- TIOCFLUSH = 0x80047410
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGFLAGS = 0x4004745d
- TIOCGLINED = 0x40207442
- TIOCGPGRP = 0x40047477
- TIOCGQSIZE = 0x40047481
- TIOCGRANTPT = 0x20007447
- TIOCGSID = 0x40047463
- TIOCGSIZE = 0x40087468
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGET = 0x4004746a
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTMGET = 0x40287446
- TIOCPTSNAME = 0x40287448
- TIOCRCVFRAME = 0x80047445
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSFLAGS = 0x8004745c
- TIOCSIG = 0x2000745f
- TIOCSLINED = 0x80207443
- TIOCSPGRP = 0x80047476
- TIOCSQSIZE = 0x80047480
- TIOCSSIZE = 0x80087467
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x80047465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCUCNTL = 0x80047466
- TIOCXMTFRAME = 0x80047444
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WALL = 0x8
- WALLSIG = 0x8
- WALTSIG = 0x4
- WCLONE = 0x4
- WCOREFLAG = 0x80
- WNOHANG = 0x1
- WNOWAIT = 0x10000
- WNOZOMBIE = 0x20000
- WOPTSCHECKED = 0x40000
- WSTOPPED = 0x7f
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x30)
- EADDRNOTAVAIL = Errno(0x31)
- EAFNOSUPPORT = Errno(0x2f)
- EAGAIN = Errno(0x23)
- EALREADY = Errno(0x25)
- EAUTH = Errno(0x50)
- EBADF = Errno(0x9)
- EBADMSG = Errno(0x58)
- EBADRPC = Errno(0x48)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x57)
- ECHILD = Errno(0xa)
- ECONNABORTED = Errno(0x35)
- ECONNREFUSED = Errno(0x3d)
- ECONNRESET = Errno(0x36)
- EDEADLK = Errno(0xb)
- EDESTADDRREQ = Errno(0x27)
- EDOM = Errno(0x21)
- EDQUOT = Errno(0x45)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EFTYPE = Errno(0x4f)
- EHOSTDOWN = Errno(0x40)
- EHOSTUNREACH = Errno(0x41)
- EIDRM = Errno(0x52)
- EILSEQ = Errno(0x55)
- EINPROGRESS = Errno(0x24)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EISCONN = Errno(0x38)
- EISDIR = Errno(0x15)
- ELAST = Errno(0x60)
- ELOOP = Errno(0x3e)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x28)
- EMULTIHOP = Errno(0x5e)
- ENAMETOOLONG = Errno(0x3f)
- ENEEDAUTH = Errno(0x51)
- ENETDOWN = Errno(0x32)
- ENETRESET = Errno(0x34)
- ENETUNREACH = Errno(0x33)
- ENFILE = Errno(0x17)
- ENOATTR = Errno(0x5d)
- ENOBUFS = Errno(0x37)
- ENODATA = Errno(0x59)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOLCK = Errno(0x4d)
- ENOLINK = Errno(0x5f)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x53)
- ENOPROTOOPT = Errno(0x2a)
- ENOSPC = Errno(0x1c)
- ENOSR = Errno(0x5a)
- ENOSTR = Errno(0x5b)
- ENOSYS = Errno(0x4e)
- ENOTBLK = Errno(0xf)
- ENOTCONN = Errno(0x39)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x42)
- ENOTSOCK = Errno(0x26)
- ENOTSUP = Errno(0x56)
- ENOTTY = Errno(0x19)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x2d)
- EOVERFLOW = Errno(0x54)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x2e)
- EPIPE = Errno(0x20)
- EPROCLIM = Errno(0x43)
- EPROCUNAVAIL = Errno(0x4c)
- EPROGMISMATCH = Errno(0x4b)
- EPROGUNAVAIL = Errno(0x4a)
- EPROTO = Errno(0x60)
- EPROTONOSUPPORT = Errno(0x2b)
- EPROTOTYPE = Errno(0x29)
- ERANGE = Errno(0x22)
- EREMOTE = Errno(0x47)
- EROFS = Errno(0x1e)
- ERPCMISMATCH = Errno(0x49)
- ESHUTDOWN = Errno(0x3a)
- ESOCKTNOSUPPORT = Errno(0x2c)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESTALE = Errno(0x46)
- ETIME = Errno(0x5c)
- ETIMEDOUT = Errno(0x3c)
- ETOOMANYREFS = Errno(0x3b)
- ETXTBSY = Errno(0x1a)
- EUSERS = Errno(0x44)
- EWOULDBLOCK = Errno(0x23)
- EXDEV = Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0xa)
- SIGCHLD = Signal(0x14)
- SIGCONT = Signal(0x13)
- SIGEMT = Signal(0x7)
- SIGFPE = Signal(0x8)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINFO = Signal(0x1d)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x17)
- SIGIOT = Signal(0x6)
- SIGKILL = Signal(0x9)
- SIGPIPE = Signal(0xd)
- SIGPROF = Signal(0x1b)
- SIGPWR = Signal(0x20)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTOP = Signal(0x11)
- SIGSYS = Signal(0xc)
- SIGTERM = Signal(0xf)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x12)
- SIGTTIN = Signal(0x15)
- SIGTTOU = Signal(0x16)
- SIGURG = Signal(0x10)
- SIGUSR1 = Signal(0x1e)
- SIGUSR2 = Signal(0x1f)
- SIGVTALRM = Signal(0x1a)
- SIGWINCH = Signal(0x1c)
- SIGXCPU = Signal(0x18)
- SIGXFSZ = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large or too small",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol option not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "connection timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "identifier removed",
- 83: "no message of desired type",
- 84: "value too large to be stored in data type",
- 85: "illegal byte sequence",
- 86: "not supported",
- 87: "operation Canceled",
- 88: "bad or Corrupt message",
- 89: "no message available",
- 90: "no STREAM resources",
- 91: "not a STREAM",
- 92: "STREAM ioctl timeout",
- 93: "attribute not found",
- 94: "multihop attempted",
- 95: "link has been severed",
- 96: "protocol error",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "stopped (signal)",
- 18: "stopped",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "power fail/restart",
-}
diff --git a/src/pkg/syscall/zerrors_netbsd_amd64.go b/src/pkg/syscall/zerrors_netbsd_amd64.go
deleted file mode 100644
index 1469d00b7..000000000
--- a/src/pkg/syscall/zerrors_netbsd_amd64.go
+++ /dev/null
@@ -1,1698 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package syscall
-
-const (
- AF_APPLETALK = 0x10
- AF_ARP = 0x1c
- AF_BLUETOOTH = 0x1f
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x20
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x18
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x23
- AF_MPLS = 0x21
- AF_NATM = 0x1b
- AF_NS = 0x6
- AF_OROUTE = 0x11
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x22
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- ARPHRD_ARCNET = 0x7
- ARPHRD_ETHER = 0x1
- ARPHRD_FRELAY = 0xf
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_STRIP = 0x17
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B460800 = 0x70800
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B921600 = 0xe1000
- B9600 = 0x2580
- BIOCFEEDBACK = 0x8004427d
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc0104277
- BIOCGETIF = 0x4090426b
- BIOCGFEEDBACK = 0x4004427c
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRTIMEOUT = 0x4010427b
- BIOCGSEESENT = 0x40044278
- BIOCGSTATS = 0x4080426f
- BIOCGSTATSOLD = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044276
- BIOCSETF = 0x80104267
- BIOCSETIF = 0x8090426c
- BIOCSFEEDBACK = 0x8004427d
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRTIMEOUT = 0x8010427a
- BIOCSSEESENT = 0x80044279
- BIOCSTCPF = 0x80104272
- BIOCSUDPF = 0x80104273
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x8
- BPF_ALIGNMENT32 = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DFLTBUFSIZE = 0x100000
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x1000000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CLONE_CSIGNAL = 0xff
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_PID = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SIGHAND = 0x800
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- CTL_QUERY = -0x2
- DIOCBSFLUSH = 0x20006478
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HDLC = 0x10
- DLT_HHDLC = 0x79
- DLT_HIPPI = 0xf
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0xe
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RAWAF_MASK = 0x2240000
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xd
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EMUL_LINUX = 0x1
- EMUL_LINUX32 = 0x5
- EMUL_MAXID = 0x6
- ETHERCAP_JUMBO_MTU = 0x4
- ETHERCAP_VLAN_HWTAGGING = 0x2
- ETHERCAP_VLAN_MTU = 0x1
- ETHERMIN = 0x2e
- ETHERMTU = 0x5dc
- ETHERMTU_JUMBO = 0x2328
- ETHERTYPE_8023 = 0x4
- ETHERTYPE_AARP = 0x80f3
- ETHERTYPE_ACCTON = 0x8390
- ETHERTYPE_AEONIC = 0x8036
- ETHERTYPE_ALPHA = 0x814a
- ETHERTYPE_AMBER = 0x6008
- ETHERTYPE_AMOEBA = 0x8145
- ETHERTYPE_APOLLO = 0x80f7
- ETHERTYPE_APOLLODOMAIN = 0x8019
- ETHERTYPE_APPLETALK = 0x809b
- ETHERTYPE_APPLITEK = 0x80c7
- ETHERTYPE_ARGONAUT = 0x803a
- ETHERTYPE_ARP = 0x806
- ETHERTYPE_AT = 0x809b
- ETHERTYPE_ATALK = 0x809b
- ETHERTYPE_ATOMIC = 0x86df
- ETHERTYPE_ATT = 0x8069
- ETHERTYPE_ATTSTANFORD = 0x8008
- ETHERTYPE_AUTOPHON = 0x806a
- ETHERTYPE_AXIS = 0x8856
- ETHERTYPE_BCLOOP = 0x9003
- ETHERTYPE_BOFL = 0x8102
- ETHERTYPE_CABLETRON = 0x7034
- ETHERTYPE_CHAOS = 0x804
- ETHERTYPE_COMDESIGN = 0x806c
- ETHERTYPE_COMPUGRAPHIC = 0x806d
- ETHERTYPE_COUNTERPOINT = 0x8062
- ETHERTYPE_CRONUS = 0x8004
- ETHERTYPE_CRONUSVLN = 0x8003
- ETHERTYPE_DCA = 0x1234
- ETHERTYPE_DDE = 0x807b
- ETHERTYPE_DEBNI = 0xaaaa
- ETHERTYPE_DECAM = 0x8048
- ETHERTYPE_DECCUST = 0x6006
- ETHERTYPE_DECDIAG = 0x6005
- ETHERTYPE_DECDNS = 0x803c
- ETHERTYPE_DECDTS = 0x803e
- ETHERTYPE_DECEXPER = 0x6000
- ETHERTYPE_DECLAST = 0x8041
- ETHERTYPE_DECLTM = 0x803f
- ETHERTYPE_DECMUMPS = 0x6009
- ETHERTYPE_DECNETBIOS = 0x8040
- ETHERTYPE_DELTACON = 0x86de
- ETHERTYPE_DIDDLE = 0x4321
- ETHERTYPE_DLOG1 = 0x660
- ETHERTYPE_DLOG2 = 0x661
- ETHERTYPE_DN = 0x6003
- ETHERTYPE_DOGFIGHT = 0x1989
- ETHERTYPE_DSMD = 0x8039
- ETHERTYPE_ECMA = 0x803
- ETHERTYPE_ENCRYPT = 0x803d
- ETHERTYPE_ES = 0x805d
- ETHERTYPE_EXCELAN = 0x8010
- ETHERTYPE_EXPERDATA = 0x8049
- ETHERTYPE_FLIP = 0x8146
- ETHERTYPE_FLOWCONTROL = 0x8808
- ETHERTYPE_FRARP = 0x808
- ETHERTYPE_GENDYN = 0x8068
- ETHERTYPE_HAYES = 0x8130
- ETHERTYPE_HIPPI_FP = 0x8180
- ETHERTYPE_HITACHI = 0x8820
- ETHERTYPE_HP = 0x8005
- ETHERTYPE_IEEEPUP = 0xa00
- ETHERTYPE_IEEEPUPAT = 0xa01
- ETHERTYPE_IMLBL = 0x4c42
- ETHERTYPE_IMLBLDIAG = 0x424c
- ETHERTYPE_IP = 0x800
- ETHERTYPE_IPAS = 0x876c
- ETHERTYPE_IPV6 = 0x86dd
- ETHERTYPE_IPX = 0x8137
- ETHERTYPE_IPXNEW = 0x8037
- ETHERTYPE_KALPANA = 0x8582
- ETHERTYPE_LANBRIDGE = 0x8038
- ETHERTYPE_LANPROBE = 0x8888
- ETHERTYPE_LAT = 0x6004
- ETHERTYPE_LBACK = 0x9000
- ETHERTYPE_LITTLE = 0x8060
- ETHERTYPE_LOGICRAFT = 0x8148
- ETHERTYPE_LOOPBACK = 0x9000
- ETHERTYPE_MATRA = 0x807a
- ETHERTYPE_MAX = 0xffff
- ETHERTYPE_MERIT = 0x807c
- ETHERTYPE_MICP = 0x873a
- ETHERTYPE_MOPDL = 0x6001
- ETHERTYPE_MOPRC = 0x6002
- ETHERTYPE_MOTOROLA = 0x818d
- ETHERTYPE_MPLS = 0x8847
- ETHERTYPE_MPLS_MCAST = 0x8848
- ETHERTYPE_MUMPS = 0x813f
- ETHERTYPE_NBPCC = 0x3c04
- ETHERTYPE_NBPCLAIM = 0x3c09
- ETHERTYPE_NBPCLREQ = 0x3c05
- ETHERTYPE_NBPCLRSP = 0x3c06
- ETHERTYPE_NBPCREQ = 0x3c02
- ETHERTYPE_NBPCRSP = 0x3c03
- ETHERTYPE_NBPDG = 0x3c07
- ETHERTYPE_NBPDGB = 0x3c08
- ETHERTYPE_NBPDLTE = 0x3c0a
- ETHERTYPE_NBPRAR = 0x3c0c
- ETHERTYPE_NBPRAS = 0x3c0b
- ETHERTYPE_NBPRST = 0x3c0d
- ETHERTYPE_NBPSCD = 0x3c01
- ETHERTYPE_NBPVCD = 0x3c00
- ETHERTYPE_NBS = 0x802
- ETHERTYPE_NCD = 0x8149
- ETHERTYPE_NESTAR = 0x8006
- ETHERTYPE_NETBEUI = 0x8191
- ETHERTYPE_NOVELL = 0x8138
- ETHERTYPE_NS = 0x600
- ETHERTYPE_NSAT = 0x601
- ETHERTYPE_NSCOMPAT = 0x807
- ETHERTYPE_NTRAILER = 0x10
- ETHERTYPE_OS9 = 0x7007
- ETHERTYPE_OS9NET = 0x7009
- ETHERTYPE_PACER = 0x80c6
- ETHERTYPE_PAE = 0x888e
- ETHERTYPE_PCS = 0x4242
- ETHERTYPE_PLANNING = 0x8044
- ETHERTYPE_PPP = 0x880b
- ETHERTYPE_PPPOE = 0x8864
- ETHERTYPE_PPPOEDISC = 0x8863
- ETHERTYPE_PRIMENTS = 0x7031
- ETHERTYPE_PUP = 0x200
- ETHERTYPE_PUPAT = 0x200
- ETHERTYPE_RACAL = 0x7030
- ETHERTYPE_RATIONAL = 0x8150
- ETHERTYPE_RAWFR = 0x6559
- ETHERTYPE_RCL = 0x1995
- ETHERTYPE_RDP = 0x8739
- ETHERTYPE_RETIX = 0x80f2
- ETHERTYPE_REVARP = 0x8035
- ETHERTYPE_SCA = 0x6007
- ETHERTYPE_SECTRA = 0x86db
- ETHERTYPE_SECUREDATA = 0x876d
- ETHERTYPE_SGITW = 0x817e
- ETHERTYPE_SG_BOUNCE = 0x8016
- ETHERTYPE_SG_DIAG = 0x8013
- ETHERTYPE_SG_NETGAMES = 0x8014
- ETHERTYPE_SG_RESV = 0x8015
- ETHERTYPE_SIMNET = 0x5208
- ETHERTYPE_SLOWPROTOCOLS = 0x8809
- ETHERTYPE_SNA = 0x80d5
- ETHERTYPE_SNMP = 0x814c
- ETHERTYPE_SONIX = 0xfaf5
- ETHERTYPE_SPIDER = 0x809f
- ETHERTYPE_SPRITE = 0x500
- ETHERTYPE_STP = 0x8181
- ETHERTYPE_TALARIS = 0x812b
- ETHERTYPE_TALARISMC = 0x852b
- ETHERTYPE_TCPCOMP = 0x876b
- ETHERTYPE_TCPSM = 0x9002
- ETHERTYPE_TEC = 0x814f
- ETHERTYPE_TIGAN = 0x802f
- ETHERTYPE_TRAIL = 0x1000
- ETHERTYPE_TRANSETHER = 0x6558
- ETHERTYPE_TYMSHARE = 0x802e
- ETHERTYPE_UBBST = 0x7005
- ETHERTYPE_UBDEBUG = 0x900
- ETHERTYPE_UBDIAGLOOP = 0x7002
- ETHERTYPE_UBDL = 0x7000
- ETHERTYPE_UBNIU = 0x7001
- ETHERTYPE_UBNMC = 0x7003
- ETHERTYPE_VALID = 0x1600
- ETHERTYPE_VARIAN = 0x80dd
- ETHERTYPE_VAXELN = 0x803b
- ETHERTYPE_VEECO = 0x8067
- ETHERTYPE_VEXP = 0x805b
- ETHERTYPE_VGLAB = 0x8131
- ETHERTYPE_VINES = 0xbad
- ETHERTYPE_VINESECHO = 0xbaf
- ETHERTYPE_VINESLOOP = 0xbae
- ETHERTYPE_VITAL = 0xff00
- ETHERTYPE_VLAN = 0x8100
- ETHERTYPE_VLTLMAN = 0x8080
- ETHERTYPE_VPROD = 0x805c
- ETHERTYPE_VURESERVED = 0x8147
- ETHERTYPE_WATERLOO = 0x8130
- ETHERTYPE_WELLFLEET = 0x8103
- ETHERTYPE_X25 = 0x805
- ETHERTYPE_X75 = 0x801
- ETHERTYPE_XNSSM = 0x9001
- ETHERTYPE_XTP = 0x817d
- ETHER_ADDR_LEN = 0x6
- ETHER_CRC_LEN = 0x4
- ETHER_CRC_POLY_BE = 0x4c11db6
- ETHER_CRC_POLY_LE = 0xedb88320
- ETHER_HDR_LEN = 0xe
- ETHER_MAX_LEN = 0x5ee
- ETHER_MAX_LEN_JUMBO = 0x233a
- ETHER_MIN_LEN = 0x40
- ETHER_PPPOE_ENCAP_LEN = 0x8
- ETHER_TYPE_LEN = 0x2
- ETHER_VLAN_ENCAP_LEN = 0x4
- EVFILT_AIO = 0x2
- EVFILT_PROC = 0x4
- EVFILT_READ = 0x0
- EVFILT_SIGNAL = 0x5
- EVFILT_SYSCOUNT = 0x7
- EVFILT_TIMER = 0x6
- EVFILT_VNODE = 0x3
- EVFILT_WRITE = 0x1
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x100
- FLUSHO = 0x800000
- F_CLOSEM = 0xa
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0xc
- F_FSCTL = -0x80000000
- F_FSDIRMASK = 0x70000000
- F_FSIN = 0x10000000
- F_FSINOUT = 0x30000000
- F_FSOUT = 0x20000000
- F_FSPRIV = 0x8000
- F_FSVOID = 0x40000000
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETNOSIGPIPE = 0xd
- F_GETOWN = 0x5
- F_MAXFD = 0xb
- F_OK = 0x0
- F_PARAM_MASK = 0xfff
- F_PARAM_MAX = 0xfff
- F_RDLCK = 0x1
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETNOSIGPIPE = 0xe
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFA_ROUTE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x8f52
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf8
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ECONET = 0xce
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LINEGROUP = 0xd2
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PLC = 0xae
- IFT_PON155 = 0xcf
- IFT_PON622 = 0xd0
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPATM = 0xc5
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_Q2931 = 0xc9
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SIPSIG = 0xcc
- IFT_SIPTG = 0xcb
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xd7
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TELINK = 0xc8
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VIRTUALTG = 0xca
- IFT_VOICEDID = 0xd5
- IFT_VOICEEM = 0x64
- IFT_VOICEEMFGD = 0xd3
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFGDEANA = 0xd4
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERCABLE = 0xc6
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IPPROTO_AH = 0x33
- IPPROTO_CARP = 0x70
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IPV6_ICMP = 0x3a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MOBILE = 0x37
- IPPROTO_NONE = 0x3b
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_VRRP = 0x70
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXPACKET = 0xffff
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0xd
- IP_EF = 0x8000
- IP_ERRORMTU = 0x15
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x16
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINFRAGSIZE = 0x45
- IP_MINTTL = 0x18
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x1
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVTTL = 0x17
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_TOS = 0x3
- IP_TTL = 0x4
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x6
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_SPACEAVAIL = 0x5
- MADV_WILLNEED = 0x3
- MAP_ALIGNMENT_16MB = 0x18000000
- MAP_ALIGNMENT_1TB = 0x28000000
- MAP_ALIGNMENT_256TB = 0x30000000
- MAP_ALIGNMENT_4GB = 0x20000000
- MAP_ALIGNMENT_64KB = 0x10000000
- MAP_ALIGNMENT_64PB = 0x38000000
- MAP_ALIGNMENT_MASK = -0x1000000
- MAP_ALIGNMENT_SHIFT = 0x18
- MAP_ANON = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_INHERIT = 0x80
- MAP_INHERIT_COPY = 0x1
- MAP_INHERIT_DEFAULT = 0x1
- MAP_INHERIT_DONATE_COPY = 0x3
- MAP_INHERIT_NONE = 0x2
- MAP_INHERIT_SHARE = 0x0
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_STACK = 0x2000
- MAP_TRYFIXED = 0x400
- MAP_WIRED = 0x800
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_BCAST = 0x100
- MSG_CMSG_CLOEXEC = 0x800
- MSG_CONTROLMBUF = 0x2000000
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOR = 0x8
- MSG_IOVUSRSPACE = 0x4000000
- MSG_LENUSRSPACE = 0x8000000
- MSG_MCAST = 0x200
- MSG_NAMEMBUF = 0x1000000
- MSG_NBIO = 0x1000
- MSG_NOSIGNAL = 0x400
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_USERFLAGS = 0xffffff
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x2
- MS_SYNC = 0x4
- NAME_MAX = 0x1ff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x5
- NET_RT_MAXID = 0x6
- NET_RT_OIFLIST = 0x4
- NET_RT_OOIFLIST = 0x3
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFIOGETBMAP = 0xc004667a
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_ALT_IO = 0x40000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x400000
- O_CREAT = 0x200
- O_DIRECT = 0x80000
- O_DIRECTORY = 0x200000
- O_DSYNC = 0x10000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_NOSIGPIPE = 0x1000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x20000
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PRI_IOFLUSH = 0x7c
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_AS = 0xa
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x9
- RTAX_NETMASK = 0x2
- RTAX_TAG = 0x8
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTA_TAG = 0x100
- RTF_ANNOUNCE = 0x20000
- RTF_BLACKHOLE = 0x1000
- RTF_CLONED = 0x2000
- RTF_CLONING = 0x100
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_LLINFO = 0x400
- RTF_MASK = 0x80
- RTF_MODIFIED = 0x20
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_REJECT = 0x8
- RTF_SRC = 0x10000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_CHGADDR = 0x15
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_GET = 0x4
- RTM_IEEE80211 = 0x11
- RTM_IFANNOUNCE = 0x10
- RTM_IFINFO = 0x14
- RTM_LLINFO_UPD = 0x13
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_OIFINFO = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_OOIFINFO = 0xe
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_SETGATE = 0x12
- RTM_VERSION = 0x4
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x4
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x8
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80906931
- SIOCADDRT = 0x8038720a
- SIOCAIFADDR = 0x8040691a
- SIOCALIFADDR = 0x8118691c
- SIOCATMARK = 0x40047307
- SIOCDELMULTI = 0x80906932
- SIOCDELRT = 0x8038720b
- SIOCDIFADDR = 0x80906919
- SIOCDIFPHYADDR = 0x80906949
- SIOCDLIFADDR = 0x8118691e
- SIOCGDRVSPEC = 0xc028697b
- SIOCGETPFSYNC = 0xc09069f8
- SIOCGETSGCNT = 0xc0207534
- SIOCGETVIFCNT = 0xc0287533
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0906921
- SIOCGIFADDRPREF = 0xc0986920
- SIOCGIFALIAS = 0xc040691b
- SIOCGIFBRDADDR = 0xc0906923
- SIOCGIFCAP = 0xc0206976
- SIOCGIFCONF = 0xc0106926
- SIOCGIFDATA = 0xc0986985
- SIOCGIFDLT = 0xc0906977
- SIOCGIFDSTADDR = 0xc0906922
- SIOCGIFFLAGS = 0xc0906911
- SIOCGIFGENERIC = 0xc090693a
- SIOCGIFMEDIA = 0xc0306936
- SIOCGIFMETRIC = 0xc0906917
- SIOCGIFMTU = 0xc090697e
- SIOCGIFNETMASK = 0xc0906925
- SIOCGIFPDSTADDR = 0xc0906948
- SIOCGIFPSRCADDR = 0xc0906947
- SIOCGLIFADDR = 0xc118691d
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCGLINKSTR = 0xc0286987
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGVH = 0xc0906983
- SIOCIFCREATE = 0x8090697a
- SIOCIFDESTROY = 0x80906979
- SIOCIFGCLONERS = 0xc0106978
- SIOCINITIFADDR = 0xc0706984
- SIOCSDRVSPEC = 0x8028697b
- SIOCSETPFSYNC = 0x809069f7
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8090690c
- SIOCSIFADDRPREF = 0x8098691f
- SIOCSIFBRDADDR = 0x80906913
- SIOCSIFCAP = 0x80206975
- SIOCSIFDSTADDR = 0x8090690e
- SIOCSIFFLAGS = 0x80906910
- SIOCSIFGENERIC = 0x80906939
- SIOCSIFMEDIA = 0xc0906935
- SIOCSIFMETRIC = 0x80906918
- SIOCSIFMTU = 0x8090697f
- SIOCSIFNETMASK = 0x80906916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSLIFPHYADDR = 0x8118694a
- SIOCSLINKSTR = 0x80286988
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SIOCSVH = 0xc0906982
- SIOCZIFDATA = 0xc0986986
- SOCK_CLOEXEC = 0x10000000
- SOCK_DGRAM = 0x2
- SOCK_FLAGS_MASK = 0xf0000000
- SOCK_NONBLOCK = 0x20000000
- SOCK_NOSIGPIPE = 0x40000000
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ACCEPTFILTER = 0x1000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_NOHEADER = 0x100a
- SO_NOSIGPIPE = 0x800
- SO_OOBINLINE = 0x100
- SO_OVERFLOWED = 0x1009
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x100c
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x100b
- SO_TIMESTAMP = 0x2000
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- SYSCTL_VERSION = 0x1000000
- SYSCTL_VERS_0 = 0x0
- SYSCTL_VERS_1 = 0x1000000
- SYSCTL_VERS_MASK = 0xff000000
- S_ARCH1 = 0x10000
- S_ARCH2 = 0x20000
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- S_LOGIN_SET = 0x1
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CONGCTL = 0x20
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x3
- TCP_KEEPINIT = 0x7
- TCP_KEEPINTVL = 0x5
- TCP_MAXBURST = 0x4
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x10
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x218
- TCP_NODELAY = 0x1
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40107458
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLAG_CDTRCTS = 0x10
- TIOCFLAG_CLOCAL = 0x2
- TIOCFLAG_CRTSCTS = 0x4
- TIOCFLAG_MDMBUF = 0x8
- TIOCFLAG_SOFTCAR = 0x1
- TIOCFLUSH = 0x80047410
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGFLAGS = 0x4004745d
- TIOCGLINED = 0x40207442
- TIOCGPGRP = 0x40047477
- TIOCGQSIZE = 0x40047481
- TIOCGRANTPT = 0x20007447
- TIOCGSID = 0x40047463
- TIOCGSIZE = 0x40087468
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGET = 0x4004746a
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTMGET = 0x40287446
- TIOCPTSNAME = 0x40287448
- TIOCRCVFRAME = 0x80087445
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSFLAGS = 0x8004745c
- TIOCSIG = 0x2000745f
- TIOCSLINED = 0x80207443
- TIOCSPGRP = 0x80047476
- TIOCSQSIZE = 0x80047480
- TIOCSSIZE = 0x80087467
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x80047465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCUCNTL = 0x80047466
- TIOCXMTFRAME = 0x80087444
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WALL = 0x8
- WALLSIG = 0x8
- WALTSIG = 0x4
- WCLONE = 0x4
- WCOREFLAG = 0x80
- WNOHANG = 0x1
- WNOWAIT = 0x10000
- WNOZOMBIE = 0x20000
- WOPTSCHECKED = 0x40000
- WSTOPPED = 0x7f
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x30)
- EADDRNOTAVAIL = Errno(0x31)
- EAFNOSUPPORT = Errno(0x2f)
- EAGAIN = Errno(0x23)
- EALREADY = Errno(0x25)
- EAUTH = Errno(0x50)
- EBADF = Errno(0x9)
- EBADMSG = Errno(0x58)
- EBADRPC = Errno(0x48)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x57)
- ECHILD = Errno(0xa)
- ECONNABORTED = Errno(0x35)
- ECONNREFUSED = Errno(0x3d)
- ECONNRESET = Errno(0x36)
- EDEADLK = Errno(0xb)
- EDESTADDRREQ = Errno(0x27)
- EDOM = Errno(0x21)
- EDQUOT = Errno(0x45)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EFTYPE = Errno(0x4f)
- EHOSTDOWN = Errno(0x40)
- EHOSTUNREACH = Errno(0x41)
- EIDRM = Errno(0x52)
- EILSEQ = Errno(0x55)
- EINPROGRESS = Errno(0x24)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EISCONN = Errno(0x38)
- EISDIR = Errno(0x15)
- ELAST = Errno(0x60)
- ELOOP = Errno(0x3e)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x28)
- EMULTIHOP = Errno(0x5e)
- ENAMETOOLONG = Errno(0x3f)
- ENEEDAUTH = Errno(0x51)
- ENETDOWN = Errno(0x32)
- ENETRESET = Errno(0x34)
- ENETUNREACH = Errno(0x33)
- ENFILE = Errno(0x17)
- ENOATTR = Errno(0x5d)
- ENOBUFS = Errno(0x37)
- ENODATA = Errno(0x59)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOLCK = Errno(0x4d)
- ENOLINK = Errno(0x5f)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x53)
- ENOPROTOOPT = Errno(0x2a)
- ENOSPC = Errno(0x1c)
- ENOSR = Errno(0x5a)
- ENOSTR = Errno(0x5b)
- ENOSYS = Errno(0x4e)
- ENOTBLK = Errno(0xf)
- ENOTCONN = Errno(0x39)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x42)
- ENOTSOCK = Errno(0x26)
- ENOTSUP = Errno(0x56)
- ENOTTY = Errno(0x19)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x2d)
- EOVERFLOW = Errno(0x54)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x2e)
- EPIPE = Errno(0x20)
- EPROCLIM = Errno(0x43)
- EPROCUNAVAIL = Errno(0x4c)
- EPROGMISMATCH = Errno(0x4b)
- EPROGUNAVAIL = Errno(0x4a)
- EPROTO = Errno(0x60)
- EPROTONOSUPPORT = Errno(0x2b)
- EPROTOTYPE = Errno(0x29)
- ERANGE = Errno(0x22)
- EREMOTE = Errno(0x47)
- EROFS = Errno(0x1e)
- ERPCMISMATCH = Errno(0x49)
- ESHUTDOWN = Errno(0x3a)
- ESOCKTNOSUPPORT = Errno(0x2c)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESTALE = Errno(0x46)
- ETIME = Errno(0x5c)
- ETIMEDOUT = Errno(0x3c)
- ETOOMANYREFS = Errno(0x3b)
- ETXTBSY = Errno(0x1a)
- EUSERS = Errno(0x44)
- EWOULDBLOCK = Errno(0x23)
- EXDEV = Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0xa)
- SIGCHLD = Signal(0x14)
- SIGCONT = Signal(0x13)
- SIGEMT = Signal(0x7)
- SIGFPE = Signal(0x8)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINFO = Signal(0x1d)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x17)
- SIGIOT = Signal(0x6)
- SIGKILL = Signal(0x9)
- SIGPIPE = Signal(0xd)
- SIGPROF = Signal(0x1b)
- SIGPWR = Signal(0x20)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTOP = Signal(0x11)
- SIGSYS = Signal(0xc)
- SIGTERM = Signal(0xf)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x12)
- SIGTTIN = Signal(0x15)
- SIGTTOU = Signal(0x16)
- SIGURG = Signal(0x10)
- SIGUSR1 = Signal(0x1e)
- SIGUSR2 = Signal(0x1f)
- SIGVTALRM = Signal(0x1a)
- SIGWINCH = Signal(0x1c)
- SIGXCPU = Signal(0x18)
- SIGXFSZ = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large or too small",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol option not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "connection timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "identifier removed",
- 83: "no message of desired type",
- 84: "value too large to be stored in data type",
- 85: "illegal byte sequence",
- 86: "not supported",
- 87: "operation Canceled",
- 88: "bad or Corrupt message",
- 89: "no message available",
- 90: "no STREAM resources",
- 91: "not a STREAM",
- 92: "STREAM ioctl timeout",
- 93: "attribute not found",
- 94: "multihop attempted",
- 95: "link has been severed",
- 96: "protocol error",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "stopped (signal)",
- 18: "stopped",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "power fail/restart",
-}
diff --git a/src/pkg/syscall/zerrors_netbsd_arm.go b/src/pkg/syscall/zerrors_netbsd_arm.go
deleted file mode 100644
index 1a88c0d22..000000000
--- a/src/pkg/syscall/zerrors_netbsd_arm.go
+++ /dev/null
@@ -1,1684 +0,0 @@
-// mkerrors.sh -marm
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -marm _const.go
-
-package syscall
-
-const (
- AF_APPLETALK = 0x10
- AF_ARP = 0x1c
- AF_BLUETOOTH = 0x1f
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x20
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x18
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x23
- AF_MPLS = 0x21
- AF_NATM = 0x1b
- AF_NS = 0x6
- AF_OROUTE = 0x11
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x22
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- ARPHRD_ARCNET = 0x7
- ARPHRD_ETHER = 0x1
- ARPHRD_FRELAY = 0xf
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_STRIP = 0x17
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B460800 = 0x70800
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B921600 = 0xe1000
- B9600 = 0x2580
- BIOCFEEDBACK = 0x8004427d
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc0084277
- BIOCGETIF = 0x4090426b
- BIOCGFEEDBACK = 0x4004427c
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRTIMEOUT = 0x400c427b
- BIOCGSEESENT = 0x40044278
- BIOCGSTATS = 0x4080426f
- BIOCGSTATSOLD = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044276
- BIOCSETF = 0x80084267
- BIOCSETIF = 0x8090426c
- BIOCSFEEDBACK = 0x8004427d
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRTIMEOUT = 0x800c427a
- BIOCSSEESENT = 0x80044279
- BIOCSTCPF = 0x80084272
- BIOCSUDPF = 0x80084273
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALIGNMENT32 = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DFLTBUFSIZE = 0x100000
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x1000000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- CTL_QUERY = -0x2
- DIOCBSFLUSH = 0x20006478
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HDLC = 0x10
- DLT_HHDLC = 0x79
- DLT_HIPPI = 0xf
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0xe
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RAWAF_MASK = 0x2240000
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xd
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EMUL_LINUX = 0x1
- EMUL_LINUX32 = 0x5
- EMUL_MAXID = 0x6
- ETHERCAP_JUMBO_MTU = 0x4
- ETHERCAP_VLAN_HWTAGGING = 0x2
- ETHERCAP_VLAN_MTU = 0x1
- ETHERMIN = 0x2e
- ETHERMTU = 0x5dc
- ETHERMTU_JUMBO = 0x2328
- ETHERTYPE_8023 = 0x4
- ETHERTYPE_AARP = 0x80f3
- ETHERTYPE_ACCTON = 0x8390
- ETHERTYPE_AEONIC = 0x8036
- ETHERTYPE_ALPHA = 0x814a
- ETHERTYPE_AMBER = 0x6008
- ETHERTYPE_AMOEBA = 0x8145
- ETHERTYPE_APOLLO = 0x80f7
- ETHERTYPE_APOLLODOMAIN = 0x8019
- ETHERTYPE_APPLETALK = 0x809b
- ETHERTYPE_APPLITEK = 0x80c7
- ETHERTYPE_ARGONAUT = 0x803a
- ETHERTYPE_ARP = 0x806
- ETHERTYPE_AT = 0x809b
- ETHERTYPE_ATALK = 0x809b
- ETHERTYPE_ATOMIC = 0x86df
- ETHERTYPE_ATT = 0x8069
- ETHERTYPE_ATTSTANFORD = 0x8008
- ETHERTYPE_AUTOPHON = 0x806a
- ETHERTYPE_AXIS = 0x8856
- ETHERTYPE_BCLOOP = 0x9003
- ETHERTYPE_BOFL = 0x8102
- ETHERTYPE_CABLETRON = 0x7034
- ETHERTYPE_CHAOS = 0x804
- ETHERTYPE_COMDESIGN = 0x806c
- ETHERTYPE_COMPUGRAPHIC = 0x806d
- ETHERTYPE_COUNTERPOINT = 0x8062
- ETHERTYPE_CRONUS = 0x8004
- ETHERTYPE_CRONUSVLN = 0x8003
- ETHERTYPE_DCA = 0x1234
- ETHERTYPE_DDE = 0x807b
- ETHERTYPE_DEBNI = 0xaaaa
- ETHERTYPE_DECAM = 0x8048
- ETHERTYPE_DECCUST = 0x6006
- ETHERTYPE_DECDIAG = 0x6005
- ETHERTYPE_DECDNS = 0x803c
- ETHERTYPE_DECDTS = 0x803e
- ETHERTYPE_DECEXPER = 0x6000
- ETHERTYPE_DECLAST = 0x8041
- ETHERTYPE_DECLTM = 0x803f
- ETHERTYPE_DECMUMPS = 0x6009
- ETHERTYPE_DECNETBIOS = 0x8040
- ETHERTYPE_DELTACON = 0x86de
- ETHERTYPE_DIDDLE = 0x4321
- ETHERTYPE_DLOG1 = 0x660
- ETHERTYPE_DLOG2 = 0x661
- ETHERTYPE_DN = 0x6003
- ETHERTYPE_DOGFIGHT = 0x1989
- ETHERTYPE_DSMD = 0x8039
- ETHERTYPE_ECMA = 0x803
- ETHERTYPE_ENCRYPT = 0x803d
- ETHERTYPE_ES = 0x805d
- ETHERTYPE_EXCELAN = 0x8010
- ETHERTYPE_EXPERDATA = 0x8049
- ETHERTYPE_FLIP = 0x8146
- ETHERTYPE_FLOWCONTROL = 0x8808
- ETHERTYPE_FRARP = 0x808
- ETHERTYPE_GENDYN = 0x8068
- ETHERTYPE_HAYES = 0x8130
- ETHERTYPE_HIPPI_FP = 0x8180
- ETHERTYPE_HITACHI = 0x8820
- ETHERTYPE_HP = 0x8005
- ETHERTYPE_IEEEPUP = 0xa00
- ETHERTYPE_IEEEPUPAT = 0xa01
- ETHERTYPE_IMLBL = 0x4c42
- ETHERTYPE_IMLBLDIAG = 0x424c
- ETHERTYPE_IP = 0x800
- ETHERTYPE_IPAS = 0x876c
- ETHERTYPE_IPV6 = 0x86dd
- ETHERTYPE_IPX = 0x8137
- ETHERTYPE_IPXNEW = 0x8037
- ETHERTYPE_KALPANA = 0x8582
- ETHERTYPE_LANBRIDGE = 0x8038
- ETHERTYPE_LANPROBE = 0x8888
- ETHERTYPE_LAT = 0x6004
- ETHERTYPE_LBACK = 0x9000
- ETHERTYPE_LITTLE = 0x8060
- ETHERTYPE_LOGICRAFT = 0x8148
- ETHERTYPE_LOOPBACK = 0x9000
- ETHERTYPE_MATRA = 0x807a
- ETHERTYPE_MAX = 0xffff
- ETHERTYPE_MERIT = 0x807c
- ETHERTYPE_MICP = 0x873a
- ETHERTYPE_MOPDL = 0x6001
- ETHERTYPE_MOPRC = 0x6002
- ETHERTYPE_MOTOROLA = 0x818d
- ETHERTYPE_MPLS = 0x8847
- ETHERTYPE_MPLS_MCAST = 0x8848
- ETHERTYPE_MUMPS = 0x813f
- ETHERTYPE_NBPCC = 0x3c04
- ETHERTYPE_NBPCLAIM = 0x3c09
- ETHERTYPE_NBPCLREQ = 0x3c05
- ETHERTYPE_NBPCLRSP = 0x3c06
- ETHERTYPE_NBPCREQ = 0x3c02
- ETHERTYPE_NBPCRSP = 0x3c03
- ETHERTYPE_NBPDG = 0x3c07
- ETHERTYPE_NBPDGB = 0x3c08
- ETHERTYPE_NBPDLTE = 0x3c0a
- ETHERTYPE_NBPRAR = 0x3c0c
- ETHERTYPE_NBPRAS = 0x3c0b
- ETHERTYPE_NBPRST = 0x3c0d
- ETHERTYPE_NBPSCD = 0x3c01
- ETHERTYPE_NBPVCD = 0x3c00
- ETHERTYPE_NBS = 0x802
- ETHERTYPE_NCD = 0x8149
- ETHERTYPE_NESTAR = 0x8006
- ETHERTYPE_NETBEUI = 0x8191
- ETHERTYPE_NOVELL = 0x8138
- ETHERTYPE_NS = 0x600
- ETHERTYPE_NSAT = 0x601
- ETHERTYPE_NSCOMPAT = 0x807
- ETHERTYPE_NTRAILER = 0x10
- ETHERTYPE_OS9 = 0x7007
- ETHERTYPE_OS9NET = 0x7009
- ETHERTYPE_PACER = 0x80c6
- ETHERTYPE_PAE = 0x888e
- ETHERTYPE_PCS = 0x4242
- ETHERTYPE_PLANNING = 0x8044
- ETHERTYPE_PPP = 0x880b
- ETHERTYPE_PPPOE = 0x8864
- ETHERTYPE_PPPOEDISC = 0x8863
- ETHERTYPE_PRIMENTS = 0x7031
- ETHERTYPE_PUP = 0x200
- ETHERTYPE_PUPAT = 0x200
- ETHERTYPE_RACAL = 0x7030
- ETHERTYPE_RATIONAL = 0x8150
- ETHERTYPE_RAWFR = 0x6559
- ETHERTYPE_RCL = 0x1995
- ETHERTYPE_RDP = 0x8739
- ETHERTYPE_RETIX = 0x80f2
- ETHERTYPE_REVARP = 0x8035
- ETHERTYPE_SCA = 0x6007
- ETHERTYPE_SECTRA = 0x86db
- ETHERTYPE_SECUREDATA = 0x876d
- ETHERTYPE_SGITW = 0x817e
- ETHERTYPE_SG_BOUNCE = 0x8016
- ETHERTYPE_SG_DIAG = 0x8013
- ETHERTYPE_SG_NETGAMES = 0x8014
- ETHERTYPE_SG_RESV = 0x8015
- ETHERTYPE_SIMNET = 0x5208
- ETHERTYPE_SLOWPROTOCOLS = 0x8809
- ETHERTYPE_SNA = 0x80d5
- ETHERTYPE_SNMP = 0x814c
- ETHERTYPE_SONIX = 0xfaf5
- ETHERTYPE_SPIDER = 0x809f
- ETHERTYPE_SPRITE = 0x500
- ETHERTYPE_STP = 0x8181
- ETHERTYPE_TALARIS = 0x812b
- ETHERTYPE_TALARISMC = 0x852b
- ETHERTYPE_TCPCOMP = 0x876b
- ETHERTYPE_TCPSM = 0x9002
- ETHERTYPE_TEC = 0x814f
- ETHERTYPE_TIGAN = 0x802f
- ETHERTYPE_TRAIL = 0x1000
- ETHERTYPE_TRANSETHER = 0x6558
- ETHERTYPE_TYMSHARE = 0x802e
- ETHERTYPE_UBBST = 0x7005
- ETHERTYPE_UBDEBUG = 0x900
- ETHERTYPE_UBDIAGLOOP = 0x7002
- ETHERTYPE_UBDL = 0x7000
- ETHERTYPE_UBNIU = 0x7001
- ETHERTYPE_UBNMC = 0x7003
- ETHERTYPE_VALID = 0x1600
- ETHERTYPE_VARIAN = 0x80dd
- ETHERTYPE_VAXELN = 0x803b
- ETHERTYPE_VEECO = 0x8067
- ETHERTYPE_VEXP = 0x805b
- ETHERTYPE_VGLAB = 0x8131
- ETHERTYPE_VINES = 0xbad
- ETHERTYPE_VINESECHO = 0xbaf
- ETHERTYPE_VINESLOOP = 0xbae
- ETHERTYPE_VITAL = 0xff00
- ETHERTYPE_VLAN = 0x8100
- ETHERTYPE_VLTLMAN = 0x8080
- ETHERTYPE_VPROD = 0x805c
- ETHERTYPE_VURESERVED = 0x8147
- ETHERTYPE_WATERLOO = 0x8130
- ETHERTYPE_WELLFLEET = 0x8103
- ETHERTYPE_X25 = 0x805
- ETHERTYPE_X75 = 0x801
- ETHERTYPE_XNSSM = 0x9001
- ETHERTYPE_XTP = 0x817d
- ETHER_ADDR_LEN = 0x6
- ETHER_CRC_LEN = 0x4
- ETHER_CRC_POLY_BE = 0x4c11db6
- ETHER_CRC_POLY_LE = 0xedb88320
- ETHER_HDR_LEN = 0xe
- ETHER_MAX_LEN = 0x5ee
- ETHER_MAX_LEN_JUMBO = 0x233a
- ETHER_MIN_LEN = 0x40
- ETHER_PPPOE_ENCAP_LEN = 0x8
- ETHER_TYPE_LEN = 0x2
- ETHER_VLAN_ENCAP_LEN = 0x4
- EVFILT_AIO = 0x2
- EVFILT_PROC = 0x4
- EVFILT_READ = 0x0
- EVFILT_SIGNAL = 0x5
- EVFILT_SYSCOUNT = 0x7
- EVFILT_TIMER = 0x6
- EVFILT_VNODE = 0x3
- EVFILT_WRITE = 0x1
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x100
- FLUSHO = 0x800000
- F_CLOSEM = 0xa
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0xc
- F_FSCTL = -0x80000000
- F_FSDIRMASK = 0x70000000
- F_FSIN = 0x10000000
- F_FSINOUT = 0x30000000
- F_FSOUT = 0x20000000
- F_FSPRIV = 0x8000
- F_FSVOID = 0x40000000
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETNOSIGPIPE = 0xd
- F_GETOWN = 0x5
- F_MAXFD = 0xb
- F_OK = 0x0
- F_PARAM_MASK = 0xfff
- F_PARAM_MAX = 0xfff
- F_RDLCK = 0x1
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETNOSIGPIPE = 0xe
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFA_ROUTE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x8f52
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf8
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ECONET = 0xce
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LINEGROUP = 0xd2
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PLC = 0xae
- IFT_PON155 = 0xcf
- IFT_PON622 = 0xd0
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPATM = 0xc5
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf1
- IFT_Q2931 = 0xc9
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SIPSIG = 0xcc
- IFT_SIPTG = 0xcb
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_STF = 0xd7
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TELINK = 0xc8
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VIRTUALTG = 0xca
- IFT_VOICEDID = 0xd5
- IFT_VOICEEM = 0x64
- IFT_VOICEEMFGD = 0xd3
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFGDEANA = 0xd4
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERCABLE = 0xc6
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IPPROTO_AH = 0x33
- IPPROTO_CARP = 0x70
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IPV6_ICMP = 0x3a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MOBILE = 0x37
- IPPROTO_NONE = 0x3b
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_VRRP = 0x70
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXPACKET = 0xffff
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0xd
- IP_EF = 0x8000
- IP_ERRORMTU = 0x15
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x16
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINFRAGSIZE = 0x45
- IP_MINTTL = 0x18
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x1
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVTTL = 0x17
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_TOS = 0x3
- IP_TTL = 0x4
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x6
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_SPACEAVAIL = 0x5
- MADV_WILLNEED = 0x3
- MAP_ALIGNMENT_16MB = 0x18000000
- MAP_ALIGNMENT_1TB = 0x28000000
- MAP_ALIGNMENT_256TB = 0x30000000
- MAP_ALIGNMENT_4GB = 0x20000000
- MAP_ALIGNMENT_64KB = 0x10000000
- MAP_ALIGNMENT_64PB = 0x38000000
- MAP_ALIGNMENT_MASK = -0x1000000
- MAP_ALIGNMENT_SHIFT = 0x18
- MAP_ANON = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_INHERIT = 0x80
- MAP_INHERIT_COPY = 0x1
- MAP_INHERIT_DEFAULT = 0x1
- MAP_INHERIT_DONATE_COPY = 0x3
- MAP_INHERIT_NONE = 0x2
- MAP_INHERIT_SHARE = 0x0
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_STACK = 0x2000
- MAP_TRYFIXED = 0x400
- MAP_WIRED = 0x800
- MSG_BCAST = 0x100
- MSG_CMSG_CLOEXEC = 0x800
- MSG_CONTROLMBUF = 0x2000000
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOR = 0x8
- MSG_IOVUSRSPACE = 0x4000000
- MSG_LENUSRSPACE = 0x8000000
- MSG_MCAST = 0x200
- MSG_NAMEMBUF = 0x1000000
- MSG_NBIO = 0x1000
- MSG_NOSIGNAL = 0x400
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_USERFLAGS = 0xffffff
- MSG_WAITALL = 0x40
- NAME_MAX = 0x1ff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x5
- NET_RT_MAXID = 0x6
- NET_RT_OIFLIST = 0x4
- NET_RT_OOIFLIST = 0x3
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFIOGETBMAP = 0xc004667a
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_ALT_IO = 0x40000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x400000
- O_CREAT = 0x200
- O_DIRECT = 0x80000
- O_DIRECTORY = 0x200000
- O_DSYNC = 0x10000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_NOSIGPIPE = 0x1000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x20000
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PRI_IOFLUSH = 0x7c
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- RLIMIT_AS = 0xa
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x9
- RTAX_NETMASK = 0x2
- RTAX_TAG = 0x8
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTA_TAG = 0x100
- RTF_ANNOUNCE = 0x20000
- RTF_BLACKHOLE = 0x1000
- RTF_CLONED = 0x2000
- RTF_CLONING = 0x100
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_LLINFO = 0x400
- RTF_MASK = 0x80
- RTF_MODIFIED = 0x20
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_REJECT = 0x8
- RTF_SRC = 0x10000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_CHGADDR = 0x15
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_GET = 0x4
- RTM_IEEE80211 = 0x11
- RTM_IFANNOUNCE = 0x10
- RTM_IFINFO = 0x14
- RTM_LLINFO_UPD = 0x13
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_OIFINFO = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_OOIFINFO = 0xe
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_SETGATE = 0x12
- RTM_VERSION = 0x4
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x4
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x8
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80906931
- SIOCADDRT = 0x8030720a
- SIOCAIFADDR = 0x8040691a
- SIOCALIFADDR = 0x8118691c
- SIOCATMARK = 0x40047307
- SIOCDELMULTI = 0x80906932
- SIOCDELRT = 0x8030720b
- SIOCDIFADDR = 0x80906919
- SIOCDIFPHYADDR = 0x80906949
- SIOCDLIFADDR = 0x8118691e
- SIOCGDRVSPEC = 0xc01c697b
- SIOCGETPFSYNC = 0xc09069f8
- SIOCGETSGCNT = 0xc0147534
- SIOCGETVIFCNT = 0xc0147533
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0906921
- SIOCGIFADDRPREF = 0xc0946920
- SIOCGIFALIAS = 0xc040691b
- SIOCGIFBRDADDR = 0xc0906923
- SIOCGIFCAP = 0xc0206976
- SIOCGIFCONF = 0xc0086926
- SIOCGIFDATA = 0xc0946985
- SIOCGIFDLT = 0xc0906977
- SIOCGIFDSTADDR = 0xc0906922
- SIOCGIFFLAGS = 0xc0906911
- SIOCGIFGENERIC = 0xc090693a
- SIOCGIFMEDIA = 0xc0286936
- SIOCGIFMETRIC = 0xc0906917
- SIOCGIFMTU = 0xc090697e
- SIOCGIFNETMASK = 0xc0906925
- SIOCGIFPDSTADDR = 0xc0906948
- SIOCGIFPSRCADDR = 0xc0906947
- SIOCGLIFADDR = 0xc118691d
- SIOCGLIFPHYADDR = 0xc118694b
- SIOCGLINKSTR = 0xc01c6987
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGVH = 0xc0906983
- SIOCIFCREATE = 0x8090697a
- SIOCIFDESTROY = 0x80906979
- SIOCIFGCLONERS = 0xc00c6978
- SIOCINITIFADDR = 0xc0446984
- SIOCSDRVSPEC = 0x801c697b
- SIOCSETPFSYNC = 0x809069f7
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8090690c
- SIOCSIFADDRPREF = 0x8094691f
- SIOCSIFBRDADDR = 0x80906913
- SIOCSIFCAP = 0x80206975
- SIOCSIFDSTADDR = 0x8090690e
- SIOCSIFFLAGS = 0x80906910
- SIOCSIFGENERIC = 0x80906939
- SIOCSIFMEDIA = 0xc0906935
- SIOCSIFMETRIC = 0x80906918
- SIOCSIFMTU = 0x8090697f
- SIOCSIFNETMASK = 0x80906916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSLIFPHYADDR = 0x8118694a
- SIOCSLINKSTR = 0x801c6988
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SIOCSVH = 0xc0906982
- SIOCZIFDATA = 0xc0946986
- SOCK_CLOEXEC = 0x10000000
- SOCK_DGRAM = 0x2
- SOCK_FLAGS_MASK = 0xf0000000
- SOCK_NONBLOCK = 0x20000000
- SOCK_NOSIGPIPE = 0x40000000
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ACCEPTFILTER = 0x1000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_NOHEADER = 0x100a
- SO_NOSIGPIPE = 0x800
- SO_OOBINLINE = 0x100
- SO_OVERFLOWED = 0x1009
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x100c
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x100b
- SO_TIMESTAMP = 0x2000
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- SYSCTL_VERSION = 0x1000000
- SYSCTL_VERS_0 = 0x0
- SYSCTL_VERS_1 = 0x1000000
- SYSCTL_VERS_MASK = 0xff000000
- S_ARCH1 = 0x10000
- S_ARCH2 = 0x20000
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_CONGCTL = 0x20
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x3
- TCP_KEEPINIT = 0x7
- TCP_KEEPINTVL = 0x5
- TCP_MAXBURST = 0x4
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x10
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x218
- TCP_NODELAY = 0x1
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x400c7458
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLAG_CDTRCTS = 0x10
- TIOCFLAG_CLOCAL = 0x2
- TIOCFLAG_CRTSCTS = 0x4
- TIOCFLAG_MDMBUF = 0x8
- TIOCFLAG_SOFTCAR = 0x1
- TIOCFLUSH = 0x80047410
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGFLAGS = 0x4004745d
- TIOCGLINED = 0x40207442
- TIOCGPGRP = 0x40047477
- TIOCGQSIZE = 0x40047481
- TIOCGRANTPT = 0x20007447
- TIOCGSID = 0x40047463
- TIOCGSIZE = 0x40087468
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGET = 0x4004746a
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTMGET = 0x48087446
- TIOCPTSNAME = 0x48087448
- TIOCRCVFRAME = 0x80047445
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSFLAGS = 0x8004745c
- TIOCSIG = 0x2000745f
- TIOCSLINED = 0x80207443
- TIOCSPGRP = 0x80047476
- TIOCSQSIZE = 0x80047480
- TIOCSSIZE = 0x80087467
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x80047465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCUCNTL = 0x80047466
- TIOCXMTFRAME = 0x80047444
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WALL = 0x8
- WALLSIG = 0x8
- WALTSIG = 0x4
- WCLONE = 0x4
- WCOREFLAG = 0x80
- WNOHANG = 0x1
- WNOWAIT = 0x10000
- WNOZOMBIE = 0x20000
- WOPTSCHECKED = 0x40000
- WSTOPPED = 0x7f
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x30)
- EADDRNOTAVAIL = Errno(0x31)
- EAFNOSUPPORT = Errno(0x2f)
- EAGAIN = Errno(0x23)
- EALREADY = Errno(0x25)
- EAUTH = Errno(0x50)
- EBADF = Errno(0x9)
- EBADMSG = Errno(0x58)
- EBADRPC = Errno(0x48)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x57)
- ECHILD = Errno(0xa)
- ECONNABORTED = Errno(0x35)
- ECONNREFUSED = Errno(0x3d)
- ECONNRESET = Errno(0x36)
- EDEADLK = Errno(0xb)
- EDESTADDRREQ = Errno(0x27)
- EDOM = Errno(0x21)
- EDQUOT = Errno(0x45)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EFTYPE = Errno(0x4f)
- EHOSTDOWN = Errno(0x40)
- EHOSTUNREACH = Errno(0x41)
- EIDRM = Errno(0x52)
- EILSEQ = Errno(0x55)
- EINPROGRESS = Errno(0x24)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EISCONN = Errno(0x38)
- EISDIR = Errno(0x15)
- ELAST = Errno(0x60)
- ELOOP = Errno(0x3e)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x28)
- EMULTIHOP = Errno(0x5e)
- ENAMETOOLONG = Errno(0x3f)
- ENEEDAUTH = Errno(0x51)
- ENETDOWN = Errno(0x32)
- ENETRESET = Errno(0x34)
- ENETUNREACH = Errno(0x33)
- ENFILE = Errno(0x17)
- ENOATTR = Errno(0x5d)
- ENOBUFS = Errno(0x37)
- ENODATA = Errno(0x59)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOLCK = Errno(0x4d)
- ENOLINK = Errno(0x5f)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x53)
- ENOPROTOOPT = Errno(0x2a)
- ENOSPC = Errno(0x1c)
- ENOSR = Errno(0x5a)
- ENOSTR = Errno(0x5b)
- ENOSYS = Errno(0x4e)
- ENOTBLK = Errno(0xf)
- ENOTCONN = Errno(0x39)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x42)
- ENOTSOCK = Errno(0x26)
- ENOTSUP = Errno(0x56)
- ENOTTY = Errno(0x19)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x2d)
- EOVERFLOW = Errno(0x54)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x2e)
- EPIPE = Errno(0x20)
- EPROCLIM = Errno(0x43)
- EPROCUNAVAIL = Errno(0x4c)
- EPROGMISMATCH = Errno(0x4b)
- EPROGUNAVAIL = Errno(0x4a)
- EPROTO = Errno(0x60)
- EPROTONOSUPPORT = Errno(0x2b)
- EPROTOTYPE = Errno(0x29)
- ERANGE = Errno(0x22)
- EREMOTE = Errno(0x47)
- EROFS = Errno(0x1e)
- ERPCMISMATCH = Errno(0x49)
- ESHUTDOWN = Errno(0x3a)
- ESOCKTNOSUPPORT = Errno(0x2c)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESTALE = Errno(0x46)
- ETIME = Errno(0x5c)
- ETIMEDOUT = Errno(0x3c)
- ETOOMANYREFS = Errno(0x3b)
- ETXTBSY = Errno(0x1a)
- EUSERS = Errno(0x44)
- EWOULDBLOCK = Errno(0x23)
- EXDEV = Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0xa)
- SIGCHLD = Signal(0x14)
- SIGCONT = Signal(0x13)
- SIGEMT = Signal(0x7)
- SIGFPE = Signal(0x8)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINFO = Signal(0x1d)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x17)
- SIGIOT = Signal(0x6)
- SIGKILL = Signal(0x9)
- SIGPIPE = Signal(0xd)
- SIGPROF = Signal(0x1b)
- SIGPWR = Signal(0x20)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTOP = Signal(0x11)
- SIGSYS = Signal(0xc)
- SIGTERM = Signal(0xf)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x12)
- SIGTTIN = Signal(0x15)
- SIGTTOU = Signal(0x16)
- SIGURG = Signal(0x10)
- SIGUSR1 = Signal(0x1e)
- SIGUSR2 = Signal(0x1f)
- SIGVTALRM = Signal(0x1a)
- SIGWINCH = Signal(0x1c)
- SIGXCPU = Signal(0x18)
- SIGXFSZ = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large or too small",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol option not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "connection timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "identifier removed",
- 83: "no message of desired type",
- 84: "value too large to be stored in data type",
- 85: "illegal byte sequence",
- 86: "not supported",
- 87: "operation Canceled",
- 88: "bad or Corrupt message",
- 89: "no message available",
- 90: "no STREAM resources",
- 91: "not a STREAM",
- 92: "STREAM ioctl timeout",
- 93: "attribute not found",
- 94: "multihop attempted",
- 95: "link has been severed",
- 96: "protocol error",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "stopped (signal)",
- 18: "stopped",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "power fail/restart",
-}
diff --git a/src/pkg/syscall/zerrors_openbsd_386.go b/src/pkg/syscall/zerrors_openbsd_386.go
deleted file mode 100644
index 082983494..000000000
--- a/src/pkg/syscall/zerrors_openbsd_386.go
+++ /dev/null
@@ -1,1580 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package syscall
-
-const (
- AF_APPLETALK = 0x10
- AF_BLUETOOTH = 0x20
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_ENCAP = 0x1c
- AF_HYLINK = 0xf
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x18
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_KEY = 0x1e
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x24
- AF_MPLS = 0x21
- AF_NATM = 0x1b
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x11
- AF_SIP = 0x1d
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- ARPHRD_ETHER = 0x1
- ARPHRD_FRELAY = 0xf
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDIRFILT = 0x4004427c
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc008427b
- BIOCGETIF = 0x4020426b
- BIOCGFILDROP = 0x40044278
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044273
- BIOCGRTIMEOUT = 0x400c426e
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCLOCK = 0x20004276
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDIRFILT = 0x8004427d
- BIOCSDLT = 0x8004427a
- BIOCSETF = 0x80084267
- BIOCSETIF = 0x8020426c
- BIOCSETWF = 0x80084277
- BIOCSFILDROP = 0x80044279
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044272
- BIOCSRTIMEOUT = 0x800c426d
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIRECTION_IN = 0x1
- BPF_DIRECTION_OUT = 0x2
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x200000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0xff
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DIOCOSFPFLUSH = 0x2000444e
- DLT_ARCNET = 0x7
- DLT_ATM_RFC1483 = 0xb
- DLT_AX25 = 0x3
- DLT_CHAOS = 0x5
- DLT_C_HDLC = 0x68
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0xd
- DLT_FDDI = 0xa
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_LOOP = 0xc
- DLT_MPLS = 0xdb
- DLT_NULL = 0x0
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_SERIAL = 0x32
- DLT_PRONET = 0x4
- DLT_RAW = 0xe
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EMT_TAGOVF = 0x1
- EMUL_ENABLED = 0x1
- EMUL_NATIVE = 0x2
- ENDRUNDISC = 0x9
- ETHERMIN = 0x2e
- ETHERMTU = 0x5dc
- ETHERTYPE_8023 = 0x4
- ETHERTYPE_AARP = 0x80f3
- ETHERTYPE_ACCTON = 0x8390
- ETHERTYPE_AEONIC = 0x8036
- ETHERTYPE_ALPHA = 0x814a
- ETHERTYPE_AMBER = 0x6008
- ETHERTYPE_AMOEBA = 0x8145
- ETHERTYPE_AOE = 0x88a2
- ETHERTYPE_APOLLO = 0x80f7
- ETHERTYPE_APOLLODOMAIN = 0x8019
- ETHERTYPE_APPLETALK = 0x809b
- ETHERTYPE_APPLITEK = 0x80c7
- ETHERTYPE_ARGONAUT = 0x803a
- ETHERTYPE_ARP = 0x806
- ETHERTYPE_AT = 0x809b
- ETHERTYPE_ATALK = 0x809b
- ETHERTYPE_ATOMIC = 0x86df
- ETHERTYPE_ATT = 0x8069
- ETHERTYPE_ATTSTANFORD = 0x8008
- ETHERTYPE_AUTOPHON = 0x806a
- ETHERTYPE_AXIS = 0x8856
- ETHERTYPE_BCLOOP = 0x9003
- ETHERTYPE_BOFL = 0x8102
- ETHERTYPE_CABLETRON = 0x7034
- ETHERTYPE_CHAOS = 0x804
- ETHERTYPE_COMDESIGN = 0x806c
- ETHERTYPE_COMPUGRAPHIC = 0x806d
- ETHERTYPE_COUNTERPOINT = 0x8062
- ETHERTYPE_CRONUS = 0x8004
- ETHERTYPE_CRONUSVLN = 0x8003
- ETHERTYPE_DCA = 0x1234
- ETHERTYPE_DDE = 0x807b
- ETHERTYPE_DEBNI = 0xaaaa
- ETHERTYPE_DECAM = 0x8048
- ETHERTYPE_DECCUST = 0x6006
- ETHERTYPE_DECDIAG = 0x6005
- ETHERTYPE_DECDNS = 0x803c
- ETHERTYPE_DECDTS = 0x803e
- ETHERTYPE_DECEXPER = 0x6000
- ETHERTYPE_DECLAST = 0x8041
- ETHERTYPE_DECLTM = 0x803f
- ETHERTYPE_DECMUMPS = 0x6009
- ETHERTYPE_DECNETBIOS = 0x8040
- ETHERTYPE_DELTACON = 0x86de
- ETHERTYPE_DIDDLE = 0x4321
- ETHERTYPE_DLOG1 = 0x660
- ETHERTYPE_DLOG2 = 0x661
- ETHERTYPE_DN = 0x6003
- ETHERTYPE_DOGFIGHT = 0x1989
- ETHERTYPE_DSMD = 0x8039
- ETHERTYPE_ECMA = 0x803
- ETHERTYPE_ENCRYPT = 0x803d
- ETHERTYPE_ES = 0x805d
- ETHERTYPE_EXCELAN = 0x8010
- ETHERTYPE_EXPERDATA = 0x8049
- ETHERTYPE_FLIP = 0x8146
- ETHERTYPE_FLOWCONTROL = 0x8808
- ETHERTYPE_FRARP = 0x808
- ETHERTYPE_GENDYN = 0x8068
- ETHERTYPE_HAYES = 0x8130
- ETHERTYPE_HIPPI_FP = 0x8180
- ETHERTYPE_HITACHI = 0x8820
- ETHERTYPE_HP = 0x8005
- ETHERTYPE_IEEEPUP = 0xa00
- ETHERTYPE_IEEEPUPAT = 0xa01
- ETHERTYPE_IMLBL = 0x4c42
- ETHERTYPE_IMLBLDIAG = 0x424c
- ETHERTYPE_IP = 0x800
- ETHERTYPE_IPAS = 0x876c
- ETHERTYPE_IPV6 = 0x86dd
- ETHERTYPE_IPX = 0x8137
- ETHERTYPE_IPXNEW = 0x8037
- ETHERTYPE_KALPANA = 0x8582
- ETHERTYPE_LANBRIDGE = 0x8038
- ETHERTYPE_LANPROBE = 0x8888
- ETHERTYPE_LAT = 0x6004
- ETHERTYPE_LBACK = 0x9000
- ETHERTYPE_LITTLE = 0x8060
- ETHERTYPE_LLDP = 0x88cc
- ETHERTYPE_LOGICRAFT = 0x8148
- ETHERTYPE_LOOPBACK = 0x9000
- ETHERTYPE_MATRA = 0x807a
- ETHERTYPE_MAX = 0xffff
- ETHERTYPE_MERIT = 0x807c
- ETHERTYPE_MICP = 0x873a
- ETHERTYPE_MOPDL = 0x6001
- ETHERTYPE_MOPRC = 0x6002
- ETHERTYPE_MOTOROLA = 0x818d
- ETHERTYPE_MPLS = 0x8847
- ETHERTYPE_MPLS_MCAST = 0x8848
- ETHERTYPE_MUMPS = 0x813f
- ETHERTYPE_NBPCC = 0x3c04
- ETHERTYPE_NBPCLAIM = 0x3c09
- ETHERTYPE_NBPCLREQ = 0x3c05
- ETHERTYPE_NBPCLRSP = 0x3c06
- ETHERTYPE_NBPCREQ = 0x3c02
- ETHERTYPE_NBPCRSP = 0x3c03
- ETHERTYPE_NBPDG = 0x3c07
- ETHERTYPE_NBPDGB = 0x3c08
- ETHERTYPE_NBPDLTE = 0x3c0a
- ETHERTYPE_NBPRAR = 0x3c0c
- ETHERTYPE_NBPRAS = 0x3c0b
- ETHERTYPE_NBPRST = 0x3c0d
- ETHERTYPE_NBPSCD = 0x3c01
- ETHERTYPE_NBPVCD = 0x3c00
- ETHERTYPE_NBS = 0x802
- ETHERTYPE_NCD = 0x8149
- ETHERTYPE_NESTAR = 0x8006
- ETHERTYPE_NETBEUI = 0x8191
- ETHERTYPE_NOVELL = 0x8138
- ETHERTYPE_NS = 0x600
- ETHERTYPE_NSAT = 0x601
- ETHERTYPE_NSCOMPAT = 0x807
- ETHERTYPE_NTRAILER = 0x10
- ETHERTYPE_OS9 = 0x7007
- ETHERTYPE_OS9NET = 0x7009
- ETHERTYPE_PACER = 0x80c6
- ETHERTYPE_PAE = 0x888e
- ETHERTYPE_PCS = 0x4242
- ETHERTYPE_PLANNING = 0x8044
- ETHERTYPE_PPP = 0x880b
- ETHERTYPE_PPPOE = 0x8864
- ETHERTYPE_PPPOEDISC = 0x8863
- ETHERTYPE_PRIMENTS = 0x7031
- ETHERTYPE_PUP = 0x200
- ETHERTYPE_PUPAT = 0x200
- ETHERTYPE_QINQ = 0x88a8
- ETHERTYPE_RACAL = 0x7030
- ETHERTYPE_RATIONAL = 0x8150
- ETHERTYPE_RAWFR = 0x6559
- ETHERTYPE_RCL = 0x1995
- ETHERTYPE_RDP = 0x8739
- ETHERTYPE_RETIX = 0x80f2
- ETHERTYPE_REVARP = 0x8035
- ETHERTYPE_SCA = 0x6007
- ETHERTYPE_SECTRA = 0x86db
- ETHERTYPE_SECUREDATA = 0x876d
- ETHERTYPE_SGITW = 0x817e
- ETHERTYPE_SG_BOUNCE = 0x8016
- ETHERTYPE_SG_DIAG = 0x8013
- ETHERTYPE_SG_NETGAMES = 0x8014
- ETHERTYPE_SG_RESV = 0x8015
- ETHERTYPE_SIMNET = 0x5208
- ETHERTYPE_SLOW = 0x8809
- ETHERTYPE_SNA = 0x80d5
- ETHERTYPE_SNMP = 0x814c
- ETHERTYPE_SONIX = 0xfaf5
- ETHERTYPE_SPIDER = 0x809f
- ETHERTYPE_SPRITE = 0x500
- ETHERTYPE_STP = 0x8181
- ETHERTYPE_TALARIS = 0x812b
- ETHERTYPE_TALARISMC = 0x852b
- ETHERTYPE_TCPCOMP = 0x876b
- ETHERTYPE_TCPSM = 0x9002
- ETHERTYPE_TEC = 0x814f
- ETHERTYPE_TIGAN = 0x802f
- ETHERTYPE_TRAIL = 0x1000
- ETHERTYPE_TRANSETHER = 0x6558
- ETHERTYPE_TYMSHARE = 0x802e
- ETHERTYPE_UBBST = 0x7005
- ETHERTYPE_UBDEBUG = 0x900
- ETHERTYPE_UBDIAGLOOP = 0x7002
- ETHERTYPE_UBDL = 0x7000
- ETHERTYPE_UBNIU = 0x7001
- ETHERTYPE_UBNMC = 0x7003
- ETHERTYPE_VALID = 0x1600
- ETHERTYPE_VARIAN = 0x80dd
- ETHERTYPE_VAXELN = 0x803b
- ETHERTYPE_VEECO = 0x8067
- ETHERTYPE_VEXP = 0x805b
- ETHERTYPE_VGLAB = 0x8131
- ETHERTYPE_VINES = 0xbad
- ETHERTYPE_VINESECHO = 0xbaf
- ETHERTYPE_VINESLOOP = 0xbae
- ETHERTYPE_VITAL = 0xff00
- ETHERTYPE_VLAN = 0x8100
- ETHERTYPE_VLTLMAN = 0x8080
- ETHERTYPE_VPROD = 0x805c
- ETHERTYPE_VURESERVED = 0x8147
- ETHERTYPE_WATERLOO = 0x8130
- ETHERTYPE_WELLFLEET = 0x8103
- ETHERTYPE_X25 = 0x805
- ETHERTYPE_X75 = 0x801
- ETHERTYPE_XNSSM = 0x9001
- ETHERTYPE_XTP = 0x817d
- ETHER_ADDR_LEN = 0x6
- ETHER_ALIGN = 0x2
- ETHER_CRC_LEN = 0x4
- ETHER_CRC_POLY_BE = 0x4c11db6
- ETHER_CRC_POLY_LE = 0xedb88320
- ETHER_HDR_LEN = 0xe
- ETHER_MAX_DIX_LEN = 0x600
- ETHER_MAX_LEN = 0x5ee
- ETHER_MIN_LEN = 0x40
- ETHER_TYPE_LEN = 0x2
- ETHER_VLAN_ENCAP_LEN = 0x4
- EVFILT_AIO = -0x3
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0x7
- EVFILT_TIMER = -0x7
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0xa
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETOWN = 0x5
- F_OK = 0x0
- F_RDLCK = 0x1
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFA_ROUTE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x8e52
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BLUETOOTH = 0xf8
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf7
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DUMMY = 0xf1
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ECONET = 0xce
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf3
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LINEGROUP = 0xd2
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf5
- IFT_PFLOW = 0xf9
- IFT_PFSYNC = 0xf6
- IFT_PLC = 0xae
- IFT_PON155 = 0xcf
- IFT_PON622 = 0xd0
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPATM = 0xc5
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf2
- IFT_Q2931 = 0xc9
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SIPSIG = 0xcc
- IFT_SIPTG = 0xcb
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TELINK = 0xc8
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VIRTUALTG = 0xca
- IFT_VOICEDID = 0xd5
- IFT_VOICEEM = 0x64
- IFT_VOICEEMFGD = 0xd3
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFGDEANA = 0xd4
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERCABLE = 0xc6
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IN_RFC3021_HOST = 0x1
- IN_RFC3021_NET = 0xfffffffe
- IN_RFC3021_NSHIFT = 0x1f
- IPPROTO_AH = 0x33
- IPPROTO_CARP = 0x70
- IPPROTO_DIVERT = 0x102
- IPPROTO_DIVERT_INIT = 0x2
- IPPROTO_DIVERT_RESP = 0x1
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x103
- IPPROTO_MOBILE = 0x37
- IPPROTO_MPLS = 0x89
- IPPROTO_NONE = 0x3b
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPV6_AUTH_LEVEL = 0x35
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_ESP_NETWORK_LEVEL = 0x37
- IPV6_ESP_TRANS_LEVEL = 0x36
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPCOMP_LEVEL = 0x3c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXPACKET = 0xffff
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_OPTIONS = 0x1
- IPV6_PATHMTU = 0x2c
- IPV6_PIPEX = 0x3f
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVDSTPORT = 0x40
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTABLE = 0x1021
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_AUTH_LEVEL = 0x14
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DIVERTFL = 0x1022
- IP_DROP_MEMBERSHIP = 0xd
- IP_ESP_NETWORK_LEVEL = 0x16
- IP_ESP_TRANS_LEVEL = 0x15
- IP_HDRINCL = 0x2
- IP_IPCOMP_LEVEL = 0x1d
- IP_IPSECFLOWINFO = 0x24
- IP_IPSEC_LOCAL_AUTH = 0x1b
- IP_IPSEC_LOCAL_CRED = 0x19
- IP_IPSEC_LOCAL_ID = 0x17
- IP_IPSEC_REMOTE_AUTH = 0x1c
- IP_IPSEC_REMOTE_CRED = 0x1a
- IP_IPSEC_REMOTE_ID = 0x18
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MF = 0x2000
- IP_MINTTL = 0x20
- IP_MIN_MEMBERSHIPS = 0xf
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x1
- IP_PIPEX = 0x22
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVDSTPORT = 0x21
- IP_RECVIF = 0x1e
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVRTABLE = 0x23
- IP_RECVTTL = 0x1f
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RTABLE = 0x1021
- IP_TOS = 0x3
- IP_TTL = 0x4
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LCNT_OVERLOAD_FLUSH = 0x6
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x6
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_SPACEAVAIL = 0x5
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x1000
- MAP_COPY = 0x4
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FLAGMASK = 0x1ff7
- MAP_HASSEMAPHORE = 0x200
- MAP_INHERIT = 0x80
- MAP_INHERIT_COPY = 0x1
- MAP_INHERIT_DONATE_COPY = 0x3
- MAP_INHERIT_NONE = 0x2
- MAP_INHERIT_SHARE = 0x0
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_TRYFIXED = 0x400
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_BCAST = 0x100
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOR = 0x8
- MSG_MCAST = 0x200
- MSG_NOSIGNAL = 0x400
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x4
- MS_SYNC = 0x2
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_MAXID = 0x6
- NET_RT_STATS = 0x4
- NET_RT_TABLE = 0x5
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EOF = 0x2
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRUNCATE = 0x80
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- ONLCR = 0x2
- ONLRET = 0x80
- ONOCR = 0x40
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x10000
- O_CREAT = 0x200
- O_DIRECTORY = 0x20000
- O_DSYNC = 0x80
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x80
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PF_FLUSH = 0x1
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PT_MASK = 0x3ff000
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_LABEL = 0xa
- RTAX_MAX = 0xb
- RTAX_NETMASK = 0x2
- RTAX_SRC = 0x8
- RTAX_SRCMASK = 0x9
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_LABEL = 0x400
- RTA_NETMASK = 0x4
- RTA_SRC = 0x100
- RTA_SRCMASK = 0x200
- RTF_ANNOUNCE = 0x4000
- RTF_BLACKHOLE = 0x1000
- RTF_CLONED = 0x10000
- RTF_CLONING = 0x100
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_FMASK = 0x10f808
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_LLINFO = 0x400
- RTF_MASK = 0x80
- RTF_MODIFIED = 0x20
- RTF_MPATH = 0x40000
- RTF_MPLS = 0x100000
- RTF_PERMANENT_ARP = 0x2000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x2000
- RTF_REJECT = 0x8
- RTF_SOURCE = 0x20000
- RTF_STATIC = 0x800
- RTF_TUNNEL = 0x100000
- RTF_UP = 0x1
- RTF_USETRAILERS = 0x8000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DESYNC = 0x10
- RTM_GET = 0x4
- RTM_IFANNOUNCE = 0xf
- RTM_IFINFO = 0xe
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MAXSIZE = 0x800
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RT_TABLEID_MAX = 0xff
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x4
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCAIFADDR = 0x8040691a
- SIOCAIFGROUP = 0x80246987
- SIOCALIFADDR = 0x8218691c
- SIOCATMARK = 0x40047307
- SIOCBRDGADD = 0x8054693c
- SIOCBRDGADDS = 0x80546941
- SIOCBRDGARL = 0x806e694d
- SIOCBRDGDADDR = 0x81286947
- SIOCBRDGDEL = 0x8054693d
- SIOCBRDGDELS = 0x80546942
- SIOCBRDGFLUSH = 0x80546948
- SIOCBRDGFRL = 0x806e694e
- SIOCBRDGGCACHE = 0xc0146941
- SIOCBRDGGFD = 0xc0146952
- SIOCBRDGGHT = 0xc0146951
- SIOCBRDGGIFFLGS = 0xc054693e
- SIOCBRDGGMA = 0xc0146953
- SIOCBRDGGPARAM = 0xc03c6958
- SIOCBRDGGPRI = 0xc0146950
- SIOCBRDGGRL = 0xc028694f
- SIOCBRDGGSIFS = 0xc054693c
- SIOCBRDGGTO = 0xc0146946
- SIOCBRDGIFS = 0xc0546942
- SIOCBRDGRTS = 0xc0186943
- SIOCBRDGSADDR = 0xc1286944
- SIOCBRDGSCACHE = 0x80146940
- SIOCBRDGSFD = 0x80146952
- SIOCBRDGSHT = 0x80146951
- SIOCBRDGSIFCOST = 0x80546955
- SIOCBRDGSIFFLGS = 0x8054693f
- SIOCBRDGSIFPRIO = 0x80546954
- SIOCBRDGSMA = 0x80146953
- SIOCBRDGSPRI = 0x80146950
- SIOCBRDGSPROTO = 0x8014695a
- SIOCBRDGSTO = 0x80146945
- SIOCBRDGSTXHC = 0x80146959
- SIOCDELMULTI = 0x80206932
- SIOCDIFADDR = 0x80206919
- SIOCDIFGROUP = 0x80246989
- SIOCDIFPHYADDR = 0x80206949
- SIOCDLIFADDR = 0x8218691e
- SIOCGETKALIVE = 0xc01869a4
- SIOCGETLABEL = 0x8020699a
- SIOCGETPFLOW = 0xc02069fe
- SIOCGETPFSYNC = 0xc02069f8
- SIOCGETSGCNT = 0xc0147534
- SIOCGETVIFCNT = 0xc0147533
- SIOCGETVLAN = 0xc0206990
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCONF = 0xc0086924
- SIOCGIFDATA = 0xc020691b
- SIOCGIFDESCR = 0xc0206981
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGATTR = 0xc024698b
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFGMEMB = 0xc024698a
- SIOCGIFGROUP = 0xc0246988
- SIOCGIFHARDMTU = 0xc02069a5
- SIOCGIFMEDIA = 0xc0286936
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc020697e
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206948
- SIOCGIFPRIORITY = 0xc020699c
- SIOCGIFPSRCADDR = 0xc0206947
- SIOCGIFRDOMAIN = 0xc02069a0
- SIOCGIFRTLABEL = 0xc0206983
- SIOCGIFTIMESLOT = 0xc0206986
- SIOCGIFXFLAGS = 0xc020699e
- SIOCGLIFADDR = 0xc218691d
- SIOCGLIFPHYADDR = 0xc218694b
- SIOCGLIFPHYRTABLE = 0xc02069a2
- SIOCGLIFPHYTTL = 0xc02069a9
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGSPPPPARAMS = 0xc0206994
- SIOCGVH = 0xc02069f6
- SIOCGVNETID = 0xc02069a7
- SIOCIFCREATE = 0x8020697a
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc00c6978
- SIOCSETKALIVE = 0x801869a3
- SIOCSETLABEL = 0x80206999
- SIOCSETPFLOW = 0x802069fd
- SIOCSETPFSYNC = 0x802069f7
- SIOCSETVLAN = 0x8020698f
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFASYNCMAP = 0x8020697d
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFDESCR = 0x80206980
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGATTR = 0x8024698c
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFLLADDR = 0x8020691f
- SIOCSIFMEDIA = 0xc0206935
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x8020697f
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSIFPRIORITY = 0x8020699b
- SIOCSIFRDOMAIN = 0x8020699f
- SIOCSIFRTLABEL = 0x80206982
- SIOCSIFTIMESLOT = 0x80206985
- SIOCSIFXFLAGS = 0x8020699d
- SIOCSLIFPHYADDR = 0x8218694a
- SIOCSLIFPHYRTABLE = 0x802069a1
- SIOCSLIFPHYTTL = 0x802069a8
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SIOCSSPPPPARAMS = 0x80206993
- SIOCSVH = 0xc02069f5
- SIOCSVNETID = 0x802069a6
- SOCK_DGRAM = 0x2
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_BINDANY = 0x1000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_NETPROC = 0x1020
- SO_OOBINLINE = 0x100
- SO_PEERCRED = 0x1022
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RTABLE = 0x1021
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_SPLICE = 0x1023
- SO_TIMESTAMP = 0x800
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_MAXBURST = 0x4
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x3
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x4
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOPUSH = 0x10
- TCP_NSTATES = 0xb
- TCP_SACK_ENABLE = 0x8
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLAG_CLOCAL = 0x2
- TIOCFLAG_CRTSCTS = 0x4
- TIOCFLAG_MDMBUF = 0x8
- TIOCFLAG_PPS = 0x10
- TIOCFLAG_SOFTCAR = 0x1
- TIOCFLUSH = 0x80047410
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGFLAGS = 0x4004745d
- TIOCGPGRP = 0x40047477
- TIOCGSID = 0x40047463
- TIOCGTSTAMP = 0x400c745b
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x4004746a
- TIOCMODS = 0x8004746d
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSFLAGS = 0x8004745c
- TIOCSIG = 0x8004745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x80047465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSTSTAMP = 0x8008745a
- TIOCSWINSZ = 0x80087467
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WALTSIG = 0x4
- WCONTINUED = 0x8
- WCOREFLAG = 0x80
- WNOHANG = 0x1
- WSTOPPED = 0x7f
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x30)
- EADDRNOTAVAIL = Errno(0x31)
- EAFNOSUPPORT = Errno(0x2f)
- EAGAIN = Errno(0x23)
- EALREADY = Errno(0x25)
- EAUTH = Errno(0x50)
- EBADF = Errno(0x9)
- EBADRPC = Errno(0x48)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x58)
- ECHILD = Errno(0xa)
- ECONNABORTED = Errno(0x35)
- ECONNREFUSED = Errno(0x3d)
- ECONNRESET = Errno(0x36)
- EDEADLK = Errno(0xb)
- EDESTADDRREQ = Errno(0x27)
- EDOM = Errno(0x21)
- EDQUOT = Errno(0x45)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EFTYPE = Errno(0x4f)
- EHOSTDOWN = Errno(0x40)
- EHOSTUNREACH = Errno(0x41)
- EIDRM = Errno(0x59)
- EILSEQ = Errno(0x54)
- EINPROGRESS = Errno(0x24)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EIPSEC = Errno(0x52)
- EISCONN = Errno(0x38)
- EISDIR = Errno(0x15)
- ELAST = Errno(0x5b)
- ELOOP = Errno(0x3e)
- EMEDIUMTYPE = Errno(0x56)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x28)
- ENAMETOOLONG = Errno(0x3f)
- ENEEDAUTH = Errno(0x51)
- ENETDOWN = Errno(0x32)
- ENETRESET = Errno(0x34)
- ENETUNREACH = Errno(0x33)
- ENFILE = Errno(0x17)
- ENOATTR = Errno(0x53)
- ENOBUFS = Errno(0x37)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOLCK = Errno(0x4d)
- ENOMEDIUM = Errno(0x55)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x5a)
- ENOPROTOOPT = Errno(0x2a)
- ENOSPC = Errno(0x1c)
- ENOSYS = Errno(0x4e)
- ENOTBLK = Errno(0xf)
- ENOTCONN = Errno(0x39)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x42)
- ENOTSOCK = Errno(0x26)
- ENOTSUP = Errno(0x5b)
- ENOTTY = Errno(0x19)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x2d)
- EOVERFLOW = Errno(0x57)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x2e)
- EPIPE = Errno(0x20)
- EPROCLIM = Errno(0x43)
- EPROCUNAVAIL = Errno(0x4c)
- EPROGMISMATCH = Errno(0x4b)
- EPROGUNAVAIL = Errno(0x4a)
- EPROTONOSUPPORT = Errno(0x2b)
- EPROTOTYPE = Errno(0x29)
- ERANGE = Errno(0x22)
- EREMOTE = Errno(0x47)
- EROFS = Errno(0x1e)
- ERPCMISMATCH = Errno(0x49)
- ESHUTDOWN = Errno(0x3a)
- ESOCKTNOSUPPORT = Errno(0x2c)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESTALE = Errno(0x46)
- ETIMEDOUT = Errno(0x3c)
- ETOOMANYREFS = Errno(0x3b)
- ETXTBSY = Errno(0x1a)
- EUSERS = Errno(0x44)
- EWOULDBLOCK = Errno(0x23)
- EXDEV = Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0xa)
- SIGCHLD = Signal(0x14)
- SIGCONT = Signal(0x13)
- SIGEMT = Signal(0x7)
- SIGFPE = Signal(0x8)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINFO = Signal(0x1d)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x17)
- SIGIOT = Signal(0x6)
- SIGKILL = Signal(0x9)
- SIGPIPE = Signal(0xd)
- SIGPROF = Signal(0x1b)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTOP = Signal(0x11)
- SIGSYS = Signal(0xc)
- SIGTERM = Signal(0xf)
- SIGTHR = Signal(0x20)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x12)
- SIGTTIN = Signal(0x15)
- SIGTTOU = Signal(0x16)
- SIGURG = Signal(0x10)
- SIGUSR1 = Signal(0x1e)
- SIGUSR2 = Signal(0x1f)
- SIGVTALRM = Signal(0x1a)
- SIGWINCH = Signal(0x1c)
- SIGXCPU = Signal(0x18)
- SIGXFSZ = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "connection timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "IPsec processing failure",
- 83: "attribute not found",
- 84: "illegal byte sequence",
- 85: "no medium found",
- 86: "wrong medium type",
- 87: "value too large to be stored in data type",
- 88: "operation canceled",
- 89: "identifier removed",
- 90: "no message of desired type",
- 91: "not supported",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "stopped (signal)",
- 18: "stopped",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "thread AST",
-}
diff --git a/src/pkg/syscall/zerrors_openbsd_amd64.go b/src/pkg/syscall/zerrors_openbsd_amd64.go
deleted file mode 100644
index e9fa37cde..000000000
--- a/src/pkg/syscall/zerrors_openbsd_amd64.go
+++ /dev/null
@@ -1,1579 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package syscall
-
-const (
- AF_APPLETALK = 0x10
- AF_BLUETOOTH = 0x20
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1a
- AF_ECMA = 0x8
- AF_ENCAP = 0x1c
- AF_HYLINK = 0xf
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x18
- AF_IPX = 0x17
- AF_ISDN = 0x1a
- AF_ISO = 0x7
- AF_KEY = 0x1e
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x24
- AF_MPLS = 0x21
- AF_NATM = 0x1b
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PUP = 0x4
- AF_ROUTE = 0x11
- AF_SIP = 0x1d
- AF_SNA = 0xb
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- ARPHRD_ETHER = 0x1
- ARPHRD_FRELAY = 0xf
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDIRFILT = 0x4004427c
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc010427b
- BIOCGETIF = 0x4020426b
- BIOCGFILDROP = 0x40044278
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044273
- BIOCGRTIMEOUT = 0x4010426e
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCLOCK = 0x20004276
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDIRFILT = 0x8004427d
- BIOCSDLT = 0x8004427a
- BIOCSETF = 0x80104267
- BIOCSETIF = 0x8020426c
- BIOCSETWF = 0x80104277
- BIOCSFILDROP = 0x80044279
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044272
- BIOCSRTIMEOUT = 0x8010426d
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIRECTION_IN = 0x1
- BPF_DIRECTION_OUT = 0x2
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x200000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CREAD = 0x800
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0xff
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DIOCOSFPFLUSH = 0x2000444e
- DLT_ARCNET = 0x7
- DLT_ATM_RFC1483 = 0xb
- DLT_AX25 = 0x3
- DLT_CHAOS = 0x5
- DLT_C_HDLC = 0x68
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0xd
- DLT_FDDI = 0xa
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_LOOP = 0xc
- DLT_MPLS = 0xdb
- DLT_NULL = 0x0
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_SERIAL = 0x32
- DLT_PRONET = 0x4
- DLT_RAW = 0xe
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EMT_TAGOVF = 0x1
- EMUL_ENABLED = 0x1
- EMUL_NATIVE = 0x2
- ENDRUNDISC = 0x9
- ETHERMIN = 0x2e
- ETHERMTU = 0x5dc
- ETHERTYPE_8023 = 0x4
- ETHERTYPE_AARP = 0x80f3
- ETHERTYPE_ACCTON = 0x8390
- ETHERTYPE_AEONIC = 0x8036
- ETHERTYPE_ALPHA = 0x814a
- ETHERTYPE_AMBER = 0x6008
- ETHERTYPE_AMOEBA = 0x8145
- ETHERTYPE_AOE = 0x88a2
- ETHERTYPE_APOLLO = 0x80f7
- ETHERTYPE_APOLLODOMAIN = 0x8019
- ETHERTYPE_APPLETALK = 0x809b
- ETHERTYPE_APPLITEK = 0x80c7
- ETHERTYPE_ARGONAUT = 0x803a
- ETHERTYPE_ARP = 0x806
- ETHERTYPE_AT = 0x809b
- ETHERTYPE_ATALK = 0x809b
- ETHERTYPE_ATOMIC = 0x86df
- ETHERTYPE_ATT = 0x8069
- ETHERTYPE_ATTSTANFORD = 0x8008
- ETHERTYPE_AUTOPHON = 0x806a
- ETHERTYPE_AXIS = 0x8856
- ETHERTYPE_BCLOOP = 0x9003
- ETHERTYPE_BOFL = 0x8102
- ETHERTYPE_CABLETRON = 0x7034
- ETHERTYPE_CHAOS = 0x804
- ETHERTYPE_COMDESIGN = 0x806c
- ETHERTYPE_COMPUGRAPHIC = 0x806d
- ETHERTYPE_COUNTERPOINT = 0x8062
- ETHERTYPE_CRONUS = 0x8004
- ETHERTYPE_CRONUSVLN = 0x8003
- ETHERTYPE_DCA = 0x1234
- ETHERTYPE_DDE = 0x807b
- ETHERTYPE_DEBNI = 0xaaaa
- ETHERTYPE_DECAM = 0x8048
- ETHERTYPE_DECCUST = 0x6006
- ETHERTYPE_DECDIAG = 0x6005
- ETHERTYPE_DECDNS = 0x803c
- ETHERTYPE_DECDTS = 0x803e
- ETHERTYPE_DECEXPER = 0x6000
- ETHERTYPE_DECLAST = 0x8041
- ETHERTYPE_DECLTM = 0x803f
- ETHERTYPE_DECMUMPS = 0x6009
- ETHERTYPE_DECNETBIOS = 0x8040
- ETHERTYPE_DELTACON = 0x86de
- ETHERTYPE_DIDDLE = 0x4321
- ETHERTYPE_DLOG1 = 0x660
- ETHERTYPE_DLOG2 = 0x661
- ETHERTYPE_DN = 0x6003
- ETHERTYPE_DOGFIGHT = 0x1989
- ETHERTYPE_DSMD = 0x8039
- ETHERTYPE_ECMA = 0x803
- ETHERTYPE_ENCRYPT = 0x803d
- ETHERTYPE_ES = 0x805d
- ETHERTYPE_EXCELAN = 0x8010
- ETHERTYPE_EXPERDATA = 0x8049
- ETHERTYPE_FLIP = 0x8146
- ETHERTYPE_FLOWCONTROL = 0x8808
- ETHERTYPE_FRARP = 0x808
- ETHERTYPE_GENDYN = 0x8068
- ETHERTYPE_HAYES = 0x8130
- ETHERTYPE_HIPPI_FP = 0x8180
- ETHERTYPE_HITACHI = 0x8820
- ETHERTYPE_HP = 0x8005
- ETHERTYPE_IEEEPUP = 0xa00
- ETHERTYPE_IEEEPUPAT = 0xa01
- ETHERTYPE_IMLBL = 0x4c42
- ETHERTYPE_IMLBLDIAG = 0x424c
- ETHERTYPE_IP = 0x800
- ETHERTYPE_IPAS = 0x876c
- ETHERTYPE_IPV6 = 0x86dd
- ETHERTYPE_IPX = 0x8137
- ETHERTYPE_IPXNEW = 0x8037
- ETHERTYPE_KALPANA = 0x8582
- ETHERTYPE_LANBRIDGE = 0x8038
- ETHERTYPE_LANPROBE = 0x8888
- ETHERTYPE_LAT = 0x6004
- ETHERTYPE_LBACK = 0x9000
- ETHERTYPE_LITTLE = 0x8060
- ETHERTYPE_LLDP = 0x88cc
- ETHERTYPE_LOGICRAFT = 0x8148
- ETHERTYPE_LOOPBACK = 0x9000
- ETHERTYPE_MATRA = 0x807a
- ETHERTYPE_MAX = 0xffff
- ETHERTYPE_MERIT = 0x807c
- ETHERTYPE_MICP = 0x873a
- ETHERTYPE_MOPDL = 0x6001
- ETHERTYPE_MOPRC = 0x6002
- ETHERTYPE_MOTOROLA = 0x818d
- ETHERTYPE_MPLS = 0x8847
- ETHERTYPE_MPLS_MCAST = 0x8848
- ETHERTYPE_MUMPS = 0x813f
- ETHERTYPE_NBPCC = 0x3c04
- ETHERTYPE_NBPCLAIM = 0x3c09
- ETHERTYPE_NBPCLREQ = 0x3c05
- ETHERTYPE_NBPCLRSP = 0x3c06
- ETHERTYPE_NBPCREQ = 0x3c02
- ETHERTYPE_NBPCRSP = 0x3c03
- ETHERTYPE_NBPDG = 0x3c07
- ETHERTYPE_NBPDGB = 0x3c08
- ETHERTYPE_NBPDLTE = 0x3c0a
- ETHERTYPE_NBPRAR = 0x3c0c
- ETHERTYPE_NBPRAS = 0x3c0b
- ETHERTYPE_NBPRST = 0x3c0d
- ETHERTYPE_NBPSCD = 0x3c01
- ETHERTYPE_NBPVCD = 0x3c00
- ETHERTYPE_NBS = 0x802
- ETHERTYPE_NCD = 0x8149
- ETHERTYPE_NESTAR = 0x8006
- ETHERTYPE_NETBEUI = 0x8191
- ETHERTYPE_NOVELL = 0x8138
- ETHERTYPE_NS = 0x600
- ETHERTYPE_NSAT = 0x601
- ETHERTYPE_NSCOMPAT = 0x807
- ETHERTYPE_NTRAILER = 0x10
- ETHERTYPE_OS9 = 0x7007
- ETHERTYPE_OS9NET = 0x7009
- ETHERTYPE_PACER = 0x80c6
- ETHERTYPE_PAE = 0x888e
- ETHERTYPE_PCS = 0x4242
- ETHERTYPE_PLANNING = 0x8044
- ETHERTYPE_PPP = 0x880b
- ETHERTYPE_PPPOE = 0x8864
- ETHERTYPE_PPPOEDISC = 0x8863
- ETHERTYPE_PRIMENTS = 0x7031
- ETHERTYPE_PUP = 0x200
- ETHERTYPE_PUPAT = 0x200
- ETHERTYPE_QINQ = 0x88a8
- ETHERTYPE_RACAL = 0x7030
- ETHERTYPE_RATIONAL = 0x8150
- ETHERTYPE_RAWFR = 0x6559
- ETHERTYPE_RCL = 0x1995
- ETHERTYPE_RDP = 0x8739
- ETHERTYPE_RETIX = 0x80f2
- ETHERTYPE_REVARP = 0x8035
- ETHERTYPE_SCA = 0x6007
- ETHERTYPE_SECTRA = 0x86db
- ETHERTYPE_SECUREDATA = 0x876d
- ETHERTYPE_SGITW = 0x817e
- ETHERTYPE_SG_BOUNCE = 0x8016
- ETHERTYPE_SG_DIAG = 0x8013
- ETHERTYPE_SG_NETGAMES = 0x8014
- ETHERTYPE_SG_RESV = 0x8015
- ETHERTYPE_SIMNET = 0x5208
- ETHERTYPE_SLOW = 0x8809
- ETHERTYPE_SNA = 0x80d5
- ETHERTYPE_SNMP = 0x814c
- ETHERTYPE_SONIX = 0xfaf5
- ETHERTYPE_SPIDER = 0x809f
- ETHERTYPE_SPRITE = 0x500
- ETHERTYPE_STP = 0x8181
- ETHERTYPE_TALARIS = 0x812b
- ETHERTYPE_TALARISMC = 0x852b
- ETHERTYPE_TCPCOMP = 0x876b
- ETHERTYPE_TCPSM = 0x9002
- ETHERTYPE_TEC = 0x814f
- ETHERTYPE_TIGAN = 0x802f
- ETHERTYPE_TRAIL = 0x1000
- ETHERTYPE_TRANSETHER = 0x6558
- ETHERTYPE_TYMSHARE = 0x802e
- ETHERTYPE_UBBST = 0x7005
- ETHERTYPE_UBDEBUG = 0x900
- ETHERTYPE_UBDIAGLOOP = 0x7002
- ETHERTYPE_UBDL = 0x7000
- ETHERTYPE_UBNIU = 0x7001
- ETHERTYPE_UBNMC = 0x7003
- ETHERTYPE_VALID = 0x1600
- ETHERTYPE_VARIAN = 0x80dd
- ETHERTYPE_VAXELN = 0x803b
- ETHERTYPE_VEECO = 0x8067
- ETHERTYPE_VEXP = 0x805b
- ETHERTYPE_VGLAB = 0x8131
- ETHERTYPE_VINES = 0xbad
- ETHERTYPE_VINESECHO = 0xbaf
- ETHERTYPE_VINESLOOP = 0xbae
- ETHERTYPE_VITAL = 0xff00
- ETHERTYPE_VLAN = 0x8100
- ETHERTYPE_VLTLMAN = 0x8080
- ETHERTYPE_VPROD = 0x805c
- ETHERTYPE_VURESERVED = 0x8147
- ETHERTYPE_WATERLOO = 0x8130
- ETHERTYPE_WELLFLEET = 0x8103
- ETHERTYPE_X25 = 0x805
- ETHERTYPE_X75 = 0x801
- ETHERTYPE_XNSSM = 0x9001
- ETHERTYPE_XTP = 0x817d
- ETHER_ADDR_LEN = 0x6
- ETHER_ALIGN = 0x2
- ETHER_CRC_LEN = 0x4
- ETHER_CRC_POLY_BE = 0x4c11db6
- ETHER_CRC_POLY_LE = 0xedb88320
- ETHER_HDR_LEN = 0xe
- ETHER_MAX_DIX_LEN = 0x600
- ETHER_MAX_LEN = 0x5ee
- ETHER_MIN_LEN = 0x40
- ETHER_TYPE_LEN = 0x2
- ETHER_VLAN_ENCAP_LEN = 0x4
- EVFILT_AIO = -0x3
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0x7
- EVFILT_TIMER = -0x7
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_SYSFLAGS = 0xf000
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FLUSHO = 0x800000
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0xa
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETOWN = 0x5
- F_OK = 0x0
- F_RDLCK = 0x1
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETOWN = 0x6
- F_UNLCK = 0x2
- F_WRLCK = 0x3
- HUPCL = 0x4000
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFAN_ARRIVAL = 0x0
- IFAN_DEPARTURE = 0x1
- IFA_ROUTE = 0x1
- IFF_ALLMULTI = 0x200
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x8e52
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_A12MPPSWITCH = 0x82
- IFT_AAL2 = 0xbb
- IFT_AAL5 = 0x31
- IFT_ADSL = 0x5e
- IFT_AFLANE8023 = 0x3b
- IFT_AFLANE8025 = 0x3c
- IFT_ARAP = 0x58
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ASYNC = 0x54
- IFT_ATM = 0x25
- IFT_ATMDXI = 0x69
- IFT_ATMFUNI = 0x6a
- IFT_ATMIMA = 0x6b
- IFT_ATMLOGICAL = 0x50
- IFT_ATMRADIO = 0xbd
- IFT_ATMSUBINTERFACE = 0x86
- IFT_ATMVCIENDPT = 0xc2
- IFT_ATMVIRTUAL = 0x95
- IFT_BGPPOLICYACCOUNTING = 0xa2
- IFT_BLUETOOTH = 0xf8
- IFT_BRIDGE = 0xd1
- IFT_BSC = 0x53
- IFT_CARP = 0xf7
- IFT_CCTEMUL = 0x3d
- IFT_CEPT = 0x13
- IFT_CES = 0x85
- IFT_CHANNEL = 0x46
- IFT_CNR = 0x55
- IFT_COFFEE = 0x84
- IFT_COMPOSITELINK = 0x9b
- IFT_DCN = 0x8d
- IFT_DIGITALPOWERLINE = 0x8a
- IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
- IFT_DLSW = 0x4a
- IFT_DOCSCABLEDOWNSTREAM = 0x80
- IFT_DOCSCABLEMACLAYER = 0x7f
- IFT_DOCSCABLEUPSTREAM = 0x81
- IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
- IFT_DS0 = 0x51
- IFT_DS0BUNDLE = 0x52
- IFT_DS1FDL = 0xaa
- IFT_DS3 = 0x1e
- IFT_DTM = 0x8c
- IFT_DUMMY = 0xf1
- IFT_DVBASILN = 0xac
- IFT_DVBASIOUT = 0xad
- IFT_DVBRCCDOWNSTREAM = 0x93
- IFT_DVBRCCMACLAYER = 0x92
- IFT_DVBRCCUPSTREAM = 0x94
- IFT_ECONET = 0xce
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_EPLRS = 0x57
- IFT_ESCON = 0x49
- IFT_ETHER = 0x6
- IFT_FAITH = 0xf3
- IFT_FAST = 0x7d
- IFT_FASTETHER = 0x3e
- IFT_FASTETHERFX = 0x45
- IFT_FDDI = 0xf
- IFT_FIBRECHANNEL = 0x38
- IFT_FRAMERELAYINTERCONNECT = 0x3a
- IFT_FRAMERELAYMPI = 0x5c
- IFT_FRDLCIENDPT = 0xc1
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_FRF16MFRBUNDLE = 0xa3
- IFT_FRFORWARD = 0x9e
- IFT_G703AT2MB = 0x43
- IFT_G703AT64K = 0x42
- IFT_GIF = 0xf0
- IFT_GIGABITETHERNET = 0x75
- IFT_GR303IDT = 0xb2
- IFT_GR303RDT = 0xb1
- IFT_H323GATEKEEPER = 0xa4
- IFT_H323PROXY = 0xa5
- IFT_HDH1822 = 0x3
- IFT_HDLC = 0x76
- IFT_HDSL2 = 0xa8
- IFT_HIPERLAN2 = 0xb7
- IFT_HIPPI = 0x2f
- IFT_HIPPIINTERFACE = 0x39
- IFT_HOSTPAD = 0x5a
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IBM370PARCHAN = 0x48
- IFT_IDSL = 0x9a
- IFT_IEEE1394 = 0x90
- IFT_IEEE80211 = 0x47
- IFT_IEEE80212 = 0x37
- IFT_IEEE8023ADLAG = 0xa1
- IFT_IFGSN = 0x91
- IFT_IMT = 0xbe
- IFT_INFINIBAND = 0xc7
- IFT_INTERLEAVE = 0x7c
- IFT_IP = 0x7e
- IFT_IPFORWARD = 0x8e
- IFT_IPOVERATM = 0x72
- IFT_IPOVERCDLC = 0x6d
- IFT_IPOVERCLAW = 0x6e
- IFT_IPSWITCH = 0x4e
- IFT_ISDN = 0x3f
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISDNS = 0x4b
- IFT_ISDNU = 0x4c
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88025CRFPINT = 0x62
- IFT_ISO88025DTR = 0x56
- IFT_ISO88025FIBER = 0x73
- IFT_ISO88026 = 0xa
- IFT_ISUP = 0xb3
- IFT_L2VLAN = 0x87
- IFT_L3IPVLAN = 0x88
- IFT_L3IPXVLAN = 0x89
- IFT_LAPB = 0x10
- IFT_LAPD = 0x4d
- IFT_LAPF = 0x77
- IFT_LINEGROUP = 0xd2
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MEDIAMAILOVERIP = 0x8b
- IFT_MFSIGLINK = 0xa7
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_MPC = 0x71
- IFT_MPLS = 0xa6
- IFT_MPLSTUNNEL = 0x96
- IFT_MSDSL = 0x8f
- IFT_MVL = 0xbf
- IFT_MYRINET = 0x63
- IFT_NFAS = 0xaf
- IFT_NSIP = 0x1b
- IFT_OPTICALCHANNEL = 0xc3
- IFT_OPTICALTRANSPORT = 0xc4
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PFLOG = 0xf5
- IFT_PFLOW = 0xf9
- IFT_PFSYNC = 0xf6
- IFT_PLC = 0xae
- IFT_PON155 = 0xcf
- IFT_PON622 = 0xd0
- IFT_POS = 0xab
- IFT_PPP = 0x17
- IFT_PPPMULTILINKBUNDLE = 0x6c
- IFT_PROPATM = 0xc5
- IFT_PROPBWAP2MP = 0xb8
- IFT_PROPCNLS = 0x59
- IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
- IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
- IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PROPWIRELESSP2P = 0x9d
- IFT_PTPSERIAL = 0x16
- IFT_PVC = 0xf2
- IFT_Q2931 = 0xc9
- IFT_QLLC = 0x44
- IFT_RADIOMAC = 0xbc
- IFT_RADSL = 0x5f
- IFT_REACHDSL = 0xc0
- IFT_RFC1483 = 0x9f
- IFT_RS232 = 0x21
- IFT_RSRB = 0x4f
- IFT_SDLC = 0x11
- IFT_SDSL = 0x60
- IFT_SHDSL = 0xa9
- IFT_SIP = 0x1f
- IFT_SIPSIG = 0xcc
- IFT_SIPTG = 0xcb
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETOVERHEADCHANNEL = 0xb9
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_SRP = 0x97
- IFT_SS7SIGLINK = 0x9c
- IFT_STACKTOSTACK = 0x6f
- IFT_STARLAN = 0xb
- IFT_T1 = 0x12
- IFT_TDLC = 0x74
- IFT_TELINK = 0xc8
- IFT_TERMPAD = 0x5b
- IFT_TR008 = 0xb0
- IFT_TRANSPHDLC = 0x7b
- IFT_TUNNEL = 0x83
- IFT_ULTRA = 0x1d
- IFT_USB = 0xa0
- IFT_V11 = 0x40
- IFT_V35 = 0x2d
- IFT_V36 = 0x41
- IFT_V37 = 0x78
- IFT_VDSL = 0x61
- IFT_VIRTUALIPADDRESS = 0x70
- IFT_VIRTUALTG = 0xca
- IFT_VOICEDID = 0xd5
- IFT_VOICEEM = 0x64
- IFT_VOICEEMFGD = 0xd3
- IFT_VOICEENCAP = 0x67
- IFT_VOICEFGDEANA = 0xd4
- IFT_VOICEFXO = 0x65
- IFT_VOICEFXS = 0x66
- IFT_VOICEOVERATM = 0x98
- IFT_VOICEOVERCABLE = 0xc6
- IFT_VOICEOVERFRAMERELAY = 0x99
- IFT_VOICEOVERIP = 0x68
- IFT_X213 = 0x5d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25HUNTGROUP = 0x7a
- IFT_X25MLP = 0x79
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LOOPBACKNET = 0x7f
- IN_RFC3021_HOST = 0x1
- IN_RFC3021_NET = 0xfffffffe
- IN_RFC3021_NSHIFT = 0x1f
- IPPROTO_AH = 0x33
- IPPROTO_CARP = 0x70
- IPPROTO_DIVERT = 0x102
- IPPROTO_DIVERT_INIT = 0x2
- IPPROTO_DIVERT_RESP = 0x1
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x103
- IPPROTO_MOBILE = 0x37
- IPPROTO_MPLS = 0x89
- IPPROTO_NONE = 0x3b
- IPPROTO_PFSYNC = 0xf0
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPV6_AUTH_LEVEL = 0x35
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_ESP_NETWORK_LEVEL = 0x37
- IPV6_ESP_TRANS_LEVEL = 0x36
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FRAGTTL = 0x78
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPCOMP_LEVEL = 0x3c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXPACKET = 0xffff
- IPV6_MMTU = 0x500
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_OPTIONS = 0x1
- IPV6_PATHMTU = 0x2c
- IPV6_PIPEX = 0x3f
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVDSTPORT = 0x40
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x24
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x39
- IPV6_RTABLE = 0x1021
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x23
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x3d
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_AUTH_LEVEL = 0x14
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DIVERTFL = 0x1022
- IP_DROP_MEMBERSHIP = 0xd
- IP_ESP_NETWORK_LEVEL = 0x16
- IP_ESP_TRANS_LEVEL = 0x15
- IP_HDRINCL = 0x2
- IP_IPCOMP_LEVEL = 0x1d
- IP_IPSECFLOWINFO = 0x24
- IP_IPSEC_LOCAL_AUTH = 0x1b
- IP_IPSEC_LOCAL_CRED = 0x19
- IP_IPSEC_LOCAL_ID = 0x17
- IP_IPSEC_REMOTE_AUTH = 0x1c
- IP_IPSEC_REMOTE_CRED = 0x1a
- IP_IPSEC_REMOTE_ID = 0x18
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MF = 0x2000
- IP_MINTTL = 0x20
- IP_MIN_MEMBERSHIPS = 0xf
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x1
- IP_PIPEX = 0x22
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVDSTPORT = 0x21
- IP_RECVIF = 0x1e
- IP_RECVOPTS = 0x5
- IP_RECVRETOPTS = 0x6
- IP_RECVRTABLE = 0x23
- IP_RECVTTL = 0x1f
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RTABLE = 0x1021
- IP_TOS = 0x3
- IP_TTL = 0x4
- ISIG = 0x80
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- LCNT_OVERLOAD_FLUSH = 0x6
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x6
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_SPACEAVAIL = 0x5
- MADV_WILLNEED = 0x3
- MAP_ANON = 0x1000
- MAP_COPY = 0x4
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FLAGMASK = 0x1ff7
- MAP_HASSEMAPHORE = 0x200
- MAP_INHERIT = 0x80
- MAP_INHERIT_COPY = 0x1
- MAP_INHERIT_DONATE_COPY = 0x3
- MAP_INHERIT_NONE = 0x2
- MAP_INHERIT_SHARE = 0x0
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_TRYFIXED = 0x400
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_BCAST = 0x100
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOR = 0x8
- MSG_MCAST = 0x200
- MSG_NOSIGNAL = 0x400
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x4
- MS_SYNC = 0x2
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_FLAGS = 0x2
- NET_RT_IFLIST = 0x3
- NET_RT_MAXID = 0x6
- NET_RT_STATS = 0x4
- NET_RT_TABLE = 0x5
- NOFLSH = 0x80000000
- NOTE_ATTRIB = 0x8
- NOTE_CHILD = 0x4
- NOTE_DELETE = 0x1
- NOTE_EOF = 0x2
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXTEND = 0x4
- NOTE_FORK = 0x40000000
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_PCTRLMASK = 0xf0000000
- NOTE_PDATAMASK = 0xfffff
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRUNCATE = 0x80
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- ONLCR = 0x2
- ONLRET = 0x80
- ONOCR = 0x40
- ONOEOT = 0x8
- OPOST = 0x1
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x10000
- O_CREAT = 0x200
- O_DIRECTORY = 0x20000
- O_DSYNC = 0x80
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x100
- O_NONBLOCK = 0x4
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x80
- O_SHLOCK = 0x10
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PF_FLUSH = 0x1
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x8
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_LABEL = 0xa
- RTAX_MAX = 0xb
- RTAX_NETMASK = 0x2
- RTAX_SRC = 0x8
- RTAX_SRCMASK = 0x9
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_LABEL = 0x400
- RTA_NETMASK = 0x4
- RTA_SRC = 0x100
- RTA_SRCMASK = 0x200
- RTF_ANNOUNCE = 0x4000
- RTF_BLACKHOLE = 0x1000
- RTF_CLONED = 0x10000
- RTF_CLONING = 0x100
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_FMASK = 0x10f808
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_LLINFO = 0x400
- RTF_MASK = 0x80
- RTF_MODIFIED = 0x20
- RTF_MPATH = 0x40000
- RTF_MPLS = 0x100000
- RTF_PERMANENT_ARP = 0x2000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x2000
- RTF_REJECT = 0x8
- RTF_SOURCE = 0x20000
- RTF_STATIC = 0x800
- RTF_TUNNEL = 0x100000
- RTF_UP = 0x1
- RTF_USETRAILERS = 0x8000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DESYNC = 0x10
- RTM_GET = 0x4
- RTM_IFANNOUNCE = 0xf
- RTM_IFINFO = 0xe
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MAXSIZE = 0x800
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RT_TABLEID_MAX = 0xff
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x4
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCAIFADDR = 0x8040691a
- SIOCAIFGROUP = 0x80286987
- SIOCALIFADDR = 0x8218691c
- SIOCATMARK = 0x40047307
- SIOCBRDGADD = 0x8058693c
- SIOCBRDGADDS = 0x80586941
- SIOCBRDGARL = 0x806e694d
- SIOCBRDGDADDR = 0x81286947
- SIOCBRDGDEL = 0x8058693d
- SIOCBRDGDELS = 0x80586942
- SIOCBRDGFLUSH = 0x80586948
- SIOCBRDGFRL = 0x806e694e
- SIOCBRDGGCACHE = 0xc0146941
- SIOCBRDGGFD = 0xc0146952
- SIOCBRDGGHT = 0xc0146951
- SIOCBRDGGIFFLGS = 0xc058693e
- SIOCBRDGGMA = 0xc0146953
- SIOCBRDGGPARAM = 0xc0406958
- SIOCBRDGGPRI = 0xc0146950
- SIOCBRDGGRL = 0xc030694f
- SIOCBRDGGSIFS = 0xc058693c
- SIOCBRDGGTO = 0xc0146946
- SIOCBRDGIFS = 0xc0586942
- SIOCBRDGRTS = 0xc0206943
- SIOCBRDGSADDR = 0xc1286944
- SIOCBRDGSCACHE = 0x80146940
- SIOCBRDGSFD = 0x80146952
- SIOCBRDGSHT = 0x80146951
- SIOCBRDGSIFCOST = 0x80586955
- SIOCBRDGSIFFLGS = 0x8058693f
- SIOCBRDGSIFPRIO = 0x80586954
- SIOCBRDGSMA = 0x80146953
- SIOCBRDGSPRI = 0x80146950
- SIOCBRDGSPROTO = 0x8014695a
- SIOCBRDGSTO = 0x80146945
- SIOCBRDGSTXHC = 0x80146959
- SIOCDELMULTI = 0x80206932
- SIOCDIFADDR = 0x80206919
- SIOCDIFGROUP = 0x80286989
- SIOCDIFPHYADDR = 0x80206949
- SIOCDLIFADDR = 0x8218691e
- SIOCGETKALIVE = 0xc01869a4
- SIOCGETLABEL = 0x8020699a
- SIOCGETPFLOW = 0xc02069fe
- SIOCGETPFSYNC = 0xc02069f8
- SIOCGETSGCNT = 0xc0207534
- SIOCGETVIFCNT = 0xc0287533
- SIOCGETVLAN = 0xc0206990
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = 0xc0206921
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCONF = 0xc0106924
- SIOCGIFDATA = 0xc020691b
- SIOCGIFDESCR = 0xc0206981
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFGATTR = 0xc028698b
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFGMEMB = 0xc028698a
- SIOCGIFGROUP = 0xc0286988
- SIOCGIFHARDMTU = 0xc02069a5
- SIOCGIFMEDIA = 0xc0306936
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc020697e
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206948
- SIOCGIFPRIORITY = 0xc020699c
- SIOCGIFPSRCADDR = 0xc0206947
- SIOCGIFRDOMAIN = 0xc02069a0
- SIOCGIFRTLABEL = 0xc0206983
- SIOCGIFTIMESLOT = 0xc0206986
- SIOCGIFXFLAGS = 0xc020699e
- SIOCGLIFADDR = 0xc218691d
- SIOCGLIFPHYADDR = 0xc218694b
- SIOCGLIFPHYRTABLE = 0xc02069a2
- SIOCGLIFPHYTTL = 0xc02069a9
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCGSPPPPARAMS = 0xc0206994
- SIOCGVH = 0xc02069f6
- SIOCGVNETID = 0xc02069a7
- SIOCIFCREATE = 0x8020697a
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106978
- SIOCSETKALIVE = 0x801869a3
- SIOCSETLABEL = 0x80206999
- SIOCSETPFLOW = 0x802069fd
- SIOCSETPFSYNC = 0x802069f7
- SIOCSETVLAN = 0x8020698f
- SIOCSHIWAT = 0x80047300
- SIOCSIFADDR = 0x8020690c
- SIOCSIFASYNCMAP = 0x8020697d
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFDESCR = 0x80206980
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGATTR = 0x8028698c
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFLLADDR = 0x8020691f
- SIOCSIFMEDIA = 0xc0206935
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x8020697f
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x80406946
- SIOCSIFPRIORITY = 0x8020699b
- SIOCSIFRDOMAIN = 0x8020699f
- SIOCSIFRTLABEL = 0x80206982
- SIOCSIFTIMESLOT = 0x80206985
- SIOCSIFXFLAGS = 0x8020699d
- SIOCSLIFPHYADDR = 0x8218694a
- SIOCSLIFPHYRTABLE = 0x802069a1
- SIOCSLIFPHYTTL = 0x802069a8
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SIOCSSPPPPARAMS = 0x80206993
- SIOCSVH = 0xc02069f5
- SIOCSVNETID = 0x802069a6
- SOCK_DGRAM = 0x2
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_BINDANY = 0x1000
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_NETPROC = 0x1020
- SO_OOBINLINE = 0x100
- SO_PEERCRED = 0x1022
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RTABLE = 0x1021
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_SPLICE = 0x1023
- SO_TIMESTAMP = 0x800
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- TCIFLUSH = 0x1
- TCIOFLUSH = 0x3
- TCOFLUSH = 0x2
- TCP_MAXBURST = 0x4
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x3
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0x4
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOPUSH = 0x10
- TCP_NSTATES = 0xb
- TCP_SACK_ENABLE = 0x8
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDRAIN = 0x2000745e
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLAG_CLOCAL = 0x2
- TIOCFLAG_CRTSCTS = 0x4
- TIOCFLAG_MDMBUF = 0x8
- TIOCFLAG_PPS = 0x10
- TIOCFLAG_SOFTCAR = 0x1
- TIOCFLUSH = 0x80047410
- TIOCGETA = 0x402c7413
- TIOCGETD = 0x4004741a
- TIOCGFLAGS = 0x4004745d
- TIOCGPGRP = 0x40047477
- TIOCGSID = 0x40047463
- TIOCGTSTAMP = 0x4010745b
- TIOCGWINSZ = 0x40087468
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x4004746a
- TIOCMODS = 0x8004746d
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007461
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x802c7414
- TIOCSETAF = 0x802c7416
- TIOCSETAW = 0x802c7415
- TIOCSETD = 0x8004741b
- TIOCSFLAGS = 0x8004745c
- TIOCSIG = 0x8004745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x80047465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSTSTAMP = 0x8008745a
- TIOCSWINSZ = 0x80087467
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VTIME = 0x11
- VWERASE = 0x4
- WALTSIG = 0x4
- WCONTINUED = 0x8
- WCOREFLAG = 0x80
- WNOHANG = 0x1
- WSTOPPED = 0x7f
- WUNTRACED = 0x2
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x30)
- EADDRNOTAVAIL = Errno(0x31)
- EAFNOSUPPORT = Errno(0x2f)
- EAGAIN = Errno(0x23)
- EALREADY = Errno(0x25)
- EAUTH = Errno(0x50)
- EBADF = Errno(0x9)
- EBADRPC = Errno(0x48)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x58)
- ECHILD = Errno(0xa)
- ECONNABORTED = Errno(0x35)
- ECONNREFUSED = Errno(0x3d)
- ECONNRESET = Errno(0x36)
- EDEADLK = Errno(0xb)
- EDESTADDRREQ = Errno(0x27)
- EDOM = Errno(0x21)
- EDQUOT = Errno(0x45)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EFTYPE = Errno(0x4f)
- EHOSTDOWN = Errno(0x40)
- EHOSTUNREACH = Errno(0x41)
- EIDRM = Errno(0x59)
- EILSEQ = Errno(0x54)
- EINPROGRESS = Errno(0x24)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EIPSEC = Errno(0x52)
- EISCONN = Errno(0x38)
- EISDIR = Errno(0x15)
- ELAST = Errno(0x5b)
- ELOOP = Errno(0x3e)
- EMEDIUMTYPE = Errno(0x56)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x28)
- ENAMETOOLONG = Errno(0x3f)
- ENEEDAUTH = Errno(0x51)
- ENETDOWN = Errno(0x32)
- ENETRESET = Errno(0x34)
- ENETUNREACH = Errno(0x33)
- ENFILE = Errno(0x17)
- ENOATTR = Errno(0x53)
- ENOBUFS = Errno(0x37)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOLCK = Errno(0x4d)
- ENOMEDIUM = Errno(0x55)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x5a)
- ENOPROTOOPT = Errno(0x2a)
- ENOSPC = Errno(0x1c)
- ENOSYS = Errno(0x4e)
- ENOTBLK = Errno(0xf)
- ENOTCONN = Errno(0x39)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x42)
- ENOTSOCK = Errno(0x26)
- ENOTSUP = Errno(0x5b)
- ENOTTY = Errno(0x19)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x2d)
- EOVERFLOW = Errno(0x57)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x2e)
- EPIPE = Errno(0x20)
- EPROCLIM = Errno(0x43)
- EPROCUNAVAIL = Errno(0x4c)
- EPROGMISMATCH = Errno(0x4b)
- EPROGUNAVAIL = Errno(0x4a)
- EPROTONOSUPPORT = Errno(0x2b)
- EPROTOTYPE = Errno(0x29)
- ERANGE = Errno(0x22)
- EREMOTE = Errno(0x47)
- EROFS = Errno(0x1e)
- ERPCMISMATCH = Errno(0x49)
- ESHUTDOWN = Errno(0x3a)
- ESOCKTNOSUPPORT = Errno(0x2c)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESTALE = Errno(0x46)
- ETIMEDOUT = Errno(0x3c)
- ETOOMANYREFS = Errno(0x3b)
- ETXTBSY = Errno(0x1a)
- EUSERS = Errno(0x44)
- EWOULDBLOCK = Errno(0x23)
- EXDEV = Errno(0x12)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0xa)
- SIGCHLD = Signal(0x14)
- SIGCONT = Signal(0x13)
- SIGEMT = Signal(0x7)
- SIGFPE = Signal(0x8)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINFO = Signal(0x1d)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x17)
- SIGIOT = Signal(0x6)
- SIGKILL = Signal(0x9)
- SIGPIPE = Signal(0xd)
- SIGPROF = Signal(0x1b)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTOP = Signal(0x11)
- SIGSYS = Signal(0xc)
- SIGTERM = Signal(0xf)
- SIGTHR = Signal(0x20)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x12)
- SIGTTIN = Signal(0x15)
- SIGTTOU = Signal(0x16)
- SIGURG = Signal(0x10)
- SIGUSR1 = Signal(0x1e)
- SIGUSR2 = Signal(0x1f)
- SIGVTALRM = Signal(0x1a)
- SIGWINCH = Signal(0x1c)
- SIGXCPU = Signal(0x18)
- SIGXFSZ = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
- 1: "operation not permitted",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "input/output error",
- 6: "device not configured",
- 7: "argument list too long",
- 8: "exec format error",
- 9: "bad file descriptor",
- 10: "no child processes",
- 11: "resource deadlock avoided",
- 12: "cannot allocate memory",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "operation not supported by device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "too many open files in system",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "numerical argument out of domain",
- 34: "result too large",
- 35: "resource temporarily unavailable",
- 36: "operation now in progress",
- 37: "operation already in progress",
- 38: "socket operation on non-socket",
- 39: "destination address required",
- 40: "message too long",
- 41: "protocol wrong type for socket",
- 42: "protocol not available",
- 43: "protocol not supported",
- 44: "socket type not supported",
- 45: "operation not supported",
- 46: "protocol family not supported",
- 47: "address family not supported by protocol family",
- 48: "address already in use",
- 49: "can't assign requested address",
- 50: "network is down",
- 51: "network is unreachable",
- 52: "network dropped connection on reset",
- 53: "software caused connection abort",
- 54: "connection reset by peer",
- 55: "no buffer space available",
- 56: "socket is already connected",
- 57: "socket is not connected",
- 58: "can't send after socket shutdown",
- 59: "too many references: can't splice",
- 60: "connection timed out",
- 61: "connection refused",
- 62: "too many levels of symbolic links",
- 63: "file name too long",
- 64: "host is down",
- 65: "no route to host",
- 66: "directory not empty",
- 67: "too many processes",
- 68: "too many users",
- 69: "disc quota exceeded",
- 70: "stale NFS file handle",
- 71: "too many levels of remote in path",
- 72: "RPC struct is bad",
- 73: "RPC version wrong",
- 74: "RPC prog. not avail",
- 75: "program version wrong",
- 76: "bad procedure for program",
- 77: "no locks available",
- 78: "function not implemented",
- 79: "inappropriate file type or format",
- 80: "authentication error",
- 81: "need authenticator",
- 82: "IPsec processing failure",
- 83: "attribute not found",
- 84: "illegal byte sequence",
- 85: "no medium found",
- 86: "wrong medium type",
- 87: "value too large to be stored in data type",
- 88: "operation canceled",
- 89: "identifier removed",
- 90: "no message of desired type",
- 91: "not supported",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/BPT trap",
- 6: "abort trap",
- 7: "EMT trap",
- 8: "floating point exception",
- 9: "killed",
- 10: "bus error",
- 11: "segmentation fault",
- 12: "bad system call",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
- 16: "urgent I/O condition",
- 17: "stopped (signal)",
- 18: "stopped",
- 19: "continued",
- 20: "child exited",
- 21: "stopped (tty input)",
- 22: "stopped (tty output)",
- 23: "I/O possible",
- 24: "cputime limit exceeded",
- 25: "filesize limit exceeded",
- 26: "virtual timer expired",
- 27: "profiling timer expired",
- 28: "window size changes",
- 29: "information request",
- 30: "user defined signal 1",
- 31: "user defined signal 2",
- 32: "thread AST",
-}
diff --git a/src/pkg/syscall/zerrors_plan9_386.go b/src/pkg/syscall/zerrors_plan9_386.go
deleted file mode 100644
index ede3d6a32..000000000
--- a/src/pkg/syscall/zerrors_plan9_386.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// 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.
-
-package syscall
-
-// Constants
-const (
- // Invented values to support what package os expects.
- O_CREAT = 0x02000
- O_APPEND = 0x00400
- O_NOCTTY = 0x00000
- O_NONBLOCK = 0x00000
- O_SYNC = 0x00000
- O_ASYNC = 0x00000
-
- S_IFMT = 0x1f000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
-)
-
-// Errors
-var (
- EINVAL = NewError("bad arg in system call")
- ENOTDIR = NewError("not a directory")
- EISDIR = NewError("file is a directory")
- ENOENT = NewError("file does not exist")
- EEXIST = NewError("file already exists")
- EMFILE = NewError("no free file descriptors")
- EIO = NewError("i/o error")
- ENAMETOOLONG = NewError("file name too long")
- EINTR = NewError("interrupted")
- EPERM = NewError("permission denied")
- EBUSY = NewError("no free devices")
- ETIMEDOUT = NewError("connection timed out")
- EPLAN9 = NewError("not supported by plan 9")
-
- // The following errors do not correspond to any
- // Plan 9 system messages. Invented to support
- // what package os and others expect.
- EACCES = NewError("access permission denied")
- EAFNOSUPPORT = NewError("address family not supported by protocol")
-)
diff --git a/src/pkg/syscall/zerrors_plan9_amd64.go b/src/pkg/syscall/zerrors_plan9_amd64.go
deleted file mode 100644
index ede3d6a32..000000000
--- a/src/pkg/syscall/zerrors_plan9_amd64.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// 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.
-
-package syscall
-
-// Constants
-const (
- // Invented values to support what package os expects.
- O_CREAT = 0x02000
- O_APPEND = 0x00400
- O_NOCTTY = 0x00000
- O_NONBLOCK = 0x00000
- O_SYNC = 0x00000
- O_ASYNC = 0x00000
-
- S_IFMT = 0x1f000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
-)
-
-// Errors
-var (
- EINVAL = NewError("bad arg in system call")
- ENOTDIR = NewError("not a directory")
- EISDIR = NewError("file is a directory")
- ENOENT = NewError("file does not exist")
- EEXIST = NewError("file already exists")
- EMFILE = NewError("no free file descriptors")
- EIO = NewError("i/o error")
- ENAMETOOLONG = NewError("file name too long")
- EINTR = NewError("interrupted")
- EPERM = NewError("permission denied")
- EBUSY = NewError("no free devices")
- ETIMEDOUT = NewError("connection timed out")
- EPLAN9 = NewError("not supported by plan 9")
-
- // The following errors do not correspond to any
- // Plan 9 system messages. Invented to support
- // what package os and others expect.
- EACCES = NewError("access permission denied")
- EAFNOSUPPORT = NewError("address family not supported by protocol")
-)
diff --git a/src/pkg/syscall/zerrors_solaris_amd64.go b/src/pkg/syscall/zerrors_solaris_amd64.go
deleted file mode 100644
index 3f4cbfd98..000000000
--- a/src/pkg/syscall/zerrors_solaris_amd64.go
+++ /dev/null
@@ -1,1414 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package syscall
-
-const (
- AF_802 = 0x12
- AF_APPLETALK = 0x10
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_ECMA = 0x8
- AF_FILE = 0x1
- AF_GOSIP = 0x16
- AF_HYLINK = 0xf
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1a
- AF_INET_OFFLOAD = 0x1e
- AF_IPX = 0x17
- AF_KEY = 0x1b
- AF_LAT = 0xe
- AF_LINK = 0x19
- AF_LOCAL = 0x1
- AF_MAX = 0x20
- AF_NBS = 0x7
- AF_NCA = 0x1c
- AF_NIT = 0x11
- AF_NS = 0x6
- AF_OSI = 0x13
- AF_OSINET = 0x15
- AF_PACKET = 0x20
- AF_POLICY = 0x1d
- AF_PUP = 0x4
- AF_ROUTE = 0x18
- AF_SNA = 0xb
- AF_TRILL = 0x1f
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_X25 = 0x14
- ARPHRD_ARCNET = 0x7
- ARPHRD_ATM = 0x10
- ARPHRD_AX25 = 0x3
- ARPHRD_CHAOS = 0x5
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_FC = 0x12
- ARPHRD_FRAME = 0xf
- ARPHRD_HDLC = 0x11
- ARPHRD_IB = 0x20
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IPATM = 0x13
- ARPHRD_METRICOM = 0x17
- ARPHRD_TUNNEL = 0x1f
- B0 = 0x0
- B110 = 0x3
- B115200 = 0x12
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B153600 = 0x13
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B230400 = 0x14
- B2400 = 0xb
- B300 = 0x7
- B307200 = 0x15
- B38400 = 0xf
- B460800 = 0x16
- B4800 = 0xc
- B50 = 0x1
- B57600 = 0x10
- B600 = 0x8
- B75 = 0x2
- B76800 = 0x11
- B921600 = 0x17
- B9600 = 0xd
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = -0x3fefbd89
- BIOCGDLTLIST32 = -0x3ff7bd89
- BIOCGETIF = 0x4020426b
- BIOCGETLIF = 0x4078426b
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRTIMEOUT = 0x4010427b
- BIOCGRTIMEOUT32 = 0x4008427b
- BIOCGSEESENT = 0x40044278
- BIOCGSTATS = 0x4080426f
- BIOCGSTATSOLD = 0x4008426f
- BIOCIMMEDIATE = -0x7ffbbd90
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = -0x3ffbbd9a
- BIOCSDLT = -0x7ffbbd8a
- BIOCSETF = -0x7fefbd99
- BIOCSETF32 = -0x7ff7bd99
- BIOCSETIF = -0x7fdfbd94
- BIOCSETLIF = -0x7f87bd94
- BIOCSHDRCMPLT = -0x7ffbbd8b
- BIOCSRTIMEOUT = -0x7fefbd86
- BIOCSRTIMEOUT32 = -0x7ff7bd86
- BIOCSSEESENT = -0x7ffbbd87
- BIOCSTCPF = -0x7fefbd8e
- BIOCSUDPF = -0x7fefbd8d
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DFLTBUFSIZE = 0x100000
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x1000000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- CFLUSH = 0xf
- CLOCAL = 0x800
- CREAD = 0x80
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIZE = 0x30
- CSTART = 0x11
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- CSWTCH = 0x1a
- DLT_AIRONET_HEADER = 0x78
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_BACNET_MS_TP = 0xa5
- DLT_CHAOS = 0x5
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_DOCSIS = 0x8f
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FDDI = 0xa
- DLT_FRELAY = 0x6b
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_HDLC = 0x10
- DLT_HHDLC = 0x79
- DLT_HIPPI = 0xf
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IPNET = 0xe2
- DLT_IPOIB = 0xa2
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0xe
- DLT_PPP_PPPD = 0xa6
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAW = 0xc
- DLT_RAWAF_MASK = 0x2240000
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xd
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- EMPTY_SET = 0x0
- EMT_CPCOVF = 0x1
- EQUALITY_CHECK = 0x0
- EXTA = 0xe
- EXTB = 0xf
- FD_CLOEXEC = 0x1
- FD_NFDBITS = 0x40
- FD_SETSIZE = 0x10000
- FLUSHALL = 0x1
- FLUSHDATA = 0x0
- FLUSHO = 0x2000
- F_ALLOCSP = 0xa
- F_ALLOCSP64 = 0xa
- F_BADFD = 0x2e
- F_BLKSIZE = 0x13
- F_BLOCKS = 0x12
- F_CHKFL = 0x8
- F_COMPAT = 0x8
- F_DUP2FD = 0x9
- F_DUP2FD_CLOEXEC = 0x24
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x25
- F_FREESP = 0xb
- F_FREESP64 = 0xb
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0xe
- F_GETLK64 = 0xe
- F_GETOWN = 0x17
- F_GETXFL = 0x2d
- F_HASREMOTELOCKS = 0x1a
- F_ISSTREAM = 0xd
- F_MANDDNY = 0x10
- F_MDACC = 0x20
- F_NODNY = 0x0
- F_NPRIV = 0x10
- F_PRIV = 0xf
- F_QUOTACTL = 0x11
- F_RDACC = 0x1
- F_RDDNY = 0x1
- F_RDLCK = 0x1
- F_REVOKE = 0x19
- F_RMACC = 0x4
- F_RMDNY = 0x4
- F_RWACC = 0x3
- F_RWDNY = 0x3
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLK64_NBMAND = 0x2a
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETLK_NBMAND = 0x2a
- F_SETOWN = 0x18
- F_SHARE = 0x28
- F_SHARE_NBMAND = 0x2b
- F_UNLCK = 0x3
- F_UNLKSYS = 0x4
- F_UNSHARE = 0x29
- F_WRACC = 0x2
- F_WRDNY = 0x2
- F_WRLCK = 0x2
- HUPCL = 0x400
- ICANON = 0x2
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFF_ADDRCONF = 0x80000
- IFF_ALLMULTI = 0x200
- IFF_ANYCAST = 0x400000
- IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x7f203003b5a
- IFF_COS_ENABLED = 0x200000000
- IFF_DEBUG = 0x4
- IFF_DEPRECATED = 0x40000
- IFF_DHCPRUNNING = 0x4000
- IFF_DUPLICATE = 0x4000000000
- IFF_FAILED = 0x10000000
- IFF_FIXEDMTU = 0x1000000000
- IFF_INACTIVE = 0x40000000
- IFF_INTELLIGENT = 0x400
- IFF_IPMP = 0x8000000000
- IFF_IPMP_CANTCHANGE = 0x10000000
- IFF_IPMP_INVALID = 0x1ec200080
- IFF_IPV4 = 0x1000000
- IFF_IPV6 = 0x2000000
- IFF_L3PROTECT = 0x40000000000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x800
- IFF_MULTI_BCAST = 0x1000
- IFF_NOACCEPT = 0x4000000
- IFF_NOARP = 0x80
- IFF_NOFAILOVER = 0x8000000
- IFF_NOLINKLOCAL = 0x20000000000
- IFF_NOLOCAL = 0x20000
- IFF_NONUD = 0x200000
- IFF_NORTEXCH = 0x800000
- IFF_NOTRAILERS = 0x20
- IFF_NOXMIT = 0x10000
- IFF_OFFLINE = 0x80000000
- IFF_POINTOPOINT = 0x10
- IFF_PREFERRED = 0x400000000
- IFF_PRIVATE = 0x8000
- IFF_PROMISC = 0x100
- IFF_ROUTER = 0x100000
- IFF_RUNNING = 0x40
- IFF_STANDBY = 0x20000000
- IFF_TEMPORARY = 0x800000000
- IFF_UNNUMBERED = 0x2000
- IFF_UP = 0x1
- IFF_VIRTUAL = 0x2000000000
- IFF_VRRP = 0x10000000000
- IFF_XRESOLV = 0x100000000
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_6TO4 = 0xca
- IFT_AAL5 = 0x31
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ATM = 0x25
- IFT_CEPT = 0x13
- IFT_DS3 = 0x1e
- IFT_EON = 0x19
- IFT_ETHER = 0x6
- IFT_FDDI = 0xf
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_HDH1822 = 0x3
- IFT_HIPPI = 0x2f
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IB = 0xc7
- IFT_IPV4 = 0xc8
- IFT_IPV6 = 0xc9
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88026 = 0xa
- IFT_LAPB = 0x10
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_NSIP = 0x1b
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PPP = 0x17
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PTPSERIAL = 0x16
- IFT_RS232 = 0x21
- IFT_SDLC = 0x11
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_STARLAN = 0xb
- IFT_T1 = 0x12
- IFT_ULTRA = 0x1d
- IFT_V35 = 0x2d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_AUTOCONF_MASK = 0xffff0000
- IN_AUTOCONF_NET = 0xa9fe0000
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_CLASSE_NET = 0xffffffff
- IN_LOOPBACKNET = 0x7f
- IN_PRIVATE12_MASK = 0xfff00000
- IN_PRIVATE12_NET = 0xac100000
- IN_PRIVATE16_MASK = 0xffff0000
- IN_PRIVATE16_NET = 0xc0a80000
- IN_PRIVATE8_MASK = 0xff000000
- IN_PRIVATE8_NET = 0xa000000
- IPPROTO_AH = 0x33
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x4
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_HELLO = 0x3f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPV6 = 0x29
- IPPROTO_MAX = 0x100
- IPPROTO_ND = 0x4d
- IPPROTO_NONE = 0x3b
- IPPROTO_OSPF = 0x59
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_UDP = 0x11
- IPV6_ADD_MEMBERSHIP = 0x9
- IPV6_BOUND_IF = 0x41
- IPV6_CHECKSUM = 0x18
- IPV6_DONTFRAG = 0x21
- IPV6_DROP_MEMBERSHIP = 0xa
- IPV6_DSTOPTS = 0xf
- IPV6_FLOWINFO_FLOWLABEL = 0xffff0f00
- IPV6_FLOWINFO_TCLASS = 0xf00f
- IPV6_HOPLIMIT = 0xc
- IPV6_HOPOPTS = 0xe
- IPV6_JOIN_GROUP = 0x9
- IPV6_LEAVE_GROUP = 0xa
- IPV6_MULTICAST_HOPS = 0x7
- IPV6_MULTICAST_IF = 0x6
- IPV6_MULTICAST_LOOP = 0x8
- IPV6_NEXTHOP = 0xd
- IPV6_PAD1_OPT = 0x0
- IPV6_PATHMTU = 0x25
- IPV6_PKTINFO = 0xb
- IPV6_PREFER_SRC_CGA = 0x20
- IPV6_PREFER_SRC_CGADEFAULT = 0x10
- IPV6_PREFER_SRC_CGAMASK = 0x30
- IPV6_PREFER_SRC_COA = 0x2
- IPV6_PREFER_SRC_DEFAULT = 0x15
- IPV6_PREFER_SRC_HOME = 0x1
- IPV6_PREFER_SRC_MASK = 0x3f
- IPV6_PREFER_SRC_MIPDEFAULT = 0x1
- IPV6_PREFER_SRC_MIPMASK = 0x3
- IPV6_PREFER_SRC_NONCGA = 0x10
- IPV6_PREFER_SRC_PUBLIC = 0x4
- IPV6_PREFER_SRC_TMP = 0x8
- IPV6_PREFER_SRC_TMPDEFAULT = 0x4
- IPV6_PREFER_SRC_TMPMASK = 0xc
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x13
- IPV6_RECVHOPOPTS = 0x14
- IPV6_RECVPATHMTU = 0x24
- IPV6_RECVPKTINFO = 0x12
- IPV6_RECVRTHDR = 0x16
- IPV6_RECVRTHDRDSTOPTS = 0x17
- IPV6_RECVTCLASS = 0x19
- IPV6_RTHDR = 0x10
- IPV6_RTHDRDSTOPTS = 0x11
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SEC_OPT = 0x22
- IPV6_SRC_PREFERENCES = 0x23
- IPV6_TCLASS = 0x26
- IPV6_UNICAST_HOPS = 0x5
- IPV6_UNSPEC_SRC = 0x42
- IPV6_USE_MIN_MTU = 0x20
- IPV6_V6ONLY = 0x27
- IP_ADD_MEMBERSHIP = 0x13
- IP_ADD_SOURCE_MEMBERSHIP = 0x17
- IP_BLOCK_SOURCE = 0x15
- IP_BOUND_IF = 0x41
- IP_BROADCAST = 0x106
- IP_BROADCAST_TTL = 0x43
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DHCPINIT_IF = 0x45
- IP_DONTFRAG = 0x1b
- IP_DONTROUTE = 0x105
- IP_DROP_MEMBERSHIP = 0x14
- IP_DROP_SOURCE_MEMBERSHIP = 0x18
- IP_HDRINCL = 0x2
- IP_MAXPACKET = 0xffff
- IP_MF = 0x2000
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x10
- IP_MULTICAST_LOOP = 0x12
- IP_MULTICAST_TTL = 0x11
- IP_NEXTHOP = 0x19
- IP_OPTIONS = 0x1
- IP_PKTINFO = 0x1a
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x9
- IP_RECVOPTS = 0x5
- IP_RECVPKTINFO = 0x1a
- IP_RECVRETOPTS = 0x6
- IP_RECVSLLA = 0xa
- IP_RECVTTL = 0xb
- IP_RETOPTS = 0x8
- IP_REUSEADDR = 0x104
- IP_SEC_OPT = 0x22
- IP_TOS = 0x3
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x16
- IP_UNSPEC_SRC = 0x42
- ISIG = 0x1
- ISTRIP = 0x20
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- MADV_ACCESS_DEFAULT = 0x6
- MADV_ACCESS_LWP = 0x7
- MADV_ACCESS_MANY = 0x8
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_NORMAL = 0x0
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MAP_32BIT = 0x80
- MAP_ALIGN = 0x200
- MAP_ANON = 0x100
- MAP_ANONYMOUS = 0x100
- MAP_FIXED = 0x10
- MAP_INITDATA = 0x800
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_TEXT = 0x400
- MAP_TYPE = 0xf
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MSG_CTRUNC = 0x10
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_DUPCTRL = 0x800
- MSG_EOR = 0x8
- MSG_MAXIOVLEN = 0x10
- MSG_NOTIFICATION = 0x100
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_TRUNC = 0x20
- MSG_WAITALL = 0x40
- MSG_XPG4_2 = 0x8000
- MS_ASYNC = 0x1
- MS_INVALIDATE = 0x2
- MS_OLDSYNC = 0x0
- MS_SYNC = 0x4
- M_FLUSH = 0x86
- NOFLSH = 0x80
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENFAIL = -0x1
- OPOST = 0x1
- O_ACCMODE = 0x600003
- O_APPEND = 0x8
- O_CLOEXEC = 0x800000
- O_CREAT = 0x100
- O_DSYNC = 0x40
- O_EXCL = 0x400
- O_EXEC = 0x400000
- O_LARGEFILE = 0x2000
- O_NDELAY = 0x4
- O_NOCTTY = 0x800
- O_NOFOLLOW = 0x20000
- O_NOLINKS = 0x40000
- O_NONBLOCK = 0x80
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x8000
- O_SEARCH = 0x200000
- O_SIOCGIFCONF = -0x3ff796ec
- O_SIOCGLIFCONF = -0x3fef9688
- O_SYNC = 0x10
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- O_XATTR = 0x4000
- PARENB = 0x100
- PAREXT = 0x100000
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- RLIMIT_AS = 0x6
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_NOFILE = 0x5
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x3
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x9
- RTAX_NETMASK = 0x2
- RTAX_SRC = 0x8
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTA_NUMBITS = 0x9
- RTA_SRC = 0x100
- RTF_BLACKHOLE = 0x1000
- RTF_CLONING = 0x100
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INDIRECT = 0x40000
- RTF_KERNEL = 0x80000
- RTF_LLINFO = 0x400
- RTF_MASK = 0x80
- RTF_MODIFIED = 0x20
- RTF_MULTIRT = 0x10000
- RTF_PRIVATE = 0x2000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_REJECT = 0x8
- RTF_SETSRC = 0x20000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_XRESOLVE = 0x200
- RTF_ZONE = 0x100000
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_CHGADDR = 0xf
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_FREEADDR = 0x10
- RTM_GET = 0x4
- RTM_IFINFO = 0xe
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_VERSION = 0x3
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RT_AWARE = 0x1
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_RIGHTS = 0x1010
- SCM_TIMESTAMP = 0x1013
- SCM_UCRED = 0x1012
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIG2STR_MAX = 0x20
- SIOCADDMULTI = -0x7fdf96cf
- SIOCADDRT = -0x7fcf8df6
- SIOCATMARK = 0x40047307
- SIOCDARP = -0x7fdb96e0
- SIOCDELMULTI = -0x7fdf96ce
- SIOCDELRT = -0x7fcf8df5
- SIOCDIPSECONFIG = -0x7ffb9669
- SIOCDXARP = -0x7fff9658
- SIOCFIPSECONFIG = -0x7ffb966b
- SIOCGARP = -0x3fdb96e1
- SIOCGDSTINFO = -0x3fff965c
- SIOCGENADDR = -0x3fdf96ab
- SIOCGENPSTATS = -0x3fdf96c7
- SIOCGETLSGCNT = -0x3fef8deb
- SIOCGETNAME = 0x40107334
- SIOCGETPEER = 0x40107335
- SIOCGETPROP = -0x3fff8f44
- SIOCGETSGCNT = -0x3feb8deb
- SIOCGETSYNC = -0x3fdf96d3
- SIOCGETVIFCNT = -0x3feb8dec
- SIOCGHIWAT = 0x40047301
- SIOCGIFADDR = -0x3fdf96f3
- SIOCGIFBRDADDR = -0x3fdf96e9
- SIOCGIFCONF = -0x3ff796a4
- SIOCGIFDSTADDR = -0x3fdf96f1
- SIOCGIFFLAGS = -0x3fdf96ef
- SIOCGIFHWADDR = -0x3fdf9647
- SIOCGIFINDEX = -0x3fdf96a6
- SIOCGIFMEM = -0x3fdf96ed
- SIOCGIFMETRIC = -0x3fdf96e5
- SIOCGIFMTU = -0x3fdf96ea
- SIOCGIFMUXID = -0x3fdf96a8
- SIOCGIFNETMASK = -0x3fdf96e7
- SIOCGIFNUM = 0x40046957
- SIOCGIP6ADDRPOLICY = -0x3fff965e
- SIOCGIPMSFILTER = -0x3ffb964c
- SIOCGLIFADDR = -0x3f87968f
- SIOCGLIFBINDING = -0x3f879666
- SIOCGLIFBRDADDR = -0x3f879685
- SIOCGLIFCONF = -0x3fef965b
- SIOCGLIFDADSTATE = -0x3f879642
- SIOCGLIFDSTADDR = -0x3f87968d
- SIOCGLIFFLAGS = -0x3f87968b
- SIOCGLIFGROUPINFO = -0x3f4b9663
- SIOCGLIFGROUPNAME = -0x3f879664
- SIOCGLIFHWADDR = -0x3f879640
- SIOCGLIFINDEX = -0x3f87967b
- SIOCGLIFLNKINFO = -0x3f879674
- SIOCGLIFMETRIC = -0x3f879681
- SIOCGLIFMTU = -0x3f879686
- SIOCGLIFMUXID = -0x3f87967d
- SIOCGLIFNETMASK = -0x3f879683
- SIOCGLIFNUM = -0x3ff3967e
- SIOCGLIFSRCOF = -0x3fef964f
- SIOCGLIFSUBNET = -0x3f879676
- SIOCGLIFTOKEN = -0x3f879678
- SIOCGLIFUSESRC = -0x3f879651
- SIOCGLIFZONE = -0x3f879656
- SIOCGLOWAT = 0x40047303
- SIOCGMSFILTER = -0x3ffb964e
- SIOCGPGRP = 0x40047309
- SIOCGSTAMP = -0x3fef9646
- SIOCGXARP = -0x3fff9659
- SIOCIFDETACH = -0x7fdf96c8
- SIOCILB = -0x3ffb9645
- SIOCLIFADDIF = -0x3f879691
- SIOCLIFDELND = -0x7f879673
- SIOCLIFGETND = -0x3f879672
- SIOCLIFREMOVEIF = -0x7f879692
- SIOCLIFSETND = -0x7f879671
- SIOCLIPSECONFIG = -0x7ffb9668
- SIOCLOWER = -0x7fdf96d7
- SIOCSARP = -0x7fdb96e2
- SIOCSCTPGOPT = -0x3fef9653
- SIOCSCTPPEELOFF = -0x3ffb9652
- SIOCSCTPSOPT = -0x7fef9654
- SIOCSENABLESDP = -0x3ffb9649
- SIOCSETPROP = -0x7ffb8f43
- SIOCSETSYNC = -0x7fdf96d4
- SIOCSHIWAT = -0x7ffb8d00
- SIOCSIFADDR = -0x7fdf96f4
- SIOCSIFBRDADDR = -0x7fdf96e8
- SIOCSIFDSTADDR = -0x7fdf96f2
- SIOCSIFFLAGS = -0x7fdf96f0
- SIOCSIFINDEX = -0x7fdf96a5
- SIOCSIFMEM = -0x7fdf96ee
- SIOCSIFMETRIC = -0x7fdf96e4
- SIOCSIFMTU = -0x7fdf96eb
- SIOCSIFMUXID = -0x7fdf96a7
- SIOCSIFNAME = -0x7fdf96b7
- SIOCSIFNETMASK = -0x7fdf96e6
- SIOCSIP6ADDRPOLICY = -0x7fff965d
- SIOCSIPMSFILTER = -0x7ffb964b
- SIOCSIPSECONFIG = -0x7ffb966a
- SIOCSLGETREQ = -0x3fdf96b9
- SIOCSLIFADDR = -0x7f879690
- SIOCSLIFBRDADDR = -0x7f879684
- SIOCSLIFDSTADDR = -0x7f87968e
- SIOCSLIFFLAGS = -0x7f87968c
- SIOCSLIFGROUPNAME = -0x7f879665
- SIOCSLIFINDEX = -0x7f87967a
- SIOCSLIFLNKINFO = -0x7f879675
- SIOCSLIFMETRIC = -0x7f879680
- SIOCSLIFMTU = -0x7f879687
- SIOCSLIFMUXID = -0x7f87967c
- SIOCSLIFNAME = -0x3f87967f
- SIOCSLIFNETMASK = -0x7f879682
- SIOCSLIFPREFIX = -0x3f879641
- SIOCSLIFSUBNET = -0x7f879677
- SIOCSLIFTOKEN = -0x7f879679
- SIOCSLIFUSESRC = -0x7f879650
- SIOCSLIFZONE = -0x7f879655
- SIOCSLOWAT = -0x7ffb8cfe
- SIOCSLSTAT = -0x7fdf96b8
- SIOCSMSFILTER = -0x7ffb964d
- SIOCSPGRP = -0x7ffb8cf8
- SIOCSPROMISC = -0x7ffb96d0
- SIOCSQPTR = -0x3ffb9648
- SIOCSSDSTATS = -0x3fdf96d2
- SIOCSSESTATS = -0x3fdf96d1
- SIOCSXARP = -0x7fff965a
- SIOCTMYADDR = -0x3ff79670
- SIOCTMYSITE = -0x3ff7966e
- SIOCTONLINK = -0x3ff7966f
- SIOCUPPER = -0x7fdf96d8
- SIOCX25RCV = -0x3fdf96c4
- SIOCX25TBL = -0x3fdf96c3
- SIOCX25XMT = -0x3fdf96c5
- SIOCXPROTO = 0x20007337
- SOCK_CLOEXEC = 0x80000
- SOCK_DGRAM = 0x1
- SOCK_NDELAY = 0x200000
- SOCK_NONBLOCK = 0x100000
- SOCK_RAW = 0x4
- SOCK_RDM = 0x5
- SOCK_SEQPACKET = 0x6
- SOCK_STREAM = 0x2
- SOCK_TYPE_MASK = 0xffff
- SOL_FILTER = 0xfffc
- SOL_PACKET = 0xfffd
- SOL_ROUTE = 0xfffe
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_ALL = 0x3f
- SO_ALLZONES = 0x1014
- SO_ANON_MLP = 0x100a
- SO_ATTACH_FILTER = 0x40000001
- SO_BAND = 0x4000
- SO_BROADCAST = 0x20
- SO_COPYOPT = 0x80000
- SO_DEBUG = 0x1
- SO_DELIM = 0x8000
- SO_DETACH_FILTER = 0x40000002
- SO_DGRAM_ERRIND = 0x200
- SO_DOMAIN = 0x100c
- SO_DONTLINGER = -0x81
- SO_DONTROUTE = 0x10
- SO_ERROPT = 0x40000
- SO_ERROR = 0x1007
- SO_EXCLBIND = 0x1015
- SO_HIWAT = 0x10
- SO_ISNTTY = 0x800
- SO_ISTTY = 0x400
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_LOWAT = 0x20
- SO_MAC_EXEMPT = 0x100b
- SO_MAC_IMPLICIT = 0x1016
- SO_MAXBLK = 0x100000
- SO_MAXPSZ = 0x8
- SO_MINPSZ = 0x4
- SO_MREADOFF = 0x80
- SO_MREADON = 0x40
- SO_NDELOFF = 0x200
- SO_NDELON = 0x100
- SO_NODELIM = 0x10000
- SO_OOBINLINE = 0x100
- SO_PROTOTYPE = 0x1009
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVPSH = 0x100d
- SO_RCVTIMEO = 0x1006
- SO_READOPT = 0x1
- SO_RECVUCRED = 0x400
- SO_REUSEADDR = 0x4
- SO_SECATTR = 0x1011
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_STRHOLD = 0x20000
- SO_TAIL = 0x200000
- SO_TIMESTAMP = 0x1013
- SO_TONSTOP = 0x2000
- SO_TOSTOP = 0x1000
- SO_TYPE = 0x1008
- SO_USELOOPBACK = 0x40
- SO_VRRP = 0x1017
- SO_WROFF = 0x2
- TCFLSH = 0x5407
- TCIFLUSH = 0x0
- TCIOFLUSH = 0x2
- TCOFLUSH = 0x1
- TCP_ABORT_THRESHOLD = 0x11
- TCP_ANONPRIVBIND = 0x20
- TCP_CONN_ABORT_THRESHOLD = 0x13
- TCP_CONN_NOTIFY_THRESHOLD = 0x12
- TCP_CORK = 0x18
- TCP_EXCLBIND = 0x21
- TCP_INIT_CWND = 0x15
- TCP_KEEPALIVE = 0x8
- TCP_KEEPALIVE_ABORT_THRESHOLD = 0x17
- TCP_KEEPALIVE_THRESHOLD = 0x16
- TCP_KEEPCNT = 0x23
- TCP_KEEPIDLE = 0x22
- TCP_KEEPINTVL = 0x24
- TCP_LINGER2 = 0x1c
- TCP_MAXSEG = 0x2
- TCP_MSS = 0x218
- TCP_NODELAY = 0x1
- TCP_NOTIFY_THRESHOLD = 0x10
- TCP_RECVDSTADDR = 0x14
- TCP_RTO_INITIAL = 0x19
- TCP_RTO_MAX = 0x1b
- TCP_RTO_MIN = 0x1a
- TCSAFLUSH = 0x5410
- TIOC = 0x5400
- TIOCCBRK = 0x747a
- TIOCCDTR = 0x7478
- TIOCCILOOP = 0x746c
- TIOCEXCL = 0x740d
- TIOCFLUSH = 0x7410
- TIOCGETC = 0x7412
- TIOCGETD = 0x7400
- TIOCGETP = 0x7408
- TIOCGLTC = 0x7474
- TIOCGPGRP = 0x7414
- TIOCGPPS = 0x547d
- TIOCGPPSEV = 0x547f
- TIOCGSID = 0x7416
- TIOCGSOFTCAR = 0x5469
- TIOCGWINSZ = 0x5468
- TIOCHPCL = 0x7402
- TIOCKBOF = 0x5409
- TIOCKBON = 0x5408
- TIOCLBIC = 0x747e
- TIOCLBIS = 0x747f
- TIOCLGET = 0x747c
- TIOCLSET = 0x747d
- TIOCMBIC = 0x741c
- TIOCMBIS = 0x741b
- TIOCMGET = 0x741d
- TIOCMSET = 0x741a
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x7471
- TIOCNXCL = 0x740e
- TIOCOUTQ = 0x7473
- TIOCREMOTE = 0x741e
- TIOCSBRK = 0x747b
- TIOCSCTTY = 0x7484
- TIOCSDTR = 0x7479
- TIOCSETC = 0x7411
- TIOCSETD = 0x7401
- TIOCSETN = 0x740a
- TIOCSETP = 0x7409
- TIOCSIGNAL = 0x741f
- TIOCSILOOP = 0x746d
- TIOCSLTC = 0x7475
- TIOCSPGRP = 0x7415
- TIOCSPPS = 0x547e
- TIOCSSOFTCAR = 0x546a
- TIOCSTART = 0x746e
- TIOCSTI = 0x7417
- TIOCSTOP = 0x746f
- TIOCSWINSZ = 0x5467
- TOSTOP = 0x100
- VCEOF = 0x8
- VCEOL = 0x9
- VDISCARD = 0xd
- VDSUSP = 0xb
- VEOF = 0x4
- VEOL = 0x5
- VEOL2 = 0x6
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMIN = 0x4
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTCH = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WCONTFLG = 0xffff
- WCONTINUED = 0x8
- WCOREFLG = 0x80
- WEXITED = 0x1
- WNOHANG = 0x40
- WNOWAIT = 0x80
- WOPTMASK = 0xcf
- WRAP = 0x20000
- WSIGMASK = 0x7f
- WSTOPFLG = 0x7f
- WSTOPPED = 0x4
- WTRAPPED = 0x2
- WUNTRACED = 0x4
-)
-
-// Errors
-const (
- E2BIG = Errno(0x7)
- EACCES = Errno(0xd)
- EADDRINUSE = Errno(0x7d)
- EADDRNOTAVAIL = Errno(0x7e)
- EADV = Errno(0x44)
- EAFNOSUPPORT = Errno(0x7c)
- EAGAIN = Errno(0xb)
- EALREADY = Errno(0x95)
- EBADE = Errno(0x32)
- EBADF = Errno(0x9)
- EBADFD = Errno(0x51)
- EBADMSG = Errno(0x4d)
- EBADR = Errno(0x33)
- EBADRQC = Errno(0x36)
- EBADSLT = Errno(0x37)
- EBFONT = Errno(0x39)
- EBUSY = Errno(0x10)
- ECANCELED = Errno(0x2f)
- ECHILD = Errno(0xa)
- ECHRNG = Errno(0x25)
- ECOMM = Errno(0x46)
- ECONNABORTED = Errno(0x82)
- ECONNREFUSED = Errno(0x92)
- ECONNRESET = Errno(0x83)
- EDEADLK = Errno(0x2d)
- EDEADLOCK = Errno(0x38)
- EDESTADDRREQ = Errno(0x60)
- EDOM = Errno(0x21)
- EDQUOT = Errno(0x31)
- EEXIST = Errno(0x11)
- EFAULT = Errno(0xe)
- EFBIG = Errno(0x1b)
- EHOSTDOWN = Errno(0x93)
- EHOSTUNREACH = Errno(0x94)
- EIDRM = Errno(0x24)
- EILSEQ = Errno(0x58)
- EINPROGRESS = Errno(0x96)
- EINTR = Errno(0x4)
- EINVAL = Errno(0x16)
- EIO = Errno(0x5)
- EISCONN = Errno(0x85)
- EISDIR = Errno(0x15)
- EL2HLT = Errno(0x2c)
- EL2NSYNC = Errno(0x26)
- EL3HLT = Errno(0x27)
- EL3RST = Errno(0x28)
- ELIBACC = Errno(0x53)
- ELIBBAD = Errno(0x54)
- ELIBEXEC = Errno(0x57)
- ELIBMAX = Errno(0x56)
- ELIBSCN = Errno(0x55)
- ELNRNG = Errno(0x29)
- ELOCKUNMAPPED = Errno(0x48)
- ELOOP = Errno(0x5a)
- EMFILE = Errno(0x18)
- EMLINK = Errno(0x1f)
- EMSGSIZE = Errno(0x61)
- EMULTIHOP = Errno(0x4a)
- ENAMETOOLONG = Errno(0x4e)
- ENETDOWN = Errno(0x7f)
- ENETRESET = Errno(0x81)
- ENETUNREACH = Errno(0x80)
- ENFILE = Errno(0x17)
- ENOANO = Errno(0x35)
- ENOBUFS = Errno(0x84)
- ENOCSI = Errno(0x2b)
- ENODATA = Errno(0x3d)
- ENODEV = Errno(0x13)
- ENOENT = Errno(0x2)
- ENOEXEC = Errno(0x8)
- ENOLCK = Errno(0x2e)
- ENOLINK = Errno(0x43)
- ENOMEM = Errno(0xc)
- ENOMSG = Errno(0x23)
- ENONET = Errno(0x40)
- ENOPKG = Errno(0x41)
- ENOPROTOOPT = Errno(0x63)
- ENOSPC = Errno(0x1c)
- ENOSR = Errno(0x3f)
- ENOSTR = Errno(0x3c)
- ENOSYS = Errno(0x59)
- ENOTACTIVE = Errno(0x49)
- ENOTBLK = Errno(0xf)
- ENOTCONN = Errno(0x86)
- ENOTDIR = Errno(0x14)
- ENOTEMPTY = Errno(0x5d)
- ENOTRECOVERABLE = Errno(0x3b)
- ENOTSOCK = Errno(0x5f)
- ENOTSUP = Errno(0x30)
- ENOTTY = Errno(0x19)
- ENOTUNIQ = Errno(0x50)
- ENXIO = Errno(0x6)
- EOPNOTSUPP = Errno(0x7a)
- EOVERFLOW = Errno(0x4f)
- EOWNERDEAD = Errno(0x3a)
- EPERM = Errno(0x1)
- EPFNOSUPPORT = Errno(0x7b)
- EPIPE = Errno(0x20)
- EPROTO = Errno(0x47)
- EPROTONOSUPPORT = Errno(0x78)
- EPROTOTYPE = Errno(0x62)
- ERANGE = Errno(0x22)
- EREMCHG = Errno(0x52)
- EREMOTE = Errno(0x42)
- ERESTART = Errno(0x5b)
- EROFS = Errno(0x1e)
- ESHUTDOWN = Errno(0x8f)
- ESOCKTNOSUPPORT = Errno(0x79)
- ESPIPE = Errno(0x1d)
- ESRCH = Errno(0x3)
- ESRMNT = Errno(0x45)
- ESTALE = Errno(0x97)
- ESTRPIPE = Errno(0x5c)
- ETIME = Errno(0x3e)
- ETIMEDOUT = Errno(0x91)
- ETOOMANYREFS = Errno(0x90)
- ETXTBSY = Errno(0x1a)
- EUNATCH = Errno(0x2a)
- EUSERS = Errno(0x5e)
- EWOULDBLOCK = Errno(0xb)
- EXDEV = Errno(0x12)
- EXFULL = Errno(0x34)
-)
-
-// Signals
-const (
- SIGABRT = Signal(0x6)
- SIGALRM = Signal(0xe)
- SIGBUS = Signal(0xa)
- SIGCANCEL = Signal(0x24)
- SIGCHLD = Signal(0x12)
- SIGCLD = Signal(0x12)
- SIGCONT = Signal(0x19)
- SIGEMT = Signal(0x7)
- SIGFPE = Signal(0x8)
- SIGFREEZE = Signal(0x22)
- SIGHUP = Signal(0x1)
- SIGILL = Signal(0x4)
- SIGINT = Signal(0x2)
- SIGIO = Signal(0x16)
- SIGIOT = Signal(0x6)
- SIGJVM1 = Signal(0x27)
- SIGJVM2 = Signal(0x28)
- SIGKILL = Signal(0x9)
- SIGLOST = Signal(0x25)
- SIGLWP = Signal(0x21)
- SIGPIPE = Signal(0xd)
- SIGPOLL = Signal(0x16)
- SIGPROF = Signal(0x1d)
- SIGPWR = Signal(0x13)
- SIGQUIT = Signal(0x3)
- SIGSEGV = Signal(0xb)
- SIGSTOP = Signal(0x17)
- SIGSYS = Signal(0xc)
- SIGTERM = Signal(0xf)
- SIGTHAW = Signal(0x23)
- SIGTRAP = Signal(0x5)
- SIGTSTP = Signal(0x18)
- SIGTTIN = Signal(0x1a)
- SIGTTOU = Signal(0x1b)
- SIGURG = Signal(0x15)
- SIGUSR1 = Signal(0x10)
- SIGUSR2 = Signal(0x11)
- SIGVTALRM = Signal(0x1c)
- SIGWAITING = Signal(0x20)
- SIGWINCH = Signal(0x14)
- SIGXCPU = Signal(0x1e)
- SIGXFSZ = Signal(0x1f)
- SIGXRES = Signal(0x26)
-)
-
-// Error table
-var errors = [...]string{
- 1: "not owner",
- 2: "no such file or directory",
- 3: "no such process",
- 4: "interrupted system call",
- 5: "I/O error",
- 6: "no such device or address",
- 7: "arg list too long",
- 8: "exec format error",
- 9: "bad file number",
- 10: "no child processes",
- 11: "resource temporarily unavailable",
- 12: "not enough space",
- 13: "permission denied",
- 14: "bad address",
- 15: "block device required",
- 16: "device busy",
- 17: "file exists",
- 18: "cross-device link",
- 19: "no such device",
- 20: "not a directory",
- 21: "is a directory",
- 22: "invalid argument",
- 23: "file table overflow",
- 24: "too many open files",
- 25: "inappropriate ioctl for device",
- 26: "text file busy",
- 27: "file too large",
- 28: "no space left on device",
- 29: "illegal seek",
- 30: "read-only file system",
- 31: "too many links",
- 32: "broken pipe",
- 33: "argument out of domain",
- 34: "result too large",
- 35: "no message of desired type",
- 36: "identifier removed",
- 37: "channel number out of range",
- 38: "level 2 not synchronized",
- 39: "level 3 halted",
- 40: "level 3 reset",
- 41: "link number out of range",
- 42: "protocol driver not attached",
- 43: "no CSI structure available",
- 44: "level 2 halted",
- 45: "deadlock situation detected/avoided",
- 46: "no record locks available",
- 47: "operation canceled",
- 48: "operation not supported",
- 49: "disc quota exceeded",
- 50: "bad exchange descriptor",
- 51: "bad request descriptor",
- 52: "message tables full",
- 53: "anode table overflow",
- 54: "bad request code",
- 55: "invalid slot",
- 56: "file locking deadlock",
- 57: "bad font file format",
- 58: "owner of the lock died",
- 59: "lock is not recoverable",
- 60: "not a stream device",
- 61: "no data available",
- 62: "timer expired",
- 63: "out of stream resources",
- 64: "machine is not on the network",
- 65: "package not installed",
- 66: "object is remote",
- 67: "link has been severed",
- 68: "advertise error",
- 69: "srmount error",
- 70: "communication error on send",
- 71: "protocol error",
- 72: "locked lock was unmapped ",
- 73: "facility is not active",
- 74: "multihop attempted",
- 77: "not a data message",
- 78: "file name too long",
- 79: "value too large for defined data type",
- 80: "name not unique on network",
- 81: "file descriptor in bad state",
- 82: "remote address changed",
- 83: "can not access a needed shared library",
- 84: "accessing a corrupted shared library",
- 85: ".lib section in a.out corrupted",
- 86: "attempting to link in more shared libraries than system limit",
- 87: "can not exec a shared library directly",
- 88: "illegal byte sequence",
- 89: "operation not applicable",
- 90: "number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS",
- 91: "error 91",
- 92: "error 92",
- 93: "directory not empty",
- 94: "too many users",
- 95: "socket operation on non-socket",
- 96: "destination address required",
- 97: "message too long",
- 98: "protocol wrong type for socket",
- 99: "option not supported by protocol",
- 120: "protocol not supported",
- 121: "socket type not supported",
- 122: "operation not supported on transport endpoint",
- 123: "protocol family not supported",
- 124: "address family not supported by protocol family",
- 125: "address already in use",
- 126: "cannot assign requested address",
- 127: "network is down",
- 128: "network is unreachable",
- 129: "network dropped connection because of reset",
- 130: "software caused connection abort",
- 131: "connection reset by peer",
- 132: "no buffer space available",
- 133: "transport endpoint is already connected",
- 134: "transport endpoint is not connected",
- 143: "cannot send after socket shutdown",
- 144: "too many references: cannot splice",
- 145: "connection timed out",
- 146: "connection refused",
- 147: "host is down",
- 148: "no route to host",
- 149: "operation already in progress",
- 150: "operation now in progress",
- 151: "stale NFS file handle",
-}
-
-// Signal table
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal Instruction",
- 5: "trace/Breakpoint Trap",
- 6: "abort",
- 7: "emulation Trap",
- 8: "arithmetic Exception",
- 9: "killed",
- 10: "bus Error",
- 11: "segmentation Fault",
- 12: "bad System Call",
- 13: "broken Pipe",
- 14: "alarm Clock",
- 15: "terminated",
- 16: "user Signal 1",
- 17: "user Signal 2",
- 18: "child Status Changed",
- 19: "power-Fail/Restart",
- 20: "window Size Change",
- 21: "urgent Socket Condition",
- 22: "pollable Event",
- 23: "stopped (signal)",
- 24: "stopped (user)",
- 25: "continued",
- 26: "stopped (tty input)",
- 27: "stopped (tty output)",
- 28: "virtual Timer Expired",
- 29: "profiling Timer Expired",
- 30: "cpu Limit Exceeded",
- 31: "file Size Limit Exceeded",
- 32: "no runnable lwp",
- 33: "inter-lwp signal",
- 34: "checkpoint Freeze",
- 35: "checkpoint Thaw",
- 36: "thread Cancellation",
- 37: "resource Lost",
- 38: "resource Control Exceeded",
- 39: "reserved for JVM 1",
- 40: "reserved for JVM 2",
-}
diff --git a/src/pkg/syscall/zerrors_windows.go b/src/pkg/syscall/zerrors_windows.go
deleted file mode 100644
index afdeae2bc..000000000
--- a/src/pkg/syscall/zerrors_windows.go
+++ /dev/null
@@ -1,283 +0,0 @@
-// mkerrors_windows.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-// Go names for Windows errors.
-const (
- ENOENT Errno = ERROR_FILE_NOT_FOUND
- ENOTDIR Errno = ERROR_PATH_NOT_FOUND
-)
-
-// Windows reserves errors >= 1<<29 for application use.
-const APPLICATION_ERROR = 1 << 29
-
-// Invented values to support what package os and others expects.
-const (
- E2BIG Errno = APPLICATION_ERROR + iota
- EACCES
- EADDRINUSE
- EADDRNOTAVAIL
- EADV
- EAFNOSUPPORT
- EAGAIN
- EALREADY
- EBADE
- EBADF
- EBADFD
- EBADMSG
- EBADR
- EBADRQC
- EBADSLT
- EBFONT
- EBUSY
- ECANCELED
- ECHILD
- ECHRNG
- ECOMM
- ECONNABORTED
- ECONNREFUSED
- ECONNRESET
- EDEADLK
- EDEADLOCK
- EDESTADDRREQ
- EDOM
- EDOTDOT
- EDQUOT
- EEXIST
- EFAULT
- EFBIG
- EHOSTDOWN
- EHOSTUNREACH
- EIDRM
- EILSEQ
- EINPROGRESS
- EINTR
- EINVAL
- EIO
- EISCONN
- EISDIR
- EISNAM
- EKEYEXPIRED
- EKEYREJECTED
- EKEYREVOKED
- EL2HLT
- EL2NSYNC
- EL3HLT
- EL3RST
- ELIBACC
- ELIBBAD
- ELIBEXEC
- ELIBMAX
- ELIBSCN
- ELNRNG
- ELOOP
- EMEDIUMTYPE
- EMFILE
- EMLINK
- EMSGSIZE
- EMULTIHOP
- ENAMETOOLONG
- ENAVAIL
- ENETDOWN
- ENETRESET
- ENETUNREACH
- ENFILE
- ENOANO
- ENOBUFS
- ENOCSI
- ENODATA
- ENODEV
- ENOEXEC
- ENOKEY
- ENOLCK
- ENOLINK
- ENOMEDIUM
- ENOMEM
- ENOMSG
- ENONET
- ENOPKG
- ENOPROTOOPT
- ENOSPC
- ENOSR
- ENOSTR
- ENOSYS
- ENOTBLK
- ENOTCONN
- ENOTEMPTY
- ENOTNAM
- ENOTRECOVERABLE
- ENOTSOCK
- ENOTSUP
- ENOTTY
- ENOTUNIQ
- ENXIO
- EOPNOTSUPP
- EOVERFLOW
- EOWNERDEAD
- EPERM
- EPFNOSUPPORT
- EPIPE
- EPROTO
- EPROTONOSUPPORT
- EPROTOTYPE
- ERANGE
- EREMCHG
- EREMOTE
- EREMOTEIO
- ERESTART
- EROFS
- ESHUTDOWN
- ESOCKTNOSUPPORT
- ESPIPE
- ESRCH
- ESRMNT
- ESTALE
- ESTRPIPE
- ETIME
- ETIMEDOUT
- ETOOMANYREFS
- ETXTBSY
- EUCLEAN
- EUNATCH
- EUSERS
- EWOULDBLOCK
- EXDEV
- EXFULL
- EWINDOWS
-)
-
-// Error strings for invented errors
-var errors = [...]string{
- E2BIG - APPLICATION_ERROR: "argument list too long",
- EACCES - APPLICATION_ERROR: "permission denied",
- EADDRINUSE - APPLICATION_ERROR: "address already in use",
- EADDRNOTAVAIL - APPLICATION_ERROR: "cannot assign requested address",
- EADV - APPLICATION_ERROR: "advertise error",
- EAFNOSUPPORT - APPLICATION_ERROR: "address family not supported by protocol",
- EAGAIN - APPLICATION_ERROR: "resource temporarily unavailable",
- EALREADY - APPLICATION_ERROR: "operation already in progress",
- EBADE - APPLICATION_ERROR: "invalid exchange",
- EBADF - APPLICATION_ERROR: "bad file descriptor",
- EBADFD - APPLICATION_ERROR: "file descriptor in bad state",
- EBADMSG - APPLICATION_ERROR: "bad message",
- EBADR - APPLICATION_ERROR: "invalid request descriptor",
- EBADRQC - APPLICATION_ERROR: "invalid request code",
- EBADSLT - APPLICATION_ERROR: "invalid slot",
- EBFONT - APPLICATION_ERROR: "bad font file format",
- EBUSY - APPLICATION_ERROR: "device or resource busy",
- ECANCELED - APPLICATION_ERROR: "operation canceled",
- ECHILD - APPLICATION_ERROR: "no child processes",
- ECHRNG - APPLICATION_ERROR: "channel number out of range",
- ECOMM - APPLICATION_ERROR: "communication error on send",
- ECONNABORTED - APPLICATION_ERROR: "software caused connection abort",
- ECONNREFUSED - APPLICATION_ERROR: "connection refused",
- ECONNRESET - APPLICATION_ERROR: "connection reset by peer",
- EDEADLK - APPLICATION_ERROR: "resource deadlock avoided",
- EDEADLOCK - APPLICATION_ERROR: "resource deadlock avoided",
- EDESTADDRREQ - APPLICATION_ERROR: "destination address required",
- EDOM - APPLICATION_ERROR: "numerical argument out of domain",
- EDOTDOT - APPLICATION_ERROR: "RFS specific error",
- EDQUOT - APPLICATION_ERROR: "disk quota exceeded",
- EEXIST - APPLICATION_ERROR: "file exists",
- EFAULT - APPLICATION_ERROR: "bad address",
- EFBIG - APPLICATION_ERROR: "file too large",
- EHOSTDOWN - APPLICATION_ERROR: "host is down",
- EHOSTUNREACH - APPLICATION_ERROR: "no route to host",
- EIDRM - APPLICATION_ERROR: "identifier removed",
- EILSEQ - APPLICATION_ERROR: "invalid or incomplete multibyte or wide character",
- EINPROGRESS - APPLICATION_ERROR: "operation now in progress",
- EINTR - APPLICATION_ERROR: "interrupted system call",
- EINVAL - APPLICATION_ERROR: "invalid argument",
- EIO - APPLICATION_ERROR: "input/output error",
- EISCONN - APPLICATION_ERROR: "transport endpoint is already connected",
- EISDIR - APPLICATION_ERROR: "is a directory",
- EISNAM - APPLICATION_ERROR: "is a named type file",
- EKEYEXPIRED - APPLICATION_ERROR: "key has expired",
- EKEYREJECTED - APPLICATION_ERROR: "key was rejected by service",
- EKEYREVOKED - APPLICATION_ERROR: "key has been revoked",
- EL2HLT - APPLICATION_ERROR: "level 2 halted",
- EL2NSYNC - APPLICATION_ERROR: "level 2 not synchronized",
- EL3HLT - APPLICATION_ERROR: "level 3 halted",
- EL3RST - APPLICATION_ERROR: "level 3 reset",
- ELIBACC - APPLICATION_ERROR: "can not access a needed shared library",
- ELIBBAD - APPLICATION_ERROR: "accessing a corrupted shared library",
- ELIBEXEC - APPLICATION_ERROR: "cannot exec a shared library directly",
- ELIBMAX - APPLICATION_ERROR: "attempting to link in too many shared libraries",
- ELIBSCN - APPLICATION_ERROR: ".lib section in a.out corrupted",
- ELNRNG - APPLICATION_ERROR: "link number out of range",
- ELOOP - APPLICATION_ERROR: "too many levels of symbolic links",
- EMEDIUMTYPE - APPLICATION_ERROR: "wrong medium type",
- EMFILE - APPLICATION_ERROR: "too many open files",
- EMLINK - APPLICATION_ERROR: "too many links",
- EMSGSIZE - APPLICATION_ERROR: "message too long",
- EMULTIHOP - APPLICATION_ERROR: "multihop attempted",
- ENAMETOOLONG - APPLICATION_ERROR: "file name too long",
- ENAVAIL - APPLICATION_ERROR: "no XENIX semaphores available",
- ENETDOWN - APPLICATION_ERROR: "network is down",
- ENETRESET - APPLICATION_ERROR: "network dropped connection on reset",
- ENETUNREACH - APPLICATION_ERROR: "network is unreachable",
- ENFILE - APPLICATION_ERROR: "too many open files in system",
- ENOANO - APPLICATION_ERROR: "no anode",
- ENOBUFS - APPLICATION_ERROR: "no buffer space available",
- ENOCSI - APPLICATION_ERROR: "no CSI structure available",
- ENODATA - APPLICATION_ERROR: "no data available",
- ENODEV - APPLICATION_ERROR: "no such device",
- ENOEXEC - APPLICATION_ERROR: "exec format error",
- ENOKEY - APPLICATION_ERROR: "required key not available",
- ENOLCK - APPLICATION_ERROR: "no locks available",
- ENOLINK - APPLICATION_ERROR: "link has been severed",
- ENOMEDIUM - APPLICATION_ERROR: "no medium found",
- ENOMEM - APPLICATION_ERROR: "cannot allocate memory",
- ENOMSG - APPLICATION_ERROR: "no message of desired type",
- ENONET - APPLICATION_ERROR: "machine is not on the network",
- ENOPKG - APPLICATION_ERROR: "package not installed",
- ENOPROTOOPT - APPLICATION_ERROR: "protocol not available",
- ENOSPC - APPLICATION_ERROR: "no space left on device",
- ENOSR - APPLICATION_ERROR: "out of streams resources",
- ENOSTR - APPLICATION_ERROR: "device not a stream",
- ENOSYS - APPLICATION_ERROR: "function not implemented",
- ENOTBLK - APPLICATION_ERROR: "block device required",
- ENOTCONN - APPLICATION_ERROR: "transport endpoint is not connected",
- ENOTEMPTY - APPLICATION_ERROR: "directory not empty",
- ENOTNAM - APPLICATION_ERROR: "not a XENIX named type file",
- ENOTRECOVERABLE - APPLICATION_ERROR: "state not recoverable",
- ENOTSOCK - APPLICATION_ERROR: "socket operation on non-socket",
- ENOTSUP - APPLICATION_ERROR: "operation not supported",
- ENOTTY - APPLICATION_ERROR: "inappropriate ioctl for device",
- ENOTUNIQ - APPLICATION_ERROR: "name not unique on network",
- ENXIO - APPLICATION_ERROR: "no such device or address",
- EOPNOTSUPP - APPLICATION_ERROR: "operation not supported",
- EOVERFLOW - APPLICATION_ERROR: "value too large for defined data type",
- EOWNERDEAD - APPLICATION_ERROR: "owner died",
- EPERM - APPLICATION_ERROR: "operation not permitted",
- EPFNOSUPPORT - APPLICATION_ERROR: "protocol family not supported",
- EPIPE - APPLICATION_ERROR: "broken pipe",
- EPROTO - APPLICATION_ERROR: "protocol error",
- EPROTONOSUPPORT - APPLICATION_ERROR: "protocol not supported",
- EPROTOTYPE - APPLICATION_ERROR: "protocol wrong type for socket",
- ERANGE - APPLICATION_ERROR: "numerical result out of range",
- EREMCHG - APPLICATION_ERROR: "remote address changed",
- EREMOTE - APPLICATION_ERROR: "object is remote",
- EREMOTEIO - APPLICATION_ERROR: "remote I/O error",
- ERESTART - APPLICATION_ERROR: "interrupted system call should be restarted",
- EROFS - APPLICATION_ERROR: "read-only file system",
- ESHUTDOWN - APPLICATION_ERROR: "cannot send after transport endpoint shutdown",
- ESOCKTNOSUPPORT - APPLICATION_ERROR: "socket type not supported",
- ESPIPE - APPLICATION_ERROR: "illegal seek",
- ESRCH - APPLICATION_ERROR: "no such process",
- ESRMNT - APPLICATION_ERROR: "srmount error",
- ESTALE - APPLICATION_ERROR: "stale NFS file handle",
- ESTRPIPE - APPLICATION_ERROR: "streams pipe error",
- ETIME - APPLICATION_ERROR: "timer expired",
- ETIMEDOUT - APPLICATION_ERROR: "connection timed out",
- ETOOMANYREFS - APPLICATION_ERROR: "too many references: cannot splice",
- ETXTBSY - APPLICATION_ERROR: "text file busy",
- EUCLEAN - APPLICATION_ERROR: "structure needs cleaning",
- EUNATCH - APPLICATION_ERROR: "protocol driver not attached",
- EUSERS - APPLICATION_ERROR: "too many users",
- EWOULDBLOCK - APPLICATION_ERROR: "resource temporarily unavailable",
- EXDEV - APPLICATION_ERROR: "invalid cross-device link",
- EXFULL - APPLICATION_ERROR: "exchange full",
- EWINDOWS - APPLICATION_ERROR: "not supported by windows",
-}
diff --git a/src/pkg/syscall/zerrors_windows_386.go b/src/pkg/syscall/zerrors_windows_386.go
deleted file mode 100644
index d1008bd03..000000000
--- a/src/pkg/syscall/zerrors_windows_386.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// 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.
-
-package syscall
diff --git a/src/pkg/syscall/zerrors_windows_amd64.go b/src/pkg/syscall/zerrors_windows_amd64.go
deleted file mode 100644
index d1008bd03..000000000
--- a/src/pkg/syscall/zerrors_windows_amd64.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// 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.
-
-package syscall
diff --git a/src/pkg/syscall/zsyscall_darwin_386.go b/src/pkg/syscall/zsyscall_darwin_386.go
deleted file mode 100644
index a6a176b60..000000000
--- a/src/pkg/syscall/zsyscall_darwin_386.go
+++ /dev/null
@@ -1,1387 +0,0 @@
-// mksyscall.pl -l32 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
- r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int32(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_darwin_amd64.go b/src/pkg/syscall/zsyscall_darwin_amd64.go
deleted file mode 100644
index f5867c45d..000000000
--- a/src/pkg/syscall/zsyscall_darwin_amd64.go
+++ /dev/null
@@ -1,1387 +0,0 @@
-// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- newoffset = int64(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
- ret = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
- r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int64(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_dragonfly_386.go b/src/pkg/syscall/zsyscall_dragonfly_386.go
deleted file mode 100644
index 0ec813232..000000000
--- a/src/pkg/syscall/zsyscall_dragonfly_386.go
+++ /dev/null
@@ -1,1287 +0,0 @@
-// mksyscall.pl -l32 -dragonfly syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EXTPREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EXTPWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_dragonfly_amd64.go b/src/pkg/syscall/zsyscall_dragonfly_amd64.go
deleted file mode 100644
index 8c7cce54e..000000000
--- a/src/pkg/syscall/zsyscall_dragonfly_amd64.go
+++ /dev/null
@@ -1,1287 +0,0 @@
-// mksyscall.pl -dragonfly syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EXTPREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EXTPWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
- newoffset = int64(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_freebsd_386.go b/src/pkg/syscall/zsyscall_freebsd_386.go
deleted file mode 100644
index 5befe83c6..000000000
--- a/src/pkg/syscall/zsyscall_freebsd_386.go
+++ /dev/null
@@ -1,1298 +0,0 @@
-// mksyscall.pl -l32 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_freebsd_amd64.go b/src/pkg/syscall/zsyscall_freebsd_amd64.go
deleted file mode 100644
index ab2eb80c6..000000000
--- a/src/pkg/syscall/zsyscall_freebsd_amd64.go
+++ /dev/null
@@ -1,1298 +0,0 @@
-// mksyscall.pl syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- newoffset = int64(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
- ret = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_freebsd_arm.go b/src/pkg/syscall/zsyscall_freebsd_arm.go
deleted file mode 100644
index c1f0f907c..000000000
--- a/src/pkg/syscall/zsyscall_freebsd_arm.go
+++ /dev/null
@@ -1,1298 +0,0 @@
-// mksyscall.pl -l32 -arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_linux_386.go b/src/pkg/syscall/zsyscall_linux_386.go
deleted file mode 100644
index 6eeb11828..000000000
--- a/src/pkg/syscall/zsyscall_linux_386.go
+++ /dev/null
@@ -1,1737 +0,0 @@
-// mksyscall.pl -l32 syscall_linux.go syscall_linux_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Creat(path string, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_CREAT, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(events) > 0 {
- _p0 = unsafe.Pointer(&events[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
- _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(oldpath string, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
- _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(oldpath string, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(oldpath string, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- Syscall(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
- r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
- n = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
- _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0)
- euid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ioperm(from int, num int, on int) (err error) {
- _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Iopl(level int) (err error) {
- _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
- written = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID32, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- nn = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
- xaddr = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getrlimit(resource int, rlim *rlimit32) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setrlimit(resource int, rlim *rlimit32) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Time(t *Time_t) (tt Time_t, err error) {
- r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
- tt = Time_t(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_linux_amd64.go b/src/pkg/syscall/zsyscall_linux_amd64.go
deleted file mode 100644
index c65448e21..000000000
--- a/src/pkg/syscall/zsyscall_linux_amd64.go
+++ /dev/null
@@ -1,1930 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Creat(path string, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_CREAT, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(events) > 0 {
- _p0 = unsafe.Pointer(&events[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
- _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(oldpath string, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
- _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(oldpath string, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(oldpath string, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- Syscall(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
- n = int64(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
- _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- euid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ioperm(from int, num int, on int) (err error) {
- _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Iopl(level int) (err error) {
- _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- off = int64(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
- written = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
- r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int64(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- nn = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
- xaddr = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_linux_arm.go b/src/pkg/syscall/zsyscall_linux_arm.go
deleted file mode 100644
index a970ce6dc..000000000
--- a/src/pkg/syscall/zsyscall_linux_arm.go
+++ /dev/null
@@ -1,1885 +0,0 @@
-// mksyscall.pl -l32 -arm syscall_linux.go syscall_linux_arm.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Creat(path string, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_CREAT, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(events) > 0 {
- _p0 = unsafe.Pointer(&events[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
- _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(oldpath string, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
- _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(oldpath string, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(oldpath string, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- Syscall(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
- r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
- n = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
- _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- nn = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0)
- euid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
- written = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
- _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID32, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Time(t *Time_t) (tt Time_t, err error) {
- r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
- tt = Time_t(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall6(SYS_FTRUNCATE64, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
- xaddr = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getrlimit(resource int, rlim *rlimit32) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setrlimit(resource int, rlim *rlimit32) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_nacl_386.go b/src/pkg/syscall/zsyscall_nacl_386.go
deleted file mode 100644
index 32eed339a..000000000
--- a/src/pkg/syscall/zsyscall_nacl_386.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// mksyscall.pl -l32 -nacl syscall_nacl.go syscall_nacl_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclClose(fd int) (err error) {
- _, _, e1 := Syscall(sys_close, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) (err error) {
- _, _, e1 := Syscall(sys_exit, uintptr(code), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclFstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(sys_fstat, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclRead(fd int, b []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(sys_read, uintptr(fd), uintptr(_p0), uintptr(len(b)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclSeek(fd int, off *int64, whence int) (err error) {
- _, _, e1 := Syscall(sys_lseek, uintptr(fd), uintptr(unsafe.Pointer(off)), uintptr(whence))
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_nacl_amd64p32.go b/src/pkg/syscall/zsyscall_nacl_amd64p32.go
deleted file mode 100644
index 8bc81fac9..000000000
--- a/src/pkg/syscall/zsyscall_nacl_amd64p32.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// mksyscall.pl -nacl syscall_nacl.go syscall_nacl_amd64p32.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclClose(fd int) (err error) {
- _, _, e1 := Syscall(sys_close, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) (err error) {
- _, _, e1 := Syscall(sys_exit, uintptr(code), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclFstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(sys_fstat, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclRead(fd int, b []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(sys_read, uintptr(fd), uintptr(_p0), uintptr(len(b)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclSeek(fd int, off *int64, whence int) (err error) {
- _, _, e1 := Syscall(sys_lseek, uintptr(fd), uintptr(unsafe.Pointer(off)), uintptr(whence))
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_netbsd_386.go b/src/pkg/syscall/zsyscall_netbsd_386.go
deleted file mode 100644
index 281208f41..000000000
--- a/src/pkg/syscall/zsyscall_netbsd_386.go
+++ /dev/null
@@ -1,1224 +0,0 @@
-// mksyscall.pl -l32 -netbsd syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (fd1 int, fd2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- fd1 = int(r0)
- fd2 = int(r1)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_netbsd_amd64.go b/src/pkg/syscall/zsyscall_netbsd_amd64.go
deleted file mode 100644
index ed9a87df6..000000000
--- a/src/pkg/syscall/zsyscall_netbsd_amd64.go
+++ /dev/null
@@ -1,1224 +0,0 @@
-// mksyscall.pl -netbsd syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (fd1 int, fd2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- fd1 = int(r0)
- fd2 = int(r1)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
- newoffset = int64(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_netbsd_arm.go b/src/pkg/syscall/zsyscall_netbsd_arm.go
deleted file mode 100644
index c5c9a9f2c..000000000
--- a/src/pkg/syscall/zsyscall_netbsd_arm.go
+++ /dev/null
@@ -1,1224 +0,0 @@
-// mksyscall.pl -l32 -arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (fd1 int, fd2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- fd1 = int(r0)
- fd2 = int(r1)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_openbsd_386.go b/src/pkg/syscall/zsyscall_openbsd_386.go
deleted file mode 100644
index 785e7c3b8..000000000
--- a/src/pkg/syscall/zsyscall_openbsd_386.go
+++ /dev/null
@@ -1,1262 +0,0 @@
-// mksyscall.pl -l32 -openbsd syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_openbsd_amd64.go b/src/pkg/syscall/zsyscall_openbsd_amd64.go
deleted file mode 100644
index 7a8d9b6f1..000000000
--- a/src/pkg/syscall/zsyscall_openbsd_amd64.go
+++ /dev/null
@@ -1,1262 +0,0 @@
-// mksyscall.pl -openbsd syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
- newoffset = int64(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
- _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_plan9_386.go b/src/pkg/syscall/zsyscall_plan9_386.go
deleted file mode 100644
index 5ffa0e439..000000000
--- a/src/pkg/syscall/zsyscall_plan9_386.go
+++ /dev/null
@@ -1,282 +0,0 @@
-// mksyscall.pl -l32 -plan9 syscall_plan9.go syscall_plan9_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fd2path(fd int, buf []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
- r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func await(s []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(s) > 0 {
- _p0 = unsafe.Pointer(&s[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0)
- n = int(r0)
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int, newfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0)
- fd = int(r0)
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- fd = int(r0)
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Create(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Remove(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Bind(name string, old string, flag int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(old)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mount(fd int, afd int, old string, flag int, aname string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(old)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(aname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0)
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, edir []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(edir) > 0 {
- _p1 = unsafe.Pointer(&edir[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
- n = int(r0)
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, edir []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(edir) > 0 {
- _p0 = unsafe.Pointer(&edir[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
- n = int(r0)
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Wstat(path string, edir []byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(edir) > 0 {
- _p1 = unsafe.Pointer(&edir[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
- if int(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fwstat(fd int, edir []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(edir) > 0 {
- _p0 = unsafe.Pointer(&edir[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
- if int(r0) == -1 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_plan9_amd64.go b/src/pkg/syscall/zsyscall_plan9_amd64.go
deleted file mode 100644
index c64533f49..000000000
--- a/src/pkg/syscall/zsyscall_plan9_amd64.go
+++ /dev/null
@@ -1,282 +0,0 @@
-// mksyscall.pl -l32 -plan9 syscall_plan9.go syscall_plan9_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fd2path(fd int, buf []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
- r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func await(s []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(s) > 0 {
- _p0 = unsafe.Pointer(&s[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0)
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int, newfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0)
- fd = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- fd = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Create(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Remove(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Bind(name string, old string, flag int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(old)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mount(fd int, afd int, old string, flag int, aname string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(old)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(aname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, edir []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(edir) > 0 {
- _p1 = unsafe.Pointer(&edir[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, edir []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(edir) > 0 {
- _p0 = unsafe.Pointer(&edir[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
- n = int(r0)
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Wstat(path string, edir []byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(edir) > 0 {
- _p1 = unsafe.Pointer(&edir[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fwstat(fd int, edir []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(edir) > 0 {
- _p0 = unsafe.Pointer(&edir[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
- if int32(r0) == -1 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_solaris_amd64.go b/src/pkg/syscall/zsyscall_solaris_amd64.go
deleted file mode 100644
index 8847cad01..000000000
--- a/src/pkg/syscall/zsyscall_solaris_amd64.go
+++ /dev/null
@@ -1,883 +0,0 @@
-// mksyscall_solaris.pl syscall_solaris.go syscall_solaris_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-var (
- modlibc = newLazySO("libc.so")
- modlibsocket = newLazySO("libsocket.so")
-
- procgetgroups = modlibc.NewProc("getgroups")
- procsetgroups = modlibc.NewProc("setgroups")
- procfcntl = modlibc.NewProc("fcntl")
- procaccept = modlibsocket.NewProc("accept")
- procsendmsg = modlibsocket.NewProc("sendmsg")
- procAccess = modlibc.NewProc("access")
- procAdjtime = modlibc.NewProc("adjtime")
- procChdir = modlibc.NewProc("chdir")
- procChmod = modlibc.NewProc("chmod")
- procChown = modlibc.NewProc("chown")
- procChroot = modlibc.NewProc("chroot")
- procClose = modlibc.NewProc("close")
- procDup = modlibc.NewProc("dup")
- procExit = modlibc.NewProc("exit")
- procFchdir = modlibc.NewProc("fchdir")
- procFchmod = modlibc.NewProc("fchmod")
- procFchown = modlibc.NewProc("fchown")
- procFpathconf = modlibc.NewProc("fpathconf")
- procFstat = modlibc.NewProc("fstat")
- procGetdents = modlibc.NewProc("getdents")
- procGetgid = modlibc.NewProc("getgid")
- procGetpid = modlibc.NewProc("getpid")
- procGeteuid = modlibc.NewProc("geteuid")
- procGetegid = modlibc.NewProc("getegid")
- procGetppid = modlibc.NewProc("getppid")
- procGetpriority = modlibc.NewProc("getpriority")
- procGetrlimit = modlibc.NewProc("getrlimit")
- procGettimeofday = modlibc.NewProc("gettimeofday")
- procGetuid = modlibc.NewProc("getuid")
- procKill = modlibc.NewProc("kill")
- procLchown = modlibc.NewProc("lchown")
- procLink = modlibc.NewProc("link")
- proclisten = modlibsocket.NewProc("listen")
- procLstat = modlibc.NewProc("lstat")
- procMkdir = modlibc.NewProc("mkdir")
- procMknod = modlibc.NewProc("mknod")
- procNanosleep = modlibc.NewProc("nanosleep")
- procOpen = modlibc.NewProc("open")
- procPathconf = modlibc.NewProc("pathconf")
- procPread = modlibc.NewProc("pread")
- procPwrite = modlibc.NewProc("pwrite")
- procread = modlibc.NewProc("read")
- procReadlink = modlibc.NewProc("readlink")
- procRename = modlibc.NewProc("rename")
- procRmdir = modlibc.NewProc("rmdir")
- proclseek = modlibc.NewProc("lseek")
- procSetegid = modlibc.NewProc("setegid")
- procSeteuid = modlibc.NewProc("seteuid")
- procSetgid = modlibc.NewProc("setgid")
- procSetpgid = modlibc.NewProc("setpgid")
- procSetpriority = modlibc.NewProc("setpriority")
- procSetregid = modlibc.NewProc("setregid")
- procSetreuid = modlibc.NewProc("setreuid")
- procSetrlimit = modlibc.NewProc("setrlimit")
- procSetsid = modlibc.NewProc("setsid")
- procSetuid = modlibc.NewProc("setuid")
- procshutdown = modlibsocket.NewProc("shutdown")
- procStat = modlibc.NewProc("stat")
- procSymlink = modlibc.NewProc("symlink")
- procSync = modlibc.NewProc("sync")
- procTruncate = modlibc.NewProc("truncate")
- procFsync = modlibc.NewProc("fsync")
- procFtruncate = modlibc.NewProc("ftruncate")
- procUmask = modlibc.NewProc("umask")
- procUnlink = modlibc.NewProc("unlink")
- procUtimes = modlibc.NewProc("utimes")
- procbind = modlibsocket.NewProc("bind")
- procconnect = modlibsocket.NewProc("connect")
- procmmap = modlibc.NewProc("mmap")
- procmunmap = modlibc.NewProc("munmap")
- procsendto = modlibsocket.NewProc("sendto")
- procsocket = modlibsocket.NewProc("socket")
- procsocketpair = modlibsocket.NewProc("socketpair")
- procwrite = modlibc.NewProc("write")
- procgetsockopt = modlibsocket.NewProc("getsockopt")
- procgetpeername = modlibsocket.NewProc("getpeername")
- procgetsockname = modlibsocket.NewProc("getsockname")
- procsetsockopt = modlibsocket.NewProc("setsockopt")
- procrecvfrom = modlibsocket.NewProc("recvfrom")
- procrecvmsg = modlibsocket.NewProc("recvmsg")
-)
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := rawSysvicall6(procgetgroups.Addr(), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := rawSysvicall6(procsetgroups.Addr(), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := sysvicall6(procfcntl.Addr(), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := sysvicall6(procaccept.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := sysvicall6(procsendmsg.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procAccess.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := sysvicall6(procAdjtime.Addr(), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procChdir.Addr(), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procChmod.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procChown.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procChroot.Addr(), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Close(fd int) (err error) {
- _, _, e1 := sysvicall6(procClose.Addr(), 1, uintptr(fd), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := sysvicall6(procDup.Addr(), 1, uintptr(fd), 0, 0, 0, 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Exit(code int) {
- sysvicall6(procExit.Addr(), 1, uintptr(code), 0, 0, 0, 0, 0)
- return
-}
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := sysvicall6(procFchdir.Addr(), 1, uintptr(fd), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := sysvicall6(procFchmod.Addr(), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := sysvicall6(procFchown.Addr(), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := sysvicall6(procFpathconf.Addr(), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := sysvicall6(procFstat.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
- }
- r0, _, e1 := sysvicall6(procGetdents.Addr(), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Getgid() (gid int) {
- r0, _, _ := rawSysvicall6(procGetgid.Addr(), 0, 0, 0, 0, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-func Getpid() (pid int) {
- r0, _, _ := rawSysvicall6(procGetpid.Addr(), 0, 0, 0, 0, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-func Geteuid() (euid int) {
- r0, _, _ := sysvicall6(procGeteuid.Addr(), 0, 0, 0, 0, 0, 0, 0)
- euid = int(r0)
- return
-}
-
-func Getegid() (egid int) {
- r0, _, _ := sysvicall6(procGetegid.Addr(), 0, 0, 0, 0, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-func Getppid() (ppid int) {
- r0, _, _ := sysvicall6(procGetppid.Addr(), 0, 0, 0, 0, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-func Getpriority(which int, who int) (n int, err error) {
- r0, _, e1 := sysvicall6(procGetpriority.Addr(), 2, uintptr(which), uintptr(who), 0, 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := rawSysvicall6(procGetrlimit.Addr(), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := rawSysvicall6(procGettimeofday.Addr(), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Getuid() (uid int) {
- r0, _, _ := rawSysvicall6(procGetuid.Addr(), 0, 0, 0, 0, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-func Kill(pid int, signum Signal) (err error) {
- _, _, e1 := sysvicall6(procKill.Addr(), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procLchown.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procLink.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := sysvicall6(proclisten.Addr(), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procLstat.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procMkdir.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procMknod.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := sysvicall6(procNanosleep.Addr(), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := sysvicall6(procOpen.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := sysvicall6(procPathconf.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0)
- val = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 *byte
- if len(p) > 0 {
- _p0 = &p[0]
- }
- r0, _, e1 := sysvicall6(procPread.Addr(), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 *byte
- if len(p) > 0 {
- _p0 = &p[0]
- }
- r0, _, e1 := sysvicall6(procPwrite.Addr(), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 *byte
- if len(p) > 0 {
- _p0 = &p[0]
- }
- r0, _, e1 := sysvicall6(procread.Addr(), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- if len(buf) > 0 {
- _p1 = &buf[0]
- }
- r0, _, e1 := sysvicall6(procReadlink.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procRename.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procRmdir.Addr(), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := sysvicall6(proclseek.Addr(), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)
- newoffset = int64(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setegid(egid int) (err error) {
- _, _, e1 := rawSysvicall6(procSetegid.Addr(), 1, uintptr(egid), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := rawSysvicall6(procSeteuid.Addr(), 1, uintptr(euid), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setgid(gid int) (err error) {
- _, _, e1 := rawSysvicall6(procSetgid.Addr(), 1, uintptr(gid), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := rawSysvicall6(procSetpgid.Addr(), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := sysvicall6(procSetpriority.Addr(), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := rawSysvicall6(procSetregid.Addr(), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := rawSysvicall6(procSetreuid.Addr(), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := rawSysvicall6(procSetrlimit.Addr(), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := rawSysvicall6(procSetsid.Addr(), 0, 0, 0, 0, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Setuid(uid int) (err error) {
- _, _, e1 := rawSysvicall6(procSetuid.Addr(), 1, uintptr(uid), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := sysvicall6(procshutdown.Addr(), 2, uintptr(s), uintptr(how), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procStat.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procSymlink.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Sync() (err error) {
- _, _, e1 := sysvicall6(procSync.Addr(), 0, 0, 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procTruncate.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Fsync(fd int) (err error) {
- _, _, e1 := sysvicall6(procFsync.Addr(), 1, uintptr(fd), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := sysvicall6(procFtruncate.Addr(), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := sysvicall6(procUmask.Addr(), 1, uintptr(newmask), 0, 0, 0, 0, 0)
- oldmask = int(r0)
- return
-}
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procUnlink.Addr(), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Utimes(path string, times *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := sysvicall6(procUtimes.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := sysvicall6(procbind.Addr(), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := sysvicall6(procconnect.Addr(), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := sysvicall6(procmmap.Addr(), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
- ret = uintptr(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := sysvicall6(procmunmap.Addr(), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
- }
- _, _, e1 := sysvicall6(procsendto.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := sysvicall6(procsocket.Addr(), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := rawSysvicall6(procsocketpair.Addr(), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 *byte
- if len(p) > 0 {
- _p0 = &p[0]
- }
- r0, _, e1 := sysvicall6(procwrite.Addr(), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := sysvicall6(procgetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := rawSysvicall6(procgetpeername.Addr(), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := sysvicall6(procgetsockname.Addr(), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := sysvicall6(procsetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 *byte
- if len(p) > 0 {
- _p0 = &p[0]
- }
- r0, _, e1 := sysvicall6(procrecvfrom.Addr(), 6, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := sysvicall6(procrecvmsg.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_windows_386.go b/src/pkg/syscall/zsyscall_windows_386.go
deleted file mode 100644
index 132adafef..000000000
--- a/src/pkg/syscall/zsyscall_windows_386.go
+++ /dev/null
@@ -1,1760 +0,0 @@
-// go build mksyscall_windows.go && ./mksyscall_windows syscall_windows.go security_windows.go syscall_windows_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-var (
- modkernel32 = NewLazyDLL("kernel32.dll")
- modadvapi32 = NewLazyDLL("advapi32.dll")
- modshell32 = NewLazyDLL("shell32.dll")
- modmswsock = NewLazyDLL("mswsock.dll")
- modcrypt32 = NewLazyDLL("crypt32.dll")
- modws2_32 = NewLazyDLL("ws2_32.dll")
- moddnsapi = NewLazyDLL("dnsapi.dll")
- modiphlpapi = NewLazyDLL("iphlpapi.dll")
- modsecur32 = NewLazyDLL("secur32.dll")
- modnetapi32 = NewLazyDLL("netapi32.dll")
- moduserenv = NewLazyDLL("userenv.dll")
-
- procGetLastError = modkernel32.NewProc("GetLastError")
- procLoadLibraryW = modkernel32.NewProc("LoadLibraryW")
- procFreeLibrary = modkernel32.NewProc("FreeLibrary")
- procGetProcAddress = modkernel32.NewProc("GetProcAddress")
- procGetVersion = modkernel32.NewProc("GetVersion")
- procFormatMessageW = modkernel32.NewProc("FormatMessageW")
- procExitProcess = modkernel32.NewProc("ExitProcess")
- procCreateFileW = modkernel32.NewProc("CreateFileW")
- procReadFile = modkernel32.NewProc("ReadFile")
- procWriteFile = modkernel32.NewProc("WriteFile")
- procSetFilePointer = modkernel32.NewProc("SetFilePointer")
- procCloseHandle = modkernel32.NewProc("CloseHandle")
- procGetStdHandle = modkernel32.NewProc("GetStdHandle")
- procFindFirstFileW = modkernel32.NewProc("FindFirstFileW")
- procFindNextFileW = modkernel32.NewProc("FindNextFileW")
- procFindClose = modkernel32.NewProc("FindClose")
- procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle")
- procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW")
- procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW")
- procCreateDirectoryW = modkernel32.NewProc("CreateDirectoryW")
- procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW")
- procDeleteFileW = modkernel32.NewProc("DeleteFileW")
- procMoveFileW = modkernel32.NewProc("MoveFileW")
- procGetComputerNameW = modkernel32.NewProc("GetComputerNameW")
- procSetEndOfFile = modkernel32.NewProc("SetEndOfFile")
- procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTimeAsFileTime")
- procGetTimeZoneInformation = modkernel32.NewProc("GetTimeZoneInformation")
- procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort")
- procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus")
- procPostQueuedCompletionStatus = modkernel32.NewProc("PostQueuedCompletionStatus")
- procCancelIo = modkernel32.NewProc("CancelIo")
- procCancelIoEx = modkernel32.NewProc("CancelIoEx")
- procCreateProcessW = modkernel32.NewProc("CreateProcessW")
- procOpenProcess = modkernel32.NewProc("OpenProcess")
- procTerminateProcess = modkernel32.NewProc("TerminateProcess")
- procGetExitCodeProcess = modkernel32.NewProc("GetExitCodeProcess")
- procGetStartupInfoW = modkernel32.NewProc("GetStartupInfoW")
- procGetCurrentProcess = modkernel32.NewProc("GetCurrentProcess")
- procGetProcessTimes = modkernel32.NewProc("GetProcessTimes")
- procDuplicateHandle = modkernel32.NewProc("DuplicateHandle")
- procWaitForSingleObject = modkernel32.NewProc("WaitForSingleObject")
- procGetTempPathW = modkernel32.NewProc("GetTempPathW")
- procCreatePipe = modkernel32.NewProc("CreatePipe")
- procGetFileType = modkernel32.NewProc("GetFileType")
- procCryptAcquireContextW = modadvapi32.NewProc("CryptAcquireContextW")
- procCryptReleaseContext = modadvapi32.NewProc("CryptReleaseContext")
- procCryptGenRandom = modadvapi32.NewProc("CryptGenRandom")
- procGetEnvironmentStringsW = modkernel32.NewProc("GetEnvironmentStringsW")
- procFreeEnvironmentStringsW = modkernel32.NewProc("FreeEnvironmentStringsW")
- procGetEnvironmentVariableW = modkernel32.NewProc("GetEnvironmentVariableW")
- procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW")
- procSetFileTime = modkernel32.NewProc("SetFileTime")
- procGetFileAttributesW = modkernel32.NewProc("GetFileAttributesW")
- procSetFileAttributesW = modkernel32.NewProc("SetFileAttributesW")
- procGetFileAttributesExW = modkernel32.NewProc("GetFileAttributesExW")
- procGetCommandLineW = modkernel32.NewProc("GetCommandLineW")
- procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW")
- procLocalFree = modkernel32.NewProc("LocalFree")
- procSetHandleInformation = modkernel32.NewProc("SetHandleInformation")
- procFlushFileBuffers = modkernel32.NewProc("FlushFileBuffers")
- procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW")
- procGetLongPathNameW = modkernel32.NewProc("GetLongPathNameW")
- procGetShortPathNameW = modkernel32.NewProc("GetShortPathNameW")
- procCreateFileMappingW = modkernel32.NewProc("CreateFileMappingW")
- procMapViewOfFile = modkernel32.NewProc("MapViewOfFile")
- procUnmapViewOfFile = modkernel32.NewProc("UnmapViewOfFile")
- procFlushViewOfFile = modkernel32.NewProc("FlushViewOfFile")
- procVirtualLock = modkernel32.NewProc("VirtualLock")
- procVirtualUnlock = modkernel32.NewProc("VirtualUnlock")
- procTransmitFile = modmswsock.NewProc("TransmitFile")
- procReadDirectoryChangesW = modkernel32.NewProc("ReadDirectoryChangesW")
- procCertOpenSystemStoreW = modcrypt32.NewProc("CertOpenSystemStoreW")
- procCertOpenStore = modcrypt32.NewProc("CertOpenStore")
- procCertEnumCertificatesInStore = modcrypt32.NewProc("CertEnumCertificatesInStore")
- procCertAddCertificateContextToStore = modcrypt32.NewProc("CertAddCertificateContextToStore")
- procCertCloseStore = modcrypt32.NewProc("CertCloseStore")
- procCertGetCertificateChain = modcrypt32.NewProc("CertGetCertificateChain")
- procCertFreeCertificateChain = modcrypt32.NewProc("CertFreeCertificateChain")
- procCertCreateCertificateContext = modcrypt32.NewProc("CertCreateCertificateContext")
- procCertFreeCertificateContext = modcrypt32.NewProc("CertFreeCertificateContext")
- procCertVerifyCertificateChainPolicy = modcrypt32.NewProc("CertVerifyCertificateChainPolicy")
- procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyExW")
- procRegCloseKey = modadvapi32.NewProc("RegCloseKey")
- procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfoKeyW")
- procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyExW")
- procRegQueryValueExW = modadvapi32.NewProc("RegQueryValueExW")
- procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId")
- procGetConsoleMode = modkernel32.NewProc("GetConsoleMode")
- procWriteConsoleW = modkernel32.NewProc("WriteConsoleW")
- procReadConsoleW = modkernel32.NewProc("ReadConsoleW")
- procWSAStartup = modws2_32.NewProc("WSAStartup")
- procWSACleanup = modws2_32.NewProc("WSACleanup")
- procWSAIoctl = modws2_32.NewProc("WSAIoctl")
- procsocket = modws2_32.NewProc("socket")
- procsetsockopt = modws2_32.NewProc("setsockopt")
- procgetsockopt = modws2_32.NewProc("getsockopt")
- procbind = modws2_32.NewProc("bind")
- procconnect = modws2_32.NewProc("connect")
- procgetsockname = modws2_32.NewProc("getsockname")
- procgetpeername = modws2_32.NewProc("getpeername")
- proclisten = modws2_32.NewProc("listen")
- procshutdown = modws2_32.NewProc("shutdown")
- procclosesocket = modws2_32.NewProc("closesocket")
- procAcceptEx = modmswsock.NewProc("AcceptEx")
- procGetAcceptExSockaddrs = modmswsock.NewProc("GetAcceptExSockaddrs")
- procWSARecv = modws2_32.NewProc("WSARecv")
- procWSASend = modws2_32.NewProc("WSASend")
- procWSARecvFrom = modws2_32.NewProc("WSARecvFrom")
- procWSASendTo = modws2_32.NewProc("WSASendTo")
- procgethostbyname = modws2_32.NewProc("gethostbyname")
- procgetservbyname = modws2_32.NewProc("getservbyname")
- procntohs = modws2_32.NewProc("ntohs")
- procgetprotobyname = modws2_32.NewProc("getprotobyname")
- procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W")
- procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree")
- procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW")
- procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW")
- procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
- procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
- procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes")
- procWSAEnumProtocolsW = modws2_32.NewProc("WSAEnumProtocolsW")
- procTranslateNameW = modsecur32.NewProc("TranslateNameW")
- procGetUserNameExW = modsecur32.NewProc("GetUserNameExW")
- procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo")
- procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation")
- procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree")
- procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW")
- procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW")
- procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW")
- procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW")
- procGetLengthSid = modadvapi32.NewProc("GetLengthSid")
- procCopySid = modadvapi32.NewProc("CopySid")
- procOpenProcessToken = modadvapi32.NewProc("OpenProcessToken")
- procGetTokenInformation = modadvapi32.NewProc("GetTokenInformation")
- procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW")
-)
-
-func GetLastError() (lasterr error) {
- r0, _, _ := Syscall(procGetLastError.Addr(), 0, 0, 0, 0)
- if r0 != 0 {
- lasterr = Errno(r0)
- }
- return
-}
-
-func LoadLibrary(libname string) (handle Handle, err error) {
- var _p0 *uint16
- _p0, err = UTF16PtrFromString(libname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(procLoadLibraryW.Addr(), 1, uintptr(unsafe.Pointer(_p0)), 0, 0)
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func FreeLibrary(handle Handle) (err error) {
- r1, _, e1 := Syscall(procFreeLibrary.Addr(), 1, uintptr(handle), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetProcAddress(module Handle, procname string) (proc uintptr, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(procname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(procGetProcAddress.Addr(), 2, uintptr(module), uintptr(unsafe.Pointer(_p0)), 0)
- proc = uintptr(r0)
- if proc == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetVersion() (ver uint32, err error) {
- r0, _, e1 := Syscall(procGetVersion.Addr(), 0, 0, 0, 0)
- ver = uint32(r0)
- if ver == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func FormatMessage(flags uint32, msgsrc uint32, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) {
- var _p0 *uint16
- if len(buf) > 0 {
- _p0 = &buf[0]
- }
- r0, _, e1 := Syscall9(procFormatMessageW.Addr(), 7, uintptr(flags), uintptr(msgsrc), uintptr(msgid), uintptr(langid), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(args)), 0, 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func ExitProcess(exitcode uint32) {
- Syscall(procExitProcess.Addr(), 1, uintptr(exitcode), 0, 0)
- return
-}
-
-func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) {
- r0, _, e1 := Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
- }
- r1, _, e1 := Syscall6(procReadFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
- }
- r1, _, e1 := Syscall6(procWriteFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) {
- r0, _, e1 := Syscall6(procSetFilePointer.Addr(), 4, uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence), 0, 0)
- newlowoffset = uint32(r0)
- if newlowoffset == 0xffffffff {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CloseHandle(handle Handle) (err error) {
- r1, _, e1 := Syscall(procCloseHandle.Addr(), 1, uintptr(handle), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetStdHandle(stdhandle int) (handle Handle, err error) {
- r0, _, e1 := Syscall(procGetStdHandle.Addr(), 1, uintptr(stdhandle), 0, 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) {
- r0, _, e1 := Syscall(procFindFirstFileW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)), 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func findNextFile1(handle Handle, data *win32finddata1) (err error) {
- r1, _, e1 := Syscall(procFindNextFileW.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func FindClose(handle Handle) (err error) {
- r1, _, e1 := Syscall(procFindClose.Addr(), 1, uintptr(handle), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error) {
- r1, _, e1 := Syscall(procGetFileInformationByHandle.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) {
- r0, _, e1 := Syscall(procGetCurrentDirectoryW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func SetCurrentDirectory(path *uint16) (err error) {
- r1, _, e1 := Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) {
- r1, _, e1 := Syscall(procCreateDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(sa)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func RemoveDirectory(path *uint16) (err error) {
- r1, _, e1 := Syscall(procRemoveDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func DeleteFile(path *uint16) (err error) {
- r1, _, e1 := Syscall(procDeleteFileW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func MoveFile(from *uint16, to *uint16) (err error) {
- r1, _, e1 := Syscall(procMoveFileW.Addr(), 2, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetComputerName(buf *uint16, n *uint32) (err error) {
- r1, _, e1 := Syscall(procGetComputerNameW.Addr(), 2, uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func SetEndOfFile(handle Handle) (err error) {
- r1, _, e1 := Syscall(procSetEndOfFile.Addr(), 1, uintptr(handle), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetSystemTimeAsFileTime(time *Filetime) {
- Syscall(procGetSystemTimeAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0)
- return
-}
-
-func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) {
- r0, _, e1 := Syscall(procGetTimeZoneInformation.Addr(), 1, uintptr(unsafe.Pointer(tzi)), 0, 0)
- rc = uint32(r0)
- if rc == 0xffffffff {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error) {
- r0, _, e1 := Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt), 0, 0)
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error) {
- r1, _, e1 := Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := Syscall6(procPostQueuedCompletionStatus.Addr(), 4, uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CancelIo(s Handle) (err error) {
- r1, _, e1 := Syscall(procCancelIo.Addr(), 1, uintptr(s), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CancelIoEx(s Handle, o *Overlapped) (err error) {
- r1, _, e1 := Syscall(procCancelIoEx.Addr(), 2, uintptr(s), uintptr(unsafe.Pointer(o)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) {
- var _p0 uint32
- if inheritHandles {
- _p0 = 1
- } else {
- _p0 = 0
- }
- r1, _, e1 := Syscall12(procCreateProcessW.Addr(), 10, uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func OpenProcess(da uint32, inheritHandle bool, pid uint32) (handle Handle, err error) {
- var _p0 uint32
- if inheritHandle {
- _p0 = 1
- } else {
- _p0 = 0
- }
- r0, _, e1 := Syscall(procOpenProcess.Addr(), 3, uintptr(da), uintptr(_p0), uintptr(pid))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func TerminateProcess(handle Handle, exitcode uint32) (err error) {
- r1, _, e1 := Syscall(procTerminateProcess.Addr(), 2, uintptr(handle), uintptr(exitcode), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) {
- r1, _, e1 := Syscall(procGetExitCodeProcess.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(exitcode)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetStartupInfo(startupInfo *StartupInfo) (err error) {
- r1, _, e1 := Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetCurrentProcess() (pseudoHandle Handle, err error) {
- r0, _, e1 := Syscall(procGetCurrentProcess.Addr(), 0, 0, 0, 0)
- pseudoHandle = Handle(r0)
- if pseudoHandle == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) {
- r1, _, e1 := Syscall6(procGetProcessTimes.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error) {
- var _p0 uint32
- if bInheritHandle {
- _p0 = 1
- } else {
- _p0 = 0
- }
- r1, _, e1 := Syscall9(procDuplicateHandle.Addr(), 7, uintptr(hSourceProcessHandle), uintptr(hSourceHandle), uintptr(hTargetProcessHandle), uintptr(unsafe.Pointer(lpTargetHandle)), uintptr(dwDesiredAccess), uintptr(_p0), uintptr(dwOptions), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) {
- r0, _, e1 := Syscall(procWaitForSingleObject.Addr(), 2, uintptr(handle), uintptr(waitMilliseconds), 0)
- event = uint32(r0)
- if event == 0xffffffff {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) {
- r0, _, e1 := Syscall(procGetTempPathW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error) {
- r1, _, e1 := Syscall6(procCreatePipe.Addr(), 4, uintptr(unsafe.Pointer(readhandle)), uintptr(unsafe.Pointer(writehandle)), uintptr(unsafe.Pointer(sa)), uintptr(size), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetFileType(filehandle Handle) (n uint32, err error) {
- r0, _, e1 := Syscall(procGetFileType.Addr(), 1, uintptr(filehandle), 0, 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) {
- r1, _, e1 := Syscall6(procCryptAcquireContextW.Addr(), 5, uintptr(unsafe.Pointer(provhandle)), uintptr(unsafe.Pointer(container)), uintptr(unsafe.Pointer(provider)), uintptr(provtype), uintptr(flags), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CryptReleaseContext(provhandle Handle, flags uint32) (err error) {
- r1, _, e1 := Syscall(procCryptReleaseContext.Addr(), 2, uintptr(provhandle), uintptr(flags), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) {
- r1, _, e1 := Syscall(procCryptGenRandom.Addr(), 3, uintptr(provhandle), uintptr(buflen), uintptr(unsafe.Pointer(buf)))
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetEnvironmentStrings() (envs *uint16, err error) {
- r0, _, e1 := Syscall(procGetEnvironmentStringsW.Addr(), 0, 0, 0, 0)
- envs = (*uint16)(unsafe.Pointer(r0))
- if envs == nil {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func FreeEnvironmentStrings(envs *uint16) (err error) {
- r1, _, e1 := Syscall(procFreeEnvironmentStringsW.Addr(), 1, uintptr(unsafe.Pointer(envs)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) {
- r0, _, e1 := Syscall(procGetEnvironmentVariableW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(size))
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func SetEnvironmentVariable(name *uint16, value *uint16) (err error) {
- r1, _, e1 := Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) {
- r1, _, e1 := Syscall6(procSetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetFileAttributes(name *uint16) (attrs uint32, err error) {
- r0, _, e1 := Syscall(procGetFileAttributesW.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
- attrs = uint32(r0)
- if attrs == INVALID_FILE_ATTRIBUTES {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func SetFileAttributes(name *uint16, attrs uint32) (err error) {
- r1, _, e1 := Syscall(procSetFileAttributesW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(attrs), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) {
- r1, _, e1 := Syscall(procGetFileAttributesExW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(level), uintptr(unsafe.Pointer(info)))
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetCommandLine() (cmd *uint16) {
- r0, _, _ := Syscall(procGetCommandLineW.Addr(), 0, 0, 0, 0)
- cmd = (*uint16)(unsafe.Pointer(r0))
- return
-}
-
-func CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) {
- r0, _, e1 := Syscall(procCommandLineToArgvW.Addr(), 2, uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)), 0)
- argv = (*[8192]*[8192]uint16)(unsafe.Pointer(r0))
- if argv == nil {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func LocalFree(hmem Handle) (handle Handle, err error) {
- r0, _, e1 := Syscall(procLocalFree.Addr(), 1, uintptr(hmem), 0, 0)
- handle = Handle(r0)
- if handle != 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) {
- r1, _, e1 := Syscall(procSetHandleInformation.Addr(), 3, uintptr(handle), uintptr(mask), uintptr(flags))
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func FlushFileBuffers(handle Handle) (err error) {
- r1, _, e1 := Syscall(procFlushFileBuffers.Addr(), 1, uintptr(handle), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) {
- r0, _, e1 := Syscall6(procGetFullPathNameW.Addr(), 4, uintptr(unsafe.Pointer(path)), uintptr(buflen), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(fname)), 0, 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) {
- r0, _, e1 := Syscall(procGetLongPathNameW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(buf)), uintptr(buflen))
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) {
- r0, _, e1 := Syscall(procGetShortPathNameW.Addr(), 3, uintptr(unsafe.Pointer(longpath)), uintptr(unsafe.Pointer(shortpath)), uintptr(buflen))
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) {
- r0, _, e1 := Syscall6(procCreateFileMappingW.Addr(), 6, uintptr(fhandle), uintptr(unsafe.Pointer(sa)), uintptr(prot), uintptr(maxSizeHigh), uintptr(maxSizeLow), uintptr(unsafe.Pointer(name)))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) {
- r0, _, e1 := Syscall6(procMapViewOfFile.Addr(), 5, uintptr(handle), uintptr(access), uintptr(offsetHigh), uintptr(offsetLow), uintptr(length), 0)
- addr = uintptr(r0)
- if addr == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func UnmapViewOfFile(addr uintptr) (err error) {
- r1, _, e1 := Syscall(procUnmapViewOfFile.Addr(), 1, uintptr(addr), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func FlushViewOfFile(addr uintptr, length uintptr) (err error) {
- r1, _, e1 := Syscall(procFlushViewOfFile.Addr(), 2, uintptr(addr), uintptr(length), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func VirtualLock(addr uintptr, length uintptr) (err error) {
- r1, _, e1 := Syscall(procVirtualLock.Addr(), 2, uintptr(addr), uintptr(length), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func VirtualUnlock(addr uintptr, length uintptr) (err error) {
- r1, _, e1 := Syscall(procVirtualUnlock.Addr(), 2, uintptr(addr), uintptr(length), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) {
- r1, _, e1 := Syscall9(procTransmitFile.Addr(), 7, uintptr(s), uintptr(handle), uintptr(bytesToWrite), uintptr(bytsPerSend), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(transmitFileBuf)), uintptr(flags), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
- var _p0 uint32
- if watchSubTree {
- _p0 = 1
- } else {
- _p0 = 0
- }
- r1, _, e1 := Syscall9(procReadDirectoryChangesW.Addr(), 8, uintptr(handle), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(_p0), uintptr(mask), uintptr(unsafe.Pointer(retlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) {
- r0, _, e1 := Syscall(procCertOpenSystemStoreW.Addr(), 2, uintptr(hprov), uintptr(unsafe.Pointer(name)), 0)
- store = Handle(r0)
- if store == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) {
- r0, _, e1 := Syscall6(procCertOpenStore.Addr(), 5, uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para), 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) {
- r0, _, e1 := Syscall(procCertEnumCertificatesInStore.Addr(), 2, uintptr(store), uintptr(unsafe.Pointer(prevContext)), 0)
- context = (*CertContext)(unsafe.Pointer(r0))
- if context == nil {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) {
- r1, _, e1 := Syscall6(procCertAddCertificateContextToStore.Addr(), 4, uintptr(store), uintptr(unsafe.Pointer(certContext)), uintptr(addDisposition), uintptr(unsafe.Pointer(storeContext)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertCloseStore(store Handle, flags uint32) (err error) {
- r1, _, e1 := Syscall(procCertCloseStore.Addr(), 2, uintptr(store), uintptr(flags), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) {
- r1, _, e1 := Syscall9(procCertGetCertificateChain.Addr(), 8, uintptr(engine), uintptr(unsafe.Pointer(leaf)), uintptr(unsafe.Pointer(time)), uintptr(additionalStore), uintptr(unsafe.Pointer(para)), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(chainCtx)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertFreeCertificateChain(ctx *CertChainContext) {
- Syscall(procCertFreeCertificateChain.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
- return
-}
-
-func CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) {
- r0, _, e1 := Syscall(procCertCreateCertificateContext.Addr(), 3, uintptr(certEncodingType), uintptr(unsafe.Pointer(certEncoded)), uintptr(encodedLen))
- context = (*CertContext)(unsafe.Pointer(r0))
- if context == nil {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertFreeCertificateContext(ctx *CertContext) (err error) {
- r1, _, e1 := Syscall(procCertFreeCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) {
- r1, _, e1 := Syscall6(procCertVerifyCertificateChainPolicy.Addr(), 4, uintptr(policyOID), uintptr(unsafe.Pointer(chain)), uintptr(unsafe.Pointer(para)), uintptr(unsafe.Pointer(status)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) {
- r0, _, _ := Syscall6(procRegOpenKeyExW.Addr(), 5, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(options), uintptr(desiredAccess), uintptr(unsafe.Pointer(result)), 0)
- if r0 != 0 {
- regerrno = Errno(r0)
- }
- return
-}
-
-func RegCloseKey(key Handle) (regerrno error) {
- r0, _, _ := Syscall(procRegCloseKey.Addr(), 1, uintptr(key), 0, 0)
- if r0 != 0 {
- regerrno = Errno(r0)
- }
- return
-}
-
-func RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) {
- r0, _, _ := Syscall12(procRegQueryInfoKeyW.Addr(), 12, uintptr(key), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(subkeysLen)), uintptr(unsafe.Pointer(maxSubkeyLen)), uintptr(unsafe.Pointer(maxClassLen)), uintptr(unsafe.Pointer(valuesLen)), uintptr(unsafe.Pointer(maxValueNameLen)), uintptr(unsafe.Pointer(maxValueLen)), uintptr(unsafe.Pointer(saLen)), uintptr(unsafe.Pointer(lastWriteTime)))
- if r0 != 0 {
- regerrno = Errno(r0)
- }
- return
-}
-
-func RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) {
- r0, _, _ := Syscall9(procRegEnumKeyExW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(lastWriteTime)), 0)
- if r0 != 0 {
- regerrno = Errno(r0)
- }
- return
-}
-
-func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) {
- r0, _, _ := Syscall6(procRegQueryValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)))
- if r0 != 0 {
- regerrno = Errno(r0)
- }
- return
-}
-
-func getCurrentProcessId() (pid uint32) {
- r0, _, _ := Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0)
- pid = uint32(r0)
- return
-}
-
-func GetConsoleMode(console Handle, mode *uint32) (err error) {
- r1, _, e1 := Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) {
- r1, _, e1 := Syscall6(procWriteConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) {
- r1, _, e1 := Syscall6(procReadConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(toread), uintptr(unsafe.Pointer(read)), uintptr(unsafe.Pointer(inputControl)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WSAStartup(verreq uint32, data *WSAData) (sockerr error) {
- r0, _, _ := Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(unsafe.Pointer(data)), 0)
- if r0 != 0 {
- sockerr = Errno(r0)
- }
- return
-}
-
-func WSACleanup() (err error) {
- r1, _, e1 := Syscall(procWSACleanup.Addr(), 0, 0, 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
- r1, _, e1 := Syscall9(procWSAIoctl.Addr(), 9, uintptr(s), uintptr(iocc), uintptr(unsafe.Pointer(inbuf)), uintptr(cbif), uintptr(unsafe.Pointer(outbuf)), uintptr(cbob), uintptr(unsafe.Pointer(cbbr)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine))
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func socket(af int32, typ int32, protocol int32) (handle Handle, err error) {
- r0, _, e1 := Syscall(procsocket.Addr(), 3, uintptr(af), uintptr(typ), uintptr(protocol))
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) {
- r1, _, e1 := Syscall6(procsetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) {
- r1, _, e1 := Syscall6(procgetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(unsafe.Pointer(optlen)), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func bind(s Handle, name unsafe.Pointer, namelen int32) (err error) {
- r1, _, e1 := Syscall(procbind.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func connect(s Handle, name unsafe.Pointer, namelen int32) (err error) {
- r1, _, e1 := Syscall(procconnect.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
- r1, _, e1 := Syscall(procgetsockname.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
- r1, _, e1 := Syscall(procgetpeername.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func listen(s Handle, backlog int32) (err error) {
- r1, _, e1 := Syscall(proclisten.Addr(), 2, uintptr(s), uintptr(backlog), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func shutdown(s Handle, how int32) (err error) {
- r1, _, e1 := Syscall(procshutdown.Addr(), 2, uintptr(s), uintptr(how), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func Closesocket(s Handle) (err error) {
- r1, _, e1 := Syscall(procclosesocket.Addr(), 1, uintptr(s), 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := Syscall9(procAcceptEx.Addr(), 8, uintptr(ls), uintptr(as), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(overlapped)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) {
- Syscall9(procGetAcceptExSockaddrs.Addr(), 8, uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(lrsa)), uintptr(unsafe.Pointer(lrsalen)), uintptr(unsafe.Pointer(rrsa)), uintptr(unsafe.Pointer(rrsalen)), 0)
- return
-}
-
-func WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := Syscall9(procWSARecv.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := Syscall9(procWSASend.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := Syscall9(procWSARecvFrom.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := Syscall9(procWSASendTo.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(to)), uintptr(tolen), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetHostByName(name string) (h *Hostent, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(procgethostbyname.Addr(), 1, uintptr(unsafe.Pointer(_p0)), 0, 0)
- h = (*Hostent)(unsafe.Pointer(r0))
- if h == nil {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetServByName(name string, proto string) (s *Servent, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(proto)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(procgetservbyname.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- s = (*Servent)(unsafe.Pointer(r0))
- if s == nil {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func Ntohs(netshort uint16) (u uint16) {
- r0, _, _ := Syscall(procntohs.Addr(), 1, uintptr(netshort), 0, 0)
- u = uint16(r0)
- return
-}
-
-func GetProtoByName(name string) (p *Protoent, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(procgetprotobyname.Addr(), 1, uintptr(unsafe.Pointer(_p0)), 0, 0)
- p = (*Protoent)(unsafe.Pointer(r0))
- if p == nil {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {
- var _p0 *uint16
- _p0, status = UTF16PtrFromString(name)
- if status != nil {
- return
- }
- r0, _, _ := Syscall6(procDnsQuery_W.Addr(), 6, uintptr(unsafe.Pointer(_p0)), uintptr(qtype), uintptr(options), uintptr(unsafe.Pointer(extra)), uintptr(unsafe.Pointer(qrs)), uintptr(unsafe.Pointer(pr)))
- if r0 != 0 {
- status = Errno(r0)
- }
- return
-}
-
-func DnsRecordListFree(rl *DNSRecord, freetype uint32) {
- Syscall(procDnsRecordListFree.Addr(), 2, uintptr(unsafe.Pointer(rl)), uintptr(freetype), 0)
- return
-}
-
-func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) {
- r0, _, _ := Syscall6(procGetAddrInfoW.Addr(), 4, uintptr(unsafe.Pointer(nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)), uintptr(unsafe.Pointer(result)), 0, 0)
- if r0 != 0 {
- sockerr = Errno(r0)
- }
- return
-}
-
-func FreeAddrInfoW(addrinfo *AddrinfoW) {
- Syscall(procFreeAddrInfoW.Addr(), 1, uintptr(unsafe.Pointer(addrinfo)), 0, 0)
- return
-}
-
-func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
- r0, _, _ := Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIfRow)), 0, 0)
- if r0 != 0 {
- errcode = Errno(r0)
- }
- return
-}
-
-func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {
- r0, _, _ := Syscall(procGetAdaptersInfo.Addr(), 2, uintptr(unsafe.Pointer(ai)), uintptr(unsafe.Pointer(ol)), 0)
- if r0 != 0 {
- errcode = Errno(r0)
- }
- return
-}
-
-func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) {
- r1, _, e1 := Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(handle), uintptr(flags), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) {
- r0, _, e1 := Syscall(procWSAEnumProtocolsW.Addr(), 3, uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength)))
- n = int32(r0)
- if n == -1 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) {
- r1, _, e1 := Syscall6(procTranslateNameW.Addr(), 5, uintptr(unsafe.Pointer(accName)), uintptr(accNameFormat), uintptr(desiredNameFormat), uintptr(unsafe.Pointer(translatedName)), uintptr(unsafe.Pointer(nSize)), 0)
- if r1&0xff == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) {
- r1, _, e1 := Syscall(procGetUserNameExW.Addr(), 3, uintptr(nameFormat), uintptr(unsafe.Pointer(nameBuffre)), uintptr(unsafe.Pointer(nSize)))
- if r1&0xff == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) {
- r0, _, _ := Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0)
- if r0 != 0 {
- neterr = Errno(r0)
- }
- return
-}
-
-func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) {
- r0, _, _ := Syscall(procNetGetJoinInformation.Addr(), 3, uintptr(unsafe.Pointer(server)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bufType)))
- if r0 != 0 {
- neterr = Errno(r0)
- }
- return
-}
-
-func NetApiBufferFree(buf *byte) (neterr error) {
- r0, _, _ := Syscall(procNetApiBufferFree.Addr(), 1, uintptr(unsafe.Pointer(buf)), 0, 0)
- if r0 != 0 {
- neterr = Errno(r0)
- }
- return
-}
-
-func LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
- r1, _, e1 := Syscall9(procLookupAccountSidW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
- r1, _, e1 := Syscall9(procLookupAccountNameW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) {
- r1, _, e1 := Syscall(procConvertSidToStringSidW.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(stringSid)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) {
- r1, _, e1 := Syscall(procConvertStringSidToSidW.Addr(), 2, uintptr(unsafe.Pointer(stringSid)), uintptr(unsafe.Pointer(sid)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetLengthSid(sid *SID) (len uint32) {
- r0, _, _ := Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
- len = uint32(r0)
- return
-}
-
-func CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) {
- r1, _, e1 := Syscall(procCopySid.Addr(), 3, uintptr(destSidLen), uintptr(unsafe.Pointer(destSid)), uintptr(unsafe.Pointer(srcSid)))
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func OpenProcessToken(h Handle, access uint32, token *Token) (err error) {
- r1, _, e1 := Syscall(procOpenProcessToken.Addr(), 3, uintptr(h), uintptr(access), uintptr(unsafe.Pointer(token)))
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetTokenInformation(t Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) {
- r1, _, e1 := Syscall6(procGetTokenInformation.Addr(), 5, uintptr(t), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {
- r1, _, e1 := Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen)))
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
diff --git a/src/pkg/syscall/zsyscall_windows_amd64.go b/src/pkg/syscall/zsyscall_windows_amd64.go
deleted file mode 100644
index 353a6fd98..000000000
--- a/src/pkg/syscall/zsyscall_windows_amd64.go
+++ /dev/null
@@ -1,1760 +0,0 @@
-// go build mksyscall_windows.go && ./mksyscall_windows syscall_windows.go security_windows.go syscall_windows_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-package syscall
-
-import "unsafe"
-
-var (
- modkernel32 = NewLazyDLL("kernel32.dll")
- modadvapi32 = NewLazyDLL("advapi32.dll")
- modshell32 = NewLazyDLL("shell32.dll")
- modmswsock = NewLazyDLL("mswsock.dll")
- modcrypt32 = NewLazyDLL("crypt32.dll")
- modws2_32 = NewLazyDLL("ws2_32.dll")
- moddnsapi = NewLazyDLL("dnsapi.dll")
- modiphlpapi = NewLazyDLL("iphlpapi.dll")
- modsecur32 = NewLazyDLL("secur32.dll")
- modnetapi32 = NewLazyDLL("netapi32.dll")
- moduserenv = NewLazyDLL("userenv.dll")
-
- procGetLastError = modkernel32.NewProc("GetLastError")
- procLoadLibraryW = modkernel32.NewProc("LoadLibraryW")
- procFreeLibrary = modkernel32.NewProc("FreeLibrary")
- procGetProcAddress = modkernel32.NewProc("GetProcAddress")
- procGetVersion = modkernel32.NewProc("GetVersion")
- procFormatMessageW = modkernel32.NewProc("FormatMessageW")
- procExitProcess = modkernel32.NewProc("ExitProcess")
- procCreateFileW = modkernel32.NewProc("CreateFileW")
- procReadFile = modkernel32.NewProc("ReadFile")
- procWriteFile = modkernel32.NewProc("WriteFile")
- procSetFilePointer = modkernel32.NewProc("SetFilePointer")
- procCloseHandle = modkernel32.NewProc("CloseHandle")
- procGetStdHandle = modkernel32.NewProc("GetStdHandle")
- procFindFirstFileW = modkernel32.NewProc("FindFirstFileW")
- procFindNextFileW = modkernel32.NewProc("FindNextFileW")
- procFindClose = modkernel32.NewProc("FindClose")
- procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle")
- procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW")
- procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW")
- procCreateDirectoryW = modkernel32.NewProc("CreateDirectoryW")
- procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW")
- procDeleteFileW = modkernel32.NewProc("DeleteFileW")
- procMoveFileW = modkernel32.NewProc("MoveFileW")
- procGetComputerNameW = modkernel32.NewProc("GetComputerNameW")
- procSetEndOfFile = modkernel32.NewProc("SetEndOfFile")
- procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTimeAsFileTime")
- procGetTimeZoneInformation = modkernel32.NewProc("GetTimeZoneInformation")
- procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort")
- procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus")
- procPostQueuedCompletionStatus = modkernel32.NewProc("PostQueuedCompletionStatus")
- procCancelIo = modkernel32.NewProc("CancelIo")
- procCancelIoEx = modkernel32.NewProc("CancelIoEx")
- procCreateProcessW = modkernel32.NewProc("CreateProcessW")
- procOpenProcess = modkernel32.NewProc("OpenProcess")
- procTerminateProcess = modkernel32.NewProc("TerminateProcess")
- procGetExitCodeProcess = modkernel32.NewProc("GetExitCodeProcess")
- procGetStartupInfoW = modkernel32.NewProc("GetStartupInfoW")
- procGetCurrentProcess = modkernel32.NewProc("GetCurrentProcess")
- procGetProcessTimes = modkernel32.NewProc("GetProcessTimes")
- procDuplicateHandle = modkernel32.NewProc("DuplicateHandle")
- procWaitForSingleObject = modkernel32.NewProc("WaitForSingleObject")
- procGetTempPathW = modkernel32.NewProc("GetTempPathW")
- procCreatePipe = modkernel32.NewProc("CreatePipe")
- procGetFileType = modkernel32.NewProc("GetFileType")
- procCryptAcquireContextW = modadvapi32.NewProc("CryptAcquireContextW")
- procCryptReleaseContext = modadvapi32.NewProc("CryptReleaseContext")
- procCryptGenRandom = modadvapi32.NewProc("CryptGenRandom")
- procGetEnvironmentStringsW = modkernel32.NewProc("GetEnvironmentStringsW")
- procFreeEnvironmentStringsW = modkernel32.NewProc("FreeEnvironmentStringsW")
- procGetEnvironmentVariableW = modkernel32.NewProc("GetEnvironmentVariableW")
- procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW")
- procSetFileTime = modkernel32.NewProc("SetFileTime")
- procGetFileAttributesW = modkernel32.NewProc("GetFileAttributesW")
- procSetFileAttributesW = modkernel32.NewProc("SetFileAttributesW")
- procGetFileAttributesExW = modkernel32.NewProc("GetFileAttributesExW")
- procGetCommandLineW = modkernel32.NewProc("GetCommandLineW")
- procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW")
- procLocalFree = modkernel32.NewProc("LocalFree")
- procSetHandleInformation = modkernel32.NewProc("SetHandleInformation")
- procFlushFileBuffers = modkernel32.NewProc("FlushFileBuffers")
- procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW")
- procGetLongPathNameW = modkernel32.NewProc("GetLongPathNameW")
- procGetShortPathNameW = modkernel32.NewProc("GetShortPathNameW")
- procCreateFileMappingW = modkernel32.NewProc("CreateFileMappingW")
- procMapViewOfFile = modkernel32.NewProc("MapViewOfFile")
- procUnmapViewOfFile = modkernel32.NewProc("UnmapViewOfFile")
- procFlushViewOfFile = modkernel32.NewProc("FlushViewOfFile")
- procVirtualLock = modkernel32.NewProc("VirtualLock")
- procVirtualUnlock = modkernel32.NewProc("VirtualUnlock")
- procTransmitFile = modmswsock.NewProc("TransmitFile")
- procReadDirectoryChangesW = modkernel32.NewProc("ReadDirectoryChangesW")
- procCertOpenSystemStoreW = modcrypt32.NewProc("CertOpenSystemStoreW")
- procCertOpenStore = modcrypt32.NewProc("CertOpenStore")
- procCertEnumCertificatesInStore = modcrypt32.NewProc("CertEnumCertificatesInStore")
- procCertAddCertificateContextToStore = modcrypt32.NewProc("CertAddCertificateContextToStore")
- procCertCloseStore = modcrypt32.NewProc("CertCloseStore")
- procCertGetCertificateChain = modcrypt32.NewProc("CertGetCertificateChain")
- procCertFreeCertificateChain = modcrypt32.NewProc("CertFreeCertificateChain")
- procCertCreateCertificateContext = modcrypt32.NewProc("CertCreateCertificateContext")
- procCertFreeCertificateContext = modcrypt32.NewProc("CertFreeCertificateContext")
- procCertVerifyCertificateChainPolicy = modcrypt32.NewProc("CertVerifyCertificateChainPolicy")
- procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyExW")
- procRegCloseKey = modadvapi32.NewProc("RegCloseKey")
- procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfoKeyW")
- procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyExW")
- procRegQueryValueExW = modadvapi32.NewProc("RegQueryValueExW")
- procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId")
- procGetConsoleMode = modkernel32.NewProc("GetConsoleMode")
- procWriteConsoleW = modkernel32.NewProc("WriteConsoleW")
- procReadConsoleW = modkernel32.NewProc("ReadConsoleW")
- procWSAStartup = modws2_32.NewProc("WSAStartup")
- procWSACleanup = modws2_32.NewProc("WSACleanup")
- procWSAIoctl = modws2_32.NewProc("WSAIoctl")
- procsocket = modws2_32.NewProc("socket")
- procsetsockopt = modws2_32.NewProc("setsockopt")
- procgetsockopt = modws2_32.NewProc("getsockopt")
- procbind = modws2_32.NewProc("bind")
- procconnect = modws2_32.NewProc("connect")
- procgetsockname = modws2_32.NewProc("getsockname")
- procgetpeername = modws2_32.NewProc("getpeername")
- proclisten = modws2_32.NewProc("listen")
- procshutdown = modws2_32.NewProc("shutdown")
- procclosesocket = modws2_32.NewProc("closesocket")
- procAcceptEx = modmswsock.NewProc("AcceptEx")
- procGetAcceptExSockaddrs = modmswsock.NewProc("GetAcceptExSockaddrs")
- procWSARecv = modws2_32.NewProc("WSARecv")
- procWSASend = modws2_32.NewProc("WSASend")
- procWSARecvFrom = modws2_32.NewProc("WSARecvFrom")
- procWSASendTo = modws2_32.NewProc("WSASendTo")
- procgethostbyname = modws2_32.NewProc("gethostbyname")
- procgetservbyname = modws2_32.NewProc("getservbyname")
- procntohs = modws2_32.NewProc("ntohs")
- procgetprotobyname = modws2_32.NewProc("getprotobyname")
- procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W")
- procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree")
- procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW")
- procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW")
- procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
- procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
- procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes")
- procWSAEnumProtocolsW = modws2_32.NewProc("WSAEnumProtocolsW")
- procTranslateNameW = modsecur32.NewProc("TranslateNameW")
- procGetUserNameExW = modsecur32.NewProc("GetUserNameExW")
- procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo")
- procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation")
- procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree")
- procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW")
- procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW")
- procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW")
- procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW")
- procGetLengthSid = modadvapi32.NewProc("GetLengthSid")
- procCopySid = modadvapi32.NewProc("CopySid")
- procOpenProcessToken = modadvapi32.NewProc("OpenProcessToken")
- procGetTokenInformation = modadvapi32.NewProc("GetTokenInformation")
- procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW")
-)
-
-func GetLastError() (lasterr error) {
- r0, _, _ := Syscall(procGetLastError.Addr(), 0, 0, 0, 0)
- if r0 != 0 {
- lasterr = Errno(r0)
- }
- return
-}
-
-func LoadLibrary(libname string) (handle Handle, err error) {
- var _p0 *uint16
- _p0, err = UTF16PtrFromString(libname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(procLoadLibraryW.Addr(), 1, uintptr(unsafe.Pointer(_p0)), 0, 0)
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func FreeLibrary(handle Handle) (err error) {
- r1, _, e1 := Syscall(procFreeLibrary.Addr(), 1, uintptr(handle), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetProcAddress(module Handle, procname string) (proc uintptr, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(procname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(procGetProcAddress.Addr(), 2, uintptr(module), uintptr(unsafe.Pointer(_p0)), 0)
- proc = uintptr(r0)
- if proc == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetVersion() (ver uint32, err error) {
- r0, _, e1 := Syscall(procGetVersion.Addr(), 0, 0, 0, 0)
- ver = uint32(r0)
- if ver == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func FormatMessage(flags uint32, msgsrc uint32, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) {
- var _p0 *uint16
- if len(buf) > 0 {
- _p0 = &buf[0]
- }
- r0, _, e1 := Syscall9(procFormatMessageW.Addr(), 7, uintptr(flags), uintptr(msgsrc), uintptr(msgid), uintptr(langid), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(args)), 0, 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func ExitProcess(exitcode uint32) {
- Syscall(procExitProcess.Addr(), 1, uintptr(exitcode), 0, 0)
- return
-}
-
-func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) {
- r0, _, e1 := Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
- }
- r1, _, e1 := Syscall6(procReadFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
- }
- r1, _, e1 := Syscall6(procWriteFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) {
- r0, _, e1 := Syscall6(procSetFilePointer.Addr(), 4, uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence), 0, 0)
- newlowoffset = uint32(r0)
- if newlowoffset == 0xffffffff {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CloseHandle(handle Handle) (err error) {
- r1, _, e1 := Syscall(procCloseHandle.Addr(), 1, uintptr(handle), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetStdHandle(stdhandle int) (handle Handle, err error) {
- r0, _, e1 := Syscall(procGetStdHandle.Addr(), 1, uintptr(stdhandle), 0, 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) {
- r0, _, e1 := Syscall(procFindFirstFileW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)), 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func findNextFile1(handle Handle, data *win32finddata1) (err error) {
- r1, _, e1 := Syscall(procFindNextFileW.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func FindClose(handle Handle) (err error) {
- r1, _, e1 := Syscall(procFindClose.Addr(), 1, uintptr(handle), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error) {
- r1, _, e1 := Syscall(procGetFileInformationByHandle.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) {
- r0, _, e1 := Syscall(procGetCurrentDirectoryW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func SetCurrentDirectory(path *uint16) (err error) {
- r1, _, e1 := Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) {
- r1, _, e1 := Syscall(procCreateDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(sa)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func RemoveDirectory(path *uint16) (err error) {
- r1, _, e1 := Syscall(procRemoveDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func DeleteFile(path *uint16) (err error) {
- r1, _, e1 := Syscall(procDeleteFileW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func MoveFile(from *uint16, to *uint16) (err error) {
- r1, _, e1 := Syscall(procMoveFileW.Addr(), 2, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetComputerName(buf *uint16, n *uint32) (err error) {
- r1, _, e1 := Syscall(procGetComputerNameW.Addr(), 2, uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func SetEndOfFile(handle Handle) (err error) {
- r1, _, e1 := Syscall(procSetEndOfFile.Addr(), 1, uintptr(handle), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetSystemTimeAsFileTime(time *Filetime) {
- Syscall(procGetSystemTimeAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0)
- return
-}
-
-func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) {
- r0, _, e1 := Syscall(procGetTimeZoneInformation.Addr(), 1, uintptr(unsafe.Pointer(tzi)), 0, 0)
- rc = uint32(r0)
- if rc == 0xffffffff {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error) {
- r0, _, e1 := Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt), 0, 0)
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error) {
- r1, _, e1 := Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := Syscall6(procPostQueuedCompletionStatus.Addr(), 4, uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CancelIo(s Handle) (err error) {
- r1, _, e1 := Syscall(procCancelIo.Addr(), 1, uintptr(s), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CancelIoEx(s Handle, o *Overlapped) (err error) {
- r1, _, e1 := Syscall(procCancelIoEx.Addr(), 2, uintptr(s), uintptr(unsafe.Pointer(o)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) {
- var _p0 uint32
- if inheritHandles {
- _p0 = 1
- } else {
- _p0 = 0
- }
- r1, _, e1 := Syscall12(procCreateProcessW.Addr(), 10, uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func OpenProcess(da uint32, inheritHandle bool, pid uint32) (handle Handle, err error) {
- var _p0 uint32
- if inheritHandle {
- _p0 = 1
- } else {
- _p0 = 0
- }
- r0, _, e1 := Syscall(procOpenProcess.Addr(), 3, uintptr(da), uintptr(_p0), uintptr(pid))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func TerminateProcess(handle Handle, exitcode uint32) (err error) {
- r1, _, e1 := Syscall(procTerminateProcess.Addr(), 2, uintptr(handle), uintptr(exitcode), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) {
- r1, _, e1 := Syscall(procGetExitCodeProcess.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(exitcode)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetStartupInfo(startupInfo *StartupInfo) (err error) {
- r1, _, e1 := Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetCurrentProcess() (pseudoHandle Handle, err error) {
- r0, _, e1 := Syscall(procGetCurrentProcess.Addr(), 0, 0, 0, 0)
- pseudoHandle = Handle(r0)
- if pseudoHandle == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) {
- r1, _, e1 := Syscall6(procGetProcessTimes.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error) {
- var _p0 uint32
- if bInheritHandle {
- _p0 = 1
- } else {
- _p0 = 0
- }
- r1, _, e1 := Syscall9(procDuplicateHandle.Addr(), 7, uintptr(hSourceProcessHandle), uintptr(hSourceHandle), uintptr(hTargetProcessHandle), uintptr(unsafe.Pointer(lpTargetHandle)), uintptr(dwDesiredAccess), uintptr(_p0), uintptr(dwOptions), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) {
- r0, _, e1 := Syscall(procWaitForSingleObject.Addr(), 2, uintptr(handle), uintptr(waitMilliseconds), 0)
- event = uint32(r0)
- if event == 0xffffffff {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) {
- r0, _, e1 := Syscall(procGetTempPathW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error) {
- r1, _, e1 := Syscall6(procCreatePipe.Addr(), 4, uintptr(unsafe.Pointer(readhandle)), uintptr(unsafe.Pointer(writehandle)), uintptr(unsafe.Pointer(sa)), uintptr(size), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetFileType(filehandle Handle) (n uint32, err error) {
- r0, _, e1 := Syscall(procGetFileType.Addr(), 1, uintptr(filehandle), 0, 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) {
- r1, _, e1 := Syscall6(procCryptAcquireContextW.Addr(), 5, uintptr(unsafe.Pointer(provhandle)), uintptr(unsafe.Pointer(container)), uintptr(unsafe.Pointer(provider)), uintptr(provtype), uintptr(flags), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CryptReleaseContext(provhandle Handle, flags uint32) (err error) {
- r1, _, e1 := Syscall(procCryptReleaseContext.Addr(), 2, uintptr(provhandle), uintptr(flags), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) {
- r1, _, e1 := Syscall(procCryptGenRandom.Addr(), 3, uintptr(provhandle), uintptr(buflen), uintptr(unsafe.Pointer(buf)))
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetEnvironmentStrings() (envs *uint16, err error) {
- r0, _, e1 := Syscall(procGetEnvironmentStringsW.Addr(), 0, 0, 0, 0)
- envs = (*uint16)(unsafe.Pointer(r0))
- if envs == nil {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func FreeEnvironmentStrings(envs *uint16) (err error) {
- r1, _, e1 := Syscall(procFreeEnvironmentStringsW.Addr(), 1, uintptr(unsafe.Pointer(envs)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) {
- r0, _, e1 := Syscall(procGetEnvironmentVariableW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(size))
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func SetEnvironmentVariable(name *uint16, value *uint16) (err error) {
- r1, _, e1 := Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) {
- r1, _, e1 := Syscall6(procSetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetFileAttributes(name *uint16) (attrs uint32, err error) {
- r0, _, e1 := Syscall(procGetFileAttributesW.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
- attrs = uint32(r0)
- if attrs == INVALID_FILE_ATTRIBUTES {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func SetFileAttributes(name *uint16, attrs uint32) (err error) {
- r1, _, e1 := Syscall(procSetFileAttributesW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(attrs), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) {
- r1, _, e1 := Syscall(procGetFileAttributesExW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(level), uintptr(unsafe.Pointer(info)))
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetCommandLine() (cmd *uint16) {
- r0, _, _ := Syscall(procGetCommandLineW.Addr(), 0, 0, 0, 0)
- cmd = (*uint16)(unsafe.Pointer(r0))
- return
-}
-
-func CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) {
- r0, _, e1 := Syscall(procCommandLineToArgvW.Addr(), 2, uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)), 0)
- argv = (*[8192]*[8192]uint16)(unsafe.Pointer(r0))
- if argv == nil {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func LocalFree(hmem Handle) (handle Handle, err error) {
- r0, _, e1 := Syscall(procLocalFree.Addr(), 1, uintptr(hmem), 0, 0)
- handle = Handle(r0)
- if handle != 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) {
- r1, _, e1 := Syscall(procSetHandleInformation.Addr(), 3, uintptr(handle), uintptr(mask), uintptr(flags))
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func FlushFileBuffers(handle Handle) (err error) {
- r1, _, e1 := Syscall(procFlushFileBuffers.Addr(), 1, uintptr(handle), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) {
- r0, _, e1 := Syscall6(procGetFullPathNameW.Addr(), 4, uintptr(unsafe.Pointer(path)), uintptr(buflen), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(fname)), 0, 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) {
- r0, _, e1 := Syscall(procGetLongPathNameW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(buf)), uintptr(buflen))
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) {
- r0, _, e1 := Syscall(procGetShortPathNameW.Addr(), 3, uintptr(unsafe.Pointer(longpath)), uintptr(unsafe.Pointer(shortpath)), uintptr(buflen))
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) {
- r0, _, e1 := Syscall6(procCreateFileMappingW.Addr(), 6, uintptr(fhandle), uintptr(unsafe.Pointer(sa)), uintptr(prot), uintptr(maxSizeHigh), uintptr(maxSizeLow), uintptr(unsafe.Pointer(name)))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) {
- r0, _, e1 := Syscall6(procMapViewOfFile.Addr(), 5, uintptr(handle), uintptr(access), uintptr(offsetHigh), uintptr(offsetLow), uintptr(length), 0)
- addr = uintptr(r0)
- if addr == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func UnmapViewOfFile(addr uintptr) (err error) {
- r1, _, e1 := Syscall(procUnmapViewOfFile.Addr(), 1, uintptr(addr), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func FlushViewOfFile(addr uintptr, length uintptr) (err error) {
- r1, _, e1 := Syscall(procFlushViewOfFile.Addr(), 2, uintptr(addr), uintptr(length), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func VirtualLock(addr uintptr, length uintptr) (err error) {
- r1, _, e1 := Syscall(procVirtualLock.Addr(), 2, uintptr(addr), uintptr(length), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func VirtualUnlock(addr uintptr, length uintptr) (err error) {
- r1, _, e1 := Syscall(procVirtualUnlock.Addr(), 2, uintptr(addr), uintptr(length), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) {
- r1, _, e1 := Syscall9(procTransmitFile.Addr(), 7, uintptr(s), uintptr(handle), uintptr(bytesToWrite), uintptr(bytsPerSend), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(transmitFileBuf)), uintptr(flags), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
- var _p0 uint32
- if watchSubTree {
- _p0 = 1
- } else {
- _p0 = 0
- }
- r1, _, e1 := Syscall9(procReadDirectoryChangesW.Addr(), 8, uintptr(handle), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(_p0), uintptr(mask), uintptr(unsafe.Pointer(retlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) {
- r0, _, e1 := Syscall(procCertOpenSystemStoreW.Addr(), 2, uintptr(hprov), uintptr(unsafe.Pointer(name)), 0)
- store = Handle(r0)
- if store == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) {
- r0, _, e1 := Syscall6(procCertOpenStore.Addr(), 5, uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para), 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) {
- r0, _, e1 := Syscall(procCertEnumCertificatesInStore.Addr(), 2, uintptr(store), uintptr(unsafe.Pointer(prevContext)), 0)
- context = (*CertContext)(unsafe.Pointer(r0))
- if context == nil {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) {
- r1, _, e1 := Syscall6(procCertAddCertificateContextToStore.Addr(), 4, uintptr(store), uintptr(unsafe.Pointer(certContext)), uintptr(addDisposition), uintptr(unsafe.Pointer(storeContext)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertCloseStore(store Handle, flags uint32) (err error) {
- r1, _, e1 := Syscall(procCertCloseStore.Addr(), 2, uintptr(store), uintptr(flags), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) {
- r1, _, e1 := Syscall9(procCertGetCertificateChain.Addr(), 8, uintptr(engine), uintptr(unsafe.Pointer(leaf)), uintptr(unsafe.Pointer(time)), uintptr(additionalStore), uintptr(unsafe.Pointer(para)), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(chainCtx)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertFreeCertificateChain(ctx *CertChainContext) {
- Syscall(procCertFreeCertificateChain.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
- return
-}
-
-func CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) {
- r0, _, e1 := Syscall(procCertCreateCertificateContext.Addr(), 3, uintptr(certEncodingType), uintptr(unsafe.Pointer(certEncoded)), uintptr(encodedLen))
- context = (*CertContext)(unsafe.Pointer(r0))
- if context == nil {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertFreeCertificateContext(ctx *CertContext) (err error) {
- r1, _, e1 := Syscall(procCertFreeCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) {
- r1, _, e1 := Syscall6(procCertVerifyCertificateChainPolicy.Addr(), 4, uintptr(policyOID), uintptr(unsafe.Pointer(chain)), uintptr(unsafe.Pointer(para)), uintptr(unsafe.Pointer(status)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) {
- r0, _, _ := Syscall6(procRegOpenKeyExW.Addr(), 5, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(options), uintptr(desiredAccess), uintptr(unsafe.Pointer(result)), 0)
- if r0 != 0 {
- regerrno = Errno(r0)
- }
- return
-}
-
-func RegCloseKey(key Handle) (regerrno error) {
- r0, _, _ := Syscall(procRegCloseKey.Addr(), 1, uintptr(key), 0, 0)
- if r0 != 0 {
- regerrno = Errno(r0)
- }
- return
-}
-
-func RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) {
- r0, _, _ := Syscall12(procRegQueryInfoKeyW.Addr(), 12, uintptr(key), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(subkeysLen)), uintptr(unsafe.Pointer(maxSubkeyLen)), uintptr(unsafe.Pointer(maxClassLen)), uintptr(unsafe.Pointer(valuesLen)), uintptr(unsafe.Pointer(maxValueNameLen)), uintptr(unsafe.Pointer(maxValueLen)), uintptr(unsafe.Pointer(saLen)), uintptr(unsafe.Pointer(lastWriteTime)))
- if r0 != 0 {
- regerrno = Errno(r0)
- }
- return
-}
-
-func RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) {
- r0, _, _ := Syscall9(procRegEnumKeyExW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(lastWriteTime)), 0)
- if r0 != 0 {
- regerrno = Errno(r0)
- }
- return
-}
-
-func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) {
- r0, _, _ := Syscall6(procRegQueryValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)))
- if r0 != 0 {
- regerrno = Errno(r0)
- }
- return
-}
-
-func getCurrentProcessId() (pid uint32) {
- r0, _, _ := Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0)
- pid = uint32(r0)
- return
-}
-
-func GetConsoleMode(console Handle, mode *uint32) (err error) {
- r1, _, e1 := Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) {
- r1, _, e1 := Syscall6(procWriteConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) {
- r1, _, e1 := Syscall6(procReadConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(toread), uintptr(unsafe.Pointer(read)), uintptr(unsafe.Pointer(inputControl)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WSAStartup(verreq uint32, data *WSAData) (sockerr error) {
- r0, _, _ := Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(unsafe.Pointer(data)), 0)
- if r0 != 0 {
- sockerr = Errno(r0)
- }
- return
-}
-
-func WSACleanup() (err error) {
- r1, _, e1 := Syscall(procWSACleanup.Addr(), 0, 0, 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
- r1, _, e1 := Syscall9(procWSAIoctl.Addr(), 9, uintptr(s), uintptr(iocc), uintptr(unsafe.Pointer(inbuf)), uintptr(cbif), uintptr(unsafe.Pointer(outbuf)), uintptr(cbob), uintptr(unsafe.Pointer(cbbr)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine))
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func socket(af int32, typ int32, protocol int32) (handle Handle, err error) {
- r0, _, e1 := Syscall(procsocket.Addr(), 3, uintptr(af), uintptr(typ), uintptr(protocol))
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) {
- r1, _, e1 := Syscall6(procsetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) {
- r1, _, e1 := Syscall6(procgetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(unsafe.Pointer(optlen)), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func bind(s Handle, name unsafe.Pointer, namelen int32) (err error) {
- r1, _, e1 := Syscall(procbind.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func connect(s Handle, name unsafe.Pointer, namelen int32) (err error) {
- r1, _, e1 := Syscall(procconnect.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
- r1, _, e1 := Syscall(procgetsockname.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
- r1, _, e1 := Syscall(procgetpeername.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func listen(s Handle, backlog int32) (err error) {
- r1, _, e1 := Syscall(proclisten.Addr(), 2, uintptr(s), uintptr(backlog), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func shutdown(s Handle, how int32) (err error) {
- r1, _, e1 := Syscall(procshutdown.Addr(), 2, uintptr(s), uintptr(how), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func Closesocket(s Handle) (err error) {
- r1, _, e1 := Syscall(procclosesocket.Addr(), 1, uintptr(s), 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := Syscall9(procAcceptEx.Addr(), 8, uintptr(ls), uintptr(as), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(overlapped)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) {
- Syscall9(procGetAcceptExSockaddrs.Addr(), 8, uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(lrsa)), uintptr(unsafe.Pointer(lrsalen)), uintptr(unsafe.Pointer(rrsa)), uintptr(unsafe.Pointer(rrsalen)), 0)
- return
-}
-
-func WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := Syscall9(procWSARecv.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := Syscall9(procWSASend.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := Syscall9(procWSARecvFrom.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := Syscall9(procWSASendTo.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(to)), uintptr(tolen), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
- if r1 == socket_error {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetHostByName(name string) (h *Hostent, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(procgethostbyname.Addr(), 1, uintptr(unsafe.Pointer(_p0)), 0, 0)
- h = (*Hostent)(unsafe.Pointer(r0))
- if h == nil {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetServByName(name string, proto string) (s *Servent, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(proto)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(procgetservbyname.Addr(), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- s = (*Servent)(unsafe.Pointer(r0))
- if s == nil {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func Ntohs(netshort uint16) (u uint16) {
- r0, _, _ := Syscall(procntohs.Addr(), 1, uintptr(netshort), 0, 0)
- u = uint16(r0)
- return
-}
-
-func GetProtoByName(name string) (p *Protoent, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(procgetprotobyname.Addr(), 1, uintptr(unsafe.Pointer(_p0)), 0, 0)
- p = (*Protoent)(unsafe.Pointer(r0))
- if p == nil {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {
- var _p0 *uint16
- _p0, status = UTF16PtrFromString(name)
- if status != nil {
- return
- }
- r0, _, _ := Syscall6(procDnsQuery_W.Addr(), 6, uintptr(unsafe.Pointer(_p0)), uintptr(qtype), uintptr(options), uintptr(unsafe.Pointer(extra)), uintptr(unsafe.Pointer(qrs)), uintptr(unsafe.Pointer(pr)))
- if r0 != 0 {
- status = Errno(r0)
- }
- return
-}
-
-func DnsRecordListFree(rl *DNSRecord, freetype uint32) {
- Syscall(procDnsRecordListFree.Addr(), 2, uintptr(unsafe.Pointer(rl)), uintptr(freetype), 0)
- return
-}
-
-func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) {
- r0, _, _ := Syscall6(procGetAddrInfoW.Addr(), 4, uintptr(unsafe.Pointer(nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)), uintptr(unsafe.Pointer(result)), 0, 0)
- if r0 != 0 {
- sockerr = Errno(r0)
- }
- return
-}
-
-func FreeAddrInfoW(addrinfo *AddrinfoW) {
- Syscall(procFreeAddrInfoW.Addr(), 1, uintptr(unsafe.Pointer(addrinfo)), 0, 0)
- return
-}
-
-func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
- r0, _, _ := Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIfRow)), 0, 0)
- if r0 != 0 {
- errcode = Errno(r0)
- }
- return
-}
-
-func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {
- r0, _, _ := Syscall(procGetAdaptersInfo.Addr(), 2, uintptr(unsafe.Pointer(ai)), uintptr(unsafe.Pointer(ol)), 0)
- if r0 != 0 {
- errcode = Errno(r0)
- }
- return
-}
-
-func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) {
- r1, _, e1 := Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(handle), uintptr(flags), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) {
- r0, _, e1 := Syscall(procWSAEnumProtocolsW.Addr(), 3, uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength)))
- n = int32(r0)
- if n == -1 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) {
- r1, _, e1 := Syscall6(procTranslateNameW.Addr(), 5, uintptr(unsafe.Pointer(accName)), uintptr(accNameFormat), uintptr(desiredNameFormat), uintptr(unsafe.Pointer(translatedName)), uintptr(unsafe.Pointer(nSize)), 0)
- if r1&0xff == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) {
- r1, _, e1 := Syscall(procGetUserNameExW.Addr(), 3, uintptr(nameFormat), uintptr(unsafe.Pointer(nameBuffre)), uintptr(unsafe.Pointer(nSize)))
- if r1&0xff == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) {
- r0, _, _ := Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0)
- if r0 != 0 {
- neterr = Errno(r0)
- }
- return
-}
-
-func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) {
- r0, _, _ := Syscall(procNetGetJoinInformation.Addr(), 3, uintptr(unsafe.Pointer(server)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bufType)))
- if r0 != 0 {
- neterr = Errno(r0)
- }
- return
-}
-
-func NetApiBufferFree(buf *byte) (neterr error) {
- r0, _, _ := Syscall(procNetApiBufferFree.Addr(), 1, uintptr(unsafe.Pointer(buf)), 0, 0)
- if r0 != 0 {
- neterr = Errno(r0)
- }
- return
-}
-
-func LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
- r1, _, e1 := Syscall9(procLookupAccountSidW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
- r1, _, e1 := Syscall9(procLookupAccountNameW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) {
- r1, _, e1 := Syscall(procConvertSidToStringSidW.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(stringSid)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) {
- r1, _, e1 := Syscall(procConvertStringSidToSidW.Addr(), 2, uintptr(unsafe.Pointer(stringSid)), uintptr(unsafe.Pointer(sid)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetLengthSid(sid *SID) (len uint32) {
- r0, _, _ := Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
- len = uint32(r0)
- return
-}
-
-func CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) {
- r1, _, e1 := Syscall(procCopySid.Addr(), 3, uintptr(destSidLen), uintptr(unsafe.Pointer(destSid)), uintptr(unsafe.Pointer(srcSid)))
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func OpenProcessToken(h Handle, access uint32, token *Token) (err error) {
- r1, _, e1 := Syscall(procOpenProcessToken.Addr(), 3, uintptr(h), uintptr(access), uintptr(unsafe.Pointer(token)))
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetTokenInformation(t Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) {
- r1, _, e1 := Syscall6(procGetTokenInformation.Addr(), 5, uintptr(t), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
-
-func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {
- r1, _, e1 := Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen)))
- if r1 == 0 {
- if e1 != 0 {
- err = error(e1)
- } else {
- err = EINVAL
- }
- }
- return
-}
diff --git a/src/pkg/syscall/zsysctl_openbsd.go b/src/pkg/syscall/zsysctl_openbsd.go
deleted file mode 100644
index 923b2c29f..000000000
--- a/src/pkg/syscall/zsysctl_openbsd.go
+++ /dev/null
@@ -1,270 +0,0 @@
-// mksysctl_openbsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-type mibentry struct {
- ctlname string
- ctloid []_C_int
-}
-
-var sysctlMib = []mibentry{
- {"ddb.console", []_C_int{9, 6}},
- {"ddb.log", []_C_int{9, 7}},
- {"ddb.max_line", []_C_int{9, 3}},
- {"ddb.max_width", []_C_int{9, 2}},
- {"ddb.panic", []_C_int{9, 5}},
- {"ddb.radix", []_C_int{9, 1}},
- {"ddb.tab_stop_width", []_C_int{9, 4}},
- {"ddb.trigger", []_C_int{9, 8}},
- {"fs.posix.setuid", []_C_int{3, 1, 1}},
- {"hw.allowpowerdown", []_C_int{6, 22}},
- {"hw.byteorder", []_C_int{6, 4}},
- {"hw.cpuspeed", []_C_int{6, 12}},
- {"hw.diskcount", []_C_int{6, 10}},
- {"hw.disknames", []_C_int{6, 8}},
- {"hw.diskstats", []_C_int{6, 9}},
- {"hw.machine", []_C_int{6, 1}},
- {"hw.model", []_C_int{6, 2}},
- {"hw.ncpu", []_C_int{6, 3}},
- {"hw.ncpufound", []_C_int{6, 21}},
- {"hw.pagesize", []_C_int{6, 7}},
- {"hw.physmem", []_C_int{6, 19}},
- {"hw.product", []_C_int{6, 15}},
- {"hw.serialno", []_C_int{6, 17}},
- {"hw.setperf", []_C_int{6, 13}},
- {"hw.usermem", []_C_int{6, 20}},
- {"hw.uuid", []_C_int{6, 18}},
- {"hw.vendor", []_C_int{6, 14}},
- {"hw.version", []_C_int{6, 16}},
- {"kern.arandom", []_C_int{1, 37}},
- {"kern.argmax", []_C_int{1, 8}},
- {"kern.boottime", []_C_int{1, 21}},
- {"kern.bufcachepercent", []_C_int{1, 72}},
- {"kern.ccpu", []_C_int{1, 45}},
- {"kern.clockrate", []_C_int{1, 12}},
- {"kern.consdev", []_C_int{1, 75}},
- {"kern.cp_time", []_C_int{1, 40}},
- {"kern.cp_time2", []_C_int{1, 71}},
- {"kern.cryptodevallowsoft", []_C_int{1, 53}},
- {"kern.domainname", []_C_int{1, 22}},
- {"kern.file", []_C_int{1, 73}},
- {"kern.forkstat", []_C_int{1, 42}},
- {"kern.fscale", []_C_int{1, 46}},
- {"kern.fsync", []_C_int{1, 33}},
- {"kern.hostid", []_C_int{1, 11}},
- {"kern.hostname", []_C_int{1, 10}},
- {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}},
- {"kern.job_control", []_C_int{1, 19}},
- {"kern.malloc.buckets", []_C_int{1, 39, 1}},
- {"kern.malloc.kmemnames", []_C_int{1, 39, 3}},
- {"kern.maxclusters", []_C_int{1, 67}},
- {"kern.maxfiles", []_C_int{1, 7}},
- {"kern.maxlocksperuid", []_C_int{1, 70}},
- {"kern.maxpartitions", []_C_int{1, 23}},
- {"kern.maxproc", []_C_int{1, 6}},
- {"kern.maxthread", []_C_int{1, 25}},
- {"kern.maxvnodes", []_C_int{1, 5}},
- {"kern.mbstat", []_C_int{1, 59}},
- {"kern.msgbuf", []_C_int{1, 48}},
- {"kern.msgbufsize", []_C_int{1, 38}},
- {"kern.nchstats", []_C_int{1, 41}},
- {"kern.netlivelocks", []_C_int{1, 76}},
- {"kern.nfiles", []_C_int{1, 56}},
- {"kern.ngroups", []_C_int{1, 18}},
- {"kern.nosuidcoredump", []_C_int{1, 32}},
- {"kern.nprocs", []_C_int{1, 47}},
- {"kern.nselcoll", []_C_int{1, 43}},
- {"kern.nthreads", []_C_int{1, 26}},
- {"kern.numvnodes", []_C_int{1, 58}},
- {"kern.osrelease", []_C_int{1, 2}},
- {"kern.osrevision", []_C_int{1, 3}},
- {"kern.ostype", []_C_int{1, 1}},
- {"kern.osversion", []_C_int{1, 27}},
- {"kern.pool_debug", []_C_int{1, 77}},
- {"kern.posix1version", []_C_int{1, 17}},
- {"kern.proc", []_C_int{1, 66}},
- {"kern.random", []_C_int{1, 31}},
- {"kern.rawpartition", []_C_int{1, 24}},
- {"kern.saved_ids", []_C_int{1, 20}},
- {"kern.securelevel", []_C_int{1, 9}},
- {"kern.seminfo", []_C_int{1, 61}},
- {"kern.shminfo", []_C_int{1, 62}},
- {"kern.somaxconn", []_C_int{1, 28}},
- {"kern.sominconn", []_C_int{1, 29}},
- {"kern.splassert", []_C_int{1, 54}},
- {"kern.stackgap_random", []_C_int{1, 50}},
- {"kern.sysvipc_info", []_C_int{1, 51}},
- {"kern.sysvmsg", []_C_int{1, 34}},
- {"kern.sysvsem", []_C_int{1, 35}},
- {"kern.sysvshm", []_C_int{1, 36}},
- {"kern.timecounter.choice", []_C_int{1, 69, 4}},
- {"kern.timecounter.hardware", []_C_int{1, 69, 3}},
- {"kern.timecounter.tick", []_C_int{1, 69, 1}},
- {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}},
- {"kern.tty.maxptys", []_C_int{1, 44, 6}},
- {"kern.tty.nptys", []_C_int{1, 44, 7}},
- {"kern.tty.tk_cancc", []_C_int{1, 44, 4}},
- {"kern.tty.tk_nin", []_C_int{1, 44, 1}},
- {"kern.tty.tk_nout", []_C_int{1, 44, 2}},
- {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}},
- {"kern.tty.ttyinfo", []_C_int{1, 44, 5}},
- {"kern.ttycount", []_C_int{1, 57}},
- {"kern.userasymcrypto", []_C_int{1, 60}},
- {"kern.usercrypto", []_C_int{1, 52}},
- {"kern.usermount", []_C_int{1, 30}},
- {"kern.version", []_C_int{1, 4}},
- {"kern.vnode", []_C_int{1, 13}},
- {"kern.watchdog.auto", []_C_int{1, 64, 2}},
- {"kern.watchdog.period", []_C_int{1, 64, 1}},
- {"net.bpf.bufsize", []_C_int{4, 31, 1}},
- {"net.bpf.maxbufsize", []_C_int{4, 31, 2}},
- {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}},
- {"net.inet.ah.stats", []_C_int{4, 2, 51, 2}},
- {"net.inet.carp.allow", []_C_int{4, 2, 112, 1}},
- {"net.inet.carp.log", []_C_int{4, 2, 112, 3}},
- {"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}},
- {"net.inet.carp.stats", []_C_int{4, 2, 112, 4}},
- {"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}},
- {"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}},
- {"net.inet.divert.stats", []_C_int{4, 2, 258, 3}},
- {"net.inet.esp.enable", []_C_int{4, 2, 50, 1}},
- {"net.inet.esp.stats", []_C_int{4, 2, 50, 4}},
- {"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}},
- {"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}},
- {"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}},
- {"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}},
- {"net.inet.gre.allow", []_C_int{4, 2, 47, 1}},
- {"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}},
- {"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}},
- {"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}},
- {"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}},
- {"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}},
- {"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}},
- {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}},
- {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}},
- {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}},
- {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}},
- {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}},
- {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}},
- {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}},
- {"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}},
- {"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}},
- {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}},
- {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}},
- {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}},
- {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}},
- {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}},
- {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}},
- {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}},
- {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}},
- {"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}},
- {"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}},
- {"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}},
- {"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}},
- {"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}},
- {"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}},
- {"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}},
- {"net.inet.ip.stats", []_C_int{4, 2, 0, 33}},
- {"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}},
- {"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}},
- {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}},
- {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}},
- {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}},
- {"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}},
- {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}},
- {"net.inet.pim.stats", []_C_int{4, 2, 103, 1}},
- {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}},
- {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}},
- {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}},
- {"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}},
- {"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}},
- {"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}},
- {"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}},
- {"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}},
- {"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}},
- {"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}},
- {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}},
- {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}},
- {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}},
- {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}},
- {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}},
- {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}},
- {"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}},
- {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}},
- {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}},
- {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}},
- {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}},
- {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}},
- {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}},
- {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}},
- {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}},
- {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}},
- {"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}},
- {"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}},
- {"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}},
- {"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}},
- {"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}},
- {"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}},
- {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}},
- {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}},
- {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}},
- {"net.inet6.icmp6.nd6_prune", []_C_int{4, 24, 30, 6}},
- {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}},
- {"net.inet6.icmp6.nd6_useloopback", []_C_int{4, 24, 30, 11}},
- {"net.inet6.icmp6.nodeinfo", []_C_int{4, 24, 30, 13}},
- {"net.inet6.icmp6.rediraccept", []_C_int{4, 24, 30, 2}},
- {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}},
- {"net.inet6.ip6.accept_rtadv", []_C_int{4, 24, 17, 12}},
- {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}},
- {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}},
- {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}},
- {"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}},
- {"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}},
- {"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}},
- {"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}},
- {"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}},
- {"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}},
- {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}},
- {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}},
- {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}},
- {"net.inet6.ip6.maxifdefrouters", []_C_int{4, 24, 17, 47}},
- {"net.inet6.ip6.maxifprefixes", []_C_int{4, 24, 17, 46}},
- {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}},
- {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}},
- {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}},
- {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}},
- {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}},
- {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}},
- {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}},
- {"net.inet6.ip6.rr_prune", []_C_int{4, 24, 17, 22}},
- {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}},
- {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}},
- {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}},
- {"net.inet6.ip6.v6only", []_C_int{4, 24, 17, 24}},
- {"net.key.sadb_dump", []_C_int{4, 30, 1}},
- {"net.key.spd_dump", []_C_int{4, 30, 2}},
- {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}},
- {"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}},
- {"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}},
- {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}},
- {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}},
- {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}},
- {"net.mpls.maxloop_inkernel", []_C_int{4, 33, 4}},
- {"net.mpls.ttl", []_C_int{4, 33, 2}},
- {"net.pflow.stats", []_C_int{4, 34, 1}},
- {"net.pipex.enable", []_C_int{4, 35, 1}},
- {"vm.anonmin", []_C_int{2, 7}},
- {"vm.loadavg", []_C_int{2, 2}},
- {"vm.maxslp", []_C_int{2, 10}},
- {"vm.nkmempages", []_C_int{2, 6}},
- {"vm.psstrings", []_C_int{2, 3}},
- {"vm.swapencrypt.enable", []_C_int{2, 5, 0}},
- {"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}},
- {"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}},
- {"vm.uspace", []_C_int{2, 11}},
- {"vm.uvmexp", []_C_int{2, 4}},
- {"vm.vmmeter", []_C_int{2, 1}},
- {"vm.vnodemin", []_C_int{2, 9}},
- {"vm.vtextmin", []_C_int{2, 8}},
-}
diff --git a/src/pkg/syscall/zsysnum_darwin_386.go b/src/pkg/syscall/zsysnum_darwin_386.go
deleted file mode 100644
index abdef7743..000000000
--- a/src/pkg/syscall/zsysnum_darwin_386.go
+++ /dev/null
@@ -1,360 +0,0 @@
-// mksysnum_darwin.pl /usr/include/sys/syscall.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
- SYS_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAIT4 = 7
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_CHDIR = 12
- SYS_FCHDIR = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_CHOWN = 16
- SYS_GETFSSTAT = 18
- SYS_GETPID = 20
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_GETEUID = 25
- SYS_PTRACE = 26
- SYS_RECVMSG = 27
- SYS_SENDMSG = 28
- SYS_RECVFROM = 29
- SYS_ACCEPT = 30
- SYS_GETPEERNAME = 31
- SYS_GETSOCKNAME = 32
- SYS_ACCESS = 33
- SYS_CHFLAGS = 34
- SYS_FCHFLAGS = 35
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_GETPPID = 39
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_GETEGID = 43
- SYS_PROFIL = 44
- SYS_SIGACTION = 46
- SYS_GETGID = 47
- SYS_SIGPROCMASK = 48
- SYS_GETLOGIN = 49
- SYS_SETLOGIN = 50
- SYS_ACCT = 51
- SYS_SIGPENDING = 52
- SYS_SIGALTSTACK = 53
- SYS_IOCTL = 54
- SYS_REBOOT = 55
- SYS_REVOKE = 56
- SYS_SYMLINK = 57
- SYS_READLINK = 58
- SYS_EXECVE = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_MSYNC = 65
- SYS_VFORK = 66
- SYS_MUNMAP = 73
- SYS_MPROTECT = 74
- SYS_MADVISE = 75
- SYS_MINCORE = 78
- SYS_GETGROUPS = 79
- SYS_SETGROUPS = 80
- SYS_GETPGRP = 81
- SYS_SETPGID = 82
- SYS_SETITIMER = 83
- SYS_SWAPON = 85
- SYS_GETITIMER = 86
- SYS_GETDTABLESIZE = 89
- SYS_DUP2 = 90
- SYS_FCNTL = 92
- SYS_SELECT = 93
- SYS_FSYNC = 95
- SYS_SETPRIORITY = 96
- SYS_SOCKET = 97
- SYS_CONNECT = 98
- SYS_GETPRIORITY = 100
- SYS_BIND = 104
- SYS_SETSOCKOPT = 105
- SYS_LISTEN = 106
- SYS_SIGSUSPEND = 111
- SYS_GETTIMEOFDAY = 116
- SYS_GETRUSAGE = 117
- SYS_GETSOCKOPT = 118
- SYS_READV = 120
- SYS_WRITEV = 121
- SYS_SETTIMEOFDAY = 122
- SYS_FCHOWN = 123
- SYS_FCHMOD = 124
- SYS_SETREUID = 126
- SYS_SETREGID = 127
- SYS_RENAME = 128
- SYS_FLOCK = 131
- SYS_MKFIFO = 132
- SYS_SENDTO = 133
- SYS_SHUTDOWN = 134
- SYS_SOCKETPAIR = 135
- SYS_MKDIR = 136
- SYS_RMDIR = 137
- SYS_UTIMES = 138
- SYS_FUTIMES = 139
- SYS_ADJTIME = 140
- SYS_GETHOSTUUID = 142
- SYS_SETSID = 147
- SYS_GETPGID = 151
- SYS_SETPRIVEXEC = 152
- SYS_PREAD = 153
- SYS_PWRITE = 154
- SYS_NFSSVC = 155
- SYS_STATFS = 157
- SYS_FSTATFS = 158
- SYS_UNMOUNT = 159
- SYS_GETFH = 161
- SYS_QUOTACTL = 165
- SYS_MOUNT = 167
- SYS_CSOPS = 169
- SYS_WAITID = 173
- SYS_ADD_PROFIL = 176
- SYS_KDEBUG_TRACE = 180
- SYS_SETGID = 181
- SYS_SETEGID = 182
- SYS_SETEUID = 183
- SYS_SIGRETURN = 184
- SYS_CHUD = 185
- SYS_FDATASYNC = 187
- SYS_STAT = 188
- SYS_FSTAT = 189
- SYS_LSTAT = 190
- SYS_PATHCONF = 191
- SYS_FPATHCONF = 192
- SYS_GETRLIMIT = 194
- SYS_SETRLIMIT = 195
- SYS_GETDIRENTRIES = 196
- SYS_MMAP = 197
- SYS_LSEEK = 199
- SYS_TRUNCATE = 200
- SYS_FTRUNCATE = 201
- SYS___SYSCTL = 202
- SYS_MLOCK = 203
- SYS_MUNLOCK = 204
- SYS_UNDELETE = 205
- SYS_ATSOCKET = 206
- SYS_ATGETMSG = 207
- SYS_ATPUTMSG = 208
- SYS_ATPSNDREQ = 209
- SYS_ATPSNDRSP = 210
- SYS_ATPGETREQ = 211
- SYS_ATPGETRSP = 212
- SYS_MKCOMPLEX = 216
- SYS_STATV = 217
- SYS_LSTATV = 218
- SYS_FSTATV = 219
- SYS_GETATTRLIST = 220
- SYS_SETATTRLIST = 221
- SYS_GETDIRENTRIESATTR = 222
- SYS_EXCHANGEDATA = 223
- SYS_SEARCHFS = 225
- SYS_DELETE = 226
- SYS_COPYFILE = 227
- SYS_FGETATTRLIST = 228
- SYS_FSETATTRLIST = 229
- SYS_POLL = 230
- SYS_WATCHEVENT = 231
- SYS_WAITEVENT = 232
- SYS_MODWATCH = 233
- SYS_GETXATTR = 234
- SYS_FGETXATTR = 235
- SYS_SETXATTR = 236
- SYS_FSETXATTR = 237
- SYS_REMOVEXATTR = 238
- SYS_FREMOVEXATTR = 239
- SYS_LISTXATTR = 240
- SYS_FLISTXATTR = 241
- SYS_FSCTL = 242
- SYS_INITGROUPS = 243
- SYS_POSIX_SPAWN = 244
- SYS_FFSCTL = 245
- SYS_NFSCLNT = 247
- SYS_FHOPEN = 248
- SYS_MINHERIT = 250
- SYS_SEMSYS = 251
- SYS_MSGSYS = 252
- SYS_SHMSYS = 253
- SYS_SEMCTL = 254
- SYS_SEMGET = 255
- SYS_SEMOP = 256
- SYS_MSGCTL = 258
- SYS_MSGGET = 259
- SYS_MSGSND = 260
- SYS_MSGRCV = 261
- SYS_SHMAT = 262
- SYS_SHMCTL = 263
- SYS_SHMDT = 264
- SYS_SHMGET = 265
- SYS_SHM_OPEN = 266
- SYS_SHM_UNLINK = 267
- SYS_SEM_OPEN = 268
- SYS_SEM_CLOSE = 269
- SYS_SEM_UNLINK = 270
- SYS_SEM_WAIT = 271
- SYS_SEM_TRYWAIT = 272
- SYS_SEM_POST = 273
- SYS_SEM_GETVALUE = 274
- SYS_SEM_INIT = 275
- SYS_SEM_DESTROY = 276
- SYS_OPEN_EXTENDED = 277
- SYS_UMASK_EXTENDED = 278
- SYS_STAT_EXTENDED = 279
- SYS_LSTAT_EXTENDED = 280
- SYS_FSTAT_EXTENDED = 281
- SYS_CHMOD_EXTENDED = 282
- SYS_FCHMOD_EXTENDED = 283
- SYS_ACCESS_EXTENDED = 284
- SYS_SETTID = 285
- SYS_GETTID = 286
- SYS_SETSGROUPS = 287
- SYS_GETSGROUPS = 288
- SYS_SETWGROUPS = 289
- SYS_GETWGROUPS = 290
- SYS_MKFIFO_EXTENDED = 291
- SYS_MKDIR_EXTENDED = 292
- SYS_IDENTITYSVC = 293
- SYS_SHARED_REGION_CHECK_NP = 294
- SYS_VM_PRESSURE_MONITOR = 296
- SYS_PSYNCH_RW_LONGRDLOCK = 297
- SYS_PSYNCH_RW_YIELDWRLOCK = 298
- SYS_PSYNCH_RW_DOWNGRADE = 299
- SYS_PSYNCH_RW_UPGRADE = 300
- SYS_PSYNCH_MUTEXWAIT = 301
- SYS_PSYNCH_MUTEXDROP = 302
- SYS_PSYNCH_CVBROAD = 303
- SYS_PSYNCH_CVSIGNAL = 304
- SYS_PSYNCH_CVWAIT = 305
- SYS_PSYNCH_RW_RDLOCK = 306
- SYS_PSYNCH_RW_WRLOCK = 307
- SYS_PSYNCH_RW_UNLOCK = 308
- SYS_PSYNCH_RW_UNLOCK2 = 309
- SYS_GETSID = 310
- SYS_SETTID_WITH_PID = 311
- SYS_PSYNCH_CVCLRPREPOST = 312
- SYS_AIO_FSYNC = 313
- SYS_AIO_RETURN = 314
- SYS_AIO_SUSPEND = 315
- SYS_AIO_CANCEL = 316
- SYS_AIO_ERROR = 317
- SYS_AIO_READ = 318
- SYS_AIO_WRITE = 319
- SYS_LIO_LISTIO = 320
- SYS_IOPOLICYSYS = 322
- SYS_PROCESS_POLICY = 323
- SYS_MLOCKALL = 324
- SYS_MUNLOCKALL = 325
- SYS_ISSETUGID = 327
- SYS___PTHREAD_KILL = 328
- SYS___PTHREAD_SIGMASK = 329
- SYS___SIGWAIT = 330
- SYS___DISABLE_THREADSIGNAL = 331
- SYS___PTHREAD_MARKCANCEL = 332
- SYS___PTHREAD_CANCELED = 333
- SYS___SEMWAIT_SIGNAL = 334
- SYS_PROC_INFO = 336
- SYS_SENDFILE = 337
- SYS_STAT64 = 338
- SYS_FSTAT64 = 339
- SYS_LSTAT64 = 340
- SYS_STAT64_EXTENDED = 341
- SYS_LSTAT64_EXTENDED = 342
- SYS_FSTAT64_EXTENDED = 343
- SYS_GETDIRENTRIES64 = 344
- SYS_STATFS64 = 345
- SYS_FSTATFS64 = 346
- SYS_GETFSSTAT64 = 347
- SYS___PTHREAD_CHDIR = 348
- SYS___PTHREAD_FCHDIR = 349
- SYS_AUDIT = 350
- SYS_AUDITON = 351
- SYS_GETAUID = 353
- SYS_SETAUID = 354
- SYS_GETAUDIT = 355
- SYS_SETAUDIT = 356
- SYS_GETAUDIT_ADDR = 357
- SYS_SETAUDIT_ADDR = 358
- SYS_AUDITCTL = 359
- SYS_BSDTHREAD_CREATE = 360
- SYS_BSDTHREAD_TERMINATE = 361
- SYS_KQUEUE = 362
- SYS_KEVENT = 363
- SYS_LCHOWN = 364
- SYS_STACK_SNAPSHOT = 365
- SYS_BSDTHREAD_REGISTER = 366
- SYS_WORKQ_OPEN = 367
- SYS_WORKQ_KERNRETURN = 368
- SYS_KEVENT64 = 369
- SYS___OLD_SEMWAIT_SIGNAL = 370
- SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
- SYS_THREAD_SELFID = 372
- SYS___MAC_EXECVE = 380
- SYS___MAC_SYSCALL = 381
- SYS___MAC_GET_FILE = 382
- SYS___MAC_SET_FILE = 383
- SYS___MAC_GET_LINK = 384
- SYS___MAC_SET_LINK = 385
- SYS___MAC_GET_PROC = 386
- SYS___MAC_SET_PROC = 387
- SYS___MAC_GET_FD = 388
- SYS___MAC_SET_FD = 389
- SYS___MAC_GET_PID = 390
- SYS___MAC_GET_LCID = 391
- SYS___MAC_GET_LCTX = 392
- SYS___MAC_SET_LCTX = 393
- SYS_SETLCID = 394
- SYS_GETLCID = 395
- SYS_READ_NOCANCEL = 396
- SYS_WRITE_NOCANCEL = 397
- SYS_OPEN_NOCANCEL = 398
- SYS_CLOSE_NOCANCEL = 399
- SYS_WAIT4_NOCANCEL = 400
- SYS_RECVMSG_NOCANCEL = 401
- SYS_SENDMSG_NOCANCEL = 402
- SYS_RECVFROM_NOCANCEL = 403
- SYS_ACCEPT_NOCANCEL = 404
- SYS_MSYNC_NOCANCEL = 405
- SYS_FCNTL_NOCANCEL = 406
- SYS_SELECT_NOCANCEL = 407
- SYS_FSYNC_NOCANCEL = 408
- SYS_CONNECT_NOCANCEL = 409
- SYS_SIGSUSPEND_NOCANCEL = 410
- SYS_READV_NOCANCEL = 411
- SYS_WRITEV_NOCANCEL = 412
- SYS_SENDTO_NOCANCEL = 413
- SYS_PREAD_NOCANCEL = 414
- SYS_PWRITE_NOCANCEL = 415
- SYS_WAITID_NOCANCEL = 416
- SYS_POLL_NOCANCEL = 417
- SYS_MSGSND_NOCANCEL = 418
- SYS_MSGRCV_NOCANCEL = 419
- SYS_SEM_WAIT_NOCANCEL = 420
- SYS_AIO_SUSPEND_NOCANCEL = 421
- SYS___SIGWAIT_NOCANCEL = 422
- SYS___SEMWAIT_SIGNAL_NOCANCEL = 423
- SYS___MAC_MOUNT = 424
- SYS___MAC_GET_MOUNT = 425
- SYS___MAC_GETFSSTAT = 426
- SYS_FSGETPATH = 427
- SYS_AUDIT_SESSION_SELF = 428
- SYS_AUDIT_SESSION_JOIN = 429
- SYS_FILEPORT_MAKEPORT = 430
- SYS_FILEPORT_MAKEFD = 431
- SYS_AUDIT_SESSION_PORT = 432
- SYS_PID_SUSPEND = 433
- SYS_PID_RESUME = 434
- SYS_PID_HIBERNATE = 435
- SYS_PID_SHUTDOWN_SOCKETS = 436
- SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438
- SYS_MAXSYSCALL = 439
-)
diff --git a/src/pkg/syscall/zsysnum_darwin_amd64.go b/src/pkg/syscall/zsysnum_darwin_amd64.go
deleted file mode 100644
index abdef7743..000000000
--- a/src/pkg/syscall/zsysnum_darwin_amd64.go
+++ /dev/null
@@ -1,360 +0,0 @@
-// mksysnum_darwin.pl /usr/include/sys/syscall.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
- SYS_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAIT4 = 7
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_CHDIR = 12
- SYS_FCHDIR = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_CHOWN = 16
- SYS_GETFSSTAT = 18
- SYS_GETPID = 20
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_GETEUID = 25
- SYS_PTRACE = 26
- SYS_RECVMSG = 27
- SYS_SENDMSG = 28
- SYS_RECVFROM = 29
- SYS_ACCEPT = 30
- SYS_GETPEERNAME = 31
- SYS_GETSOCKNAME = 32
- SYS_ACCESS = 33
- SYS_CHFLAGS = 34
- SYS_FCHFLAGS = 35
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_GETPPID = 39
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_GETEGID = 43
- SYS_PROFIL = 44
- SYS_SIGACTION = 46
- SYS_GETGID = 47
- SYS_SIGPROCMASK = 48
- SYS_GETLOGIN = 49
- SYS_SETLOGIN = 50
- SYS_ACCT = 51
- SYS_SIGPENDING = 52
- SYS_SIGALTSTACK = 53
- SYS_IOCTL = 54
- SYS_REBOOT = 55
- SYS_REVOKE = 56
- SYS_SYMLINK = 57
- SYS_READLINK = 58
- SYS_EXECVE = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_MSYNC = 65
- SYS_VFORK = 66
- SYS_MUNMAP = 73
- SYS_MPROTECT = 74
- SYS_MADVISE = 75
- SYS_MINCORE = 78
- SYS_GETGROUPS = 79
- SYS_SETGROUPS = 80
- SYS_GETPGRP = 81
- SYS_SETPGID = 82
- SYS_SETITIMER = 83
- SYS_SWAPON = 85
- SYS_GETITIMER = 86
- SYS_GETDTABLESIZE = 89
- SYS_DUP2 = 90
- SYS_FCNTL = 92
- SYS_SELECT = 93
- SYS_FSYNC = 95
- SYS_SETPRIORITY = 96
- SYS_SOCKET = 97
- SYS_CONNECT = 98
- SYS_GETPRIORITY = 100
- SYS_BIND = 104
- SYS_SETSOCKOPT = 105
- SYS_LISTEN = 106
- SYS_SIGSUSPEND = 111
- SYS_GETTIMEOFDAY = 116
- SYS_GETRUSAGE = 117
- SYS_GETSOCKOPT = 118
- SYS_READV = 120
- SYS_WRITEV = 121
- SYS_SETTIMEOFDAY = 122
- SYS_FCHOWN = 123
- SYS_FCHMOD = 124
- SYS_SETREUID = 126
- SYS_SETREGID = 127
- SYS_RENAME = 128
- SYS_FLOCK = 131
- SYS_MKFIFO = 132
- SYS_SENDTO = 133
- SYS_SHUTDOWN = 134
- SYS_SOCKETPAIR = 135
- SYS_MKDIR = 136
- SYS_RMDIR = 137
- SYS_UTIMES = 138
- SYS_FUTIMES = 139
- SYS_ADJTIME = 140
- SYS_GETHOSTUUID = 142
- SYS_SETSID = 147
- SYS_GETPGID = 151
- SYS_SETPRIVEXEC = 152
- SYS_PREAD = 153
- SYS_PWRITE = 154
- SYS_NFSSVC = 155
- SYS_STATFS = 157
- SYS_FSTATFS = 158
- SYS_UNMOUNT = 159
- SYS_GETFH = 161
- SYS_QUOTACTL = 165
- SYS_MOUNT = 167
- SYS_CSOPS = 169
- SYS_WAITID = 173
- SYS_ADD_PROFIL = 176
- SYS_KDEBUG_TRACE = 180
- SYS_SETGID = 181
- SYS_SETEGID = 182
- SYS_SETEUID = 183
- SYS_SIGRETURN = 184
- SYS_CHUD = 185
- SYS_FDATASYNC = 187
- SYS_STAT = 188
- SYS_FSTAT = 189
- SYS_LSTAT = 190
- SYS_PATHCONF = 191
- SYS_FPATHCONF = 192
- SYS_GETRLIMIT = 194
- SYS_SETRLIMIT = 195
- SYS_GETDIRENTRIES = 196
- SYS_MMAP = 197
- SYS_LSEEK = 199
- SYS_TRUNCATE = 200
- SYS_FTRUNCATE = 201
- SYS___SYSCTL = 202
- SYS_MLOCK = 203
- SYS_MUNLOCK = 204
- SYS_UNDELETE = 205
- SYS_ATSOCKET = 206
- SYS_ATGETMSG = 207
- SYS_ATPUTMSG = 208
- SYS_ATPSNDREQ = 209
- SYS_ATPSNDRSP = 210
- SYS_ATPGETREQ = 211
- SYS_ATPGETRSP = 212
- SYS_MKCOMPLEX = 216
- SYS_STATV = 217
- SYS_LSTATV = 218
- SYS_FSTATV = 219
- SYS_GETATTRLIST = 220
- SYS_SETATTRLIST = 221
- SYS_GETDIRENTRIESATTR = 222
- SYS_EXCHANGEDATA = 223
- SYS_SEARCHFS = 225
- SYS_DELETE = 226
- SYS_COPYFILE = 227
- SYS_FGETATTRLIST = 228
- SYS_FSETATTRLIST = 229
- SYS_POLL = 230
- SYS_WATCHEVENT = 231
- SYS_WAITEVENT = 232
- SYS_MODWATCH = 233
- SYS_GETXATTR = 234
- SYS_FGETXATTR = 235
- SYS_SETXATTR = 236
- SYS_FSETXATTR = 237
- SYS_REMOVEXATTR = 238
- SYS_FREMOVEXATTR = 239
- SYS_LISTXATTR = 240
- SYS_FLISTXATTR = 241
- SYS_FSCTL = 242
- SYS_INITGROUPS = 243
- SYS_POSIX_SPAWN = 244
- SYS_FFSCTL = 245
- SYS_NFSCLNT = 247
- SYS_FHOPEN = 248
- SYS_MINHERIT = 250
- SYS_SEMSYS = 251
- SYS_MSGSYS = 252
- SYS_SHMSYS = 253
- SYS_SEMCTL = 254
- SYS_SEMGET = 255
- SYS_SEMOP = 256
- SYS_MSGCTL = 258
- SYS_MSGGET = 259
- SYS_MSGSND = 260
- SYS_MSGRCV = 261
- SYS_SHMAT = 262
- SYS_SHMCTL = 263
- SYS_SHMDT = 264
- SYS_SHMGET = 265
- SYS_SHM_OPEN = 266
- SYS_SHM_UNLINK = 267
- SYS_SEM_OPEN = 268
- SYS_SEM_CLOSE = 269
- SYS_SEM_UNLINK = 270
- SYS_SEM_WAIT = 271
- SYS_SEM_TRYWAIT = 272
- SYS_SEM_POST = 273
- SYS_SEM_GETVALUE = 274
- SYS_SEM_INIT = 275
- SYS_SEM_DESTROY = 276
- SYS_OPEN_EXTENDED = 277
- SYS_UMASK_EXTENDED = 278
- SYS_STAT_EXTENDED = 279
- SYS_LSTAT_EXTENDED = 280
- SYS_FSTAT_EXTENDED = 281
- SYS_CHMOD_EXTENDED = 282
- SYS_FCHMOD_EXTENDED = 283
- SYS_ACCESS_EXTENDED = 284
- SYS_SETTID = 285
- SYS_GETTID = 286
- SYS_SETSGROUPS = 287
- SYS_GETSGROUPS = 288
- SYS_SETWGROUPS = 289
- SYS_GETWGROUPS = 290
- SYS_MKFIFO_EXTENDED = 291
- SYS_MKDIR_EXTENDED = 292
- SYS_IDENTITYSVC = 293
- SYS_SHARED_REGION_CHECK_NP = 294
- SYS_VM_PRESSURE_MONITOR = 296
- SYS_PSYNCH_RW_LONGRDLOCK = 297
- SYS_PSYNCH_RW_YIELDWRLOCK = 298
- SYS_PSYNCH_RW_DOWNGRADE = 299
- SYS_PSYNCH_RW_UPGRADE = 300
- SYS_PSYNCH_MUTEXWAIT = 301
- SYS_PSYNCH_MUTEXDROP = 302
- SYS_PSYNCH_CVBROAD = 303
- SYS_PSYNCH_CVSIGNAL = 304
- SYS_PSYNCH_CVWAIT = 305
- SYS_PSYNCH_RW_RDLOCK = 306
- SYS_PSYNCH_RW_WRLOCK = 307
- SYS_PSYNCH_RW_UNLOCK = 308
- SYS_PSYNCH_RW_UNLOCK2 = 309
- SYS_GETSID = 310
- SYS_SETTID_WITH_PID = 311
- SYS_PSYNCH_CVCLRPREPOST = 312
- SYS_AIO_FSYNC = 313
- SYS_AIO_RETURN = 314
- SYS_AIO_SUSPEND = 315
- SYS_AIO_CANCEL = 316
- SYS_AIO_ERROR = 317
- SYS_AIO_READ = 318
- SYS_AIO_WRITE = 319
- SYS_LIO_LISTIO = 320
- SYS_IOPOLICYSYS = 322
- SYS_PROCESS_POLICY = 323
- SYS_MLOCKALL = 324
- SYS_MUNLOCKALL = 325
- SYS_ISSETUGID = 327
- SYS___PTHREAD_KILL = 328
- SYS___PTHREAD_SIGMASK = 329
- SYS___SIGWAIT = 330
- SYS___DISABLE_THREADSIGNAL = 331
- SYS___PTHREAD_MARKCANCEL = 332
- SYS___PTHREAD_CANCELED = 333
- SYS___SEMWAIT_SIGNAL = 334
- SYS_PROC_INFO = 336
- SYS_SENDFILE = 337
- SYS_STAT64 = 338
- SYS_FSTAT64 = 339
- SYS_LSTAT64 = 340
- SYS_STAT64_EXTENDED = 341
- SYS_LSTAT64_EXTENDED = 342
- SYS_FSTAT64_EXTENDED = 343
- SYS_GETDIRENTRIES64 = 344
- SYS_STATFS64 = 345
- SYS_FSTATFS64 = 346
- SYS_GETFSSTAT64 = 347
- SYS___PTHREAD_CHDIR = 348
- SYS___PTHREAD_FCHDIR = 349
- SYS_AUDIT = 350
- SYS_AUDITON = 351
- SYS_GETAUID = 353
- SYS_SETAUID = 354
- SYS_GETAUDIT = 355
- SYS_SETAUDIT = 356
- SYS_GETAUDIT_ADDR = 357
- SYS_SETAUDIT_ADDR = 358
- SYS_AUDITCTL = 359
- SYS_BSDTHREAD_CREATE = 360
- SYS_BSDTHREAD_TERMINATE = 361
- SYS_KQUEUE = 362
- SYS_KEVENT = 363
- SYS_LCHOWN = 364
- SYS_STACK_SNAPSHOT = 365
- SYS_BSDTHREAD_REGISTER = 366
- SYS_WORKQ_OPEN = 367
- SYS_WORKQ_KERNRETURN = 368
- SYS_KEVENT64 = 369
- SYS___OLD_SEMWAIT_SIGNAL = 370
- SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
- SYS_THREAD_SELFID = 372
- SYS___MAC_EXECVE = 380
- SYS___MAC_SYSCALL = 381
- SYS___MAC_GET_FILE = 382
- SYS___MAC_SET_FILE = 383
- SYS___MAC_GET_LINK = 384
- SYS___MAC_SET_LINK = 385
- SYS___MAC_GET_PROC = 386
- SYS___MAC_SET_PROC = 387
- SYS___MAC_GET_FD = 388
- SYS___MAC_SET_FD = 389
- SYS___MAC_GET_PID = 390
- SYS___MAC_GET_LCID = 391
- SYS___MAC_GET_LCTX = 392
- SYS___MAC_SET_LCTX = 393
- SYS_SETLCID = 394
- SYS_GETLCID = 395
- SYS_READ_NOCANCEL = 396
- SYS_WRITE_NOCANCEL = 397
- SYS_OPEN_NOCANCEL = 398
- SYS_CLOSE_NOCANCEL = 399
- SYS_WAIT4_NOCANCEL = 400
- SYS_RECVMSG_NOCANCEL = 401
- SYS_SENDMSG_NOCANCEL = 402
- SYS_RECVFROM_NOCANCEL = 403
- SYS_ACCEPT_NOCANCEL = 404
- SYS_MSYNC_NOCANCEL = 405
- SYS_FCNTL_NOCANCEL = 406
- SYS_SELECT_NOCANCEL = 407
- SYS_FSYNC_NOCANCEL = 408
- SYS_CONNECT_NOCANCEL = 409
- SYS_SIGSUSPEND_NOCANCEL = 410
- SYS_READV_NOCANCEL = 411
- SYS_WRITEV_NOCANCEL = 412
- SYS_SENDTO_NOCANCEL = 413
- SYS_PREAD_NOCANCEL = 414
- SYS_PWRITE_NOCANCEL = 415
- SYS_WAITID_NOCANCEL = 416
- SYS_POLL_NOCANCEL = 417
- SYS_MSGSND_NOCANCEL = 418
- SYS_MSGRCV_NOCANCEL = 419
- SYS_SEM_WAIT_NOCANCEL = 420
- SYS_AIO_SUSPEND_NOCANCEL = 421
- SYS___SIGWAIT_NOCANCEL = 422
- SYS___SEMWAIT_SIGNAL_NOCANCEL = 423
- SYS___MAC_MOUNT = 424
- SYS___MAC_GET_MOUNT = 425
- SYS___MAC_GETFSSTAT = 426
- SYS_FSGETPATH = 427
- SYS_AUDIT_SESSION_SELF = 428
- SYS_AUDIT_SESSION_JOIN = 429
- SYS_FILEPORT_MAKEPORT = 430
- SYS_FILEPORT_MAKEFD = 431
- SYS_AUDIT_SESSION_PORT = 432
- SYS_PID_SUSPEND = 433
- SYS_PID_RESUME = 434
- SYS_PID_HIBERNATE = 435
- SYS_PID_SHUTDOWN_SOCKETS = 436
- SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438
- SYS_MAXSYSCALL = 439
-)
diff --git a/src/pkg/syscall/zsysnum_dragonfly_386.go b/src/pkg/syscall/zsysnum_dragonfly_386.go
deleted file mode 100644
index 4b086b921..000000000
--- a/src/pkg/syscall/zsysnum_dragonfly_386.go
+++ /dev/null
@@ -1,302 +0,0 @@
-// mksysnum_dragonfly.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
- // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
- SYS_EXIT = 1 // { void exit(int rval); }
- SYS_FORK = 2 // { int fork(void); }
- SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); }
- SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); }
- SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
- SYS_CLOSE = 6 // { int close(int fd); }
- SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, \
- SYS_LINK = 9 // { int link(char *path, char *link); }
- SYS_UNLINK = 10 // { int unlink(char *path); }
- SYS_CHDIR = 12 // { int chdir(char *path); }
- SYS_FCHDIR = 13 // { int fchdir(int fd); }
- SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
- SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
- SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
- SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
- SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, \
- SYS_GETPID = 20 // { pid_t getpid(void); }
- SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, \
- SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
- SYS_SETUID = 23 // { int setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t getuid(void); }
- SYS_GETEUID = 25 // { uid_t geteuid(void); }
- SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, \
- SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); }
- SYS_SENDMSG = 28 // { int sendmsg(int s, caddr_t msg, int flags); }
- SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, \
- SYS_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); }
- SYS_GETPEERNAME = 31 // { int getpeername(int fdes, caddr_t asa, int *alen); }
- SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, caddr_t asa, int *alen); }
- SYS_ACCESS = 33 // { int access(char *path, int flags); }
- SYS_CHFLAGS = 34 // { int chflags(char *path, int flags); }
- SYS_FCHFLAGS = 35 // { int fchflags(int fd, int flags); }
- SYS_SYNC = 36 // { int sync(void); }
- SYS_KILL = 37 // { int kill(int pid, int signum); }
- SYS_GETPPID = 39 // { pid_t getppid(void); }
- SYS_DUP = 41 // { int dup(u_int fd); }
- SYS_PIPE = 42 // { int pipe(void); }
- SYS_GETEGID = 43 // { gid_t getegid(void); }
- SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
- SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, \
- SYS_GETGID = 47 // { gid_t getgid(void); }
- SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); }
- SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
- SYS_ACCT = 51 // { int acct(char *path); }
- SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); }
- SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); }
- SYS_REBOOT = 55 // { int reboot(int opt); }
- SYS_REVOKE = 56 // { int revoke(char *path); }
- SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
- SYS_READLINK = 58 // { int readlink(char *path, char *buf, int count); }
- SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
- SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
- SYS_CHROOT = 61 // { int chroot(char *path); }
- SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
- SYS_VFORK = 66 // { pid_t vfork(void); }
- SYS_SBRK = 69 // { int sbrk(int incr); }
- SYS_SSTK = 70 // { int sstk(int incr); }
- SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); }
- SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
- SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
- SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
- SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); }
- SYS_GETPGRP = 81 // { int getpgrp(void); }
- SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
- SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, \
- SYS_SWAPON = 85 // { int swapon(char *name); }
- SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); }
- SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
- SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
- SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
- SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
- SYS_FSYNC = 95 // { int fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); }
- SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); }
- SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); }
- SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
- SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); }
- SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
- SYS_LISTEN = 106 // { int listen(int s, int backlog); }
- SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
- SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); }
- SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
- SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
- SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
- SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
- SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
- SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
- SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
- SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
- SYS_RENAME = 128 // { int rename(char *from, char *to); }
- SYS_FLOCK = 131 // { int flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
- SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
- SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, \
- SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
- SYS_RMDIR = 137 // { int rmdir(char *path); }
- SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); }
- SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
- SYS_SETSID = 147 // { int setsid(void); }
- SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
- SYS_STATFS = 157 // { int statfs(char *path, struct statfs *buf); }
- SYS_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); }
- SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); }
- SYS_GETDOMAINNAME = 162 // { int getdomainname(char *domainname, int len); }
- SYS_SETDOMAINNAME = 163 // { int setdomainname(char *domainname, int len); }
- SYS_UNAME = 164 // { int uname(struct utsname *name); }
- SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
- SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
- SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, \
- SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, \
- SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
- SYS_SETGID = 181 // { int setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
- SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
- SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
- SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
- SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
- SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, \
- // SYS_NOSYS = 198; // { int nosys(void); } __syscall __syscall_args int
- SYS_LSEEK = 199 // { off_t lseek(int fd, int pad, off_t offset, \
- SYS_TRUNCATE = 200 // { int truncate(char *path, int pad, off_t length); }
- SYS_FTRUNCATE = 201 // { int ftruncate(int fd, int pad, off_t length); }
- SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, \
- SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
- SYS_UNDELETE = 205 // { int undelete(char *path); }
- SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
- SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
- SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
- SYS___SEMCTL = 220 // { int __semctl(int semid, int semnum, int cmd, \
- SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); }
- SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, \
- SYS_MSGCTL = 224 // { int msgctl(int msqid, int cmd, \
- SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); }
- SYS_MSGSND = 226 // { int msgsnd(int msqid, void *msgp, size_t msgsz, \
- SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, \
- SYS_SHMAT = 228 // { caddr_t shmat(int shmid, const void *shmaddr, \
- SYS_SHMCTL = 229 // { int shmctl(int shmid, int cmd, \
- SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); }
- SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); }
- SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
- SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, \
- SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
- SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
- SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); }
- SYS_RFORK = 251 // { int rfork(int flags); }
- SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, \
- SYS_ISSETUGID = 253 // { int issetugid(void); }
- SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
- SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
- SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
- SYS_EXTPREADV = 289 // { ssize_t extpreadv(int fd, struct iovec *iovp, \
- SYS_EXTPWRITEV = 290 // { ssize_t extpwritev(int fd, struct iovec *iovp,\
- SYS_FHSTATFS = 297 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
- SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
- SYS_MODNEXT = 300 // { int modnext(int modid); }
- SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat* stat); }
- SYS_MODFNEXT = 302 // { int modfnext(int modid); }
- SYS_MODFIND = 303 // { int modfind(const char *name); }
- SYS_KLDLOAD = 304 // { int kldload(const char *file); }
- SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
- SYS_KLDFIND = 306 // { int kldfind(const char *file); }
- SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
- SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); }
- SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
- SYS_GETSID = 310 // { int getsid(pid_t pid); }
- SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
- SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
- SYS_AIO_RETURN = 314 // { int aio_return(struct aiocb *aiocbp); }
- SYS_AIO_SUSPEND = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
- SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
- SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); }
- SYS_AIO_READ = 318 // { int aio_read(struct aiocb *aiocbp); }
- SYS_AIO_WRITE = 319 // { int aio_write(struct aiocb *aiocbp); }
- SYS_LIO_LISTIO = 320 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
- SYS_YIELD = 321 // { int yield(void); }
- SYS_MLOCKALL = 324 // { int mlockall(int how); }
- SYS_MUNLOCKALL = 325 // { int munlockall(void); }
- SYS___GETCWD = 326 // { int __getcwd(u_char *buf, u_int buflen); }
- SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
- SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
- SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
- SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
- SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
- SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
- SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
- SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
- SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
- SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, void *data); }
- SYS_JAIL = 338 // { int jail(struct jail *jail); }
- SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, const sigset_t *set, \
- SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
- SYS_SIGACTION = 342 // { int sigaction(int sig, const struct sigaction *act, \
- SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
- SYS_SIGRETURN = 344 // { int sigreturn(ucontext_t *sigcntxp); }
- SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set,\
- SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set,\
- SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
- SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
- SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, \
- SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, \
- SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
- SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }
- SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
- SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, \
- SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
- SYS_EXTATTR_SET_FILE = 356 // { int extattr_set_file(const char *path, \
- SYS_EXTATTR_GET_FILE = 357 // { int extattr_get_file(const char *path, \
- SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
- SYS_AIO_WAITCOMPLETE = 359 // { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
- SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
- SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
- SYS_KQUEUE = 362 // { int kqueue(void); }
- SYS_KEVENT = 363 // { int kevent(int fd, \
- SYS_SCTP_PEELOFF = 364 // { int sctp_peeloff(int sd, caddr_t name ); }
- SYS_LCHFLAGS = 391 // { int lchflags(char *path, int flags); }
- SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
- SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, \
- SYS_VARSYM_SET = 450 // { int varsym_set(int level, const char *name, const char *data); }
- SYS_VARSYM_GET = 451 // { int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
- SYS_VARSYM_LIST = 452 // { int varsym_list(int level, char *buf, int maxsize, int *marker); }
- SYS_EXEC_SYS_REGISTER = 465 // { int exec_sys_register(void *entry); }
- SYS_EXEC_SYS_UNREGISTER = 466 // { int exec_sys_unregister(int id); }
- SYS_SYS_CHECKPOINT = 467 // { int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
- SYS_MOUNTCTL = 468 // { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
- SYS_UMTX_SLEEP = 469 // { int umtx_sleep(volatile const int *ptr, int value, int timeout); }
- SYS_UMTX_WAKEUP = 470 // { int umtx_wakeup(volatile const int *ptr, int count); }
- SYS_JAIL_ATTACH = 471 // { int jail_attach(int jid); }
- SYS_SET_TLS_AREA = 472 // { int set_tls_area(int which, struct tls_info *info, size_t infosize); }
- SYS_GET_TLS_AREA = 473 // { int get_tls_area(int which, struct tls_info *info, size_t infosize); }
- SYS_CLOSEFROM = 474 // { int closefrom(int fd); }
- SYS_STAT = 475 // { int stat(const char *path, struct stat *ub); }
- SYS_FSTAT = 476 // { int fstat(int fd, struct stat *sb); }
- SYS_LSTAT = 477 // { int lstat(const char *path, struct stat *ub); }
- SYS_FHSTAT = 478 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
- SYS_GETDIRENTRIES = 479 // { int getdirentries(int fd, char *buf, u_int count, \
- SYS_GETDENTS = 480 // { int getdents(int fd, char *buf, size_t count); }
- SYS_USCHED_SET = 481 // { int usched_set(pid_t pid, int cmd, void *data, \
- SYS_EXTACCEPT = 482 // { int extaccept(int s, int flags, caddr_t name, int *anamelen); }
- SYS_EXTCONNECT = 483 // { int extconnect(int s, int flags, caddr_t name, int namelen); }
- SYS_MCONTROL = 485 // { int mcontrol(void *addr, size_t len, int behav, off_t value); }
- SYS_VMSPACE_CREATE = 486 // { int vmspace_create(void *id, int type, void *data); }
- SYS_VMSPACE_DESTROY = 487 // { int vmspace_destroy(void *id); }
- SYS_VMSPACE_CTL = 488 // { int vmspace_ctl(void *id, int cmd, \
- SYS_VMSPACE_MMAP = 489 // { int vmspace_mmap(void *id, void *addr, size_t len, \
- SYS_VMSPACE_MUNMAP = 490 // { int vmspace_munmap(void *id, void *addr, \
- SYS_VMSPACE_MCONTROL = 491 // { int vmspace_mcontrol(void *id, void *addr, \
- SYS_VMSPACE_PREAD = 492 // { ssize_t vmspace_pread(void *id, void *buf, \
- SYS_VMSPACE_PWRITE = 493 // { ssize_t vmspace_pwrite(void *id, const void *buf, \
- SYS_EXTEXIT = 494 // { void extexit(int how, int status, void *addr); }
- SYS_LWP_CREATE = 495 // { int lwp_create(struct lwp_params *params); }
- SYS_LWP_GETTID = 496 // { lwpid_t lwp_gettid(void); }
- SYS_LWP_KILL = 497 // { int lwp_kill(pid_t pid, lwpid_t tid, int signum); }
- SYS_LWP_RTPRIO = 498 // { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }
- SYS_PSELECT = 499 // { int pselect(int nd, fd_set *in, fd_set *ou, \
- SYS_STATVFS = 500 // { int statvfs(const char *path, struct statvfs *buf); }
- SYS_FSTATVFS = 501 // { int fstatvfs(int fd, struct statvfs *buf); }
- SYS_FHSTATVFS = 502 // { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); }
- SYS_GETVFSSTAT = 503 // { int getvfsstat(struct statfs *buf, \
- SYS_OPENAT = 504 // { int openat(int fd, char *path, int flags, int mode); }
- SYS_FSTATAT = 505 // { int fstatat(int fd, char *path, \
- SYS_FCHMODAT = 506 // { int fchmodat(int fd, char *path, int mode, \
- SYS_FCHOWNAT = 507 // { int fchownat(int fd, char *path, int uid, int gid, \
- SYS_UNLINKAT = 508 // { int unlinkat(int fd, char *path, int flags); }
- SYS_FACCESSAT = 509 // { int faccessat(int fd, char *path, int amode, \
- SYS_MQ_OPEN = 510 // { mqd_t mq_open(const char * name, int oflag, \
- SYS_MQ_CLOSE = 511 // { int mq_close(mqd_t mqdes); }
- SYS_MQ_UNLINK = 512 // { int mq_unlink(const char *name); }
- SYS_MQ_GETATTR = 513 // { int mq_getattr(mqd_t mqdes, \
- SYS_MQ_SETATTR = 514 // { int mq_setattr(mqd_t mqdes, \
- SYS_MQ_NOTIFY = 515 // { int mq_notify(mqd_t mqdes, \
- SYS_MQ_SEND = 516 // { int mq_send(mqd_t mqdes, const char *msg_ptr, \
- SYS_MQ_RECEIVE = 517 // { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \
- SYS_MQ_TIMEDSEND = 518 // { int mq_timedsend(mqd_t mqdes, \
- SYS_MQ_TIMEDRECEIVE = 519 // { ssize_t mq_timedreceive(mqd_t mqdes, \
- SYS_IOPRIO_SET = 520 // { int ioprio_set(int which, int who, int prio); }
- SYS_IOPRIO_GET = 521 // { int ioprio_get(int which, int who); }
- SYS_CHROOT_KERNEL = 522 // { int chroot_kernel(char *path); }
- SYS_RENAMEAT = 523 // { int renameat(int oldfd, char *old, int newfd, \
- SYS_MKDIRAT = 524 // { int mkdirat(int fd, char *path, mode_t mode); }
- SYS_MKFIFOAT = 525 // { int mkfifoat(int fd, char *path, mode_t mode); }
- SYS_MKNODAT = 526 // { int mknodat(int fd, char *path, mode_t mode, \
- SYS_READLINKAT = 527 // { int readlinkat(int fd, char *path, char *buf, \
- SYS_SYMLINKAT = 528 // { int symlinkat(char *path1, int fd, char *path2); }
- SYS_SWAPOFF = 529 // { int swapoff(char *name); }
- SYS_VQUOTACTL = 530 // { int vquotactl(const char *path, \
- SYS_LINKAT = 531 // { int linkat(int fd1, char *path1, int fd2, \
- SYS_EACCESS = 532 // { int eaccess(char *path, int flags); }
- SYS_LPATHCONF = 533 // { int lpathconf(char *path, int name); }
- SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
- SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }
-)
diff --git a/src/pkg/syscall/zsysnum_dragonfly_amd64.go b/src/pkg/syscall/zsysnum_dragonfly_amd64.go
deleted file mode 100644
index 4b086b921..000000000
--- a/src/pkg/syscall/zsysnum_dragonfly_amd64.go
+++ /dev/null
@@ -1,302 +0,0 @@
-// mksysnum_dragonfly.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
- // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
- SYS_EXIT = 1 // { void exit(int rval); }
- SYS_FORK = 2 // { int fork(void); }
- SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); }
- SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); }
- SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
- SYS_CLOSE = 6 // { int close(int fd); }
- SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, \
- SYS_LINK = 9 // { int link(char *path, char *link); }
- SYS_UNLINK = 10 // { int unlink(char *path); }
- SYS_CHDIR = 12 // { int chdir(char *path); }
- SYS_FCHDIR = 13 // { int fchdir(int fd); }
- SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
- SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
- SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
- SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
- SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, \
- SYS_GETPID = 20 // { pid_t getpid(void); }
- SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, \
- SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
- SYS_SETUID = 23 // { int setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t getuid(void); }
- SYS_GETEUID = 25 // { uid_t geteuid(void); }
- SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, \
- SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); }
- SYS_SENDMSG = 28 // { int sendmsg(int s, caddr_t msg, int flags); }
- SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, \
- SYS_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); }
- SYS_GETPEERNAME = 31 // { int getpeername(int fdes, caddr_t asa, int *alen); }
- SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, caddr_t asa, int *alen); }
- SYS_ACCESS = 33 // { int access(char *path, int flags); }
- SYS_CHFLAGS = 34 // { int chflags(char *path, int flags); }
- SYS_FCHFLAGS = 35 // { int fchflags(int fd, int flags); }
- SYS_SYNC = 36 // { int sync(void); }
- SYS_KILL = 37 // { int kill(int pid, int signum); }
- SYS_GETPPID = 39 // { pid_t getppid(void); }
- SYS_DUP = 41 // { int dup(u_int fd); }
- SYS_PIPE = 42 // { int pipe(void); }
- SYS_GETEGID = 43 // { gid_t getegid(void); }
- SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
- SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, \
- SYS_GETGID = 47 // { gid_t getgid(void); }
- SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); }
- SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
- SYS_ACCT = 51 // { int acct(char *path); }
- SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); }
- SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); }
- SYS_REBOOT = 55 // { int reboot(int opt); }
- SYS_REVOKE = 56 // { int revoke(char *path); }
- SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
- SYS_READLINK = 58 // { int readlink(char *path, char *buf, int count); }
- SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
- SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
- SYS_CHROOT = 61 // { int chroot(char *path); }
- SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
- SYS_VFORK = 66 // { pid_t vfork(void); }
- SYS_SBRK = 69 // { int sbrk(int incr); }
- SYS_SSTK = 70 // { int sstk(int incr); }
- SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); }
- SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
- SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
- SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
- SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); }
- SYS_GETPGRP = 81 // { int getpgrp(void); }
- SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
- SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, \
- SYS_SWAPON = 85 // { int swapon(char *name); }
- SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); }
- SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
- SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
- SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
- SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
- SYS_FSYNC = 95 // { int fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); }
- SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); }
- SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); }
- SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
- SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); }
- SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
- SYS_LISTEN = 106 // { int listen(int s, int backlog); }
- SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
- SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); }
- SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
- SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
- SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
- SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
- SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
- SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
- SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
- SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
- SYS_RENAME = 128 // { int rename(char *from, char *to); }
- SYS_FLOCK = 131 // { int flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
- SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
- SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, \
- SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
- SYS_RMDIR = 137 // { int rmdir(char *path); }
- SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); }
- SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
- SYS_SETSID = 147 // { int setsid(void); }
- SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
- SYS_STATFS = 157 // { int statfs(char *path, struct statfs *buf); }
- SYS_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); }
- SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); }
- SYS_GETDOMAINNAME = 162 // { int getdomainname(char *domainname, int len); }
- SYS_SETDOMAINNAME = 163 // { int setdomainname(char *domainname, int len); }
- SYS_UNAME = 164 // { int uname(struct utsname *name); }
- SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
- SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
- SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, \
- SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, \
- SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
- SYS_SETGID = 181 // { int setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
- SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
- SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
- SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
- SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
- SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, \
- // SYS_NOSYS = 198; // { int nosys(void); } __syscall __syscall_args int
- SYS_LSEEK = 199 // { off_t lseek(int fd, int pad, off_t offset, \
- SYS_TRUNCATE = 200 // { int truncate(char *path, int pad, off_t length); }
- SYS_FTRUNCATE = 201 // { int ftruncate(int fd, int pad, off_t length); }
- SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, \
- SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
- SYS_UNDELETE = 205 // { int undelete(char *path); }
- SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
- SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
- SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
- SYS___SEMCTL = 220 // { int __semctl(int semid, int semnum, int cmd, \
- SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); }
- SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, \
- SYS_MSGCTL = 224 // { int msgctl(int msqid, int cmd, \
- SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); }
- SYS_MSGSND = 226 // { int msgsnd(int msqid, void *msgp, size_t msgsz, \
- SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, \
- SYS_SHMAT = 228 // { caddr_t shmat(int shmid, const void *shmaddr, \
- SYS_SHMCTL = 229 // { int shmctl(int shmid, int cmd, \
- SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); }
- SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); }
- SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
- SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, \
- SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
- SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
- SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); }
- SYS_RFORK = 251 // { int rfork(int flags); }
- SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, \
- SYS_ISSETUGID = 253 // { int issetugid(void); }
- SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
- SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
- SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
- SYS_EXTPREADV = 289 // { ssize_t extpreadv(int fd, struct iovec *iovp, \
- SYS_EXTPWRITEV = 290 // { ssize_t extpwritev(int fd, struct iovec *iovp,\
- SYS_FHSTATFS = 297 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
- SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
- SYS_MODNEXT = 300 // { int modnext(int modid); }
- SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat* stat); }
- SYS_MODFNEXT = 302 // { int modfnext(int modid); }
- SYS_MODFIND = 303 // { int modfind(const char *name); }
- SYS_KLDLOAD = 304 // { int kldload(const char *file); }
- SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
- SYS_KLDFIND = 306 // { int kldfind(const char *file); }
- SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
- SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); }
- SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
- SYS_GETSID = 310 // { int getsid(pid_t pid); }
- SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
- SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
- SYS_AIO_RETURN = 314 // { int aio_return(struct aiocb *aiocbp); }
- SYS_AIO_SUSPEND = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
- SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
- SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); }
- SYS_AIO_READ = 318 // { int aio_read(struct aiocb *aiocbp); }
- SYS_AIO_WRITE = 319 // { int aio_write(struct aiocb *aiocbp); }
- SYS_LIO_LISTIO = 320 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
- SYS_YIELD = 321 // { int yield(void); }
- SYS_MLOCKALL = 324 // { int mlockall(int how); }
- SYS_MUNLOCKALL = 325 // { int munlockall(void); }
- SYS___GETCWD = 326 // { int __getcwd(u_char *buf, u_int buflen); }
- SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
- SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
- SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
- SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
- SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
- SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
- SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
- SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
- SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
- SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, void *data); }
- SYS_JAIL = 338 // { int jail(struct jail *jail); }
- SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, const sigset_t *set, \
- SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
- SYS_SIGACTION = 342 // { int sigaction(int sig, const struct sigaction *act, \
- SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
- SYS_SIGRETURN = 344 // { int sigreturn(ucontext_t *sigcntxp); }
- SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set,\
- SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set,\
- SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
- SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
- SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, \
- SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, \
- SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
- SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }
- SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
- SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, \
- SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
- SYS_EXTATTR_SET_FILE = 356 // { int extattr_set_file(const char *path, \
- SYS_EXTATTR_GET_FILE = 357 // { int extattr_get_file(const char *path, \
- SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
- SYS_AIO_WAITCOMPLETE = 359 // { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
- SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
- SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
- SYS_KQUEUE = 362 // { int kqueue(void); }
- SYS_KEVENT = 363 // { int kevent(int fd, \
- SYS_SCTP_PEELOFF = 364 // { int sctp_peeloff(int sd, caddr_t name ); }
- SYS_LCHFLAGS = 391 // { int lchflags(char *path, int flags); }
- SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
- SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, \
- SYS_VARSYM_SET = 450 // { int varsym_set(int level, const char *name, const char *data); }
- SYS_VARSYM_GET = 451 // { int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
- SYS_VARSYM_LIST = 452 // { int varsym_list(int level, char *buf, int maxsize, int *marker); }
- SYS_EXEC_SYS_REGISTER = 465 // { int exec_sys_register(void *entry); }
- SYS_EXEC_SYS_UNREGISTER = 466 // { int exec_sys_unregister(int id); }
- SYS_SYS_CHECKPOINT = 467 // { int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
- SYS_MOUNTCTL = 468 // { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
- SYS_UMTX_SLEEP = 469 // { int umtx_sleep(volatile const int *ptr, int value, int timeout); }
- SYS_UMTX_WAKEUP = 470 // { int umtx_wakeup(volatile const int *ptr, int count); }
- SYS_JAIL_ATTACH = 471 // { int jail_attach(int jid); }
- SYS_SET_TLS_AREA = 472 // { int set_tls_area(int which, struct tls_info *info, size_t infosize); }
- SYS_GET_TLS_AREA = 473 // { int get_tls_area(int which, struct tls_info *info, size_t infosize); }
- SYS_CLOSEFROM = 474 // { int closefrom(int fd); }
- SYS_STAT = 475 // { int stat(const char *path, struct stat *ub); }
- SYS_FSTAT = 476 // { int fstat(int fd, struct stat *sb); }
- SYS_LSTAT = 477 // { int lstat(const char *path, struct stat *ub); }
- SYS_FHSTAT = 478 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
- SYS_GETDIRENTRIES = 479 // { int getdirentries(int fd, char *buf, u_int count, \
- SYS_GETDENTS = 480 // { int getdents(int fd, char *buf, size_t count); }
- SYS_USCHED_SET = 481 // { int usched_set(pid_t pid, int cmd, void *data, \
- SYS_EXTACCEPT = 482 // { int extaccept(int s, int flags, caddr_t name, int *anamelen); }
- SYS_EXTCONNECT = 483 // { int extconnect(int s, int flags, caddr_t name, int namelen); }
- SYS_MCONTROL = 485 // { int mcontrol(void *addr, size_t len, int behav, off_t value); }
- SYS_VMSPACE_CREATE = 486 // { int vmspace_create(void *id, int type, void *data); }
- SYS_VMSPACE_DESTROY = 487 // { int vmspace_destroy(void *id); }
- SYS_VMSPACE_CTL = 488 // { int vmspace_ctl(void *id, int cmd, \
- SYS_VMSPACE_MMAP = 489 // { int vmspace_mmap(void *id, void *addr, size_t len, \
- SYS_VMSPACE_MUNMAP = 490 // { int vmspace_munmap(void *id, void *addr, \
- SYS_VMSPACE_MCONTROL = 491 // { int vmspace_mcontrol(void *id, void *addr, \
- SYS_VMSPACE_PREAD = 492 // { ssize_t vmspace_pread(void *id, void *buf, \
- SYS_VMSPACE_PWRITE = 493 // { ssize_t vmspace_pwrite(void *id, const void *buf, \
- SYS_EXTEXIT = 494 // { void extexit(int how, int status, void *addr); }
- SYS_LWP_CREATE = 495 // { int lwp_create(struct lwp_params *params); }
- SYS_LWP_GETTID = 496 // { lwpid_t lwp_gettid(void); }
- SYS_LWP_KILL = 497 // { int lwp_kill(pid_t pid, lwpid_t tid, int signum); }
- SYS_LWP_RTPRIO = 498 // { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }
- SYS_PSELECT = 499 // { int pselect(int nd, fd_set *in, fd_set *ou, \
- SYS_STATVFS = 500 // { int statvfs(const char *path, struct statvfs *buf); }
- SYS_FSTATVFS = 501 // { int fstatvfs(int fd, struct statvfs *buf); }
- SYS_FHSTATVFS = 502 // { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); }
- SYS_GETVFSSTAT = 503 // { int getvfsstat(struct statfs *buf, \
- SYS_OPENAT = 504 // { int openat(int fd, char *path, int flags, int mode); }
- SYS_FSTATAT = 505 // { int fstatat(int fd, char *path, \
- SYS_FCHMODAT = 506 // { int fchmodat(int fd, char *path, int mode, \
- SYS_FCHOWNAT = 507 // { int fchownat(int fd, char *path, int uid, int gid, \
- SYS_UNLINKAT = 508 // { int unlinkat(int fd, char *path, int flags); }
- SYS_FACCESSAT = 509 // { int faccessat(int fd, char *path, int amode, \
- SYS_MQ_OPEN = 510 // { mqd_t mq_open(const char * name, int oflag, \
- SYS_MQ_CLOSE = 511 // { int mq_close(mqd_t mqdes); }
- SYS_MQ_UNLINK = 512 // { int mq_unlink(const char *name); }
- SYS_MQ_GETATTR = 513 // { int mq_getattr(mqd_t mqdes, \
- SYS_MQ_SETATTR = 514 // { int mq_setattr(mqd_t mqdes, \
- SYS_MQ_NOTIFY = 515 // { int mq_notify(mqd_t mqdes, \
- SYS_MQ_SEND = 516 // { int mq_send(mqd_t mqdes, const char *msg_ptr, \
- SYS_MQ_RECEIVE = 517 // { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \
- SYS_MQ_TIMEDSEND = 518 // { int mq_timedsend(mqd_t mqdes, \
- SYS_MQ_TIMEDRECEIVE = 519 // { ssize_t mq_timedreceive(mqd_t mqdes, \
- SYS_IOPRIO_SET = 520 // { int ioprio_set(int which, int who, int prio); }
- SYS_IOPRIO_GET = 521 // { int ioprio_get(int which, int who); }
- SYS_CHROOT_KERNEL = 522 // { int chroot_kernel(char *path); }
- SYS_RENAMEAT = 523 // { int renameat(int oldfd, char *old, int newfd, \
- SYS_MKDIRAT = 524 // { int mkdirat(int fd, char *path, mode_t mode); }
- SYS_MKFIFOAT = 525 // { int mkfifoat(int fd, char *path, mode_t mode); }
- SYS_MKNODAT = 526 // { int mknodat(int fd, char *path, mode_t mode, \
- SYS_READLINKAT = 527 // { int readlinkat(int fd, char *path, char *buf, \
- SYS_SYMLINKAT = 528 // { int symlinkat(char *path1, int fd, char *path2); }
- SYS_SWAPOFF = 529 // { int swapoff(char *name); }
- SYS_VQUOTACTL = 530 // { int vquotactl(const char *path, \
- SYS_LINKAT = 531 // { int linkat(int fd1, char *path1, int fd2, \
- SYS_EACCESS = 532 // { int eaccess(char *path, int flags); }
- SYS_LPATHCONF = 533 // { int lpathconf(char *path, int name); }
- SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
- SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }
-)
diff --git a/src/pkg/syscall/zsysnum_freebsd_386.go b/src/pkg/syscall/zsysnum_freebsd_386.go
deleted file mode 100644
index dfca558bb..000000000
--- a/src/pkg/syscall/zsysnum_freebsd_386.go
+++ /dev/null
@@ -1,348 +0,0 @@
-// mksysnum_freebsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
- // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
- SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
- SYS_FORK = 2 // { int fork(void); }
- SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
- SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
- SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
- SYS_CLOSE = 6 // { int close(int fd); }
- SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
- SYS_LINK = 9 // { int link(char *path, char *link); }
- SYS_UNLINK = 10 // { int unlink(char *path); }
- SYS_CHDIR = 12 // { int chdir(char *path); }
- SYS_FCHDIR = 13 // { int fchdir(int fd); }
- SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
- SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
- SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
- SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
- SYS_GETPID = 20 // { pid_t getpid(void); }
- SYS_MOUNT = 21 // { int mount(char *type, char *path, \
- SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
- SYS_SETUID = 23 // { int setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t getuid(void); }
- SYS_GETEUID = 25 // { uid_t geteuid(void); }
- SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
- SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
- SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
- SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
- SYS_ACCEPT = 30 // { int accept(int s, \
- SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
- SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
- SYS_ACCESS = 33 // { int access(char *path, int amode); }
- SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
- SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
- SYS_SYNC = 36 // { int sync(void); }
- SYS_KILL = 37 // { int kill(int pid, int signum); }
- SYS_GETPPID = 39 // { pid_t getppid(void); }
- SYS_DUP = 41 // { int dup(u_int fd); }
- SYS_PIPE = 42 // { int pipe(void); }
- SYS_GETEGID = 43 // { gid_t getegid(void); }
- SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
- SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
- SYS_GETGID = 47 // { gid_t getgid(void); }
- SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
- SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
- SYS_ACCT = 51 // { int acct(char *path); }
- SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
- SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
- SYS_REBOOT = 55 // { int reboot(int opt); }
- SYS_REVOKE = 56 // { int revoke(char *path); }
- SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
- SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
- SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
- SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
- SYS_CHROOT = 61 // { int chroot(char *path); }
- SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
- SYS_VFORK = 66 // { int vfork(void); }
- SYS_SBRK = 69 // { int sbrk(int incr); }
- SYS_SSTK = 70 // { int sstk(int incr); }
- SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
- SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
- SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
- SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
- SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
- SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
- SYS_GETPGRP = 81 // { int getpgrp(void); }
- SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
- SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
- SYS_SWAPON = 85 // { int swapon(char *name); }
- SYS_GETITIMER = 86 // { int getitimer(u_int which, \
- SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
- SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
- SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
- SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
- SYS_FSYNC = 95 // { int fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
- SYS_SOCKET = 97 // { int socket(int domain, int type, \
- SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
- SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
- SYS_BIND = 104 // { int bind(int s, caddr_t name, \
- SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
- SYS_LISTEN = 106 // { int listen(int s, int backlog); }
- SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
- SYS_GETRUSAGE = 117 // { int getrusage(int who, \
- SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
- SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
- SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
- SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
- SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
- SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
- SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
- SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
- SYS_RENAME = 128 // { int rename(char *from, char *to); }
- SYS_FLOCK = 131 // { int flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
- SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
- SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
- SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
- SYS_RMDIR = 137 // { int rmdir(char *path); }
- SYS_UTIMES = 138 // { int utimes(char *path, \
- SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
- SYS_SETSID = 147 // { int setsid(void); }
- SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
- SYS_LGETFH = 160 // { int lgetfh(char *fname, \
- SYS_GETFH = 161 // { int getfh(char *fname, \
- SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
- SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
- SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \
- SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \
- SYS_SETFIB = 175 // { int setfib(int fibnum); }
- SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
- SYS_SETGID = 181 // { int setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
- SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
- SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
- SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
- SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
- SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
- SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
- SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
- SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
- SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \
- SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \
- SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \
- SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \
- SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
- SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
- SYS_UNDELETE = 205 // { int undelete(char *path); }
- SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
- SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
- SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
- SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
- SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
- SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
- SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
- SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
- SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
- SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
- SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
- SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
- SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
- SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
- SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
- SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
- SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
- SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
- SYS_RFORK = 251 // { int rfork(int flags); }
- SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
- SYS_ISSETUGID = 253 // { int issetugid(void); }
- SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
- SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
- SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
- SYS_LUTIMES = 276 // { int lutimes(char *path, \
- SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
- SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
- SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
- SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
- SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
- SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
- SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
- SYS_MODNEXT = 300 // { int modnext(int modid); }
- SYS_MODSTAT = 301 // { int modstat(int modid, \
- SYS_MODFNEXT = 302 // { int modfnext(int modid); }
- SYS_MODFIND = 303 // { int modfind(const char *name); }
- SYS_KLDLOAD = 304 // { int kldload(const char *file); }
- SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
- SYS_KLDFIND = 306 // { int kldfind(const char *file); }
- SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
- SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
- SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
- SYS_GETSID = 310 // { int getsid(pid_t pid); }
- SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
- SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
- SYS_YIELD = 321 // { int yield(void); }
- SYS_MLOCKALL = 324 // { int mlockall(int how); }
- SYS_MUNLOCKALL = 325 // { int munlockall(void); }
- SYS___GETCWD = 326 // { int __getcwd(u_char *buf, u_int buflen); }
- SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
- SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
- SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
- SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
- SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
- SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
- SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
- SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
- SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
- SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
- SYS_JAIL = 338 // { int jail(struct jail *jail); }
- SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
- SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
- SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
- SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
- SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
- SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
- SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
- SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
- SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
- SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
- SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
- SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
- SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
- SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
- SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
- SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
- SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
- SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
- SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
- SYS_KQUEUE = 362 // { int kqueue(void); }
- SYS_KEVENT = 363 // { int kevent(int fd, \
- SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
- SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
- SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
- SYS___SETUGID = 374 // { int __setugid(int flag); }
- SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
- SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
- SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
- SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
- SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
- SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
- SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
- SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
- SYS_KENV = 390 // { int kenv(int what, const char *name, \
- SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
- SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
- SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
- SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
- SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
- SYS_STATFS = 396 // { int statfs(char *path, \
- SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
- SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
- SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
- SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
- SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
- SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
- SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
- SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
- SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
- SYS_SIGACTION = 416 // { int sigaction(int sig, \
- SYS_SIGRETURN = 417 // { int sigreturn( \
- SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
- SYS_SETCONTEXT = 422 // { int setcontext( \
- SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
- SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
- SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
- SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
- SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
- SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
- SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
- SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
- SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
- SYS_THR_SELF = 432 // { int thr_self(long *id); }
- SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
- SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
- SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
- SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
- SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
- SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
- SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
- SYS_THR_SUSPEND = 442 // { int thr_suspend( \
- SYS_THR_WAKE = 443 // { int thr_wake(long id); }
- SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
- SYS_AUDIT = 445 // { int audit(const void *record, \
- SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
- SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
- SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
- SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
- SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
- SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
- SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
- SYS_AUDITCTL = 453 // { int auditctl(char *path); }
- SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
- SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
- SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
- SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
- SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
- SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
- SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
- SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \
- SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \
- SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \
- SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
- SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
- SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
- SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
- SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
- SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
- SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
- SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
- SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
- SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
- SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
- SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
- SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
- SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
- SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
- SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
- SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
- SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
- SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
- SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
- SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
- SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
- SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
- SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
- SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
- SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
- SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
- SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
- SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
- SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
- SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
- SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
- SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
- SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
- SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
- SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }
- SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \
- SYS_CAP_ENTER = 516 // { int cap_enter(void); }
- SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
- SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
- SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
- SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
- SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
- SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
- SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
- SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
- SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
- SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
- SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
- SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
- SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
- SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
- SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
- SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
- SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
- SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
- SYS_ACCEPT4 = 541 // { int accept4(int s, \
- SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
- SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
-)
diff --git a/src/pkg/syscall/zsysnum_freebsd_amd64.go b/src/pkg/syscall/zsysnum_freebsd_amd64.go
deleted file mode 100644
index dfca558bb..000000000
--- a/src/pkg/syscall/zsysnum_freebsd_amd64.go
+++ /dev/null
@@ -1,348 +0,0 @@
-// mksysnum_freebsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
- // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
- SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
- SYS_FORK = 2 // { int fork(void); }
- SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
- SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
- SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
- SYS_CLOSE = 6 // { int close(int fd); }
- SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
- SYS_LINK = 9 // { int link(char *path, char *link); }
- SYS_UNLINK = 10 // { int unlink(char *path); }
- SYS_CHDIR = 12 // { int chdir(char *path); }
- SYS_FCHDIR = 13 // { int fchdir(int fd); }
- SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
- SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
- SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
- SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
- SYS_GETPID = 20 // { pid_t getpid(void); }
- SYS_MOUNT = 21 // { int mount(char *type, char *path, \
- SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
- SYS_SETUID = 23 // { int setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t getuid(void); }
- SYS_GETEUID = 25 // { uid_t geteuid(void); }
- SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
- SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
- SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
- SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
- SYS_ACCEPT = 30 // { int accept(int s, \
- SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
- SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
- SYS_ACCESS = 33 // { int access(char *path, int amode); }
- SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
- SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
- SYS_SYNC = 36 // { int sync(void); }
- SYS_KILL = 37 // { int kill(int pid, int signum); }
- SYS_GETPPID = 39 // { pid_t getppid(void); }
- SYS_DUP = 41 // { int dup(u_int fd); }
- SYS_PIPE = 42 // { int pipe(void); }
- SYS_GETEGID = 43 // { gid_t getegid(void); }
- SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
- SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
- SYS_GETGID = 47 // { gid_t getgid(void); }
- SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
- SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
- SYS_ACCT = 51 // { int acct(char *path); }
- SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
- SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
- SYS_REBOOT = 55 // { int reboot(int opt); }
- SYS_REVOKE = 56 // { int revoke(char *path); }
- SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
- SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
- SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
- SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
- SYS_CHROOT = 61 // { int chroot(char *path); }
- SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
- SYS_VFORK = 66 // { int vfork(void); }
- SYS_SBRK = 69 // { int sbrk(int incr); }
- SYS_SSTK = 70 // { int sstk(int incr); }
- SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
- SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
- SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
- SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
- SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
- SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
- SYS_GETPGRP = 81 // { int getpgrp(void); }
- SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
- SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
- SYS_SWAPON = 85 // { int swapon(char *name); }
- SYS_GETITIMER = 86 // { int getitimer(u_int which, \
- SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
- SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
- SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
- SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
- SYS_FSYNC = 95 // { int fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
- SYS_SOCKET = 97 // { int socket(int domain, int type, \
- SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
- SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
- SYS_BIND = 104 // { int bind(int s, caddr_t name, \
- SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
- SYS_LISTEN = 106 // { int listen(int s, int backlog); }
- SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
- SYS_GETRUSAGE = 117 // { int getrusage(int who, \
- SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
- SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
- SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
- SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
- SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
- SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
- SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
- SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
- SYS_RENAME = 128 // { int rename(char *from, char *to); }
- SYS_FLOCK = 131 // { int flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
- SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
- SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
- SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
- SYS_RMDIR = 137 // { int rmdir(char *path); }
- SYS_UTIMES = 138 // { int utimes(char *path, \
- SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
- SYS_SETSID = 147 // { int setsid(void); }
- SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
- SYS_LGETFH = 160 // { int lgetfh(char *fname, \
- SYS_GETFH = 161 // { int getfh(char *fname, \
- SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
- SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
- SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \
- SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \
- SYS_SETFIB = 175 // { int setfib(int fibnum); }
- SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
- SYS_SETGID = 181 // { int setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
- SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
- SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
- SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
- SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
- SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
- SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
- SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
- SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
- SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \
- SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \
- SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \
- SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \
- SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
- SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
- SYS_UNDELETE = 205 // { int undelete(char *path); }
- SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
- SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
- SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
- SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
- SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
- SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
- SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
- SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
- SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
- SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
- SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
- SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
- SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
- SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
- SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
- SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
- SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
- SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
- SYS_RFORK = 251 // { int rfork(int flags); }
- SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
- SYS_ISSETUGID = 253 // { int issetugid(void); }
- SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
- SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
- SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
- SYS_LUTIMES = 276 // { int lutimes(char *path, \
- SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
- SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
- SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
- SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
- SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
- SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
- SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
- SYS_MODNEXT = 300 // { int modnext(int modid); }
- SYS_MODSTAT = 301 // { int modstat(int modid, \
- SYS_MODFNEXT = 302 // { int modfnext(int modid); }
- SYS_MODFIND = 303 // { int modfind(const char *name); }
- SYS_KLDLOAD = 304 // { int kldload(const char *file); }
- SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
- SYS_KLDFIND = 306 // { int kldfind(const char *file); }
- SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
- SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
- SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
- SYS_GETSID = 310 // { int getsid(pid_t pid); }
- SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
- SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
- SYS_YIELD = 321 // { int yield(void); }
- SYS_MLOCKALL = 324 // { int mlockall(int how); }
- SYS_MUNLOCKALL = 325 // { int munlockall(void); }
- SYS___GETCWD = 326 // { int __getcwd(u_char *buf, u_int buflen); }
- SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
- SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
- SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
- SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
- SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
- SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
- SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
- SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
- SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
- SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
- SYS_JAIL = 338 // { int jail(struct jail *jail); }
- SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
- SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
- SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
- SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
- SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
- SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
- SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
- SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
- SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
- SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
- SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
- SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
- SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
- SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
- SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
- SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
- SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
- SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
- SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
- SYS_KQUEUE = 362 // { int kqueue(void); }
- SYS_KEVENT = 363 // { int kevent(int fd, \
- SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
- SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
- SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
- SYS___SETUGID = 374 // { int __setugid(int flag); }
- SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
- SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
- SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
- SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
- SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
- SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
- SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
- SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
- SYS_KENV = 390 // { int kenv(int what, const char *name, \
- SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
- SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
- SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
- SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
- SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
- SYS_STATFS = 396 // { int statfs(char *path, \
- SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
- SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
- SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
- SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
- SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
- SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
- SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
- SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
- SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
- SYS_SIGACTION = 416 // { int sigaction(int sig, \
- SYS_SIGRETURN = 417 // { int sigreturn( \
- SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
- SYS_SETCONTEXT = 422 // { int setcontext( \
- SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
- SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
- SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
- SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
- SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
- SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
- SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
- SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
- SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
- SYS_THR_SELF = 432 // { int thr_self(long *id); }
- SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
- SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
- SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
- SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
- SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
- SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
- SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
- SYS_THR_SUSPEND = 442 // { int thr_suspend( \
- SYS_THR_WAKE = 443 // { int thr_wake(long id); }
- SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
- SYS_AUDIT = 445 // { int audit(const void *record, \
- SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
- SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
- SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
- SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
- SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
- SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
- SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
- SYS_AUDITCTL = 453 // { int auditctl(char *path); }
- SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
- SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
- SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
- SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
- SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
- SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
- SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
- SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \
- SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \
- SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \
- SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
- SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
- SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
- SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
- SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
- SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
- SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
- SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
- SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
- SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
- SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
- SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
- SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
- SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
- SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
- SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
- SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
- SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
- SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
- SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
- SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
- SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
- SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
- SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
- SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
- SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
- SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
- SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
- SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
- SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
- SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
- SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
- SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
- SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
- SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
- SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }
- SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \
- SYS_CAP_ENTER = 516 // { int cap_enter(void); }
- SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
- SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
- SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
- SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
- SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
- SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
- SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
- SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
- SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
- SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
- SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
- SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
- SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
- SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
- SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
- SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
- SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
- SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
- SYS_ACCEPT4 = 541 // { int accept4(int s, \
- SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
- SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
-)
diff --git a/src/pkg/syscall/zsysnum_freebsd_arm.go b/src/pkg/syscall/zsysnum_freebsd_arm.go
deleted file mode 100644
index dfca558bb..000000000
--- a/src/pkg/syscall/zsysnum_freebsd_arm.go
+++ /dev/null
@@ -1,348 +0,0 @@
-// mksysnum_freebsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
- // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
- SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
- SYS_FORK = 2 // { int fork(void); }
- SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
- SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
- SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
- SYS_CLOSE = 6 // { int close(int fd); }
- SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
- SYS_LINK = 9 // { int link(char *path, char *link); }
- SYS_UNLINK = 10 // { int unlink(char *path); }
- SYS_CHDIR = 12 // { int chdir(char *path); }
- SYS_FCHDIR = 13 // { int fchdir(int fd); }
- SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
- SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
- SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
- SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
- SYS_GETPID = 20 // { pid_t getpid(void); }
- SYS_MOUNT = 21 // { int mount(char *type, char *path, \
- SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
- SYS_SETUID = 23 // { int setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t getuid(void); }
- SYS_GETEUID = 25 // { uid_t geteuid(void); }
- SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
- SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
- SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
- SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
- SYS_ACCEPT = 30 // { int accept(int s, \
- SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
- SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
- SYS_ACCESS = 33 // { int access(char *path, int amode); }
- SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
- SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
- SYS_SYNC = 36 // { int sync(void); }
- SYS_KILL = 37 // { int kill(int pid, int signum); }
- SYS_GETPPID = 39 // { pid_t getppid(void); }
- SYS_DUP = 41 // { int dup(u_int fd); }
- SYS_PIPE = 42 // { int pipe(void); }
- SYS_GETEGID = 43 // { gid_t getegid(void); }
- SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
- SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
- SYS_GETGID = 47 // { gid_t getgid(void); }
- SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
- SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
- SYS_ACCT = 51 // { int acct(char *path); }
- SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
- SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
- SYS_REBOOT = 55 // { int reboot(int opt); }
- SYS_REVOKE = 56 // { int revoke(char *path); }
- SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
- SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
- SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
- SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
- SYS_CHROOT = 61 // { int chroot(char *path); }
- SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
- SYS_VFORK = 66 // { int vfork(void); }
- SYS_SBRK = 69 // { int sbrk(int incr); }
- SYS_SSTK = 70 // { int sstk(int incr); }
- SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
- SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
- SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
- SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
- SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
- SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
- SYS_GETPGRP = 81 // { int getpgrp(void); }
- SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
- SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
- SYS_SWAPON = 85 // { int swapon(char *name); }
- SYS_GETITIMER = 86 // { int getitimer(u_int which, \
- SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
- SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
- SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
- SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
- SYS_FSYNC = 95 // { int fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
- SYS_SOCKET = 97 // { int socket(int domain, int type, \
- SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
- SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
- SYS_BIND = 104 // { int bind(int s, caddr_t name, \
- SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
- SYS_LISTEN = 106 // { int listen(int s, int backlog); }
- SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
- SYS_GETRUSAGE = 117 // { int getrusage(int who, \
- SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
- SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
- SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
- SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
- SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
- SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
- SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
- SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
- SYS_RENAME = 128 // { int rename(char *from, char *to); }
- SYS_FLOCK = 131 // { int flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
- SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
- SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
- SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
- SYS_RMDIR = 137 // { int rmdir(char *path); }
- SYS_UTIMES = 138 // { int utimes(char *path, \
- SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
- SYS_SETSID = 147 // { int setsid(void); }
- SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
- SYS_LGETFH = 160 // { int lgetfh(char *fname, \
- SYS_GETFH = 161 // { int getfh(char *fname, \
- SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
- SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
- SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \
- SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \
- SYS_SETFIB = 175 // { int setfib(int fibnum); }
- SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
- SYS_SETGID = 181 // { int setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
- SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
- SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
- SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
- SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
- SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
- SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
- SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
- SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
- SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \
- SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \
- SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \
- SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \
- SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
- SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
- SYS_UNDELETE = 205 // { int undelete(char *path); }
- SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
- SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
- SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
- SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
- SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
- SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
- SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
- SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
- SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
- SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
- SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
- SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
- SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
- SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
- SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
- SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
- SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
- SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
- SYS_RFORK = 251 // { int rfork(int flags); }
- SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
- SYS_ISSETUGID = 253 // { int issetugid(void); }
- SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
- SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
- SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
- SYS_LUTIMES = 276 // { int lutimes(char *path, \
- SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
- SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
- SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
- SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
- SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
- SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
- SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
- SYS_MODNEXT = 300 // { int modnext(int modid); }
- SYS_MODSTAT = 301 // { int modstat(int modid, \
- SYS_MODFNEXT = 302 // { int modfnext(int modid); }
- SYS_MODFIND = 303 // { int modfind(const char *name); }
- SYS_KLDLOAD = 304 // { int kldload(const char *file); }
- SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
- SYS_KLDFIND = 306 // { int kldfind(const char *file); }
- SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
- SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
- SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
- SYS_GETSID = 310 // { int getsid(pid_t pid); }
- SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
- SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
- SYS_YIELD = 321 // { int yield(void); }
- SYS_MLOCKALL = 324 // { int mlockall(int how); }
- SYS_MUNLOCKALL = 325 // { int munlockall(void); }
- SYS___GETCWD = 326 // { int __getcwd(u_char *buf, u_int buflen); }
- SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
- SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
- SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
- SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
- SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
- SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
- SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
- SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
- SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
- SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
- SYS_JAIL = 338 // { int jail(struct jail *jail); }
- SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
- SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
- SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
- SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
- SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
- SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
- SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
- SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
- SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
- SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
- SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
- SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
- SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
- SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
- SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
- SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
- SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
- SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
- SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
- SYS_KQUEUE = 362 // { int kqueue(void); }
- SYS_KEVENT = 363 // { int kevent(int fd, \
- SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
- SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
- SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
- SYS___SETUGID = 374 // { int __setugid(int flag); }
- SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
- SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
- SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
- SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
- SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
- SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
- SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
- SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
- SYS_KENV = 390 // { int kenv(int what, const char *name, \
- SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
- SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
- SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
- SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
- SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
- SYS_STATFS = 396 // { int statfs(char *path, \
- SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
- SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
- SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
- SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
- SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
- SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
- SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
- SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
- SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
- SYS_SIGACTION = 416 // { int sigaction(int sig, \
- SYS_SIGRETURN = 417 // { int sigreturn( \
- SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
- SYS_SETCONTEXT = 422 // { int setcontext( \
- SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
- SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
- SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
- SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
- SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
- SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
- SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
- SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
- SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
- SYS_THR_SELF = 432 // { int thr_self(long *id); }
- SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
- SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
- SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
- SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
- SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
- SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
- SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
- SYS_THR_SUSPEND = 442 // { int thr_suspend( \
- SYS_THR_WAKE = 443 // { int thr_wake(long id); }
- SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
- SYS_AUDIT = 445 // { int audit(const void *record, \
- SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
- SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
- SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
- SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
- SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
- SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
- SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
- SYS_AUDITCTL = 453 // { int auditctl(char *path); }
- SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
- SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
- SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
- SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
- SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
- SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
- SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
- SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \
- SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \
- SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \
- SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
- SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
- SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
- SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
- SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
- SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
- SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
- SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
- SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
- SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
- SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
- SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
- SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
- SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
- SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
- SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
- SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
- SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
- SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
- SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
- SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
- SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
- SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
- SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
- SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
- SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
- SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
- SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
- SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
- SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
- SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
- SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
- SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
- SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
- SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
- SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }
- SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \
- SYS_CAP_ENTER = 516 // { int cap_enter(void); }
- SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
- SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
- SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
- SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
- SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
- SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
- SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
- SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
- SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
- SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
- SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
- SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
- SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
- SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
- SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
- SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
- SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
- SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
- SYS_ACCEPT4 = 541 // { int accept4(int s, \
- SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
- SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
-)
diff --git a/src/pkg/syscall/zsysnum_linux_386.go b/src/pkg/syscall/zsysnum_linux_386.go
deleted file mode 100644
index c40b5f1ac..000000000
--- a/src/pkg/syscall/zsysnum_linux_386.go
+++ /dev/null
@@ -1,345 +0,0 @@
-// mksysnum_linux.pl /usr/include/asm/unistd_32.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
- SYS_RESTART_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_WAITPID = 7
- SYS_CREAT = 8
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_EXECVE = 11
- SYS_CHDIR = 12
- SYS_TIME = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_LCHOWN = 16
- SYS_BREAK = 17
- SYS_OLDSTAT = 18
- SYS_LSEEK = 19
- SYS_GETPID = 20
- SYS_MOUNT = 21
- SYS_UMOUNT = 22
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_STIME = 25
- SYS_PTRACE = 26
- SYS_ALARM = 27
- SYS_OLDFSTAT = 28
- SYS_PAUSE = 29
- SYS_UTIME = 30
- SYS_STTY = 31
- SYS_GTTY = 32
- SYS_ACCESS = 33
- SYS_NICE = 34
- SYS_FTIME = 35
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_RENAME = 38
- SYS_MKDIR = 39
- SYS_RMDIR = 40
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_TIMES = 43
- SYS_PROF = 44
- SYS_BRK = 45
- SYS_SETGID = 46
- SYS_GETGID = 47
- SYS_SIGNAL = 48
- SYS_GETEUID = 49
- SYS_GETEGID = 50
- SYS_ACCT = 51
- SYS_UMOUNT2 = 52
- SYS_LOCK = 53
- SYS_IOCTL = 54
- SYS_FCNTL = 55
- SYS_MPX = 56
- SYS_SETPGID = 57
- SYS_ULIMIT = 58
- SYS_OLDOLDUNAME = 59
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_USTAT = 62
- SYS_DUP2 = 63
- SYS_GETPPID = 64
- SYS_GETPGRP = 65
- SYS_SETSID = 66
- SYS_SIGACTION = 67
- SYS_SGETMASK = 68
- SYS_SSETMASK = 69
- SYS_SETREUID = 70
- SYS_SETREGID = 71
- SYS_SIGSUSPEND = 72
- SYS_SIGPENDING = 73
- SYS_SETHOSTNAME = 74
- SYS_SETRLIMIT = 75
- SYS_GETRLIMIT = 76
- SYS_GETRUSAGE = 77
- SYS_GETTIMEOFDAY = 78
- SYS_SETTIMEOFDAY = 79
- SYS_GETGROUPS = 80
- SYS_SETGROUPS = 81
- SYS_SELECT = 82
- SYS_SYMLINK = 83
- SYS_OLDLSTAT = 84
- SYS_READLINK = 85
- SYS_USELIB = 86
- SYS_SWAPON = 87
- SYS_REBOOT = 88
- SYS_READDIR = 89
- SYS_MMAP = 90
- SYS_MUNMAP = 91
- SYS_TRUNCATE = 92
- SYS_FTRUNCATE = 93
- SYS_FCHMOD = 94
- SYS_FCHOWN = 95
- SYS_GETPRIORITY = 96
- SYS_SETPRIORITY = 97
- SYS_PROFIL = 98
- SYS_STATFS = 99
- SYS_FSTATFS = 100
- SYS_IOPERM = 101
- SYS_SOCKETCALL = 102
- SYS_SYSLOG = 103
- SYS_SETITIMER = 104
- SYS_GETITIMER = 105
- SYS_STAT = 106
- SYS_LSTAT = 107
- SYS_FSTAT = 108
- SYS_OLDUNAME = 109
- SYS_IOPL = 110
- SYS_VHANGUP = 111
- SYS_IDLE = 112
- SYS_VM86OLD = 113
- SYS_WAIT4 = 114
- SYS_SWAPOFF = 115
- SYS_SYSINFO = 116
- SYS_IPC = 117
- SYS_FSYNC = 118
- SYS_SIGRETURN = 119
- SYS_CLONE = 120
- SYS_SETDOMAINNAME = 121
- SYS_UNAME = 122
- SYS_MODIFY_LDT = 123
- SYS_ADJTIMEX = 124
- SYS_MPROTECT = 125
- SYS_SIGPROCMASK = 126
- SYS_CREATE_MODULE = 127
- SYS_INIT_MODULE = 128
- SYS_DELETE_MODULE = 129
- SYS_GET_KERNEL_SYMS = 130
- SYS_QUOTACTL = 131
- SYS_GETPGID = 132
- SYS_FCHDIR = 133
- SYS_BDFLUSH = 134
- SYS_SYSFS = 135
- SYS_PERSONALITY = 136
- SYS_AFS_SYSCALL = 137
- SYS_SETFSUID = 138
- SYS_SETFSGID = 139
- SYS__LLSEEK = 140
- SYS_GETDENTS = 141
- SYS__NEWSELECT = 142
- SYS_FLOCK = 143
- SYS_MSYNC = 144
- SYS_READV = 145
- SYS_WRITEV = 146
- SYS_GETSID = 147
- SYS_FDATASYNC = 148
- SYS__SYSCTL = 149
- SYS_MLOCK = 150
- SYS_MUNLOCK = 151
- SYS_MLOCKALL = 152
- SYS_MUNLOCKALL = 153
- SYS_SCHED_SETPARAM = 154
- SYS_SCHED_GETPARAM = 155
- SYS_SCHED_SETSCHEDULER = 156
- SYS_SCHED_GETSCHEDULER = 157
- SYS_SCHED_YIELD = 158
- SYS_SCHED_GET_PRIORITY_MAX = 159
- SYS_SCHED_GET_PRIORITY_MIN = 160
- SYS_SCHED_RR_GET_INTERVAL = 161
- SYS_NANOSLEEP = 162
- SYS_MREMAP = 163
- SYS_SETRESUID = 164
- SYS_GETRESUID = 165
- SYS_VM86 = 166
- SYS_QUERY_MODULE = 167
- SYS_POLL = 168
- SYS_NFSSERVCTL = 169
- SYS_SETRESGID = 170
- SYS_GETRESGID = 171
- SYS_PRCTL = 172
- SYS_RT_SIGRETURN = 173
- SYS_RT_SIGACTION = 174
- SYS_RT_SIGPROCMASK = 175
- SYS_RT_SIGPENDING = 176
- SYS_RT_SIGTIMEDWAIT = 177
- SYS_RT_SIGQUEUEINFO = 178
- SYS_RT_SIGSUSPEND = 179
- SYS_PREAD64 = 180
- SYS_PWRITE64 = 181
- SYS_CHOWN = 182
- SYS_GETCWD = 183
- SYS_CAPGET = 184
- SYS_CAPSET = 185
- SYS_SIGALTSTACK = 186
- SYS_SENDFILE = 187
- SYS_GETPMSG = 188
- SYS_PUTPMSG = 189
- SYS_VFORK = 190
- SYS_UGETRLIMIT = 191
- SYS_MMAP2 = 192
- SYS_TRUNCATE64 = 193
- SYS_FTRUNCATE64 = 194
- SYS_STAT64 = 195
- SYS_LSTAT64 = 196
- SYS_FSTAT64 = 197
- SYS_LCHOWN32 = 198
- SYS_GETUID32 = 199
- SYS_GETGID32 = 200
- SYS_GETEUID32 = 201
- SYS_GETEGID32 = 202
- SYS_SETREUID32 = 203
- SYS_SETREGID32 = 204
- SYS_GETGROUPS32 = 205
- SYS_SETGROUPS32 = 206
- SYS_FCHOWN32 = 207
- SYS_SETRESUID32 = 208
- SYS_GETRESUID32 = 209
- SYS_SETRESGID32 = 210
- SYS_GETRESGID32 = 211
- SYS_CHOWN32 = 212
- SYS_SETUID32 = 213
- SYS_SETGID32 = 214
- SYS_SETFSUID32 = 215
- SYS_SETFSGID32 = 216
- SYS_PIVOT_ROOT = 217
- SYS_MINCORE = 218
- SYS_MADVISE = 219
- SYS_MADVISE1 = 219
- SYS_GETDENTS64 = 220
- SYS_FCNTL64 = 221
- SYS_GETTID = 224
- SYS_READAHEAD = 225
- SYS_SETXATTR = 226
- SYS_LSETXATTR = 227
- SYS_FSETXATTR = 228
- SYS_GETXATTR = 229
- SYS_LGETXATTR = 230
- SYS_FGETXATTR = 231
- SYS_LISTXATTR = 232
- SYS_LLISTXATTR = 233
- SYS_FLISTXATTR = 234
- SYS_REMOVEXATTR = 235
- SYS_LREMOVEXATTR = 236
- SYS_FREMOVEXATTR = 237
- SYS_TKILL = 238
- SYS_SENDFILE64 = 239
- SYS_FUTEX = 240
- SYS_SCHED_SETAFFINITY = 241
- SYS_SCHED_GETAFFINITY = 242
- SYS_SET_THREAD_AREA = 243
- SYS_GET_THREAD_AREA = 244
- SYS_IO_SETUP = 245
- SYS_IO_DESTROY = 246
- SYS_IO_GETEVENTS = 247
- SYS_IO_SUBMIT = 248
- SYS_IO_CANCEL = 249
- SYS_FADVISE64 = 250
- SYS_EXIT_GROUP = 252
- SYS_LOOKUP_DCOOKIE = 253
- SYS_EPOLL_CREATE = 254
- SYS_EPOLL_CTL = 255
- SYS_EPOLL_WAIT = 256
- SYS_REMAP_FILE_PAGES = 257
- SYS_SET_TID_ADDRESS = 258
- SYS_TIMER_CREATE = 259
- SYS_TIMER_SETTIME = 260
- SYS_TIMER_GETTIME = 261
- SYS_TIMER_GETOVERRUN = 262
- SYS_TIMER_DELETE = 263
- SYS_CLOCK_SETTIME = 264
- SYS_CLOCK_GETTIME = 265
- SYS_CLOCK_GETRES = 266
- SYS_CLOCK_NANOSLEEP = 267
- SYS_STATFS64 = 268
- SYS_FSTATFS64 = 269
- SYS_TGKILL = 270
- SYS_UTIMES = 271
- SYS_FADVISE64_64 = 272
- SYS_VSERVER = 273
- SYS_MBIND = 274
- SYS_GET_MEMPOLICY = 275
- SYS_SET_MEMPOLICY = 276
- SYS_MQ_OPEN = 277
- SYS_MQ_UNLINK = 278
- SYS_MQ_TIMEDSEND = 279
- SYS_MQ_TIMEDRECEIVE = 280
- SYS_MQ_NOTIFY = 281
- SYS_MQ_GETSETATTR = 282
- SYS_KEXEC_LOAD = 283
- SYS_WAITID = 284
- SYS_ADD_KEY = 286
- SYS_REQUEST_KEY = 287
- SYS_KEYCTL = 288
- SYS_IOPRIO_SET = 289
- SYS_IOPRIO_GET = 290
- SYS_INOTIFY_INIT = 291
- SYS_INOTIFY_ADD_WATCH = 292
- SYS_INOTIFY_RM_WATCH = 293
- SYS_MIGRATE_PAGES = 294
- SYS_OPENAT = 295
- SYS_MKDIRAT = 296
- SYS_MKNODAT = 297
- SYS_FCHOWNAT = 298
- SYS_FUTIMESAT = 299
- SYS_FSTATAT64 = 300
- SYS_UNLINKAT = 301
- SYS_RENAMEAT = 302
- SYS_LINKAT = 303
- SYS_SYMLINKAT = 304
- SYS_READLINKAT = 305
- SYS_FCHMODAT = 306
- SYS_FACCESSAT = 307
- SYS_PSELECT6 = 308
- SYS_PPOLL = 309
- SYS_UNSHARE = 310
- SYS_SET_ROBUST_LIST = 311
- SYS_GET_ROBUST_LIST = 312
- SYS_SPLICE = 313
- SYS_SYNC_FILE_RANGE = 314
- SYS_TEE = 315
- SYS_VMSPLICE = 316
- SYS_MOVE_PAGES = 317
- SYS_GETCPU = 318
- SYS_EPOLL_PWAIT = 319
- SYS_UTIMENSAT = 320
- SYS_SIGNALFD = 321
- SYS_TIMERFD_CREATE = 322
- SYS_EVENTFD = 323
- SYS_FALLOCATE = 324
- SYS_TIMERFD_SETTIME = 325
- SYS_TIMERFD_GETTIME = 326
- SYS_SIGNALFD4 = 327
- SYS_EVENTFD2 = 328
- SYS_EPOLL_CREATE1 = 329
- SYS_DUP3 = 330
- SYS_PIPE2 = 331
- SYS_INOTIFY_INIT1 = 332
- SYS_PREADV = 333
- SYS_PWRITEV = 334
- SYS_RT_TGSIGQUEUEINFO = 335
- SYS_PERF_EVENT_OPEN = 336
- SYS_RECVMMSG = 337
- SYS_FANOTIFY_INIT = 338
- SYS_FANOTIFY_MARK = 339
- SYS_PRLIMIT64 = 340
-)
diff --git a/src/pkg/syscall/zsysnum_linux_amd64.go b/src/pkg/syscall/zsysnum_linux_amd64.go
deleted file mode 100644
index 7cf70a4d8..000000000
--- a/src/pkg/syscall/zsysnum_linux_amd64.go
+++ /dev/null
@@ -1,310 +0,0 @@
-// mksysnum_linux.pl /usr/include/asm/unistd_64.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
- SYS_READ = 0
- SYS_WRITE = 1
- SYS_OPEN = 2
- SYS_CLOSE = 3
- SYS_STAT = 4
- SYS_FSTAT = 5
- SYS_LSTAT = 6
- SYS_POLL = 7
- SYS_LSEEK = 8
- SYS_MMAP = 9
- SYS_MPROTECT = 10
- SYS_MUNMAP = 11
- SYS_BRK = 12
- SYS_RT_SIGACTION = 13
- SYS_RT_SIGPROCMASK = 14
- SYS_RT_SIGRETURN = 15
- SYS_IOCTL = 16
- SYS_PREAD64 = 17
- SYS_PWRITE64 = 18
- SYS_READV = 19
- SYS_WRITEV = 20
- SYS_ACCESS = 21
- SYS_PIPE = 22
- SYS_SELECT = 23
- SYS_SCHED_YIELD = 24
- SYS_MREMAP = 25
- SYS_MSYNC = 26
- SYS_MINCORE = 27
- SYS_MADVISE = 28
- SYS_SHMGET = 29
- SYS_SHMAT = 30
- SYS_SHMCTL = 31
- SYS_DUP = 32
- SYS_DUP2 = 33
- SYS_PAUSE = 34
- SYS_NANOSLEEP = 35
- SYS_GETITIMER = 36
- SYS_ALARM = 37
- SYS_SETITIMER = 38
- SYS_GETPID = 39
- SYS_SENDFILE = 40
- SYS_SOCKET = 41
- SYS_CONNECT = 42
- SYS_ACCEPT = 43
- SYS_SENDTO = 44
- SYS_RECVFROM = 45
- SYS_SENDMSG = 46
- SYS_RECVMSG = 47
- SYS_SHUTDOWN = 48
- SYS_BIND = 49
- SYS_LISTEN = 50
- SYS_GETSOCKNAME = 51
- SYS_GETPEERNAME = 52
- SYS_SOCKETPAIR = 53
- SYS_SETSOCKOPT = 54
- SYS_GETSOCKOPT = 55
- SYS_CLONE = 56
- SYS_FORK = 57
- SYS_VFORK = 58
- SYS_EXECVE = 59
- SYS_EXIT = 60
- SYS_WAIT4 = 61
- SYS_KILL = 62
- SYS_UNAME = 63
- SYS_SEMGET = 64
- SYS_SEMOP = 65
- SYS_SEMCTL = 66
- SYS_SHMDT = 67
- SYS_MSGGET = 68
- SYS_MSGSND = 69
- SYS_MSGRCV = 70
- SYS_MSGCTL = 71
- SYS_FCNTL = 72
- SYS_FLOCK = 73
- SYS_FSYNC = 74
- SYS_FDATASYNC = 75
- SYS_TRUNCATE = 76
- SYS_FTRUNCATE = 77
- SYS_GETDENTS = 78
- SYS_GETCWD = 79
- SYS_CHDIR = 80
- SYS_FCHDIR = 81
- SYS_RENAME = 82
- SYS_MKDIR = 83
- SYS_RMDIR = 84
- SYS_CREAT = 85
- SYS_LINK = 86
- SYS_UNLINK = 87
- SYS_SYMLINK = 88
- SYS_READLINK = 89
- SYS_CHMOD = 90
- SYS_FCHMOD = 91
- SYS_CHOWN = 92
- SYS_FCHOWN = 93
- SYS_LCHOWN = 94
- SYS_UMASK = 95
- SYS_GETTIMEOFDAY = 96
- SYS_GETRLIMIT = 97
- SYS_GETRUSAGE = 98
- SYS_SYSINFO = 99
- SYS_TIMES = 100
- SYS_PTRACE = 101
- SYS_GETUID = 102
- SYS_SYSLOG = 103
- SYS_GETGID = 104
- SYS_SETUID = 105
- SYS_SETGID = 106
- SYS_GETEUID = 107
- SYS_GETEGID = 108
- SYS_SETPGID = 109
- SYS_GETPPID = 110
- SYS_GETPGRP = 111
- SYS_SETSID = 112
- SYS_SETREUID = 113
- SYS_SETREGID = 114
- SYS_GETGROUPS = 115
- SYS_SETGROUPS = 116
- SYS_SETRESUID = 117
- SYS_GETRESUID = 118
- SYS_SETRESGID = 119
- SYS_GETRESGID = 120
- SYS_GETPGID = 121
- SYS_SETFSUID = 122
- SYS_SETFSGID = 123
- SYS_GETSID = 124
- SYS_CAPGET = 125
- SYS_CAPSET = 126
- SYS_RT_SIGPENDING = 127
- SYS_RT_SIGTIMEDWAIT = 128
- SYS_RT_SIGQUEUEINFO = 129
- SYS_RT_SIGSUSPEND = 130
- SYS_SIGALTSTACK = 131
- SYS_UTIME = 132
- SYS_MKNOD = 133
- SYS_USELIB = 134
- SYS_PERSONALITY = 135
- SYS_USTAT = 136
- SYS_STATFS = 137
- SYS_FSTATFS = 138
- SYS_SYSFS = 139
- SYS_GETPRIORITY = 140
- SYS_SETPRIORITY = 141
- SYS_SCHED_SETPARAM = 142
- SYS_SCHED_GETPARAM = 143
- SYS_SCHED_SETSCHEDULER = 144
- SYS_SCHED_GETSCHEDULER = 145
- SYS_SCHED_GET_PRIORITY_MAX = 146
- SYS_SCHED_GET_PRIORITY_MIN = 147
- SYS_SCHED_RR_GET_INTERVAL = 148
- SYS_MLOCK = 149
- SYS_MUNLOCK = 150
- SYS_MLOCKALL = 151
- SYS_MUNLOCKALL = 152
- SYS_VHANGUP = 153
- SYS_MODIFY_LDT = 154
- SYS_PIVOT_ROOT = 155
- SYS__SYSCTL = 156
- SYS_PRCTL = 157
- SYS_ARCH_PRCTL = 158
- SYS_ADJTIMEX = 159
- SYS_SETRLIMIT = 160
- SYS_CHROOT = 161
- SYS_SYNC = 162
- SYS_ACCT = 163
- SYS_SETTIMEOFDAY = 164
- SYS_MOUNT = 165
- SYS_UMOUNT2 = 166
- SYS_SWAPON = 167
- SYS_SWAPOFF = 168
- SYS_REBOOT = 169
- SYS_SETHOSTNAME = 170
- SYS_SETDOMAINNAME = 171
- SYS_IOPL = 172
- SYS_IOPERM = 173
- SYS_CREATE_MODULE = 174
- SYS_INIT_MODULE = 175
- SYS_DELETE_MODULE = 176
- SYS_GET_KERNEL_SYMS = 177
- SYS_QUERY_MODULE = 178
- SYS_QUOTACTL = 179
- SYS_NFSSERVCTL = 180
- SYS_GETPMSG = 181
- SYS_PUTPMSG = 182
- SYS_AFS_SYSCALL = 183
- SYS_TUXCALL = 184
- SYS_SECURITY = 185
- SYS_GETTID = 186
- SYS_READAHEAD = 187
- SYS_SETXATTR = 188
- SYS_LSETXATTR = 189
- SYS_FSETXATTR = 190
- SYS_GETXATTR = 191
- SYS_LGETXATTR = 192
- SYS_FGETXATTR = 193
- SYS_LISTXATTR = 194
- SYS_LLISTXATTR = 195
- SYS_FLISTXATTR = 196
- SYS_REMOVEXATTR = 197
- SYS_LREMOVEXATTR = 198
- SYS_FREMOVEXATTR = 199
- SYS_TKILL = 200
- SYS_TIME = 201
- SYS_FUTEX = 202
- SYS_SCHED_SETAFFINITY = 203
- SYS_SCHED_GETAFFINITY = 204
- SYS_SET_THREAD_AREA = 205
- SYS_IO_SETUP = 206
- SYS_IO_DESTROY = 207
- SYS_IO_GETEVENTS = 208
- SYS_IO_SUBMIT = 209
- SYS_IO_CANCEL = 210
- SYS_GET_THREAD_AREA = 211
- SYS_LOOKUP_DCOOKIE = 212
- SYS_EPOLL_CREATE = 213
- SYS_EPOLL_CTL_OLD = 214
- SYS_EPOLL_WAIT_OLD = 215
- SYS_REMAP_FILE_PAGES = 216
- SYS_GETDENTS64 = 217
- SYS_SET_TID_ADDRESS = 218
- SYS_RESTART_SYSCALL = 219
- SYS_SEMTIMEDOP = 220
- SYS_FADVISE64 = 221
- SYS_TIMER_CREATE = 222
- SYS_TIMER_SETTIME = 223
- SYS_TIMER_GETTIME = 224
- SYS_TIMER_GETOVERRUN = 225
- SYS_TIMER_DELETE = 226
- SYS_CLOCK_SETTIME = 227
- SYS_CLOCK_GETTIME = 228
- SYS_CLOCK_GETRES = 229
- SYS_CLOCK_NANOSLEEP = 230
- SYS_EXIT_GROUP = 231
- SYS_EPOLL_WAIT = 232
- SYS_EPOLL_CTL = 233
- SYS_TGKILL = 234
- SYS_UTIMES = 235
- SYS_VSERVER = 236
- SYS_MBIND = 237
- SYS_SET_MEMPOLICY = 238
- SYS_GET_MEMPOLICY = 239
- SYS_MQ_OPEN = 240
- SYS_MQ_UNLINK = 241
- SYS_MQ_TIMEDSEND = 242
- SYS_MQ_TIMEDRECEIVE = 243
- SYS_MQ_NOTIFY = 244
- SYS_MQ_GETSETATTR = 245
- SYS_KEXEC_LOAD = 246
- SYS_WAITID = 247
- SYS_ADD_KEY = 248
- SYS_REQUEST_KEY = 249
- SYS_KEYCTL = 250
- SYS_IOPRIO_SET = 251
- SYS_IOPRIO_GET = 252
- SYS_INOTIFY_INIT = 253
- SYS_INOTIFY_ADD_WATCH = 254
- SYS_INOTIFY_RM_WATCH = 255
- SYS_MIGRATE_PAGES = 256
- SYS_OPENAT = 257
- SYS_MKDIRAT = 258
- SYS_MKNODAT = 259
- SYS_FCHOWNAT = 260
- SYS_FUTIMESAT = 261
- SYS_NEWFSTATAT = 262
- SYS_UNLINKAT = 263
- SYS_RENAMEAT = 264
- SYS_LINKAT = 265
- SYS_SYMLINKAT = 266
- SYS_READLINKAT = 267
- SYS_FCHMODAT = 268
- SYS_FACCESSAT = 269
- SYS_PSELECT6 = 270
- SYS_PPOLL = 271
- SYS_UNSHARE = 272
- SYS_SET_ROBUST_LIST = 273
- SYS_GET_ROBUST_LIST = 274
- SYS_SPLICE = 275
- SYS_TEE = 276
- SYS_SYNC_FILE_RANGE = 277
- SYS_VMSPLICE = 278
- SYS_MOVE_PAGES = 279
- SYS_UTIMENSAT = 280
- SYS_EPOLL_PWAIT = 281
- SYS_SIGNALFD = 282
- SYS_TIMERFD_CREATE = 283
- SYS_EVENTFD = 284
- SYS_FALLOCATE = 285
- SYS_TIMERFD_SETTIME = 286
- SYS_TIMERFD_GETTIME = 287
- SYS_ACCEPT4 = 288
- SYS_SIGNALFD4 = 289
- SYS_EVENTFD2 = 290
- SYS_EPOLL_CREATE1 = 291
- SYS_DUP3 = 292
- SYS_PIPE2 = 293
- SYS_INOTIFY_INIT1 = 294
- SYS_PREADV = 295
- SYS_PWRITEV = 296
- SYS_RT_TGSIGQUEUEINFO = 297
- SYS_PERF_EVENT_OPEN = 298
- SYS_RECVMMSG = 299
- SYS_FANOTIFY_INIT = 300
- SYS_FANOTIFY_MARK = 301
- SYS_PRLIMIT64 = 302
-)
diff --git a/src/pkg/syscall/zsysnum_linux_arm.go b/src/pkg/syscall/zsysnum_linux_arm.go
deleted file mode 100644
index 7068e4e21..000000000
--- a/src/pkg/syscall/zsysnum_linux_arm.go
+++ /dev/null
@@ -1,354 +0,0 @@
-// mksysnum_linux.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
- SYS_OABI_SYSCALL_BASE = 0
- SYS_SYSCALL_BASE = 0
- SYS_RESTART_SYSCALL = 0
- SYS_EXIT = 1
- SYS_FORK = 2
- SYS_READ = 3
- SYS_WRITE = 4
- SYS_OPEN = 5
- SYS_CLOSE = 6
- SYS_CREAT = 8
- SYS_LINK = 9
- SYS_UNLINK = 10
- SYS_EXECVE = 11
- SYS_CHDIR = 12
- SYS_TIME = 13
- SYS_MKNOD = 14
- SYS_CHMOD = 15
- SYS_LCHOWN = 16
- SYS_LSEEK = 19
- SYS_GETPID = 20
- SYS_MOUNT = 21
- SYS_UMOUNT = 22
- SYS_SETUID = 23
- SYS_GETUID = 24
- SYS_STIME = 25
- SYS_PTRACE = 26
- SYS_ALARM = 27
- SYS_PAUSE = 29
- SYS_UTIME = 30
- SYS_ACCESS = 33
- SYS_NICE = 34
- SYS_SYNC = 36
- SYS_KILL = 37
- SYS_RENAME = 38
- SYS_MKDIR = 39
- SYS_RMDIR = 40
- SYS_DUP = 41
- SYS_PIPE = 42
- SYS_TIMES = 43
- SYS_BRK = 45
- SYS_SETGID = 46
- SYS_GETGID = 47
- SYS_GETEUID = 49
- SYS_GETEGID = 50
- SYS_ACCT = 51
- SYS_UMOUNT2 = 52
- SYS_IOCTL = 54
- SYS_FCNTL = 55
- SYS_SETPGID = 57
- SYS_UMASK = 60
- SYS_CHROOT = 61
- SYS_USTAT = 62
- SYS_DUP2 = 63
- SYS_GETPPID = 64
- SYS_GETPGRP = 65
- SYS_SETSID = 66
- SYS_SIGACTION = 67
- SYS_SETREUID = 70
- SYS_SETREGID = 71
- SYS_SIGSUSPEND = 72
- SYS_SIGPENDING = 73
- SYS_SETHOSTNAME = 74
- SYS_SETRLIMIT = 75
- SYS_GETRLIMIT = 76
- SYS_GETRUSAGE = 77
- SYS_GETTIMEOFDAY = 78
- SYS_SETTIMEOFDAY = 79
- SYS_GETGROUPS = 80
- SYS_SETGROUPS = 81
- SYS_SELECT = 82
- SYS_SYMLINK = 83
- SYS_READLINK = 85
- SYS_USELIB = 86
- SYS_SWAPON = 87
- SYS_REBOOT = 88
- SYS_READDIR = 89
- SYS_MMAP = 90
- SYS_MUNMAP = 91
- SYS_TRUNCATE = 92
- SYS_FTRUNCATE = 93
- SYS_FCHMOD = 94
- SYS_FCHOWN = 95
- SYS_GETPRIORITY = 96
- SYS_SETPRIORITY = 97
- SYS_STATFS = 99
- SYS_FSTATFS = 100
- SYS_SOCKETCALL = 102
- SYS_SYSLOG = 103
- SYS_SETITIMER = 104
- SYS_GETITIMER = 105
- SYS_STAT = 106
- SYS_LSTAT = 107
- SYS_FSTAT = 108
- SYS_VHANGUP = 111
- SYS_SYSCALL = 113
- SYS_WAIT4 = 114
- SYS_SWAPOFF = 115
- SYS_SYSINFO = 116
- SYS_IPC = 117
- SYS_FSYNC = 118
- SYS_SIGRETURN = 119
- SYS_CLONE = 120
- SYS_SETDOMAINNAME = 121
- SYS_UNAME = 122
- SYS_ADJTIMEX = 124
- SYS_MPROTECT = 125
- SYS_SIGPROCMASK = 126
- SYS_INIT_MODULE = 128
- SYS_DELETE_MODULE = 129
- SYS_QUOTACTL = 131
- SYS_GETPGID = 132
- SYS_FCHDIR = 133
- SYS_BDFLUSH = 134
- SYS_SYSFS = 135
- SYS_PERSONALITY = 136
- SYS_SETFSUID = 138
- SYS_SETFSGID = 139
- SYS__LLSEEK = 140
- SYS_GETDENTS = 141
- SYS__NEWSELECT = 142
- SYS_FLOCK = 143
- SYS_MSYNC = 144
- SYS_READV = 145
- SYS_WRITEV = 146
- SYS_GETSID = 147
- SYS_FDATASYNC = 148
- SYS__SYSCTL = 149
- SYS_MLOCK = 150
- SYS_MUNLOCK = 151
- SYS_MLOCKALL = 152
- SYS_MUNLOCKALL = 153
- SYS_SCHED_SETPARAM = 154
- SYS_SCHED_GETPARAM = 155
- SYS_SCHED_SETSCHEDULER = 156
- SYS_SCHED_GETSCHEDULER = 157
- SYS_SCHED_YIELD = 158
- SYS_SCHED_GET_PRIORITY_MAX = 159
- SYS_SCHED_GET_PRIORITY_MIN = 160
- SYS_SCHED_RR_GET_INTERVAL = 161
- SYS_NANOSLEEP = 162
- SYS_MREMAP = 163
- SYS_SETRESUID = 164
- SYS_GETRESUID = 165
- SYS_POLL = 168
- SYS_NFSSERVCTL = 169
- SYS_SETRESGID = 170
- SYS_GETRESGID = 171
- SYS_PRCTL = 172
- SYS_RT_SIGRETURN = 173
- SYS_RT_SIGACTION = 174
- SYS_RT_SIGPROCMASK = 175
- SYS_RT_SIGPENDING = 176
- SYS_RT_SIGTIMEDWAIT = 177
- SYS_RT_SIGQUEUEINFO = 178
- SYS_RT_SIGSUSPEND = 179
- SYS_PREAD64 = 180
- SYS_PWRITE64 = 181
- SYS_CHOWN = 182
- SYS_GETCWD = 183
- SYS_CAPGET = 184
- SYS_CAPSET = 185
- SYS_SIGALTSTACK = 186
- SYS_SENDFILE = 187
- SYS_VFORK = 190
- SYS_UGETRLIMIT = 191
- SYS_MMAP2 = 192
- SYS_TRUNCATE64 = 193
- SYS_FTRUNCATE64 = 194
- SYS_STAT64 = 195
- SYS_LSTAT64 = 196
- SYS_FSTAT64 = 197
- SYS_LCHOWN32 = 198
- SYS_GETUID32 = 199
- SYS_GETGID32 = 200
- SYS_GETEUID32 = 201
- SYS_GETEGID32 = 202
- SYS_SETREUID32 = 203
- SYS_SETREGID32 = 204
- SYS_GETGROUPS32 = 205
- SYS_SETGROUPS32 = 206
- SYS_FCHOWN32 = 207
- SYS_SETRESUID32 = 208
- SYS_GETRESUID32 = 209
- SYS_SETRESGID32 = 210
- SYS_GETRESGID32 = 211
- SYS_CHOWN32 = 212
- SYS_SETUID32 = 213
- SYS_SETGID32 = 214
- SYS_SETFSUID32 = 215
- SYS_SETFSGID32 = 216
- SYS_GETDENTS64 = 217
- SYS_PIVOT_ROOT = 218
- SYS_MINCORE = 219
- SYS_MADVISE = 220
- SYS_FCNTL64 = 221
- SYS_GETTID = 224
- SYS_READAHEAD = 225
- SYS_SETXATTR = 226
- SYS_LSETXATTR = 227
- SYS_FSETXATTR = 228
- SYS_GETXATTR = 229
- SYS_LGETXATTR = 230
- SYS_FGETXATTR = 231
- SYS_LISTXATTR = 232
- SYS_LLISTXATTR = 233
- SYS_FLISTXATTR = 234
- SYS_REMOVEXATTR = 235
- SYS_LREMOVEXATTR = 236
- SYS_FREMOVEXATTR = 237
- SYS_TKILL = 238
- SYS_SENDFILE64 = 239
- SYS_FUTEX = 240
- SYS_SCHED_SETAFFINITY = 241
- SYS_SCHED_GETAFFINITY = 242
- SYS_IO_SETUP = 243
- SYS_IO_DESTROY = 244
- SYS_IO_GETEVENTS = 245
- SYS_IO_SUBMIT = 246
- SYS_IO_CANCEL = 247
- SYS_EXIT_GROUP = 248
- SYS_LOOKUP_DCOOKIE = 249
- SYS_EPOLL_CREATE = 250
- SYS_EPOLL_CTL = 251
- SYS_EPOLL_WAIT = 252
- SYS_REMAP_FILE_PAGES = 253
- SYS_SET_TID_ADDRESS = 256
- SYS_TIMER_CREATE = 257
- SYS_TIMER_SETTIME = 258
- SYS_TIMER_GETTIME = 259
- SYS_TIMER_GETOVERRUN = 260
- SYS_TIMER_DELETE = 261
- SYS_CLOCK_SETTIME = 262
- SYS_CLOCK_GETTIME = 263
- SYS_CLOCK_GETRES = 264
- SYS_CLOCK_NANOSLEEP = 265
- SYS_STATFS64 = 266
- SYS_FSTATFS64 = 267
- SYS_TGKILL = 268
- SYS_UTIMES = 269
- SYS_ARM_FADVISE64_64 = 270
- SYS_PCICONFIG_IOBASE = 271
- SYS_PCICONFIG_READ = 272
- SYS_PCICONFIG_WRITE = 273
- SYS_MQ_OPEN = 274
- SYS_MQ_UNLINK = 275
- SYS_MQ_TIMEDSEND = 276
- SYS_MQ_TIMEDRECEIVE = 277
- SYS_MQ_NOTIFY = 278
- SYS_MQ_GETSETATTR = 279
- SYS_WAITID = 280
- SYS_SOCKET = 281
- SYS_BIND = 282
- SYS_CONNECT = 283
- SYS_LISTEN = 284
- SYS_ACCEPT = 285
- SYS_GETSOCKNAME = 286
- SYS_GETPEERNAME = 287
- SYS_SOCKETPAIR = 288
- SYS_SEND = 289
- SYS_SENDTO = 290
- SYS_RECV = 291
- SYS_RECVFROM = 292
- SYS_SHUTDOWN = 293
- SYS_SETSOCKOPT = 294
- SYS_GETSOCKOPT = 295
- SYS_SENDMSG = 296
- SYS_RECVMSG = 297
- SYS_SEMOP = 298
- SYS_SEMGET = 299
- SYS_SEMCTL = 300
- SYS_MSGSND = 301
- SYS_MSGRCV = 302
- SYS_MSGGET = 303
- SYS_MSGCTL = 304
- SYS_SHMAT = 305
- SYS_SHMDT = 306
- SYS_SHMGET = 307
- SYS_SHMCTL = 308
- SYS_ADD_KEY = 309
- SYS_REQUEST_KEY = 310
- SYS_KEYCTL = 311
- SYS_SEMTIMEDOP = 312
- SYS_VSERVER = 313
- SYS_IOPRIO_SET = 314
- SYS_IOPRIO_GET = 315
- SYS_INOTIFY_INIT = 316
- SYS_INOTIFY_ADD_WATCH = 317
- SYS_INOTIFY_RM_WATCH = 318
- SYS_MBIND = 319
- SYS_GET_MEMPOLICY = 320
- SYS_SET_MEMPOLICY = 321
- SYS_OPENAT = 322
- SYS_MKDIRAT = 323
- SYS_MKNODAT = 324
- SYS_FCHOWNAT = 325
- SYS_FUTIMESAT = 326
- SYS_FSTATAT64 = 327
- SYS_UNLINKAT = 328
- SYS_RENAMEAT = 329
- SYS_LINKAT = 330
- SYS_SYMLINKAT = 331
- SYS_READLINKAT = 332
- SYS_FCHMODAT = 333
- SYS_FACCESSAT = 334
- SYS_PSELECT6 = 335
- SYS_PPOLL = 336
- SYS_UNSHARE = 337
- SYS_SET_ROBUST_LIST = 338
- SYS_GET_ROBUST_LIST = 339
- SYS_SPLICE = 340
- SYS_ARM_SYNC_FILE_RANGE = 341
- SYS_TEE = 342
- SYS_VMSPLICE = 343
- SYS_MOVE_PAGES = 344
- SYS_GETCPU = 345
- SYS_EPOLL_PWAIT = 346
- SYS_KEXEC_LOAD = 347
- SYS_UTIMENSAT = 348
- SYS_SIGNALFD = 349
- SYS_TIMERFD_CREATE = 350
- SYS_EVENTFD = 351
- SYS_FALLOCATE = 352
- SYS_TIMERFD_SETTIME = 353
- SYS_TIMERFD_GETTIME = 354
- SYS_SIGNALFD4 = 355
- SYS_EVENTFD2 = 356
- SYS_EPOLL_CREATE1 = 357
- SYS_DUP3 = 358
- SYS_PIPE2 = 359
- SYS_INOTIFY_INIT1 = 360
- SYS_PREADV = 361
- SYS_PWRITEV = 362
- SYS_RT_TGSIGQUEUEINFO = 363
- SYS_PERF_EVENT_OPEN = 364
- SYS_RECVMMSG = 365
- SYS_ACCEPT4 = 366
- SYS_FANOTIFY_INIT = 367
- SYS_FANOTIFY_MARK = 368
- SYS_PRLIMIT64 = 369
- SYS_NAME_TO_HANDLE_AT = 370
- SYS_OPEN_BY_HANDLE_AT = 371
- SYS_CLOCK_ADJTIME = 372
- SYS_SYNCFS = 373
- SYS_SENDMMSG = 374
- SYS_SETNS = 375
- SYS_PROCESS_VM_READV = 376
- SYS_PROCESS_VM_WRITEV = 377
-)
diff --git a/src/pkg/syscall/zsysnum_netbsd_386.go b/src/pkg/syscall/zsysnum_netbsd_386.go
deleted file mode 100644
index c57096523..000000000
--- a/src/pkg/syscall/zsysnum_netbsd_386.go
+++ /dev/null
@@ -1,271 +0,0 @@
-// 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___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_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); }
- SYS___QUOTACTL = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); }
- SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); }
- SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); }
- SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); }
-)
diff --git a/src/pkg/syscall/zsysnum_netbsd_amd64.go b/src/pkg/syscall/zsysnum_netbsd_amd64.go
deleted file mode 100644
index c57096523..000000000
--- a/src/pkg/syscall/zsysnum_netbsd_amd64.go
+++ /dev/null
@@ -1,271 +0,0 @@
-// 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___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_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); }
- SYS___QUOTACTL = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); }
- SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); }
- SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); }
- SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); }
-)
diff --git a/src/pkg/syscall/zsysnum_netbsd_arm.go b/src/pkg/syscall/zsysnum_netbsd_arm.go
deleted file mode 100644
index c57096523..000000000
--- a/src/pkg/syscall/zsysnum_netbsd_arm.go
+++ /dev/null
@@ -1,271 +0,0 @@
-// 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___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_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); }
- SYS___QUOTACTL = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); }
- SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); }
- SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); }
- SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); }
-)
diff --git a/src/pkg/syscall/zsysnum_openbsd_386.go b/src/pkg/syscall/zsysnum_openbsd_386.go
deleted file mode 100644
index 3b9ac4c94..000000000
--- a/src/pkg/syscall/zsysnum_openbsd_386.go
+++ /dev/null
@@ -1,205 +0,0 @@
-// mksysnum_openbsd.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, \
- SYS_OPEN = 5 // { int sys_open(const char *path, \
- SYS_CLOSE = 6 // { int sys_close(int fd); }
- SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \
- SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
- SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
- SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \
- SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
- SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
- SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \
- SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
- SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \
- SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
- SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
- SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \
- SYS_GETPID = 20 // { pid_t sys_getpid(void); }
- SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \
- SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
- SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t sys_getuid(void); }
- SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
- SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \
- SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \
- SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, \
- SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \
- SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, \
- SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, \
- SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, \
- SYS_ACCESS = 33 // { int sys_access(const char *path, int flags); }
- SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
- SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
- SYS_SYNC = 36 // { void sys_sync(void); }
- SYS_KILL = 37 // { int sys_kill(int pid, int signum); }
- SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
- SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
- SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
- SYS_DUP = 41 // { int sys_dup(int fd); }
- SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \
- SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
- SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \
- SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \
- SYS_SIGACTION = 46 // { int sys_sigaction(int signum, \
- SYS_GETGID = 47 // { gid_t sys_getgid(void); }
- SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
- SYS_GETLOGIN = 49 // { int sys_getlogin(char *namebuf, u_int namelen); }
- SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
- SYS_ACCT = 51 // { int sys_acct(const char *path); }
- SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
- SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
- SYS_IOCTL = 54 // { int sys_ioctl(int fd, \
- SYS_REBOOT = 55 // { int sys_reboot(int opt); }
- SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
- SYS_SYMLINK = 57 // { int sys_symlink(const char *path, \
- SYS_READLINK = 58 // { int sys_readlink(const char *path, char *buf, \
- SYS_EXECVE = 59 // { int sys_execve(const char *path, \
- SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
- SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
- SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \
- SYS_STATFS = 63 // { int sys_statfs(const char *path, \
- SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
- SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \
- SYS_VFORK = 66 // { int sys_vfork(void); }
- SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \
- SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \
- SYS_SETITIMER = 69 // { int sys_setitimer(int which, \
- SYS_GETITIMER = 70 // { int sys_getitimer(int which, \
- SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \
- SYS_KEVENT = 72 // { int sys_kevent(int fd, \
- SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \
- SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \
- SYS_UTIMES = 76 // { int sys_utimes(const char *path, \
- SYS_FUTIMES = 77 // { int sys_futimes(int fd, \
- SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \
- SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \
- SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \
- SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
- SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, int pgid); }
- SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \
- SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \
- SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \
- SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \
- SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \
- SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
- SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \
- SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
- SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \
- SYS_FSYNC = 95 // { int sys_fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
- SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
- SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \
- SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
- SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
- SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
- SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \
- SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \
- SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
- SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \
- SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \
- SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
- SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \
- SYS_READV = 120 // { ssize_t sys_readv(int fd, \
- SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \
- SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
- SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
- SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
- SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }
- SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
- SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
- SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, \
- SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \
- SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
- SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
- SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \
- SYS_SETSID = 147 // { int sys_setsid(void); }
- SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \
- SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
- SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
- SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
- SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, \
- SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, \
- SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
- SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
- SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
- SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
- SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, \
- SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, \
- SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, \
- SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \
- SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \
- 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, \
- SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
- SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
- SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \
- SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
- SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
- SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \
- SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
- SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \
- SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
- SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \
- SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \
- SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
- SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
- SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
- SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
- SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
- SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
- SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \
- SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \
- SYS_KQUEUE = 269 // { int sys_kqueue(void); }
- SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
- SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
- SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \
- SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, \
- SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, \
- SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, \
- SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, \
- SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
- SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \
- SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
- SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \
- SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \
- SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \
- SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \
- SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \
- SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
- SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
- SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \
- SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
- SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \
- SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
- SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \
- SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
- SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
- SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \
- SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \
- SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \
- SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \
- SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \
- SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \
- SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, \
- SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, \
- SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, \
- SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \
- SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \
- SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \
- SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
- SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
-)
diff --git a/src/pkg/syscall/zsysnum_openbsd_amd64.go b/src/pkg/syscall/zsysnum_openbsd_amd64.go
deleted file mode 100644
index 3b9ac4c94..000000000
--- a/src/pkg/syscall/zsysnum_openbsd_amd64.go
+++ /dev/null
@@ -1,205 +0,0 @@
-// mksysnum_openbsd.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, \
- SYS_OPEN = 5 // { int sys_open(const char *path, \
- SYS_CLOSE = 6 // { int sys_close(int fd); }
- SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \
- SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
- SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
- SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \
- SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
- SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
- SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \
- SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
- SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \
- SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
- SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
- SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \
- SYS_GETPID = 20 // { pid_t sys_getpid(void); }
- SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \
- SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
- SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t sys_getuid(void); }
- SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
- SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \
- SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \
- SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, \
- SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \
- SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, \
- SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, \
- SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, \
- SYS_ACCESS = 33 // { int sys_access(const char *path, int flags); }
- SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
- SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
- SYS_SYNC = 36 // { void sys_sync(void); }
- SYS_KILL = 37 // { int sys_kill(int pid, int signum); }
- SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
- SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
- SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
- SYS_DUP = 41 // { int sys_dup(int fd); }
- SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \
- SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
- SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \
- SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \
- SYS_SIGACTION = 46 // { int sys_sigaction(int signum, \
- SYS_GETGID = 47 // { gid_t sys_getgid(void); }
- SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
- SYS_GETLOGIN = 49 // { int sys_getlogin(char *namebuf, u_int namelen); }
- SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
- SYS_ACCT = 51 // { int sys_acct(const char *path); }
- SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
- SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
- SYS_IOCTL = 54 // { int sys_ioctl(int fd, \
- SYS_REBOOT = 55 // { int sys_reboot(int opt); }
- SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
- SYS_SYMLINK = 57 // { int sys_symlink(const char *path, \
- SYS_READLINK = 58 // { int sys_readlink(const char *path, char *buf, \
- SYS_EXECVE = 59 // { int sys_execve(const char *path, \
- SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
- SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
- SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \
- SYS_STATFS = 63 // { int sys_statfs(const char *path, \
- SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
- SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \
- SYS_VFORK = 66 // { int sys_vfork(void); }
- SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \
- SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \
- SYS_SETITIMER = 69 // { int sys_setitimer(int which, \
- SYS_GETITIMER = 70 // { int sys_getitimer(int which, \
- SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \
- SYS_KEVENT = 72 // { int sys_kevent(int fd, \
- SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
- SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \
- SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \
- SYS_UTIMES = 76 // { int sys_utimes(const char *path, \
- SYS_FUTIMES = 77 // { int sys_futimes(int fd, \
- SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \
- SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \
- SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \
- SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
- SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, int pgid); }
- SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \
- SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \
- SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \
- SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \
- SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \
- SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
- SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \
- SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
- SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \
- SYS_FSYNC = 95 // { int sys_fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
- SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
- SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \
- SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
- SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
- SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
- SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \
- SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \
- SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
- SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \
- SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \
- SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
- SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \
- SYS_READV = 120 // { ssize_t sys_readv(int fd, \
- SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \
- SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
- SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
- SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
- SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }
- SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
- SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
- SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
- SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, \
- SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \
- SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
- SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
- SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \
- SYS_SETSID = 147 // { int sys_setsid(void); }
- SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \
- SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
- SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
- SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
- SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, \
- SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, \
- SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
- SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
- SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
- SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
- SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, \
- SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, \
- SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, \
- SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \
- SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \
- 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, \
- SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
- SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
- SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
- SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \
- SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
- SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
- SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \
- SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
- SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \
- SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
- SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \
- SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \
- SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
- SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
- SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
- SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
- SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
- SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
- SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \
- SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \
- SYS_KQUEUE = 269 // { int sys_kqueue(void); }
- SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
- SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
- SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \
- SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, \
- SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, \
- SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, \
- SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, \
- SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
- SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \
- SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
- SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \
- SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \
- SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \
- SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \
- SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \
- SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
- SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
- SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \
- SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
- SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \
- SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
- SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \
- SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
- SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
- SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \
- SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \
- SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \
- SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \
- SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \
- SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \
- SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, \
- SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, \
- SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, \
- SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \
- SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \
- SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \
- SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
- SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
-)
diff --git a/src/pkg/syscall/zsysnum_plan9_386.go b/src/pkg/syscall/zsysnum_plan9_386.go
deleted file mode 100644
index 4135b8d81..000000000
--- a/src/pkg/syscall/zsysnum_plan9_386.go
+++ /dev/null
@@ -1,47 +0,0 @@
-// mksysnum_plan9.sh /media/sys/src/libc/9syscall/sys.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
- SYS_SYSR1 = 0
- SYS_BIND = 2
- SYS_CHDIR = 3
- SYS_CLOSE = 4
- SYS_DUP = 5
- SYS_ALARM = 6
- SYS_EXEC = 7
- SYS_EXITS = 8
- SYS_FAUTH = 10
- SYS_SEGBRK = 12
- SYS_OPEN = 14
- SYS_OSEEK = 16
- SYS_SLEEP = 17
- SYS_RFORK = 19
- SYS_PIPE = 21
- SYS_CREATE = 22
- SYS_FD2PATH = 23
- SYS_BRK_ = 24
- SYS_REMOVE = 25
- SYS_NOTIFY = 28
- SYS_NOTED = 29
- SYS_SEGATTACH = 30
- SYS_SEGDETACH = 31
- SYS_SEGFREE = 32
- SYS_SEGFLUSH = 33
- SYS_RENDEZVOUS = 34
- SYS_UNMOUNT = 35
- SYS_SEMACQUIRE = 37
- SYS_SEMRELEASE = 38
- SYS_SEEK = 39
- SYS_FVERSION = 40
- SYS_ERRSTR = 41
- SYS_STAT = 42
- SYS_FSTAT = 43
- SYS_WSTAT = 44
- SYS_FWSTAT = 45
- SYS_MOUNT = 46
- SYS_AWAIT = 47
- SYS_PREAD = 50
- SYS_PWRITE = 51
-)
diff --git a/src/pkg/syscall/zsysnum_plan9_amd64.go b/src/pkg/syscall/zsysnum_plan9_amd64.go
deleted file mode 100644
index c03864647..000000000
--- a/src/pkg/syscall/zsysnum_plan9_amd64.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// mksysnum_plan9.sh /media/sys/src/libc/9syscall/sys.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
- SYS_SYSR1 = 0
- SYS_BIND = 2
- SYS_CHDIR = 3
- SYS_CLOSE = 4
- SYS_DUP = 5
- SYS_ALARM = 6
- SYS_EXEC = 7
- SYS_EXITS = 8
- SYS_FAUTH = 10
- SYS_SEGBRK = 12
- SYS_OPEN = 14
- SYS_OSEEK = 16
- SYS_SLEEP = 17
- SYS_RFORK = 19
- SYS_PIPE = 21
- SYS_CREATE = 22
- SYS_FD2PATH = 23
- SYS_BRK_ = 24
- SYS_REMOVE = 25
- SYS_NOTIFY = 28
- SYS_NOTED = 29
- SYS_SEGATTACH = 30
- SYS_SEGDETACH = 31
- SYS_SEGFREE = 32
- SYS_SEGFLUSH = 33
- SYS_RENDEZVOUS = 34
- SYS_UNMOUNT = 35
- SYS_SEMACQUIRE = 37
- SYS_SEMRELEASE = 38
- SYS_SEEK = 39
- SYS_FVERSION = 40
- SYS_ERRSTR = 41
- SYS_STAT = 42
- SYS_FSTAT = 43
- SYS_WSTAT = 44
- SYS_FWSTAT = 45
- SYS_MOUNT = 46
- SYS_AWAIT = 47
- SYS_PREAD = 50
- SYS_PWRITE = 51
- SYS_NANOTIME = 60
-)
diff --git a/src/pkg/syscall/zsysnum_solaris_amd64.go b/src/pkg/syscall/zsysnum_solaris_amd64.go
deleted file mode 100644
index 43b3d8b40..000000000
--- a/src/pkg/syscall/zsysnum_solaris_amd64.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-// TODO(aram): remove these before Go 1.3.
-const (
- SYS_EXECVE = 59
- SYS_FCNTL = 62
-)
diff --git a/src/pkg/syscall/zsysnum_windows_386.go b/src/pkg/syscall/zsysnum_windows_386.go
deleted file mode 100644
index 36bf065d1..000000000
--- a/src/pkg/syscall/zsysnum_windows_386.go
+++ /dev/null
@@ -1,3 +0,0 @@
-// nothing to see here
-
-package syscall
diff --git a/src/pkg/syscall/zsysnum_windows_amd64.go b/src/pkg/syscall/zsysnum_windows_amd64.go
deleted file mode 100644
index 36bf065d1..000000000
--- a/src/pkg/syscall/zsysnum_windows_amd64.go
+++ /dev/null
@@ -1,3 +0,0 @@
-// nothing to see here
-
-package syscall
diff --git a/src/pkg/syscall/ztypes_darwin_386.go b/src/pkg/syscall/ztypes_darwin_386.go
deleted file mode 100644
index 13724c3cc..000000000
--- a/src/pkg/syscall/ztypes_darwin_386.go
+++ /dev/null
@@ -1,446 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_darwin.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 Timeval32 [0]byte
-
-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
-
-type Stat_t struct {
- Dev int32
- Mode uint16
- Nlink uint16
- Ino uint64
- Uid uint32
- Gid uint32
- Rdev int32
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Birthtimespec Timespec
- Size int64
- Blocks int64
- Blksize int32
- Flags uint32
- Gen uint32
- Lspare int32
- Qspare [2]int64
-}
-
-type Statfs_t struct {
- Bsize uint32
- Iosize int32
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Owner uint32
- Type uint32
- Flags uint32
- Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
- Reserved [8]uint32
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Fstore_t struct {
- Flags uint32
- Posmode int32
- Offset int64
- Length int64
- Bytesalloc int64
-}
-
-type Radvisory_t struct {
- Offset int64
- Count int32
-}
-
-type Fbootstraptransfer_t struct {
- Offset int64
- Length uint32
- Buffer *byte
-}
-
-type Log2phys_t struct {
- Flags uint32
- Contigbytes int64
- Devoffset int64
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-type Dirent struct {
- Ino uint64
- Seekoff uint64
- Reclen uint16
- Namlen uint16
- Type uint8
- Name [1024]int8
- Pad_cgo_0 [3]byte
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet4Pktinfo struct {
- Ifindex uint32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x14
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter int16
- Flags uint16
- Fflags uint32
- Data int32
- Udata *byte
-}
-
-type FdSet struct {
- Bits [32]int32
-}
-
-const (
- SizeofIfMsghdr = 0x70
- SizeofIfData = 0x60
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfmaMsghdr2 = 0x14
- SizeofRtMsghdr = 0x5c
- SizeofRtMetrics = 0x38
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Typelen uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Recvquota uint8
- Xmitquota uint8
- Unused1 uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Recvtiming uint32
- Xmittiming uint32
- Lastchange Timeval
- Unused2 uint32
- Hwassist uint32
- Reserved1 uint32
- Reserved2 uint32
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
-}
-
-type IfmaMsghdr2 struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Refcount int32
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint32
- Mtu uint32
- Hopcount uint32
- Expire int32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pksent uint32
- Filler [4]uint32
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfProgram = 0x8
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfProgram struct {
- Len uint32
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp Timeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [2]byte
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/src/pkg/syscall/ztypes_darwin_amd64.go b/src/pkg/syscall/ztypes_darwin_amd64.go
deleted file mode 100644
index 65b02ae4f..000000000
--- a/src/pkg/syscall/ztypes_darwin_amd64.go
+++ /dev/null
@@ -1,456 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_darwin.go
-
-package syscall
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int32
- Pad_cgo_0 [4]byte
-}
-
-type Timeval32 struct {
- Sec int32
- Usec int32
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev int32
- Mode uint16
- Nlink uint16
- Ino uint64
- Uid uint32
- Gid uint32
- Rdev int32
- Pad_cgo_0 [4]byte
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Birthtimespec Timespec
- Size int64
- Blocks int64
- Blksize int32
- Flags uint32
- Gen uint32
- Lspare int32
- Qspare [2]int64
-}
-
-type Statfs_t struct {
- Bsize uint32
- Iosize int32
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Owner uint32
- Type uint32
- Flags uint32
- Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
- Reserved [8]uint32
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Fstore_t struct {
- Flags uint32
- Posmode int32
- Offset int64
- Length int64
- Bytesalloc int64
-}
-
-type Radvisory_t struct {
- Offset int64
- Count int32
- Pad_cgo_0 [4]byte
-}
-
-type Fbootstraptransfer_t struct {
- Offset int64
- Length uint64
- Buffer *byte
-}
-
-type Log2phys_t struct {
- Flags uint32
- Contigbytes int64
- Devoffset int64
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-type Dirent struct {
- Ino uint64
- Seekoff uint64
- Reclen uint16
- Namlen uint16
- Type uint8
- Name [1024]int8
- Pad_cgo_0 [3]byte
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
-}
-
-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 int32
- Pad_cgo_1 [4]byte
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet4Pktinfo struct {
- Ifindex uint32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x14
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x30
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint64
- Filter int16
- Flags uint16
- Fflags uint32
- Data int64
- Udata *byte
-}
-
-type FdSet struct {
- Bits [32]int32
-}
-
-const (
- SizeofIfMsghdr = 0x70
- SizeofIfData = 0x60
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfmaMsghdr2 = 0x14
- SizeofRtMsghdr = 0x5c
- SizeofRtMetrics = 0x38
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Typelen uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Recvquota uint8
- Xmitquota uint8
- Unused1 uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Recvtiming uint32
- Xmittiming uint32
- Lastchange Timeval32
- Unused2 uint32
- Hwassist uint32
- Reserved1 uint32
- Reserved2 uint32
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
-}
-
-type IfmaMsghdr2 struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Refcount int32
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint32
- Mtu uint32
- Hopcount uint32
- Expire int32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pksent uint32
- Filler [4]uint32
-}
-
-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 Timeval32
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [2]byte
-}
-
-type Termios struct {
- Iflag uint64
- Oflag uint64
- Cflag uint64
- Lflag uint64
- Cc [20]uint8
- Pad_cgo_0 [4]byte
- Ispeed uint64
- Ospeed uint64
-}
diff --git a/src/pkg/syscall/ztypes_dragonfly_386.go b/src/pkg/syscall/ztypes_dragonfly_386.go
deleted file mode 100644
index 6b6ec1525..000000000
--- a/src/pkg/syscall/ztypes_dragonfly_386.go
+++ /dev/null
@@ -1,435 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_dragonfly.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 int64
- Max int64
-}
-
-type _Gid_t uint32
-
-const (
- S_IFMT = 0xf000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
- S_ISUID = 0x800
- S_ISGID = 0x400
- S_ISVTX = 0x200
- S_IRUSR = 0x100
- S_IWUSR = 0x80
- S_IXUSR = 0x40
-)
-
-type Stat_t struct {
- Ino uint64
- Nlink uint32
- Dev uint32
- Mode uint16
- Padding1 uint16
- Uid uint32
- Gid uint32
- Rdev uint32
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Lspare int32
- Qspare1 int64
- Qspare2 int64
-}
-
-type Statfs_t struct {
- Spare2 int32
- Bsize int32
- Iosize int32
- Blocks int32
- Bfree int32
- Bavail int32
- Files int32
- Ffree int32
- Fsid Fsid
- Owner uint32
- Type int32
- Flags int32
- Syncwrites int32
- Asyncwrites int32
- Fstypename [16]int8
- Mntonname [80]int8
- Syncreads int32
- Asyncreads int32
- Spares1 int16
- Mntfromname [80]int8
- Spares2 int16
- Spare [2]int32
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Dirent struct {
- Fileno uint64
- Namlen uint16
- Type uint8
- Unused1 uint8
- Unused2 uint32
- Name [256]int8
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
- Rcf uint16
- Route [16]uint16
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x36
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter int16
- Flags uint16
- Fflags uint32
- Data int32
- Udata *byte
-}
-
-type FdSet struct {
- Bits [32]uint32
-}
-
-const (
- SizeofIfMsghdr = 0x68
- SizeofIfData = 0x58
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfAnnounceMsghdr = 0x18
- SizeofRtMsghdr = 0x5c
- SizeofRtMetrics = 0x38
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Recvquota uint8
- Xmitquota uint8
- Pad_cgo_0 [2]byte
- Mtu uint32
- Metric uint32
- Link_state uint32
- Baudrate uint64
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Hwassist uint32
- Unused uint32
- Lastchange Timeval
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Name [16]int8
- What uint16
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint32
- Mtu uint32
- Pksent uint32
- Expire uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Recvpipe uint32
- Hopcount uint32
- Mssopt uint16
- Pad uint16
- Msl uint32
- Iwmaxsegs uint32
- Iwcapsegs uint32
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfProgram = 0x8
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfProgram struct {
- Len uint32
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp Timeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [2]byte
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/src/pkg/syscall/ztypes_dragonfly_amd64.go b/src/pkg/syscall/ztypes_dragonfly_amd64.go
deleted file mode 100644
index 954ffd7ab..000000000
--- a/src/pkg/syscall/ztypes_dragonfly_amd64.go
+++ /dev/null
@@ -1,441 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_dragonfly.go
-
-package syscall
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur int64
- Max int64
-}
-
-type _Gid_t uint32
-
-const (
- S_IFMT = 0xf000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
- S_ISUID = 0x800
- S_ISGID = 0x400
- S_ISVTX = 0x200
- S_IRUSR = 0x100
- S_IWUSR = 0x80
- S_IXUSR = 0x40
-)
-
-type Stat_t struct {
- Ino uint64
- Nlink uint32
- Dev uint32
- Mode uint16
- Padding1 uint16
- Uid uint32
- Gid uint32
- Rdev uint32
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Lspare int32
- Qspare1 int64
- Qspare2 int64
-}
-
-type Statfs_t struct {
- Spare2 int64
- Bsize int64
- Iosize int64
- Blocks int64
- Bfree int64
- Bavail int64
- Files int64
- Ffree int64
- Fsid Fsid
- Owner uint32
- Type int32
- Flags int32
- Pad_cgo_0 [4]byte
- Syncwrites int64
- Asyncwrites int64
- Fstypename [16]int8
- Mntonname [80]int8
- Syncreads int64
- Asyncreads int64
- Spares1 int16
- Mntfromname [80]int8
- Spares2 int16
- Pad_cgo_1 [4]byte
- Spare [2]int64
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Dirent struct {
- Fileno uint64
- Namlen uint16
- Type uint8
- Unused1 uint8
- Unused2 uint32
- Name [256]int8
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
- Rcf uint16
- Route [16]uint16
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len 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 int32
- 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
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x36
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x30
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint64
- Filter int16
- Flags uint16
- Fflags uint32
- Data int64
- Udata *byte
-}
-
-type FdSet struct {
- Bits [16]uint64
-}
-
-const (
- SizeofIfMsghdr = 0xb0
- SizeofIfData = 0xa0
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfAnnounceMsghdr = 0x18
- SizeofRtMsghdr = 0x98
- SizeofRtMetrics = 0x70
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Recvquota uint8
- Xmitquota uint8
- Pad_cgo_0 [2]byte
- Mtu uint64
- Metric uint64
- Link_state uint64
- Baudrate uint64
- Ipackets uint64
- Ierrors uint64
- Opackets uint64
- Oerrors uint64
- Collisions uint64
- Ibytes uint64
- Obytes uint64
- Imcasts uint64
- Omcasts uint64
- Iqdrops uint64
- Noproto uint64
- Hwassist uint64
- Unused uint64
- Lastchange Timeval
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Name [16]int8
- What uint16
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits uint64
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint64
- Mtu uint64
- Pksent uint64
- Expire uint64
- Sendpipe uint64
- Ssthresh uint64
- Rtt uint64
- Rttvar uint64
- Recvpipe uint64
- Hopcount uint64
- Mssopt uint16
- Pad uint16
- Pad_cgo_0 [4]byte
- Msl uint64
- Iwmaxsegs uint64
- Iwcapsegs uint64
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfProgram = 0x10
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x20
-)
-
-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 Timeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [6]byte
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/src/pkg/syscall/ztypes_freebsd_386.go b/src/pkg/syscall/ztypes_freebsd_386.go
deleted file mode 100644
index b809eea37..000000000
--- a/src/pkg/syscall/ztypes_freebsd_386.go
+++ /dev/null
@@ -1,492 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_freebsd.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 int64
- Max int64
-}
-
-type _Gid_t uint32
-
-const (
- S_IFMT = 0xf000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
- S_ISUID = 0x800
- S_ISGID = 0x400
- S_ISVTX = 0x200
- S_IRUSR = 0x100
- S_IWUSR = 0x80
- S_IXUSR = 0x40
-)
-
-type Stat_t struct {
- Dev uint32
- Ino uint32
- Mode uint16
- Nlink uint16
- Uid uint32
- Gid uint32
- Rdev uint32
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Lspare int32
- Birthtimespec Timespec
- Pad_cgo_0 [8]byte
-}
-
-type Statfs_t struct {
- Version uint32
- Type uint32
- Flags uint64
- Bsize uint64
- Iosize uint64
- Blocks uint64
- Bfree uint64
- Bavail int64
- Files uint64
- Ffree int64
- Syncwrites uint64
- Asyncwrites uint64
- Syncreads uint64
- Asyncreads uint64
- Spare [10]uint64
- Namemax uint32
- Owner uint32
- Fsid Fsid
- Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [88]int8
- Mntonname [88]int8
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
- Sysid int32
-}
-
-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 [46]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 IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x36
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter int16
- Flags uint16
- Fflags uint32
- Data int32
- Udata *byte
-}
-
-type FdSet struct {
- X__fds_bits [32]uint32
-}
-
-const (
- sizeofIfMsghdr = 0x64
- SizeofIfMsghdr = 0x60
- sizeofIfData = 0x54
- SizeofIfData = 0x50
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfAnnounceMsghdr = 0x18
- SizeofRtMsghdr = 0x5c
- SizeofRtMetrics = 0x38
-)
-
-type ifMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data ifData
-}
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type ifData struct {
- Type uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Vhid uint8
- Baudrate_pf uint8
- Datalen uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Hwassist uint64
- Epoch int32
- Lastchange Timeval
-}
-
-type IfData struct {
- Type uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Spare_char1 uint8
- Spare_char2 uint8
- Datalen uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Hwassist uint32
- Epoch int32
- Lastchange Timeval
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Name [16]int8
- What uint16
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Fmask int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint32
- Mtu uint32
- Hopcount uint32
- Expire uint32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pksent uint32
- Weight uint32
- Filler [3]uint32
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfZbuf = 0xc
- SizeofBpfProgram = 0x8
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
- SizeofBpfZbufHeader = 0x20
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfZbuf struct {
- Bufa *byte
- Bufb *byte
- Buflen uint32
-}
-
-type BpfProgram struct {
- Len uint32
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp Timeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [2]byte
-}
-
-type BpfZbufHeader struct {
- Kernel_gen uint32
- Kernel_len uint32
- User_gen uint32
- X_bzh_pad [5]uint32
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/src/pkg/syscall/ztypes_freebsd_amd64.go b/src/pkg/syscall/ztypes_freebsd_amd64.go
deleted file mode 100644
index a05908aed..000000000
--- a/src/pkg/syscall/ztypes_freebsd_amd64.go
+++ /dev/null
@@ -1,495 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_freebsd.go
-
-package syscall
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur int64
- Max int64
-}
-
-type _Gid_t uint32
-
-const (
- S_IFMT = 0xf000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
- S_ISUID = 0x800
- S_ISGID = 0x400
- S_ISVTX = 0x200
- S_IRUSR = 0x100
- S_IWUSR = 0x80
- S_IXUSR = 0x40
-)
-
-type Stat_t struct {
- Dev uint32
- Ino uint32
- Mode uint16
- Nlink uint16
- Uid uint32
- Gid uint32
- Rdev uint32
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Lspare int32
- Birthtimespec Timespec
-}
-
-type Statfs_t struct {
- Version uint32
- Type uint32
- Flags uint64
- Bsize uint64
- Iosize uint64
- Blocks uint64
- Bfree uint64
- Bavail int64
- Files uint64
- Ffree int64
- Syncwrites uint64
- Asyncwrites uint64
- Syncreads uint64
- Asyncreads uint64
- Spare [10]uint64
- Namemax uint32
- Owner uint32
- Fsid Fsid
- Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [88]int8
- Mntonname [88]int8
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
- Sysid int32
- Pad_cgo_0 [4]byte
-}
-
-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 [46]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 IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen int32
- 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
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x36
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x30
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint64
- Filter int16
- Flags uint16
- Fflags uint32
- Data int64
- Udata *byte
-}
-
-type FdSet struct {
- X__fds_bits [16]uint64
-}
-
-const (
- sizeofIfMsghdr = 0xa8
- SizeofIfMsghdr = 0xa8
- sizeofIfData = 0x98
- SizeofIfData = 0x98
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfAnnounceMsghdr = 0x18
- SizeofRtMsghdr = 0x98
- SizeofRtMetrics = 0x70
-)
-
-type ifMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data ifData
-}
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type ifData struct {
- Type uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Vhid uint8
- Baudrate_pf uint8
- Datalen uint8
- Mtu uint64
- Metric uint64
- Baudrate uint64
- Ipackets uint64
- Ierrors uint64
- Opackets uint64
- Oerrors uint64
- Collisions uint64
- Ibytes uint64
- Obytes uint64
- Imcasts uint64
- Omcasts uint64
- Iqdrops uint64
- Noproto uint64
- Hwassist uint64
- Epoch int64
- Lastchange Timeval
-}
-
-type IfData struct {
- Type uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Spare_char1 uint8
- Spare_char2 uint8
- Datalen uint8
- Mtu uint64
- Metric uint64
- Baudrate uint64
- Ipackets uint64
- Ierrors uint64
- Opackets uint64
- Oerrors uint64
- Collisions uint64
- Ibytes uint64
- Obytes uint64
- Imcasts uint64
- Omcasts uint64
- Iqdrops uint64
- Noproto uint64
- Hwassist uint64
- Epoch int64
- Lastchange Timeval
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Name [16]int8
- What uint16
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Fmask int32
- Inits uint64
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint64
- Mtu uint64
- Hopcount uint64
- Expire uint64
- Recvpipe uint64
- Sendpipe uint64
- Ssthresh uint64
- Rtt uint64
- Rttvar uint64
- Pksent uint64
- Weight uint64
- Filler [3]uint64
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfZbuf = 0x18
- SizeofBpfProgram = 0x10
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x20
- SizeofBpfZbufHeader = 0x20
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfZbuf struct {
- Bufa *byte
- Bufb *byte
- Buflen uint64
-}
-
-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 Timeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [6]byte
-}
-
-type BpfZbufHeader struct {
- Kernel_gen uint32
- Kernel_len uint32
- User_gen uint32
- X_bzh_pad [5]uint32
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/src/pkg/syscall/ztypes_freebsd_arm.go b/src/pkg/syscall/ztypes_freebsd_arm.go
deleted file mode 100644
index 9303816f9..000000000
--- a/src/pkg/syscall/ztypes_freebsd_arm.go
+++ /dev/null
@@ -1,495 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -fsigned-char types_freebsd.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 int64
- Nsec int32
- Pad_cgo_0 [4]byte
-}
-
-type Timeval struct {
- Sec int64
- Usec int32
- Pad_cgo_0 [4]byte
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int32
- Ixrss int32
- Idrss int32
- Isrss int32
- Minflt int32
- Majflt int32
- Nswap int32
- Inblock int32
- Oublock int32
- Msgsnd int32
- Msgrcv int32
- Nsignals int32
- Nvcsw int32
- Nivcsw int32
-}
-
-type Rlimit struct {
- Cur int64
- Max int64
-}
-
-type _Gid_t uint32
-
-const (
- S_IFMT = 0xf000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
- S_ISUID = 0x800
- S_ISGID = 0x400
- S_ISVTX = 0x200
- S_IRUSR = 0x100
- S_IWUSR = 0x80
- S_IXUSR = 0x40
-)
-
-type Stat_t struct {
- Dev uint32
- Ino uint32
- Mode uint16
- Nlink uint16
- Uid uint32
- Gid uint32
- Rdev uint32
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Lspare int32
- Birthtimespec Timespec
-}
-
-type Statfs_t struct {
- Version uint32
- Type uint32
- Flags uint64
- Bsize uint64
- Iosize uint64
- Blocks uint64
- Bfree uint64
- Bavail int64
- Files uint64
- Ffree int64
- Syncwrites uint64
- Asyncwrites uint64
- Syncreads uint64
- Asyncreads uint64
- Spare [10]uint64
- Namemax uint32
- Owner uint32
- Fsid Fsid
- Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [88]int8
- Mntonname [88]int8
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
- Sysid int32
- Pad_cgo_0 [4]byte
-}
-
-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 [46]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 IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x36
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter int16
- Flags uint16
- Fflags uint32
- Data int32
- Udata *byte
-}
-
-type FdSet struct {
- X__fds_bits [32]uint32
-}
-
-const (
- sizeofIfMsghdr = 0x70
- SizeofIfMsghdr = 0x70
- sizeofIfData = 0x60
- SizeofIfData = 0x60
- SizeofIfaMsghdr = 0x14
- SizeofIfmaMsghdr = 0x10
- SizeofIfAnnounceMsghdr = 0x18
- SizeofRtMsghdr = 0x5c
- SizeofRtMetrics = 0x38
-)
-
-type ifMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data ifData
-}
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type ifData struct {
- Type uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Vhid uint8
- Baudrate_pf uint8
- Datalen uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Hwassist uint64
- Epoch int64
- Lastchange Timeval
-}
-
-type IfData struct {
- Type uint8
- Physical uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Spare_char1 uint8
- Spare_char2 uint8
- Datalen uint8
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Hwassist uint32
- Pad_cgo_0 [4]byte
- Epoch int64
- Lastchange Timeval
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type IfmaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Name [16]int8
- What uint16
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Fmask int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint32
- Mtu uint32
- Hopcount uint32
- Expire uint32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pksent uint32
- Weight uint32
- Filler [3]uint32
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x8
- SizeofBpfZbuf = 0xc
- SizeofBpfProgram = 0x8
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x20
- SizeofBpfZbufHeader = 0x20
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint32
- Drop uint32
-}
-
-type BpfZbuf struct {
- Bufa *byte
- Bufb *byte
- Buflen uint32
-}
-
-type BpfProgram struct {
- Len uint32
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfHdr struct {
- Tstamp Timeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [6]byte
-}
-
-type BpfZbufHeader struct {
- Kernel_gen uint32
- Kernel_len uint32
- User_gen uint32
- X_bzh_pad [5]uint32
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/src/pkg/syscall/ztypes_linux_386.go b/src/pkg/syscall/ztypes_linux_386.go
deleted file mode 100644
index daecb1ded..000000000
--- a/src/pkg/syscall/ztypes_linux_386.go
+++ /dev/null
@@ -1,690 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_linux.go
-
-package syscall
-
-const (
- sizeofPtr = 0x4
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x4
- sizeofLongLong = 0x8
- PathMax = 0x1000
-)
-
-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 Timex struct {
- Modes uint32
- Offset int32
- Freq int32
- Maxerror int32
- Esterror int32
- Status int32
- Constant int32
- Precision int32
- Tolerance int32
- Time Timeval
- Tick int32
- Ppsfreq int32
- Jitter int32
- Shift int32
- Stabil int32
- Jitcnt int32
- Calcnt int32
- Errcnt int32
- Stbcnt int32
- Tai int32
- Pad_cgo_0 [44]byte
-}
-
-type Time_t int32
-
-type Tms struct {
- Utime int32
- Stime int32
- Cutime int32
- Cstime int32
-}
-
-type Utimbuf struct {
- Actime int32
- Modtime 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
-
-type Stat_t struct {
- Dev uint64
- X__pad1 uint16
- Pad_cgo_0 [2]byte
- X__st_ino uint32
- Mode uint32
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint64
- X__pad2 uint16
- Pad_cgo_1 [2]byte
- Size int64
- Blksize int32
- Blocks int64
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Ino uint64
-}
-
-type Statfs_t struct {
- Type int32
- Bsize int32
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Namelen int32
- Frsize int32
- Flags int32
- Spare [4]int32
-}
-
-type Dirent struct {
- Ino uint64
- Off int64
- Reclen uint16
- Type uint8
- Name [256]int8
- Pad_cgo_0 [1]byte
-}
-
-type Fsid struct {
- X__val [2]int32
-}
-
-type Flock_t struct {
- Type int16
- Whence int16
- Start int64
- Len int64
- Pid int32
-}
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [96]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen uint32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
- X__cmsg_data [0]uint8
-}
-
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Pad_cgo_0 [2]byte
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
-)
-
-const (
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_MAX = 0x1d
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- X__ifi_pad uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x8
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Pad_cgo_0 [2]byte
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
- Name [0]uint8
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
- Ebx int32
- Ecx int32
- Edx int32
- Esi int32
- Edi int32
- Ebp int32
- Eax int32
- Xds int32
- Xes int32
- Xfs int32
- Xgs int32
- Orig_eax int32
- Eip int32
- Xcs int32
- Eflags int32
- Esp int32
- Xss int32
-}
-
-type FdSet struct {
- Bits [32]int32
-}
-
-type Sysinfo_t struct {
- Uptime int32
- Loads [3]uint32
- Totalram uint32
- Freeram uint32
- Sharedram uint32
- Bufferram uint32
- Totalswap uint32
- Freeswap uint32
- Procs uint16
- Pad uint16
- Totalhigh uint32
- Freehigh uint32
- Unit uint32
- X_f [8]int8
-}
-
-type Utsname struct {
- Sysname [65]int8
- Nodename [65]int8
- Release [65]int8
- Version [65]int8
- Machine [65]int8
- Domainname [65]int8
-}
-
-type Ustat_t struct {
- Tfree int32
- Tinode uint32
- Fname [6]int8
- Fpack [6]int8
-}
-
-type EpollEvent struct {
- Events uint32
- Fd int32
- Pad int32
-}
-
-const (
- _AT_FDCWD = -0x64
-)
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Line uint8
- Cc [32]uint8
- Pad_cgo_0 [3]byte
- Ispeed uint32
- Ospeed uint32
-}
-
-const (
- VINTR = 0x0
- VQUIT = 0x1
- VERASE = 0x2
- VKILL = 0x3
- VEOF = 0x4
- VTIME = 0x5
- VMIN = 0x6
- VSWTC = 0x7
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VEOL = 0xb
- VREPRINT = 0xc
- VDISCARD = 0xd
- VWERASE = 0xe
- VLNEXT = 0xf
- VEOL2 = 0x10
- IGNBRK = 0x1
- BRKINT = 0x2
- IGNPAR = 0x4
- PARMRK = 0x8
- INPCK = 0x10
- ISTRIP = 0x20
- INLCR = 0x40
- IGNCR = 0x80
- ICRNL = 0x100
- IUCLC = 0x200
- IXON = 0x400
- IXANY = 0x800
- IXOFF = 0x1000
- IMAXBEL = 0x2000
- IUTF8 = 0x4000
- OPOST = 0x1
- OLCUC = 0x2
- ONLCR = 0x4
- OCRNL = 0x8
- ONOCR = 0x10
- ONLRET = 0x20
- OFILL = 0x40
- OFDEL = 0x80
- B0 = 0x0
- B50 = 0x1
- B75 = 0x2
- B110 = 0x3
- B134 = 0x4
- B150 = 0x5
- B200 = 0x6
- B300 = 0x7
- B600 = 0x8
- B1200 = 0x9
- B1800 = 0xa
- B2400 = 0xb
- B4800 = 0xc
- B9600 = 0xd
- B19200 = 0xe
- B38400 = 0xf
- CSIZE = 0x30
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSTOPB = 0x40
- CREAD = 0x80
- PARENB = 0x100
- PARODD = 0x200
- HUPCL = 0x400
- CLOCAL = 0x800
- B57600 = 0x1001
- B115200 = 0x1002
- B230400 = 0x1003
- B460800 = 0x1004
- B500000 = 0x1005
- B576000 = 0x1006
- B921600 = 0x1007
- B1000000 = 0x1008
- B1152000 = 0x1009
- B1500000 = 0x100a
- B2000000 = 0x100b
- B2500000 = 0x100c
- B3000000 = 0x100d
- B3500000 = 0x100e
- B4000000 = 0x100f
- ISIG = 0x1
- ICANON = 0x2
- XCASE = 0x4
- ECHO = 0x8
- ECHOE = 0x10
- ECHOK = 0x20
- ECHONL = 0x40
- NOFLSH = 0x80
- TOSTOP = 0x100
- ECHOCTL = 0x200
- ECHOPRT = 0x400
- ECHOKE = 0x800
- FLUSHO = 0x1000
- PENDIN = 0x4000
- IEXTEN = 0x8000
- TCGETS = 0x5401
- TCSETS = 0x5402
-)
diff --git a/src/pkg/syscall/ztypes_linux_amd64.go b/src/pkg/syscall/ztypes_linux_amd64.go
deleted file mode 100644
index 694fe1eac..000000000
--- a/src/pkg/syscall/ztypes_linux_amd64.go
+++ /dev/null
@@ -1,708 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_linux.go
-
-package syscall
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
- PathMax = 0x1000
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Timex struct {
- Modes uint32
- Pad_cgo_0 [4]byte
- Offset int64
- Freq int64
- Maxerror int64
- Esterror int64
- Status int32
- Pad_cgo_1 [4]byte
- Constant int64
- Precision int64
- Tolerance int64
- Time Timeval
- Tick int64
- Ppsfreq int64
- Jitter int64
- Shift int32
- Pad_cgo_2 [4]byte
- Stabil int64
- Jitcnt int64
- Calcnt int64
- Errcnt int64
- Stbcnt int64
- Tai int32
- Pad_cgo_3 [44]byte
-}
-
-type Time_t int64
-
-type Tms struct {
- Utime int64
- Stime int64
- Cutime int64
- Cstime int64
-}
-
-type Utimbuf struct {
- Actime int64
- Modtime int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev uint64
- Ino uint64
- Nlink uint64
- Mode uint32
- Uid uint32
- Gid uint32
- X__pad0 int32
- Rdev uint64
- Size int64
- Blksize int64
- Blocks int64
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- X__unused [3]int64
-}
-
-type Statfs_t struct {
- Type int64
- Bsize int64
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Namelen int64
- Frsize int64
- Flags int64
- Spare [4]int64
-}
-
-type Dirent struct {
- Ino uint64
- Off int64
- Reclen uint16
- Type uint8
- Name [256]int8
- Pad_cgo_0 [5]byte
-}
-
-type Fsid struct {
- X__val [2]int32
-}
-
-type Flock_t struct {
- Type int16
- Whence int16
- Pad_cgo_0 [4]byte
- Start int64
- Len int64
- Pid int32
- Pad_cgo_1 [4]byte
-}
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [96]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint64
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Pad_cgo_0 [4]byte
- Iov *Iovec
- Iovlen uint64
- Control *byte
- Controllen uint64
- Flags int32
- Pad_cgo_1 [4]byte
-}
-
-type Cmsghdr struct {
- Len uint64
- Level int32
- Type int32
- X__cmsg_data [0]uint8
-}
-
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Pad_cgo_0 [2]byte
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
-)
-
-const (
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_MAX = 0x1d
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- X__ifi_pad uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Pad_cgo_0 [6]byte
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
- Name [0]uint8
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
- R15 uint64
- R14 uint64
- R13 uint64
- R12 uint64
- Rbp uint64
- Rbx uint64
- R11 uint64
- R10 uint64
- R9 uint64
- R8 uint64
- Rax uint64
- Rcx uint64
- Rdx uint64
- Rsi uint64
- Rdi uint64
- Orig_rax uint64
- Rip uint64
- Cs uint64
- Eflags uint64
- Rsp uint64
- Ss uint64
- Fs_base uint64
- Gs_base uint64
- Ds uint64
- Es uint64
- Fs uint64
- Gs uint64
-}
-
-type FdSet struct {
- Bits [16]int64
-}
-
-type Sysinfo_t struct {
- Uptime int64
- Loads [3]uint64
- Totalram uint64
- Freeram uint64
- Sharedram uint64
- Bufferram uint64
- Totalswap uint64
- Freeswap uint64
- Procs uint16
- Pad uint16
- Pad_cgo_0 [4]byte
- Totalhigh uint64
- Freehigh uint64
- Unit uint32
- X_f [0]byte
- Pad_cgo_1 [4]byte
-}
-
-type Utsname struct {
- Sysname [65]int8
- Nodename [65]int8
- Release [65]int8
- Version [65]int8
- Machine [65]int8
- Domainname [65]int8
-}
-
-type Ustat_t struct {
- Tfree int32
- Pad_cgo_0 [4]byte
- Tinode uint64
- Fname [6]int8
- Fpack [6]int8
- Pad_cgo_1 [4]byte
-}
-
-type EpollEvent struct {
- Events uint32
- Fd int32
- Pad int32
-}
-
-const (
- _AT_FDCWD = -0x64
-)
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Line uint8
- Cc [32]uint8
- Pad_cgo_0 [3]byte
- Ispeed uint32
- Ospeed uint32
-}
-
-const (
- VINTR = 0x0
- VQUIT = 0x1
- VERASE = 0x2
- VKILL = 0x3
- VEOF = 0x4
- VTIME = 0x5
- VMIN = 0x6
- VSWTC = 0x7
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VEOL = 0xb
- VREPRINT = 0xc
- VDISCARD = 0xd
- VWERASE = 0xe
- VLNEXT = 0xf
- VEOL2 = 0x10
- IGNBRK = 0x1
- BRKINT = 0x2
- IGNPAR = 0x4
- PARMRK = 0x8
- INPCK = 0x10
- ISTRIP = 0x20
- INLCR = 0x40
- IGNCR = 0x80
- ICRNL = 0x100
- IUCLC = 0x200
- IXON = 0x400
- IXANY = 0x800
- IXOFF = 0x1000
- IMAXBEL = 0x2000
- IUTF8 = 0x4000
- OPOST = 0x1
- OLCUC = 0x2
- ONLCR = 0x4
- OCRNL = 0x8
- ONOCR = 0x10
- ONLRET = 0x20
- OFILL = 0x40
- OFDEL = 0x80
- B0 = 0x0
- B50 = 0x1
- B75 = 0x2
- B110 = 0x3
- B134 = 0x4
- B150 = 0x5
- B200 = 0x6
- B300 = 0x7
- B600 = 0x8
- B1200 = 0x9
- B1800 = 0xa
- B2400 = 0xb
- B4800 = 0xc
- B9600 = 0xd
- B19200 = 0xe
- B38400 = 0xf
- CSIZE = 0x30
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSTOPB = 0x40
- CREAD = 0x80
- PARENB = 0x100
- PARODD = 0x200
- HUPCL = 0x400
- CLOCAL = 0x800
- B57600 = 0x1001
- B115200 = 0x1002
- B230400 = 0x1003
- B460800 = 0x1004
- B500000 = 0x1005
- B576000 = 0x1006
- B921600 = 0x1007
- B1000000 = 0x1008
- B1152000 = 0x1009
- B1500000 = 0x100a
- B2000000 = 0x100b
- B2500000 = 0x100c
- B3000000 = 0x100d
- B3500000 = 0x100e
- B4000000 = 0x100f
- ISIG = 0x1
- ICANON = 0x2
- XCASE = 0x4
- ECHO = 0x8
- ECHOE = 0x10
- ECHOK = 0x20
- ECHONL = 0x40
- NOFLSH = 0x80
- TOSTOP = 0x100
- ECHOCTL = 0x200
- ECHOPRT = 0x400
- ECHOKE = 0x800
- FLUSHO = 0x1000
- PENDIN = 0x4000
- IEXTEN = 0x8000
- TCGETS = 0x5401
- TCSETS = 0x5402
-)
diff --git a/src/pkg/syscall/ztypes_linux_arm.go b/src/pkg/syscall/ztypes_linux_arm.go
deleted file mode 100644
index 5f21a948d..000000000
--- a/src/pkg/syscall/ztypes_linux_arm.go
+++ /dev/null
@@ -1,679 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_linux.go
-
-package syscall
-
-const (
- sizeofPtr = 0x4
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x4
- sizeofLongLong = 0x8
- PathMax = 0x1000
-)
-
-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 Timex struct {
- Modes uint32
- Offset int32
- Freq int32
- Maxerror int32
- Esterror int32
- Status int32
- Constant int32
- Precision int32
- Tolerance int32
- Time Timeval
- Tick int32
- Ppsfreq int32
- Jitter int32
- Shift int32
- Stabil int32
- Jitcnt int32
- Calcnt int32
- Errcnt int32
- Stbcnt int32
- Tai int32
- Pad_cgo_0 [44]byte
-}
-
-type Time_t int32
-
-type Tms struct {
- Utime int32
- Stime int32
- Cutime int32
- Cstime int32
-}
-
-type Utimbuf struct {
- Actime int32
- Modtime 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
-
-type Stat_t struct {
- Dev uint64
- X__pad1 uint16
- Pad_cgo_0 [2]byte
- X__st_ino uint32
- Mode uint32
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint64
- X__pad2 uint16
- Pad_cgo_1 [6]byte
- Size int64
- Blksize int32
- Pad_cgo_2 [4]byte
- Blocks int64
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Ino uint64
-}
-
-type Statfs_t struct {
- Type int32
- Bsize int32
- Blocks uint64
- Bfree uint64
- Bavail uint64
- Files uint64
- Ffree uint64
- Fsid Fsid
- Namelen int32
- Frsize int32
- Flags int32
- Spare [4]int32
- Pad_cgo_0 [4]byte
-}
-
-type Dirent struct {
- Ino uint64
- Off int64
- Reclen uint16
- Type uint8
- Name [256]uint8
- Pad_cgo_0 [5]byte
-}
-
-type Fsid struct {
- X__val [2]int32
-}
-
-type Flock_t struct {
- Type int16
- Whence int16
- Pad_cgo_0 [4]byte
- Start int64
- Len int64
- Pid int32
- Pad_cgo_1 [4]byte
-}
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]uint8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [96]uint8
-}
-
-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 IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen uint32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
- X__cmsg_data [0]uint8
-}
-
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Pad_cgo_0 [2]byte
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
-)
-
-const (
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_MAX = 0x1d
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- X__ifi_pad uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x8
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Pad_cgo_0 [2]byte
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
- Name [0]uint8
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
- Uregs [18]uint32
-}
-
-type FdSet struct {
- Bits [32]int32
-}
-
-type Sysinfo_t struct {
- Uptime int32
- Loads [3]uint32
- Totalram uint32
- Freeram uint32
- Sharedram uint32
- Bufferram uint32
- Totalswap uint32
- Freeswap uint32
- Procs uint16
- Pad uint16
- Totalhigh uint32
- Freehigh uint32
- Unit uint32
- X_f [8]uint8
-}
-
-type Utsname struct {
- Sysname [65]uint8
- Nodename [65]uint8
- Release [65]uint8
- Version [65]uint8
- Machine [65]uint8
- Domainname [65]uint8
-}
-
-type Ustat_t struct {
- Tfree int32
- Tinode uint32
- Fname [6]uint8
- Fpack [6]uint8
-}
-
-type EpollEvent struct {
- Events uint32
- PadFd int32
- Fd int32
- Pad int32
-}
-
-const (
- _AT_FDCWD = -0x64
-)
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Line uint8
- Cc [32]uint8
- Pad_cgo_0 [3]byte
- Ispeed uint32
- Ospeed uint32
-}
-
-const (
- VINTR = 0x0
- VQUIT = 0x1
- VERASE = 0x2
- VKILL = 0x3
- VEOF = 0x4
- VTIME = 0x5
- VMIN = 0x6
- VSWTC = 0x7
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VEOL = 0xb
- VREPRINT = 0xc
- VDISCARD = 0xd
- VWERASE = 0xe
- VLNEXT = 0xf
- VEOL2 = 0x10
- IGNBRK = 0x1
- BRKINT = 0x2
- IGNPAR = 0x4
- PARMRK = 0x8
- INPCK = 0x10
- ISTRIP = 0x20
- INLCR = 0x40
- IGNCR = 0x80
- ICRNL = 0x100
- IUCLC = 0x200
- IXON = 0x400
- IXANY = 0x800
- IXOFF = 0x1000
- IMAXBEL = 0x2000
- IUTF8 = 0x4000
- OPOST = 0x1
- OLCUC = 0x2
- ONLCR = 0x4
- OCRNL = 0x8
- ONOCR = 0x10
- ONLRET = 0x20
- OFILL = 0x40
- OFDEL = 0x80
- B0 = 0x0
- B50 = 0x1
- B75 = 0x2
- B110 = 0x3
- B134 = 0x4
- B150 = 0x5
- B200 = 0x6
- B300 = 0x7
- B600 = 0x8
- B1200 = 0x9
- B1800 = 0xa
- B2400 = 0xb
- B4800 = 0xc
- B9600 = 0xd
- B19200 = 0xe
- B38400 = 0xf
- CSIZE = 0x30
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSTOPB = 0x40
- CREAD = 0x80
- PARENB = 0x100
- PARODD = 0x200
- HUPCL = 0x400
- CLOCAL = 0x800
- B57600 = 0x1001
- B115200 = 0x1002
- B230400 = 0x1003
- B460800 = 0x1004
- B500000 = 0x1005
- B576000 = 0x1006
- B921600 = 0x1007
- B1000000 = 0x1008
- B1152000 = 0x1009
- B1500000 = 0x100a
- B2000000 = 0x100b
- B2500000 = 0x100c
- B3000000 = 0x100d
- B3500000 = 0x100e
- B4000000 = 0x100f
- ISIG = 0x1
- ICANON = 0x2
- XCASE = 0x4
- ECHO = 0x8
- ECHOE = 0x10
- ECHOK = 0x20
- ECHONL = 0x40
- NOFLSH = 0x80
- TOSTOP = 0x100
- ECHOCTL = 0x200
- ECHOPRT = 0x400
- ECHOKE = 0x800
- FLUSHO = 0x1000
- PENDIN = 0x4000
- IEXTEN = 0x8000
- TCGETS = 0x5401
- TCSETS = 0x5402
-)
diff --git a/src/pkg/syscall/ztypes_netbsd_386.go b/src/pkg/syscall/ztypes_netbsd_386.go
deleted file mode 100644
index 6add325a3..000000000
--- a/src/pkg/syscall/ztypes_netbsd_386.go
+++ /dev/null
@@ -1,394 +0,0 @@
-// 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 int64
- Nsec int32
-}
-
-type Timeval struct {
- Sec int64
- 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
-
-type Stat_t struct {
- Dev uint64
- Mode uint32
- Ino uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint64
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Birthtimespec Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Spare [2]uint32
-}
-
-type Statfs_t [0]byte
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Dirent struct {
- Fileno uint64
- Reclen uint16
- Namlen uint16
- Type uint8
- Name [512]int8
- Pad_cgo_0 [3]byte
-}
-
-type Fsid struct {
- X__fsid_val [2]int32
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x14
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter uint32
- Flags uint32
- Fflags uint32
- Data int64
- Udata int32
-}
-
-type FdSet struct {
- Bits [8]uint32
-}
-
-const (
- SizeofIfMsghdr = 0x98
- SizeofIfData = 0x84
- SizeofIfaMsghdr = 0x18
- SizeofIfAnnounceMsghdr = 0x18
- SizeofRtMsghdr = 0x78
- SizeofRtMetrics = 0x50
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
- Pad_cgo_1 [4]byte
-}
-
-type IfData struct {
- Type uint8
- Addrlen uint8
- Hdrlen uint8
- Pad_cgo_0 [1]byte
- Link_state int32
- Mtu uint64
- Metric uint64
- 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 Timespec
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Metric int32
- Index uint16
- Pad_cgo_0 [6]byte
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Name [16]int8
- What uint16
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits int32
- Pad_cgo_1 [4]byte
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint64
- Mtu uint64
- Hopcount uint64
- Recvpipe uint64
- Sendpipe uint64
- Ssthresh uint64
- Rtt uint64
- Rttvar uint64
- Expire int64
- Pksent int64
-}
-
-type Mclpool [0]byte
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x80
- SizeofBpfProgram = 0x8
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint64
- Drop uint64
- Capt uint64
- Padding [13]uint64
-}
-
-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 int32
- Usec int32
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed int32
- Ospeed int32
-}
-
-type Sysctlnode struct {
- Flags uint32
- Num int32
- Name [32]int8
- Ver uint32
- X__rsvd uint32
- Un [16]byte
- X_sysctl_size [8]byte
- X_sysctl_func [8]byte
- X_sysctl_parent [8]byte
- X_sysctl_desc [8]byte
-}
diff --git a/src/pkg/syscall/ztypes_netbsd_amd64.go b/src/pkg/syscall/ztypes_netbsd_amd64.go
deleted file mode 100644
index 4451fc1f0..000000000
--- a/src/pkg/syscall/ztypes_netbsd_amd64.go
+++ /dev/null
@@ -1,401 +0,0 @@
-// 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 int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int32
- Pad_cgo_0 [4]byte
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
- Dev uint64
- Mode uint32
- Pad_cgo_0 [4]byte
- Ino uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Pad_cgo_1 [4]byte
- Rdev uint64
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Birthtimespec Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Spare [2]uint32
- Pad_cgo_2 [4]byte
-}
-
-type Statfs_t [0]byte
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Dirent struct {
- Fileno uint64
- Reclen uint16
- Namlen uint16
- Type uint8
- Name [512]int8
- Pad_cgo_0 [3]byte
-}
-
-type Fsid struct {
- X__fsid_val [2]int32
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
-}
-
-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 int32
- 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
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x14
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x30
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint64
- Filter uint32
- Flags uint32
- Fflags uint32
- Pad_cgo_0 [4]byte
- Data int64
- Udata int64
-}
-
-type FdSet struct {
- Bits [8]uint32
-}
-
-const (
- SizeofIfMsghdr = 0x98
- SizeofIfData = 0x88
- SizeofIfaMsghdr = 0x18
- SizeofIfAnnounceMsghdr = 0x18
- SizeofRtMsghdr = 0x78
- SizeofRtMetrics = 0x50
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Addrlen uint8
- Hdrlen uint8
- Pad_cgo_0 [1]byte
- Link_state int32
- Mtu uint64
- Metric uint64
- 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 Timespec
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Metric int32
- Index uint16
- Pad_cgo_0 [6]byte
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Name [16]int8
- What uint16
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits int32
- Pad_cgo_1 [4]byte
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint64
- Mtu uint64
- Hopcount uint64
- Recvpipe uint64
- Sendpipe uint64
- Ssthresh uint64
- Rtt uint64
- Rttvar uint64
- Expire int64
- Pksent int64
-}
-
-type Mclpool [0]byte
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x80
- SizeofBpfProgram = 0x10
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x20
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint64
- Drop uint64
- Capt uint64
- Padding [13]uint64
-}
-
-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 [6]byte
-}
-
-type BpfTimeval struct {
- Sec int64
- Usec int64
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed int32
- Ospeed int32
-}
-
-type Sysctlnode struct {
- Flags uint32
- Num int32
- Name [32]int8
- Ver uint32
- X__rsvd uint32
- Un [16]byte
- X_sysctl_size [8]byte
- X_sysctl_func [8]byte
- X_sysctl_parent [8]byte
- X_sysctl_desc [8]byte
-}
diff --git a/src/pkg/syscall/ztypes_netbsd_arm.go b/src/pkg/syscall/ztypes_netbsd_arm.go
deleted file mode 100644
index 4e853eaa2..000000000
--- a/src/pkg/syscall/ztypes_netbsd_arm.go
+++ /dev/null
@@ -1,399 +0,0 @@
-// 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 int64
- Nsec int32
- Pad_cgo_0 [4]byte
-}
-
-type Timeval struct {
- Sec int64
- Usec int32
- Pad_cgo_0 [4]byte
-}
-
-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
-
-type Stat_t struct {
- Dev uint64
- Mode uint32
- Pad_cgo_0 [4]byte
- Ino uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Pad_cgo_1 [4]byte
- Rdev uint64
- Atimespec Timespec
- Mtimespec Timespec
- Ctimespec Timespec
- Birthtimespec Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Spare [2]uint32
- Pad_cgo_2 [4]byte
-}
-
-type Statfs_t [0]byte
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Dirent struct {
- Fileno uint64
- Reclen uint16
- Namlen uint16
- Type uint8
- Name [512]int8
- Pad_cgo_0 [3]byte
-}
-
-type Fsid struct {
- X__fsid_val [2]int32
-}
-
-type RawSockaddrInet4 struct {
- Len uint8
- Family uint8
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Len uint8
- Family uint8
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Len uint8
- Family uint8
- Path [104]int8
-}
-
-type RawSockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
-}
-
-type RawSockaddr struct {
- Len uint8
- Family uint8
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *byte
- Len uint32
-}
-
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type Msghdr struct {
- Name *byte
- Namelen uint32
- Iov *Iovec
- Iovlen int32
- Control *byte
- Controllen uint32
- Flags int32
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x14
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter uint32
- Flags uint32
- Fflags uint32
- Data int64
- Udata int32
- Pad_cgo_0 [4]byte
-}
-
-type FdSet struct {
- Bits [8]uint32
-}
-
-const (
- SizeofIfMsghdr = 0x98
- SizeofIfData = 0x88
- SizeofIfaMsghdr = 0x18
- SizeofIfAnnounceMsghdr = 0x18
- SizeofRtMsghdr = 0x78
- SizeofRtMetrics = 0x50
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Addrlen uint8
- Hdrlen uint8
- Pad_cgo_0 [1]byte
- Link_state int32
- Mtu uint64
- Metric uint64
- 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 Timespec
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Metric int32
- Index uint16
- Pad_cgo_0 [6]byte
-}
-
-type IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Name [16]int8
- What uint16
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits int32
- Pad_cgo_1 [4]byte
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint64
- Mtu uint64
- Hopcount uint64
- Recvpipe uint64
- Sendpipe uint64
- Ssthresh uint64
- Rtt uint64
- Rttvar uint64
- Expire int64
- Pksent int64
-}
-
-type Mclpool [0]byte
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x80
- SizeofBpfProgram = 0x8
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint64
- Drop uint64
- Capt uint64
- Padding [13]uint64
-}
-
-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 int32
- Usec int32
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed int32
- Ospeed int32
-}
-
-type Sysctlnode struct {
- Flags uint32
- Num int32
- Name [32]int8
- Ver uint32
- X__rsvd uint32
- Un [16]byte
- X_sysctl_size [8]byte
- X_sysctl_func [8]byte
- X_sysctl_parent [8]byte
- X_sysctl_desc [8]byte
-}
diff --git a/src/pkg/syscall/ztypes_openbsd_386.go b/src/pkg/syscall/ztypes_openbsd_386.go
deleted file mode 100644
index 2e4d9dd17..000000000
--- a/src/pkg/syscall/ztypes_openbsd_386.go
+++ /dev/null
@@ -1,439 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_openbsd.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 int64
- Nsec int32
-}
-
-type Timeval struct {
- Sec int64
- 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 {
- Mode uint32
- Dev int32
- Ino uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev int32
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- X__st_birthtim Timespec
-}
-
-type Statfs_t struct {
- F_flags uint32
- F_bsize uint32
- F_iosize uint32
- F_blocks uint64
- F_bfree uint64
- F_bavail int64
- F_files uint64
- F_ffree uint64
- F_favail int64
- F_syncwrites uint64
- F_syncreads uint64
- F_asyncwrites uint64
- F_asyncreads uint64
- F_fsid Fsid
- F_namemax uint32
- F_owner uint32
- F_ctime uint64
- F_fstypename [16]int8
- F_mntonname [90]int8
- F_mntfromname [90]int8
- F_mntfromspec [90]int8
- Pad_cgo_0 [2]byte
- Mount_info [160]byte
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Dirent struct {
- Fileno uint64
- Off int64
- Reclen uint16
- Type uint8
- Namlen uint8
- X__d_padding [4]uint8
- Name [256]int8
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-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
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x20
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint32
- Filter int16
- Flags uint16
- Fflags uint32
- Data int64
- Udata *byte
-}
-
-type FdSet struct {
- Bits [32]uint32
-}
-
-const (
- SizeofIfMsghdr = 0xec
- SizeofIfData = 0xd4
- SizeofIfaMsghdr = 0x18
- SizeofIfAnnounceMsghdr = 0x1a
- SizeofRtMsghdr = 0x60
- SizeofRtMetrics = 0x38
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Hdrlen uint16
- Index uint16
- Tableid uint16
- Pad1 uint8
- Pad2 uint8
- Addrs int32
- Flags int32
- Xflags int32
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Mtu uint32
- Metric uint32
- 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 IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Hdrlen uint16
- Index uint16
- What uint16
- Name [16]int8
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Hdrlen uint16
- Index uint16
- Tableid uint16
- Priority uint8
- Mpls uint8
- Addrs int32
- Flags int32
- Fmask int32
- Pid int32
- Seq int32
- Errno int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Pksent uint64
- Expire int64
- Locks uint32
- Mtu uint32
- Refcnt uint32
- Hopcount uint32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pad uint32
-}
-
-type Mclpool struct {
- Grown int32
- 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
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed int32
- Ospeed int32
-}
diff --git a/src/pkg/syscall/ztypes_openbsd_amd64.go b/src/pkg/syscall/ztypes_openbsd_amd64.go
deleted file mode 100644
index f07bc714e..000000000
--- a/src/pkg/syscall/ztypes_openbsd_amd64.go
+++ /dev/null
@@ -1,446 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_openbsd.go
-
-package syscall
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Rusage struct {
- Utime Timeval
- Stime Timeval
- Maxrss int64
- Ixrss int64
- Idrss int64
- Isrss int64
- Minflt int64
- Majflt int64
- Nswap int64
- Inblock int64
- Oublock int64
- Msgsnd int64
- Msgrcv int64
- Nsignals int64
- Nvcsw int64
- Nivcsw int64
-}
-
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
-const (
- S_IFMT = 0xf000
- S_IFIFO = 0x1000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFBLK = 0x6000
- S_IFREG = 0x8000
- S_IFLNK = 0xa000
- S_IFSOCK = 0xc000
- S_ISUID = 0x800
- S_ISGID = 0x400
- S_ISVTX = 0x200
- S_IRUSR = 0x100
- S_IWUSR = 0x80
- S_IXUSR = 0x40
-)
-
-type Stat_t struct {
- Mode uint32
- Dev int32
- Ino uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev int32
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Size int64
- Blocks int64
- Blksize uint32
- Flags uint32
- Gen uint32
- Pad_cgo_0 [4]byte
- X__st_birthtim Timespec
-}
-
-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 uint64
- F_fstypename [16]int8
- F_mntonname [90]int8
- F_mntfromname [90]int8
- F_mntfromspec [90]int8
- Pad_cgo_1 [2]byte
- Mount_info [160]byte
-}
-
-type Flock_t struct {
- Start int64
- Len int64
- Pid int32
- Type int16
- Whence int16
-}
-
-type Dirent struct {
- Fileno uint64
- Off int64
- Reclen uint16
- Type uint8
- Namlen uint8
- X__d_padding [4]uint8
- Name [256]int8
-}
-
-type Fsid struct {
- Val [2]int32
-}
-
-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
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x6c
- SizeofSockaddrUnix = 0x6a
- SizeofSockaddrDatalink = 0x20
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x30
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
-)
-
-const (
- PTRACE_TRACEME = 0x0
- PTRACE_CONT = 0x7
- PTRACE_KILL = 0x8
-)
-
-type Kevent_t struct {
- Ident uint64
- Filter int16
- Flags uint16
- Fflags uint32
- Data int64
- Udata *byte
-}
-
-type FdSet struct {
- Bits [32]uint32
-}
-
-const (
- SizeofIfMsghdr = 0xf8
- SizeofIfData = 0xe0
- SizeofIfaMsghdr = 0x18
- SizeofIfAnnounceMsghdr = 0x1a
- SizeofRtMsghdr = 0x60
- SizeofRtMetrics = 0x38
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Hdrlen uint16
- Index uint16
- Tableid uint16
- Pad1 uint8
- Pad2 uint8
- Addrs int32
- Flags int32
- Xflags int32
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Addrlen uint8
- Hdrlen uint8
- Link_state uint8
- Mtu uint32
- Metric uint32
- 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
- Pad_cgo_0 [4]byte
- Lastchange Timeval
- Mclpool [7]Mclpool
- Pad_cgo_1 [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 IfAnnounceMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Hdrlen uint16
- Index uint16
- What uint16
- Name [16]int8
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Hdrlen uint16
- Index uint16
- Tableid uint16
- Priority uint8
- Mpls uint8
- Addrs int32
- Flags int32
- Fmask int32
- Pid int32
- Seq int32
- Errno int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Pksent uint64
- Expire int64
- Locks uint32
- Mtu uint32
- Refcnt uint32
- Hopcount uint32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pad uint32
-}
-
-type Mclpool struct {
- Grown int32
- 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
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed int32
- Ospeed int32
-}
diff --git a/src/pkg/syscall/ztypes_plan9_386.go b/src/pkg/syscall/ztypes_plan9_386.go
deleted file mode 100644
index 3e3a8d1f3..000000000
--- a/src/pkg/syscall/ztypes_plan9_386.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// godefs -gsyscall -f -m32 types_plan9.c
-
-// MACHINE GENERATED - DO NOT EDIT.
-
-package syscall
-
-// Constants
-const (
- O_RDONLY = 0
- O_WRONLY = 0x1
- O_RDWR = 0x2
- O_TRUNC = 0x10
- O_CLOEXEC = 0x20
- O_EXCL = 0x1000
- STATMAX = 0xffff
- ERRMAX = 0x80
- MORDER = 0x3
- MREPL = 0
- MBEFORE = 0x1
- MAFTER = 0x2
- MCREATE = 0x4
- MCACHE = 0x10
- MMASK = 0x17
- RFNAMEG = 0x1
- RFENVG = 0x2
- RFFDG = 0x4
- RFNOTEG = 0x8
- RFPROC = 0x10
- RFMEM = 0x20
- RFNOWAIT = 0x40
- RFCNAMEG = 0x400
- RFCENVG = 0x800
- RFCFDG = 0x1000
- RFREND = 0x2000
- RFNOMNT = 0x4000
- QTDIR = 0x80
- QTAPPEND = 0x40
- QTEXCL = 0x20
- QTMOUNT = 0x10
- QTAUTH = 0x8
- QTTMP = 0x4
- QTFILE = 0
- DMDIR = 0x80000000
- DMAPPEND = 0x40000000
- DMEXCL = 0x20000000
- DMMOUNT = 0x10000000
- DMAUTH = 0x8000000
- DMTMP = 0x4000000
- DMREAD = 0x4
- DMWRITE = 0x2
- DMEXEC = 0x1
- STATFIXLEN = 0x31
-)
-
-// Types
-
-type _C_int int32
-
-type Prof struct {
- Pp *[0]byte /* sPlink */
- Next *[0]byte /* sPlink */
- Last *[0]byte /* sPlink */
- First *[0]byte /* sPlink */
- Pid uint32
- What uint32
-}
-
-type Tos struct {
- Prof Prof
- Cyclefreq uint64
- Kcycles int64
- Pcycles int64
- Pid uint32
- Clock uint32
-}
diff --git a/src/pkg/syscall/ztypes_plan9_amd64.go b/src/pkg/syscall/ztypes_plan9_amd64.go
deleted file mode 100644
index 3e3a8d1f3..000000000
--- a/src/pkg/syscall/ztypes_plan9_amd64.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// godefs -gsyscall -f -m32 types_plan9.c
-
-// MACHINE GENERATED - DO NOT EDIT.
-
-package syscall
-
-// Constants
-const (
- O_RDONLY = 0
- O_WRONLY = 0x1
- O_RDWR = 0x2
- O_TRUNC = 0x10
- O_CLOEXEC = 0x20
- O_EXCL = 0x1000
- STATMAX = 0xffff
- ERRMAX = 0x80
- MORDER = 0x3
- MREPL = 0
- MBEFORE = 0x1
- MAFTER = 0x2
- MCREATE = 0x4
- MCACHE = 0x10
- MMASK = 0x17
- RFNAMEG = 0x1
- RFENVG = 0x2
- RFFDG = 0x4
- RFNOTEG = 0x8
- RFPROC = 0x10
- RFMEM = 0x20
- RFNOWAIT = 0x40
- RFCNAMEG = 0x400
- RFCENVG = 0x800
- RFCFDG = 0x1000
- RFREND = 0x2000
- RFNOMNT = 0x4000
- QTDIR = 0x80
- QTAPPEND = 0x40
- QTEXCL = 0x20
- QTMOUNT = 0x10
- QTAUTH = 0x8
- QTTMP = 0x4
- QTFILE = 0
- DMDIR = 0x80000000
- DMAPPEND = 0x40000000
- DMEXCL = 0x20000000
- DMMOUNT = 0x10000000
- DMAUTH = 0x8000000
- DMTMP = 0x4000000
- DMREAD = 0x4
- DMWRITE = 0x2
- DMEXEC = 0x1
- STATFIXLEN = 0x31
-)
-
-// Types
-
-type _C_int int32
-
-type Prof struct {
- Pp *[0]byte /* sPlink */
- Next *[0]byte /* sPlink */
- Last *[0]byte /* sPlink */
- First *[0]byte /* sPlink */
- Pid uint32
- What uint32
-}
-
-type Tos struct {
- Prof Prof
- Cyclefreq uint64
- Kcycles int64
- Pcycles int64
- Pid uint32
- Clock uint32
-}
diff --git a/src/pkg/syscall/ztypes_solaris_amd64.go b/src/pkg/syscall/ztypes_solaris_amd64.go
deleted file mode 100644
index 77275a54e..000000000
--- a/src/pkg/syscall/ztypes_solaris_amd64.go
+++ /dev/null
@@ -1,365 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_solaris.go
-
-package syscall
-
-const (
- sizeofPtr = 0x8
- sizeofShort = 0x2
- sizeofInt = 0x4
- sizeofLong = 0x8
- sizeofLongLong = 0x8
-)
-
-type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
-)
-
-type Timespec struct {
- Sec int64
- Nsec int64
-}
-
-type Timeval struct {
- Sec int64
- Usec int64
-}
-
-type Timeval32 struct {
- Sec int32
- Usec int32
-}
-
-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 uint64
- Ino uint64
- Mode uint32
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint64
- Size int64
- Atim Timespec
- Mtim Timespec
- Ctim Timespec
- Blksize int32
- Pad_cgo_0 [4]byte
- Blocks int64
- Fstype [16]int8
-}
-
-type Flock_t struct {
- Type int16
- Whence int16
- Pad_cgo_0 [4]byte
- Start int64
- Len int64
- Sysid int32
- Pid int32
- Pad [4]int64
-}
-
-type Dirent struct {
- Ino uint64
- Off int64
- Reclen uint16
- Name [1]int8
- Pad_cgo_0 [5]byte
-}
-
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]int8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
- X__sin6_src_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrDatalink struct {
- Family uint16
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [244]int8
-}
-
-type RawSockaddr struct {
- Family uint16
- Data [14]int8
-}
-
-type RawSockaddrAny struct {
- Addr RawSockaddr
- Pad [236]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
-type Iovec struct {
- Base *int8
- 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 int32
- Pad_cgo_1 [4]byte
- Accrights *int8
- Accrightslen int32
- Pad_cgo_2 [4]byte
-}
-
-type Cmsghdr struct {
- Len uint32
- Level int32
- Type int32
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- X__icmp6_filt [8]uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x20
- SizeofSockaddrAny = 0xfc
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrDatalink = 0xfc
- SizeofLinger = 0x8
- SizeofIPMreq = 0x8
- SizeofIPv6Mreq = 0x14
- SizeofMsghdr = 0x30
- SizeofCmsghdr = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x24
- SizeofICMPv6Filter = 0x20
-)
-
-type FdSet struct {
- Bits [1024]int64
-}
-
-const (
- SizeofIfMsghdr = 0x54
- SizeofIfData = 0x44
- SizeofIfaMsghdr = 0x14
- SizeofRtMsghdr = 0x4c
- SizeofRtMetrics = 0x28
-)
-
-type IfMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Data IfData
-}
-
-type IfData struct {
- Type uint8
- Addrlen uint8
- Hdrlen uint8
- Pad_cgo_0 [1]byte
- Mtu uint32
- Metric uint32
- Baudrate uint32
- Ipackets uint32
- Ierrors uint32
- Opackets uint32
- Oerrors uint32
- Collisions uint32
- Ibytes uint32
- Obytes uint32
- Imcasts uint32
- Omcasts uint32
- Iqdrops uint32
- Noproto uint32
- Lastchange Timeval32
-}
-
-type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- Pad_cgo_0 [2]byte
- Metric int32
-}
-
-type RtMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Index uint16
- Pad_cgo_0 [2]byte
- Flags int32
- Addrs int32
- Pid int32
- Seq int32
- Errno int32
- Use int32
- Inits uint32
- Rmx RtMetrics
-}
-
-type RtMetrics struct {
- Locks uint32
- Mtu uint32
- Hopcount uint32
- Expire uint32
- Recvpipe uint32
- Sendpipe uint32
- Ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Pksent uint32
-}
-
-const (
- SizeofBpfVersion = 0x4
- SizeofBpfStat = 0x80
- SizeofBpfProgram = 0x10
- SizeofBpfInsn = 0x8
- SizeofBpfHdr = 0x14
-)
-
-type BpfVersion struct {
- Major uint16
- Minor uint16
-}
-
-type BpfStat struct {
- Recv uint64
- Drop uint64
- Capt uint64
- Padding [13]uint64
-}
-
-type BpfProgram struct {
- Len uint32
- Pad_cgo_0 [4]byte
- Insns *BpfInsn
-}
-
-type BpfInsn struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type BpfTimeval struct {
- Sec int32
- Usec int32
-}
-
-type BpfHdr struct {
- Tstamp BpfTimeval
- Caplen uint32
- Datalen uint32
- Hdrlen uint16
- Pad_cgo_0 [2]byte
-}
-
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [19]uint8
- Pad_cgo_0 [1]byte
-}
diff --git a/src/pkg/syscall/ztypes_windows.go b/src/pkg/syscall/ztypes_windows.go
deleted file mode 100644
index a1d77e0b5..000000000
--- a/src/pkg/syscall/ztypes_windows.go
+++ /dev/null
@@ -1,1044 +0,0 @@
-// 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.
-
-package syscall
-
-const (
- // Windows errors.
- ERROR_FILE_NOT_FOUND Errno = 2
- ERROR_PATH_NOT_FOUND Errno = 3
- ERROR_ACCESS_DENIED Errno = 5
- ERROR_NO_MORE_FILES Errno = 18
- ERROR_HANDLE_EOF Errno = 38
- ERROR_NETNAME_DELETED Errno = 64
- ERROR_FILE_EXISTS Errno = 80
- ERROR_BROKEN_PIPE Errno = 109
- ERROR_BUFFER_OVERFLOW Errno = 111
- ERROR_INSUFFICIENT_BUFFER Errno = 122
- ERROR_MOD_NOT_FOUND Errno = 126
- ERROR_PROC_NOT_FOUND Errno = 127
- ERROR_ALREADY_EXISTS Errno = 183
- ERROR_ENVVAR_NOT_FOUND Errno = 203
- ERROR_MORE_DATA Errno = 234
- ERROR_OPERATION_ABORTED Errno = 995
- ERROR_IO_PENDING Errno = 997
- ERROR_NOT_FOUND Errno = 1168
- WSAEACCES Errno = 10013
- WSAECONNRESET Errno = 10054
-)
-
-const (
- // Invented values to support what package os expects.
- O_RDONLY = 0x00000
- O_WRONLY = 0x00001
- O_RDWR = 0x00002
- O_CREAT = 0x00040
- O_EXCL = 0x00080
- O_NOCTTY = 0x00100
- O_TRUNC = 0x00200
- O_NONBLOCK = 0x00800
- O_APPEND = 0x00400
- O_SYNC = 0x01000
- O_ASYNC = 0x02000
- O_CLOEXEC = 0x80000
-)
-
-const (
- // More invented values for signals
- SIGHUP = Signal(0x1)
- SIGINT = Signal(0x2)
- SIGQUIT = Signal(0x3)
- SIGILL = Signal(0x4)
- SIGTRAP = Signal(0x5)
- SIGABRT = Signal(0x6)
- SIGBUS = Signal(0x7)
- SIGFPE = Signal(0x8)
- SIGKILL = Signal(0x9)
- SIGSEGV = Signal(0xb)
- SIGPIPE = Signal(0xd)
- SIGALRM = Signal(0xe)
- SIGTERM = Signal(0xf)
-)
-
-var signals = [...]string{
- 1: "hangup",
- 2: "interrupt",
- 3: "quit",
- 4: "illegal instruction",
- 5: "trace/breakpoint trap",
- 6: "aborted",
- 7: "bus error",
- 8: "floating point exception",
- 9: "killed",
- 10: "user defined signal 1",
- 11: "segmentation fault",
- 12: "user defined signal 2",
- 13: "broken pipe",
- 14: "alarm clock",
- 15: "terminated",
-}
-
-const (
- GENERIC_READ = 0x80000000
- GENERIC_WRITE = 0x40000000
- GENERIC_EXECUTE = 0x20000000
- GENERIC_ALL = 0x10000000
-
- FILE_LIST_DIRECTORY = 0x00000001
- FILE_APPEND_DATA = 0x00000004
- FILE_WRITE_ATTRIBUTES = 0x00000100
-
- FILE_SHARE_READ = 0x00000001
- FILE_SHARE_WRITE = 0x00000002
- FILE_SHARE_DELETE = 0x00000004
- FILE_ATTRIBUTE_READONLY = 0x00000001
- FILE_ATTRIBUTE_HIDDEN = 0x00000002
- FILE_ATTRIBUTE_SYSTEM = 0x00000004
- FILE_ATTRIBUTE_DIRECTORY = 0x00000010
- FILE_ATTRIBUTE_ARCHIVE = 0x00000020
- FILE_ATTRIBUTE_NORMAL = 0x00000080
-
- INVALID_FILE_ATTRIBUTES = 0xffffffff
-
- CREATE_NEW = 1
- CREATE_ALWAYS = 2
- OPEN_EXISTING = 3
- OPEN_ALWAYS = 4
- TRUNCATE_EXISTING = 5
-
- FILE_FLAG_BACKUP_SEMANTICS = 0x02000000
- FILE_FLAG_OVERLAPPED = 0x40000000
-
- HANDLE_FLAG_INHERIT = 0x00000001
- STARTF_USESTDHANDLES = 0x00000100
- STARTF_USESHOWWINDOW = 0x00000001
- DUPLICATE_CLOSE_SOURCE = 0x00000001
- DUPLICATE_SAME_ACCESS = 0x00000002
-
- STD_INPUT_HANDLE = -10
- STD_OUTPUT_HANDLE = -11
- STD_ERROR_HANDLE = -12
-
- FILE_BEGIN = 0
- FILE_CURRENT = 1
- FILE_END = 2
-
- LANG_ENGLISH = 0x09
- SUBLANG_ENGLISH_US = 0x01
-
- FORMAT_MESSAGE_ALLOCATE_BUFFER = 256
- FORMAT_MESSAGE_IGNORE_INSERTS = 512
- FORMAT_MESSAGE_FROM_STRING = 1024
- FORMAT_MESSAGE_FROM_HMODULE = 2048
- FORMAT_MESSAGE_FROM_SYSTEM = 4096
- FORMAT_MESSAGE_ARGUMENT_ARRAY = 8192
- FORMAT_MESSAGE_MAX_WIDTH_MASK = 255
-
- MAX_PATH = 260
- MAX_LONG_PATH = 32768
-
- MAX_COMPUTERNAME_LENGTH = 15
-
- TIME_ZONE_ID_UNKNOWN = 0
- TIME_ZONE_ID_STANDARD = 1
-
- TIME_ZONE_ID_DAYLIGHT = 2
- IGNORE = 0
- INFINITE = 0xffffffff
-
- WAIT_TIMEOUT = 258
- WAIT_ABANDONED = 0x00000080
- WAIT_OBJECT_0 = 0x00000000
- WAIT_FAILED = 0xFFFFFFFF
-
- CREATE_NEW_PROCESS_GROUP = 0x00000200
- CREATE_UNICODE_ENVIRONMENT = 0x00000400
-
- PROCESS_TERMINATE = 1
- PROCESS_QUERY_INFORMATION = 0x00000400
- SYNCHRONIZE = 0x00100000
-
- PAGE_READONLY = 0x02
- PAGE_READWRITE = 0x04
- PAGE_WRITECOPY = 0x08
- PAGE_EXECUTE_READ = 0x20
- PAGE_EXECUTE_READWRITE = 0x40
- PAGE_EXECUTE_WRITECOPY = 0x80
-
- FILE_MAP_COPY = 0x01
- FILE_MAP_WRITE = 0x02
- FILE_MAP_READ = 0x04
- FILE_MAP_EXECUTE = 0x20
-
- CTRL_C_EVENT = 0
- CTRL_BREAK_EVENT = 1
-)
-
-const (
- // do not reorder
- FILE_NOTIFY_CHANGE_FILE_NAME = 1 << iota
- FILE_NOTIFY_CHANGE_DIR_NAME
- FILE_NOTIFY_CHANGE_ATTRIBUTES
- FILE_NOTIFY_CHANGE_SIZE
- FILE_NOTIFY_CHANGE_LAST_WRITE
- FILE_NOTIFY_CHANGE_LAST_ACCESS
- FILE_NOTIFY_CHANGE_CREATION
-)
-
-const (
- // do not reorder
- FILE_ACTION_ADDED = iota + 1
- FILE_ACTION_REMOVED
- FILE_ACTION_MODIFIED
- FILE_ACTION_RENAMED_OLD_NAME
- FILE_ACTION_RENAMED_NEW_NAME
-)
-
-const (
- // wincrypt.h
- PROV_RSA_FULL = 1
- PROV_RSA_SIG = 2
- PROV_DSS = 3
- PROV_FORTEZZA = 4
- PROV_MS_EXCHANGE = 5
- PROV_SSL = 6
- PROV_RSA_SCHANNEL = 12
- PROV_DSS_DH = 13
- PROV_EC_ECDSA_SIG = 14
- PROV_EC_ECNRA_SIG = 15
- PROV_EC_ECDSA_FULL = 16
- PROV_EC_ECNRA_FULL = 17
- PROV_DH_SCHANNEL = 18
- PROV_SPYRUS_LYNKS = 20
- PROV_RNG = 21
- PROV_INTEL_SEC = 22
- PROV_REPLACE_OWF = 23
- PROV_RSA_AES = 24
- CRYPT_VERIFYCONTEXT = 0xF0000000
- CRYPT_NEWKEYSET = 0x00000008
- CRYPT_DELETEKEYSET = 0x00000010
- CRYPT_MACHINE_KEYSET = 0x00000020
- CRYPT_SILENT = 0x00000040
- CRYPT_DEFAULT_CONTAINER_OPTIONAL = 0x00000080
-
- USAGE_MATCH_TYPE_AND = 0
- USAGE_MATCH_TYPE_OR = 1
-
- X509_ASN_ENCODING = 0x00000001
- PKCS_7_ASN_ENCODING = 0x00010000
-
- CERT_STORE_PROV_MEMORY = 2
-
- CERT_STORE_ADD_ALWAYS = 4
-
- CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG = 0x00000004
-
- CERT_TRUST_NO_ERROR = 0x00000000
- CERT_TRUST_IS_NOT_TIME_VALID = 0x00000001
- CERT_TRUST_IS_REVOKED = 0x00000004
- CERT_TRUST_IS_NOT_SIGNATURE_VALID = 0x00000008
- CERT_TRUST_IS_NOT_VALID_FOR_USAGE = 0x00000010
- CERT_TRUST_IS_UNTRUSTED_ROOT = 0x00000020
- CERT_TRUST_REVOCATION_STATUS_UNKNOWN = 0x00000040
- CERT_TRUST_IS_CYCLIC = 0x00000080
- CERT_TRUST_INVALID_EXTENSION = 0x00000100
- CERT_TRUST_INVALID_POLICY_CONSTRAINTS = 0x00000200
- CERT_TRUST_INVALID_BASIC_CONSTRAINTS = 0x00000400
- CERT_TRUST_INVALID_NAME_CONSTRAINTS = 0x00000800
- CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT = 0x00001000
- CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT = 0x00002000
- CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT = 0x00004000
- CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT = 0x00008000
- CERT_TRUST_IS_OFFLINE_REVOCATION = 0x01000000
- CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY = 0x02000000
- CERT_TRUST_IS_EXPLICIT_DISTRUST = 0x04000000
- CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT = 0x08000000
-
- CERT_CHAIN_POLICY_BASE = 1
- CERT_CHAIN_POLICY_AUTHENTICODE = 2
- CERT_CHAIN_POLICY_AUTHENTICODE_TS = 3
- CERT_CHAIN_POLICY_SSL = 4
- CERT_CHAIN_POLICY_BASIC_CONSTRAINTS = 5
- CERT_CHAIN_POLICY_NT_AUTH = 6
- CERT_CHAIN_POLICY_MICROSOFT_ROOT = 7
- CERT_CHAIN_POLICY_EV = 8
-
- CERT_E_EXPIRED = 0x800B0101
- CERT_E_ROLE = 0x800B0103
- CERT_E_PURPOSE = 0x800B0106
- CERT_E_UNTRUSTEDROOT = 0x800B0109
- CERT_E_CN_NO_MATCH = 0x800B010F
-
- AUTHTYPE_CLIENT = 1
- AUTHTYPE_SERVER = 2
-)
-
-var (
- OID_PKIX_KP_SERVER_AUTH = []byte("1.3.6.1.5.5.7.3.1\x00")
- OID_SERVER_GATED_CRYPTO = []byte("1.3.6.1.4.1.311.10.3.3\x00")
- OID_SGC_NETSCAPE = []byte("2.16.840.1.113730.4.1\x00")
-)
-
-// Invented values to support what package os expects.
-type Timeval struct {
- Sec int32
- Usec int32
-}
-
-func (tv *Timeval) Nanoseconds() int64 {
- return (int64(tv.Sec)*1e6 + int64(tv.Usec)) * 1e3
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- tv.Sec = int32(nsec / 1e9)
- tv.Usec = int32(nsec % 1e9 / 1e3)
- return
-}
-
-type SecurityAttributes struct {
- Length uint32
- SecurityDescriptor uintptr
- InheritHandle uint32
-}
-
-type Overlapped struct {
- Internal uintptr
- InternalHigh uintptr
- Offset uint32
- OffsetHigh uint32
- HEvent Handle
-}
-
-type FileNotifyInformation struct {
- NextEntryOffset uint32
- Action uint32
- FileNameLength uint32
- FileName uint16
-}
-
-type Filetime struct {
- LowDateTime uint32
- HighDateTime uint32
-}
-
-// Nanoseconds returns Filetime ft in nanoseconds
-// since Epoch (00:00:00 UTC, January 1, 1970).
-func (ft *Filetime) Nanoseconds() int64 {
- // 100-nanosecond intervals since January 1, 1601
- nsec := int64(ft.HighDateTime)<<32 + int64(ft.LowDateTime)
- // change starting time to the Epoch (00:00:00 UTC, January 1, 1970)
- nsec -= 116444736000000000
- // convert into nanoseconds
- nsec *= 100
- return nsec
-}
-
-func NsecToFiletime(nsec int64) (ft Filetime) {
- // convert into 100-nanosecond
- nsec /= 100
- // change starting time to January 1, 1601
- nsec += 116444736000000000
- // split into high / low
- ft.LowDateTime = uint32(nsec & 0xffffffff)
- ft.HighDateTime = uint32(nsec >> 32 & 0xffffffff)
- return ft
-}
-
-type Win32finddata struct {
- FileAttributes uint32
- CreationTime Filetime
- LastAccessTime Filetime
- LastWriteTime Filetime
- FileSizeHigh uint32
- FileSizeLow uint32
- Reserved0 uint32
- Reserved1 uint32
- FileName [MAX_PATH - 1]uint16
- AlternateFileName [13]uint16
-}
-
-// This is the actual system call structure.
-// Win32finddata is what we committed to in Go 1.
-type win32finddata1 struct {
- FileAttributes uint32
- CreationTime Filetime
- LastAccessTime Filetime
- LastWriteTime Filetime
- FileSizeHigh uint32
- FileSizeLow uint32
- Reserved0 uint32
- Reserved1 uint32
- FileName [MAX_PATH]uint16
- AlternateFileName [14]uint16
-}
-
-func copyFindData(dst *Win32finddata, src *win32finddata1) {
- dst.FileAttributes = src.FileAttributes
- dst.CreationTime = src.CreationTime
- dst.LastAccessTime = src.LastAccessTime
- dst.LastWriteTime = src.LastWriteTime
- dst.FileSizeHigh = src.FileSizeHigh
- dst.FileSizeLow = src.FileSizeLow
- dst.Reserved0 = src.Reserved0
- dst.Reserved1 = src.Reserved1
-
- // The src is 1 element bigger than dst, but it must be NUL.
- copy(dst.FileName[:], src.FileName[:])
- copy(dst.AlternateFileName[:], src.AlternateFileName[:])
-}
-
-type ByHandleFileInformation struct {
- FileAttributes uint32
- CreationTime Filetime
- LastAccessTime Filetime
- LastWriteTime Filetime
- VolumeSerialNumber uint32
- FileSizeHigh uint32
- FileSizeLow uint32
- NumberOfLinks uint32
- FileIndexHigh uint32
- FileIndexLow uint32
-}
-
-const (
- GetFileExInfoStandard = 0
- GetFileExMaxInfoLevel = 1
-)
-
-type Win32FileAttributeData struct {
- FileAttributes uint32
- CreationTime Filetime
- LastAccessTime Filetime
- LastWriteTime Filetime
- FileSizeHigh uint32
- FileSizeLow uint32
-}
-
-// ShowWindow constants
-const (
- // winuser.h
- SW_HIDE = 0
- SW_NORMAL = 1
- SW_SHOWNORMAL = 1
- SW_SHOWMINIMIZED = 2
- SW_SHOWMAXIMIZED = 3
- SW_MAXIMIZE = 3
- SW_SHOWNOACTIVATE = 4
- SW_SHOW = 5
- SW_MINIMIZE = 6
- SW_SHOWMINNOACTIVE = 7
- SW_SHOWNA = 8
- SW_RESTORE = 9
- SW_SHOWDEFAULT = 10
- SW_FORCEMINIMIZE = 11
-)
-
-type StartupInfo struct {
- Cb uint32
- _ *uint16
- Desktop *uint16
- Title *uint16
- X uint32
- Y uint32
- XSize uint32
- YSize uint32
- XCountChars uint32
- YCountChars uint32
- FillAttribute uint32
- Flags uint32
- ShowWindow uint16
- _ uint16
- _ *byte
- StdInput Handle
- StdOutput Handle
- StdErr Handle
-}
-
-type ProcessInformation struct {
- Process Handle
- Thread Handle
- ProcessId uint32
- ThreadId uint32
-}
-
-type Systemtime struct {
- Year uint16
- Month uint16
- DayOfWeek uint16
- Day uint16
- Hour uint16
- Minute uint16
- Second uint16
- Milliseconds uint16
-}
-
-type Timezoneinformation struct {
- Bias int32
- StandardName [32]uint16
- StandardDate Systemtime
- StandardBias int32
- DaylightName [32]uint16
- DaylightDate Systemtime
- DaylightBias int32
-}
-
-// Socket related.
-
-const (
- AF_UNSPEC = 0
- AF_UNIX = 1
- AF_INET = 2
- AF_INET6 = 23
- AF_NETBIOS = 17
-
- SOCK_STREAM = 1
- SOCK_DGRAM = 2
- SOCK_RAW = 3
- SOCK_SEQPACKET = 5
-
- IPPROTO_IP = 0
- IPPROTO_IPV6 = 0x29
- IPPROTO_TCP = 6
- IPPROTO_UDP = 17
-
- SOL_SOCKET = 0xffff
- SO_REUSEADDR = 4
- SO_KEEPALIVE = 8
- SO_DONTROUTE = 16
- SO_BROADCAST = 32
- SO_LINGER = 128
- SO_RCVBUF = 0x1002
- SO_SNDBUF = 0x1001
- SO_UPDATE_ACCEPT_CONTEXT = 0x700b
- SO_UPDATE_CONNECT_CONTEXT = 0x7010
-
- IOC_OUT = 0x40000000
- IOC_IN = 0x80000000
- IOC_VENDOR = 0x18000000
- IOC_INOUT = IOC_IN | IOC_OUT
- IOC_WS2 = 0x08000000
- SIO_GET_EXTENSION_FUNCTION_POINTER = IOC_INOUT | IOC_WS2 | 6
- SIO_KEEPALIVE_VALS = IOC_IN | IOC_VENDOR | 4
-
- // cf. http://support.microsoft.com/default.aspx?scid=kb;en-us;257460
-
- IP_TOS = 0x3
- IP_TTL = 0x4
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_LOOP = 0xb
- IP_ADD_MEMBERSHIP = 0xc
- IP_DROP_MEMBERSHIP = 0xd
-
- IPV6_V6ONLY = 0x1b
- IPV6_UNICAST_HOPS = 0x4
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
-
- SOMAXCONN = 0x7fffffff
-
- TCP_NODELAY = 1
-
- SHUT_RD = 0
- SHUT_WR = 1
- SHUT_RDWR = 2
-
- WSADESCRIPTION_LEN = 256
- WSASYS_STATUS_LEN = 128
-)
-
-type WSABuf struct {
- Len uint32
- Buf *byte
-}
-
-// Invented values to support what package os expects.
-const (
- S_IFMT = 0x1f000
- 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_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXUSR = 0x40
-)
-
-const (
- FILE_TYPE_CHAR = 0x0002
- FILE_TYPE_DISK = 0x0001
- FILE_TYPE_PIPE = 0x0003
- FILE_TYPE_REMOTE = 0x8000
- FILE_TYPE_UNKNOWN = 0x0000
-)
-
-type Hostent struct {
- Name *byte
- Aliases **byte
- AddrType uint16
- Length uint16
- AddrList **byte
-}
-
-type Protoent struct {
- Name *byte
- Aliases **byte
- Proto uint16
-}
-
-const (
- DNS_TYPE_A = 0x0001
- DNS_TYPE_NS = 0x0002
- DNS_TYPE_MD = 0x0003
- DNS_TYPE_MF = 0x0004
- DNS_TYPE_CNAME = 0x0005
- DNS_TYPE_SOA = 0x0006
- DNS_TYPE_MB = 0x0007
- DNS_TYPE_MG = 0x0008
- DNS_TYPE_MR = 0x0009
- DNS_TYPE_NULL = 0x000a
- DNS_TYPE_WKS = 0x000b
- DNS_TYPE_PTR = 0x000c
- DNS_TYPE_HINFO = 0x000d
- DNS_TYPE_MINFO = 0x000e
- DNS_TYPE_MX = 0x000f
- DNS_TYPE_TEXT = 0x0010
- DNS_TYPE_RP = 0x0011
- DNS_TYPE_AFSDB = 0x0012
- DNS_TYPE_X25 = 0x0013
- DNS_TYPE_ISDN = 0x0014
- DNS_TYPE_RT = 0x0015
- DNS_TYPE_NSAP = 0x0016
- DNS_TYPE_NSAPPTR = 0x0017
- DNS_TYPE_SIG = 0x0018
- DNS_TYPE_KEY = 0x0019
- DNS_TYPE_PX = 0x001a
- DNS_TYPE_GPOS = 0x001b
- DNS_TYPE_AAAA = 0x001c
- DNS_TYPE_LOC = 0x001d
- DNS_TYPE_NXT = 0x001e
- DNS_TYPE_EID = 0x001f
- DNS_TYPE_NIMLOC = 0x0020
- DNS_TYPE_SRV = 0x0021
- DNS_TYPE_ATMA = 0x0022
- DNS_TYPE_NAPTR = 0x0023
- DNS_TYPE_KX = 0x0024
- DNS_TYPE_CERT = 0x0025
- DNS_TYPE_A6 = 0x0026
- DNS_TYPE_DNAME = 0x0027
- DNS_TYPE_SINK = 0x0028
- DNS_TYPE_OPT = 0x0029
- DNS_TYPE_DS = 0x002B
- DNS_TYPE_RRSIG = 0x002E
- DNS_TYPE_NSEC = 0x002F
- DNS_TYPE_DNSKEY = 0x0030
- DNS_TYPE_DHCID = 0x0031
- DNS_TYPE_UINFO = 0x0064
- DNS_TYPE_UID = 0x0065
- DNS_TYPE_GID = 0x0066
- DNS_TYPE_UNSPEC = 0x0067
- DNS_TYPE_ADDRS = 0x00f8
- DNS_TYPE_TKEY = 0x00f9
- DNS_TYPE_TSIG = 0x00fa
- DNS_TYPE_IXFR = 0x00fb
- DNS_TYPE_AXFR = 0x00fc
- DNS_TYPE_MAILB = 0x00fd
- DNS_TYPE_MAILA = 0x00fe
- DNS_TYPE_ALL = 0x00ff
- DNS_TYPE_ANY = 0x00ff
- DNS_TYPE_WINS = 0xff01
- DNS_TYPE_WINSR = 0xff02
- DNS_TYPE_NBSTAT = 0xff01
-)
-
-type DNSSRVData struct {
- Target *uint16
- Priority uint16
- Weight uint16
- Port uint16
- Pad uint16
-}
-
-type DNSPTRData struct {
- Host *uint16
-}
-
-type DNSMXData struct {
- NameExchange *uint16
- Preference uint16
- Pad uint16
-}
-
-type DNSTXTData struct {
- StringCount uint16
- StringArray [1]*uint16
-}
-
-type DNSRecord struct {
- Next *DNSRecord
- Name *uint16
- Type uint16
- Length uint16
- Dw uint32
- Ttl uint32
- Reserved uint32
- Data [40]byte
-}
-
-const (
- TF_DISCONNECT = 1
- TF_REUSE_SOCKET = 2
- TF_WRITE_BEHIND = 4
- TF_USE_DEFAULT_WORKER = 0
- TF_USE_SYSTEM_THREAD = 16
- TF_USE_KERNEL_APC = 32
-)
-
-type TransmitFileBuffers struct {
- Head uintptr
- HeadLength uint32
- Tail uintptr
- TailLength uint32
-}
-
-const (
- IFF_UP = 1
- IFF_BROADCAST = 2
- IFF_LOOPBACK = 4
- IFF_POINTTOPOINT = 8
- IFF_MULTICAST = 16
-)
-
-const SIO_GET_INTERFACE_LIST = 0x4004747F
-
-// TODO(mattn): SockaddrGen is union of sockaddr/sockaddr_in/sockaddr_in6_old.
-// will be fixed to change variable type as suitable.
-
-type SockaddrGen [24]byte
-
-type InterfaceInfo struct {
- Flags uint32
- Address SockaddrGen
- BroadcastAddress SockaddrGen
- Netmask SockaddrGen
-}
-
-type IpAddressString struct {
- String [16]byte
-}
-
-type IpMaskString IpAddressString
-
-type IpAddrString struct {
- Next *IpAddrString
- IpAddress IpAddressString
- IpMask IpMaskString
- Context uint32
-}
-
-const MAX_ADAPTER_NAME_LENGTH = 256
-const MAX_ADAPTER_DESCRIPTION_LENGTH = 128
-const MAX_ADAPTER_ADDRESS_LENGTH = 8
-
-type IpAdapterInfo struct {
- Next *IpAdapterInfo
- ComboIndex uint32
- AdapterName [MAX_ADAPTER_NAME_LENGTH + 4]byte
- Description [MAX_ADAPTER_DESCRIPTION_LENGTH + 4]byte
- AddressLength uint32
- Address [MAX_ADAPTER_ADDRESS_LENGTH]byte
- Index uint32
- Type uint32
- DhcpEnabled uint32
- CurrentIpAddress *IpAddrString
- IpAddressList IpAddrString
- GatewayList IpAddrString
- DhcpServer IpAddrString
- HaveWins bool
- PrimaryWinsServer IpAddrString
- SecondaryWinsServer IpAddrString
- LeaseObtained int64
- LeaseExpires int64
-}
-
-const MAXLEN_PHYSADDR = 8
-const MAX_INTERFACE_NAME_LEN = 256
-const MAXLEN_IFDESCR = 256
-
-type MibIfRow struct {
- Name [MAX_INTERFACE_NAME_LEN]uint16
- Index uint32
- Type uint32
- Mtu uint32
- Speed uint32
- PhysAddrLen uint32
- PhysAddr [MAXLEN_PHYSADDR]byte
- AdminStatus uint32
- OperStatus uint32
- LastChange uint32
- InOctets uint32
- InUcastPkts uint32
- InNUcastPkts uint32
- InDiscards uint32
- InErrors uint32
- InUnknownProtos uint32
- OutOctets uint32
- OutUcastPkts uint32
- OutNUcastPkts uint32
- OutDiscards uint32
- OutErrors uint32
- OutQLen uint32
- DescrLen uint32
- Descr [MAXLEN_IFDESCR]byte
-}
-
-type CertContext struct {
- EncodingType uint32
- EncodedCert *byte
- Length uint32
- CertInfo uintptr
- Store Handle
-}
-
-type CertChainContext struct {
- Size uint32
- TrustStatus CertTrustStatus
- ChainCount uint32
- Chains **CertSimpleChain
- LowerQualityChainCount uint32
- LowerQualityChains **CertChainContext
- HasRevocationFreshnessTime uint32
- RevocationFreshnessTime uint32
-}
-
-type CertSimpleChain struct {
- Size uint32
- TrustStatus CertTrustStatus
- NumElements uint32
- Elements **CertChainElement
- TrustListInfo uintptr
- HasRevocationFreshnessTime uint32
- RevocationFreshnessTime uint32
-}
-
-type CertChainElement struct {
- Size uint32
- CertContext *CertContext
- TrustStatus CertTrustStatus
- RevocationInfo *CertRevocationInfo
- IssuanceUsage *CertEnhKeyUsage
- ApplicationUsage *CertEnhKeyUsage
- ExtendedErrorInfo *uint16
-}
-
-type CertRevocationInfo struct {
- Size uint32
- RevocationResult uint32
- RevocationOid *byte
- OidSpecificInfo uintptr
- HasFreshnessTime uint32
- FreshnessTime uint32
- CrlInfo uintptr // *CertRevocationCrlInfo
-}
-
-type CertTrustStatus struct {
- ErrorStatus uint32
- InfoStatus uint32
-}
-
-type CertUsageMatch struct {
- Type uint32
- Usage CertEnhKeyUsage
-}
-
-type CertEnhKeyUsage struct {
- Length uint32
- UsageIdentifiers **byte
-}
-
-type CertChainPara struct {
- Size uint32
- RequestedUsage CertUsageMatch
- RequstedIssuancePolicy CertUsageMatch
- URLRetrievalTimeout uint32
- CheckRevocationFreshnessTime uint32
- RevocationFreshnessTime uint32
- CacheResync *Filetime
-}
-
-type CertChainPolicyPara struct {
- Size uint32
- Flags uint32
- ExtraPolicyPara uintptr
-}
-
-type SSLExtraCertChainPolicyPara struct {
- Size uint32
- AuthType uint32
- Checks uint32
- ServerName *uint16
-}
-
-type CertChainPolicyStatus struct {
- Size uint32
- Error uint32
- ChainIndex uint32
- ElementIndex uint32
- ExtraPolicyStatus uintptr
-}
-
-const (
- // do not reorder
- HKEY_CLASSES_ROOT = 0x80000000 + iota
- HKEY_CURRENT_USER
- HKEY_LOCAL_MACHINE
- HKEY_USERS
- HKEY_PERFORMANCE_DATA
- HKEY_CURRENT_CONFIG
- HKEY_DYN_DATA
-
- KEY_QUERY_VALUE = 1
- KEY_SET_VALUE = 2
- KEY_CREATE_SUB_KEY = 4
- KEY_ENUMERATE_SUB_KEYS = 8
- KEY_NOTIFY = 16
- KEY_CREATE_LINK = 32
- KEY_WRITE = 0x20006
- KEY_EXECUTE = 0x20019
- KEY_READ = 0x20019
- KEY_WOW64_64KEY = 0x0100
- KEY_WOW64_32KEY = 0x0200
- KEY_ALL_ACCESS = 0xf003f
-)
-
-const (
- // do not reorder
- REG_NONE = iota
- REG_SZ
- REG_EXPAND_SZ
- REG_BINARY
- REG_DWORD_LITTLE_ENDIAN
- REG_DWORD_BIG_ENDIAN
- REG_LINK
- REG_MULTI_SZ
- REG_RESOURCE_LIST
- REG_FULL_RESOURCE_DESCRIPTOR
- REG_RESOURCE_REQUIREMENTS_LIST
- REG_QWORD_LITTLE_ENDIAN
- REG_DWORD = REG_DWORD_LITTLE_ENDIAN
- REG_QWORD = REG_QWORD_LITTLE_ENDIAN
-)
-
-type AddrinfoW struct {
- Flags int32
- Family int32
- Socktype int32
- Protocol int32
- Addrlen uintptr
- Canonname *uint16
- Addr uintptr
- Next *AddrinfoW
-}
-
-const (
- AI_PASSIVE = 1
- AI_CANONNAME = 2
- AI_NUMERICHOST = 4
-)
-
-type GUID struct {
- Data1 uint32
- Data2 uint16
- Data3 uint16
- Data4 [8]byte
-}
-
-var WSAID_CONNECTEX = GUID{
- 0x25a207b9,
- 0xddf3,
- 0x4660,
- [8]byte{0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e},
-}
-
-const (
- FILE_SKIP_COMPLETION_PORT_ON_SUCCESS = 1
- FILE_SKIP_SET_EVENT_ON_HANDLE = 2
-)
-
-const (
- WSAPROTOCOL_LEN = 255
- MAX_PROTOCOL_CHAIN = 7
- BASE_PROTOCOL = 1
- LAYERED_PROTOCOL = 0
-
- XP1_CONNECTIONLESS = 0x00000001
- XP1_GUARANTEED_DELIVERY = 0x00000002
- XP1_GUARANTEED_ORDER = 0x00000004
- XP1_MESSAGE_ORIENTED = 0x00000008
- XP1_PSEUDO_STREAM = 0x00000010
- XP1_GRACEFUL_CLOSE = 0x00000020
- XP1_EXPEDITED_DATA = 0x00000040
- XP1_CONNECT_DATA = 0x00000080
- XP1_DISCONNECT_DATA = 0x00000100
- XP1_SUPPORT_BROADCAST = 0x00000200
- XP1_SUPPORT_MULTIPOINT = 0x00000400
- XP1_MULTIPOINT_CONTROL_PLANE = 0x00000800
- XP1_MULTIPOINT_DATA_PLANE = 0x00001000
- XP1_QOS_SUPPORTED = 0x00002000
- XP1_UNI_SEND = 0x00008000
- XP1_UNI_RECV = 0x00010000
- XP1_IFS_HANDLES = 0x00020000
- XP1_PARTIAL_MESSAGE = 0x00040000
- XP1_SAN_SUPPORT_SDP = 0x00080000
-
- PFL_MULTIPLE_PROTO_ENTRIES = 0x00000001
- PFL_RECOMMENDED_PROTO_ENTRY = 0x00000002
- PFL_HIDDEN = 0x00000004
- PFL_MATCHES_PROTOCOL_ZERO = 0x00000008
- PFL_NETWORKDIRECT_PROVIDER = 0x00000010
-)
-
-type WSAProtocolInfo struct {
- ServiceFlags1 uint32
- ServiceFlags2 uint32
- ServiceFlags3 uint32
- ServiceFlags4 uint32
- ProviderFlags uint32
- ProviderId GUID
- CatalogEntryId uint32
- ProtocolChain WSAProtocolChain
- Version int32
- AddressFamily int32
- MaxSockAddr int32
- MinSockAddr int32
- SocketType int32
- Protocol int32
- ProtocolMaxOffset int32
- NetworkByteOrder int32
- SecurityScheme int32
- MessageSize uint32
- ProviderReserved uint32
- ProtocolName [WSAPROTOCOL_LEN + 1]uint16
-}
-
-type WSAProtocolChain struct {
- ChainLen int32
- ChainEntries [MAX_PROTOCOL_CHAIN]uint32
-}
-
-type TCPKeepalive struct {
- OnOff uint32
- Time uint32
- Interval uint32
-}
diff --git a/src/pkg/syscall/ztypes_windows_386.go b/src/pkg/syscall/ztypes_windows_386.go
deleted file mode 100644
index 734ee6e0f..000000000
--- a/src/pkg/syscall/ztypes_windows_386.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// 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.
-
-package syscall
-
-type WSAData struct {
- Version uint16
- HighVersion uint16
- Description [WSADESCRIPTION_LEN + 1]byte
- SystemStatus [WSASYS_STATUS_LEN + 1]byte
- MaxSockets uint16
- MaxUdpDg uint16
- VendorInfo *byte
-}
-
-type Servent struct {
- Name *byte
- Aliases **byte
- Port uint16
- Proto *byte
-}
diff --git a/src/pkg/syscall/ztypes_windows_amd64.go b/src/pkg/syscall/ztypes_windows_amd64.go
deleted file mode 100644
index 78aa55b2e..000000000
--- a/src/pkg/syscall/ztypes_windows_amd64.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// 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.
-
-package syscall
-
-type WSAData struct {
- Version uint16
- HighVersion uint16
- MaxSockets uint16
- MaxUdpDg uint16
- VendorInfo *byte
- Description [WSADESCRIPTION_LEN + 1]byte
- SystemStatus [WSASYS_STATUS_LEN + 1]byte
-}
-
-type Servent struct {
- Name *byte
- Aliases **byte
- Proto *byte
- Port uint16
-}