Codebase list golang-golang-x-sys / c5557bb9-9b81-4459-a0bb-4897bc493bfd/upstream/sid
Import upstream version 0.0~git20211113.0c823b9 Debian Janitor 2 years ago
201 changed file(s) with 12309 addition(s) and 9398 deletion(s). Raw diff Collapse all Expand all
5555 HasAVX512BF16 bool // Advanced vector extension 512 BFloat16 Instructions
5656 HasBMI1 bool // Bit manipulation instruction set 1
5757 HasBMI2 bool // Bit manipulation instruction set 2
58 HasCX16 bool // Compare and exchange 16 Bytes
5859 HasERMS bool // Enhanced REP for MOVSB and STOSB
5960 HasFMA bool // Fused-multiply-add instructions
6061 HasOSXSAVE bool // OS supports XSAVE/XRESTOR for saving/restoring XMM registers.
4141 }
4242
4343 func TestARM64minimalFeatures(t *testing.T) {
44 if runtime.GOARCH != "arm64" || (runtime.GOOS == "darwin" || runtime.GOOS == "ios") {
44 if runtime.GOARCH != "arm64" || runtime.GOOS == "ios" {
4545 return
4646 }
4747 if !cpu.ARM64.HasASIMD {
3838 {Name: "avx512bf16", Feature: &X86.HasAVX512BF16},
3939 {Name: "bmi1", Feature: &X86.HasBMI1},
4040 {Name: "bmi2", Feature: &X86.HasBMI2},
41 {Name: "cx16", Feature: &X86.HasCX16},
4142 {Name: "erms", Feature: &X86.HasERMS},
4243 {Name: "fma", Feature: &X86.HasFMA},
4344 {Name: "osxsave", Feature: &X86.HasOSXSAVE},
7273 X86.HasPCLMULQDQ = isSet(1, ecx1)
7374 X86.HasSSSE3 = isSet(9, ecx1)
7475 X86.HasFMA = isSet(12, ecx1)
76 X86.HasCX16 = isSet(13, ecx1)
7577 X86.HasSSE41 = isSet(19, ecx1)
7678 X86.HasSSE42 = isSet(20, ecx1)
7779 X86.HasPOPCNT = isSet(23, ecx1)
8789 osSupportsAVX = isSet(1, eax) && isSet(2, eax)
8890
8991 if runtime.GOOS == "darwin" {
90 // Check darwin commpage for AVX512 support. Necessary because:
91 // https://github.com/apple/darwin-xnu/blob/0a798f6738bc1db01281fc08ae024145e84df927/osfmk/i386/fpu.c#L175-L201
92 osSupportsAVX512 = osSupportsAVX && darwinSupportsAVX512()
92 // Darwin doesn't save/restore AVX-512 mask registers correctly across signal handlers.
93 // Since users can't rely on mask register contents, let's not advertise AVX-512 support.
94 // See issue 49233.
95 osSupportsAVX512 = false
9396 } else {
9497 // Check if OPMASK and ZMM registers have OS support.
9598 osSupportsAVX512 = osSupportsAVX && isSet(5, eax) && isSet(6, eax) && isSet(7, eax)
2525 MOVL AX, eax+0(FP)
2626 MOVL DX, edx+4(FP)
2727 RET
28
29 // func darwinSupportsAVX512() bool
30 TEXT ·darwinSupportsAVX512(SB), NOSPLIT, $0-1
31 MOVB $0, ret+0(FP) // default to false
32 #ifdef GOOS_darwin // return if not darwin
33 #ifdef GOARCH_amd64 // return if not amd64
34 // These values from:
35 // https://github.com/apple/darwin-xnu/blob/xnu-4570.1.46/osfmk/i386/cpu_capabilities.h
36 #define commpage64_base_address 0x00007fffffe00000
37 #define commpage64_cpu_capabilities64 (commpage64_base_address+0x010)
38 #define commpage64_version (commpage64_base_address+0x01E)
39 #define hasAVX512F 0x0000004000000000
40 MOVQ $commpage64_version, BX
41 CMPW (BX), $13 // cpu_capabilities64 undefined in versions < 13
42 JL no_avx512
43 MOVQ $commpage64_cpu_capabilities64, BX
44 MOVQ $hasAVX512F, CX
45 TESTQ (BX), CX
46 JZ no_avx512
47 MOVB $1, ret+0(FP)
48 no_avx512:
49 #endif
50 #endif
51 RET
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build ignore
45 // +build ignore
56
67 /*
4849 return "go run mksyscall.go " + strings.Join(os.Args[1:], " ")
4950 }
5051
51 // buildTags returns build tags
52 // goBuildTags returns build tags in the go:build format.
53 func goBuildTags() string {
54 return strings.ReplaceAll(*tags, ",", " && ")
55 }
56
57 // plusBuildTags returns build tags in the +build format.
5258 func buildTags() string {
5359 return *tags
5460 }
376382 }
377383 file.Close()
378384 }
379 fmt.Printf(srcTemplate, cmdLine(), buildTags(), text)
385 fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), plusBuildTags(), text)
380386 }
381387
382388 const srcTemplate = `// %s
383389 // Code generated by the command above; see README.md. DO NOT EDIT.
384390
391 //go:build %s
385392 // +build %s
386393
387394 package plan9
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build go1.5
45 // +build go1.5
56
67 package plan9
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build !go1.5
45 // +build !go1.5
56
67 package plan9
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build plan9 && race
45 // +build plan9,race
56
67 package plan9
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build plan9 && !race
45 // +build plan9,!race
56
67 package plan9
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build plan9
45 // +build plan9
56
67 package plan9
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build plan9
45 // +build plan9
56
67 // Package plan9 contains an interface to the low-level operating system
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build plan9
45 // +build plan9
56
67 package plan9_test
00 // go run mksyscall.go -l32 -plan9 -tags plan9,386 syscall_plan9.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
3 //go:build plan9 && 386
34 // +build plan9,386
45
56 package plan9
00 // go run mksyscall.go -l32 -plan9 -tags plan9,amd64 syscall_plan9.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
3 //go:build plan9 && amd64
34 // +build plan9,amd64
45
56 package plan9
00 // go run mksyscall.go -l32 -plan9 -tags plan9,arm syscall_plan9.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
3 //go:build plan9 && arm
34 // +build plan9,arm
45
56 package plan9
148148 Then, edit the regex (if necessary) to match the desired constant. Avoid making
149149 the regex too broad to avoid matching unintended constants.
150150
151 ### mkmerge.go
151 ### internal/mkmerge
152152
153153 This program is used to extract duplicate const, func, and type declarations
154154 from the generated architecture-specific files listed below, and merge these
88
99 import (
1010 "bytes"
11 "errors"
1112 "net"
1213 "os"
1314 "testing"
15 "time"
1416
1517 "golang.org/x/sys/unix"
1618 )
117119 }
118120 }
119121 }
122
123 func TestPktInfo(t *testing.T) {
124 testcases := []struct {
125 network string
126 address *net.UDPAddr
127 }{
128 {"udp4", &net.UDPAddr{IP: net.ParseIP("127.0.0.1")}},
129 {"udp6", &net.UDPAddr{IP: net.ParseIP("::1")}},
130 }
131 for _, test := range testcases {
132 t.Run(test.network, func(t *testing.T) {
133 conn, err := net.ListenUDP(test.network, test.address)
134 if errors.Is(err, unix.EADDRNOTAVAIL) {
135 t.Skipf("%v is not available", test.address)
136 }
137 if err != nil {
138 t.Fatal("Listen:", err)
139 }
140 defer conn.Close()
141
142 var pktInfo []byte
143 var src net.IP
144 switch test.network {
145 case "udp4":
146 var info4 unix.Inet4Pktinfo
147 src = net.ParseIP("127.0.0.2").To4()
148 copy(info4.Spec_dst[:], src)
149 pktInfo = unix.PktInfo4(&info4)
150
151 case "udp6":
152 var info6 unix.Inet6Pktinfo
153 src = net.ParseIP("2001:0DB8::1")
154 copy(info6.Addr[:], src)
155 pktInfo = unix.PktInfo6(&info6)
156
157 raw, err := conn.SyscallConn()
158 if err != nil {
159 t.Fatal("SyscallConn:", err)
160 }
161 var opErr error
162 err = raw.Control(func(fd uintptr) {
163 opErr = unix.SetsockoptInt(int(fd), unix.SOL_IPV6, unix.IPV6_FREEBIND, 1)
164 })
165 if err != nil {
166 t.Fatal("Control:", err)
167 }
168 if errors.Is(opErr, unix.ENOPROTOOPT) {
169 // Happens on android-amd64-emu, maybe Android has disabled
170 // IPV6_FREEBIND?
171 t.Skip("IPV6_FREEBIND not supported")
172 }
173 if opErr != nil {
174 t.Fatal("Can't enable IPV6_FREEBIND:", opErr)
175 }
176 }
177
178 msg := []byte{1}
179 addr := conn.LocalAddr().(*net.UDPAddr)
180 _, _, err = conn.WriteMsgUDP(msg, pktInfo, addr)
181 if err != nil {
182 t.Fatal("WriteMsgUDP:", err)
183 }
184
185 conn.SetReadDeadline(time.Now().Add(100 * time.Millisecond))
186 _, _, _, remote, err := conn.ReadMsgUDP(msg, nil)
187 if err != nil {
188 t.Fatal("ReadMsgUDP:", err)
189 }
190
191 if !remote.IP.Equal(src) {
192 t.Errorf("Got packet from %v, want %v", remote.IP, src)
193 }
194 })
195 }
196 }
197
198 func TestParseOrigDstAddr(t *testing.T) {
199 testcases := []struct {
200 network string
201 address *net.UDPAddr
202 }{
203 {"udp4", &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1)}},
204 {"udp6", &net.UDPAddr{IP: net.IPv6loopback}},
205 }
206
207 for _, test := range testcases {
208 t.Run(test.network, func(t *testing.T) {
209 conn, err := net.ListenUDP(test.network, test.address)
210 if errors.Is(err, unix.EADDRNOTAVAIL) {
211 t.Skipf("%v is not available", test.address)
212 }
213 if err != nil {
214 t.Fatal("Listen:", err)
215 }
216 defer conn.Close()
217
218 raw, err := conn.SyscallConn()
219 if err != nil {
220 t.Fatal("SyscallConn:", err)
221 }
222
223 var opErr error
224 err = raw.Control(func(fd uintptr) {
225 switch test.network {
226 case "udp4":
227 opErr = unix.SetsockoptInt(int(fd), unix.SOL_IP, unix.IP_RECVORIGDSTADDR, 1)
228 case "udp6":
229 opErr = unix.SetsockoptInt(int(fd), unix.SOL_IPV6, unix.IPV6_RECVORIGDSTADDR, 1)
230 }
231 })
232 if err != nil {
233 t.Fatal("Control:", err)
234 }
235 if opErr != nil {
236 t.Fatal("Can't enable RECVORIGDSTADDR:", err)
237 }
238
239 msg := []byte{1}
240 addr := conn.LocalAddr().(*net.UDPAddr)
241 _, err = conn.WriteToUDP(msg, addr)
242 if err != nil {
243 t.Fatal("WriteToUDP:", err)
244 }
245
246 conn.SetReadDeadline(time.Now().Add(100 * time.Millisecond))
247 oob := make([]byte, unix.CmsgSpace(unix.SizeofSockaddrInet6))
248 _, oobn, _, _, err := conn.ReadMsgUDP(msg, oob)
249 if err != nil {
250 t.Fatal("ReadMsgUDP:", err)
251 }
252
253 scms, err := unix.ParseSocketControlMessage(oob[:oobn])
254 if err != nil {
255 t.Fatal("ParseSocketControlMessage:", err)
256 }
257
258 sa, err := unix.ParseOrigDstAddr(&scms[0])
259 if err != nil {
260 t.Fatal("ParseOrigDstAddr:", err)
261 }
262
263 switch test.network {
264 case "udp4":
265 sa4, ok := sa.(*unix.SockaddrInet4)
266 if !ok {
267 t.Fatalf("Got %T not *SockaddrInet4", sa)
268 }
269
270 lo := net.IPv4(127, 0, 0, 1)
271 if addr := net.IP(sa4.Addr[:]); !lo.Equal(addr) {
272 t.Errorf("Got address %v, want %v", addr, lo)
273 }
274
275 if sa4.Port != addr.Port {
276 t.Errorf("Got port %d, want %d", sa4.Port, addr.Port)
277 }
278
279 case "udp6":
280 sa6, ok := sa.(*unix.SockaddrInet6)
281 if !ok {
282 t.Fatalf("Got %T, want *SockaddrInet6", sa)
283 }
284
285 if addr := net.IP(sa6.Addr[:]); !net.IPv6loopback.Equal(addr) {
286 t.Errorf("Got address %v, want %v", addr, net.IPv6loopback)
287 }
288
289 if sa6.Port != addr.Port {
290 t.Errorf("Got port %d, want %d", sa6.Port, addr.Port)
291 }
292 }
293 })
294 }
295 }
0 // go run mkasm_darwin.go amd64
1 // Code generated by the command above; DO NOT EDIT.
2
3 //go:build darwin && go1.12
4 // +build darwin,go1.12
5
6 package unix
7
8 // All the _trampoline functions in zsyscall_darwin_amd64.s.
9 var darwinTests = [...]darwinTest{
10 {"accept", libc_accept_trampoline_addr},
11 {"access", libc_access_trampoline_addr},
12 {"adjtime", libc_adjtime_trampoline_addr},
13 {"bind", libc_bind_trampoline_addr},
14 {"chdir", libc_chdir_trampoline_addr},
15 {"chflags", libc_chflags_trampoline_addr},
16 {"chmod", libc_chmod_trampoline_addr},
17 {"chown", libc_chown_trampoline_addr},
18 {"chroot", libc_chroot_trampoline_addr},
19 {"clock_gettime", libc_clock_gettime_trampoline_addr},
20 {"clonefile", libc_clonefile_trampoline_addr},
21 {"clonefileat", libc_clonefileat_trampoline_addr},
22 {"close", libc_close_trampoline_addr},
23 {"closedir", libc_closedir_trampoline_addr},
24 {"connect", libc_connect_trampoline_addr},
25 {"dup", libc_dup_trampoline_addr},
26 {"dup2", libc_dup2_trampoline_addr},
27 {"exchangedata", libc_exchangedata_trampoline_addr},
28 {"exit", libc_exit_trampoline_addr},
29 {"faccessat", libc_faccessat_trampoline_addr},
30 {"fchdir", libc_fchdir_trampoline_addr},
31 {"fchflags", libc_fchflags_trampoline_addr},
32 {"fchmod", libc_fchmod_trampoline_addr},
33 {"fchmodat", libc_fchmodat_trampoline_addr},
34 {"fchown", libc_fchown_trampoline_addr},
35 {"fchownat", libc_fchownat_trampoline_addr},
36 {"fclonefileat", libc_fclonefileat_trampoline_addr},
37 {"fcntl", libc_fcntl_trampoline_addr},
38 {"fdopendir", libc_fdopendir_trampoline_addr},
39 {"fgetxattr", libc_fgetxattr_trampoline_addr},
40 {"flistxattr", libc_flistxattr_trampoline_addr},
41 {"flock", libc_flock_trampoline_addr},
42 {"fpathconf", libc_fpathconf_trampoline_addr},
43 {"fremovexattr", libc_fremovexattr_trampoline_addr},
44 {"fsetxattr", libc_fsetxattr_trampoline_addr},
45 {"fstat64", libc_fstat64_trampoline_addr},
46 {"fstatat64", libc_fstatat64_trampoline_addr},
47 {"fstatfs64", libc_fstatfs64_trampoline_addr},
48 {"fsync", libc_fsync_trampoline_addr},
49 {"ftruncate", libc_ftruncate_trampoline_addr},
50 {"futimes", libc_futimes_trampoline_addr},
51 {"getcwd", libc_getcwd_trampoline_addr},
52 {"getdtablesize", libc_getdtablesize_trampoline_addr},
53 {"getegid", libc_getegid_trampoline_addr},
54 {"geteuid", libc_geteuid_trampoline_addr},
55 {"getfsstat64", libc_getfsstat64_trampoline_addr},
56 {"getgid", libc_getgid_trampoline_addr},
57 {"getgroups", libc_getgroups_trampoline_addr},
58 {"getpeername", libc_getpeername_trampoline_addr},
59 {"getpgid", libc_getpgid_trampoline_addr},
60 {"getpgrp", libc_getpgrp_trampoline_addr},
61 {"getpid", libc_getpid_trampoline_addr},
62 {"getppid", libc_getppid_trampoline_addr},
63 {"getpriority", libc_getpriority_trampoline_addr},
64 {"getrlimit", libc_getrlimit_trampoline_addr},
65 {"getrusage", libc_getrusage_trampoline_addr},
66 {"getsid", libc_getsid_trampoline_addr},
67 {"getsockname", libc_getsockname_trampoline_addr},
68 {"getsockopt", libc_getsockopt_trampoline_addr},
69 {"gettimeofday", libc_gettimeofday_trampoline_addr},
70 {"getuid", libc_getuid_trampoline_addr},
71 {"getxattr", libc_getxattr_trampoline_addr},
72 {"ioctl", libc_ioctl_trampoline_addr},
73 {"issetugid", libc_issetugid_trampoline_addr},
74 {"kevent", libc_kevent_trampoline_addr},
75 {"kill", libc_kill_trampoline_addr},
76 {"kqueue", libc_kqueue_trampoline_addr},
77 {"lchown", libc_lchown_trampoline_addr},
78 {"link", libc_link_trampoline_addr},
79 {"linkat", libc_linkat_trampoline_addr},
80 {"listen", libc_listen_trampoline_addr},
81 {"listxattr", libc_listxattr_trampoline_addr},
82 {"lseek", libc_lseek_trampoline_addr},
83 {"lstat64", libc_lstat64_trampoline_addr},
84 {"madvise", libc_madvise_trampoline_addr},
85 {"mkdir", libc_mkdir_trampoline_addr},
86 {"mkdirat", libc_mkdirat_trampoline_addr},
87 {"mkfifo", libc_mkfifo_trampoline_addr},
88 {"mknod", libc_mknod_trampoline_addr},
89 {"mlock", libc_mlock_trampoline_addr},
90 {"mlockall", libc_mlockall_trampoline_addr},
91 {"mmap", libc_mmap_trampoline_addr},
92 {"mprotect", libc_mprotect_trampoline_addr},
93 {"msync", libc_msync_trampoline_addr},
94 {"munlock", libc_munlock_trampoline_addr},
95 {"munlockall", libc_munlockall_trampoline_addr},
96 {"munmap", libc_munmap_trampoline_addr},
97 {"open", libc_open_trampoline_addr},
98 {"openat", libc_openat_trampoline_addr},
99 {"pathconf", libc_pathconf_trampoline_addr},
100 {"pipe", libc_pipe_trampoline_addr},
101 {"poll", libc_poll_trampoline_addr},
102 {"pread", libc_pread_trampoline_addr},
103 {"ptrace", libc_ptrace_trampoline_addr},
104 {"pwrite", libc_pwrite_trampoline_addr},
105 {"read", libc_read_trampoline_addr},
106 {"readdir_r", libc_readdir_r_trampoline_addr},
107 {"readlink", libc_readlink_trampoline_addr},
108 {"readlinkat", libc_readlinkat_trampoline_addr},
109 {"recvfrom", libc_recvfrom_trampoline_addr},
110 {"recvmsg", libc_recvmsg_trampoline_addr},
111 {"removexattr", libc_removexattr_trampoline_addr},
112 {"rename", libc_rename_trampoline_addr},
113 {"renameat", libc_renameat_trampoline_addr},
114 {"revoke", libc_revoke_trampoline_addr},
115 {"rmdir", libc_rmdir_trampoline_addr},
116 {"select", libc_select_trampoline_addr},
117 {"sendfile", libc_sendfile_trampoline_addr},
118 {"sendmsg", libc_sendmsg_trampoline_addr},
119 {"sendto", libc_sendto_trampoline_addr},
120 {"setattrlist", libc_setattrlist_trampoline_addr},
121 {"setegid", libc_setegid_trampoline_addr},
122 {"seteuid", libc_seteuid_trampoline_addr},
123 {"setgid", libc_setgid_trampoline_addr},
124 {"setgroups", libc_setgroups_trampoline_addr},
125 {"setlogin", libc_setlogin_trampoline_addr},
126 {"setpgid", libc_setpgid_trampoline_addr},
127 {"setpriority", libc_setpriority_trampoline_addr},
128 {"setprivexec", libc_setprivexec_trampoline_addr},
129 {"setregid", libc_setregid_trampoline_addr},
130 {"setreuid", libc_setreuid_trampoline_addr},
131 {"setrlimit", libc_setrlimit_trampoline_addr},
132 {"setsid", libc_setsid_trampoline_addr},
133 {"setsockopt", libc_setsockopt_trampoline_addr},
134 {"settimeofday", libc_settimeofday_trampoline_addr},
135 {"setuid", libc_setuid_trampoline_addr},
136 {"setxattr", libc_setxattr_trampoline_addr},
137 {"shmat", libc_shmat_trampoline_addr},
138 {"shmctl", libc_shmctl_trampoline_addr},
139 {"shmdt", libc_shmdt_trampoline_addr},
140 {"shmget", libc_shmget_trampoline_addr},
141 {"shutdown", libc_shutdown_trampoline_addr},
142 {"socket", libc_socket_trampoline_addr},
143 {"socketpair", libc_socketpair_trampoline_addr},
144 {"stat64", libc_stat64_trampoline_addr},
145 {"statfs64", libc_statfs64_trampoline_addr},
146 {"symlink", libc_symlink_trampoline_addr},
147 {"symlinkat", libc_symlinkat_trampoline_addr},
148 {"sync", libc_sync_trampoline_addr},
149 {"sysctl", libc_sysctl_trampoline_addr},
150 {"truncate", libc_truncate_trampoline_addr},
151 {"umask", libc_umask_trampoline_addr},
152 {"undelete", libc_undelete_trampoline_addr},
153 {"unlink", libc_unlink_trampoline_addr},
154 {"unlinkat", libc_unlinkat_trampoline_addr},
155 {"unmount", libc_unmount_trampoline_addr},
156 {"utimes", libc_utimes_trampoline_addr},
157 {"wait4", libc_wait4_trampoline_addr},
158 {"write", libc_write_trampoline_addr},
159 }
0 // go run mkasm_darwin.go arm64
1 // Code generated by the command above; DO NOT EDIT.
2
3 //go:build darwin && go1.12
4 // +build darwin,go1.12
5
6 package unix
7
8 // All the _trampoline functions in zsyscall_darwin_arm64.s.
9 var darwinTests = [...]darwinTest{
10 {"accept", libc_accept_trampoline_addr},
11 {"access", libc_access_trampoline_addr},
12 {"adjtime", libc_adjtime_trampoline_addr},
13 {"bind", libc_bind_trampoline_addr},
14 {"chdir", libc_chdir_trampoline_addr},
15 {"chflags", libc_chflags_trampoline_addr},
16 {"chmod", libc_chmod_trampoline_addr},
17 {"chown", libc_chown_trampoline_addr},
18 {"chroot", libc_chroot_trampoline_addr},
19 {"clock_gettime", libc_clock_gettime_trampoline_addr},
20 {"clonefile", libc_clonefile_trampoline_addr},
21 {"clonefileat", libc_clonefileat_trampoline_addr},
22 {"close", libc_close_trampoline_addr},
23 {"closedir", libc_closedir_trampoline_addr},
24 {"connect", libc_connect_trampoline_addr},
25 {"dup", libc_dup_trampoline_addr},
26 {"dup2", libc_dup2_trampoline_addr},
27 {"exchangedata", libc_exchangedata_trampoline_addr},
28 {"exit", libc_exit_trampoline_addr},
29 {"faccessat", libc_faccessat_trampoline_addr},
30 {"fchdir", libc_fchdir_trampoline_addr},
31 {"fchflags", libc_fchflags_trampoline_addr},
32 {"fchmod", libc_fchmod_trampoline_addr},
33 {"fchmodat", libc_fchmodat_trampoline_addr},
34 {"fchown", libc_fchown_trampoline_addr},
35 {"fchownat", libc_fchownat_trampoline_addr},
36 {"fclonefileat", libc_fclonefileat_trampoline_addr},
37 {"fcntl", libc_fcntl_trampoline_addr},
38 {"fdopendir", libc_fdopendir_trampoline_addr},
39 {"fgetxattr", libc_fgetxattr_trampoline_addr},
40 {"flistxattr", libc_flistxattr_trampoline_addr},
41 {"flock", libc_flock_trampoline_addr},
42 {"fpathconf", libc_fpathconf_trampoline_addr},
43 {"fremovexattr", libc_fremovexattr_trampoline_addr},
44 {"fsetxattr", libc_fsetxattr_trampoline_addr},
45 {"fstat", libc_fstat_trampoline_addr},
46 {"fstatat", libc_fstatat_trampoline_addr},
47 {"fstatfs", libc_fstatfs_trampoline_addr},
48 {"fsync", libc_fsync_trampoline_addr},
49 {"ftruncate", libc_ftruncate_trampoline_addr},
50 {"futimes", libc_futimes_trampoline_addr},
51 {"getcwd", libc_getcwd_trampoline_addr},
52 {"getdtablesize", libc_getdtablesize_trampoline_addr},
53 {"getegid", libc_getegid_trampoline_addr},
54 {"geteuid", libc_geteuid_trampoline_addr},
55 {"getfsstat", libc_getfsstat_trampoline_addr},
56 {"getgid", libc_getgid_trampoline_addr},
57 {"getgroups", libc_getgroups_trampoline_addr},
58 {"getpeername", libc_getpeername_trampoline_addr},
59 {"getpgid", libc_getpgid_trampoline_addr},
60 {"getpgrp", libc_getpgrp_trampoline_addr},
61 {"getpid", libc_getpid_trampoline_addr},
62 {"getppid", libc_getppid_trampoline_addr},
63 {"getpriority", libc_getpriority_trampoline_addr},
64 {"getrlimit", libc_getrlimit_trampoline_addr},
65 {"getrusage", libc_getrusage_trampoline_addr},
66 {"getsid", libc_getsid_trampoline_addr},
67 {"getsockname", libc_getsockname_trampoline_addr},
68 {"getsockopt", libc_getsockopt_trampoline_addr},
69 {"gettimeofday", libc_gettimeofday_trampoline_addr},
70 {"getuid", libc_getuid_trampoline_addr},
71 {"getxattr", libc_getxattr_trampoline_addr},
72 {"ioctl", libc_ioctl_trampoline_addr},
73 {"issetugid", libc_issetugid_trampoline_addr},
74 {"kevent", libc_kevent_trampoline_addr},
75 {"kill", libc_kill_trampoline_addr},
76 {"kqueue", libc_kqueue_trampoline_addr},
77 {"lchown", libc_lchown_trampoline_addr},
78 {"link", libc_link_trampoline_addr},
79 {"linkat", libc_linkat_trampoline_addr},
80 {"listen", libc_listen_trampoline_addr},
81 {"listxattr", libc_listxattr_trampoline_addr},
82 {"lseek", libc_lseek_trampoline_addr},
83 {"lstat", libc_lstat_trampoline_addr},
84 {"madvise", libc_madvise_trampoline_addr},
85 {"mkdir", libc_mkdir_trampoline_addr},
86 {"mkdirat", libc_mkdirat_trampoline_addr},
87 {"mkfifo", libc_mkfifo_trampoline_addr},
88 {"mknod", libc_mknod_trampoline_addr},
89 {"mlock", libc_mlock_trampoline_addr},
90 {"mlockall", libc_mlockall_trampoline_addr},
91 {"mmap", libc_mmap_trampoline_addr},
92 {"mprotect", libc_mprotect_trampoline_addr},
93 {"msync", libc_msync_trampoline_addr},
94 {"munlock", libc_munlock_trampoline_addr},
95 {"munlockall", libc_munlockall_trampoline_addr},
96 {"munmap", libc_munmap_trampoline_addr},
97 {"open", libc_open_trampoline_addr},
98 {"openat", libc_openat_trampoline_addr},
99 {"pathconf", libc_pathconf_trampoline_addr},
100 {"pipe", libc_pipe_trampoline_addr},
101 {"poll", libc_poll_trampoline_addr},
102 {"pread", libc_pread_trampoline_addr},
103 {"ptrace", libc_ptrace_trampoline_addr},
104 {"pwrite", libc_pwrite_trampoline_addr},
105 {"read", libc_read_trampoline_addr},
106 {"readdir_r", libc_readdir_r_trampoline_addr},
107 {"readlink", libc_readlink_trampoline_addr},
108 {"readlinkat", libc_readlinkat_trampoline_addr},
109 {"recvfrom", libc_recvfrom_trampoline_addr},
110 {"recvmsg", libc_recvmsg_trampoline_addr},
111 {"removexattr", libc_removexattr_trampoline_addr},
112 {"rename", libc_rename_trampoline_addr},
113 {"renameat", libc_renameat_trampoline_addr},
114 {"revoke", libc_revoke_trampoline_addr},
115 {"rmdir", libc_rmdir_trampoline_addr},
116 {"select", libc_select_trampoline_addr},
117 {"sendfile", libc_sendfile_trampoline_addr},
118 {"sendmsg", libc_sendmsg_trampoline_addr},
119 {"sendto", libc_sendto_trampoline_addr},
120 {"setattrlist", libc_setattrlist_trampoline_addr},
121 {"setegid", libc_setegid_trampoline_addr},
122 {"seteuid", libc_seteuid_trampoline_addr},
123 {"setgid", libc_setgid_trampoline_addr},
124 {"setgroups", libc_setgroups_trampoline_addr},
125 {"setlogin", libc_setlogin_trampoline_addr},
126 {"setpgid", libc_setpgid_trampoline_addr},
127 {"setpriority", libc_setpriority_trampoline_addr},
128 {"setprivexec", libc_setprivexec_trampoline_addr},
129 {"setregid", libc_setregid_trampoline_addr},
130 {"setreuid", libc_setreuid_trampoline_addr},
131 {"setrlimit", libc_setrlimit_trampoline_addr},
132 {"setsid", libc_setsid_trampoline_addr},
133 {"setsockopt", libc_setsockopt_trampoline_addr},
134 {"settimeofday", libc_settimeofday_trampoline_addr},
135 {"setuid", libc_setuid_trampoline_addr},
136 {"setxattr", libc_setxattr_trampoline_addr},
137 {"shmat", libc_shmat_trampoline_addr},
138 {"shmctl", libc_shmctl_trampoline_addr},
139 {"shmdt", libc_shmdt_trampoline_addr},
140 {"shmget", libc_shmget_trampoline_addr},
141 {"shutdown", libc_shutdown_trampoline_addr},
142 {"socket", libc_socket_trampoline_addr},
143 {"socketpair", libc_socketpair_trampoline_addr},
144 {"stat", libc_stat_trampoline_addr},
145 {"statfs", libc_statfs_trampoline_addr},
146 {"symlink", libc_symlink_trampoline_addr},
147 {"symlinkat", libc_symlinkat_trampoline_addr},
148 {"sync", libc_sync_trampoline_addr},
149 {"sysctl", libc_sysctl_trampoline_addr},
150 {"truncate", libc_truncate_trampoline_addr},
151 {"umask", libc_umask_trampoline_addr},
152 {"undelete", libc_undelete_trampoline_addr},
153 {"unlink", libc_unlink_trampoline_addr},
154 {"unlinkat", libc_unlinkat_trampoline_addr},
155 {"unmount", libc_unmount_trampoline_addr},
156 {"utimes", libc_utimes_trampoline_addr},
157 {"wait4", libc_wait4_trampoline_addr},
158 {"write", libc_write_trampoline_addr},
159 }
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build darwin && go1.12 && amd64
5 // +build darwin,go1.12,amd64
4 //go:build darwin && go1.12
5 // +build darwin,go1.12
66
77 package unix
88
6868 panic("success")
6969 }
7070 }
71
72 // All the _trampoline functions in zsyscall_darwin_$ARCH.s
73 var darwinTests = [...]darwinTest{
74 {"getgroups", libc_getgroups_trampoline_addr},
75 {"setgroups", libc_setgroups_trampoline_addr},
76 {"wait4", libc_wait4_trampoline_addr},
77 {"accept", libc_accept_trampoline_addr},
78 {"bind", libc_bind_trampoline_addr},
79 {"connect", libc_connect_trampoline_addr},
80 {"socket", libc_socket_trampoline_addr},
81 {"getsockopt", libc_getsockopt_trampoline_addr},
82 {"setsockopt", libc_setsockopt_trampoline_addr},
83 {"getpeername", libc_getpeername_trampoline_addr},
84 {"getsockname", libc_getsockname_trampoline_addr},
85 {"shutdown", libc_shutdown_trampoline_addr},
86 {"socketpair", libc_socketpair_trampoline_addr},
87 {"recvfrom", libc_recvfrom_trampoline_addr},
88 {"sendto", libc_sendto_trampoline_addr},
89 {"recvmsg", libc_recvmsg_trampoline_addr},
90 {"sendmsg", libc_sendmsg_trampoline_addr},
91 {"kevent", libc_kevent_trampoline_addr},
92 {"sysctl", libc_sysctl_trampoline_addr},
93 {"utimes", libc_utimes_trampoline_addr},
94 {"futimes", libc_futimes_trampoline_addr},
95 {"fcntl", libc_fcntl_trampoline_addr},
96 {"poll", libc_poll_trampoline_addr},
97 {"madvise", libc_madvise_trampoline_addr},
98 {"mlock", libc_mlock_trampoline_addr},
99 {"mlockall", libc_mlockall_trampoline_addr},
100 {"mprotect", libc_mprotect_trampoline_addr},
101 {"msync", libc_msync_trampoline_addr},
102 {"munlock", libc_munlock_trampoline_addr},
103 {"munlockall", libc_munlockall_trampoline_addr},
104 {"ptrace", libc_ptrace_trampoline_addr},
105 {"pipe", libc_pipe_trampoline_addr},
106 {"getxattr", libc_getxattr_trampoline_addr},
107 {"fgetxattr", libc_fgetxattr_trampoline_addr},
108 {"setxattr", libc_setxattr_trampoline_addr},
109 {"fsetxattr", libc_fsetxattr_trampoline_addr},
110 {"removexattr", libc_removexattr_trampoline_addr},
111 {"fremovexattr", libc_fremovexattr_trampoline_addr},
112 {"listxattr", libc_listxattr_trampoline_addr},
113 {"flistxattr", libc_flistxattr_trampoline_addr},
114 {"kill", libc_kill_trampoline_addr},
115 {"ioctl", libc_ioctl_trampoline_addr},
116 {"access", libc_access_trampoline_addr},
117 {"adjtime", libc_adjtime_trampoline_addr},
118 {"chdir", libc_chdir_trampoline_addr},
119 {"chflags", libc_chflags_trampoline_addr},
120 {"chmod", libc_chmod_trampoline_addr},
121 {"chown", libc_chown_trampoline_addr},
122 {"chroot", libc_chroot_trampoline_addr},
123 {"close", libc_close_trampoline_addr},
124 {"dup", libc_dup_trampoline_addr},
125 {"dup2", libc_dup2_trampoline_addr},
126 {"exchangedata", libc_exchangedata_trampoline_addr},
127 {"exit", libc_exit_trampoline_addr},
128 {"faccessat", libc_faccessat_trampoline_addr},
129 {"fchdir", libc_fchdir_trampoline_addr},
130 {"fchflags", libc_fchflags_trampoline_addr},
131 {"fchmod", libc_fchmod_trampoline_addr},
132 {"fchmodat", libc_fchmodat_trampoline_addr},
133 {"fchown", libc_fchown_trampoline_addr},
134 {"fchownat", libc_fchownat_trampoline_addr},
135 {"flock", libc_flock_trampoline_addr},
136 {"fpathconf", libc_fpathconf_trampoline_addr},
137 {"fstat64", libc_fstat64_trampoline_addr},
138 {"fstatat64", libc_fstatat64_trampoline_addr},
139 {"fstatfs64", libc_fstatfs64_trampoline_addr},
140 {"fsync", libc_fsync_trampoline_addr},
141 {"ftruncate", libc_ftruncate_trampoline_addr},
142 {"getdtablesize", libc_getdtablesize_trampoline_addr},
143 {"getegid", libc_getegid_trampoline_addr},
144 {"geteuid", libc_geteuid_trampoline_addr},
145 {"getgid", libc_getgid_trampoline_addr},
146 {"getpgid", libc_getpgid_trampoline_addr},
147 {"getpgrp", libc_getpgrp_trampoline_addr},
148 {"getpid", libc_getpid_trampoline_addr},
149 {"getppid", libc_getppid_trampoline_addr},
150 {"getpriority", libc_getpriority_trampoline_addr},
151 {"getrlimit", libc_getrlimit_trampoline_addr},
152 {"getrusage", libc_getrusage_trampoline_addr},
153 {"getsid", libc_getsid_trampoline_addr},
154 {"getuid", libc_getuid_trampoline_addr},
155 {"issetugid", libc_issetugid_trampoline_addr},
156 {"kqueue", libc_kqueue_trampoline_addr},
157 {"lchown", libc_lchown_trampoline_addr},
158 {"link", libc_link_trampoline_addr},
159 {"linkat", libc_linkat_trampoline_addr},
160 {"listen", libc_listen_trampoline_addr},
161 {"lstat64", libc_lstat64_trampoline_addr},
162 {"mkdir", libc_mkdir_trampoline_addr},
163 {"mkdirat", libc_mkdirat_trampoline_addr},
164 {"mkfifo", libc_mkfifo_trampoline_addr},
165 {"mknod", libc_mknod_trampoline_addr},
166 {"open", libc_open_trampoline_addr},
167 {"openat", libc_openat_trampoline_addr},
168 {"pathconf", libc_pathconf_trampoline_addr},
169 {"pread", libc_pread_trampoline_addr},
170 {"pwrite", libc_pwrite_trampoline_addr},
171 {"read", libc_read_trampoline_addr},
172 {"readlink", libc_readlink_trampoline_addr},
173 {"readlinkat", libc_readlinkat_trampoline_addr},
174 {"rename", libc_rename_trampoline_addr},
175 {"renameat", libc_renameat_trampoline_addr},
176 {"revoke", libc_revoke_trampoline_addr},
177 {"rmdir", libc_rmdir_trampoline_addr},
178 {"lseek", libc_lseek_trampoline_addr},
179 {"select", libc_select_trampoline_addr},
180 {"setegid", libc_setegid_trampoline_addr},
181 {"seteuid", libc_seteuid_trampoline_addr},
182 {"setgid", libc_setgid_trampoline_addr},
183 {"setlogin", libc_setlogin_trampoline_addr},
184 {"setpgid", libc_setpgid_trampoline_addr},
185 {"setpriority", libc_setpriority_trampoline_addr},
186 {"setprivexec", libc_setprivexec_trampoline_addr},
187 {"setregid", libc_setregid_trampoline_addr},
188 {"setreuid", libc_setreuid_trampoline_addr},
189 {"setrlimit", libc_setrlimit_trampoline_addr},
190 {"setsid", libc_setsid_trampoline_addr},
191 {"settimeofday", libc_settimeofday_trampoline_addr},
192 {"setuid", libc_setuid_trampoline_addr},
193 {"stat64", libc_stat64_trampoline_addr},
194 {"statfs64", libc_statfs64_trampoline_addr},
195 {"symlink", libc_symlink_trampoline_addr},
196 {"symlinkat", libc_symlinkat_trampoline_addr},
197 {"sync", libc_sync_trampoline_addr},
198 {"truncate", libc_truncate_trampoline_addr},
199 {"umask", libc_umask_trampoline_addr},
200 {"undelete", libc_undelete_trampoline_addr},
201 {"unlink", libc_unlink_trampoline_addr},
202 {"unlinkat", libc_unlinkat_trampoline_addr},
203 {"unmount", libc_unmount_trampoline_addr},
204 {"write", libc_write_trampoline_addr},
205 {"mmap", libc_mmap_trampoline_addr},
206 {"munmap", libc_munmap_trampoline_addr},
207 {"gettimeofday", libc_gettimeofday_trampoline_addr},
208 {"getfsstat64", libc_getfsstat64_trampoline_addr},
209 }
0 // Copyright 2021 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 //go:build (darwin && !ios) || (linux && !android)
5 // +build darwin,!ios linux,!android
6
7 package unix_test
8
9 import (
10 "log"
11
12 "golang.org/x/sys/unix"
13 )
14
15 func ExampleSysvShmGet() {
16 // create shared memory region of 1024 bytes
17 id, err := unix.SysvShmGet(unix.IPC_PRIVATE, 1024, unix.IPC_CREAT|unix.IPC_EXCL|0o600)
18 if err != nil {
19 log.Fatal("sysv shm create failed:", err)
20 }
21
22 // warning: sysv shared memory segments persist even after after a process
23 // is destroyed, so it's very important to explicitly delete it when you
24 // don't need it anymore.
25 defer func() {
26 _, err := unix.SysvShmCtl(id, unix.IPC_RMID, nil)
27 if err != nil {
28 log.Fatal(err)
29 }
30 }()
31
32 // to use a shared memory region you must attach to it
33 b, err := unix.SysvShmAttach(id, 0, 0)
34 if err != nil {
35 log.Fatal("sysv attach failed:", err)
36 }
37
38 // you should detach from the segment when finished with it. The byte
39 // slice is no longer valid after detaching
40 defer func() {
41 if err = unix.SysvShmDetach(b); err != nil {
42 log.Fatal("sysv detach failed:", err)
43 }
44 }()
45
46 // Changes to the contents of the byte slice are reflected in other
47 // mappings of the shared memory identifer in this and other processes
48 b[42] = 'h'
49 b[43] = 'i'
50 }
66
77 package unix
88
9 import "unsafe"
9 import (
10 "bytes"
11 "unsafe"
12 )
1013
1114 // Helpers for dealing with ifreq since it contains a union and thus requires a
1215 // lot of unsafe.Pointer casts to use properly.
1316
14 // newIfreq creates an ifreq with the input network interface name after
17 // An Ifreq is a type-safe wrapper around the raw ifreq struct. An Ifreq
18 // contains an interface name and a union of arbitrary data which can be
19 // accessed using the Ifreq's methods. To create an Ifreq, use the NewIfreq
20 // function.
21 //
22 // Use the Name method to access the stored interface name. The union data
23 // fields can be get and set using the following methods:
24 // - Uint16/SetUint16: flags
25 // - Uint32/SetUint32: ifindex, metric, mtu
26 type Ifreq struct{ raw ifreq }
27
28 // NewIfreq creates an Ifreq with the input network interface name after
1529 // validating the name does not exceed IFNAMSIZ-1 (trailing NULL required)
1630 // bytes.
17 func newIfreq(name string) (*ifreq, error) {
31 func NewIfreq(name string) (*Ifreq, error) {
1832 // Leave room for terminating NULL byte.
1933 if len(name) >= IFNAMSIZ {
2034 return nil, EINVAL
2337 var ifr ifreq
2438 copy(ifr.Ifrn[:], name)
2539
26 return &ifr, nil
40 return &Ifreq{raw: ifr}, nil
2741 }
2842
29 // An ifreqData is an ifreq but with a typed unsafe.Pointer field for data in
30 // the union. This is required in order to comply with the unsafe.Pointer rules
31 // since the "pointer-ness" of data would not be preserved if it were cast into
32 // the byte array of a raw ifreq.
43 // TODO(mdlayher): get/set methods for hardware address sockaddr, char array, etc.
44
45 // Name returns the interface name associated with the Ifreq.
46 func (ifr *Ifreq) Name() string {
47 // BytePtrToString requires a NULL terminator or the program may crash. If
48 // one is not present, just return the empty string.
49 if !bytes.Contains(ifr.raw.Ifrn[:], []byte{0x00}) {
50 return ""
51 }
52
53 return BytePtrToString(&ifr.raw.Ifrn[0])
54 }
55
56 // According to netdevice(7), only AF_INET addresses are returned for numerous
57 // sockaddr ioctls. For convenience, we expose these as Inet4Addr since the Port
58 // field and other data is always empty.
59
60 // Inet4Addr returns the Ifreq union data from an embedded sockaddr as a C
61 // in_addr/Go []byte (4-byte IPv4 address) value. If the sockaddr family is not
62 // AF_INET, an error is returned.
63 func (ifr *Ifreq) Inet4Addr() ([]byte, error) {
64 raw := *(*RawSockaddrInet4)(unsafe.Pointer(&ifr.raw.Ifru[:SizeofSockaddrInet4][0]))
65 if raw.Family != AF_INET {
66 // Cannot safely interpret raw.Addr bytes as an IPv4 address.
67 return nil, EINVAL
68 }
69
70 return raw.Addr[:], nil
71 }
72
73 // SetInet4Addr sets a C in_addr/Go []byte (4-byte IPv4 address) value in an
74 // embedded sockaddr within the Ifreq's union data. v must be 4 bytes in length
75 // or an error will be returned.
76 func (ifr *Ifreq) SetInet4Addr(v []byte) error {
77 if len(v) != 4 {
78 return EINVAL
79 }
80
81 var addr [4]byte
82 copy(addr[:], v)
83
84 ifr.clear()
85 *(*RawSockaddrInet4)(
86 unsafe.Pointer(&ifr.raw.Ifru[:SizeofSockaddrInet4][0]),
87 ) = RawSockaddrInet4{
88 // Always set IP family as ioctls would require it anyway.
89 Family: AF_INET,
90 Addr: addr,
91 }
92
93 return nil
94 }
95
96 // Uint16 returns the Ifreq union data as a C short/Go uint16 value.
97 func (ifr *Ifreq) Uint16() uint16 {
98 return *(*uint16)(unsafe.Pointer(&ifr.raw.Ifru[:2][0]))
99 }
100
101 // SetUint16 sets a C short/Go uint16 value as the Ifreq's union data.
102 func (ifr *Ifreq) SetUint16(v uint16) {
103 ifr.clear()
104 *(*uint16)(unsafe.Pointer(&ifr.raw.Ifru[:2][0])) = v
105 }
106
107 // Uint32 returns the Ifreq union data as a C int/Go uint32 value.
108 func (ifr *Ifreq) Uint32() uint32 {
109 return *(*uint32)(unsafe.Pointer(&ifr.raw.Ifru[:4][0]))
110 }
111
112 // SetUint32 sets a C int/Go uint32 value as the Ifreq's union data.
113 func (ifr *Ifreq) SetUint32(v uint32) {
114 ifr.clear()
115 *(*uint32)(unsafe.Pointer(&ifr.raw.Ifru[:4][0])) = v
116 }
117
118 // clear zeroes the ifreq's union field to prevent trailing garbage data from
119 // being sent to the kernel if an ifreq is reused.
120 func (ifr *Ifreq) clear() {
121 for i := range ifr.raw.Ifru {
122 ifr.raw.Ifru[i] = 0
123 }
124 }
125
126 // TODO(mdlayher): export as IfreqData? For now we can provide helpers such as
127 // IoctlGetEthtoolDrvinfo which use these APIs under the hood.
128
129 // An ifreqData is an Ifreq which carries pointer data. To produce an ifreqData,
130 // use the Ifreq.withData method.
33131 type ifreqData struct {
34132 name [IFNAMSIZ]byte
133 // A type separate from ifreq is required in order to comply with the
134 // unsafe.Pointer rules since the "pointer-ness" of data would not be
135 // preserved if it were cast into the byte array of a raw ifreq.
35136 data unsafe.Pointer
36137 // Pad to the same size as ifreq.
37138 _ [len(ifreq{}.Ifru) - SizeofPtr]byte
38139 }
39140
40 // SetData produces an ifreqData with the pointer p set for ioctls which require
141 // withData produces an ifreqData with the pointer p set for ioctls which require
41142 // arbitrary pointer data.
42 func (ifr ifreq) SetData(p unsafe.Pointer) ifreqData {
143 func (ifr Ifreq) withData(p unsafe.Pointer) ifreqData {
43144 return ifreqData{
44 name: ifr.Ifrn,
145 name: ifr.raw.Ifrn,
45146 data: p,
46147 }
47148 }
0 // Copyright 2021 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 //go:build linux
5 // +build linux
6
7 package unix
8
9 import (
10 "bytes"
11 "net"
12 "testing"
13 "unsafe"
14 )
15
16 // An ifreqUnion is shorthand for a byte array matching the
17 // architecture-dependent size of an ifreq's union field.
18 type ifreqUnion = [len(ifreq{}.Ifru)]byte
19
20 func TestNewIfreq(t *testing.T) {
21 // Interface name too long.
22 if _, err := NewIfreq("abcdefghijklmnop"); err != EINVAL {
23 t.Fatalf("expected error EINVAL, but got: %v", err)
24 }
25 }
26
27 func TestIfreqSize(t *testing.T) {
28 // Ensure ifreq (generated) and Ifreq/ifreqData (hand-written to create a
29 // safe wrapper and store a pointer field) are identical in size.
30 want := unsafe.Sizeof(ifreq{})
31 if got := unsafe.Sizeof(Ifreq{}); want != got {
32 t.Fatalf("unexpected Ifreq size: got: %d, want: %d", got, want)
33 }
34
35 if got := unsafe.Sizeof(ifreqData{}); want != got {
36 t.Fatalf("unexpected IfreqData size: got: %d, want: %d", got, want)
37 }
38 }
39
40 func TestIfreqName(t *testing.T) {
41 // Invalid ifreq (no NULL terminator), so expect empty string.
42 var name [IFNAMSIZ]byte
43 for i := range name {
44 name[i] = 0xff
45 }
46
47 bad := &Ifreq{raw: ifreq{Ifrn: name}}
48 if got := bad.Name(); got != "" {
49 t.Fatalf("expected empty ifreq name, but got: %q", got)
50 }
51
52 // Valid ifreq, expect the hard-coded testIfreq name.
53 ifr := testIfreq(t)
54 if want, got := ifreqName, ifr.Name(); want != got {
55 t.Fatalf("unexpected ifreq name: got: %q, want: %q", got, want)
56 }
57 }
58
59 func TestIfreqWithData(t *testing.T) {
60 ifr := testIfreq(t)
61
62 // Store pointer data in the ifreq so we can retrieve it and cast back later
63 // for comparison.
64 want := [5]byte{'h', 'e', 'l', 'l', 'o'}
65 ifrd := ifr.withData(unsafe.Pointer(&want[0]))
66
67 // Ensure the memory of the original Ifreq was not modified by SetData.
68 if ifr.raw.Ifru != (ifreqUnion{}) {
69 t.Fatalf("ifreq was unexpectedly modified: % #x", ifr.raw.Ifru)
70 }
71
72 got := *(*[5]byte)(ifrd.data)
73 if want != got {
74 t.Fatalf("unexpected ifreq data bytes:\n got: % #x\nwant: % #x", got, want)
75 }
76 }
77
78 func TestIfreqInet4Addr(t *testing.T) {
79 ifr := testIfreq(t)
80 in := net.IPv4(192, 0, 2, 1).To4()
81 if err := ifr.SetInet4Addr(in); err != nil {
82 t.Fatalf("failed to set ifreq IPv4 address: %v", err)
83 }
84
85 // Store fixed offset data (AF_INET, IPv4 address) within underlying
86 // sockaddr bytes. Everything else should be zeroed.
87 want := ifreqUnion{4: 192, 5: 0, 6: 2, 7: 1}
88 if isBigEndian {
89 want[0] = 0x00
90 want[1] = 0x02
91 } else {
92 want[0] = 0x02
93 want[1] = 0x00
94 }
95
96 if got := ifr.raw.Ifru; want != got {
97 t.Fatalf("unexpected ifreq sockaddr bytes:\n got: % #x\nwant: % #x", got, want)
98 }
99
100 got, err := ifr.Inet4Addr()
101 if err != nil {
102 t.Fatalf("failed to get ifreq IPv4 address: %v", err)
103 }
104 if !bytes.Equal(in, got) {
105 t.Fatalf("unexpected ifreq IPv4 address:\n got: % #x\nwant: % #x", got, in)
106 }
107
108 // Invalid input, wrong length.
109 if err := ifr.SetInet4Addr([]byte{0xff}); err == nil {
110 t.Fatal("expected an error setting invalid IPv4 address, but none occurred")
111 }
112
113 // Invalid output, AF_INET is only set by SetInet4Addr input.
114 ifr.SetUint32(0xffffffff)
115 if _, err := ifr.Inet4Addr(); err == nil {
116 t.Fatal("expected an error getting invalid IPv4 address, but none occurred")
117 }
118 }
119
120 func TestIfreqUint16(t *testing.T) {
121 ifr := testIfreq(t)
122 const in = 0x0102
123 ifr.SetUint16(in)
124
125 // The layout of the bytes depends on the machine's endianness.
126 var want ifreqUnion
127 if isBigEndian {
128 want[0] = 0x01
129 want[1] = 0x02
130 } else {
131 want[0] = 0x02
132 want[1] = 0x01
133 }
134
135 if got := ifr.raw.Ifru; want != got {
136 t.Fatalf("unexpected ifreq uint16 bytes:\n got: % #x\nwant: % #x", got, want)
137 }
138
139 if got := ifr.Uint16(); in != got {
140 t.Fatalf("unexpected ifreq uint16: got: %d, want: %d", got, in)
141 }
142 }
143
144 func TestIfreqUint32(t *testing.T) {
145 ifr := testIfreq(t)
146 const in = 0x01020304
147 ifr.SetUint32(in)
148
149 // The layout of the bytes depends on the machine's endianness.
150 var want ifreqUnion
151 if isBigEndian {
152 want[0] = 0x01
153 want[1] = 0x02
154 want[2] = 0x03
155 want[3] = 0x04
156 } else {
157 want[0] = 0x04
158 want[1] = 0x03
159 want[2] = 0x02
160 want[3] = 0x01
161 }
162
163 if got := ifr.raw.Ifru; want != got {
164 t.Fatalf("unexpected ifreq uint32 bytes:\n got: % #x\nwant: % #x", got, want)
165 }
166
167 if got := ifr.Uint32(); in != got {
168 t.Fatalf("unexpected ifreq uint32: got: %d, want: %d", got, in)
169 }
170 }
171
172 // ifreqName is a hard-coded name for testIfreq.
173 const ifreqName = "eth0"
174
175 // testIfreq returns an Ifreq with a populated interface name.
176 func testIfreq(t *testing.T) *Ifreq {
177 t.Helper()
178
179 ifr, err := NewIfreq(ifreqName)
180 if err != nil {
181 t.Fatalf("failed to create ifreq: %v", err)
182 }
183
184 return ifr
185 }
0 // Copyright 2020 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // The mkmerge command parses generated source files and merges common
5 // consts, funcs, and types into a common source file, per GOOS.
6 //
7 // Usage:
8 // $ mkmerge -out MERGED FILE [FILE ...]
9 //
10 // Example:
11 // # Remove all common consts, funcs, and types from zerrors_linux_*.go
12 // # and write the common code into zerrors_linux.go
13 // $ mkmerge -out zerrors_linux.go zerrors_linux_*.go
14 //
15 // mkmerge performs the merge in the following steps:
16 // 1. Construct the set of common code that is idential in all
17 // architecture-specific files.
18 // 2. Write this common code to the merged file.
19 // 3. Remove the common code from all architecture-specific files.
20 package main
21
22 import (
23 "bufio"
24 "bytes"
25 "flag"
26 "fmt"
27 "go/ast"
28 "go/format"
29 "go/parser"
30 "go/token"
31 "io"
32 "io/ioutil"
33 "log"
34 "os"
35 "path"
36 "path/filepath"
37 "regexp"
38 "strconv"
39 "strings"
40 )
41
42 const validGOOS = "aix|darwin|dragonfly|freebsd|linux|netbsd|openbsd|solaris"
43
44 // getValidGOOS returns GOOS, true if filename ends with a valid "_GOOS.go"
45 func getValidGOOS(filename string) (string, bool) {
46 matches := regexp.MustCompile(`_(` + validGOOS + `)\.go$`).FindStringSubmatch(filename)
47 if len(matches) != 2 {
48 return "", false
49 }
50 return matches[1], true
51 }
52
53 // codeElem represents an ast.Decl in a comparable way.
54 type codeElem struct {
55 tok token.Token // e.g. token.CONST, token.TYPE, or token.FUNC
56 src string // the declaration formatted as source code
57 }
58
59 // newCodeElem returns a codeElem based on tok and node, or an error is returned.
60 func newCodeElem(tok token.Token, node ast.Node) (codeElem, error) {
61 var b strings.Builder
62 err := format.Node(&b, token.NewFileSet(), node)
63 if err != nil {
64 return codeElem{}, err
65 }
66 return codeElem{tok, b.String()}, nil
67 }
68
69 // codeSet is a set of codeElems
70 type codeSet struct {
71 set map[codeElem]bool // true for all codeElems in the set
72 }
73
74 // newCodeSet returns a new codeSet
75 func newCodeSet() *codeSet { return &codeSet{make(map[codeElem]bool)} }
76
77 // add adds elem to c
78 func (c *codeSet) add(elem codeElem) { c.set[elem] = true }
79
80 // has returns true if elem is in c
81 func (c *codeSet) has(elem codeElem) bool { return c.set[elem] }
82
83 // isEmpty returns true if the set is empty
84 func (c *codeSet) isEmpty() bool { return len(c.set) == 0 }
85
86 // intersection returns a new set which is the intersection of c and a
87 func (c *codeSet) intersection(a *codeSet) *codeSet {
88 res := newCodeSet()
89
90 for elem := range c.set {
91 if a.has(elem) {
92 res.add(elem)
93 }
94 }
95 return res
96 }
97
98 // keepCommon is a filterFn for filtering the merged file with common declarations.
99 func (c *codeSet) keepCommon(elem codeElem) bool {
100 switch elem.tok {
101 case token.VAR:
102 // Remove all vars from the merged file
103 return false
104 case token.CONST, token.TYPE, token.FUNC, token.COMMENT:
105 // Remove arch-specific consts, types, functions, and file-level comments from the merged file
106 return c.has(elem)
107 case token.IMPORT:
108 // Keep imports, they are handled by filterImports
109 return true
110 }
111
112 log.Fatalf("keepCommon: invalid elem %v", elem)
113 return true
114 }
115
116 // keepArchSpecific is a filterFn for filtering the GOARC-specific files.
117 func (c *codeSet) keepArchSpecific(elem codeElem) bool {
118 switch elem.tok {
119 case token.CONST, token.TYPE, token.FUNC:
120 // Remove common consts, types, or functions from the arch-specific file
121 return !c.has(elem)
122 }
123 return true
124 }
125
126 // srcFile represents a source file
127 type srcFile struct {
128 name string
129 src []byte
130 }
131
132 // filterFn is a helper for filter
133 type filterFn func(codeElem) bool
134
135 // filter parses and filters Go source code from src, removing top
136 // level declarations using keep as predicate.
137 // For src parameter, please see docs for parser.ParseFile.
138 func filter(src interface{}, keep filterFn) ([]byte, error) {
139 // Parse the src into an ast
140 fset := token.NewFileSet()
141 f, err := parser.ParseFile(fset, "", src, parser.ParseComments)
142 if err != nil {
143 return nil, err
144 }
145 cmap := ast.NewCommentMap(fset, f, f.Comments)
146
147 // Group const/type specs on adjacent lines
148 var groups specGroups = make(map[string]int)
149 var groupID int
150
151 decls := f.Decls
152 f.Decls = f.Decls[:0]
153 for _, decl := range decls {
154 switch decl := decl.(type) {
155 case *ast.GenDecl:
156 // Filter imports, consts, types, vars
157 specs := decl.Specs
158 decl.Specs = decl.Specs[:0]
159 for i, spec := range specs {
160 elem, err := newCodeElem(decl.Tok, spec)
161 if err != nil {
162 return nil, err
163 }
164
165 // Create new group if there are empty lines between this and the previous spec
166 if i > 0 && fset.Position(specs[i-1].End()).Line < fset.Position(spec.Pos()).Line-1 {
167 groupID++
168 }
169
170 // Check if we should keep this spec
171 if keep(elem) {
172 decl.Specs = append(decl.Specs, spec)
173 groups.add(elem.src, groupID)
174 }
175 }
176 // Check if we should keep this decl
177 if len(decl.Specs) > 0 {
178 f.Decls = append(f.Decls, decl)
179 }
180 case *ast.FuncDecl:
181 // Filter funcs
182 elem, err := newCodeElem(token.FUNC, decl)
183 if err != nil {
184 return nil, err
185 }
186 if keep(elem) {
187 f.Decls = append(f.Decls, decl)
188 }
189 }
190 }
191
192 // Filter file level comments
193 if cmap[f] != nil {
194 commentGroups := cmap[f]
195 cmap[f] = cmap[f][:0]
196 for _, cGrp := range commentGroups {
197 if keep(codeElem{token.COMMENT, cGrp.Text()}) {
198 cmap[f] = append(cmap[f], cGrp)
199 }
200 }
201 }
202 f.Comments = cmap.Filter(f).Comments()
203
204 // Generate code for the filtered ast
205 var buf bytes.Buffer
206 if err = format.Node(&buf, fset, f); err != nil {
207 return nil, err
208 }
209
210 groupedSrc, err := groups.filterEmptyLines(&buf)
211 if err != nil {
212 return nil, err
213 }
214
215 return filterImports(groupedSrc)
216 }
217
218 // getCommonSet returns the set of consts, types, and funcs that are present in every file.
219 func getCommonSet(files []srcFile) (*codeSet, error) {
220 if len(files) == 0 {
221 return nil, fmt.Errorf("no files provided")
222 }
223 // Use the first architecture file as the baseline
224 baseSet, err := getCodeSet(files[0].src)
225 if err != nil {
226 return nil, err
227 }
228
229 // Compare baseline set with other architecture files: discard any element,
230 // that doesn't exist in other architecture files.
231 for _, f := range files[1:] {
232 set, err := getCodeSet(f.src)
233 if err != nil {
234 return nil, err
235 }
236
237 baseSet = baseSet.intersection(set)
238 }
239 return baseSet, nil
240 }
241
242 // getCodeSet returns the set of all top-level consts, types, and funcs from src.
243 // src must be string, []byte, or io.Reader (see go/parser.ParseFile docs)
244 func getCodeSet(src interface{}) (*codeSet, error) {
245 set := newCodeSet()
246
247 fset := token.NewFileSet()
248 f, err := parser.ParseFile(fset, "", src, parser.ParseComments)
249 if err != nil {
250 return nil, err
251 }
252
253 for _, decl := range f.Decls {
254 switch decl := decl.(type) {
255 case *ast.GenDecl:
256 // Add const, and type declarations
257 if !(decl.Tok == token.CONST || decl.Tok == token.TYPE) {
258 break
259 }
260
261 for _, spec := range decl.Specs {
262 elem, err := newCodeElem(decl.Tok, spec)
263 if err != nil {
264 return nil, err
265 }
266
267 set.add(elem)
268 }
269 case *ast.FuncDecl:
270 // Add func declarations
271 elem, err := newCodeElem(token.FUNC, decl)
272 if err != nil {
273 return nil, err
274 }
275
276 set.add(elem)
277 }
278 }
279
280 // Add file level comments
281 cmap := ast.NewCommentMap(fset, f, f.Comments)
282 for _, cGrp := range cmap[f] {
283 set.add(codeElem{token.COMMENT, cGrp.Text()})
284 }
285
286 return set, nil
287 }
288
289 // importName returns the identifier (PackageName) for an imported package
290 func importName(iSpec *ast.ImportSpec) (string, error) {
291 if iSpec.Name == nil {
292 name, err := strconv.Unquote(iSpec.Path.Value)
293 if err != nil {
294 return "", err
295 }
296 return path.Base(name), nil
297 }
298 return iSpec.Name.Name, nil
299 }
300
301 // specGroups tracks grouped const/type specs with a map of line: groupID pairs
302 type specGroups map[string]int
303
304 // add spec source to group
305 func (s specGroups) add(src string, groupID int) error {
306 srcBytes, err := format.Source(bytes.TrimSpace([]byte(src)))
307 if err != nil {
308 return err
309 }
310 s[string(srcBytes)] = groupID
311 return nil
312 }
313
314 // filterEmptyLines removes empty lines within groups of const/type specs.
315 // Returns the filtered source.
316 func (s specGroups) filterEmptyLines(src io.Reader) ([]byte, error) {
317 scanner := bufio.NewScanner(src)
318 var out bytes.Buffer
319
320 var emptyLines bytes.Buffer
321 prevGroupID := -1 // Initialize to invalid group
322 for scanner.Scan() {
323 line := bytes.TrimSpace(scanner.Bytes())
324
325 if len(line) == 0 {
326 fmt.Fprintf(&emptyLines, "%s\n", scanner.Bytes())
327 continue
328 }
329
330 // Discard emptyLines if previous non-empty line belonged to the same
331 // group as this line
332 if src, err := format.Source(line); err == nil {
333 groupID, ok := s[string(src)]
334 if ok && groupID == prevGroupID {
335 emptyLines.Reset()
336 }
337 prevGroupID = groupID
338 }
339
340 emptyLines.WriteTo(&out)
341 fmt.Fprintf(&out, "%s\n", scanner.Bytes())
342 }
343 if err := scanner.Err(); err != nil {
344 return nil, err
345 }
346 return out.Bytes(), nil
347 }
348
349 // filterImports removes unused imports from fileSrc, and returns a formatted src.
350 func filterImports(fileSrc []byte) ([]byte, error) {
351 fset := token.NewFileSet()
352 file, err := parser.ParseFile(fset, "", fileSrc, parser.ParseComments)
353 if err != nil {
354 return nil, err
355 }
356 cmap := ast.NewCommentMap(fset, file, file.Comments)
357
358 // create set of references to imported identifiers
359 keepImport := make(map[string]bool)
360 for _, u := range file.Unresolved {
361 keepImport[u.Name] = true
362 }
363
364 // filter import declarations
365 decls := file.Decls
366 file.Decls = file.Decls[:0]
367 for _, decl := range decls {
368 importDecl, ok := decl.(*ast.GenDecl)
369
370 // Keep non-import declarations
371 if !ok || importDecl.Tok != token.IMPORT {
372 file.Decls = append(file.Decls, decl)
373 continue
374 }
375
376 // Filter the import specs
377 specs := importDecl.Specs
378 importDecl.Specs = importDecl.Specs[:0]
379 for _, spec := range specs {
380 iSpec := spec.(*ast.ImportSpec)
381 name, err := importName(iSpec)
382 if err != nil {
383 return nil, err
384 }
385
386 if keepImport[name] {
387 importDecl.Specs = append(importDecl.Specs, iSpec)
388 }
389 }
390 if len(importDecl.Specs) > 0 {
391 file.Decls = append(file.Decls, importDecl)
392 }
393 }
394
395 // filter file.Imports
396 imports := file.Imports
397 file.Imports = file.Imports[:0]
398 for _, spec := range imports {
399 name, err := importName(spec)
400 if err != nil {
401 return nil, err
402 }
403
404 if keepImport[name] {
405 file.Imports = append(file.Imports, spec)
406 }
407 }
408 file.Comments = cmap.Filter(file).Comments()
409
410 var buf bytes.Buffer
411 err = format.Node(&buf, fset, file)
412 if err != nil {
413 return nil, err
414 }
415
416 return buf.Bytes(), nil
417 }
418
419 // merge extracts duplicate code from archFiles and merges it to mergeFile.
420 // 1. Construct commonSet: the set of code that is idential in all archFiles.
421 // 2. Write the code in commonSet to mergedFile.
422 // 3. Remove the commonSet code from all archFiles.
423 func merge(mergedFile string, archFiles ...string) error {
424 // extract and validate the GOOS part of the merged filename
425 goos, ok := getValidGOOS(mergedFile)
426 if !ok {
427 return fmt.Errorf("invalid GOOS in merged file name %s", mergedFile)
428 }
429
430 // Read architecture files
431 var inSrc []srcFile
432 for _, file := range archFiles {
433 src, err := ioutil.ReadFile(file)
434 if err != nil {
435 return fmt.Errorf("cannot read archfile %s: %w", file, err)
436 }
437
438 inSrc = append(inSrc, srcFile{file, src})
439 }
440
441 // 1. Construct the set of top-level declarations common for all files
442 commonSet, err := getCommonSet(inSrc)
443 if err != nil {
444 return err
445 }
446 if commonSet.isEmpty() {
447 // No common code => do not modify any files
448 return nil
449 }
450
451 // 2. Write the merged file
452 mergedSrc, err := filter(inSrc[0].src, commonSet.keepCommon)
453 if err != nil {
454 return err
455 }
456
457 f, err := os.Create(mergedFile)
458 if err != nil {
459 return err
460 }
461
462 buf := bufio.NewWriter(f)
463 fmt.Fprintln(buf, "// Code generated by mkmerge; DO NOT EDIT.")
464 fmt.Fprintln(buf)
465 fmt.Fprintf(buf, "//go:build %s\n", goos)
466 fmt.Fprintf(buf, "// +build %s\n", goos)
467 fmt.Fprintln(buf)
468 buf.Write(mergedSrc)
469
470 err = buf.Flush()
471 if err != nil {
472 return err
473 }
474 err = f.Close()
475 if err != nil {
476 return err
477 }
478
479 // 3. Remove duplicate declarations from the architecture files
480 for _, inFile := range inSrc {
481 src, err := filter(inFile.src, commonSet.keepArchSpecific)
482 if err != nil {
483 return err
484 }
485 err = ioutil.WriteFile(inFile.name, src, 0644)
486 if err != nil {
487 return err
488 }
489 }
490 return nil
491 }
492
493 func main() {
494 var mergedFile string
495 flag.StringVar(&mergedFile, "out", "", "Write merged code to `FILE`")
496 flag.Parse()
497
498 // Expand wildcards
499 var filenames []string
500 for _, arg := range flag.Args() {
501 matches, err := filepath.Glob(arg)
502 if err != nil {
503 fmt.Fprintf(os.Stderr, "Invalid command line argument %q: %v\n", arg, err)
504 os.Exit(1)
505 }
506 filenames = append(filenames, matches...)
507 }
508
509 if len(filenames) < 2 {
510 // No need to merge
511 return
512 }
513
514 err := merge(mergedFile, filenames...)
515 if err != nil {
516 fmt.Fprintf(os.Stderr, "Merge failed with error: %v\n", err)
517 os.Exit(1)
518 }
519 }
0 // Copyright 2020 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 package main
5
6 import (
7 "bytes"
8 "fmt"
9 "go/parser"
10 "go/token"
11 "html/template"
12 "strings"
13 "testing"
14 )
15
16 func TestImports(t *testing.T) {
17 t.Run("importName", func(t *testing.T) {
18 cases := []struct {
19 src string
20 ident string
21 }{
22 {`"syscall"`, "syscall"},
23 {`. "foobar"`, "."},
24 {`"go/ast"`, "ast"},
25 {`moo "go/format"`, "moo"},
26 {`. "go/token"`, "."},
27 {`"golang.org/x/sys/unix"`, "unix"},
28 {`nix "golang.org/x/sys/unix"`, "nix"},
29 {`_ "golang.org/x/sys/unix"`, "_"},
30 }
31
32 for _, c := range cases {
33 pkgSrc := fmt.Sprintf("package main\nimport %s", c.src)
34
35 f, err := parser.ParseFile(token.NewFileSet(), "", pkgSrc, parser.ImportsOnly)
36 if err != nil {
37 t.Error(err)
38 continue
39 }
40 if len(f.Imports) != 1 {
41 t.Errorf("Got %d imports, expected 1", len(f.Imports))
42 continue
43 }
44
45 got, err := importName(f.Imports[0])
46 if err != nil {
47 t.Fatal(err)
48 }
49 if got != c.ident {
50 t.Errorf("Got %q, expected %q", got, c.ident)
51 }
52 }
53 })
54
55 t.Run("filterImports", func(t *testing.T) {
56 cases := []struct{ before, after string }{
57 {`package test
58
59 import (
60 "foo"
61 "bar"
62 )`,
63 "package test\n"},
64 {`package test
65
66 import (
67 "foo"
68 "bar"
69 )
70
71 func useFoo() { foo.Usage() }`,
72 `package test
73
74 import (
75 "foo"
76 )
77
78 func useFoo() { foo.Usage() }
79 `},
80 }
81 for _, c := range cases {
82 got, err := filterImports([]byte(c.before))
83 if err != nil {
84 t.Error(err)
85 }
86
87 if string(got) != c.after {
88 t.Errorf("Got:\n%s\nExpected:\n%s\n", got, c.after)
89 }
90 }
91 })
92 }
93
94 func TestMerge(t *testing.T) {
95 // Input architecture files
96 inTmpl := template.Must(template.New("input").Parse(`
97 // Package comments
98
99 // build directives for arch{{.}}
100
101 //go:build goos && arch{{.}}
102 // +build goos,arch{{.}}
103
104 package main
105
106 /*
107 #include <stdint.h>
108 #include <stddef.h>
109 int utimes(uintptr_t, uintptr_t);
110 int utimensat(int, uintptr_t, uintptr_t, int);
111 */
112 import "C"
113
114 // The imports
115 import (
116 "commonDep"
117 "uniqueDep{{.}}"
118 )
119
120 // Vars
121 var (
122 commonVar = commonDep.Use("common")
123
124 uniqueVar{{.}} = "unique{{.}}"
125 )
126
127 // Common free standing comment
128
129 // Common comment
130 const COMMON_INDEPENDENT = 1234
131 const UNIQUE_INDEPENDENT_{{.}} = "UNIQUE_INDEPENDENT_{{.}}"
132
133 // Group comment
134 const (
135 COMMON_GROUP = "COMMON_GROUP"
136 UNIQUE_GROUP_{{.}} = "UNIQUE_GROUP_{{.}}"
137 )
138
139 // Group2 comment
140 const (
141 UNIQUE_GROUP21_{{.}} = "UNIQUE_GROUP21_{{.}}"
142 UNIQUE_GROUP22_{{.}} = "UNIQUE_GROUP22_{{.}}"
143 )
144
145 // Group3 comment
146 const (
147 sub1Common1 = 11
148 sub1Unique2{{.}} = 12
149 sub1Common3_LONG = 13
150
151 sub2Unique1{{.}} = 21
152 sub2Common2 = 22
153 sub2Common3 = 23
154 sub2Unique4{{.}} = 24
155 )
156
157 type commonInt int
158
159 type uniqueInt{{.}} int
160
161 func commonF() string {
162 return commonDep.Use("common")
163 }
164
165 func uniqueF() string {
166 C.utimes(0, 0)
167 return uniqueDep{{.}}.Use("{{.}}")
168 }
169
170 // Group4 comment
171 const (
172 sub3Common1 = 31
173 sub3Unique2{{.}} = 32
174 sub3Unique3{{.}} = 33
175 sub3Common4 = 34
176
177 sub4Common1, sub4Unique2{{.}} = 41, 42
178 sub4Unique3{{.}}, sub4Common4 = 43, 44
179 )
180 `))
181
182 // Filtered architecture files
183 outTmpl := template.Must(template.New("output").Parse(`// Package comments
184
185 // build directives for arch{{.}}
186
187 //go:build goos && arch{{.}}
188 // +build goos,arch{{.}}
189
190 package main
191
192 /*
193 #include <stdint.h>
194 #include <stddef.h>
195 int utimes(uintptr_t, uintptr_t);
196 int utimensat(int, uintptr_t, uintptr_t, int);
197 */
198 import "C"
199
200 // The imports
201 import (
202 "commonDep"
203 "uniqueDep{{.}}"
204 )
205
206 // Vars
207 var (
208 commonVar = commonDep.Use("common")
209
210 uniqueVar{{.}} = "unique{{.}}"
211 )
212
213 const UNIQUE_INDEPENDENT_{{.}} = "UNIQUE_INDEPENDENT_{{.}}"
214
215 // Group comment
216 const (
217 UNIQUE_GROUP_{{.}} = "UNIQUE_GROUP_{{.}}"
218 )
219
220 // Group2 comment
221 const (
222 UNIQUE_GROUP21_{{.}} = "UNIQUE_GROUP21_{{.}}"
223 UNIQUE_GROUP22_{{.}} = "UNIQUE_GROUP22_{{.}}"
224 )
225
226 // Group3 comment
227 const (
228 sub1Unique2{{.}} = 12
229
230 sub2Unique1{{.}} = 21
231 sub2Unique4{{.}} = 24
232 )
233
234 type uniqueInt{{.}} int
235
236 func uniqueF() string {
237 C.utimes(0, 0)
238 return uniqueDep{{.}}.Use("{{.}}")
239 }
240
241 // Group4 comment
242 const (
243 sub3Unique2{{.}} = 32
244 sub3Unique3{{.}} = 33
245
246 sub4Common1, sub4Unique2{{.}} = 41, 42
247 sub4Unique3{{.}}, sub4Common4 = 43, 44
248 )
249 `))
250
251 const mergedFile = `// Package comments
252
253 package main
254
255 // The imports
256 import (
257 "commonDep"
258 )
259
260 // Common free standing comment
261
262 // Common comment
263 const COMMON_INDEPENDENT = 1234
264
265 // Group comment
266 const (
267 COMMON_GROUP = "COMMON_GROUP"
268 )
269
270 // Group3 comment
271 const (
272 sub1Common1 = 11
273 sub1Common3_LONG = 13
274
275 sub2Common2 = 22
276 sub2Common3 = 23
277 )
278
279 type commonInt int
280
281 func commonF() string {
282 return commonDep.Use("common")
283 }
284
285 // Group4 comment
286 const (
287 sub3Common1 = 31
288 sub3Common4 = 34
289 )
290 `
291
292 // Generate source code for different "architectures"
293 var inFiles, outFiles []srcFile
294 for _, arch := range strings.Fields("A B C D") {
295 buf := new(bytes.Buffer)
296 err := inTmpl.Execute(buf, arch)
297 if err != nil {
298 t.Fatal(err)
299 }
300 inFiles = append(inFiles, srcFile{"file" + arch, buf.Bytes()})
301
302 buf = new(bytes.Buffer)
303 err = outTmpl.Execute(buf, arch)
304 if err != nil {
305 t.Fatal(err)
306 }
307 outFiles = append(outFiles, srcFile{"file" + arch, buf.Bytes()})
308 }
309
310 t.Run("getCodeSet", func(t *testing.T) {
311 got, err := getCodeSet(inFiles[0].src)
312 if err != nil {
313 t.Fatal(err)
314 }
315
316 expectedElems := []codeElem{
317 {token.COMMENT, "Package comments\n"},
318 {token.COMMENT, "build directives for archA\n"},
319 {token.COMMENT, "+build goos,archA\n"},
320 {token.CONST, `COMMON_INDEPENDENT = 1234`},
321 {token.CONST, `UNIQUE_INDEPENDENT_A = "UNIQUE_INDEPENDENT_A"`},
322 {token.CONST, `COMMON_GROUP = "COMMON_GROUP"`},
323 {token.CONST, `UNIQUE_GROUP_A = "UNIQUE_GROUP_A"`},
324 {token.CONST, `UNIQUE_GROUP21_A = "UNIQUE_GROUP21_A"`},
325 {token.CONST, `UNIQUE_GROUP22_A = "UNIQUE_GROUP22_A"`},
326 {token.CONST, `sub1Common1 = 11`},
327 {token.CONST, `sub1Unique2A = 12`},
328 {token.CONST, `sub1Common3_LONG = 13`},
329 {token.CONST, `sub2Unique1A = 21`},
330 {token.CONST, `sub2Common2 = 22`},
331 {token.CONST, `sub2Common3 = 23`},
332 {token.CONST, `sub2Unique4A = 24`},
333 {token.CONST, `sub3Common1 = 31`},
334 {token.CONST, `sub3Unique2A = 32`},
335 {token.CONST, `sub3Unique3A = 33`},
336 {token.CONST, `sub3Common4 = 34`},
337 {token.CONST, `sub4Common1, sub4Unique2A = 41, 42`},
338 {token.CONST, `sub4Unique3A, sub4Common4 = 43, 44`},
339 {token.TYPE, `commonInt int`},
340 {token.TYPE, `uniqueIntA int`},
341 {token.FUNC, `func commonF() string {
342 return commonDep.Use("common")
343 }`},
344 {token.FUNC, `func uniqueF() string {
345 C.utimes(0, 0)
346 return uniqueDepA.Use("A")
347 }`},
348 }
349 expected := newCodeSet()
350 for _, d := range expectedElems {
351 expected.add(d)
352 }
353
354 if len(got.set) != len(expected.set) {
355 t.Errorf("Got %d codeElems, expected %d", len(got.set), len(expected.set))
356 }
357 for expElem := range expected.set {
358 if !got.has(expElem) {
359 t.Errorf("Didn't get expected codeElem %#v", expElem)
360 }
361 }
362 for gotElem := range got.set {
363 if !expected.has(gotElem) {
364 t.Errorf("Got unexpected codeElem %#v", gotElem)
365 }
366 }
367 })
368
369 t.Run("getCommonSet", func(t *testing.T) {
370 got, err := getCommonSet(inFiles)
371 if err != nil {
372 t.Fatal(err)
373 }
374
375 expected := newCodeSet()
376 expected.add(codeElem{token.COMMENT, "Package comments\n"})
377 expected.add(codeElem{token.CONST, `COMMON_INDEPENDENT = 1234`})
378 expected.add(codeElem{token.CONST, `COMMON_GROUP = "COMMON_GROUP"`})
379 expected.add(codeElem{token.CONST, `sub1Common1 = 11`})
380 expected.add(codeElem{token.CONST, `sub1Common3_LONG = 13`})
381 expected.add(codeElem{token.CONST, `sub2Common2 = 22`})
382 expected.add(codeElem{token.CONST, `sub2Common3 = 23`})
383 expected.add(codeElem{token.CONST, `sub3Common1 = 31`})
384 expected.add(codeElem{token.CONST, `sub3Common4 = 34`})
385 expected.add(codeElem{token.TYPE, `commonInt int`})
386 expected.add(codeElem{token.FUNC, `func commonF() string {
387 return commonDep.Use("common")
388 }`})
389
390 if len(got.set) != len(expected.set) {
391 t.Errorf("Got %d codeElems, expected %d", len(got.set), len(expected.set))
392 }
393 for expElem := range expected.set {
394 if !got.has(expElem) {
395 t.Errorf("Didn't get expected codeElem %#v", expElem)
396 }
397 }
398 for gotElem := range got.set {
399 if !expected.has(gotElem) {
400 t.Errorf("Got unexpected codeElem %#v", gotElem)
401 }
402 }
403 })
404
405 t.Run("filter(keepCommon)", func(t *testing.T) {
406 commonSet, err := getCommonSet(inFiles)
407 if err != nil {
408 t.Fatal(err)
409 }
410
411 got, err := filter(inFiles[0].src, commonSet.keepCommon)
412 expected := []byte(mergedFile)
413
414 if !bytes.Equal(got, expected) {
415 t.Errorf("Got:\n%s\nExpected:\n%s", addLineNr(got), addLineNr(expected))
416 diffLines(t, got, expected)
417 }
418 })
419
420 t.Run("filter(keepArchSpecific)", func(t *testing.T) {
421 commonSet, err := getCommonSet(inFiles)
422 if err != nil {
423 t.Fatal(err)
424 }
425
426 for i := range inFiles {
427 got, err := filter(inFiles[i].src, commonSet.keepArchSpecific)
428 if err != nil {
429 t.Fatal(err)
430 }
431
432 expected := outFiles[i].src
433
434 if !bytes.Equal(got, expected) {
435 t.Errorf("Got:\n%s\nExpected:\n%s", addLineNr(got), addLineNr(expected))
436 diffLines(t, got, expected)
437 }
438 }
439 })
440 }
441
442 func TestMergedName(t *testing.T) {
443 t.Run("getValidGOOS", func(t *testing.T) {
444 testcases := []struct {
445 filename, goos string
446 ok bool
447 }{
448 {"zerrors_aix.go", "aix", true},
449 {"zerrors_darwin.go", "darwin", true},
450 {"zerrors_dragonfly.go", "dragonfly", true},
451 {"zerrors_freebsd.go", "freebsd", true},
452 {"zerrors_linux.go", "linux", true},
453 {"zerrors_netbsd.go", "netbsd", true},
454 {"zerrors_openbsd.go", "openbsd", true},
455 {"zerrors_solaris.go", "solaris", true},
456 {"zerrors_multics.go", "", false},
457 }
458 for _, tc := range testcases {
459 goos, ok := getValidGOOS(tc.filename)
460 if goos != tc.goos {
461 t.Errorf("got GOOS %q, expected %q", goos, tc.goos)
462 }
463 if ok != tc.ok {
464 t.Errorf("got ok %v, expected %v", ok, tc.ok)
465 }
466 }
467 })
468 }
469
470 // Helper functions to diff test sources
471
472 func diffLines(t *testing.T, got, expected []byte) {
473 t.Helper()
474
475 gotLines := bytes.Split(got, []byte{'\n'})
476 expLines := bytes.Split(expected, []byte{'\n'})
477
478 i := 0
479 for i < len(gotLines) && i < len(expLines) {
480 if !bytes.Equal(gotLines[i], expLines[i]) {
481 t.Errorf("Line %d: Got:\n%q\nExpected:\n%q", i+1, gotLines[i], expLines[i])
482 return
483 }
484 i++
485 }
486
487 if i < len(gotLines) && i >= len(expLines) {
488 t.Errorf("Line %d: got %q, expected EOF", i+1, gotLines[i])
489 }
490 if i >= len(gotLines) && i < len(expLines) {
491 t.Errorf("Line %d: got EOF, expected %q", i+1, gotLines[i])
492 }
493 }
494
495 func addLineNr(src []byte) []byte {
496 lines := bytes.Split(src, []byte("\n"))
497 for i, line := range lines {
498 lines[i] = []byte(fmt.Sprintf("%d: %s", i+1, line))
499 }
500 return bytes.Join(lines, []byte("\n"))
501 }
44 package unix
55
66 import (
7 "runtime"
87 "unsafe"
98 )
109
2120
2221 func IoctlGetUint32(fd int, req uint) (uint32, error) {
2322 var value uint32
24 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
23 err := ioctlPtr(fd, req, unsafe.Pointer(&value))
2524 return value, err
2625 }
2726
2827 func IoctlGetRTCTime(fd int) (*RTCTime, error) {
2928 var value RTCTime
30 err := ioctl(fd, RTC_RD_TIME, uintptr(unsafe.Pointer(&value)))
29 err := ioctlPtr(fd, RTC_RD_TIME, unsafe.Pointer(&value))
3130 return &value, err
3231 }
3332
3433 func IoctlSetRTCTime(fd int, value *RTCTime) error {
35 err := ioctl(fd, RTC_SET_TIME, uintptr(unsafe.Pointer(value)))
36 runtime.KeepAlive(value)
37 return err
34 return ioctlPtr(fd, RTC_SET_TIME, unsafe.Pointer(value))
3835 }
3936
4037 func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) {
4138 var value RTCWkAlrm
42 err := ioctl(fd, RTC_WKALM_RD, uintptr(unsafe.Pointer(&value)))
39 err := ioctlPtr(fd, RTC_WKALM_RD, unsafe.Pointer(&value))
4340 return &value, err
4441 }
4542
4643 func IoctlSetRTCWkAlrm(fd int, value *RTCWkAlrm) error {
47 err := ioctl(fd, RTC_WKALM_SET, uintptr(unsafe.Pointer(value)))
48 runtime.KeepAlive(value)
49 return err
44 return ioctlPtr(fd, RTC_WKALM_SET, unsafe.Pointer(value))
5045 }
5146
5247 // IoctlGetEthtoolDrvinfo fetches ethtool driver information for the network
5348 // device specified by ifname.
5449 func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) {
55 ifr, err := newIfreq(ifname)
50 ifr, err := NewIfreq(ifname)
5651 if err != nil {
5752 return nil, err
5853 }
5954
6055 value := EthtoolDrvinfo{Cmd: ETHTOOL_GDRVINFO}
61 ifrd := ifr.SetData(unsafe.Pointer(&value))
56 ifrd := ifr.withData(unsafe.Pointer(&value))
6257
63 err = ioctl(fd, SIOCETHTOOL, uintptr(unsafe.Pointer(&ifrd)))
64 runtime.KeepAlive(ifrd)
58 err = ioctlIfreqData(fd, SIOCETHTOOL, &ifrd)
6559 return &value, err
6660 }
6761
7064 // https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
7165 func IoctlGetWatchdogInfo(fd int) (*WatchdogInfo, error) {
7266 var value WatchdogInfo
73 err := ioctl(fd, WDIOC_GETSUPPORT, uintptr(unsafe.Pointer(&value)))
67 err := ioctlPtr(fd, WDIOC_GETSUPPORT, unsafe.Pointer(&value))
7468 return &value, err
7569 }
7670
7872 // more information, see:
7973 // https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
8074 func IoctlWatchdogKeepalive(fd int) error {
75 // arg is ignored and not a pointer, so ioctl is fine instead of ioctlPtr.
8176 return ioctl(fd, WDIOC_KEEPALIVE, 0)
8277 }
8378
8580 // range of data conveyed in value to the file associated with the file
8681 // descriptor destFd. See the ioctl_ficlonerange(2) man page for details.
8782 func IoctlFileCloneRange(destFd int, value *FileCloneRange) error {
88 err := ioctl(destFd, FICLONERANGE, uintptr(unsafe.Pointer(value)))
89 runtime.KeepAlive(value)
90 return err
83 return ioctlPtr(destFd, FICLONERANGE, unsafe.Pointer(value))
9184 }
9285
9386 // IoctlFileClone performs an FICLONE ioctl operation to clone the entire file
138131 rawinfo.Reserved = value.Info[i].Reserved
139132 }
140133
141 err := ioctl(srcFd, FIDEDUPERANGE, uintptr(unsafe.Pointer(&buf[0])))
134 err := ioctlPtr(srcFd, FIDEDUPERANGE, unsafe.Pointer(&buf[0]))
142135
143136 // Output
144137 for i := range value.Info {
156149 }
157150
158151 func IoctlHIDGetDesc(fd int, value *HIDRawReportDescriptor) error {
159 err := ioctl(fd, HIDIOCGRDESC, uintptr(unsafe.Pointer(value)))
160 runtime.KeepAlive(value)
161 return err
152 return ioctlPtr(fd, HIDIOCGRDESC, unsafe.Pointer(value))
162153 }
163154
164155 func IoctlHIDGetRawInfo(fd int) (*HIDRawDevInfo, error) {
165156 var value HIDRawDevInfo
166 err := ioctl(fd, HIDIOCGRAWINFO, uintptr(unsafe.Pointer(&value)))
157 err := ioctlPtr(fd, HIDIOCGRAWINFO, unsafe.Pointer(&value))
167158 return &value, err
168159 }
169160
170161 func IoctlHIDGetRawName(fd int) (string, error) {
171162 var value [_HIDIOCGRAWNAME_LEN]byte
172 err := ioctl(fd, _HIDIOCGRAWNAME, uintptr(unsafe.Pointer(&value[0])))
163 err := ioctlPtr(fd, _HIDIOCGRAWNAME, unsafe.Pointer(&value[0]))
173164 return ByteSliceToString(value[:]), err
174165 }
175166
176167 func IoctlHIDGetRawPhys(fd int) (string, error) {
177168 var value [_HIDIOCGRAWPHYS_LEN]byte
178 err := ioctl(fd, _HIDIOCGRAWPHYS, uintptr(unsafe.Pointer(&value[0])))
169 err := ioctlPtr(fd, _HIDIOCGRAWPHYS, unsafe.Pointer(&value[0]))
179170 return ByteSliceToString(value[:]), err
180171 }
181172
182173 func IoctlHIDGetRawUniq(fd int) (string, error) {
183174 var value [_HIDIOCGRAWUNIQ_LEN]byte
184 err := ioctl(fd, _HIDIOCGRAWUNIQ, uintptr(unsafe.Pointer(&value[0])))
175 err := ioctlPtr(fd, _HIDIOCGRAWUNIQ, unsafe.Pointer(&value[0]))
185176 return ByteSliceToString(value[:]), err
186177 }
178
179 // IoctlIfreq performs an ioctl using an Ifreq structure for input and/or
180 // output. See the netdevice(7) man page for details.
181 func IoctlIfreq(fd int, req uint, value *Ifreq) error {
182 // It is possible we will add more fields to *Ifreq itself later to prevent
183 // misuse, so pass the raw *ifreq directly.
184 return ioctlPtr(fd, req, unsafe.Pointer(&value.raw))
185 }
186
187 // TODO(mdlayher): export if and when IfreqData is exported.
188
189 // ioctlIfreqData performs an ioctl using an ifreqData structure for input
190 // and/or output. See the netdevice(7) man page for details.
191 func ioctlIfreqData(fd int, req uint, value *ifreqData) error {
192 // The memory layout of IfreqData (type-safe) and ifreq (not type-safe) are
193 // identical so pass *IfreqData directly.
194 return ioctlPtr(fd, req, unsafe.Pointer(value))
195 }
1414 # Get the git sources. If not cached, this takes O(5 minutes).
1515 WORKDIR /git
1616 RUN git config --global advice.detachedHead false
17 # Linux Kernel: Released 25 Apr 2021
18 RUN git clone --branch v5.12 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
19 # GNU C library: Released 01 Feb 2021 (we should try to get a secure way to clone this)
20 RUN git clone --branch release/2.33/master --depth 1 git://sourceware.org/git/glibc.git
17 # Linux Kernel: Released 31 Oct 2021
18 RUN git clone --branch v5.15 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
19 # GNU C library: Released 02 Aug 2021
20 RUN git clone --branch release/2.34/master --depth 1 https://sourceware.org/git/glibc.git
2121
2222 # Get Go
23 ENV GOLANG_VERSION 1.17beta1
23 ENV GOLANG_VERSION 1.17.3
2424 ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
25 ENV GOLANG_DOWNLOAD_SHA256 a479681705b65971f9db079bfce53c4393bfa241d952eb09de88fb40677d3c4c
25 ENV GOLANG_DOWNLOAD_SHA256 550f9845451c0c94be679faf116291e7807a8d78b43149f9506c1b15eb89008c
2626
2727 RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
2828 && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
5252
5353 # Let the scripts know they are in the docker environment
5454 ENV GOLANG_SYS_BUILD docker
55 WORKDIR /build
55 WORKDIR /build/unix
5656 ENTRYPOINT ["go", "run", "linux/mkall.go", "/git/linux", "/git/glibc"]
99 // the appropriate sources are ready, the program is run as:
1010 // go run linux/mkall.go <linux_dir> <glibc_dir>
1111
12 //go:build ignore
1213 // +build ignore
1314
1415 package main
570571
571572 // Merge each of the four type of files
572573 for _, ztyp := range []string{"zerrors", "zsyscall", "zsysnum", "ztypes"} {
573 cmd := makeCommand("go", "run", "mkmerge.go", "-out", fmt.Sprintf("%s_%s.go", ztyp, GOOS), fmt.Sprintf("%s_%s_*.go", ztyp, GOOS))
574 cmd := makeCommand("go", "run", "./internal/mkmerge", "-out", fmt.Sprintf("%s_%s.go", ztyp, GOOS), fmt.Sprintf("%s_%s_*.go", ztyp, GOOS))
574575 err := cmd.Run()
575576 if err != nil {
576577 return fmt.Errorf("could not merge %s files: %w", ztyp, err)
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build ignore
45 // +build ignore
56
67 /*
9798 #include <linux/genetlink.h>
9899 #include <linux/hdreg.h>
99100 #include <linux/hidraw.h>
101 #include <linux/icmp.h>
100102 #include <linux/icmpv6.h>
101103 #include <linux/if_alg.h>
102104 #include <linux/if_bridge.h>
103105 #include <linux/if_packet.h>
104106 #include <linux/if_pppox.h>
105107 #include <linux/if_xdp.h>
108 #include <linux/ipc.h>
106109 #include <linux/keyctl.h>
110 #include <linux/landlock.h>
107111 #include <linux/loop.h>
108112 #include <linux/lwtunnel.h>
109113 #include <linux/mpls_iptunnel.h>
124128 #include <linux/random.h>
125129 #include <linux/rtc.h>
126130 #include <linux/rtnetlink.h>
131 #include <linux/shm.h>
127132 #include <linux/socket.h>
128133 #include <linux/stat.h>
129134 #include <linux/taskstats.h>
634639 type CanFilter C.struct_can_filter
635640
636641 type ifreq C.struct_ifreq
642
643 type TCPRepairOpt C.struct_tcp_repair_opt
637644
638645 const (
639646 SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
671678 SizeofUcred = C.sizeof_struct_ucred
672679 SizeofTCPInfo = C.sizeof_struct_tcp_info
673680 SizeofCanFilter = C.sizeof_struct_can_filter
681 SizeofTCPRepairOpt = C.sizeof_struct_tcp_repair_opt
674682 )
675683
676684 // Netlink routing and interface messages
802810 type NdUseroptmsg C.struct_nduseroptmsg
803811
804812 type NdMsg C.struct_ndmsg
813
814 // ICMP socket options
815
816 const (
817 ICMP_FILTER = C.ICMP_FILTER
818
819 ICMPV6_FILTER = C.ICMPV6_FILTER
820 ICMPV6_FILTER_BLOCK = C.ICMPV6_FILTER_BLOCK
821 ICMPV6_FILTER_BLOCKOTHERS = C.ICMPV6_FILTER_BLOCKOTHERS
822 ICMPV6_FILTER_PASS = C.ICMPV6_FILTER_PASS
823 ICMPV6_FILTER_PASSONLY = C.ICMPV6_FILTER_PASSONLY
824 )
805825
806826 // Linux socket filter
807827
32053225 LWTUNNEL_ENCAP_BPF = C.LWTUNNEL_ENCAP_BPF
32063226 LWTUNNEL_ENCAP_SEG6_LOCAL = C.LWTUNNEL_ENCAP_SEG6_LOCAL
32073227 LWTUNNEL_ENCAP_RPL = C.LWTUNNEL_ENCAP_RPL
3228 LWTUNNEL_ENCAP_IOAM6 = C.LWTUNNEL_ENCAP_IOAM6
32083229 LWTUNNEL_ENCAP_MAX = C.LWTUNNEL_ENCAP_MAX
32093230
32103231 MPLS_IPTUNNEL_UNSPEC = C.MPLS_IPTUNNEL_UNSPEC
35653586 ETHTOOL_A_COALESCE_TX_USECS_HIGH = C.ETHTOOL_A_COALESCE_TX_USECS_HIGH
35663587 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH = C.ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH
35673588 ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL = C.ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL
3589 ETHTOOL_A_COALESCE_USE_CQE_MODE_TX = C.ETHTOOL_A_COALESCE_USE_CQE_MODE_TX
3590 ETHTOOL_A_COALESCE_USE_CQE_MODE_RX = C.ETHTOOL_A_COALESCE_USE_CQE_MODE_RX
35683591 ETHTOOL_A_COALESCE_MAX = C.ETHTOOL_A_COALESCE_MAX
35693592 ETHTOOL_A_PAUSE_UNSPEC = C.ETHTOOL_A_PAUSE_UNSPEC
35703593 ETHTOOL_A_PAUSE_HEADER = C.ETHTOOL_A_PAUSE_HEADER
38003823 NFC_SDP_ATTR_URI = C.NFC_SDP_ATTR_URI
38013824 NFC_SDP_ATTR_SAP = C.NFC_SDP_ATTR_SAP
38023825 )
3826
3827 // Landlock
3828
3829 type LandlockRulesetAttr C.struct_landlock_ruleset_attr
3830
3831 type LandlockPathBeneathAttr C.struct_landlock_path_beneath_attr
3832
3833 const (
3834 LANDLOCK_RULE_PATH_BENEATH = C.LANDLOCK_RULE_PATH_BENEATH
3835 )
3836
3837 // pidfd flags.
3838
3839 const (
3840 PIDFD_NONBLOCK = C.O_NONBLOCK
3841 )
3842
3843 // shm
3844
3845 type SysvIpcPerm C.struct_ipc64_perm
3846 type SysvShmDesc C.struct_shmid64_ds
3847
3848 const (
3849 IPC_CREAT = C.IPC_CREAT
3850 IPC_EXCL = C.IPC_EXCL
3851 IPC_NOWAIT = C.IPC_NOWAIT
3852 IPC_PRIVATE = C.IPC_PRIVATE
3853
3854 ipc_64 = C.IPC_64
3855 )
3856
3857 const (
3858 IPC_RMID = C.IPC_RMID
3859 IPC_SET = C.IPC_SET
3860 IPC_STAT = C.IPC_STAT
3861 )
3862
3863 const (
3864 SHM_RDONLY = C.SHM_RDONLY
3865 SHM_RND = C.SHM_RND
3866 )
4949 # Use the Docker-based build system
5050 # Files generated through docker (use $cmd so you can Ctl-C the build or run)
5151 $cmd docker build --tag generate:$GOOS $GOOS
52 $cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")" && /bin/pwd):/build generate:$GOOS
52 $cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && /bin/pwd):/build generate:$GOOS
5353 exit
5454 fi
5555
1414 "io/ioutil"
1515 "log"
1616 "os"
17 "sort"
1718 "strings"
1819 )
1920
2021 const ptrsize = 8 // Pointer size. All supported platforms are 64-bit.
2122
22 func writeASMFile(in string, fileName string, buildTags string) {
23 func writeASMFile(in string, fileName string, buildTags string) map[string]bool {
2324 trampolines := map[string]bool{}
2425
2526 var out bytes.Buffer
5051 if err != nil {
5152 log.Fatalf("can't write %s: %s", fileName, err)
5253 }
54
55 return trampolines
56 }
57
58 const darwinTestTemplate = `// go run mkasm_darwin.go %s
59 // Code generated by the command above; DO NOT EDIT.
60
61 //go:build darwin && go1.12
62 // +build darwin,go1.12
63
64 package unix
65
66 // All the _trampoline functions in zsyscall_darwin_%s.s.
67 var darwinTests = [...]darwinTest{
68 %s}
69 `
70
71 func writeDarwinTest(trampolines map[string]bool, fileName, arch string) {
72 // sort trampolines
73 sorted := make([]string, len(trampolines))
74 i := 0
75 for trampoline := range trampolines {
76 sorted[i] = trampoline
77 i++
78 }
79 sort.Slice(sorted, func(i, j int) bool { return sorted[i] < sorted[j] })
80
81 var out bytes.Buffer
82
83 const prefix = "libc_"
84 for _, trampoline := range sorted {
85 fmt.Fprintf(&out, fmt.Sprintf("\t{%q, %s_trampoline_addr},\n", strings.TrimPrefix(trampoline, prefix), trampoline))
86 }
87 lines := out.String()
88
89 out.Reset()
90 fmt.Fprintf(&out, darwinTestTemplate, strings.Join(os.Args[1:], " "), arch, lines)
91
92 err := ioutil.WriteFile(fileName, out.Bytes(), 0644)
93 if err != nil {
94 log.Fatalf("can't write %s: %s", fileName, err)
95 }
5396 }
5497
5598 func main() {
68111 }
69112 in := string(in1) + string(in2) + string(in3)
70113
71 writeASMFile(in, fmt.Sprintf("zsyscall_darwin_%s.s", arch), "go1.12")
114 trampolines := writeASMFile(in, fmt.Sprintf("zsyscall_darwin_%s.s", arch), "go1.12")
72115
73116 in1, err = ioutil.ReadFile("syscall_darwin.1_13.go")
74117 if err != nil {
81124
82125 in = string(in1) + string(in2)
83126
84 writeASMFile(in, fmt.Sprintf("zsyscall_darwin_%s.1_13.s", arch), "go1.13")
127 trampolines2 := writeASMFile(in, fmt.Sprintf("zsyscall_darwin_%s.1_13.s", arch), "go1.13")
128
129 // merge trampolines
130 for trampoline := range trampolines2 {
131 trampolines[trampoline] = true
132 }
133
134 writeDarwinTest(trampolines, fmt.Sprintf("darwin_%s_test.go", arch), arch)
85135 }
5353
5454 includes_Darwin='
5555 #define _DARWIN_C_SOURCE
56 #define KERNEL
56 #define KERNEL 1
5757 #define _DARWIN_USE_64_BIT_INODE
5858 #define __APPLE_USE_RFC_3542
5959 #include <stdint.h>
7474 #include <sys/utsname.h>
7575 #include <sys/wait.h>
7676 #include <sys/xattr.h>
77 #include <sys/vsock.h>
7778 #include <net/bpf.h>
7879 #include <net/if.h>
7980 #include <net/if_types.h>
8182 #include <netinet/in.h>
8283 #include <netinet/ip.h>
8384 #include <termios.h>
85
86 // for backwards compatibility because moved TIOCREMOTE to Kernel.framework after MacOSX12.0.sdk.
87 #define TIOCREMOTE 0x80047469
8488 '
8589
8690 includes_DragonFly='
216220 #include <linux/genetlink.h>
217221 #include <linux/hdreg.h>
218222 #include <linux/hidraw.h>
219 #include <linux/icmp.h>
220 #include <linux/icmpv6.h>
221223 #include <linux/if.h>
222224 #include <linux/if_addr.h>
223225 #include <linux/if_alg.h>
230232 #include <linux/input.h>
231233 #include <linux/kexec.h>
232234 #include <linux/keyctl.h>
235 #include <linux/landlock.h>
233236 #include <linux/loop.h>
234237 #include <linux/lwtunnel.h>
235238 #include <linux/magic.h>
466469 $2 !~ /^EQUIV_/ &&
467470 $2 !~ /^EXPR_/ &&
468471 $2 !~ /^EVIOC/ &&
469 $2 !~ /^EV_/ &&
470472 $2 ~ /^E[A-Z0-9_]+$/ ||
471473 $2 ~ /^B[0-9_]+$/ ||
472474 $2 ~ /^(OLD|NEW)DEV$/ ||
498500 $2 ~ /^O?XTABS$/ ||
499501 $2 ~ /^TC[IO](ON|OFF)$/ ||
500502 $2 ~ /^IN_/ ||
503 $2 ~ /^LANDLOCK_/ ||
501504 $2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
502505 $2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
503506 $2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
504 $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL)_/ ||
507 $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT)_/ ||
505508 $2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
506509 $2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
507510 $2 ~ /^RAW_PAYLOAD_/ ||
+0
-523
unix/mkmerge.go less more
0 // Copyright 2020 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 //go:build ignore
5 // +build ignore
6
7 // mkmerge.go parses generated source files and merges common
8 // consts, funcs, and types into a common source file, per GOOS.
9 //
10 // Usage:
11 // $ go run mkmerge.go -out MERGED FILE [FILE ...]
12 //
13 // Example:
14 // # Remove all common consts, funcs, and types from zerrors_linux_*.go
15 // # and write the common code into zerrors_linux.go
16 // $ go run mkmerge.go -out zerrors_linux.go zerrors_linux_*.go
17 //
18 // mkmerge.go performs the merge in the following steps:
19 // 1. Construct the set of common code that is idential in all
20 // architecture-specific files.
21 // 2. Write this common code to the merged file.
22 // 3. Remove the common code from all architecture-specific files.
23 package main
24
25 import (
26 "bufio"
27 "bytes"
28 "flag"
29 "fmt"
30 "go/ast"
31 "go/format"
32 "go/parser"
33 "go/token"
34 "io"
35 "io/ioutil"
36 "log"
37 "os"
38 "path"
39 "path/filepath"
40 "regexp"
41 "strconv"
42 "strings"
43 )
44
45 const validGOOS = "aix|darwin|dragonfly|freebsd|linux|netbsd|openbsd|solaris"
46
47 // getValidGOOS returns GOOS, true if filename ends with a valid "_GOOS.go"
48 func getValidGOOS(filename string) (string, bool) {
49 matches := regexp.MustCompile(`_(` + validGOOS + `)\.go$`).FindStringSubmatch(filename)
50 if len(matches) != 2 {
51 return "", false
52 }
53 return matches[1], true
54 }
55
56 // codeElem represents an ast.Decl in a comparable way.
57 type codeElem struct {
58 tok token.Token // e.g. token.CONST, token.TYPE, or token.FUNC
59 src string // the declaration formatted as source code
60 }
61
62 // newCodeElem returns a codeElem based on tok and node, or an error is returned.
63 func newCodeElem(tok token.Token, node ast.Node) (codeElem, error) {
64 var b strings.Builder
65 err := format.Node(&b, token.NewFileSet(), node)
66 if err != nil {
67 return codeElem{}, err
68 }
69 return codeElem{tok, b.String()}, nil
70 }
71
72 // codeSet is a set of codeElems
73 type codeSet struct {
74 set map[codeElem]bool // true for all codeElems in the set
75 }
76
77 // newCodeSet returns a new codeSet
78 func newCodeSet() *codeSet { return &codeSet{make(map[codeElem]bool)} }
79
80 // add adds elem to c
81 func (c *codeSet) add(elem codeElem) { c.set[elem] = true }
82
83 // has returns true if elem is in c
84 func (c *codeSet) has(elem codeElem) bool { return c.set[elem] }
85
86 // isEmpty returns true if the set is empty
87 func (c *codeSet) isEmpty() bool { return len(c.set) == 0 }
88
89 // intersection returns a new set which is the intersection of c and a
90 func (c *codeSet) intersection(a *codeSet) *codeSet {
91 res := newCodeSet()
92
93 for elem := range c.set {
94 if a.has(elem) {
95 res.add(elem)
96 }
97 }
98 return res
99 }
100
101 // keepCommon is a filterFn for filtering the merged file with common declarations.
102 func (c *codeSet) keepCommon(elem codeElem) bool {
103 switch elem.tok {
104 case token.VAR:
105 // Remove all vars from the merged file
106 return false
107 case token.CONST, token.TYPE, token.FUNC, token.COMMENT:
108 // Remove arch-specific consts, types, functions, and file-level comments from the merged file
109 return c.has(elem)
110 case token.IMPORT:
111 // Keep imports, they are handled by filterImports
112 return true
113 }
114
115 log.Fatalf("keepCommon: invalid elem %v", elem)
116 return true
117 }
118
119 // keepArchSpecific is a filterFn for filtering the GOARC-specific files.
120 func (c *codeSet) keepArchSpecific(elem codeElem) bool {
121 switch elem.tok {
122 case token.CONST, token.TYPE, token.FUNC:
123 // Remove common consts, types, or functions from the arch-specific file
124 return !c.has(elem)
125 }
126 return true
127 }
128
129 // srcFile represents a source file
130 type srcFile struct {
131 name string
132 src []byte
133 }
134
135 // filterFn is a helper for filter
136 type filterFn func(codeElem) bool
137
138 // filter parses and filters Go source code from src, removing top
139 // level declarations using keep as predicate.
140 // For src parameter, please see docs for parser.ParseFile.
141 func filter(src interface{}, keep filterFn) ([]byte, error) {
142 // Parse the src into an ast
143 fset := token.NewFileSet()
144 f, err := parser.ParseFile(fset, "", src, parser.ParseComments)
145 if err != nil {
146 return nil, err
147 }
148 cmap := ast.NewCommentMap(fset, f, f.Comments)
149
150 // Group const/type specs on adjacent lines
151 var groups specGroups = make(map[string]int)
152 var groupID int
153
154 decls := f.Decls
155 f.Decls = f.Decls[:0]
156 for _, decl := range decls {
157 switch decl := decl.(type) {
158 case *ast.GenDecl:
159 // Filter imports, consts, types, vars
160 specs := decl.Specs
161 decl.Specs = decl.Specs[:0]
162 for i, spec := range specs {
163 elem, err := newCodeElem(decl.Tok, spec)
164 if err != nil {
165 return nil, err
166 }
167
168 // Create new group if there are empty lines between this and the previous spec
169 if i > 0 && fset.Position(specs[i-1].End()).Line < fset.Position(spec.Pos()).Line-1 {
170 groupID++
171 }
172
173 // Check if we should keep this spec
174 if keep(elem) {
175 decl.Specs = append(decl.Specs, spec)
176 groups.add(elem.src, groupID)
177 }
178 }
179 // Check if we should keep this decl
180 if len(decl.Specs) > 0 {
181 f.Decls = append(f.Decls, decl)
182 }
183 case *ast.FuncDecl:
184 // Filter funcs
185 elem, err := newCodeElem(token.FUNC, decl)
186 if err != nil {
187 return nil, err
188 }
189 if keep(elem) {
190 f.Decls = append(f.Decls, decl)
191 }
192 }
193 }
194
195 // Filter file level comments
196 if cmap[f] != nil {
197 commentGroups := cmap[f]
198 cmap[f] = cmap[f][:0]
199 for _, cGrp := range commentGroups {
200 if keep(codeElem{token.COMMENT, cGrp.Text()}) {
201 cmap[f] = append(cmap[f], cGrp)
202 }
203 }
204 }
205 f.Comments = cmap.Filter(f).Comments()
206
207 // Generate code for the filtered ast
208 var buf bytes.Buffer
209 if err = format.Node(&buf, fset, f); err != nil {
210 return nil, err
211 }
212
213 groupedSrc, err := groups.filterEmptyLines(&buf)
214 if err != nil {
215 return nil, err
216 }
217
218 return filterImports(groupedSrc)
219 }
220
221 // getCommonSet returns the set of consts, types, and funcs that are present in every file.
222 func getCommonSet(files []srcFile) (*codeSet, error) {
223 if len(files) == 0 {
224 return nil, fmt.Errorf("no files provided")
225 }
226 // Use the first architecture file as the baseline
227 baseSet, err := getCodeSet(files[0].src)
228 if err != nil {
229 return nil, err
230 }
231
232 // Compare baseline set with other architecture files: discard any element,
233 // that doesn't exist in other architecture files.
234 for _, f := range files[1:] {
235 set, err := getCodeSet(f.src)
236 if err != nil {
237 return nil, err
238 }
239
240 baseSet = baseSet.intersection(set)
241 }
242 return baseSet, nil
243 }
244
245 // getCodeSet returns the set of all top-level consts, types, and funcs from src.
246 // src must be string, []byte, or io.Reader (see go/parser.ParseFile docs)
247 func getCodeSet(src interface{}) (*codeSet, error) {
248 set := newCodeSet()
249
250 fset := token.NewFileSet()
251 f, err := parser.ParseFile(fset, "", src, parser.ParseComments)
252 if err != nil {
253 return nil, err
254 }
255
256 for _, decl := range f.Decls {
257 switch decl := decl.(type) {
258 case *ast.GenDecl:
259 // Add const, and type declarations
260 if !(decl.Tok == token.CONST || decl.Tok == token.TYPE) {
261 break
262 }
263
264 for _, spec := range decl.Specs {
265 elem, err := newCodeElem(decl.Tok, spec)
266 if err != nil {
267 return nil, err
268 }
269
270 set.add(elem)
271 }
272 case *ast.FuncDecl:
273 // Add func declarations
274 elem, err := newCodeElem(token.FUNC, decl)
275 if err != nil {
276 return nil, err
277 }
278
279 set.add(elem)
280 }
281 }
282
283 // Add file level comments
284 cmap := ast.NewCommentMap(fset, f, f.Comments)
285 for _, cGrp := range cmap[f] {
286 set.add(codeElem{token.COMMENT, cGrp.Text()})
287 }
288
289 return set, nil
290 }
291
292 // importName returns the identifier (PackageName) for an imported package
293 func importName(iSpec *ast.ImportSpec) (string, error) {
294 if iSpec.Name == nil {
295 name, err := strconv.Unquote(iSpec.Path.Value)
296 if err != nil {
297 return "", err
298 }
299 return path.Base(name), nil
300 }
301 return iSpec.Name.Name, nil
302 }
303
304 // specGroups tracks grouped const/type specs with a map of line: groupID pairs
305 type specGroups map[string]int
306
307 // add spec source to group
308 func (s specGroups) add(src string, groupID int) error {
309 srcBytes, err := format.Source(bytes.TrimSpace([]byte(src)))
310 if err != nil {
311 return err
312 }
313 s[string(srcBytes)] = groupID
314 return nil
315 }
316
317 // filterEmptyLines removes empty lines within groups of const/type specs.
318 // Returns the filtered source.
319 func (s specGroups) filterEmptyLines(src io.Reader) ([]byte, error) {
320 scanner := bufio.NewScanner(src)
321 var out bytes.Buffer
322
323 var emptyLines bytes.Buffer
324 prevGroupID := -1 // Initialize to invalid group
325 for scanner.Scan() {
326 line := bytes.TrimSpace(scanner.Bytes())
327
328 if len(line) == 0 {
329 fmt.Fprintf(&emptyLines, "%s\n", scanner.Bytes())
330 continue
331 }
332
333 // Discard emptyLines if previous non-empty line belonged to the same
334 // group as this line
335 if src, err := format.Source(line); err == nil {
336 groupID, ok := s[string(src)]
337 if ok && groupID == prevGroupID {
338 emptyLines.Reset()
339 }
340 prevGroupID = groupID
341 }
342
343 emptyLines.WriteTo(&out)
344 fmt.Fprintf(&out, "%s\n", scanner.Bytes())
345 }
346 if err := scanner.Err(); err != nil {
347 return nil, err
348 }
349 return out.Bytes(), nil
350 }
351
352 // filterImports removes unused imports from fileSrc, and returns a formatted src.
353 func filterImports(fileSrc []byte) ([]byte, error) {
354 fset := token.NewFileSet()
355 file, err := parser.ParseFile(fset, "", fileSrc, parser.ParseComments)
356 if err != nil {
357 return nil, err
358 }
359 cmap := ast.NewCommentMap(fset, file, file.Comments)
360
361 // create set of references to imported identifiers
362 keepImport := make(map[string]bool)
363 for _, u := range file.Unresolved {
364 keepImport[u.Name] = true
365 }
366
367 // filter import declarations
368 decls := file.Decls
369 file.Decls = file.Decls[:0]
370 for _, decl := range decls {
371 importDecl, ok := decl.(*ast.GenDecl)
372
373 // Keep non-import declarations
374 if !ok || importDecl.Tok != token.IMPORT {
375 file.Decls = append(file.Decls, decl)
376 continue
377 }
378
379 // Filter the import specs
380 specs := importDecl.Specs
381 importDecl.Specs = importDecl.Specs[:0]
382 for _, spec := range specs {
383 iSpec := spec.(*ast.ImportSpec)
384 name, err := importName(iSpec)
385 if err != nil {
386 return nil, err
387 }
388
389 if keepImport[name] {
390 importDecl.Specs = append(importDecl.Specs, iSpec)
391 }
392 }
393 if len(importDecl.Specs) > 0 {
394 file.Decls = append(file.Decls, importDecl)
395 }
396 }
397
398 // filter file.Imports
399 imports := file.Imports
400 file.Imports = file.Imports[:0]
401 for _, spec := range imports {
402 name, err := importName(spec)
403 if err != nil {
404 return nil, err
405 }
406
407 if keepImport[name] {
408 file.Imports = append(file.Imports, spec)
409 }
410 }
411 file.Comments = cmap.Filter(file).Comments()
412
413 var buf bytes.Buffer
414 err = format.Node(&buf, fset, file)
415 if err != nil {
416 return nil, err
417 }
418
419 return buf.Bytes(), nil
420 }
421
422 // merge extracts duplicate code from archFiles and merges it to mergeFile.
423 // 1. Construct commonSet: the set of code that is idential in all archFiles.
424 // 2. Write the code in commonSet to mergedFile.
425 // 3. Remove the commonSet code from all archFiles.
426 func merge(mergedFile string, archFiles ...string) error {
427 // extract and validate the GOOS part of the merged filename
428 goos, ok := getValidGOOS(mergedFile)
429 if !ok {
430 return fmt.Errorf("invalid GOOS in merged file name %s", mergedFile)
431 }
432
433 // Read architecture files
434 var inSrc []srcFile
435 for _, file := range archFiles {
436 src, err := ioutil.ReadFile(file)
437 if err != nil {
438 return fmt.Errorf("cannot read archfile %s: %w", file, err)
439 }
440
441 inSrc = append(inSrc, srcFile{file, src})
442 }
443
444 // 1. Construct the set of top-level declarations common for all files
445 commonSet, err := getCommonSet(inSrc)
446 if err != nil {
447 return err
448 }
449 if commonSet.isEmpty() {
450 // No common code => do not modify any files
451 return nil
452 }
453
454 // 2. Write the merged file
455 mergedSrc, err := filter(inSrc[0].src, commonSet.keepCommon)
456 if err != nil {
457 return err
458 }
459
460 f, err := os.Create(mergedFile)
461 if err != nil {
462 return err
463 }
464
465 buf := bufio.NewWriter(f)
466 fmt.Fprintln(buf, "// Code generated by mkmerge.go; DO NOT EDIT.")
467 fmt.Fprintln(buf)
468 fmt.Fprintf(buf, "//go:build %s\n", goos)
469 fmt.Fprintf(buf, "// +build %s\n", goos)
470 fmt.Fprintln(buf)
471 buf.Write(mergedSrc)
472
473 err = buf.Flush()
474 if err != nil {
475 return err
476 }
477 err = f.Close()
478 if err != nil {
479 return err
480 }
481
482 // 3. Remove duplicate declarations from the architecture files
483 for _, inFile := range inSrc {
484 src, err := filter(inFile.src, commonSet.keepArchSpecific)
485 if err != nil {
486 return err
487 }
488 err = ioutil.WriteFile(inFile.name, src, 0644)
489 if err != nil {
490 return err
491 }
492 }
493 return nil
494 }
495
496 func main() {
497 var mergedFile string
498 flag.StringVar(&mergedFile, "out", "", "Write merged code to `FILE`")
499 flag.Parse()
500
501 // Expand wildcards
502 var filenames []string
503 for _, arg := range flag.Args() {
504 matches, err := filepath.Glob(arg)
505 if err != nil {
506 fmt.Fprintf(os.Stderr, "Invalid command line argument %q: %v\n", arg, err)
507 os.Exit(1)
508 }
509 filenames = append(filenames, matches...)
510 }
511
512 if len(filenames) < 2 {
513 // No need to merge
514 return
515 }
516
517 err := merge(mergedFile, filenames...)
518 if err != nil {
519 fmt.Fprintf(os.Stderr, "Merge failed with error: %v\n", err)
520 os.Exit(1)
521 }
522 }
+0
-506
unix/mkmerge_test.go less more
0 // Copyright 2020 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 //go:build ignore
5 // +build ignore
6
7 // Test cases for mkmerge.go.
8 // Usage:
9 // $ go test mkmerge.go mkmerge_test.go
10 package main
11
12 import (
13 "bytes"
14 "fmt"
15 "go/parser"
16 "go/token"
17 "html/template"
18 "strings"
19 "testing"
20 )
21
22 func TestImports(t *testing.T) {
23 t.Run("importName", func(t *testing.T) {
24 cases := []struct {
25 src string
26 ident string
27 }{
28 {`"syscall"`, "syscall"},
29 {`. "foobar"`, "."},
30 {`"go/ast"`, "ast"},
31 {`moo "go/format"`, "moo"},
32 {`. "go/token"`, "."},
33 {`"golang.org/x/sys/unix"`, "unix"},
34 {`nix "golang.org/x/sys/unix"`, "nix"},
35 {`_ "golang.org/x/sys/unix"`, "_"},
36 }
37
38 for _, c := range cases {
39 pkgSrc := fmt.Sprintf("package main\nimport %s", c.src)
40
41 f, err := parser.ParseFile(token.NewFileSet(), "", pkgSrc, parser.ImportsOnly)
42 if err != nil {
43 t.Error(err)
44 continue
45 }
46 if len(f.Imports) != 1 {
47 t.Errorf("Got %d imports, expected 1", len(f.Imports))
48 continue
49 }
50
51 got, err := importName(f.Imports[0])
52 if err != nil {
53 t.Fatal(err)
54 }
55 if got != c.ident {
56 t.Errorf("Got %q, expected %q", got, c.ident)
57 }
58 }
59 })
60
61 t.Run("filterImports", func(t *testing.T) {
62 cases := []struct{ before, after string }{
63 {`package test
64
65 import (
66 "foo"
67 "bar"
68 )`,
69 "package test\n"},
70 {`package test
71
72 import (
73 "foo"
74 "bar"
75 )
76
77 func useFoo() { foo.Usage() }`,
78 `package test
79
80 import (
81 "foo"
82 )
83
84 func useFoo() { foo.Usage() }
85 `},
86 }
87 for _, c := range cases {
88 got, err := filterImports([]byte(c.before))
89 if err != nil {
90 t.Error(err)
91 }
92
93 if string(got) != c.after {
94 t.Errorf("Got:\n%s\nExpected:\n%s\n", got, c.after)
95 }
96 }
97 })
98 }
99
100 func TestMerge(t *testing.T) {
101 // Input architecture files
102 inTmpl := template.Must(template.New("input").Parse(`
103 // Package comments
104
105 // build directives for arch{{.}}
106
107 // +build goos,arch{{.}}
108
109 package main
110
111 /*
112 #include <stdint.h>
113 #include <stddef.h>
114 int utimes(uintptr_t, uintptr_t);
115 int utimensat(int, uintptr_t, uintptr_t, int);
116 */
117 import "C"
118
119 // The imports
120 import (
121 "commonDep"
122 "uniqueDep{{.}}"
123 )
124
125 // Vars
126 var (
127 commonVar = commonDep.Use("common")
128
129 uniqueVar{{.}} = "unique{{.}}"
130 )
131
132 // Common free standing comment
133
134 // Common comment
135 const COMMON_INDEPENDENT = 1234
136 const UNIQUE_INDEPENDENT_{{.}} = "UNIQUE_INDEPENDENT_{{.}}"
137
138 // Group comment
139 const (
140 COMMON_GROUP = "COMMON_GROUP"
141 UNIQUE_GROUP_{{.}} = "UNIQUE_GROUP_{{.}}"
142 )
143
144 // Group2 comment
145 const (
146 UNIQUE_GROUP21_{{.}} = "UNIQUE_GROUP21_{{.}}"
147 UNIQUE_GROUP22_{{.}} = "UNIQUE_GROUP22_{{.}}"
148 )
149
150 // Group3 comment
151 const (
152 sub1Common1 = 11
153 sub1Unique2{{.}} = 12
154 sub1Common3_LONG = 13
155
156 sub2Unique1{{.}} = 21
157 sub2Common2 = 22
158 sub2Common3 = 23
159 sub2Unique4{{.}} = 24
160 )
161
162 type commonInt int
163
164 type uniqueInt{{.}} int
165
166 func commonF() string {
167 return commonDep.Use("common")
168 }
169
170 func uniqueF() string {
171 C.utimes(0, 0)
172 return uniqueDep{{.}}.Use("{{.}}")
173 }
174
175 // Group4 comment
176 const (
177 sub3Common1 = 31
178 sub3Unique2{{.}} = 32
179 sub3Unique3{{.}} = 33
180 sub3Common4 = 34
181
182 sub4Common1, sub4Unique2{{.}} = 41, 42
183 sub4Unique3{{.}}, sub4Common4 = 43, 44
184 )
185 `))
186
187 // Filtered architecture files
188 outTmpl := template.Must(template.New("output").Parse(`// Package comments
189
190 // build directives for arch{{.}}
191
192 // +build goos,arch{{.}}
193
194 package main
195
196 /*
197 #include <stdint.h>
198 #include <stddef.h>
199 int utimes(uintptr_t, uintptr_t);
200 int utimensat(int, uintptr_t, uintptr_t, int);
201 */
202 import "C"
203
204 // The imports
205 import (
206 "commonDep"
207 "uniqueDep{{.}}"
208 )
209
210 // Vars
211 var (
212 commonVar = commonDep.Use("common")
213
214 uniqueVar{{.}} = "unique{{.}}"
215 )
216
217 const UNIQUE_INDEPENDENT_{{.}} = "UNIQUE_INDEPENDENT_{{.}}"
218
219 // Group comment
220 const (
221 UNIQUE_GROUP_{{.}} = "UNIQUE_GROUP_{{.}}"
222 )
223
224 // Group2 comment
225 const (
226 UNIQUE_GROUP21_{{.}} = "UNIQUE_GROUP21_{{.}}"
227 UNIQUE_GROUP22_{{.}} = "UNIQUE_GROUP22_{{.}}"
228 )
229
230 // Group3 comment
231 const (
232 sub1Unique2{{.}} = 12
233
234 sub2Unique1{{.}} = 21
235 sub2Unique4{{.}} = 24
236 )
237
238 type uniqueInt{{.}} int
239
240 func uniqueF() string {
241 C.utimes(0, 0)
242 return uniqueDep{{.}}.Use("{{.}}")
243 }
244
245 // Group4 comment
246 const (
247 sub3Unique2{{.}} = 32
248 sub3Unique3{{.}} = 33
249
250 sub4Common1, sub4Unique2{{.}} = 41, 42
251 sub4Unique3{{.}}, sub4Common4 = 43, 44
252 )
253 `))
254
255 const mergedFile = `// Package comments
256
257 package main
258
259 // The imports
260 import (
261 "commonDep"
262 )
263
264 // Common free standing comment
265
266 // Common comment
267 const COMMON_INDEPENDENT = 1234
268
269 // Group comment
270 const (
271 COMMON_GROUP = "COMMON_GROUP"
272 )
273
274 // Group3 comment
275 const (
276 sub1Common1 = 11
277 sub1Common3_LONG = 13
278
279 sub2Common2 = 22
280 sub2Common3 = 23
281 )
282
283 type commonInt int
284
285 func commonF() string {
286 return commonDep.Use("common")
287 }
288
289 // Group4 comment
290 const (
291 sub3Common1 = 31
292 sub3Common4 = 34
293 )
294 `
295
296 // Generate source code for different "architectures"
297 var inFiles, outFiles []srcFile
298 for _, arch := range strings.Fields("A B C D") {
299 buf := new(bytes.Buffer)
300 err := inTmpl.Execute(buf, arch)
301 if err != nil {
302 t.Fatal(err)
303 }
304 inFiles = append(inFiles, srcFile{"file" + arch, buf.Bytes()})
305
306 buf = new(bytes.Buffer)
307 err = outTmpl.Execute(buf, arch)
308 if err != nil {
309 t.Fatal(err)
310 }
311 outFiles = append(outFiles, srcFile{"file" + arch, buf.Bytes()})
312 }
313
314 t.Run("getCodeSet", func(t *testing.T) {
315 got, err := getCodeSet(inFiles[0].src)
316 if err != nil {
317 t.Fatal(err)
318 }
319
320 expectedElems := []codeElem{
321 {token.COMMENT, "Package comments\n"},
322 {token.COMMENT, "build directives for archA\n"},
323 {token.COMMENT, "+build goos,archA\n"},
324 {token.CONST, `COMMON_INDEPENDENT = 1234`},
325 {token.CONST, `UNIQUE_INDEPENDENT_A = "UNIQUE_INDEPENDENT_A"`},
326 {token.CONST, `COMMON_GROUP = "COMMON_GROUP"`},
327 {token.CONST, `UNIQUE_GROUP_A = "UNIQUE_GROUP_A"`},
328 {token.CONST, `UNIQUE_GROUP21_A = "UNIQUE_GROUP21_A"`},
329 {token.CONST, `UNIQUE_GROUP22_A = "UNIQUE_GROUP22_A"`},
330 {token.CONST, `sub1Common1 = 11`},
331 {token.CONST, `sub1Unique2A = 12`},
332 {token.CONST, `sub1Common3_LONG = 13`},
333 {token.CONST, `sub2Unique1A = 21`},
334 {token.CONST, `sub2Common2 = 22`},
335 {token.CONST, `sub2Common3 = 23`},
336 {token.CONST, `sub2Unique4A = 24`},
337 {token.CONST, `sub3Common1 = 31`},
338 {token.CONST, `sub3Unique2A = 32`},
339 {token.CONST, `sub3Unique3A = 33`},
340 {token.CONST, `sub3Common4 = 34`},
341 {token.CONST, `sub4Common1, sub4Unique2A = 41, 42`},
342 {token.CONST, `sub4Unique3A, sub4Common4 = 43, 44`},
343 {token.TYPE, `commonInt int`},
344 {token.TYPE, `uniqueIntA int`},
345 {token.FUNC, `func commonF() string {
346 return commonDep.Use("common")
347 }`},
348 {token.FUNC, `func uniqueF() string {
349 C.utimes(0, 0)
350 return uniqueDepA.Use("A")
351 }`},
352 }
353 expected := newCodeSet()
354 for _, d := range expectedElems {
355 expected.add(d)
356 }
357
358 if len(got.set) != len(expected.set) {
359 t.Errorf("Got %d codeElems, expected %d", len(got.set), len(expected.set))
360 }
361 for expElem := range expected.set {
362 if !got.has(expElem) {
363 t.Errorf("Didn't get expected codeElem %#v", expElem)
364 }
365 }
366 for gotElem := range got.set {
367 if !expected.has(gotElem) {
368 t.Errorf("Got unexpected codeElem %#v", gotElem)
369 }
370 }
371 })
372
373 t.Run("getCommonSet", func(t *testing.T) {
374 got, err := getCommonSet(inFiles)
375 if err != nil {
376 t.Fatal(err)
377 }
378
379 expected := newCodeSet()
380 expected.add(codeElem{token.COMMENT, "Package comments\n"})
381 expected.add(codeElem{token.CONST, `COMMON_INDEPENDENT = 1234`})
382 expected.add(codeElem{token.CONST, `COMMON_GROUP = "COMMON_GROUP"`})
383 expected.add(codeElem{token.CONST, `sub1Common1 = 11`})
384 expected.add(codeElem{token.CONST, `sub1Common3_LONG = 13`})
385 expected.add(codeElem{token.CONST, `sub2Common2 = 22`})
386 expected.add(codeElem{token.CONST, `sub2Common3 = 23`})
387 expected.add(codeElem{token.CONST, `sub3Common1 = 31`})
388 expected.add(codeElem{token.CONST, `sub3Common4 = 34`})
389 expected.add(codeElem{token.TYPE, `commonInt int`})
390 expected.add(codeElem{token.FUNC, `func commonF() string {
391 return commonDep.Use("common")
392 }`})
393
394 if len(got.set) != len(expected.set) {
395 t.Errorf("Got %d codeElems, expected %d", len(got.set), len(expected.set))
396 }
397 for expElem := range expected.set {
398 if !got.has(expElem) {
399 t.Errorf("Didn't get expected codeElem %#v", expElem)
400 }
401 }
402 for gotElem := range got.set {
403 if !expected.has(gotElem) {
404 t.Errorf("Got unexpected codeElem %#v", gotElem)
405 }
406 }
407 })
408
409 t.Run("filter(keepCommon)", func(t *testing.T) {
410 commonSet, err := getCommonSet(inFiles)
411 if err != nil {
412 t.Fatal(err)
413 }
414
415 got, err := filter(inFiles[0].src, commonSet.keepCommon)
416 expected := []byte(mergedFile)
417
418 if !bytes.Equal(got, expected) {
419 t.Errorf("Got:\n%s\nExpected:\n%s", addLineNr(got), addLineNr(expected))
420 diffLines(t, got, expected)
421 }
422 })
423
424 t.Run("filter(keepArchSpecific)", func(t *testing.T) {
425 commonSet, err := getCommonSet(inFiles)
426 if err != nil {
427 t.Fatal(err)
428 }
429
430 for i := range inFiles {
431 got, err := filter(inFiles[i].src, commonSet.keepArchSpecific)
432 if err != nil {
433 t.Fatal(err)
434 }
435
436 expected := outFiles[i].src
437
438 if !bytes.Equal(got, expected) {
439 t.Errorf("Got:\n%s\nExpected:\n%s", addLineNr(got), addLineNr(expected))
440 diffLines(t, got, expected)
441 }
442 }
443 })
444 }
445
446 func TestMergedName(t *testing.T) {
447 t.Run("getValidGOOS", func(t *testing.T) {
448 testcases := []struct {
449 filename, goos string
450 ok bool
451 }{
452 {"zerrors_aix.go", "aix", true},
453 {"zerrors_darwin.go", "darwin", true},
454 {"zerrors_dragonfly.go", "dragonfly", true},
455 {"zerrors_freebsd.go", "freebsd", true},
456 {"zerrors_linux.go", "linux", true},
457 {"zerrors_netbsd.go", "netbsd", true},
458 {"zerrors_openbsd.go", "openbsd", true},
459 {"zerrors_solaris.go", "solaris", true},
460 {"zerrors_multics.go", "", false},
461 }
462 for _, tc := range testcases {
463 goos, ok := getValidGOOS(tc.filename)
464 if goos != tc.goos {
465 t.Errorf("got GOOS %q, expected %q", goos, tc.goos)
466 }
467 if ok != tc.ok {
468 t.Errorf("got ok %v, expected %v", ok, tc.ok)
469 }
470 }
471 })
472 }
473
474 // Helper functions to diff test sources
475
476 func diffLines(t *testing.T, got, expected []byte) {
477 t.Helper()
478
479 gotLines := bytes.Split(got, []byte{'\n'})
480 expLines := bytes.Split(expected, []byte{'\n'})
481
482 i := 0
483 for i < len(gotLines) && i < len(expLines) {
484 if !bytes.Equal(gotLines[i], expLines[i]) {
485 t.Errorf("Line %d: Got:\n%q\nExpected:\n%q", i+1, gotLines[i], expLines[i])
486 return
487 }
488 i++
489 }
490
491 if i < len(gotLines) && i >= len(expLines) {
492 t.Errorf("Line %d: got %q, expected EOF", i+1, gotLines[i])
493 }
494 if i >= len(gotLines) && i < len(expLines) {
495 t.Errorf("Line %d: got EOF, expected %q", i+1, gotLines[i])
496 }
497 }
498
499 func addLineNr(src []byte) []byte {
500 lines := bytes.Split(src, []byte("\n"))
501 for i, line := range lines {
502 lines[i] = []byte(fmt.Sprintf("%d: %s", i+1, line))
503 }
504 return bytes.Join(lines, []byte("\n"))
505 }
6262 // the process creation time.
6363 externProcStarttimeRegex := regexp.MustCompile(`P_un\s*\[\d+\]byte`)
6464 b = externProcStarttimeRegex.ReplaceAll(b, []byte("P_starttime Timeval"))
65
66 // Convert [n]int8 to [n]byte in Eproc and ExternProc members to
67 // simplify conversion to string.
68 convertEprocRegex := regexp.MustCompile(`(P_comm|Wmesg|Login)(\s+)\[(\d+)\]int8`)
69 b = convertEprocRegex.ReplaceAll(b, []byte("$1$2[$3]byte"))
6570 }
6671
6772 // Intentionally export __val fields in Fsid and Sigset_t
3333 ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
3434 return &ucred, nil
3535 }
36
37 // PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO.
38 func PktInfo4(info *Inet4Pktinfo) []byte {
39 b := make([]byte, CmsgSpace(SizeofInet4Pktinfo))
40 h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
41 h.Level = SOL_IP
42 h.Type = IP_PKTINFO
43 h.SetLen(CmsgLen(SizeofInet4Pktinfo))
44 *(*Inet4Pktinfo)(h.data(0)) = *info
45 return b
46 }
47
48 // PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO.
49 func PktInfo6(info *Inet6Pktinfo) []byte {
50 b := make([]byte, CmsgSpace(SizeofInet6Pktinfo))
51 h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
52 h.Level = SOL_IPV6
53 h.Type = IPV6_PKTINFO
54 h.SetLen(CmsgLen(SizeofInet6Pktinfo))
55 *(*Inet6Pktinfo)(h.data(0)) = *info
56 return b
57 }
58
59 // ParseOrigDstAddr decodes a socket control message containing the original
60 // destination address. To receive such a message the IP_RECVORIGDSTADDR or
61 // IPV6_RECVORIGDSTADDR option must be enabled on the socket.
62 func ParseOrigDstAddr(m *SocketControlMessage) (Sockaddr, error) {
63 switch {
64 case m.Header.Level == SOL_IP && m.Header.Type == IP_ORIGDSTADDR:
65 pp := (*RawSockaddrInet4)(unsafe.Pointer(&m.Data[0]))
66 sa := new(SockaddrInet4)
67 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
68 sa.Port = int(p[0])<<8 + int(p[1])
69 sa.Addr = pp.Addr
70 return sa, nil
71
72 case m.Header.Level == SOL_IPV6 && m.Header.Type == IPV6_ORIGDSTADDR:
73 pp := (*RawSockaddrInet6)(unsafe.Pointer(&m.Data[0]))
74 sa := new(SockaddrInet6)
75 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
76 sa.Port = int(p[0])<<8 + int(p[1])
77 sa.ZoneId = pp.Scope_id
78 sa.Addr = pp.Addr
79 return sa, nil
80
81 default:
82 return nil, EINVAL
83 }
84 }
6969 p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
7070 p[0] = byte(sa.Port >> 8)
7171 p[1] = byte(sa.Port)
72 for i := 0; i < len(sa.Addr); i++ {
73 sa.raw.Addr[i] = sa.Addr[i]
74 }
72 sa.raw.Addr = sa.Addr
7573 return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
7674 }
7775
8482 p[0] = byte(sa.Port >> 8)
8583 p[1] = byte(sa.Port)
8684 sa.raw.Scope_id = sa.ZoneId
87 for i := 0; i < len(sa.Addr); i++ {
88 sa.raw.Addr[i] = sa.Addr[i]
89 }
85 sa.raw.Addr = sa.Addr
9086 return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
9187 }
9288
260256 sa := new(SockaddrInet4)
261257 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
262258 sa.Port = int(p[0])<<8 + int(p[1])
263 for i := 0; i < len(sa.Addr); i++ {
264 sa.Addr[i] = pp.Addr[i]
265 }
259 sa.Addr = pp.Addr
266260 return sa, nil
267261
268262 case AF_INET6:
271265 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
272266 sa.Port = int(p[0])<<8 + int(p[1])
273267 sa.ZoneId = pp.Scope_id
274 for i := 0; i < len(sa.Addr); i++ {
275 sa.Addr[i] = pp.Addr[i]
276 }
268 sa.Addr = pp.Addr
277269 return sa, nil
278270 }
279271 return nil, EAFNOSUPPORT
383375 //sys FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) = fcntl
384376
385377 //sys fcntl(fd int, cmd int, arg int) (val int, err error)
378
379 //sys fsyncRange(fd int, how int, start int64, length int64) (err error) = fsync_range
380 func Fsync(fd int) error {
381 return fsyncRange(fd, O_SYNC, 0, 0)
382 }
386383
387384 /*
388385 * Direct access
400397 //sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
401398 //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
402399 //sys Fdatasync(fd int) (err error)
403 //sys Fsync(fd int) (err error)
404400 // readdir_r
405401 //sysnb Getpgid(pid int) (pgid int, err error)
406402
162162 p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
163163 p[0] = byte(sa.Port >> 8)
164164 p[1] = byte(sa.Port)
165 for i := 0; i < len(sa.Addr); i++ {
166 sa.raw.Addr[i] = sa.Addr[i]
167 }
165 sa.raw.Addr = sa.Addr
168166 return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
169167 }
170168
178176 p[0] = byte(sa.Port >> 8)
179177 p[1] = byte(sa.Port)
180178 sa.raw.Scope_id = sa.ZoneId
181 for i := 0; i < len(sa.Addr); i++ {
182 sa.raw.Addr[i] = sa.Addr[i]
183 }
179 sa.raw.Addr = sa.Addr
184180 return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
185181 }
186182
209205 sa.raw.Nlen = sa.Nlen
210206 sa.raw.Alen = sa.Alen
211207 sa.raw.Slen = sa.Slen
212 for i := 0; i < len(sa.raw.Data); i++ {
213 sa.raw.Data[i] = sa.Data[i]
214 }
208 sa.raw.Data = sa.Data
215209 return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
216210 }
217211
227221 sa.Nlen = pp.Nlen
228222 sa.Alen = pp.Alen
229223 sa.Slen = pp.Slen
230 for i := 0; i < len(sa.Data); i++ {
231 sa.Data[i] = pp.Data[i]
232 }
224 sa.Data = pp.Data
233225 return sa, nil
234226
235227 case AF_UNIX:
261253 sa := new(SockaddrInet4)
262254 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
263255 sa.Port = int(p[0])<<8 + int(p[1])
264 for i := 0; i < len(sa.Addr); i++ {
265 sa.Addr[i] = pp.Addr[i]
266 }
256 sa.Addr = pp.Addr
267257 return sa, nil
268258
269259 case AF_INET6:
272262 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
273263 sa.Port = int(p[0])<<8 + int(p[1])
274264 sa.ZoneId = pp.Scope_id
275 for i := 0; i < len(sa.Addr); i++ {
276 sa.Addr[i] = pp.Addr[i]
277 }
265 sa.Addr = pp.Addr
278266 return sa, nil
279267 }
280268 return anyToSockaddrGOOS(fd, rsa)
6969 func TestSysctlClockinfo(t *testing.T) {
7070 ci, err := unix.SysctlClockinfo("kern.clockrate")
7171 if err != nil {
72 if runtime.GOOS == "openbsd" && (err == unix.ENOMEM || err == unix.EIO) {
73 if osrev, _ := unix.SysctlUint32("kern.osrevision"); osrev <= 202010 {
74 // SysctlClockinfo should fail gracefully due to a struct size
75 // mismatch on OpenBSD 6.8 and earlier, see
76 // https://golang.org/issue/47629
77 return
78 }
79 }
7280 t.Fatal(err)
7381 }
7482 t.Logf("tick = %v, hz = %v, profhz = %v, stathz = %v",
4747 return unsafe.Pointer(&sa.raw), SizeofSockaddrCtl, nil
4848 }
4949
50 // SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets.
51 // SockaddrVM provides access to Darwin VM sockets: a mechanism that enables
52 // bidirectional communication between a hypervisor and its guest virtual
53 // machines.
54 type SockaddrVM struct {
55 // CID and Port specify a context ID and port address for a VM socket.
56 // Guests have a unique CID, and hosts may have a well-known CID of:
57 // - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
58 // - VMADDR_CID_LOCAL: refers to local communication (loopback).
59 // - VMADDR_CID_HOST: refers to other processes on the host.
60 CID uint32
61 Port uint32
62 raw RawSockaddrVM
63 }
64
65 func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
66 sa.raw.Len = SizeofSockaddrVM
67 sa.raw.Family = AF_VSOCK
68 sa.raw.Port = sa.Port
69 sa.raw.Cid = sa.CID
70
71 return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
72 }
73
5074 func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
5175 switch rsa.Addr.Family {
5276 case AF_SYSTEM:
5781 sa.Unit = pp.Sc_unit
5882 return sa, nil
5983 }
84 case AF_VSOCK:
85 pp := (*RawSockaddrVM)(unsafe.Pointer(rsa))
86 sa := &SockaddrVM{
87 CID: pp.Cid,
88 Port: pp.Port,
89 }
90 return sa, nil
6091 }
6192 return nil, EAFNOSUPPORT
6293 }
398429 return x, err
399430 }
400431
401 func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
402 mib, err := sysctlmib(name)
432 func SysctlKinfoProc(name string, args ...int) (*KinfoProc, error) {
433 mib, err := sysctlmib(name, args...)
434 if err != nil {
435 return nil, err
436 }
437
438 var kinfo KinfoProc
439 n := uintptr(SizeofKinfoProc)
440 if err := sysctl(mib, (*byte)(unsafe.Pointer(&kinfo)), &n, nil, 0); err != nil {
441 return nil, err
442 }
443 if n != SizeofKinfoProc {
444 return nil, EIO
445 }
446 return &kinfo, nil
447 }
448
449 func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
450 mib, err := sysctlmib(name, args...)
403451 if err != nil {
404452 return nil, err
405453 }
431479 }
432480
433481 //sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
482
483 //sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
484 //sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
485 //sys shmdt(addr uintptr) (err error)
486 //sys shmget(key int, size int, flag int) (id int, err error)
434487
435488 /*
436489 * Exposed directly
589642 // Msgget
590643 // Msgsnd
591644 // Msgrcv
592 // Shmat
593 // Shmctl
594 // Shmdt
595 // Shmget
596645 // Shm_open
597646 // Shm_unlink
598647 // Sem_open
255255 }
256256 }
257257 }
258
259 func TestSysctlKinfoProc(t *testing.T) {
260 pid := unix.Getpid()
261 kp, err := unix.SysctlKinfoProc("kern.proc.pid", pid)
262 if err != nil {
263 t.Fatalf("SysctlKinfoProc: %v", err)
264 }
265 if got, want := int(kp.Proc.P_pid), pid; got != want {
266 t.Errorf("got pid %d, want %d", got, want)
267 }
268 }
269
270 func TestSysctlKinfoProcSlice(t *testing.T) {
271 kps, err := unix.SysctlKinfoProcSlice("kern.proc.all")
272 if err != nil {
273 t.Fatalf("SysctlKinfoProc: %v", err)
274 }
275 if len(kps) == 0 {
276 t.Errorf("SysctlKinfoProcSlice: expected at least one process")
277 }
278
279 uid := unix.Getuid()
280 kps, err = unix.SysctlKinfoProcSlice("kern.proc.uid", uid)
281 if err != nil {
282 t.Fatalf("SysctlKinfoProc: %v", err)
283 }
284 if len(kps) == 0 {
285 t.Errorf("SysctlKinfoProcSlice: expected at least one process")
286 }
287
288 for _, kp := range kps {
289 if got, want := int(kp.Eproc.Ucred.Uid), uid; got != want {
290 t.Errorf("process %d: got uid %d, want %d", kp.Proc.P_pid, got, want)
291 }
292 }
293 }
161161 return *(*int)(unsafe.Pointer(&l.Lifru[0]))
162162 }
163163
164 func (l *Lifreq) SetLifruUint(d uint) {
165 *(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
166 }
167
168 func (l *Lifreq) GetLifruUint() uint {
169 return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
170 }
171
164172 func IoctlLifreq(fd int, req uint, l *Lifreq) error {
165173 return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
166174 }
77 package unix_test
88
99 import (
10 "fmt"
11 "os/exec"
12 "strings"
1013 "testing"
1114
1215 "golang.org/x/sys/unix"
2326 t.Errorf(`Lifreq.SetName("tun0") failed: %v`, err)
2427 }
2528 }
29
30 func TestLifreqGetMTU(t *testing.T) {
31 // Find links and their MTU using CLI tooling
32 // $ dladm show-link -p -o link,mtu
33 // net0:1500
34 out, err := exec.Command("dladm", "show-link", "-p", "-o", "link,mtu").Output()
35 if err != nil {
36 t.Fatalf("unable to use dladm to find data links: %v", err)
37 }
38 lines := strings.Split(string(out), "\n")
39 tc := make(map[string]string)
40 for _, line := range lines {
41 v := strings.Split(line, ":")
42 if len(v) == 2 {
43 tc[v[0]] = v[1]
44 }
45 }
46 ip_fd, err := unix.Socket(unix.AF_INET, unix.SOCK_DGRAM, 0)
47 if err != nil {
48 t.Fatalf("could not open udp socket: %v", err)
49 }
50 // SIOCGLIFMTU is negative which confuses the compiler if used inline:
51 // Using "unix.IoctlLifreq(ip_fd, unix.SIOCGLIFMTU, &l)" results in
52 // "constant -1065850502 overflows uint"
53 reqnum := int(unix.SIOCGLIFMTU)
54 var l unix.Lifreq
55 for link, mtu := range tc {
56 err = l.SetName(link)
57 if err != nil {
58 t.Fatalf("Lifreq.SetName(%q) failed: %v", link, err)
59 }
60 if err = unix.IoctlLifreq(ip_fd, uint(reqnum), &l); err != nil {
61 t.Fatalf("unable to SIOCGLIFMTU: %v", err)
62 }
63 m := l.GetLifruUint()
64 if fmt.Sprintf("%d", m) != mtu {
65 t.Errorf("unable to read MTU correctly: expected %s, got %d", mtu, m)
66 }
67 }
68 }
4949 Unit: 0xC71,
5050 },
5151 },
52 {
53 name: "AF_VSOCK emtpy",
54 rsa: sockaddrVMToAny(RawSockaddrVM{}),
55 err: EAFNOSUPPORT,
56 },
57 {
58 name: "AF_VSOCK Cid and Port",
59 rsa: sockaddrVMToAny(RawSockaddrVM{
60 Family: AF_VSOCK,
61 Cid: VMADDR_CID_HOST,
62 Port: VMADDR_PORT_ANY,
63 }),
64 sa: &SockaddrVM{
65 CID: VMADDR_CID_HOST,
66 Port: VMADDR_PORT_ANY,
67 },
68 },
5269 }
5370
5471 for _, tt := range tests {
120137 }
121138 }
122139
140 func TestSockaddrVM_sockaddr(t *testing.T) {
141 tests := []struct {
142 name string
143 sa *SockaddrVM
144 raw *RawSockaddrVM
145 err error
146 }{
147 {
148 name: "empty",
149 sa: &SockaddrVM{},
150 raw: &RawSockaddrVM{
151 Len: SizeofSockaddrVM,
152 Family: AF_VSOCK,
153 },
154 },
155 {
156 name: "with CID and port",
157 sa: &SockaddrVM{
158 CID: VMADDR_CID_HOST,
159 Port: VMADDR_PORT_ANY,
160 },
161 raw: &RawSockaddrVM{
162 Len: SizeofSockaddrVM,
163 Family: AF_VSOCK,
164 Port: VMADDR_PORT_ANY,
165 Cid: VMADDR_CID_HOST,
166 },
167 },
168 }
169
170 for _, tt := range tests {
171 t.Run(tt.name, func(t *testing.T) {
172 out, l, err := tt.sa.sockaddr()
173 if err != tt.err {
174 t.Fatalf("unexpected error: %v, want: %v", err, tt.err)
175 }
176
177 // Must be 0 on error or a fixed size otherwise.
178 if (tt.err != nil && l != 0) || (tt.raw != nil && l != SizeofSockaddrVM) {
179 t.Fatalf("unexpected Socklen: %d", l)
180 }
181
182 if out != nil {
183 raw := (*RawSockaddrVM)(out)
184 if !reflect.DeepEqual(raw, tt.raw) {
185 t.Fatalf("unexpected RawSockaddrVM:\n got: %#v\nwant: %#v", raw, tt.raw)
186 }
187 }
188 })
189 }
190 }
191
123192 func sockaddrCtlToAny(in RawSockaddrCtl) *RawSockaddrAny {
124193 var out RawSockaddrAny
125194 copy(
128197 )
129198 return &out
130199 }
200
201 func sockaddrVMToAny(in RawSockaddrVM) *RawSockaddrAny {
202 var out RawSockaddrAny
203 copy(
204 (*(*[SizeofSockaddrAny]byte)(unsafe.Pointer(&out)))[:],
205 (*(*[SizeofSockaddrVM]byte)(unsafe.Pointer(&in)))[:],
206 )
207 return &out
208 }
1212 "testing"
1313 "unsafe"
1414 )
15
16 func Test_ifreqSize(t *testing.T) {
17 // Ensure ifreq (generated) and ifreqData (hand-written due to
18 // unsafe.Pointer field) are identical in size.
19 if want, got := unsafe.Sizeof(ifreq{}), unsafe.Sizeof(ifreqData{}); want != got {
20 t.Fatalf("unexpected ifreq size: got: %d, want: %d", got, want)
21 }
22 }
2315
2416 func makeProto(proto int) *int {
2517 return &proto
261253 proto: makeProto(^0),
262254 },
263255 {
256 name: "AF_VSOCK emtpy",
257 rsa: sockaddrVMToAny(RawSockaddrVM{}),
258 err: EAFNOSUPPORT,
259 },
260 {
261 name: "AF_VSOCK Cid and Port",
262 rsa: sockaddrVMToAny(RawSockaddrVM{
263 Family: AF_VSOCK,
264 Cid: VMADDR_CID_HOST,
265 Port: VMADDR_PORT_ANY,
266 }),
267 sa: &SockaddrVM{
268 CID: VMADDR_CID_HOST,
269 Port: VMADDR_PORT_ANY,
270 },
271 },
272 {
264273 name: "AF_MAX EAFNOSUPPORT",
265274 rsa: &RawSockaddrAny{
266275 Addr: RawSockaddr{
789798 raw := (*RawSockaddrNFCLLCP)(out)
790799 if !reflect.DeepEqual(raw, tt.raw) {
791800 t.Fatalf("unexpected RawSockaddrNFCLLCP:\n got: %#v\nwant: %#v", raw, tt.raw)
801 }
802 }
803 })
804 }
805 }
806
807 func TestSockaddrVM_sockaddr(t *testing.T) {
808 tests := []struct {
809 name string
810 sa *SockaddrVM
811 raw *RawSockaddrVM
812 err error
813 }{
814 {
815 name: "empty",
816 sa: &SockaddrVM{},
817 raw: &RawSockaddrVM{
818 Family: AF_VSOCK,
819 },
820 },
821 {
822 name: "with CID, port and flags",
823 sa: &SockaddrVM{
824 CID: VMADDR_CID_HOST,
825 Port: VMADDR_PORT_ANY,
826 Flags: VMADDR_FLAG_TO_HOST,
827 },
828 raw: &RawSockaddrVM{
829 Family: AF_VSOCK,
830 Port: VMADDR_PORT_ANY,
831 Cid: VMADDR_CID_HOST,
832 Flags: VMADDR_FLAG_TO_HOST,
833 },
834 },
835 }
836
837 for _, tt := range tests {
838 t.Run(tt.name, func(t *testing.T) {
839 out, l, err := tt.sa.sockaddr()
840 if err != tt.err {
841 t.Fatalf("unexpected error: %v, want: %v", err, tt.err)
842 }
843
844 // Must be 0 on error or a fixed size otherwise.
845 if (tt.err != nil && l != 0) || (tt.raw != nil && l != SizeofSockaddrVM) {
846 t.Fatalf("unexpected Socklen: %d", l)
847 }
848
849 if out != nil {
850 raw := (*RawSockaddrVM)(out)
851 if !reflect.DeepEqual(raw, tt.raw) {
852 t.Fatalf("unexpected RawSockaddrVM:\n got: %#v\nwant: %#v", raw, tt.raw)
792853 }
793854 }
794855 })
869930 )
870931 return &out
871932 }
933
934 func sockaddrVMToAny(in RawSockaddrVM) *RawSockaddrAny {
935 var out RawSockaddrAny
936 copy(
937 (*(*[SizeofSockaddrAny]byte)(unsafe.Pointer(&out)))[:],
938 (*(*[SizeofSockaddrVM]byte)(unsafe.Pointer(&in)))[:],
939 )
940 return &out
941 }
1212
1313 import (
1414 "encoding/binary"
15 "runtime"
1615 "syscall"
1716 "unsafe"
1817 )
3534
3635 func Creat(path string, mode uint32) (fd int, err error) {
3736 return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
37 }
38
39 func EpollCreate(size int) (fd int, err error) {
40 if size <= 0 {
41 return -1, EINVAL
42 }
43 return EpollCreate1(0)
3844 }
3945
4046 //sys FanotifyInit(flags uint, event_f_flags uint) (fd int, err error)
6571 return fchmodat(dirfd, path, mode)
6672 }
6773
68 //sys ioctl(fd int, req uint, arg uintptr) (err error)
69
70 // ioctl itself should not be exposed directly, but additional get/set
71 // functions for specific types are permissible.
72 // These are defined in ioctl.go and ioctl_linux.go.
74 func InotifyInit() (fd int, err error) {
75 return InotifyInit1(0)
76 }
77
78 //sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
79 //sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
80
81 // ioctl itself should not be exposed directly, but additional get/set functions
82 // for specific types are permissible. These are defined in ioctl.go and
83 // ioctl_linux.go.
84 //
85 // The third argument to ioctl is often a pointer but sometimes an integer.
86 // Callers should use ioctlPtr when the third argument is a pointer and ioctl
87 // when the third argument is an integer.
88 //
89 // TODO: some existing code incorrectly uses ioctl when it should use ioctlPtr.
7390
7491 //sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
7592
99116
100117 func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) {
101118 return openat2(dirfd, path, how, SizeofOpenHow)
119 }
120
121 func Pipe(p []int) error {
122 return Pipe2(p, 0)
123 }
124
125 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
126
127 func Pipe2(p []int, flags int) error {
128 if len(p) != 2 {
129 return EINVAL
130 }
131 var pp [2]_C_int
132 err := pipe2(&pp, flags)
133 p[0] = int(pp[0])
134 p[1] = int(pp[1])
135 return err
102136 }
103137
104138 //sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
108142 return ppoll(nil, 0, timeout, sigmask)
109143 }
110144 return ppoll(&fds[0], len(fds), timeout, sigmask)
145 }
146
147 func Poll(fds []PollFd, timeout int) (n int, err error) {
148 var ts *Timespec
149 if timeout >= 0 {
150 ts = new(Timespec)
151 *ts = NsecToTimespec(int64(timeout) * 1e6)
152 }
153 return Ppoll(fds, ts, nil)
111154 }
112155
113156 //sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
160203 //sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
161204
162205 func UtimesNano(path string, ts []Timespec) error {
163 if ts == nil {
164 err := utimensat(AT_FDCWD, path, nil, 0)
165 if err != ENOSYS {
166 return err
167 }
168 return utimes(path, nil)
169 }
170 if len(ts) != 2 {
171 return EINVAL
172 }
173 err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
174 if err != ENOSYS {
175 return err
176 }
177 // If the utimensat syscall isn't available (utimensat was added to Linux
178 // in 2.6.22, Released, 8 July 2007) then fall back to utimes
179 var tv [2]Timeval
180 for i := 0; i < 2; i++ {
181 tv[i] = NsecToTimeval(TimespecToNsec(ts[i]))
182 }
183 return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
206 return UtimesNanoAt(AT_FDCWD, path, ts, 0)
184207 }
185208
186209 func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
348371 p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
349372 p[0] = byte(sa.Port >> 8)
350373 p[1] = byte(sa.Port)
351 for i := 0; i < len(sa.Addr); i++ {
352 sa.raw.Addr[i] = sa.Addr[i]
353 }
374 sa.raw.Addr = sa.Addr
354375 return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
355376 }
356377
363384 p[0] = byte(sa.Port >> 8)
364385 p[1] = byte(sa.Port)
365386 sa.raw.Scope_id = sa.ZoneId
366 for i := 0; i < len(sa.Addr); i++ {
367 sa.raw.Addr[i] = sa.Addr[i]
368 }
387 sa.raw.Addr = sa.Addr
369388 return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
370389 }
371390
414433 sa.raw.Hatype = sa.Hatype
415434 sa.raw.Pkttype = sa.Pkttype
416435 sa.raw.Halen = sa.Halen
417 for i := 0; i < len(sa.Addr); i++ {
418 sa.raw.Addr[i] = sa.Addr[i]
419 }
436 sa.raw.Addr = sa.Addr
420437 return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
421438 }
422439
831848 if sa.Addr == nil {
832849 return nil, 0, EINVAL
833850 }
834
835851 sa.raw.Family = AF_TIPC
836852 sa.raw.Scope = int8(sa.Scope)
837853 sa.raw.Addrtype = sa.Addr.tipcAddrtype()
838854 sa.raw.Addr = sa.Addr.tipcAddr()
839
840855 return unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil
841856 }
842857
850865 func (sa *SockaddrL2TPIP) sockaddr() (unsafe.Pointer, _Socklen, error) {
851866 sa.raw.Family = AF_INET
852867 sa.raw.Conn_id = sa.ConnId
853 for i := 0; i < len(sa.Addr); i++ {
854 sa.raw.Addr[i] = sa.Addr[i]
855 }
868 sa.raw.Addr = sa.Addr
856869 return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP, nil
857870 }
858871
868881 sa.raw.Family = AF_INET6
869882 sa.raw.Conn_id = sa.ConnId
870883 sa.raw.Scope_id = sa.ZoneId
871 for i := 0; i < len(sa.Addr); i++ {
872 sa.raw.Addr[i] = sa.Addr[i]
873 }
884 sa.raw.Addr = sa.Addr
874885 return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP6, nil
875886 }
876887
966977 sa.Hatype = pp.Hatype
967978 sa.Pkttype = pp.Pkttype
968979 sa.Halen = pp.Halen
969 for i := 0; i < len(sa.Addr); i++ {
970 sa.Addr[i] = pp.Addr[i]
971 }
980 sa.Addr = pp.Addr
972981 return sa, nil
973982
974983 case AF_UNIX:
10071016 pp := (*RawSockaddrL2TPIP)(unsafe.Pointer(rsa))
10081017 sa := new(SockaddrL2TPIP)
10091018 sa.ConnId = pp.Conn_id
1010 for i := 0; i < len(sa.Addr); i++ {
1011 sa.Addr[i] = pp.Addr[i]
1012 }
1019 sa.Addr = pp.Addr
10131020 return sa, nil
10141021 default:
10151022 pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
10161023 sa := new(SockaddrInet4)
10171024 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
10181025 sa.Port = int(p[0])<<8 + int(p[1])
1019 for i := 0; i < len(sa.Addr); i++ {
1020 sa.Addr[i] = pp.Addr[i]
1021 }
1026 sa.Addr = pp.Addr
10221027 return sa, nil
10231028 }
10241029
10341039 sa := new(SockaddrL2TPIP6)
10351040 sa.ConnId = pp.Conn_id
10361041 sa.ZoneId = pp.Scope_id
1037 for i := 0; i < len(sa.Addr); i++ {
1038 sa.Addr[i] = pp.Addr[i]
1039 }
1042 sa.Addr = pp.Addr
10401043 return sa, nil
10411044 default:
10421045 pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
10441047 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
10451048 sa.Port = int(p[0])<<8 + int(p[1])
10461049 sa.ZoneId = pp.Scope_id
1047 for i := 0; i < len(sa.Addr); i++ {
1048 sa.Addr[i] = pp.Addr[i]
1049 }
1050 sa.Addr = pp.Addr
10501051 return sa, nil
10511052 }
10521053
12211222 func Accept(fd int) (nfd int, sa Sockaddr, err error) {
12221223 var rsa RawSockaddrAny
12231224 var len _Socklen = SizeofSockaddrAny
1224 // Try accept4 first for Android, then try accept for kernel older than 2.6.28
12251225 nfd, err = accept4(fd, &rsa, &len, 0)
1226 if err == ENOSYS {
1227 nfd, err = accept(fd, &rsa, &len)
1228 }
12291226 if err != nil {
12301227 return
12311228 }
13451342
13461343 func SetsockoptTpacketReq3(fd, level, opt int, tp *TpacketReq3) error {
13471344 return setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp))
1345 }
1346
1347 func SetsockoptTCPRepairOpt(fd, level, opt int, o []TCPRepairOpt) (err error) {
1348 if len(o) == 0 {
1349 return EINVAL
1350 }
1351 return setsockopt(fd, level, opt, unsafe.Pointer(&o[0]), uintptr(SizeofTCPRepairOpt*len(o)))
13481352 }
13491353
13501354 // Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
18011805 //sys Dup(oldfd int) (fd int, err error)
18021806
18031807 func Dup2(oldfd, newfd int) error {
1804 // Android O and newer blocks dup2; riscv and arm64 don't implement dup2.
1805 if runtime.GOOS == "android" || runtime.GOARCH == "riscv64" || runtime.GOARCH == "arm64" {
1806 return Dup3(oldfd, newfd, 0)
1807 }
1808 return dup2(oldfd, newfd)
1808 return Dup3(oldfd, newfd, 0)
18091809 }
18101810
18111811 //sys Dup3(oldfd int, newfd int, flags int) (err error)
18581858 //sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
18591859 //sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
18601860 //sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
1861 //sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
1861 //sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
18621862 //sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
18631863 //sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
18641864 //sys read(fd int, p []byte) (n int, err error)
22922292
22932293 //sys ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_READV
22942294 //sys ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_WRITEV
2295
2296 //sys PidfdOpen(pid int, flags int) (fd int, err error) = SYS_PIDFD_OPEN
2297 //sys PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) = SYS_PIDFD_GETFD
2298
2299 //sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
2300 //sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
2301 //sys shmdt(addr uintptr) (err error)
2302 //sys shmget(key int, size int, flag int) (id int, err error)
22952303
22962304 /*
22972305 * Unimplemented
23742382 // SetRobustList
23752383 // SetThreadArea
23762384 // SetTidAddress
2377 // Shmat
2378 // Shmctl
2379 // Shmdt
2380 // Shmget
23812385 // Sigaltstack
23822386 // Swapoff
23832387 // Swapon
1818 return Timeval{Sec: int32(sec), Usec: int32(usec)}
1919 }
2020
21 //sysnb pipe(p *[2]_C_int) (err error)
22
23 func Pipe(p []int) (err error) {
24 if len(p) != 2 {
25 return EINVAL
26 }
27 var pp [2]_C_int
28 err = pipe(&pp)
29 p[0] = int(pp[0])
30 p[1] = int(pp[1])
31 return
32 }
33
34 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
35
36 func Pipe2(p []int, flags int) (err error) {
37 if len(p) != 2 {
38 return EINVAL
39 }
40 var pp [2]_C_int
41 err = pipe2(&pp, flags)
42 p[0] = int(pp[0])
43 p[1] = int(pp[1])
44 return
45 }
46
4721 // 64-bit file system and 32-bit uid calls
4822 // (386 default is 32-bit file system and 16-bit uid).
49 //sys dup2(oldfd int, newfd int) (err error)
50 //sysnb EpollCreate(size int) (fd int, err error)
5123 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
5224 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
5325 //sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
5830 //sysnb Geteuid() (euid int) = SYS_GETEUID32
5931 //sysnb Getgid() (gid int) = SYS_GETGID32
6032 //sysnb Getuid() (uid int) = SYS_GETUID32
61 //sysnb InotifyInit() (fd int, err error)
6233 //sys Ioperm(from int, num int, on int) (err error)
6334 //sys Iopl(level int) (err error)
6435 //sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
10475 const rlimInf64 = ^uint64(0)
10576
10677 func Getrlimit(resource int, rlim *Rlimit) (err error) {
107 err = prlimit(0, resource, nil, rlim)
78 err = Prlimit(0, resource, nil, rlim)
10879 if err != ENOSYS {
10980 return err
11081 }
132103 //sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
133104
134105 func Setrlimit(resource int, rlim *Rlimit) (err error) {
135 err = prlimit(0, resource, rlim, nil)
106 err = Prlimit(0, resource, rlim, nil)
136107 if err != ENOSYS {
137108 return err
138109 }
380351 func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
381352 rsa.Service_name_len = uint32(length)
382353 }
383
384 //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
385
386 func Poll(fds []PollFd, timeout int) (n int, err error) {
387 if len(fds) == 0 {
388 return poll(nil, 0, timeout)
389 }
390 return poll(&fds[0], len(fds), timeout)
391 }
66
77 package unix
88
9 //sys dup2(oldfd int, newfd int) (err error)
10 //sysnb EpollCreate(size int) (fd int, err error)
119 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
1210 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
1311 //sys Fchown(fd int, uid int, gid int) (err error)
2018 //sysnb Getgid() (gid int)
2119 //sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
2220 //sysnb Getuid() (uid int)
23 //sysnb inotifyInit() (fd int, err error)
24
25 func InotifyInit() (fd int, err error) {
26 // First try inotify_init1, because Android's seccomp policy blocks the latter.
27 fd, err = InotifyInit1(0)
28 if err == ENOSYS {
29 fd, err = inotifyInit()
30 }
31 return
32 }
33
3421 //sys Ioperm(from int, num int, on int) (err error)
3522 //sys Iopl(level int) (err error)
3623 //sys Lchown(path string, uid int, gid int) (err error)
125112 return Timeval{Sec: sec, Usec: usec}
126113 }
127114
128 //sysnb pipe(p *[2]_C_int) (err error)
129
130 func Pipe(p []int) (err error) {
131 if len(p) != 2 {
132 return EINVAL
133 }
134 var pp [2]_C_int
135 err = pipe(&pp)
136 p[0] = int(pp[0])
137 p[1] = int(pp[1])
138 return
139 }
140
141 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
142
143 func Pipe2(p []int, flags int) (err error) {
144 if len(p) != 2 {
145 return EINVAL
146 }
147 var pp [2]_C_int
148 err = pipe2(&pp, flags)
149 p[0] = int(pp[0])
150 p[1] = int(pp[1])
151 return
152 }
153
154115 func (r *PtraceRegs) PC() uint64 { return r.Rip }
155116
156117 func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }
175136 rsa.Service_name_len = uint64(length)
176137 }
177138
178 //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
179
180 func Poll(fds []PollFd, timeout int) (n int, err error) {
181 if len(fds) == 0 {
182 return poll(nil, 0, timeout)
183 }
184 return poll(&fds[0], len(fds), timeout)
185 }
186
187139 //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
188140
189141 func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
1616
1717 func setTimeval(sec, usec int64) Timeval {
1818 return Timeval{Sec: int32(sec), Usec: int32(usec)}
19 }
20
21 //sysnb pipe(p *[2]_C_int) (err error)
22
23 func Pipe(p []int) (err error) {
24 if len(p) != 2 {
25 return EINVAL
26 }
27 var pp [2]_C_int
28 // Try pipe2 first for Android O, then try pipe for kernel 2.6.23.
29 err = pipe2(&pp, 0)
30 if err == ENOSYS {
31 err = pipe(&pp)
32 }
33 p[0] = int(pp[0])
34 p[1] = int(pp[1])
35 return
36 }
37
38 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
39
40 func Pipe2(p []int, flags int) (err error) {
41 if len(p) != 2 {
42 return EINVAL
43 }
44 var pp [2]_C_int
45 err = pipe2(&pp, flags)
46 p[0] = int(pp[0])
47 p[1] = int(pp[1])
48 return
4919 }
5020
5121 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
7545
7646 // 64-bit file system and 32-bit uid calls
7747 // (16-bit uid calls are not always supported in newer kernels)
78 //sys dup2(oldfd int, newfd int) (err error)
79 //sysnb EpollCreate(size int) (fd int, err error)
8048 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
8149 //sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
8250 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
8553 //sysnb Geteuid() (euid int) = SYS_GETEUID32
8654 //sysnb Getgid() (gid int) = SYS_GETGID32
8755 //sysnb Getuid() (uid int) = SYS_GETUID32
88 //sysnb InotifyInit() (fd int, err error)
8956 //sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
9057 //sys Listen(s int, n int) (err error)
9158 //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
183150 const rlimInf64 = ^uint64(0)
184151
185152 func Getrlimit(resource int, rlim *Rlimit) (err error) {
186 err = prlimit(0, resource, nil, rlim)
153 err = Prlimit(0, resource, nil, rlim)
187154 if err != ENOSYS {
188155 return err
189156 }
211178 //sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
212179
213180 func Setrlimit(resource int, rlim *Rlimit) (err error) {
214 err = prlimit(0, resource, rlim, nil)
181 err = Prlimit(0, resource, rlim, nil)
215182 if err != ENOSYS {
216183 return err
217184 }
257224
258225 func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
259226 rsa.Service_name_len = uint32(length)
260 }
261
262 //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
263
264 func Poll(fds []PollFd, timeout int) (n int, err error) {
265 if len(fds) == 0 {
266 return poll(nil, 0, timeout)
267 }
268 return poll(&fds[0], len(fds), timeout)
269227 }
270228
271229 //sys armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE
77 package unix
88
99 import "unsafe"
10
11 func EpollCreate(size int) (fd int, err error) {
12 if size <= 0 {
13 return -1, EINVAL
14 }
15 return EpollCreate1(0)
16 }
1710
1811 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
1912 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
144137 return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
145138 }
146139
147 func Pipe(p []int) (err error) {
148 if len(p) != 2 {
149 return EINVAL
150 }
151 var pp [2]_C_int
152 err = pipe2(&pp, 0)
153 p[0] = int(pp[0])
154 p[1] = int(pp[1])
155 return
156 }
157
158 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
159
160 func Pipe2(p []int, flags int) (err error) {
161 if len(p) != 2 {
162 return EINVAL
163 }
164 var pp [2]_C_int
165 err = pipe2(&pp, flags)
166 p[0] = int(pp[0])
167 p[1] = int(pp[1])
168 return
169 }
170
171140 // Getrlimit prefers the prlimit64 system call. See issue 38604.
172141 func Getrlimit(resource int, rlim *Rlimit) error {
173 err := prlimit(0, resource, nil, rlim)
142 err := Prlimit(0, resource, nil, rlim)
174143 if err != ENOSYS {
175144 return err
176145 }
179148
180149 // Setrlimit prefers the prlimit64 system call. See issue 38604.
181150 func Setrlimit(resource int, rlim *Rlimit) error {
182 err := prlimit(0, resource, rlim, nil)
151 err := Prlimit(0, resource, rlim, nil)
183152 if err != ENOSYS {
184153 return err
185154 }
210179 rsa.Service_name_len = uint64(length)
211180 }
212181
213 func InotifyInit() (fd int, err error) {
214 return InotifyInit1(0)
215 }
216
217 // dup2 exists because func Dup3 in syscall_linux.go references
218 // it in an unreachable path. dup2 isn't available on arm64.
219 func dup2(oldfd int, newfd int) error
220
221182 func Pause() error {
222183 _, err := ppoll(nil, 0, nil, nil)
223184 return err
224 }
225
226 func Poll(fds []PollFd, timeout int) (n int, err error) {
227 var ts *Timespec
228 if timeout >= 0 {
229 ts = new(Timespec)
230 *ts = NsecToTimespec(int64(timeout) * 1e6)
231 }
232 if len(fds) == 0 {
233 return ppoll(nil, 0, ts, nil)
234 }
235 return ppoll(&fds[0], len(fds), ts, nil)
236185 }
237186
238187 //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
77
88 package unix
99
10 //sys dup2(oldfd int, newfd int) (err error)
11 //sysnb EpollCreate(size int) (fd int, err error)
1210 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
1311 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
1412 //sys Fchown(fd int, uid int, gid int) (err error)
9189
9290 func setTimeval(sec, usec int64) Timeval {
9391 return Timeval{Sec: sec, Usec: usec}
94 }
95
96 func Pipe(p []int) (err error) {
97 if len(p) != 2 {
98 return EINVAL
99 }
100 var pp [2]_C_int
101 err = pipe2(&pp, 0)
102 p[0] = int(pp[0])
103 p[1] = int(pp[1])
104 return
105 }
106
107 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
108
109 func Pipe2(p []int, flags int) (err error) {
110 if len(p) != 2 {
111 return EINVAL
112 }
113 var pp [2]_C_int
114 err = pipe2(&pp, flags)
115 p[0] = int(pp[0])
116 p[1] = int(pp[1])
117 return
11892 }
11993
12094 func Ioperm(from int, num int, on int) (err error) {
219193 func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
220194 rsa.Service_name_len = uint64(length)
221195 }
222
223 func InotifyInit() (fd int, err error) {
224 return InotifyInit1(0)
225 }
226
227 //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
228
229 func Poll(fds []PollFd, timeout int) (n int, err error) {
230 if len(fds) == 0 {
231 return poll(nil, 0, timeout)
232 }
233 return poll(&fds[0], len(fds), timeout)
234 }
1414
1515 func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
1616
17 //sys dup2(oldfd int, newfd int) (err error)
18 //sysnb EpollCreate(size int) (fd int, err error)
1917 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
2018 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
2119 //sys Fchown(fd int, uid int, gid int) (err error)
5957 //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
6058 //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
6159
62 //sysnb InotifyInit() (fd int, err error)
6360 //sys Ioperm(from int, num int, on int) (err error)
6461 //sys Iopl(level int) (err error)
6562
112109 return Timeval{Sec: int32(sec), Usec: int32(usec)}
113110 }
114111
115 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
116
117 func Pipe2(p []int, flags int) (err error) {
118 if len(p) != 2 {
119 return EINVAL
120 }
121 var pp [2]_C_int
122 err = pipe2(&pp, flags)
123 p[0] = int(pp[0])
124 p[1] = int(pp[1])
125 return
126 }
127
128 //sysnb pipe() (p1 int, p2 int, err error)
129
130 func Pipe(p []int) (err error) {
131 if len(p) != 2 {
132 return EINVAL
133 }
134 p[0], p[1], err = pipe()
135 return
136 }
137
138112 //sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
139113
140114 func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
156130 //sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
157131
158132 func Getrlimit(resource int, rlim *Rlimit) (err error) {
159 err = prlimit(0, resource, nil, rlim)
133 err = Prlimit(0, resource, nil, rlim)
160134 if err != ENOSYS {
161135 return err
162136 }
184158 //sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
185159
186160 func Setrlimit(resource int, rlim *Rlimit) (err error) {
187 err = prlimit(0, resource, rlim, nil)
161 err = Prlimit(0, resource, rlim, nil)
188162 if err != ENOSYS {
189163 return err
190164 }
231205 func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
232206 rsa.Service_name_len = uint32(length)
233207 }
234
235 //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
236
237 func Poll(fds []PollFd, timeout int) (n int, err error) {
238 if len(fds) == 0 {
239 return poll(nil, 0, timeout)
240 }
241 return poll(&fds[0], len(fds), timeout)
242 }
22 // license that can be found in the LICENSE file.
33
44 //go:build linux && ppc
5 // +build linux
6 // +build ppc
5 // +build linux,ppc
76
87 package unix
98
1211 "unsafe"
1312 )
1413
15 //sys dup2(oldfd int, newfd int) (err error)
16 //sysnb EpollCreate(size int) (fd int, err error)
1714 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
1815 //sys Fchown(fd int, uid int, gid int) (err error)
1916 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
2320 //sysnb Geteuid() (euid int)
2421 //sysnb Getgid() (gid int)
2522 //sysnb Getuid() (uid int)
26 //sysnb InotifyInit() (fd int, err error)
2723 //sys Ioperm(from int, num int, on int) (err error)
2824 //sys Iopl(level int) (err error)
2925 //sys Lchown(path string, uid int, gid int) (err error)
142138 const rlimInf64 = ^uint64(0)
143139
144140 func Getrlimit(resource int, rlim *Rlimit) (err error) {
145 err = prlimit(0, resource, nil, rlim)
141 err = Prlimit(0, resource, nil, rlim)
146142 if err != ENOSYS {
147143 return err
148144 }
170166 //sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
171167
172168 func Setrlimit(resource int, rlim *Rlimit) (err error) {
173 err = prlimit(0, resource, rlim, nil)
169 err = Prlimit(0, resource, rlim, nil)
174170 if err != ENOSYS {
175171 return err
176172 }
216212
217213 func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
218214 rsa.Service_name_len = uint32(length)
219 }
220
221 //sysnb pipe(p *[2]_C_int) (err error)
222
223 func Pipe(p []int) (err error) {
224 if len(p) != 2 {
225 return EINVAL
226 }
227 var pp [2]_C_int
228 err = pipe(&pp)
229 p[0] = int(pp[0])
230 p[1] = int(pp[1])
231 return
232 }
233
234 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
235
236 func Pipe2(p []int, flags int) (err error) {
237 if len(p) != 2 {
238 return EINVAL
239 }
240 var pp [2]_C_int
241 err = pipe2(&pp, flags)
242 p[0] = int(pp[0])
243 p[1] = int(pp[1])
244 return
245 }
246
247 //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
248
249 func Poll(fds []PollFd, timeout int) (n int, err error) {
250 if len(fds) == 0 {
251 return poll(nil, 0, timeout)
252 }
253 return poll(&fds[0], len(fds), timeout)
254215 }
255216
256217 //sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
77
88 package unix
99
10 //sys dup2(oldfd int, newfd int) (err error)
11 //sysnb EpollCreate(size int) (fd int, err error)
1210 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
1311 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
1412 //sys Fchown(fd int, uid int, gid int) (err error)
2119 //sysnb Getgid() (gid int)
2220 //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
2321 //sysnb Getuid() (uid int)
24 //sysnb InotifyInit() (fd int, err error)
2522 //sys Ioperm(from int, num int, on int) (err error)
2623 //sys Iopl(level int) (err error)
2724 //sys Lchown(path string, uid int, gid int) (err error)
103100 rsa.Service_name_len = uint64(length)
104101 }
105102
106 //sysnb pipe(p *[2]_C_int) (err error)
107
108 func Pipe(p []int) (err error) {
109 if len(p) != 2 {
110 return EINVAL
111 }
112 var pp [2]_C_int
113 err = pipe(&pp)
114 p[0] = int(pp[0])
115 p[1] = int(pp[1])
116 return
117 }
118
119 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
120
121 func Pipe2(p []int, flags int) (err error) {
122 if len(p) != 2 {
123 return EINVAL
124 }
125 var pp [2]_C_int
126 err = pipe2(&pp, flags)
127 p[0] = int(pp[0])
128 p[1] = int(pp[1])
129 return
130 }
131
132 //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
133
134 func Poll(fds []PollFd, timeout int) (n int, err error) {
135 if len(fds) == 0 {
136 return poll(nil, 0, timeout)
137 }
138 return poll(&fds[0], len(fds), timeout)
139 }
140
141103 //sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
142104
143105 func SyncFileRange(fd int, off int64, n int64, flags int) error {
77 package unix
88
99 import "unsafe"
10
11 func EpollCreate(size int) (fd int, err error) {
12 if size <= 0 {
13 return -1, EINVAL
14 }
15 return EpollCreate1(0)
16 }
1710
1811 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
1912 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
143136 return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
144137 }
145138
146 func Pipe(p []int) (err error) {
147 if len(p) != 2 {
148 return EINVAL
149 }
150 var pp [2]_C_int
151 err = pipe2(&pp, 0)
152 p[0] = int(pp[0])
153 p[1] = int(pp[1])
154 return
155 }
156
157 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
158
159 func Pipe2(p []int, flags int) (err error) {
160 if len(p) != 2 {
161 return EINVAL
162 }
163 var pp [2]_C_int
164 err = pipe2(&pp, flags)
165 p[0] = int(pp[0])
166 p[1] = int(pp[1])
167 return
168 }
169
170139 func (r *PtraceRegs) PC() uint64 { return r.Pc }
171140
172141 func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
191160 rsa.Service_name_len = uint64(length)
192161 }
193162
194 func InotifyInit() (fd int, err error) {
195 return InotifyInit1(0)
196 }
197
198163 func Pause() error {
199164 _, err := ppoll(nil, 0, nil, nil)
200165 return err
201 }
202
203 func Poll(fds []PollFd, timeout int) (n int, err error) {
204 var ts *Timespec
205 if timeout >= 0 {
206 ts = new(Timespec)
207 *ts = NsecToTimespec(int64(timeout) * 1e6)
208 }
209 if len(fds) == 0 {
210 return ppoll(nil, 0, ts, nil)
211 }
212 return ppoll(&fds[0], len(fds), ts, nil)
213166 }
214167
215168 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
228181 }
229182 return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
230183 }
231
232 // dup2 exists because func Dup3 in syscall_linux.go references
233 // it in an unreachable path. dup2 isn't available on arm64.
234 func dup2(oldfd int, newfd int) error
1010 "unsafe"
1111 )
1212
13 //sys dup2(oldfd int, newfd int) (err error)
14 //sysnb EpollCreate(size int) (fd int, err error)
1513 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
1614 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
1715 //sys Fchown(fd int, uid int, gid int) (err error)
2422 //sysnb Getgid() (gid int)
2523 //sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
2624 //sysnb Getuid() (uid int)
27 //sysnb InotifyInit() (fd int, err error)
2825 //sys Lchown(path string, uid int, gid int) (err error)
2926 //sys Lstat(path string, stat *Stat_t) (err error)
3027 //sys Pause() (err error)
7471
7572 func setTimeval(sec, usec int64) Timeval {
7673 return Timeval{Sec: sec, Usec: usec}
77 }
78
79 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
80
81 func Pipe(p []int) (err error) {
82 if len(p) != 2 {
83 return EINVAL
84 }
85 var pp [2]_C_int
86 err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0.
87 p[0] = int(pp[0])
88 p[1] = int(pp[1])
89 return
90 }
91
92 func Pipe2(p []int, flags int) (err error) {
93 if len(p) != 2 {
94 return EINVAL
95 }
96 var pp [2]_C_int
97 err = pipe2(&pp, flags)
98 p[0] = int(pp[0])
99 p[1] = int(pp[1])
100 return
10174 }
10275
10376 func Ioperm(from int, num int, on int) (err error) {
323296 return nil
324297 }
325298
326 //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
327
328 func Poll(fds []PollFd, timeout int) (n int, err error) {
329 if len(fds) == 0 {
330 return poll(nil, 0, timeout)
331 }
332 return poll(&fds[0], len(fds), timeout)
333 }
334
335299 //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
336300
337301 func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
88
99 //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
1010 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
11 //sys dup2(oldfd int, newfd int) (err error)
1211 //sys Fchown(fd int, uid int, gid int) (err error)
1312 //sys Fstat(fd int, stat *Stat_t) (err error)
1413 //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
1918 //sysnb Getgid() (gid int)
2019 //sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
2120 //sysnb Getuid() (uid int)
22 //sysnb InotifyInit() (fd int, err error)
2321 //sys Lchown(path string, uid int, gid int) (err error)
2422 //sys Listen(s int, n int) (err error)
2523 //sys Lstat(path string, stat *Stat_t) (err error)
118116 func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
119117 rsa.Service_name_len = uint64(length)
120118 }
121
122 //sysnb pipe(p *[2]_C_int) (err error)
123
124 func Pipe(p []int) (err error) {
125 if len(p) != 2 {
126 return EINVAL
127 }
128 var pp [2]_C_int
129 err = pipe(&pp)
130 p[0] = int(pp[0])
131 p[1] = int(pp[1])
132 return
133 }
134
135 //sysnb pipe2(p *[2]_C_int, flags int) (err error)
136
137 func Pipe2(p []int, flags int) (err error) {
138 if len(p) != 2 {
139 return EINVAL
140 }
141 var pp [2]_C_int
142 err = pipe2(&pp, flags)
143 p[0] = int(pp[0])
144 p[1] = int(pp[1])
145 return
146 }
147
148 //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
149
150 func Poll(fds []PollFd, timeout int) (n int, err error) {
151 if len(fds) == 0 {
152 return poll(nil, 0, timeout)
153 }
154 return poll(&fds[0], len(fds), timeout)
155 }
116116 defer f.Close()
117117
118118 v, err := unix.IoctlGetRTCWkAlrm(int(f.Fd()))
119
120 // Not all RTC drivers support wakeup alarms, and will return EINVAL in such cases.
121 if err == unix.EINVAL {
122 t.Skip("RTC_WKALM_RD ioctl not supported on this rtc, skipping test")
123 }
124
119125 if err != nil {
120126 t.Fatalf("failed to perform ioctl: %v", err)
121127 }
122128
123129 t.Logf("RTC wake alarm enabled '%d'; time: %04d-%02d-%02d %02d:%02d:%02d",
124130 v.Enabled, v.Time.Year+1900, v.Time.Mon+1, v.Time.Mday, v.Time.Hour, v.Time.Min, v.Time.Sec)
131 }
132
133 func TestIoctlIfreq(t *testing.T) {
134 s, err := unix.Socket(unix.AF_INET, unix.SOCK_STREAM, 0)
135 if err != nil {
136 t.Fatalf("failed to open socket: %v", err)
137 }
138 defer unix.Close(s)
139
140 ifis, err := net.Interfaces()
141 if err != nil {
142 t.Fatalf("failed to get network interfaces: %v", err)
143 }
144
145 // Compare the network interface fetched from rtnetlink with the data from
146 // the equivalent ioctl API.
147 for _, ifi := range ifis {
148 ifr, err := unix.NewIfreq(ifi.Name)
149 if err != nil {
150 t.Fatalf("failed to create ifreq for %q: %v", ifi.Name, err)
151 }
152
153 if err := unix.IoctlIfreq(s, unix.SIOCGIFINDEX, ifr); err != nil {
154 t.Fatalf("failed to get interface index for %q: %v", ifi.Name, err)
155 }
156
157 if want, got := ifi.Index, int(ifr.Uint32()); want != got {
158 t.Fatalf("unexpected interface index for %q: got: %d, want: %d",
159 ifi.Name, got, want)
160 }
161
162 if want, got := ifi.Name, ifr.Name(); want != got {
163 t.Fatalf("unexpected interface name for index %d: got: %q, want: %q",
164 ifi.Index, got, want)
165 }
166
167 wantIP, ok := firstIPv4(t, &ifi)
168 if err := unix.IoctlIfreq(s, unix.SIOCGIFADDR, ifr); err != nil {
169 // Interface may have no assigned IPv4 address.
170 if err != unix.EADDRNOTAVAIL {
171 t.Fatalf("failed to get IPv4 address for %q: %v", ifi.Name, err)
172 }
173
174 // But if we found an address via rtnetlink, we should expect the
175 // ioctl to return one.
176 if ok {
177 t.Fatalf("found IPv4 address %q for %q but ioctl returned none", wantIP, ifi.Name)
178 }
179
180 continue
181 }
182
183 // Found an address, compare it directly.
184 addr, err := ifr.Inet4Addr()
185 if err != nil {
186 t.Fatalf("failed to get ifreq IPv4 address: %v", err)
187 }
188
189 if want, got := wantIP, addr; !want.Equal(got) {
190 t.Fatalf("unexpected first IPv4 address for %q: got: %q, want: %q",
191 ifi.Name, got, want)
192 }
193 }
194 }
195
196 // firstIPv4 reports whether the interface has an IPv4 address assigned,
197 // returning the first discovered address.
198 func firstIPv4(t *testing.T, ifi *net.Interface) (net.IP, bool) {
199 t.Helper()
200
201 addrs, err := ifi.Addrs()
202 if err != nil {
203 t.Fatalf("failed to get interface %q addresses: %v", ifi.Name, err)
204 }
205
206 for _, a := range addrs {
207 // Only want valid IPv4 addresses.
208 ipn, ok := a.(*net.IPNet)
209 if !ok || ipn.IP.To4() == nil {
210 continue
211 }
212
213 return ipn.IP, true
214 }
215
216 return nil, false
125217 }
126218
127219 func TestPpoll(t *testing.T) {
578670 continue
579671 } else if err != nil {
580672 t.Errorf("ClockNanosleep(CLOCK_REALTIME, TIMER_ABSTIME, %#v (=%v), nil) = %v", &abs, until, err)
581 } else if slept := time.Since(start); slept < delay {
582 t.Errorf("ClockNanosleep(CLOCK_REALTIME, TIMER_ABSTIME, %#v (=%v), nil) slept only %v", &abs, until, slept)
673 } else {
674 // We asked for CLOCK_REALTIME, but we have no way to know whether it
675 // jumped backward after ClockNanosleep returned. Compare both ways,
676 // and only fail if both the monotonic and wall clocks agree that
677 // the elapsed sleep was too short.
678 //
679 // This can still theoretically fail spuriously: if the clock jumps
680 // forward during ClockNanosleep and then backward again before we can
681 // call time.Now, then we could end up with a time that is too short on
682 // both the monotonic scale (because of the forward jump) and the
683 // real-time scale (because of the backward jump. However, it seems
684 // unlikely that two such contrary jumps will ever occur in the time it
685 // takes to execute this test.
686 if now := time.Now(); now.Before(until) && now.Round(0).Before(until) {
687 t.Errorf("ClockNanosleep(CLOCK_REALTIME, TIMER_ABSTIME, %#v (=%v), nil) slept only until %v", &abs, until, now)
688 }
583689 }
584690 break
585691 }
627733 if err != nil {
628734 t.Fatalf("OpenByHandleAt: %v", err)
629735 }
630 defer unix.Close(fd)
631
632736 t.Logf("opened fd %v", fd)
633737 f := os.NewFile(uintptr(fd), "")
738 defer f.Close()
739
634740 slurp, err := ioutil.ReadAll(f)
635741 if err != nil {
636742 t.Fatal(err)
1212 package unix
1313
1414 import (
15 "fmt"
16 "os"
1517 "runtime"
18 "sync"
1619 "syscall"
1720 "unsafe"
1821 )
8891 p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
8992 p[0] = byte(sa.Port >> 8)
9093 p[1] = byte(sa.Port)
91 for i := 0; i < len(sa.Addr); i++ {
92 sa.raw.Addr[i] = sa.Addr[i]
93 }
94 sa.raw.Addr = sa.Addr
9495 return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
9596 }
9697
103104 p[0] = byte(sa.Port >> 8)
104105 p[1] = byte(sa.Port)
105106 sa.raw.Scope_id = sa.ZoneId
106 for i := 0; i < len(sa.Addr); i++ {
107 sa.raw.Addr[i] = sa.Addr[i]
108 }
107 sa.raw.Addr = sa.Addr
109108 return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
110109 }
111110
413412 sa := new(SockaddrInet4)
414413 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
415414 sa.Port = int(p[0])<<8 + int(p[1])
416 for i := 0; i < len(sa.Addr); i++ {
417 sa.Addr[i] = pp.Addr[i]
418 }
415 sa.Addr = pp.Addr
419416 return sa, nil
420417
421418 case AF_INET6:
424421 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
425422 sa.Port = int(p[0])<<8 + int(p[1])
426423 sa.ZoneId = pp.Scope_id
427 for i := 0; i < len(sa.Addr); i++ {
428 sa.Addr[i] = pp.Addr[i]
429 }
424 sa.Addr = pp.Addr
430425 return sa, nil
431426 }
432427 return nil, EAFNOSUPPORT
743738 func Munmap(b []byte) (err error) {
744739 return mapper.Munmap(b)
745740 }
741
742 // Event Ports
743
744 type fileObjCookie struct {
745 fobj *fileObj
746 cookie interface{}
747 }
748
749 // EventPort provides a safe abstraction on top of Solaris/illumos Event Ports.
750 type EventPort struct {
751 port int
752 mu sync.Mutex
753 fds map[uintptr]interface{}
754 paths map[string]*fileObjCookie
755 }
756
757 // PortEvent is an abstraction of the port_event C struct.
758 // Compare Source against PORT_SOURCE_FILE or PORT_SOURCE_FD
759 // to see if Path or Fd was the event source. The other will be
760 // uninitialized.
761 type PortEvent struct {
762 Cookie interface{}
763 Events int32
764 Fd uintptr
765 Path string
766 Source uint16
767 fobj *fileObj
768 }
769
770 // NewEventPort creates a new EventPort including the
771 // underlying call to port_create(3c).
772 func NewEventPort() (*EventPort, error) {
773 port, err := port_create()
774 if err != nil {
775 return nil, err
776 }
777 e := &EventPort{
778 port: port,
779 fds: make(map[uintptr]interface{}),
780 paths: make(map[string]*fileObjCookie),
781 }
782 return e, nil
783 }
784
785 //sys port_create() (n int, err error)
786 //sys port_associate(port int, source int, object uintptr, events int, user *byte) (n int, err error)
787 //sys port_dissociate(port int, source int, object uintptr) (n int, err error)
788 //sys port_get(port int, pe *portEvent, timeout *Timespec) (n int, err error)
789 //sys port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Timespec) (n int, err error)
790
791 // Close closes the event port.
792 func (e *EventPort) Close() error {
793 e.mu.Lock()
794 defer e.mu.Unlock()
795 e.fds = nil
796 e.paths = nil
797 return Close(e.port)
798 }
799
800 // PathIsWatched checks to see if path is associated with this EventPort.
801 func (e *EventPort) PathIsWatched(path string) bool {
802 e.mu.Lock()
803 defer e.mu.Unlock()
804 _, found := e.paths[path]
805 return found
806 }
807
808 // FdIsWatched checks to see if fd is associated with this EventPort.
809 func (e *EventPort) FdIsWatched(fd uintptr) bool {
810 e.mu.Lock()
811 defer e.mu.Unlock()
812 _, found := e.fds[fd]
813 return found
814 }
815
816 // AssociatePath wraps port_associate(3c) for a filesystem path including
817 // creating the necessary file_obj from the provided stat information.
818 func (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, cookie interface{}) error {
819 e.mu.Lock()
820 defer e.mu.Unlock()
821 if _, found := e.paths[path]; found {
822 return fmt.Errorf("%v is already associated with this Event Port", path)
823 }
824 fobj, err := createFileObj(path, stat)
825 if err != nil {
826 return err
827 }
828 fCookie := &fileObjCookie{fobj, cookie}
829 _, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fobj)), events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
830 if err != nil {
831 return err
832 }
833 e.paths[path] = fCookie
834 return nil
835 }
836
837 // DissociatePath wraps port_dissociate(3c) for a filesystem path.
838 func (e *EventPort) DissociatePath(path string) error {
839 e.mu.Lock()
840 defer e.mu.Unlock()
841 f, ok := e.paths[path]
842 if !ok {
843 return fmt.Errorf("%v is not associated with this Event Port", path)
844 }
845 _, err := port_dissociate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(f.fobj)))
846 if err != nil {
847 return err
848 }
849 delete(e.paths, path)
850 return nil
851 }
852
853 // AssociateFd wraps calls to port_associate(3c) on file descriptors.
854 func (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) error {
855 e.mu.Lock()
856 defer e.mu.Unlock()
857 if _, found := e.fds[fd]; found {
858 return fmt.Errorf("%v is already associated with this Event Port", fd)
859 }
860 pcookie := &cookie
861 _, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(pcookie)))
862 if err != nil {
863 return err
864 }
865 e.fds[fd] = pcookie
866 return nil
867 }
868
869 // DissociateFd wraps calls to port_dissociate(3c) on file descriptors.
870 func (e *EventPort) DissociateFd(fd uintptr) error {
871 e.mu.Lock()
872 defer e.mu.Unlock()
873 _, ok := e.fds[fd]
874 if !ok {
875 return fmt.Errorf("%v is not associated with this Event Port", fd)
876 }
877 _, err := port_dissociate(e.port, PORT_SOURCE_FD, fd)
878 if err != nil {
879 return err
880 }
881 delete(e.fds, fd)
882 return nil
883 }
884
885 func createFileObj(name string, stat os.FileInfo) (*fileObj, error) {
886 fobj := new(fileObj)
887 bs, err := ByteSliceFromString(name)
888 if err != nil {
889 return nil, err
890 }
891 fobj.Name = (*int8)(unsafe.Pointer(&bs[0]))
892 s := stat.Sys().(*syscall.Stat_t)
893 fobj.Atim.Sec = s.Atim.Sec
894 fobj.Atim.Nsec = s.Atim.Nsec
895 fobj.Mtim.Sec = s.Mtim.Sec
896 fobj.Mtim.Nsec = s.Mtim.Nsec
897 fobj.Ctim.Sec = s.Ctim.Sec
898 fobj.Ctim.Nsec = s.Ctim.Nsec
899 return fobj, nil
900 }
901
902 // GetOne wraps port_get(3c) and returns a single PortEvent.
903 func (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) {
904 pe := new(portEvent)
905 _, err := port_get(e.port, pe, t)
906 if err != nil {
907 return nil, err
908 }
909 p := new(PortEvent)
910 p.Events = pe.Events
911 p.Source = pe.Source
912 e.mu.Lock()
913 defer e.mu.Unlock()
914 switch pe.Source {
915 case PORT_SOURCE_FD:
916 p.Fd = uintptr(pe.Object)
917 cookie := (*interface{})(unsafe.Pointer(pe.User))
918 p.Cookie = *cookie
919 delete(e.fds, p.Fd)
920 case PORT_SOURCE_FILE:
921 p.fobj = (*fileObj)(unsafe.Pointer(uintptr(pe.Object)))
922 p.Path = BytePtrToString((*byte)(unsafe.Pointer(p.fobj.Name)))
923 cookie := (*interface{})(unsafe.Pointer(pe.User))
924 p.Cookie = *cookie
925 delete(e.paths, p.Path)
926 }
927 return p, nil
928 }
929
930 // Pending wraps port_getn(3c) and returns how many events are pending.
931 func (e *EventPort) Pending() (int, error) {
932 var n uint32 = 0
933 _, err := port_getn(e.port, nil, 0, &n, nil)
934 return int(n), err
935 }
936
937 // Get wraps port_getn(3c) and fills a slice of PortEvent.
938 // It will block until either min events have been received
939 // or the timeout has been exceeded. It will return how many
940 // events were actually received along with any error information.
941 func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error) {
942 if min == 0 {
943 return 0, fmt.Errorf("need to request at least one event or use Pending() instead")
944 }
945 if len(s) < min {
946 return 0, fmt.Errorf("len(s) (%d) is less than min events requested (%d)", len(s), min)
947 }
948 got := uint32(min)
949 max := uint32(len(s))
950 var err error
951 ps := make([]portEvent, max, max)
952 _, err = port_getn(e.port, &ps[0], max, &got, timeout)
953 // got will be trustworthy with ETIME, but not any other error.
954 if err != nil && err != ETIME {
955 return 0, err
956 }
957 e.mu.Lock()
958 defer e.mu.Unlock()
959 for i := 0; i < int(got); i++ {
960 s[i].Events = ps[i].Events
961 s[i].Source = ps[i].Source
962 switch ps[i].Source {
963 case PORT_SOURCE_FD:
964 s[i].Fd = uintptr(ps[i].Object)
965 cookie := (*interface{})(unsafe.Pointer(ps[i].User))
966 s[i].Cookie = *cookie
967 delete(e.fds, s[i].Fd)
968 case PORT_SOURCE_FILE:
969 s[i].fobj = (*fileObj)(unsafe.Pointer(uintptr(ps[i].Object)))
970 s[i].Path = BytePtrToString((*byte)(unsafe.Pointer(s[i].fobj.Name)))
971 cookie := (*interface{})(unsafe.Pointer(ps[i].User))
972 s[i].Cookie = *cookie
973 delete(e.paths, s[i].Path)
974 }
975 }
976 return int(got), err
977 }
77 package unix_test
88
99 import (
10 "fmt"
11 "io/ioutil"
12 "os"
1013 "os/exec"
14 "runtime"
1115 "testing"
1216
1317 "golang.org/x/sys/unix"
4044 }
4145 t.Logf("Sysconf(SC_CLK_TCK) = %d", n)
4246 }
47
48 // Event Ports
49
50 func TestBasicEventPort(t *testing.T) {
51 tmpfile, err := ioutil.TempFile("", "eventport")
52 if err != nil {
53 t.Fatalf("unable to create a tempfile: %v", err)
54 }
55 path := tmpfile.Name()
56 defer os.Remove(path)
57
58 stat, err := os.Stat(path)
59 if err != nil {
60 t.Fatalf("Failed to stat %s: %v", path, err)
61 }
62 port, err := unix.NewEventPort()
63 if err != nil {
64 t.Fatalf("NewEventPort failed: %v", err)
65 }
66 defer port.Close()
67 cookie := stat.Mode()
68 err = port.AssociatePath(path, stat, unix.FILE_MODIFIED, cookie)
69 if err != nil {
70 t.Errorf("AssociatePath failed: %v", err)
71 }
72 if !port.PathIsWatched(path) {
73 t.Errorf("PathIsWatched unexpectedly returned false")
74 }
75 err = port.DissociatePath(path)
76 if err != nil {
77 t.Errorf("DissociatePath failed: %v", err)
78 }
79 err = port.AssociatePath(path, stat, unix.FILE_MODIFIED, cookie)
80 if err != nil {
81 t.Errorf("AssociatePath failed: %v", err)
82 }
83 bs := []byte{42}
84 tmpfile.Write(bs)
85 timeout := new(unix.Timespec)
86 timeout.Sec = 1
87 pevent, err := port.GetOne(timeout)
88 if err == unix.ETIME {
89 t.Errorf("GetOne timed out: %v", err)
90 }
91 if err != nil {
92 t.Errorf("GetOne failed: %v", err)
93 }
94 if pevent.Path != path {
95 t.Errorf("Path mismatch: %v != %v", pevent.Path, path)
96 }
97 err = port.AssociatePath(path, stat, unix.FILE_MODIFIED, cookie)
98 if err != nil {
99 t.Errorf("AssociatePath failed: %v", err)
100 }
101 err = port.AssociatePath(path, stat, unix.FILE_MODIFIED, cookie)
102 if err == nil {
103 t.Errorf("Unexpected success associating already associated path")
104 }
105 }
106
107 func TestEventPortFds(t *testing.T) {
108 _, path, _, _ := runtime.Caller(0)
109 stat, err := os.Stat(path)
110 cookie := stat.Mode()
111 port, err := unix.NewEventPort()
112 if err != nil {
113 t.Errorf("NewEventPort failed: %v", err)
114 }
115 defer port.Close()
116 r, w, err := os.Pipe()
117 if err != nil {
118 t.Errorf("unable to create a pipe: %v", err)
119 }
120 defer w.Close()
121 defer r.Close()
122 fd := r.Fd()
123
124 port.AssociateFd(fd, unix.POLLIN, cookie)
125 if !port.FdIsWatched(fd) {
126 t.Errorf("FdIsWatched unexpectedly returned false")
127 }
128 err = port.DissociateFd(fd)
129 err = port.AssociateFd(fd, unix.POLLIN, cookie)
130 bs := []byte{42}
131 w.Write(bs)
132 n, err := port.Pending()
133 if n != 1 {
134 t.Errorf("Pending() failed: %v, %v", n, err)
135 }
136 timeout := new(unix.Timespec)
137 timeout.Sec = 1
138 pevent, err := port.GetOne(timeout)
139 if err == unix.ETIME {
140 t.Errorf("GetOne timed out: %v", err)
141 }
142 if err != nil {
143 t.Errorf("GetOne failed: %v", err)
144 }
145 if pevent.Fd != fd {
146 t.Errorf("Fd mismatch: %v != %v", pevent.Fd, fd)
147 }
148 var c = pevent.Cookie
149 if c == nil {
150 t.Errorf("Cookie missing: %v != %v", cookie, c)
151 return
152 }
153 if c != cookie {
154 t.Errorf("Cookie mismatch: %v != %v", cookie, c)
155 }
156 port.AssociateFd(fd, unix.POLLIN, cookie)
157 err = port.AssociateFd(fd, unix.POLLIN, cookie)
158 if err == nil {
159 t.Errorf("unexpected success associating already associated fd")
160 }
161 }
162
163 func TestEventPortErrors(t *testing.T) {
164 tmpfile, err := ioutil.TempFile("", "eventport")
165 if err != nil {
166 t.Errorf("unable to create a tempfile: %v", err)
167 }
168 path := tmpfile.Name()
169 stat, _ := os.Stat(path)
170 os.Remove(path)
171 port, _ := unix.NewEventPort()
172 defer port.Close()
173 err = port.AssociatePath(path, stat, unix.FILE_MODIFIED, nil)
174 if err == nil {
175 t.Errorf("unexpected success associating nonexistant file")
176 }
177 err = port.DissociatePath(path)
178 if err == nil {
179 t.Errorf("unexpected success dissociating unassociated path")
180 }
181 timeout := new(unix.Timespec)
182 timeout.Nsec = 1
183 _, err = port.GetOne(timeout)
184 if err != unix.ETIME {
185 t.Errorf("unexpected lack of timeout")
186 }
187 err = port.DissociateFd(uintptr(0))
188 if err == nil {
189 t.Errorf("unexpected success dissociating unassociated fd")
190 }
191 events := make([]unix.PortEvent, 4, 4)
192 _, err = port.Get(events, 5, nil)
193 if err == nil {
194 t.Errorf("unexpected success calling Get with min greater than len of slice")
195 }
196 _, err = port.Get(nil, 1, nil)
197 if err == nil {
198 t.Errorf("unexpected success calling Get with nil slice")
199 }
200 _, err = port.Get(nil, 0, nil)
201 if err == nil {
202 t.Errorf("unexpected success calling Get with nil slice")
203 }
204 }
205
206 func ExamplePortEvent() {
207 type MyCookie struct {
208 Name string
209 }
210 cookie := MyCookie{"Cookie Monster"}
211 port, err := unix.NewEventPort()
212 if err != nil {
213 fmt.Printf("NewEventPort failed: %v\n", err)
214 return
215 }
216 defer port.Close()
217 r, w, err := os.Pipe()
218 if err != nil {
219 fmt.Printf("os.Pipe() failed: %v\n", err)
220 return
221 }
222 defer w.Close()
223 defer r.Close()
224 fd := r.Fd()
225
226 port.AssociateFd(fd, unix.POLLIN, cookie)
227
228 bs := []byte{42}
229 w.Write(bs)
230 timeout := new(unix.Timespec)
231 timeout.Sec = 1
232 pevent, err := port.GetOne(timeout)
233 if err != nil {
234 fmt.Printf("didn't get the expected event: %v\n", err)
235 }
236
237 // Use a type assertion to convert the received cookie back to its original type
238 c := pevent.Cookie.(MyCookie)
239 fmt.Printf("%s", c.Name)
240 //Output: Cookie Monster
241 }
242
243 func TestPortEventSlices(t *testing.T) {
244 port, err := unix.NewEventPort()
245 if err != nil {
246 t.Fatalf("NewEventPort failed: %v", err)
247 }
248 // Create, associate, and delete 6 files
249 for i := 0; i < 6; i++ {
250 tmpfile, err := ioutil.TempFile("", "eventport")
251 if err != nil {
252 t.Fatalf("unable to create tempfile: %v", err)
253 }
254 path := tmpfile.Name()
255 stat, err := os.Stat(path)
256 if err != nil {
257 t.Fatalf("unable to stat tempfile: %v", err)
258 }
259 err = port.AssociatePath(path, stat, unix.FILE_MODIFIED, nil)
260 if err != nil {
261 t.Fatalf("unable to AssociatePath tempfile: %v", err)
262 }
263 err = os.Remove(path)
264 if err != nil {
265 t.Fatalf("unable to Remove tempfile: %v", err)
266 }
267 }
268 n, err := port.Pending()
269 if err != nil {
270 t.Errorf("Pending failed: %v", err)
271 }
272 if n != 6 {
273 t.Errorf("expected 6 pending events, got %d", n)
274 }
275 timeout := new(unix.Timespec)
276 timeout.Nsec = 1
277 events := make([]unix.PortEvent, 4, 4)
278 n, err = port.Get(events, 3, timeout)
279 if err != nil {
280 t.Errorf("Get failed: %v", err)
281 }
282 if n != 4 {
283 t.Errorf("expected 4 events, got %d", n)
284 }
285 e := events[:n]
286 for _, p := range e {
287 if p.Events != unix.FILE_DELETE {
288 t.Errorf("unexpected event. got %v, expected %v", p.Events, unix.FILE_DELETE)
289 }
290 }
291 n, err = port.Get(events, 3, timeout)
292 if err != unix.ETIME {
293 t.Errorf("unexpected error. got %v, expected %v", err, unix.ETIME)
294 }
295 if n != 2 {
296 t.Errorf("expected 2 events, got %d", n)
297 }
298 e = events[:n]
299 for _, p := range e {
300 if p.Events != unix.FILE_DELETE {
301 t.Errorf("unexpected event. got %v, expected %v", p.Events, unix.FILE_DELETE)
302 }
303 }
304
305 r, w, err := os.Pipe()
306 if err != nil {
307 t.Fatalf("unable to create a pipe: %v", err)
308 }
309 port.AssociateFd(r.Fd(), unix.POLLIN, nil)
310 port.AssociateFd(w.Fd(), unix.POLLOUT, nil)
311 bs := []byte{41}
312 w.Write(bs)
313
314 n, err = port.Get(events, 1, timeout)
315 if err != nil {
316 t.Errorf("Get failed: %v", err)
317 }
318 if n != 2 {
319 t.Errorf("expected 2 events, got %d", n)
320 }
321 err = w.Close()
322 if err != nil {
323 t.Errorf("w.Close() failed: %v", err)
324 }
325 err = r.Close()
326 if err != nil {
327 t.Errorf("r.Close() failed: %v", err)
328 }
329 err = port.Close()
330 if err != nil {
331 t.Errorf("port.Close() failed: %v", err)
332 }
333 }
312312 return
313313 }
314314
315 func Send(s int, buf []byte, flags int) (err error) {
316 return sendto(s, buf, flags, nil, 0)
317 }
318
315319 func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
316320 ptr, n, err := to.sockaddr()
317321 if err != nil {
77 package unix_test
88
99 import (
10 "bytes"
1011 "flag"
1112 "fmt"
1213 "io/ioutil"
165166 // "-test.run=^TestPassFD$" and an environment variable used to signal
166167 // that the test should become the child process instead.
167168 func TestPassFD(t *testing.T) {
168 if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && runtime.GOARCH == "arm64" {
169 if runtime.GOOS == "ios" {
169170 t.Skip("cannot exec subprocess on iOS, skipping test")
170171 }
171172
486487 }
487488
488489 func TestPoll(t *testing.T) {
489 if runtime.GOOS == "android" ||
490 ((runtime.GOOS == "darwin" || runtime.GOOS == "ios") && runtime.GOARCH == "arm64") {
490 if runtime.GOOS == "android" || runtime.GOOS == "ios" {
491491 t.Skip("mkfifo syscall is not available on android and iOS, skipping test")
492492 }
493493
519519 }
520520 if n != 0 {
521521 t.Errorf("Poll: wrong number of events: got %v, expected %v", n, 0)
522
523 // Identify which event(s) caused Poll to return.
524 // We can't trivially use a table here because Revents
525 // isn't the same type on all systems.
526 if fds[0].Revents&unix.POLLIN != 0 {
527 t.Log("found POLLIN event")
528 }
529 if fds[0].Revents&unix.POLLPRI != 0 {
530 t.Log("found POLLPRI event")
531 }
532 if fds[0].Revents&unix.POLLOUT != 0 {
533 t.Log("found POLLOUT event")
534 }
535 if fds[0].Revents&unix.POLLERR != 0 {
536 t.Log("found POLLERR event")
537 }
538 if fds[0].Revents&unix.POLLHUP != 0 {
539 t.Log("found POLLHUP event")
540 }
541 if fds[0].Revents&unix.POLLNVAL != 0 {
542 t.Log("found POLLNVAL event")
543 }
522544 }
523545 break
524546 }
561583 break
562584 }
563585
564 // On some BSDs the actual timeout might also be slightly less than the requested.
565 // Add an acceptable margin to avoid flaky tests.
566 if took < dur*2/3 {
567 t.Errorf("Select: got %v timeout, expected at least %v", took, dur)
586 // On some platforms (e.g. NetBSD) the actual timeout might be arbitrarily
587 // less than requested. However, Linux in particular promises to only return
588 // early if a file descriptor becomes ready (not applicable here), or the call
589 // is interrupted by a signal handler (explicitly retried in the loop above),
590 // or the timeout expires.
591 if took < dur {
592 if runtime.GOOS == "linux" {
593 t.Errorf("Select: slept for %v, expected %v", took, dur)
594 } else {
595 t.Logf("Select: slept for %v, requested %v", took, dur)
596 }
568597 }
569598
570599 rr, ww, err := os.Pipe()
609638 switch runtime.GOOS {
610639 case "android":
611640 dirs = []string{"/", "/system/bin"}
612 case "darwin", "ios":
613 switch runtime.GOARCH {
614 case "arm64":
615 d1, err := ioutil.TempDir("", "d1")
616 if err != nil {
617 t.Fatalf("TempDir: %v", err)
618 }
619 d2, err := ioutil.TempDir("", "d2")
620 if err != nil {
621 t.Fatalf("TempDir: %v", err)
622 }
623 dirs = []string{d1, d2}
624 }
641 case "ios":
642 d1, err := ioutil.TempDir("", "d1")
643 if err != nil {
644 t.Fatalf("TempDir: %v", err)
645 }
646 d2, err := ioutil.TempDir("", "d2")
647 if err != nil {
648 t.Fatalf("TempDir: %v", err)
649 }
650 dirs = []string{d1, d2}
625651 }
626652 oldwd := os.Getenv("PWD")
627653 for _, d := range dirs {
889915 }
890916 }
891917
918 func TestSend(t *testing.T) {
919 ec := make(chan error, 2)
920 ts := []byte("HELLO GOPHER")
921
922 fds, err := unix.Socketpair(unix.AF_LOCAL, unix.SOCK_STREAM, 0)
923 if err != nil {
924 t.Fatalf("Socketpair: %v", err)
925 }
926 defer unix.Close(fds[0])
927 defer unix.Close(fds[1])
928
929 go func() {
930 data := make([]byte, len(ts))
931
932 _, _, err := unix.Recvfrom(fds[1], data, 0)
933 if err != nil {
934 ec <- err
935 }
936 if !bytes.Equal(ts, data) {
937 ec <- fmt.Errorf("data sent != data received. Received %q", data)
938 }
939 ec <- nil
940 }()
941 err = unix.Send(fds[0], ts, 0)
942 if err != nil {
943 ec <- err
944 }
945
946 select {
947 case err = <-ec:
948 if err != nil {
949 t.Fatalf("Send: %v", err)
950 }
951 case <-time.After(2 * time.Second):
952 t.Fatal("Send: nothing received after 2 seconds")
953 }
954 }
955
892956 // mktmpfifo creates a temporary FIFO and provides a cleanup function.
893957 func mktmpfifo(t *testing.T) (*os.File, func()) {
894958 err := unix.Mkfifo("fifo", 0666)
6666 p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
6767 p[0] = byte(sa.Port >> 8)
6868 p[1] = byte(sa.Port)
69 for i := 0; i < len(sa.Addr); i++ {
70 sa.raw.Addr[i] = sa.Addr[i]
71 }
69 sa.raw.Addr = sa.Addr
7270 return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
7371 }
7472
8280 p[0] = byte(sa.Port >> 8)
8381 p[1] = byte(sa.Port)
8482 sa.raw.Scope_id = sa.ZoneId
85 for i := 0; i < len(sa.Addr); i++ {
86 sa.raw.Addr[i] = sa.Addr[i]
87 }
83 sa.raw.Addr = sa.Addr
8884 return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
8985 }
9086
143139 sa := new(SockaddrInet4)
144140 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
145141 sa.Port = int(p[0])<<8 + int(p[1])
146 for i := 0; i < len(sa.Addr); i++ {
147 sa.Addr[i] = pp.Addr[i]
148 }
142 sa.Addr = pp.Addr
149143 return sa, nil
150144
151145 case AF_INET6:
154148 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
155149 sa.Port = int(p[0])<<8 + int(p[1])
156150 sa.ZoneId = pp.Scope_id
157 for i := 0; i < len(sa.Addr); i++ {
158 sa.Addr[i] = pp.Addr[i]
159 }
151 sa.Addr = pp.Addr
160152 return sa, nil
161153 }
162154 return nil, EAFNOSUPPORT
0 // Copyright 2021 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 //go:build linux
5 // +build linux
6
7 package unix
8
9 import "runtime"
10
11 // SysvShmCtl performs control operations on the shared memory segment
12 // specified by id.
13 func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
14 if runtime.GOARCH == "arm" ||
15 runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
16 cmd |= ipc_64
17 }
18
19 return shmctl(id, cmd, desc)
20 }
0 // Copyright 2021 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 //go:build (darwin && !ios) || linux
5 // +build darwin,!ios linux
6
7 package unix
8
9 import (
10 "unsafe"
11
12 "golang.org/x/sys/internal/unsafeheader"
13 )
14
15 // SysvShmAttach attaches the Sysv shared memory segment associated with the
16 // shared memory identifier id.
17 func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
18 addr, errno := shmat(id, addr, flag)
19 if errno != nil {
20 return nil, errno
21 }
22
23 // Retrieve the size of the shared memory to enable slice creation
24 var info SysvShmDesc
25
26 _, err := SysvShmCtl(id, IPC_STAT, &info)
27 if err != nil {
28 // release the shared memory if we can't find the size
29
30 // ignoring error from shmdt as there's nothing sensible to return here
31 shmdt(addr)
32 return nil, err
33 }
34
35 // Use unsafe to convert addr into a []byte.
36 // TODO: convert to unsafe.Slice once we can assume Go 1.17
37 var b []byte
38 hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
39 hdr.Data = unsafe.Pointer(addr)
40 hdr.Cap = int(info.Segsz)
41 hdr.Len = int(info.Segsz)
42 return b, nil
43 }
44
45 // SysvShmDetach unmaps the shared memory slice returned from SysvShmAttach.
46 //
47 // It is not safe to use the slice after calling this function.
48 func SysvShmDetach(data []byte) error {
49 if len(data) == 0 {
50 return EINVAL
51 }
52
53 return shmdt(uintptr(unsafe.Pointer(&data[0])))
54 }
55
56 // SysvShmGet returns the Sysv shared memory identifier associated with key.
57 // If the IPC_CREAT flag is specified a new segment is created.
58 func SysvShmGet(key, size, flag int) (id int, err error) {
59 return shmget(key, size, flag)
60 }
0 // Copyright 2021 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 //go:build darwin && !ios
5 // +build darwin,!ios
6
7 package unix
8
9 // SysvShmCtl performs control operations on the shared memory segment
10 // specified by id.
11 func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
12 return shmctl(id, cmd, desc)
13 }
0 // Copyright 2021 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 //go:build (darwin && amd64) || linux
5 // +build darwin,amd64 linux
6
7 package unix_test
8
9 import (
10 "runtime"
11 "testing"
12
13 "golang.org/x/sys/unix"
14 )
15
16 func TestSysvSharedMemory(t *testing.T) {
17 // create ipc
18 id, err := unix.SysvShmGet(unix.IPC_PRIVATE, 1024, unix.IPC_CREAT|unix.IPC_EXCL|0o600)
19
20 // ipc isn't implemented on android, should fail
21 if runtime.GOOS == "android" {
22 if err != unix.ENOSYS {
23 t.Fatalf("expected android to fail, but it didn't")
24 }
25 return
26 }
27
28 // The kernel may have been built without System V IPC support.
29 if err == unix.ENOSYS {
30 t.Skip("shmget not supported")
31 }
32
33 if err != nil {
34 t.Fatalf("SysvShmGet: %v", err)
35 }
36 defer func() {
37 _, err := unix.SysvShmCtl(id, unix.IPC_RMID, nil)
38 if err != nil {
39 t.Errorf("Remove failed: %v", err)
40 }
41 }()
42
43 // attach
44 b1, err := unix.SysvShmAttach(id, 0, 0)
45 if err != nil {
46 t.Fatalf("Attach: %v", err)
47 }
48
49 if len(b1) != 1024 {
50 t.Fatalf("b1 len = %v, want 1024", len(b1))
51 }
52
53 b1[42] = 'x'
54
55 // attach again
56 b2, err := unix.SysvShmAttach(id, 0, 0)
57 if err != nil {
58 t.Fatalf("Attach: %v", err)
59 }
60
61 if len(b2) != 1024 {
62 t.Fatalf("b2 len = %v, want 1024", len(b1))
63 }
64
65 b2[43] = 'y'
66 if b2[42] != 'x' || b1[43] != 'y' {
67 t.Fatalf("shared memory isn't shared")
68 }
69
70 // detach
71 if err = unix.SysvShmDetach(b2); err != nil {
72 t.Fatalf("Detach: %v", err)
73 }
74
75 if b1[42] != 'x' || b1[43] != 'y' {
76 t.Fatalf("shared memory was invalidated")
77 }
78 }
1515
1616 /*
1717 #define __DARWIN_UNIX03 0
18 #define KERNEL
18 #define KERNEL 1
1919 #define _DARWIN_USE_64_BIT_INODE
2020 #include <dirent.h>
2121 #include <fcntl.h>
2222 #include <poll.h>
23 #include <stdint.h>
2324 #include <signal.h>
2425 #include <termios.h>
2526 #include <unistd.h>
2627 #include <mach/mach.h>
2728 #include <mach/message.h>
2829 #include <sys/event.h>
30 #include <sys/ipc.h>
2931 #include <sys/kern_control.h>
3032 #include <sys/mman.h>
3133 #include <sys/mount.h>
3335 #include <sys/ptrace.h>
3436 #include <sys/resource.h>
3537 #include <sys/select.h>
38 #include <sys/shm.h>
3639 #include <sys/signal.h>
3740 #include <sys/socket.h>
3841 #include <sys/stat.h>
4447 #include <sys/un.h>
4548 #include <sys/utsname.h>
4649 #include <sys/wait.h>
50 #include <sys/vsock.h>
4751 #include <net/bpf.h>
4852 #include <net/if.h>
4953 #include <net/if_dl.h>
7074 char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
7175 };
7276
77 #if defined(__x86_64__)
78 typedef struct stat64 stat_t;
79 typedef struct statfs64 statfs_t;
80 #else // __arm__
81 typedef struct stat stat_t;
82 typedef struct statfs statfs_t;
83 #endif
7384 */
7485 import "C"
7586
110121
111122 // Files
112123
113 type Stat_t C.struct_stat64
114
115 type Statfs_t C.struct_statfs64
124 type Stat_t C.stat_t
125
126 type Statfs_t C.statfs_t
116127
117128 type Flock_t C.struct_flock
118129
149160 type RawSockaddrAny C.struct_sockaddr_any
150161
151162 type RawSockaddrCtl C.struct_sockaddr_ctl
163
164 type RawSockaddrVM C.struct_sockaddr_vm
165
166 type XVSockPCB C.struct_xvsockpcb
167
168 type XSocket C.struct_xsocket
169
170 type XSocket64 C.struct_xsocket64
171
172 type XSockbuf C.struct_xsockbuf
173
174 type XVSockPgen C.struct_xvsockpgen
152175
153176 type _Socklen C.socklen_t
154177
183206 SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
184207 SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
185208 SizeofSockaddrCtl = C.sizeof_struct_sockaddr_ctl
209 SizeofSockaddrVM = C.sizeof_struct_sockaddr_vm
210 SizeofXvsockpcb = C.sizeof_struct_xvsockpcb
211 SizeofXSocket = C.sizeof_struct_xsocket
212 SizeofXSockbuf = C.sizeof_struct_xsockbuf
213 SizeofXVSockPgen = C.sizeof_struct_xvsockpgen
186214 SizeofXucred = C.sizeof_struct_xucred
187215 SizeofLinger = C.sizeof_struct_linger
188216 SizeofIovec = C.sizeof_struct_iovec
322350 type Pcred C.struct__pcred
323351
324352 type Ucred C.struct__ucred
353
354 // shm
355
356 type SysvIpcPerm C.struct_ipc_perm
357 type SysvShmDesc C.struct_shmid_ds
358
359 const (
360 IPC_CREAT = C.IPC_CREAT
361 IPC_EXCL = C.IPC_EXCL
362 IPC_NOWAIT = C.IPC_NOWAIT
363 IPC_PRIVATE = C.IPC_PRIVATE
364 )
365
366 const (
367 IPC_RMID = C.IPC_RMID
368 IPC_SET = C.IPC_SET
369 IPC_STAT = C.IPC_STAT
370 )
371
372 const (
373 SHM_RDONLY = C.SHM_RDONLY
374 SHM_RND = C.SHM_RND
375 )
140140
141141 type Timeval C.struct_timeval
142142
143 type Time_t C.time_t
144
143145 // Processes
144146
145147 type Rusage C.struct_rusage
3232 I_STR = C.I_STR
3333 I_POP = C.I_POP
3434 I_PUSH = C.I_PUSH
35 I_LINK = C.I_LINK
36 I_UNLINK = C.I_UNLINK
3537 I_PLINK = C.I_PLINK
3638 I_PUNLINK = C.I_PUNLINK
3739
3333 #include <sys/mman.h>
3434 #include <sys/mount.h>
3535 #include <sys/param.h>
36 #include <sys/port.h>
3637 #include <sys/resource.h>
3738 #include <sys/select.h>
3839 #include <sys/signal.h>
268269 POLLWRBAND = C.POLLWRBAND
269270 POLLWRNORM = C.POLLWRNORM
270271 )
272
273 // Event Ports
274
275 type fileObj C.struct_file_obj
276
277 type portEvent C.struct_port_event
278
279 const (
280 PORT_SOURCE_AIO = C.PORT_SOURCE_AIO
281 PORT_SOURCE_TIMER = C.PORT_SOURCE_TIMER
282 PORT_SOURCE_USER = C.PORT_SOURCE_USER
283 PORT_SOURCE_FD = C.PORT_SOURCE_FD
284 PORT_SOURCE_ALERT = C.PORT_SOURCE_ALERT
285 PORT_SOURCE_MQ = C.PORT_SOURCE_MQ
286 PORT_SOURCE_FILE = C.PORT_SOURCE_FILE
287 PORT_ALERT_SET = C.PORT_ALERT_SET
288 PORT_ALERT_UPDATE = C.PORT_ALERT_UPDATE
289 PORT_ALERT_INVALID = C.PORT_ALERT_INVALID
290 FILE_ACCESS = C.FILE_ACCESS
291 FILE_MODIFIED = C.FILE_MODIFIED
292 FILE_ATTRIB = C.FILE_ATTRIB
293 FILE_TRUNC = C.FILE_TRUNC
294 FILE_NOFOLLOW = C.FILE_NOFOLLOW
295 FILE_DELETE = C.FILE_DELETE
296 FILE_RENAME_TO = C.FILE_RENAME_TO
297 FILE_RENAME_FROM = C.FILE_RENAME_FROM
298 UNMOUNTED = C.UNMOUNTED
299 MOUNTEDOVER = C.MOUNTEDOVER
300 FILE_EXCEPTION = C.FILE_EXCEPTION
301 )
1111 import "syscall"
1212
1313 const (
14 AF_APPLETALK = 0x10
15 AF_CCITT = 0xa
16 AF_CHAOS = 0x5
17 AF_CNT = 0x15
18 AF_COIP = 0x14
19 AF_DATAKIT = 0x9
20 AF_DECnet = 0xc
21 AF_DLI = 0xd
22 AF_E164 = 0x1c
23 AF_ECMA = 0x8
24 AF_HYLINK = 0xf
25 AF_IEEE80211 = 0x25
26 AF_IMPLINK = 0x3
27 AF_INET = 0x2
28 AF_INET6 = 0x1e
29 AF_IPX = 0x17
30 AF_ISDN = 0x1c
31 AF_ISO = 0x7
32 AF_LAT = 0xe
33 AF_LINK = 0x12
34 AF_LOCAL = 0x1
35 AF_MAX = 0x29
36 AF_NATM = 0x1f
37 AF_NDRV = 0x1b
38 AF_NETBIOS = 0x21
39 AF_NS = 0x6
40 AF_OSI = 0x7
41 AF_PPP = 0x22
42 AF_PUP = 0x4
43 AF_RESERVED_36 = 0x24
44 AF_ROUTE = 0x11
45 AF_SIP = 0x18
46 AF_SNA = 0xb
47 AF_SYSTEM = 0x20
48 AF_SYS_CONTROL = 0x2
49 AF_UNIX = 0x1
50 AF_UNSPEC = 0x0
51 AF_UTUN = 0x26
52 AF_VSOCK = 0x28
53 ALTWERASE = 0x200
54 ATTR_BIT_MAP_COUNT = 0x5
55 ATTR_CMN_ACCESSMASK = 0x20000
56 ATTR_CMN_ACCTIME = 0x1000
57 ATTR_CMN_ADDEDTIME = 0x10000000
58 ATTR_CMN_BKUPTIME = 0x2000
59 ATTR_CMN_CHGTIME = 0x800
60 ATTR_CMN_CRTIME = 0x200
61 ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
62 ATTR_CMN_DEVID = 0x2
63 ATTR_CMN_DOCUMENT_ID = 0x100000
64 ATTR_CMN_ERROR = 0x20000000
65 ATTR_CMN_EXTENDED_SECURITY = 0x400000
66 ATTR_CMN_FILEID = 0x2000000
67 ATTR_CMN_FLAGS = 0x40000
68 ATTR_CMN_FNDRINFO = 0x4000
69 ATTR_CMN_FSID = 0x4
70 ATTR_CMN_FULLPATH = 0x8000000
71 ATTR_CMN_GEN_COUNT = 0x80000
72 ATTR_CMN_GRPID = 0x10000
73 ATTR_CMN_GRPUUID = 0x1000000
74 ATTR_CMN_MODTIME = 0x400
75 ATTR_CMN_NAME = 0x1
76 ATTR_CMN_NAMEDATTRCOUNT = 0x80000
77 ATTR_CMN_NAMEDATTRLIST = 0x100000
78 ATTR_CMN_OBJID = 0x20
79 ATTR_CMN_OBJPERMANENTID = 0x40
80 ATTR_CMN_OBJTAG = 0x10
81 ATTR_CMN_OBJTYPE = 0x8
82 ATTR_CMN_OWNERID = 0x8000
83 ATTR_CMN_PARENTID = 0x4000000
84 ATTR_CMN_PAROBJID = 0x80
85 ATTR_CMN_RETURNED_ATTRS = 0x80000000
86 ATTR_CMN_SCRIPT = 0x100
87 ATTR_CMN_SETMASK = 0x51c7ff00
88 ATTR_CMN_USERACCESS = 0x200000
89 ATTR_CMN_UUID = 0x800000
90 ATTR_CMN_VALIDMASK = 0xffffffff
91 ATTR_CMN_VOLSETMASK = 0x6700
92 ATTR_FILE_ALLOCSIZE = 0x4
93 ATTR_FILE_CLUMPSIZE = 0x10
94 ATTR_FILE_DATAALLOCSIZE = 0x400
95 ATTR_FILE_DATAEXTENTS = 0x800
96 ATTR_FILE_DATALENGTH = 0x200
97 ATTR_FILE_DEVTYPE = 0x20
98 ATTR_FILE_FILETYPE = 0x40
99 ATTR_FILE_FORKCOUNT = 0x80
100 ATTR_FILE_FORKLIST = 0x100
101 ATTR_FILE_IOBLOCKSIZE = 0x8
102 ATTR_FILE_LINKCOUNT = 0x1
103 ATTR_FILE_RSRCALLOCSIZE = 0x2000
104 ATTR_FILE_RSRCEXTENTS = 0x4000
105 ATTR_FILE_RSRCLENGTH = 0x1000
106 ATTR_FILE_SETMASK = 0x20
107 ATTR_FILE_TOTALSIZE = 0x2
108 ATTR_FILE_VALIDMASK = 0x37ff
109 ATTR_VOL_ALLOCATIONCLUMP = 0x40
110 ATTR_VOL_ATTRIBUTES = 0x40000000
111 ATTR_VOL_CAPABILITIES = 0x20000
112 ATTR_VOL_DIRCOUNT = 0x400
113 ATTR_VOL_ENCODINGSUSED = 0x10000
114 ATTR_VOL_FILECOUNT = 0x200
115 ATTR_VOL_FSTYPE = 0x1
116 ATTR_VOL_INFO = 0x80000000
117 ATTR_VOL_IOBLOCKSIZE = 0x80
118 ATTR_VOL_MAXOBJCOUNT = 0x800
119 ATTR_VOL_MINALLOCATION = 0x20
120 ATTR_VOL_MOUNTEDDEVICE = 0x8000
121 ATTR_VOL_MOUNTFLAGS = 0x4000
122 ATTR_VOL_MOUNTPOINT = 0x1000
123 ATTR_VOL_NAME = 0x2000
124 ATTR_VOL_OBJCOUNT = 0x100
125 ATTR_VOL_QUOTA_SIZE = 0x10000000
126 ATTR_VOL_RESERVED_SIZE = 0x20000000
127 ATTR_VOL_SETMASK = 0x80002000
128 ATTR_VOL_SIGNATURE = 0x2
129 ATTR_VOL_SIZE = 0x4
130 ATTR_VOL_SPACEAVAIL = 0x10
131 ATTR_VOL_SPACEFREE = 0x8
132 ATTR_VOL_UUID = 0x40000
133 ATTR_VOL_VALIDMASK = 0xf007ffff
134 B0 = 0x0
135 B110 = 0x6e
136 B115200 = 0x1c200
137 B1200 = 0x4b0
138 B134 = 0x86
139 B14400 = 0x3840
140 B150 = 0x96
141 B1800 = 0x708
142 B19200 = 0x4b00
143 B200 = 0xc8
144 B230400 = 0x38400
145 B2400 = 0x960
146 B28800 = 0x7080
147 B300 = 0x12c
148 B38400 = 0x9600
149 B4800 = 0x12c0
150 B50 = 0x32
151 B57600 = 0xe100
152 B600 = 0x258
153 B7200 = 0x1c20
154 B75 = 0x4b
155 B76800 = 0x12c00
156 B9600 = 0x2580
157 BIOCFLUSH = 0x20004268
158 BIOCGBLEN = 0x40044266
159 BIOCGDLT = 0x4004426a
160 BIOCGDLTLIST = 0xc00c4279
161 BIOCGETIF = 0x4020426b
162 BIOCGHDRCMPLT = 0x40044274
163 BIOCGRSIG = 0x40044272
164 BIOCGRTIMEOUT = 0x4010426e
165 BIOCGSEESENT = 0x40044276
166 BIOCGSTATS = 0x4008426f
167 BIOCIMMEDIATE = 0x80044270
168 BIOCPROMISC = 0x20004269
169 BIOCSBLEN = 0xc0044266
170 BIOCSDLT = 0x80044278
171 BIOCSETF = 0x80104267
172 BIOCSETFNR = 0x8010427e
173 BIOCSETIF = 0x8020426c
174 BIOCSHDRCMPLT = 0x80044275
175 BIOCSRSIG = 0x80044273
176 BIOCSRTIMEOUT = 0x8010426d
177 BIOCSSEESENT = 0x80044277
178 BIOCVERSION = 0x40044271
179 BPF_A = 0x10
180 BPF_ABS = 0x20
181 BPF_ADD = 0x0
182 BPF_ALIGNMENT = 0x4
183 BPF_ALU = 0x4
184 BPF_AND = 0x50
185 BPF_B = 0x10
186 BPF_DIV = 0x30
187 BPF_H = 0x8
188 BPF_IMM = 0x0
189 BPF_IND = 0x40
190 BPF_JA = 0x0
191 BPF_JEQ = 0x10
192 BPF_JGE = 0x30
193 BPF_JGT = 0x20
194 BPF_JMP = 0x5
195 BPF_JSET = 0x40
196 BPF_K = 0x0
197 BPF_LD = 0x0
198 BPF_LDX = 0x1
199 BPF_LEN = 0x80
200 BPF_LSH = 0x60
201 BPF_MAJOR_VERSION = 0x1
202 BPF_MAXBUFSIZE = 0x80000
203 BPF_MAXINSNS = 0x200
204 BPF_MEM = 0x60
205 BPF_MEMWORDS = 0x10
206 BPF_MINBUFSIZE = 0x20
207 BPF_MINOR_VERSION = 0x1
208 BPF_MISC = 0x7
209 BPF_MSH = 0xa0
210 BPF_MUL = 0x20
211 BPF_NEG = 0x80
212 BPF_OR = 0x40
213 BPF_RELEASE = 0x30bb6
214 BPF_RET = 0x6
215 BPF_RSH = 0x70
216 BPF_ST = 0x2
217 BPF_STX = 0x3
218 BPF_SUB = 0x10
219 BPF_TAX = 0x0
220 BPF_TXA = 0x80
221 BPF_W = 0x0
222 BPF_X = 0x8
223 BRKINT = 0x2
224 BS0 = 0x0
225 BS1 = 0x8000
226 BSDLY = 0x8000
227 CFLUSH = 0xf
228 CLOCAL = 0x8000
229 CLOCK_MONOTONIC = 0x6
230 CLOCK_MONOTONIC_RAW = 0x4
231 CLOCK_MONOTONIC_RAW_APPROX = 0x5
232 CLOCK_PROCESS_CPUTIME_ID = 0xc
233 CLOCK_REALTIME = 0x0
234 CLOCK_THREAD_CPUTIME_ID = 0x10
235 CLOCK_UPTIME_RAW = 0x8
236 CLOCK_UPTIME_RAW_APPROX = 0x9
237 CLONE_NOFOLLOW = 0x1
238 CLONE_NOOWNERCOPY = 0x2
239 CR0 = 0x0
240 CR1 = 0x1000
241 CR2 = 0x2000
242 CR3 = 0x3000
243 CRDLY = 0x3000
244 CREAD = 0x800
245 CRTSCTS = 0x30000
246 CS5 = 0x0
247 CS6 = 0x100
248 CS7 = 0x200
249 CS8 = 0x300
250 CSIZE = 0x300
251 CSTART = 0x11
252 CSTATUS = 0x14
253 CSTOP = 0x13
254 CSTOPB = 0x400
255 CSUSP = 0x1a
256 CTLIOCGINFO = 0xc0644e03
257 CTL_HW = 0x6
258 CTL_KERN = 0x1
259 CTL_MAXNAME = 0xc
260 CTL_NET = 0x4
261 DLT_A429 = 0xb8
262 DLT_A653_ICM = 0xb9
263 DLT_AIRONET_HEADER = 0x78
264 DLT_AOS = 0xde
265 DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
266 DLT_ARCNET = 0x7
267 DLT_ARCNET_LINUX = 0x81
268 DLT_ATM_CLIP = 0x13
269 DLT_ATM_RFC1483 = 0xb
270 DLT_AURORA = 0x7e
271 DLT_AX25 = 0x3
272 DLT_AX25_KISS = 0xca
273 DLT_BACNET_MS_TP = 0xa5
274 DLT_BLUETOOTH_HCI_H4 = 0xbb
275 DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
276 DLT_CAN20B = 0xbe
277 DLT_CAN_SOCKETCAN = 0xe3
278 DLT_CHAOS = 0x5
279 DLT_CHDLC = 0x68
280 DLT_CISCO_IOS = 0x76
281 DLT_C_HDLC = 0x68
282 DLT_C_HDLC_WITH_DIR = 0xcd
283 DLT_DBUS = 0xe7
284 DLT_DECT = 0xdd
285 DLT_DOCSIS = 0x8f
286 DLT_DVB_CI = 0xeb
287 DLT_ECONET = 0x73
288 DLT_EN10MB = 0x1
289 DLT_EN3MB = 0x2
290 DLT_ENC = 0x6d
291 DLT_ERF = 0xc5
292 DLT_ERF_ETH = 0xaf
293 DLT_ERF_POS = 0xb0
294 DLT_FC_2 = 0xe0
295 DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
296 DLT_FDDI = 0xa
297 DLT_FLEXRAY = 0xd2
298 DLT_FRELAY = 0x6b
299 DLT_FRELAY_WITH_DIR = 0xce
300 DLT_GCOM_SERIAL = 0xad
301 DLT_GCOM_T1E1 = 0xac
302 DLT_GPF_F = 0xab
303 DLT_GPF_T = 0xaa
304 DLT_GPRS_LLC = 0xa9
305 DLT_GSMTAP_ABIS = 0xda
306 DLT_GSMTAP_UM = 0xd9
307 DLT_HHDLC = 0x79
308 DLT_IBM_SN = 0x92
309 DLT_IBM_SP = 0x91
310 DLT_IEEE802 = 0x6
311 DLT_IEEE802_11 = 0x69
312 DLT_IEEE802_11_RADIO = 0x7f
313 DLT_IEEE802_11_RADIO_AVS = 0xa3
314 DLT_IEEE802_15_4 = 0xc3
315 DLT_IEEE802_15_4_LINUX = 0xbf
316 DLT_IEEE802_15_4_NOFCS = 0xe6
317 DLT_IEEE802_15_4_NONASK_PHY = 0xd7
318 DLT_IEEE802_16_MAC_CPS = 0xbc
319 DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
320 DLT_IPFILTER = 0x74
321 DLT_IPMB = 0xc7
322 DLT_IPMB_LINUX = 0xd1
323 DLT_IPNET = 0xe2
324 DLT_IPOIB = 0xf2
325 DLT_IPV4 = 0xe4
326 DLT_IPV6 = 0xe5
327 DLT_IP_OVER_FC = 0x7a
328 DLT_JUNIPER_ATM1 = 0x89
329 DLT_JUNIPER_ATM2 = 0x87
330 DLT_JUNIPER_ATM_CEMIC = 0xee
331 DLT_JUNIPER_CHDLC = 0xb5
332 DLT_JUNIPER_ES = 0x84
333 DLT_JUNIPER_ETHER = 0xb2
334 DLT_JUNIPER_FIBRECHANNEL = 0xea
335 DLT_JUNIPER_FRELAY = 0xb4
336 DLT_JUNIPER_GGSN = 0x85
337 DLT_JUNIPER_ISM = 0xc2
338 DLT_JUNIPER_MFR = 0x86
339 DLT_JUNIPER_MLFR = 0x83
340 DLT_JUNIPER_MLPPP = 0x82
341 DLT_JUNIPER_MONITOR = 0xa4
342 DLT_JUNIPER_PIC_PEER = 0xae
343 DLT_JUNIPER_PPP = 0xb3
344 DLT_JUNIPER_PPPOE = 0xa7
345 DLT_JUNIPER_PPPOE_ATM = 0xa8
346 DLT_JUNIPER_SERVICES = 0x88
347 DLT_JUNIPER_SRX_E2E = 0xe9
348 DLT_JUNIPER_ST = 0xc8
349 DLT_JUNIPER_VP = 0xb7
350 DLT_JUNIPER_VS = 0xe8
351 DLT_LAPB_WITH_DIR = 0xcf
352 DLT_LAPD = 0xcb
353 DLT_LIN = 0xd4
354 DLT_LINUX_EVDEV = 0xd8
355 DLT_LINUX_IRDA = 0x90
356 DLT_LINUX_LAPD = 0xb1
357 DLT_LINUX_PPP_WITHDIRECTION = 0xa6
358 DLT_LINUX_SLL = 0x71
359 DLT_LOOP = 0x6c
360 DLT_LTALK = 0x72
361 DLT_MATCHING_MAX = 0x10a
362 DLT_MATCHING_MIN = 0x68
363 DLT_MFR = 0xb6
364 DLT_MOST = 0xd3
365 DLT_MPEG_2_TS = 0xf3
366 DLT_MPLS = 0xdb
367 DLT_MTP2 = 0x8c
368 DLT_MTP2_WITH_PHDR = 0x8b
369 DLT_MTP3 = 0x8d
370 DLT_MUX27010 = 0xec
371 DLT_NETANALYZER = 0xf0
372 DLT_NETANALYZER_TRANSPARENT = 0xf1
373 DLT_NFC_LLCP = 0xf5
374 DLT_NFLOG = 0xef
375 DLT_NG40 = 0xf4
376 DLT_NULL = 0x0
377 DLT_PCI_EXP = 0x7d
378 DLT_PFLOG = 0x75
379 DLT_PFSYNC = 0x12
380 DLT_PPI = 0xc0
381 DLT_PPP = 0x9
382 DLT_PPP_BSDOS = 0x10
383 DLT_PPP_ETHER = 0x33
384 DLT_PPP_PPPD = 0xa6
385 DLT_PPP_SERIAL = 0x32
386 DLT_PPP_WITH_DIR = 0xcc
387 DLT_PPP_WITH_DIRECTION = 0xa6
388 DLT_PRISM_HEADER = 0x77
389 DLT_PRONET = 0x4
390 DLT_RAIF1 = 0xc6
391 DLT_RAW = 0xc
392 DLT_RIO = 0x7c
393 DLT_SCCP = 0x8e
394 DLT_SITA = 0xc4
395 DLT_SLIP = 0x8
396 DLT_SLIP_BSDOS = 0xf
397 DLT_STANAG_5066_D_PDU = 0xed
398 DLT_SUNATM = 0x7b
399 DLT_SYMANTEC_FIREWALL = 0x63
400 DLT_TZSP = 0x80
401 DLT_USB = 0xba
402 DLT_USB_DARWIN = 0x10a
403 DLT_USB_LINUX = 0xbd
404 DLT_USB_LINUX_MMAPPED = 0xdc
405 DLT_USER0 = 0x93
406 DLT_USER1 = 0x94
407 DLT_USER10 = 0x9d
408 DLT_USER11 = 0x9e
409 DLT_USER12 = 0x9f
410 DLT_USER13 = 0xa0
411 DLT_USER14 = 0xa1
412 DLT_USER15 = 0xa2
413 DLT_USER2 = 0x95
414 DLT_USER3 = 0x96
415 DLT_USER4 = 0x97
416 DLT_USER5 = 0x98
417 DLT_USER6 = 0x99
418 DLT_USER7 = 0x9a
419 DLT_USER8 = 0x9b
420 DLT_USER9 = 0x9c
421 DLT_WIHART = 0xdf
422 DLT_X2E_SERIAL = 0xd5
423 DLT_X2E_XORAYA = 0xd6
424 DT_BLK = 0x6
425 DT_CHR = 0x2
426 DT_DIR = 0x4
427 DT_FIFO = 0x1
428 DT_LNK = 0xa
429 DT_REG = 0x8
430 DT_SOCK = 0xc
431 DT_UNKNOWN = 0x0
432 DT_WHT = 0xe
433 ECHO = 0x8
434 ECHOCTL = 0x40
435 ECHOE = 0x2
436 ECHOK = 0x4
437 ECHOKE = 0x1
438 ECHONL = 0x10
439 ECHOPRT = 0x20
440 EVFILT_AIO = -0x3
441 EVFILT_EXCEPT = -0xf
442 EVFILT_FS = -0x9
443 EVFILT_MACHPORT = -0x8
444 EVFILT_PROC = -0x5
445 EVFILT_READ = -0x1
446 EVFILT_SIGNAL = -0x6
447 EVFILT_SYSCOUNT = 0x11
448 EVFILT_THREADMARKER = 0x11
449 EVFILT_TIMER = -0x7
450 EVFILT_USER = -0xa
451 EVFILT_VM = -0xc
452 EVFILT_VNODE = -0x4
453 EVFILT_WRITE = -0x2
454 EV_ADD = 0x1
455 EV_CLEAR = 0x20
456 EV_DELETE = 0x2
457 EV_DISABLE = 0x8
458 EV_DISPATCH = 0x80
459 EV_DISPATCH2 = 0x180
460 EV_ENABLE = 0x4
461 EV_EOF = 0x8000
462 EV_ERROR = 0x4000
463 EV_FLAG0 = 0x1000
464 EV_FLAG1 = 0x2000
465 EV_ONESHOT = 0x10
466 EV_OOBAND = 0x2000
467 EV_POLL = 0x1000
468 EV_RECEIPT = 0x40
469 EV_SYSFLAGS = 0xf000
470 EV_UDATA_SPECIFIC = 0x100
471 EV_VANISHED = 0x200
472 EXTA = 0x4b00
473 EXTB = 0x9600
474 EXTPROC = 0x800
475 FD_CLOEXEC = 0x1
476 FD_SETSIZE = 0x400
477 FF0 = 0x0
478 FF1 = 0x4000
479 FFDLY = 0x4000
480 FLUSHO = 0x800000
481 FSOPT_ATTR_CMN_EXTENDED = 0x20
482 FSOPT_NOFOLLOW = 0x1
483 FSOPT_NOINMEMUPDATE = 0x2
484 FSOPT_PACK_INVAL_ATTRS = 0x8
485 FSOPT_REPORT_FULLSIZE = 0x4
486 FSOPT_RETURN_REALDEV = 0x200
487 F_ADDFILESIGS = 0x3d
488 F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
489 F_ADDFILESIGS_INFO = 0x67
490 F_ADDFILESIGS_RETURN = 0x61
491 F_ADDFILESUPPL = 0x68
492 F_ADDSIGS = 0x3b
493 F_ALLOCATEALL = 0x4
494 F_ALLOCATECONTIG = 0x2
495 F_BARRIERFSYNC = 0x55
496 F_CHECK_LV = 0x62
497 F_CHKCLEAN = 0x29
498 F_DUPFD = 0x0
499 F_DUPFD_CLOEXEC = 0x43
500 F_FINDSIGS = 0x4e
501 F_FLUSH_DATA = 0x28
502 F_FREEZE_FS = 0x35
503 F_FULLFSYNC = 0x33
504 F_GETCODEDIR = 0x48
505 F_GETFD = 0x1
506 F_GETFL = 0x3
507 F_GETLK = 0x7
508 F_GETLKPID = 0x42
509 F_GETNOSIGPIPE = 0x4a
510 F_GETOWN = 0x5
511 F_GETPATH = 0x32
512 F_GETPATH_MTMINFO = 0x47
513 F_GETPATH_NOFIRMLINK = 0x66
514 F_GETPROTECTIONCLASS = 0x3f
515 F_GETPROTECTIONLEVEL = 0x4d
516 F_GETSIGSINFO = 0x69
517 F_GLOBAL_NOCACHE = 0x37
518 F_LOG2PHYS = 0x31
519 F_LOG2PHYS_EXT = 0x41
520 F_NOCACHE = 0x30
521 F_NODIRECT = 0x3e
522 F_OK = 0x0
523 F_PATHPKG_CHECK = 0x34
524 F_PEOFPOSMODE = 0x3
525 F_PREALLOCATE = 0x2a
526 F_PUNCHHOLE = 0x63
527 F_RDADVISE = 0x2c
528 F_RDAHEAD = 0x2d
529 F_RDLCK = 0x1
530 F_SETBACKINGSTORE = 0x46
531 F_SETFD = 0x2
532 F_SETFL = 0x4
533 F_SETLK = 0x8
534 F_SETLKW = 0x9
535 F_SETLKWTIMEOUT = 0xa
536 F_SETNOSIGPIPE = 0x49
537 F_SETOWN = 0x6
538 F_SETPROTECTIONCLASS = 0x40
539 F_SETSIZE = 0x2b
540 F_SINGLE_WRITER = 0x4c
541 F_SPECULATIVE_READ = 0x65
542 F_THAW_FS = 0x36
543 F_TRANSCODEKEY = 0x4b
544 F_TRIM_ACTIVE_FILE = 0x64
545 F_UNLCK = 0x2
546 F_VOLPOSMODE = 0x4
547 F_WRLCK = 0x3
548 HUPCL = 0x4000
549 HW_MACHINE = 0x1
550 ICANON = 0x100
551 ICMP6_FILTER = 0x12
552 ICRNL = 0x100
553 IEXTEN = 0x400
554 IFF_ALLMULTI = 0x200
555 IFF_ALTPHYS = 0x4000
556 IFF_BROADCAST = 0x2
557 IFF_DEBUG = 0x4
558 IFF_LINK0 = 0x1000
559 IFF_LINK1 = 0x2000
560 IFF_LINK2 = 0x4000
561 IFF_LOOPBACK = 0x8
562 IFF_MULTICAST = 0x8000
563 IFF_NOARP = 0x80
564 IFF_NOTRAILERS = 0x20
565 IFF_OACTIVE = 0x400
566 IFF_POINTOPOINT = 0x10
567 IFF_PROMISC = 0x100
568 IFF_RUNNING = 0x40
569 IFF_SIMPLEX = 0x800
570 IFF_UP = 0x1
571 IFNAMSIZ = 0x10
572 IFT_1822 = 0x2
573 IFT_6LOWPAN = 0x40
574 IFT_AAL5 = 0x31
575 IFT_ARCNET = 0x23
576 IFT_ARCNETPLUS = 0x24
577 IFT_ATM = 0x25
578 IFT_BRIDGE = 0xd1
579 IFT_CARP = 0xf8
580 IFT_CELLULAR = 0xff
581 IFT_CEPT = 0x13
582 IFT_DS3 = 0x1e
583 IFT_ENC = 0xf4
584 IFT_EON = 0x19
585 IFT_ETHER = 0x6
586 IFT_FAITH = 0x38
587 IFT_FDDI = 0xf
588 IFT_FRELAY = 0x20
589 IFT_FRELAYDCE = 0x2c
590 IFT_GIF = 0x37
591 IFT_HDH1822 = 0x3
592 IFT_HIPPI = 0x2f
593 IFT_HSSI = 0x2e
594 IFT_HY = 0xe
595 IFT_IEEE1394 = 0x90
596 IFT_IEEE8023ADLAG = 0x88
597 IFT_ISDNBASIC = 0x14
598 IFT_ISDNPRIMARY = 0x15
599 IFT_ISO88022LLC = 0x29
600 IFT_ISO88023 = 0x7
601 IFT_ISO88024 = 0x8
602 IFT_ISO88025 = 0x9
603 IFT_ISO88026 = 0xa
604 IFT_L2VLAN = 0x87
605 IFT_LAPB = 0x10
606 IFT_LOCALTALK = 0x2a
607 IFT_LOOP = 0x18
608 IFT_MIOX25 = 0x26
609 IFT_MODEM = 0x30
610 IFT_NSIP = 0x1b
611 IFT_OTHER = 0x1
612 IFT_P10 = 0xc
613 IFT_P80 = 0xd
614 IFT_PARA = 0x22
615 IFT_PDP = 0xff
616 IFT_PFLOG = 0xf5
617 IFT_PFSYNC = 0xf6
618 IFT_PKTAP = 0xfe
619 IFT_PPP = 0x17
620 IFT_PROPMUX = 0x36
621 IFT_PROPVIRTUAL = 0x35
622 IFT_PTPSERIAL = 0x16
623 IFT_RS232 = 0x21
624 IFT_SDLC = 0x11
625 IFT_SIP = 0x1f
626 IFT_SLIP = 0x1c
627 IFT_SMDSDXI = 0x2b
628 IFT_SMDSICIP = 0x34
629 IFT_SONET = 0x27
630 IFT_SONETPATH = 0x32
631 IFT_SONETVT = 0x33
632 IFT_STARLAN = 0xb
633 IFT_STF = 0x39
634 IFT_T1 = 0x12
635 IFT_ULTRA = 0x1d
636 IFT_V35 = 0x2d
637 IFT_X25 = 0x5
638 IFT_X25DDN = 0x4
639 IFT_X25PLE = 0x28
640 IFT_XETHER = 0x1a
641 IGNBRK = 0x1
642 IGNCR = 0x80
643 IGNPAR = 0x4
644 IMAXBEL = 0x2000
645 INLCR = 0x40
646 INPCK = 0x10
647 IN_CLASSA_HOST = 0xffffff
648 IN_CLASSA_MAX = 0x80
649 IN_CLASSA_NET = 0xff000000
650 IN_CLASSA_NSHIFT = 0x18
651 IN_CLASSB_HOST = 0xffff
652 IN_CLASSB_MAX = 0x10000
653 IN_CLASSB_NET = 0xffff0000
654 IN_CLASSB_NSHIFT = 0x10
655 IN_CLASSC_HOST = 0xff
656 IN_CLASSC_NET = 0xffffff00
657 IN_CLASSC_NSHIFT = 0x8
658 IN_CLASSD_HOST = 0xfffffff
659 IN_CLASSD_NET = 0xf0000000
660 IN_CLASSD_NSHIFT = 0x1c
661 IN_LINKLOCALNETNUM = 0xa9fe0000
662 IN_LOOPBACKNET = 0x7f
663 IPPROTO_3PC = 0x22
664 IPPROTO_ADFS = 0x44
665 IPPROTO_AH = 0x33
666 IPPROTO_AHIP = 0x3d
667 IPPROTO_APES = 0x63
668 IPPROTO_ARGUS = 0xd
669 IPPROTO_AX25 = 0x5d
670 IPPROTO_BHA = 0x31
671 IPPROTO_BLT = 0x1e
672 IPPROTO_BRSATMON = 0x4c
673 IPPROTO_CFTP = 0x3e
674 IPPROTO_CHAOS = 0x10
675 IPPROTO_CMTP = 0x26
676 IPPROTO_CPHB = 0x49
677 IPPROTO_CPNX = 0x48
678 IPPROTO_DDP = 0x25
679 IPPROTO_DGP = 0x56
680 IPPROTO_DIVERT = 0xfe
681 IPPROTO_DONE = 0x101
682 IPPROTO_DSTOPTS = 0x3c
683 IPPROTO_EGP = 0x8
684 IPPROTO_EMCON = 0xe
685 IPPROTO_ENCAP = 0x62
686 IPPROTO_EON = 0x50
687 IPPROTO_ESP = 0x32
688 IPPROTO_ETHERIP = 0x61
689 IPPROTO_FRAGMENT = 0x2c
690 IPPROTO_GGP = 0x3
691 IPPROTO_GMTP = 0x64
692 IPPROTO_GRE = 0x2f
693 IPPROTO_HELLO = 0x3f
694 IPPROTO_HMP = 0x14
695 IPPROTO_HOPOPTS = 0x0
696 IPPROTO_ICMP = 0x1
697 IPPROTO_ICMPV6 = 0x3a
698 IPPROTO_IDP = 0x16
699 IPPROTO_IDPR = 0x23
700 IPPROTO_IDRP = 0x2d
701 IPPROTO_IGMP = 0x2
702 IPPROTO_IGP = 0x55
703 IPPROTO_IGRP = 0x58
704 IPPROTO_IL = 0x28
705 IPPROTO_INLSP = 0x34
706 IPPROTO_INP = 0x20
707 IPPROTO_IP = 0x0
708 IPPROTO_IPCOMP = 0x6c
709 IPPROTO_IPCV = 0x47
710 IPPROTO_IPEIP = 0x5e
711 IPPROTO_IPIP = 0x4
712 IPPROTO_IPPC = 0x43
713 IPPROTO_IPV4 = 0x4
714 IPPROTO_IPV6 = 0x29
715 IPPROTO_IRTP = 0x1c
716 IPPROTO_KRYPTOLAN = 0x41
717 IPPROTO_LARP = 0x5b
718 IPPROTO_LEAF1 = 0x19
719 IPPROTO_LEAF2 = 0x1a
720 IPPROTO_MAX = 0x100
721 IPPROTO_MAXID = 0x34
722 IPPROTO_MEAS = 0x13
723 IPPROTO_MHRP = 0x30
724 IPPROTO_MICP = 0x5f
725 IPPROTO_MTP = 0x5c
726 IPPROTO_MUX = 0x12
727 IPPROTO_ND = 0x4d
728 IPPROTO_NHRP = 0x36
729 IPPROTO_NONE = 0x3b
730 IPPROTO_NSP = 0x1f
731 IPPROTO_NVPII = 0xb
732 IPPROTO_OSPFIGP = 0x59
733 IPPROTO_PGM = 0x71
734 IPPROTO_PIGP = 0x9
735 IPPROTO_PIM = 0x67
736 IPPROTO_PRM = 0x15
737 IPPROTO_PUP = 0xc
738 IPPROTO_PVP = 0x4b
739 IPPROTO_RAW = 0xff
740 IPPROTO_RCCMON = 0xa
741 IPPROTO_RDP = 0x1b
742 IPPROTO_ROUTING = 0x2b
743 IPPROTO_RSVP = 0x2e
744 IPPROTO_RVD = 0x42
745 IPPROTO_SATEXPAK = 0x40
746 IPPROTO_SATMON = 0x45
747 IPPROTO_SCCSP = 0x60
748 IPPROTO_SCTP = 0x84
749 IPPROTO_SDRP = 0x2a
750 IPPROTO_SEP = 0x21
751 IPPROTO_SRPC = 0x5a
752 IPPROTO_ST = 0x7
753 IPPROTO_SVMTP = 0x52
754 IPPROTO_SWIPE = 0x35
755 IPPROTO_TCF = 0x57
756 IPPROTO_TCP = 0x6
757 IPPROTO_TP = 0x1d
758 IPPROTO_TPXX = 0x27
759 IPPROTO_TRUNK1 = 0x17
760 IPPROTO_TRUNK2 = 0x18
761 IPPROTO_TTP = 0x54
762 IPPROTO_UDP = 0x11
763 IPPROTO_VINES = 0x53
764 IPPROTO_VISA = 0x46
765 IPPROTO_VMTP = 0x51
766 IPPROTO_WBEXPAK = 0x4f
767 IPPROTO_WBMON = 0x4e
768 IPPROTO_WSN = 0x4a
769 IPPROTO_XNET = 0xf
770 IPPROTO_XTP = 0x24
771 IPV6_2292DSTOPTS = 0x17
772 IPV6_2292HOPLIMIT = 0x14
773 IPV6_2292HOPOPTS = 0x16
774 IPV6_2292NEXTHOP = 0x15
775 IPV6_2292PKTINFO = 0x13
776 IPV6_2292PKTOPTIONS = 0x19
777 IPV6_2292RTHDR = 0x18
778 IPV6_3542DSTOPTS = 0x32
779 IPV6_3542HOPLIMIT = 0x2f
780 IPV6_3542HOPOPTS = 0x31
781 IPV6_3542NEXTHOP = 0x30
782 IPV6_3542PKTINFO = 0x2e
783 IPV6_3542RTHDR = 0x33
784 IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
785 IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
786 IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
787 IPV6_AUTOFLOWLABEL = 0x3b
788 IPV6_BINDV6ONLY = 0x1b
789 IPV6_BOUND_IF = 0x7d
790 IPV6_CHECKSUM = 0x1a
791 IPV6_DEFAULT_MULTICAST_HOPS = 0x1
792 IPV6_DEFAULT_MULTICAST_LOOP = 0x1
793 IPV6_DEFHLIM = 0x40
794 IPV6_DONTFRAG = 0x3e
795 IPV6_DSTOPTS = 0x32
796 IPV6_FAITH = 0x1d
797 IPV6_FLOWINFO_MASK = 0xffffff0f
798 IPV6_FLOWLABEL_MASK = 0xffff0f00
799 IPV6_FLOW_ECN_MASK = 0x3000
800 IPV6_FRAGTTL = 0x3c
801 IPV6_FW_ADD = 0x1e
802 IPV6_FW_DEL = 0x1f
803 IPV6_FW_FLUSH = 0x20
804 IPV6_FW_GET = 0x22
805 IPV6_FW_ZERO = 0x21
806 IPV6_HLIMDEC = 0x1
807 IPV6_HOPLIMIT = 0x2f
808 IPV6_HOPOPTS = 0x31
809 IPV6_IPSEC_POLICY = 0x1c
810 IPV6_JOIN_GROUP = 0xc
811 IPV6_LEAVE_GROUP = 0xd
812 IPV6_MAXHLIM = 0xff
813 IPV6_MAXOPTHDR = 0x800
814 IPV6_MAXPACKET = 0xffff
815 IPV6_MAX_GROUP_SRC_FILTER = 0x200
816 IPV6_MAX_MEMBERSHIPS = 0xfff
817 IPV6_MAX_SOCK_SRC_FILTER = 0x80
818 IPV6_MIN_MEMBERSHIPS = 0x1f
819 IPV6_MMTU = 0x500
820 IPV6_MSFILTER = 0x4a
821 IPV6_MULTICAST_HOPS = 0xa
822 IPV6_MULTICAST_IF = 0x9
823 IPV6_MULTICAST_LOOP = 0xb
824 IPV6_NEXTHOP = 0x30
825 IPV6_PATHMTU = 0x2c
826 IPV6_PKTINFO = 0x2e
827 IPV6_PORTRANGE = 0xe
828 IPV6_PORTRANGE_DEFAULT = 0x0
829 IPV6_PORTRANGE_HIGH = 0x1
830 IPV6_PORTRANGE_LOW = 0x2
831 IPV6_PREFER_TEMPADDR = 0x3f
832 IPV6_RECVDSTOPTS = 0x28
833 IPV6_RECVHOPLIMIT = 0x25
834 IPV6_RECVHOPOPTS = 0x27
835 IPV6_RECVPATHMTU = 0x2b
836 IPV6_RECVPKTINFO = 0x3d
837 IPV6_RECVRTHDR = 0x26
838 IPV6_RECVTCLASS = 0x23
839 IPV6_RTHDR = 0x33
840 IPV6_RTHDRDSTOPTS = 0x39
841 IPV6_RTHDR_LOOSE = 0x0
842 IPV6_RTHDR_STRICT = 0x1
843 IPV6_RTHDR_TYPE_0 = 0x0
844 IPV6_SOCKOPT_RESERVED1 = 0x3
845 IPV6_TCLASS = 0x24
846 IPV6_UNICAST_HOPS = 0x4
847 IPV6_USE_MIN_MTU = 0x2a
848 IPV6_V6ONLY = 0x1b
849 IPV6_VERSION = 0x60
850 IPV6_VERSION_MASK = 0xf0
851 IP_ADD_MEMBERSHIP = 0xc
852 IP_ADD_SOURCE_MEMBERSHIP = 0x46
853 IP_BLOCK_SOURCE = 0x48
854 IP_BOUND_IF = 0x19
855 IP_DEFAULT_MULTICAST_LOOP = 0x1
856 IP_DEFAULT_MULTICAST_TTL = 0x1
857 IP_DF = 0x4000
858 IP_DONTFRAG = 0x1c
859 IP_DROP_MEMBERSHIP = 0xd
860 IP_DROP_SOURCE_MEMBERSHIP = 0x47
861 IP_DUMMYNET_CONFIGURE = 0x3c
862 IP_DUMMYNET_DEL = 0x3d
863 IP_DUMMYNET_FLUSH = 0x3e
864 IP_DUMMYNET_GET = 0x40
865 IP_FAITH = 0x16
866 IP_FW_ADD = 0x28
867 IP_FW_DEL = 0x29
868 IP_FW_FLUSH = 0x2a
869 IP_FW_GET = 0x2c
870 IP_FW_RESETLOG = 0x2d
871 IP_FW_ZERO = 0x2b
872 IP_HDRINCL = 0x2
873 IP_IPSEC_POLICY = 0x15
874 IP_MAXPACKET = 0xffff
875 IP_MAX_GROUP_SRC_FILTER = 0x200
876 IP_MAX_MEMBERSHIPS = 0xfff
877 IP_MAX_SOCK_MUTE_FILTER = 0x80
878 IP_MAX_SOCK_SRC_FILTER = 0x80
879 IP_MF = 0x2000
880 IP_MIN_MEMBERSHIPS = 0x1f
881 IP_MSFILTER = 0x4a
882 IP_MSS = 0x240
883 IP_MULTICAST_IF = 0x9
884 IP_MULTICAST_IFINDEX = 0x42
885 IP_MULTICAST_LOOP = 0xb
886 IP_MULTICAST_TTL = 0xa
887 IP_MULTICAST_VIF = 0xe
888 IP_NAT__XXX = 0x37
889 IP_OFFMASK = 0x1fff
890 IP_OLD_FW_ADD = 0x32
891 IP_OLD_FW_DEL = 0x33
892 IP_OLD_FW_FLUSH = 0x34
893 IP_OLD_FW_GET = 0x36
894 IP_OLD_FW_RESETLOG = 0x38
895 IP_OLD_FW_ZERO = 0x35
896 IP_OPTIONS = 0x1
897 IP_PKTINFO = 0x1a
898 IP_PORTRANGE = 0x13
899 IP_PORTRANGE_DEFAULT = 0x0
900 IP_PORTRANGE_HIGH = 0x1
901 IP_PORTRANGE_LOW = 0x2
902 IP_RECVDSTADDR = 0x7
903 IP_RECVIF = 0x14
904 IP_RECVOPTS = 0x5
905 IP_RECVPKTINFO = 0x1a
906 IP_RECVRETOPTS = 0x6
907 IP_RECVTOS = 0x1b
908 IP_RECVTTL = 0x18
909 IP_RETOPTS = 0x8
910 IP_RF = 0x8000
911 IP_RSVP_OFF = 0x10
912 IP_RSVP_ON = 0xf
913 IP_RSVP_VIF_OFF = 0x12
914 IP_RSVP_VIF_ON = 0x11
915 IP_STRIPHDR = 0x17
916 IP_TOS = 0x3
917 IP_TRAFFIC_MGT_BACKGROUND = 0x41
918 IP_TTL = 0x4
919 IP_UNBLOCK_SOURCE = 0x49
920 ISIG = 0x80
921 ISTRIP = 0x20
922 IUTF8 = 0x4000
923 IXANY = 0x800
924 IXOFF = 0x400
925 IXON = 0x200
926 KERN_HOSTNAME = 0xa
927 KERN_OSRELEASE = 0x2
928 KERN_OSTYPE = 0x1
929 KERN_VERSION = 0x4
930 LOCAL_PEERCRED = 0x1
931 LOCAL_PEEREPID = 0x3
932 LOCAL_PEEREUUID = 0x5
933 LOCAL_PEERPID = 0x2
934 LOCAL_PEERTOKEN = 0x6
935 LOCAL_PEERUUID = 0x4
936 LOCK_EX = 0x2
937 LOCK_NB = 0x4
938 LOCK_SH = 0x1
939 LOCK_UN = 0x8
940 MADV_CAN_REUSE = 0x9
941 MADV_DONTNEED = 0x4
942 MADV_FREE = 0x5
943 MADV_FREE_REUSABLE = 0x7
944 MADV_FREE_REUSE = 0x8
945 MADV_NORMAL = 0x0
946 MADV_PAGEOUT = 0xa
947 MADV_RANDOM = 0x1
948 MADV_SEQUENTIAL = 0x2
949 MADV_WILLNEED = 0x3
950 MADV_ZERO_WIRED_PAGES = 0x6
951 MAP_32BIT = 0x8000
952 MAP_ANON = 0x1000
953 MAP_ANONYMOUS = 0x1000
954 MAP_COPY = 0x2
955 MAP_FILE = 0x0
956 MAP_FIXED = 0x10
957 MAP_HASSEMAPHORE = 0x200
958 MAP_JIT = 0x800
959 MAP_NOCACHE = 0x400
960 MAP_NOEXTEND = 0x100
961 MAP_NORESERVE = 0x40
962 MAP_PRIVATE = 0x2
963 MAP_RENAME = 0x20
964 MAP_RESERVED0080 = 0x80
965 MAP_RESILIENT_CODESIGN = 0x2000
966 MAP_RESILIENT_MEDIA = 0x4000
967 MAP_SHARED = 0x1
968 MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000
969 MAP_UNIX03 = 0x40000
970 MCAST_BLOCK_SOURCE = 0x54
971 MCAST_EXCLUDE = 0x2
972 MCAST_INCLUDE = 0x1
973 MCAST_JOIN_GROUP = 0x50
974 MCAST_JOIN_SOURCE_GROUP = 0x52
975 MCAST_LEAVE_GROUP = 0x51
976 MCAST_LEAVE_SOURCE_GROUP = 0x53
977 MCAST_UNBLOCK_SOURCE = 0x55
978 MCAST_UNDEFINED = 0x0
979 MCL_CURRENT = 0x1
980 MCL_FUTURE = 0x2
981 MNT_ASYNC = 0x40
982 MNT_AUTOMOUNTED = 0x400000
983 MNT_CMDFLAGS = 0xf0000
984 MNT_CPROTECT = 0x80
985 MNT_DEFWRITE = 0x2000000
986 MNT_DONTBROWSE = 0x100000
987 MNT_DOVOLFS = 0x8000
988 MNT_DWAIT = 0x4
989 MNT_EXPORTED = 0x100
990 MNT_EXT_ROOT_DATA_VOL = 0x1
991 MNT_FORCE = 0x80000
992 MNT_IGNORE_OWNERSHIP = 0x200000
993 MNT_JOURNALED = 0x800000
994 MNT_LOCAL = 0x1000
995 MNT_MULTILABEL = 0x4000000
996 MNT_NOATIME = 0x10000000
997 MNT_NOBLOCK = 0x20000
998 MNT_NODEV = 0x10
999 MNT_NOEXEC = 0x4
1000 MNT_NOSUID = 0x8
1001 MNT_NOUSERXATTR = 0x1000000
1002 MNT_NOWAIT = 0x2
1003 MNT_QUARANTINE = 0x400
1004 MNT_QUOTA = 0x2000
1005 MNT_RDONLY = 0x1
1006 MNT_RELOAD = 0x40000
1007 MNT_REMOVABLE = 0x200
1008 MNT_ROOTFS = 0x4000
1009 MNT_SNAPSHOT = 0x40000000
1010 MNT_STRICTATIME = 0x80000000
1011 MNT_SYNCHRONOUS = 0x2
1012 MNT_UNION = 0x20
1013 MNT_UNKNOWNPERMISSIONS = 0x200000
1014 MNT_UPDATE = 0x10000
1015 MNT_VISFLAGMASK = 0xd7f0f7ff
1016 MNT_WAIT = 0x1
1017 MSG_CTRUNC = 0x20
1018 MSG_DONTROUTE = 0x4
1019 MSG_DONTWAIT = 0x80
1020 MSG_EOF = 0x100
1021 MSG_EOR = 0x8
1022 MSG_FLUSH = 0x400
1023 MSG_HAVEMORE = 0x2000
1024 MSG_HOLD = 0x800
1025 MSG_NEEDSA = 0x10000
1026 MSG_NOSIGNAL = 0x80000
1027 MSG_OOB = 0x1
1028 MSG_PEEK = 0x2
1029 MSG_RCVMORE = 0x4000
1030 MSG_SEND = 0x1000
1031 MSG_TRUNC = 0x10
1032 MSG_WAITALL = 0x40
1033 MSG_WAITSTREAM = 0x200
1034 MS_ASYNC = 0x1
1035 MS_DEACTIVATE = 0x8
1036 MS_INVALIDATE = 0x2
1037 MS_KILLPAGES = 0x4
1038 MS_SYNC = 0x10
1039 NAME_MAX = 0xff
1040 NET_RT_DUMP = 0x1
1041 NET_RT_DUMP2 = 0x7
1042 NET_RT_FLAGS = 0x2
1043 NET_RT_FLAGS_PRIV = 0xa
1044 NET_RT_IFLIST = 0x3
1045 NET_RT_IFLIST2 = 0x6
1046 NET_RT_MAXID = 0xb
1047 NET_RT_STAT = 0x4
1048 NET_RT_TRASH = 0x5
1049 NFDBITS = 0x20
1050 NL0 = 0x0
1051 NL1 = 0x100
1052 NL2 = 0x200
1053 NL3 = 0x300
1054 NLDLY = 0x300
1055 NOFLSH = 0x80000000
1056 NOKERNINFO = 0x2000000
1057 NOTE_ABSOLUTE = 0x8
1058 NOTE_ATTRIB = 0x8
1059 NOTE_BACKGROUND = 0x40
1060 NOTE_CHILD = 0x4
1061 NOTE_CRITICAL = 0x20
1062 NOTE_DELETE = 0x1
1063 NOTE_EXEC = 0x20000000
1064 NOTE_EXIT = 0x80000000
1065 NOTE_EXITSTATUS = 0x4000000
1066 NOTE_EXIT_CSERROR = 0x40000
1067 NOTE_EXIT_DECRYPTFAIL = 0x10000
1068 NOTE_EXIT_DETAIL = 0x2000000
1069 NOTE_EXIT_DETAIL_MASK = 0x70000
1070 NOTE_EXIT_MEMORY = 0x20000
1071 NOTE_EXIT_REPARENTED = 0x80000
1072 NOTE_EXTEND = 0x4
1073 NOTE_FFAND = 0x40000000
1074 NOTE_FFCOPY = 0xc0000000
1075 NOTE_FFCTRLMASK = 0xc0000000
1076 NOTE_FFLAGSMASK = 0xffffff
1077 NOTE_FFNOP = 0x0
1078 NOTE_FFOR = 0x80000000
1079 NOTE_FORK = 0x40000000
1080 NOTE_FUNLOCK = 0x100
1081 NOTE_LEEWAY = 0x10
1082 NOTE_LINK = 0x10
1083 NOTE_LOWAT = 0x1
1084 NOTE_MACHTIME = 0x100
1085 NOTE_MACH_CONTINUOUS_TIME = 0x80
1086 NOTE_NONE = 0x80
1087 NOTE_NSECONDS = 0x4
1088 NOTE_OOB = 0x2
1089 NOTE_PCTRLMASK = -0x100000
1090 NOTE_PDATAMASK = 0xfffff
1091 NOTE_REAP = 0x10000000
1092 NOTE_RENAME = 0x20
1093 NOTE_REVOKE = 0x40
1094 NOTE_SECONDS = 0x1
1095 NOTE_SIGNAL = 0x8000000
1096 NOTE_TRACK = 0x1
1097 NOTE_TRACKERR = 0x2
1098 NOTE_TRIGGER = 0x1000000
1099 NOTE_USECONDS = 0x2
1100 NOTE_VM_ERROR = 0x10000000
1101 NOTE_VM_PRESSURE = 0x80000000
1102 NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
1103 NOTE_VM_PRESSURE_TERMINATE = 0x40000000
1104 NOTE_WRITE = 0x2
1105 OCRNL = 0x10
1106 OFDEL = 0x20000
1107 OFILL = 0x80
1108 ONLCR = 0x2
1109 ONLRET = 0x40
1110 ONOCR = 0x20
1111 ONOEOT = 0x8
1112 OPOST = 0x1
1113 OXTABS = 0x4
1114 O_ACCMODE = 0x3
1115 O_ALERT = 0x20000000
1116 O_APPEND = 0x8
1117 O_ASYNC = 0x40
1118 O_CLOEXEC = 0x1000000
1119 O_CREAT = 0x200
1120 O_DIRECTORY = 0x100000
1121 O_DP_GETRAWENCRYPTED = 0x1
1122 O_DP_GETRAWUNENCRYPTED = 0x2
1123 O_DSYNC = 0x400000
1124 O_EVTONLY = 0x8000
1125 O_EXCL = 0x800
1126 O_EXLOCK = 0x20
1127 O_FSYNC = 0x80
1128 O_NDELAY = 0x4
1129 O_NOCTTY = 0x20000
1130 O_NOFOLLOW = 0x100
1131 O_NOFOLLOW_ANY = 0x20000000
1132 O_NONBLOCK = 0x4
1133 O_POPUP = 0x80000000
1134 O_RDONLY = 0x0
1135 O_RDWR = 0x2
1136 O_SHLOCK = 0x10
1137 O_SYMLINK = 0x200000
1138 O_SYNC = 0x80
1139 O_TRUNC = 0x400
1140 O_WRONLY = 0x1
1141 PARENB = 0x1000
1142 PARMRK = 0x8
1143 PARODD = 0x2000
1144 PENDIN = 0x20000000
1145 PRIO_PGRP = 0x1
1146 PRIO_PROCESS = 0x0
1147 PRIO_USER = 0x2
1148 PROT_EXEC = 0x4
1149 PROT_NONE = 0x0
1150 PROT_READ = 0x1
1151 PROT_WRITE = 0x2
1152 PT_ATTACH = 0xa
1153 PT_ATTACHEXC = 0xe
1154 PT_CONTINUE = 0x7
1155 PT_DENY_ATTACH = 0x1f
1156 PT_DETACH = 0xb
1157 PT_FIRSTMACH = 0x20
1158 PT_FORCEQUOTA = 0x1e
1159 PT_KILL = 0x8
1160 PT_READ_D = 0x2
1161 PT_READ_I = 0x1
1162 PT_READ_U = 0x3
1163 PT_SIGEXC = 0xc
1164 PT_STEP = 0x9
1165 PT_THUPDATE = 0xd
1166 PT_TRACE_ME = 0x0
1167 PT_WRITE_D = 0x5
1168 PT_WRITE_I = 0x4
1169 PT_WRITE_U = 0x6
1170 RLIMIT_AS = 0x5
1171 RLIMIT_CORE = 0x4
1172 RLIMIT_CPU = 0x0
1173 RLIMIT_CPU_USAGE_MONITOR = 0x2
1174 RLIMIT_DATA = 0x2
1175 RLIMIT_FSIZE = 0x1
1176 RLIMIT_MEMLOCK = 0x6
1177 RLIMIT_NOFILE = 0x8
1178 RLIMIT_NPROC = 0x7
1179 RLIMIT_RSS = 0x5
1180 RLIMIT_STACK = 0x3
1181 RLIM_INFINITY = 0x7fffffffffffffff
1182 RTAX_AUTHOR = 0x6
1183 RTAX_BRD = 0x7
1184 RTAX_DST = 0x0
1185 RTAX_GATEWAY = 0x1
1186 RTAX_GENMASK = 0x3
1187 RTAX_IFA = 0x5
1188 RTAX_IFP = 0x4
1189 RTAX_MAX = 0x8
1190 RTAX_NETMASK = 0x2
1191 RTA_AUTHOR = 0x40
1192 RTA_BRD = 0x80
1193 RTA_DST = 0x1
1194 RTA_GATEWAY = 0x2
1195 RTA_GENMASK = 0x8
1196 RTA_IFA = 0x20
1197 RTA_IFP = 0x10
1198 RTA_NETMASK = 0x4
1199 RTF_BLACKHOLE = 0x1000
1200 RTF_BROADCAST = 0x400000
1201 RTF_CLONING = 0x100
1202 RTF_CONDEMNED = 0x2000000
1203 RTF_DEAD = 0x20000000
1204 RTF_DELCLONE = 0x80
1205 RTF_DONE = 0x40
1206 RTF_DYNAMIC = 0x10
1207 RTF_GATEWAY = 0x2
1208 RTF_HOST = 0x4
1209 RTF_IFREF = 0x4000000
1210 RTF_IFSCOPE = 0x1000000
1211 RTF_LLDATA = 0x400
1212 RTF_LLINFO = 0x400
1213 RTF_LOCAL = 0x200000
1214 RTF_MODIFIED = 0x20
1215 RTF_MULTICAST = 0x800000
1216 RTF_NOIFREF = 0x2000
1217 RTF_PINNED = 0x100000
1218 RTF_PRCLONING = 0x10000
1219 RTF_PROTO1 = 0x8000
1220 RTF_PROTO2 = 0x4000
1221 RTF_PROTO3 = 0x40000
1222 RTF_PROXY = 0x8000000
1223 RTF_REJECT = 0x8
1224 RTF_ROUTER = 0x10000000
1225 RTF_STATIC = 0x800
1226 RTF_UP = 0x1
1227 RTF_WASCLONED = 0x20000
1228 RTF_XRESOLVE = 0x200
1229 RTM_ADD = 0x1
1230 RTM_CHANGE = 0x3
1231 RTM_DELADDR = 0xd
1232 RTM_DELETE = 0x2
1233 RTM_DELMADDR = 0x10
1234 RTM_GET = 0x4
1235 RTM_GET2 = 0x14
1236 RTM_IFINFO = 0xe
1237 RTM_IFINFO2 = 0x12
1238 RTM_LOCK = 0x8
1239 RTM_LOSING = 0x5
1240 RTM_MISS = 0x7
1241 RTM_NEWADDR = 0xc
1242 RTM_NEWMADDR = 0xf
1243 RTM_NEWMADDR2 = 0x13
1244 RTM_OLDADD = 0x9
1245 RTM_OLDDEL = 0xa
1246 RTM_REDIRECT = 0x6
1247 RTM_RESOLVE = 0xb
1248 RTM_RTTUNIT = 0xf4240
1249 RTM_VERSION = 0x5
1250 RTV_EXPIRE = 0x4
1251 RTV_HOPCOUNT = 0x2
1252 RTV_MTU = 0x1
1253 RTV_RPIPE = 0x8
1254 RTV_RTT = 0x40
1255 RTV_RTTVAR = 0x80
1256 RTV_SPIPE = 0x10
1257 RTV_SSTHRESH = 0x20
1258 RUSAGE_CHILDREN = -0x1
1259 RUSAGE_SELF = 0x0
1260 SCM_CREDS = 0x3
1261 SCM_RIGHTS = 0x1
1262 SCM_TIMESTAMP = 0x2
1263 SCM_TIMESTAMP_MONOTONIC = 0x4
1264 SEEK_CUR = 0x1
1265 SEEK_DATA = 0x4
1266 SEEK_END = 0x2
1267 SEEK_HOLE = 0x3
1268 SEEK_SET = 0x0
1269 SHUT_RD = 0x0
1270 SHUT_RDWR = 0x2
1271 SHUT_WR = 0x1
1272 SIOCADDMULTI = 0x80206931
1273 SIOCAIFADDR = 0x8040691a
1274 SIOCARPIPLL = 0xc0206928
1275 SIOCATMARK = 0x40047307
1276 SIOCAUTOADDR = 0xc0206926
1277 SIOCAUTONETMASK = 0x80206927
1278 SIOCDELMULTI = 0x80206932
1279 SIOCDIFADDR = 0x80206919
1280 SIOCDIFPHYADDR = 0x80206941
1281 SIOCGDRVSPEC = 0xc028697b
1282 SIOCGETVLAN = 0xc020697f
1283 SIOCGHIWAT = 0x40047301
1284 SIOCGIF6LOWPAN = 0xc02069c5
1285 SIOCGIFADDR = 0xc0206921
1286 SIOCGIFALTMTU = 0xc0206948
1287 SIOCGIFASYNCMAP = 0xc020697c
1288 SIOCGIFBOND = 0xc0206947
1289 SIOCGIFBRDADDR = 0xc0206923
1290 SIOCGIFCAP = 0xc020695b
1291 SIOCGIFCONF = 0xc00c6924
1292 SIOCGIFDEVMTU = 0xc0206944
1293 SIOCGIFDSTADDR = 0xc0206922
1294 SIOCGIFFLAGS = 0xc0206911
1295 SIOCGIFFUNCTIONALTYPE = 0xc02069ad
1296 SIOCGIFGENERIC = 0xc020693a
1297 SIOCGIFKPI = 0xc0206987
1298 SIOCGIFMAC = 0xc0206982
1299 SIOCGIFMEDIA = 0xc02c6938
1300 SIOCGIFMETRIC = 0xc0206917
1301 SIOCGIFMTU = 0xc0206933
1302 SIOCGIFNETMASK = 0xc0206925
1303 SIOCGIFPDSTADDR = 0xc0206940
1304 SIOCGIFPHYS = 0xc0206935
1305 SIOCGIFPSRCADDR = 0xc020693f
1306 SIOCGIFSTATUS = 0xc331693d
1307 SIOCGIFVLAN = 0xc020697f
1308 SIOCGIFWAKEFLAGS = 0xc0206988
1309 SIOCGIFXMEDIA = 0xc02c6948
1310 SIOCGLOWAT = 0x40047303
1311 SIOCGPGRP = 0x40047309
1312 SIOCIFCREATE = 0xc0206978
1313 SIOCIFCREATE2 = 0xc020697a
1314 SIOCIFDESTROY = 0x80206979
1315 SIOCIFGCLONERS = 0xc0106981
1316 SIOCRSLVMULTI = 0xc010693b
1317 SIOCSDRVSPEC = 0x8028697b
1318 SIOCSETVLAN = 0x8020697e
1319 SIOCSHIWAT = 0x80047300
1320 SIOCSIF6LOWPAN = 0x802069c4
1321 SIOCSIFADDR = 0x8020690c
1322 SIOCSIFALTMTU = 0x80206945
1323 SIOCSIFASYNCMAP = 0x8020697d
1324 SIOCSIFBOND = 0x80206946
1325 SIOCSIFBRDADDR = 0x80206913
1326 SIOCSIFCAP = 0x8020695a
1327 SIOCSIFDSTADDR = 0x8020690e
1328 SIOCSIFFLAGS = 0x80206910
1329 SIOCSIFGENERIC = 0x80206939
1330 SIOCSIFKPI = 0x80206986
1331 SIOCSIFLLADDR = 0x8020693c
1332 SIOCSIFMAC = 0x80206983
1333 SIOCSIFMEDIA = 0xc0206937
1334 SIOCSIFMETRIC = 0x80206918
1335 SIOCSIFMTU = 0x80206934
1336 SIOCSIFNETMASK = 0x80206916
1337 SIOCSIFPHYADDR = 0x8040693e
1338 SIOCSIFPHYS = 0x80206936
1339 SIOCSIFVLAN = 0x8020697e
1340 SIOCSLOWAT = 0x80047302
1341 SIOCSPGRP = 0x80047308
1342 SOCK_DGRAM = 0x2
1343 SOCK_MAXADDRLEN = 0xff
1344 SOCK_RAW = 0x3
1345 SOCK_RDM = 0x4
1346 SOCK_SEQPACKET = 0x5
1347 SOCK_STREAM = 0x1
1348 SOL_LOCAL = 0x0
1349 SOL_SOCKET = 0xffff
1350 SOMAXCONN = 0x80
1351 SO_ACCEPTCONN = 0x2
1352 SO_BROADCAST = 0x20
1353 SO_DEBUG = 0x1
1354 SO_DONTROUTE = 0x10
1355 SO_DONTTRUNC = 0x2000
1356 SO_ERROR = 0x1007
1357 SO_KEEPALIVE = 0x8
1358 SO_LABEL = 0x1010
1359 SO_LINGER = 0x80
1360 SO_LINGER_SEC = 0x1080
1361 SO_NETSVC_MARKING_LEVEL = 0x1119
1362 SO_NET_SERVICE_TYPE = 0x1116
1363 SO_NKE = 0x1021
1364 SO_NOADDRERR = 0x1023
1365 SO_NOSIGPIPE = 0x1022
1366 SO_NOTIFYCONFLICT = 0x1026
1367 SO_NP_EXTENSIONS = 0x1083
1368 SO_NREAD = 0x1020
1369 SO_NUMRCVPKT = 0x1112
1370 SO_NWRITE = 0x1024
1371 SO_OOBINLINE = 0x100
1372 SO_PEERLABEL = 0x1011
1373 SO_RANDOMPORT = 0x1082
1374 SO_RCVBUF = 0x1002
1375 SO_RCVLOWAT = 0x1004
1376 SO_RCVTIMEO = 0x1006
1377 SO_REUSEADDR = 0x4
1378 SO_REUSEPORT = 0x200
1379 SO_REUSESHAREUID = 0x1025
1380 SO_SNDBUF = 0x1001
1381 SO_SNDLOWAT = 0x1003
1382 SO_SNDTIMEO = 0x1005
1383 SO_TIMESTAMP = 0x400
1384 SO_TIMESTAMP_MONOTONIC = 0x800
1385 SO_TYPE = 0x1008
1386 SO_UPCALLCLOSEWAIT = 0x1027
1387 SO_USELOOPBACK = 0x40
1388 SO_WANTMORE = 0x4000
1389 SO_WANTOOBFLAG = 0x8000
1390 S_IEXEC = 0x40
1391 S_IFBLK = 0x6000
1392 S_IFCHR = 0x2000
1393 S_IFDIR = 0x4000
1394 S_IFIFO = 0x1000
1395 S_IFLNK = 0xa000
1396 S_IFMT = 0xf000
1397 S_IFREG = 0x8000
1398 S_IFSOCK = 0xc000
1399 S_IFWHT = 0xe000
1400 S_IREAD = 0x100
1401 S_IRGRP = 0x20
1402 S_IROTH = 0x4
1403 S_IRUSR = 0x100
1404 S_IRWXG = 0x38
1405 S_IRWXO = 0x7
1406 S_IRWXU = 0x1c0
1407 S_ISGID = 0x400
1408 S_ISTXT = 0x200
1409 S_ISUID = 0x800
1410 S_ISVTX = 0x200
1411 S_IWGRP = 0x10
1412 S_IWOTH = 0x2
1413 S_IWRITE = 0x80
1414 S_IWUSR = 0x80
1415 S_IXGRP = 0x8
1416 S_IXOTH = 0x1
1417 S_IXUSR = 0x40
1418 TAB0 = 0x0
1419 TAB1 = 0x400
1420 TAB2 = 0x800
1421 TAB3 = 0x4
1422 TABDLY = 0xc04
1423 TCIFLUSH = 0x1
1424 TCIOFF = 0x3
1425 TCIOFLUSH = 0x3
1426 TCION = 0x4
1427 TCOFLUSH = 0x2
1428 TCOOFF = 0x1
1429 TCOON = 0x2
1430 TCP_CONNECTIONTIMEOUT = 0x20
1431 TCP_CONNECTION_INFO = 0x106
1432 TCP_ENABLE_ECN = 0x104
1433 TCP_FASTOPEN = 0x105
1434 TCP_KEEPALIVE = 0x10
1435 TCP_KEEPCNT = 0x102
1436 TCP_KEEPINTVL = 0x101
1437 TCP_MAXHLEN = 0x3c
1438 TCP_MAXOLEN = 0x28
1439 TCP_MAXSEG = 0x2
1440 TCP_MAXWIN = 0xffff
1441 TCP_MAX_SACK = 0x4
1442 TCP_MAX_WINSHIFT = 0xe
1443 TCP_MINMSS = 0xd8
1444 TCP_MSS = 0x200
1445 TCP_NODELAY = 0x1
1446 TCP_NOOPT = 0x8
1447 TCP_NOPUSH = 0x4
1448 TCP_NOTSENT_LOWAT = 0x201
1449 TCP_RXT_CONNDROPTIME = 0x80
1450 TCP_RXT_FINDROP = 0x100
1451 TCP_SENDMOREACKS = 0x103
1452 TCSAFLUSH = 0x2
1453 TIOCCBRK = 0x2000747a
1454 TIOCCDTR = 0x20007478
1455 TIOCCONS = 0x80047462
1456 TIOCDCDTIMESTAMP = 0x40107458
1457 TIOCDRAIN = 0x2000745e
1458 TIOCDSIMICROCODE = 0x20007455
1459 TIOCEXCL = 0x2000740d
1460 TIOCEXT = 0x80047460
1461 TIOCFLUSH = 0x80047410
1462 TIOCGDRAINWAIT = 0x40047456
1463 TIOCGETA = 0x40487413
1464 TIOCGETD = 0x4004741a
1465 TIOCGPGRP = 0x40047477
1466 TIOCGWINSZ = 0x40087468
1467 TIOCIXOFF = 0x20007480
1468 TIOCIXON = 0x20007481
1469 TIOCMBIC = 0x8004746b
1470 TIOCMBIS = 0x8004746c
1471 TIOCMGDTRWAIT = 0x4004745a
1472 TIOCMGET = 0x4004746a
1473 TIOCMODG = 0x40047403
1474 TIOCMODS = 0x80047404
1475 TIOCMSDTRWAIT = 0x8004745b
1476 TIOCMSET = 0x8004746d
1477 TIOCM_CAR = 0x40
1478 TIOCM_CD = 0x40
1479 TIOCM_CTS = 0x20
1480 TIOCM_DSR = 0x100
1481 TIOCM_DTR = 0x2
1482 TIOCM_LE = 0x1
1483 TIOCM_RI = 0x80
1484 TIOCM_RNG = 0x80
1485 TIOCM_RTS = 0x4
1486 TIOCM_SR = 0x10
1487 TIOCM_ST = 0x8
1488 TIOCNOTTY = 0x20007471
1489 TIOCNXCL = 0x2000740e
1490 TIOCOUTQ = 0x40047473
1491 TIOCPKT = 0x80047470
1492 TIOCPKT_DATA = 0x0
1493 TIOCPKT_DOSTOP = 0x20
1494 TIOCPKT_FLUSHREAD = 0x1
1495 TIOCPKT_FLUSHWRITE = 0x2
1496 TIOCPKT_IOCTL = 0x40
1497 TIOCPKT_NOSTOP = 0x10
1498 TIOCPKT_START = 0x8
1499 TIOCPKT_STOP = 0x4
1500 TIOCPTYGNAME = 0x40807453
1501 TIOCPTYGRANT = 0x20007454
1502 TIOCPTYUNLK = 0x20007452
1503 TIOCREMOTE = 0x80047469
1504 TIOCSBRK = 0x2000747b
1505 TIOCSCONS = 0x20007463
1506 TIOCSCTTY = 0x20007461
1507 TIOCSDRAINWAIT = 0x80047457
1508 TIOCSDTR = 0x20007479
1509 TIOCSETA = 0x80487414
1510 TIOCSETAF = 0x80487416
1511 TIOCSETAW = 0x80487415
1512 TIOCSETD = 0x8004741b
1513 TIOCSIG = 0x2000745f
1514 TIOCSPGRP = 0x80047476
1515 TIOCSTART = 0x2000746e
1516 TIOCSTAT = 0x20007465
1517 TIOCSTI = 0x80017472
1518 TIOCSTOP = 0x2000746f
1519 TIOCSWINSZ = 0x80087467
1520 TIOCTIMESTAMP = 0x40107459
1521 TIOCUCNTL = 0x80047466
1522 TOSTOP = 0x400000
1523 VDISCARD = 0xf
1524 VDSUSP = 0xb
1525 VEOF = 0x0
1526 VEOL = 0x1
1527 VEOL2 = 0x2
1528 VERASE = 0x3
1529 VINTR = 0x8
1530 VKILL = 0x5
1531 VLNEXT = 0xe
1532 VMIN = 0x10
1533 VM_LOADAVG = 0x2
1534 VM_MACHFACTOR = 0x4
1535 VM_MAXID = 0x6
1536 VM_METER = 0x1
1537 VM_SWAPUSAGE = 0x5
1538 VQUIT = 0x9
1539 VREPRINT = 0x6
1540 VSTART = 0xc
1541 VSTATUS = 0x12
1542 VSTOP = 0xd
1543 VSUSP = 0xa
1544 VT0 = 0x0
1545 VT1 = 0x10000
1546 VTDLY = 0x10000
1547 VTIME = 0x11
1548 VWERASE = 0x4
1549 WCONTINUED = 0x10
1550 WCOREFLAG = 0x80
1551 WEXITED = 0x4
1552 WNOHANG = 0x1
1553 WNOWAIT = 0x20
1554 WORDSIZE = 0x40
1555 WSTOPPED = 0x8
1556 WUNTRACED = 0x2
1557 XATTR_CREATE = 0x2
1558 XATTR_NODEFAULT = 0x10
1559 XATTR_NOFOLLOW = 0x1
1560 XATTR_NOSECURITY = 0x8
1561 XATTR_REPLACE = 0x4
1562 XATTR_SHOWCOMPRESSION = 0x20
14 AF_APPLETALK = 0x10
15 AF_CCITT = 0xa
16 AF_CHAOS = 0x5
17 AF_CNT = 0x15
18 AF_COIP = 0x14
19 AF_DATAKIT = 0x9
20 AF_DECnet = 0xc
21 AF_DLI = 0xd
22 AF_E164 = 0x1c
23 AF_ECMA = 0x8
24 AF_HYLINK = 0xf
25 AF_IEEE80211 = 0x25
26 AF_IMPLINK = 0x3
27 AF_INET = 0x2
28 AF_INET6 = 0x1e
29 AF_IPX = 0x17
30 AF_ISDN = 0x1c
31 AF_ISO = 0x7
32 AF_LAT = 0xe
33 AF_LINK = 0x12
34 AF_LOCAL = 0x1
35 AF_MAX = 0x29
36 AF_NATM = 0x1f
37 AF_NDRV = 0x1b
38 AF_NETBIOS = 0x21
39 AF_NS = 0x6
40 AF_OSI = 0x7
41 AF_PPP = 0x22
42 AF_PUP = 0x4
43 AF_RESERVED_36 = 0x24
44 AF_ROUTE = 0x11
45 AF_SIP = 0x18
46 AF_SNA = 0xb
47 AF_SYSTEM = 0x20
48 AF_SYS_CONTROL = 0x2
49 AF_UNIX = 0x1
50 AF_UNSPEC = 0x0
51 AF_UTUN = 0x26
52 AF_VSOCK = 0x28
53 ALTWERASE = 0x200
54 ATTR_BIT_MAP_COUNT = 0x5
55 ATTR_CMN_ACCESSMASK = 0x20000
56 ATTR_CMN_ACCTIME = 0x1000
57 ATTR_CMN_ADDEDTIME = 0x10000000
58 ATTR_CMN_BKUPTIME = 0x2000
59 ATTR_CMN_CHGTIME = 0x800
60 ATTR_CMN_CRTIME = 0x200
61 ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
62 ATTR_CMN_DEVID = 0x2
63 ATTR_CMN_DOCUMENT_ID = 0x100000
64 ATTR_CMN_ERROR = 0x20000000
65 ATTR_CMN_EXTENDED_SECURITY = 0x400000
66 ATTR_CMN_FILEID = 0x2000000
67 ATTR_CMN_FLAGS = 0x40000
68 ATTR_CMN_FNDRINFO = 0x4000
69 ATTR_CMN_FSID = 0x4
70 ATTR_CMN_FULLPATH = 0x8000000
71 ATTR_CMN_GEN_COUNT = 0x80000
72 ATTR_CMN_GRPID = 0x10000
73 ATTR_CMN_GRPUUID = 0x1000000
74 ATTR_CMN_MODTIME = 0x400
75 ATTR_CMN_NAME = 0x1
76 ATTR_CMN_NAMEDATTRCOUNT = 0x80000
77 ATTR_CMN_NAMEDATTRLIST = 0x100000
78 ATTR_CMN_OBJID = 0x20
79 ATTR_CMN_OBJPERMANENTID = 0x40
80 ATTR_CMN_OBJTAG = 0x10
81 ATTR_CMN_OBJTYPE = 0x8
82 ATTR_CMN_OWNERID = 0x8000
83 ATTR_CMN_PARENTID = 0x4000000
84 ATTR_CMN_PAROBJID = 0x80
85 ATTR_CMN_RETURNED_ATTRS = 0x80000000
86 ATTR_CMN_SCRIPT = 0x100
87 ATTR_CMN_SETMASK = 0x51c7ff00
88 ATTR_CMN_USERACCESS = 0x200000
89 ATTR_CMN_UUID = 0x800000
90 ATTR_CMN_VALIDMASK = 0xffffffff
91 ATTR_CMN_VOLSETMASK = 0x6700
92 ATTR_FILE_ALLOCSIZE = 0x4
93 ATTR_FILE_CLUMPSIZE = 0x10
94 ATTR_FILE_DATAALLOCSIZE = 0x400
95 ATTR_FILE_DATAEXTENTS = 0x800
96 ATTR_FILE_DATALENGTH = 0x200
97 ATTR_FILE_DEVTYPE = 0x20
98 ATTR_FILE_FILETYPE = 0x40
99 ATTR_FILE_FORKCOUNT = 0x80
100 ATTR_FILE_FORKLIST = 0x100
101 ATTR_FILE_IOBLOCKSIZE = 0x8
102 ATTR_FILE_LINKCOUNT = 0x1
103 ATTR_FILE_RSRCALLOCSIZE = 0x2000
104 ATTR_FILE_RSRCEXTENTS = 0x4000
105 ATTR_FILE_RSRCLENGTH = 0x1000
106 ATTR_FILE_SETMASK = 0x20
107 ATTR_FILE_TOTALSIZE = 0x2
108 ATTR_FILE_VALIDMASK = 0x37ff
109 ATTR_VOL_ALLOCATIONCLUMP = 0x40
110 ATTR_VOL_ATTRIBUTES = 0x40000000
111 ATTR_VOL_CAPABILITIES = 0x20000
112 ATTR_VOL_DIRCOUNT = 0x400
113 ATTR_VOL_ENCODINGSUSED = 0x10000
114 ATTR_VOL_FILECOUNT = 0x200
115 ATTR_VOL_FSTYPE = 0x1
116 ATTR_VOL_INFO = 0x80000000
117 ATTR_VOL_IOBLOCKSIZE = 0x80
118 ATTR_VOL_MAXOBJCOUNT = 0x800
119 ATTR_VOL_MINALLOCATION = 0x20
120 ATTR_VOL_MOUNTEDDEVICE = 0x8000
121 ATTR_VOL_MOUNTFLAGS = 0x4000
122 ATTR_VOL_MOUNTPOINT = 0x1000
123 ATTR_VOL_NAME = 0x2000
124 ATTR_VOL_OBJCOUNT = 0x100
125 ATTR_VOL_QUOTA_SIZE = 0x10000000
126 ATTR_VOL_RESERVED_SIZE = 0x20000000
127 ATTR_VOL_SETMASK = 0x80002000
128 ATTR_VOL_SIGNATURE = 0x2
129 ATTR_VOL_SIZE = 0x4
130 ATTR_VOL_SPACEAVAIL = 0x10
131 ATTR_VOL_SPACEFREE = 0x8
132 ATTR_VOL_SPACEUSED = 0x800000
133 ATTR_VOL_UUID = 0x40000
134 ATTR_VOL_VALIDMASK = 0xf087ffff
135 B0 = 0x0
136 B110 = 0x6e
137 B115200 = 0x1c200
138 B1200 = 0x4b0
139 B134 = 0x86
140 B14400 = 0x3840
141 B150 = 0x96
142 B1800 = 0x708
143 B19200 = 0x4b00
144 B200 = 0xc8
145 B230400 = 0x38400
146 B2400 = 0x960
147 B28800 = 0x7080
148 B300 = 0x12c
149 B38400 = 0x9600
150 B4800 = 0x12c0
151 B50 = 0x32
152 B57600 = 0xe100
153 B600 = 0x258
154 B7200 = 0x1c20
155 B75 = 0x4b
156 B76800 = 0x12c00
157 B9600 = 0x2580
158 BIOCFLUSH = 0x20004268
159 BIOCGBLEN = 0x40044266
160 BIOCGDLT = 0x4004426a
161 BIOCGDLTLIST = 0xc00c4279
162 BIOCGETIF = 0x4020426b
163 BIOCGHDRCMPLT = 0x40044274
164 BIOCGRSIG = 0x40044272
165 BIOCGRTIMEOUT = 0x4010426e
166 BIOCGSEESENT = 0x40044276
167 BIOCGSTATS = 0x4008426f
168 BIOCIMMEDIATE = 0x80044270
169 BIOCPROMISC = 0x20004269
170 BIOCSBLEN = 0xc0044266
171 BIOCSDLT = 0x80044278
172 BIOCSETF = 0x80104267
173 BIOCSETFNR = 0x8010427e
174 BIOCSETIF = 0x8020426c
175 BIOCSHDRCMPLT = 0x80044275
176 BIOCSRSIG = 0x80044273
177 BIOCSRTIMEOUT = 0x8010426d
178 BIOCSSEESENT = 0x80044277
179 BIOCVERSION = 0x40044271
180 BPF_A = 0x10
181 BPF_ABS = 0x20
182 BPF_ADD = 0x0
183 BPF_ALIGNMENT = 0x4
184 BPF_ALU = 0x4
185 BPF_AND = 0x50
186 BPF_B = 0x10
187 BPF_DIV = 0x30
188 BPF_H = 0x8
189 BPF_IMM = 0x0
190 BPF_IND = 0x40
191 BPF_JA = 0x0
192 BPF_JEQ = 0x10
193 BPF_JGE = 0x30
194 BPF_JGT = 0x20
195 BPF_JMP = 0x5
196 BPF_JSET = 0x40
197 BPF_K = 0x0
198 BPF_LD = 0x0
199 BPF_LDX = 0x1
200 BPF_LEN = 0x80
201 BPF_LSH = 0x60
202 BPF_MAJOR_VERSION = 0x1
203 BPF_MAXBUFSIZE = 0x80000
204 BPF_MAXINSNS = 0x200
205 BPF_MEM = 0x60
206 BPF_MEMWORDS = 0x10
207 BPF_MINBUFSIZE = 0x20
208 BPF_MINOR_VERSION = 0x1
209 BPF_MISC = 0x7
210 BPF_MSH = 0xa0
211 BPF_MUL = 0x20
212 BPF_NEG = 0x80
213 BPF_OR = 0x40
214 BPF_RELEASE = 0x30bb6
215 BPF_RET = 0x6
216 BPF_RSH = 0x70
217 BPF_ST = 0x2
218 BPF_STX = 0x3
219 BPF_SUB = 0x10
220 BPF_TAX = 0x0
221 BPF_TXA = 0x80
222 BPF_W = 0x0
223 BPF_X = 0x8
224 BRKINT = 0x2
225 BS0 = 0x0
226 BS1 = 0x8000
227 BSDLY = 0x8000
228 CFLUSH = 0xf
229 CLOCAL = 0x8000
230 CLOCK_MONOTONIC = 0x6
231 CLOCK_MONOTONIC_RAW = 0x4
232 CLOCK_MONOTONIC_RAW_APPROX = 0x5
233 CLOCK_PROCESS_CPUTIME_ID = 0xc
234 CLOCK_REALTIME = 0x0
235 CLOCK_THREAD_CPUTIME_ID = 0x10
236 CLOCK_UPTIME_RAW = 0x8
237 CLOCK_UPTIME_RAW_APPROX = 0x9
238 CLONE_NOFOLLOW = 0x1
239 CLONE_NOOWNERCOPY = 0x2
240 CR0 = 0x0
241 CR1 = 0x1000
242 CR2 = 0x2000
243 CR3 = 0x3000
244 CRDLY = 0x3000
245 CREAD = 0x800
246 CRTSCTS = 0x30000
247 CS5 = 0x0
248 CS6 = 0x100
249 CS7 = 0x200
250 CS8 = 0x300
251 CSIZE = 0x300
252 CSTART = 0x11
253 CSTATUS = 0x14
254 CSTOP = 0x13
255 CSTOPB = 0x400
256 CSUSP = 0x1a
257 CTLIOCGINFO = 0xc0644e03
258 CTL_HW = 0x6
259 CTL_KERN = 0x1
260 CTL_MAXNAME = 0xc
261 CTL_NET = 0x4
262 DLT_A429 = 0xb8
263 DLT_A653_ICM = 0xb9
264 DLT_AIRONET_HEADER = 0x78
265 DLT_AOS = 0xde
266 DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
267 DLT_ARCNET = 0x7
268 DLT_ARCNET_LINUX = 0x81
269 DLT_ATM_CLIP = 0x13
270 DLT_ATM_RFC1483 = 0xb
271 DLT_AURORA = 0x7e
272 DLT_AX25 = 0x3
273 DLT_AX25_KISS = 0xca
274 DLT_BACNET_MS_TP = 0xa5
275 DLT_BLUETOOTH_HCI_H4 = 0xbb
276 DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
277 DLT_CAN20B = 0xbe
278 DLT_CAN_SOCKETCAN = 0xe3
279 DLT_CHAOS = 0x5
280 DLT_CHDLC = 0x68
281 DLT_CISCO_IOS = 0x76
282 DLT_C_HDLC = 0x68
283 DLT_C_HDLC_WITH_DIR = 0xcd
284 DLT_DBUS = 0xe7
285 DLT_DECT = 0xdd
286 DLT_DOCSIS = 0x8f
287 DLT_DVB_CI = 0xeb
288 DLT_ECONET = 0x73
289 DLT_EN10MB = 0x1
290 DLT_EN3MB = 0x2
291 DLT_ENC = 0x6d
292 DLT_ERF = 0xc5
293 DLT_ERF_ETH = 0xaf
294 DLT_ERF_POS = 0xb0
295 DLT_FC_2 = 0xe0
296 DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
297 DLT_FDDI = 0xa
298 DLT_FLEXRAY = 0xd2
299 DLT_FRELAY = 0x6b
300 DLT_FRELAY_WITH_DIR = 0xce
301 DLT_GCOM_SERIAL = 0xad
302 DLT_GCOM_T1E1 = 0xac
303 DLT_GPF_F = 0xab
304 DLT_GPF_T = 0xaa
305 DLT_GPRS_LLC = 0xa9
306 DLT_GSMTAP_ABIS = 0xda
307 DLT_GSMTAP_UM = 0xd9
308 DLT_HHDLC = 0x79
309 DLT_IBM_SN = 0x92
310 DLT_IBM_SP = 0x91
311 DLT_IEEE802 = 0x6
312 DLT_IEEE802_11 = 0x69
313 DLT_IEEE802_11_RADIO = 0x7f
314 DLT_IEEE802_11_RADIO_AVS = 0xa3
315 DLT_IEEE802_15_4 = 0xc3
316 DLT_IEEE802_15_4_LINUX = 0xbf
317 DLT_IEEE802_15_4_NOFCS = 0xe6
318 DLT_IEEE802_15_4_NONASK_PHY = 0xd7
319 DLT_IEEE802_16_MAC_CPS = 0xbc
320 DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
321 DLT_IPFILTER = 0x74
322 DLT_IPMB = 0xc7
323 DLT_IPMB_LINUX = 0xd1
324 DLT_IPNET = 0xe2
325 DLT_IPOIB = 0xf2
326 DLT_IPV4 = 0xe4
327 DLT_IPV6 = 0xe5
328 DLT_IP_OVER_FC = 0x7a
329 DLT_JUNIPER_ATM1 = 0x89
330 DLT_JUNIPER_ATM2 = 0x87
331 DLT_JUNIPER_ATM_CEMIC = 0xee
332 DLT_JUNIPER_CHDLC = 0xb5
333 DLT_JUNIPER_ES = 0x84
334 DLT_JUNIPER_ETHER = 0xb2
335 DLT_JUNIPER_FIBRECHANNEL = 0xea
336 DLT_JUNIPER_FRELAY = 0xb4
337 DLT_JUNIPER_GGSN = 0x85
338 DLT_JUNIPER_ISM = 0xc2
339 DLT_JUNIPER_MFR = 0x86
340 DLT_JUNIPER_MLFR = 0x83
341 DLT_JUNIPER_MLPPP = 0x82
342 DLT_JUNIPER_MONITOR = 0xa4
343 DLT_JUNIPER_PIC_PEER = 0xae
344 DLT_JUNIPER_PPP = 0xb3
345 DLT_JUNIPER_PPPOE = 0xa7
346 DLT_JUNIPER_PPPOE_ATM = 0xa8
347 DLT_JUNIPER_SERVICES = 0x88
348 DLT_JUNIPER_SRX_E2E = 0xe9
349 DLT_JUNIPER_ST = 0xc8
350 DLT_JUNIPER_VP = 0xb7
351 DLT_JUNIPER_VS = 0xe8
352 DLT_LAPB_WITH_DIR = 0xcf
353 DLT_LAPD = 0xcb
354 DLT_LIN = 0xd4
355 DLT_LINUX_EVDEV = 0xd8
356 DLT_LINUX_IRDA = 0x90
357 DLT_LINUX_LAPD = 0xb1
358 DLT_LINUX_PPP_WITHDIRECTION = 0xa6
359 DLT_LINUX_SLL = 0x71
360 DLT_LOOP = 0x6c
361 DLT_LTALK = 0x72
362 DLT_MATCHING_MAX = 0x10a
363 DLT_MATCHING_MIN = 0x68
364 DLT_MFR = 0xb6
365 DLT_MOST = 0xd3
366 DLT_MPEG_2_TS = 0xf3
367 DLT_MPLS = 0xdb
368 DLT_MTP2 = 0x8c
369 DLT_MTP2_WITH_PHDR = 0x8b
370 DLT_MTP3 = 0x8d
371 DLT_MUX27010 = 0xec
372 DLT_NETANALYZER = 0xf0
373 DLT_NETANALYZER_TRANSPARENT = 0xf1
374 DLT_NFC_LLCP = 0xf5
375 DLT_NFLOG = 0xef
376 DLT_NG40 = 0xf4
377 DLT_NULL = 0x0
378 DLT_PCI_EXP = 0x7d
379 DLT_PFLOG = 0x75
380 DLT_PFSYNC = 0x12
381 DLT_PPI = 0xc0
382 DLT_PPP = 0x9
383 DLT_PPP_BSDOS = 0x10
384 DLT_PPP_ETHER = 0x33
385 DLT_PPP_PPPD = 0xa6
386 DLT_PPP_SERIAL = 0x32
387 DLT_PPP_WITH_DIR = 0xcc
388 DLT_PPP_WITH_DIRECTION = 0xa6
389 DLT_PRISM_HEADER = 0x77
390 DLT_PRONET = 0x4
391 DLT_RAIF1 = 0xc6
392 DLT_RAW = 0xc
393 DLT_RIO = 0x7c
394 DLT_SCCP = 0x8e
395 DLT_SITA = 0xc4
396 DLT_SLIP = 0x8
397 DLT_SLIP_BSDOS = 0xf
398 DLT_STANAG_5066_D_PDU = 0xed
399 DLT_SUNATM = 0x7b
400 DLT_SYMANTEC_FIREWALL = 0x63
401 DLT_TZSP = 0x80
402 DLT_USB = 0xba
403 DLT_USB_DARWIN = 0x10a
404 DLT_USB_LINUX = 0xbd
405 DLT_USB_LINUX_MMAPPED = 0xdc
406 DLT_USER0 = 0x93
407 DLT_USER1 = 0x94
408 DLT_USER10 = 0x9d
409 DLT_USER11 = 0x9e
410 DLT_USER12 = 0x9f
411 DLT_USER13 = 0xa0
412 DLT_USER14 = 0xa1
413 DLT_USER15 = 0xa2
414 DLT_USER2 = 0x95
415 DLT_USER3 = 0x96
416 DLT_USER4 = 0x97
417 DLT_USER5 = 0x98
418 DLT_USER6 = 0x99
419 DLT_USER7 = 0x9a
420 DLT_USER8 = 0x9b
421 DLT_USER9 = 0x9c
422 DLT_WIHART = 0xdf
423 DLT_X2E_SERIAL = 0xd5
424 DLT_X2E_XORAYA = 0xd6
425 DT_BLK = 0x6
426 DT_CHR = 0x2
427 DT_DIR = 0x4
428 DT_FIFO = 0x1
429 DT_LNK = 0xa
430 DT_REG = 0x8
431 DT_SOCK = 0xc
432 DT_UNKNOWN = 0x0
433 DT_WHT = 0xe
434 ECHO = 0x8
435 ECHOCTL = 0x40
436 ECHOE = 0x2
437 ECHOK = 0x4
438 ECHOKE = 0x1
439 ECHONL = 0x10
440 ECHOPRT = 0x20
441 EVFILT_AIO = -0x3
442 EVFILT_EXCEPT = -0xf
443 EVFILT_FS = -0x9
444 EVFILT_MACHPORT = -0x8
445 EVFILT_PROC = -0x5
446 EVFILT_READ = -0x1
447 EVFILT_SIGNAL = -0x6
448 EVFILT_SYSCOUNT = 0x11
449 EVFILT_THREADMARKER = 0x11
450 EVFILT_TIMER = -0x7
451 EVFILT_USER = -0xa
452 EVFILT_VM = -0xc
453 EVFILT_VNODE = -0x4
454 EVFILT_WRITE = -0x2
455 EV_ADD = 0x1
456 EV_CLEAR = 0x20
457 EV_DELETE = 0x2
458 EV_DISABLE = 0x8
459 EV_DISPATCH = 0x80
460 EV_DISPATCH2 = 0x180
461 EV_ENABLE = 0x4
462 EV_EOF = 0x8000
463 EV_ERROR = 0x4000
464 EV_FLAG0 = 0x1000
465 EV_FLAG1 = 0x2000
466 EV_ONESHOT = 0x10
467 EV_OOBAND = 0x2000
468 EV_POLL = 0x1000
469 EV_RECEIPT = 0x40
470 EV_SYSFLAGS = 0xf000
471 EV_UDATA_SPECIFIC = 0x100
472 EV_VANISHED = 0x200
473 EXTA = 0x4b00
474 EXTB = 0x9600
475 EXTPROC = 0x800
476 FD_CLOEXEC = 0x1
477 FD_SETSIZE = 0x400
478 FF0 = 0x0
479 FF1 = 0x4000
480 FFDLY = 0x4000
481 FLUSHO = 0x800000
482 FSOPT_ATTR_CMN_EXTENDED = 0x20
483 FSOPT_NOFOLLOW = 0x1
484 FSOPT_NOINMEMUPDATE = 0x2
485 FSOPT_PACK_INVAL_ATTRS = 0x8
486 FSOPT_REPORT_FULLSIZE = 0x4
487 FSOPT_RETURN_REALDEV = 0x200
488 F_ADDFILESIGS = 0x3d
489 F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
490 F_ADDFILESIGS_INFO = 0x67
491 F_ADDFILESIGS_RETURN = 0x61
492 F_ADDFILESUPPL = 0x68
493 F_ADDSIGS = 0x3b
494 F_ALLOCATEALL = 0x4
495 F_ALLOCATECONTIG = 0x2
496 F_BARRIERFSYNC = 0x55
497 F_CHECK_LV = 0x62
498 F_CHKCLEAN = 0x29
499 F_DUPFD = 0x0
500 F_DUPFD_CLOEXEC = 0x43
501 F_FINDSIGS = 0x4e
502 F_FLUSH_DATA = 0x28
503 F_FREEZE_FS = 0x35
504 F_FULLFSYNC = 0x33
505 F_GETCODEDIR = 0x48
506 F_GETFD = 0x1
507 F_GETFL = 0x3
508 F_GETLK = 0x7
509 F_GETLKPID = 0x42
510 F_GETNOSIGPIPE = 0x4a
511 F_GETOWN = 0x5
512 F_GETPATH = 0x32
513 F_GETPATH_MTMINFO = 0x47
514 F_GETPATH_NOFIRMLINK = 0x66
515 F_GETPROTECTIONCLASS = 0x3f
516 F_GETPROTECTIONLEVEL = 0x4d
517 F_GETSIGSINFO = 0x69
518 F_GLOBAL_NOCACHE = 0x37
519 F_LOG2PHYS = 0x31
520 F_LOG2PHYS_EXT = 0x41
521 F_NOCACHE = 0x30
522 F_NODIRECT = 0x3e
523 F_OK = 0x0
524 F_PATHPKG_CHECK = 0x34
525 F_PEOFPOSMODE = 0x3
526 F_PREALLOCATE = 0x2a
527 F_PUNCHHOLE = 0x63
528 F_RDADVISE = 0x2c
529 F_RDAHEAD = 0x2d
530 F_RDLCK = 0x1
531 F_SETBACKINGSTORE = 0x46
532 F_SETFD = 0x2
533 F_SETFL = 0x4
534 F_SETLK = 0x8
535 F_SETLKW = 0x9
536 F_SETLKWTIMEOUT = 0xa
537 F_SETNOSIGPIPE = 0x49
538 F_SETOWN = 0x6
539 F_SETPROTECTIONCLASS = 0x40
540 F_SETSIZE = 0x2b
541 F_SINGLE_WRITER = 0x4c
542 F_SPECULATIVE_READ = 0x65
543 F_THAW_FS = 0x36
544 F_TRANSCODEKEY = 0x4b
545 F_TRIM_ACTIVE_FILE = 0x64
546 F_UNLCK = 0x2
547 F_VOLPOSMODE = 0x4
548 F_WRLCK = 0x3
549 HUPCL = 0x4000
550 HW_MACHINE = 0x1
551 ICANON = 0x100
552 ICMP6_FILTER = 0x12
553 ICRNL = 0x100
554 IEXTEN = 0x400
555 IFF_ALLMULTI = 0x200
556 IFF_ALTPHYS = 0x4000
557 IFF_BROADCAST = 0x2
558 IFF_DEBUG = 0x4
559 IFF_LINK0 = 0x1000
560 IFF_LINK1 = 0x2000
561 IFF_LINK2 = 0x4000
562 IFF_LOOPBACK = 0x8
563 IFF_MULTICAST = 0x8000
564 IFF_NOARP = 0x80
565 IFF_NOTRAILERS = 0x20
566 IFF_OACTIVE = 0x400
567 IFF_POINTOPOINT = 0x10
568 IFF_PROMISC = 0x100
569 IFF_RUNNING = 0x40
570 IFF_SIMPLEX = 0x800
571 IFF_UP = 0x1
572 IFNAMSIZ = 0x10
573 IFT_1822 = 0x2
574 IFT_6LOWPAN = 0x40
575 IFT_AAL5 = 0x31
576 IFT_ARCNET = 0x23
577 IFT_ARCNETPLUS = 0x24
578 IFT_ATM = 0x25
579 IFT_BRIDGE = 0xd1
580 IFT_CARP = 0xf8
581 IFT_CELLULAR = 0xff
582 IFT_CEPT = 0x13
583 IFT_DS3 = 0x1e
584 IFT_ENC = 0xf4
585 IFT_EON = 0x19
586 IFT_ETHER = 0x6
587 IFT_FAITH = 0x38
588 IFT_FDDI = 0xf
589 IFT_FRELAY = 0x20
590 IFT_FRELAYDCE = 0x2c
591 IFT_GIF = 0x37
592 IFT_HDH1822 = 0x3
593 IFT_HIPPI = 0x2f
594 IFT_HSSI = 0x2e
595 IFT_HY = 0xe
596 IFT_IEEE1394 = 0x90
597 IFT_IEEE8023ADLAG = 0x88
598 IFT_ISDNBASIC = 0x14
599 IFT_ISDNPRIMARY = 0x15
600 IFT_ISO88022LLC = 0x29
601 IFT_ISO88023 = 0x7
602 IFT_ISO88024 = 0x8
603 IFT_ISO88025 = 0x9
604 IFT_ISO88026 = 0xa
605 IFT_L2VLAN = 0x87
606 IFT_LAPB = 0x10
607 IFT_LOCALTALK = 0x2a
608 IFT_LOOP = 0x18
609 IFT_MIOX25 = 0x26
610 IFT_MODEM = 0x30
611 IFT_NSIP = 0x1b
612 IFT_OTHER = 0x1
613 IFT_P10 = 0xc
614 IFT_P80 = 0xd
615 IFT_PARA = 0x22
616 IFT_PDP = 0xff
617 IFT_PFLOG = 0xf5
618 IFT_PFSYNC = 0xf6
619 IFT_PKTAP = 0xfe
620 IFT_PPP = 0x17
621 IFT_PROPMUX = 0x36
622 IFT_PROPVIRTUAL = 0x35
623 IFT_PTPSERIAL = 0x16
624 IFT_RS232 = 0x21
625 IFT_SDLC = 0x11
626 IFT_SIP = 0x1f
627 IFT_SLIP = 0x1c
628 IFT_SMDSDXI = 0x2b
629 IFT_SMDSICIP = 0x34
630 IFT_SONET = 0x27
631 IFT_SONETPATH = 0x32
632 IFT_SONETVT = 0x33
633 IFT_STARLAN = 0xb
634 IFT_STF = 0x39
635 IFT_T1 = 0x12
636 IFT_ULTRA = 0x1d
637 IFT_V35 = 0x2d
638 IFT_X25 = 0x5
639 IFT_X25DDN = 0x4
640 IFT_X25PLE = 0x28
641 IFT_XETHER = 0x1a
642 IGNBRK = 0x1
643 IGNCR = 0x80
644 IGNPAR = 0x4
645 IMAXBEL = 0x2000
646 INLCR = 0x40
647 INPCK = 0x10
648 IN_CLASSA_HOST = 0xffffff
649 IN_CLASSA_MAX = 0x80
650 IN_CLASSA_NET = 0xff000000
651 IN_CLASSA_NSHIFT = 0x18
652 IN_CLASSB_HOST = 0xffff
653 IN_CLASSB_MAX = 0x10000
654 IN_CLASSB_NET = 0xffff0000
655 IN_CLASSB_NSHIFT = 0x10
656 IN_CLASSC_HOST = 0xff
657 IN_CLASSC_NET = 0xffffff00
658 IN_CLASSC_NSHIFT = 0x8
659 IN_CLASSD_HOST = 0xfffffff
660 IN_CLASSD_NET = 0xf0000000
661 IN_CLASSD_NSHIFT = 0x1c
662 IN_LINKLOCALNETNUM = 0xa9fe0000
663 IN_LOOPBACKNET = 0x7f
664 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1
665 IPPROTO_3PC = 0x22
666 IPPROTO_ADFS = 0x44
667 IPPROTO_AH = 0x33
668 IPPROTO_AHIP = 0x3d
669 IPPROTO_APES = 0x63
670 IPPROTO_ARGUS = 0xd
671 IPPROTO_AX25 = 0x5d
672 IPPROTO_BHA = 0x31
673 IPPROTO_BLT = 0x1e
674 IPPROTO_BRSATMON = 0x4c
675 IPPROTO_CFTP = 0x3e
676 IPPROTO_CHAOS = 0x10
677 IPPROTO_CMTP = 0x26
678 IPPROTO_CPHB = 0x49
679 IPPROTO_CPNX = 0x48
680 IPPROTO_DDP = 0x25
681 IPPROTO_DGP = 0x56
682 IPPROTO_DIVERT = 0xfe
683 IPPROTO_DONE = 0x101
684 IPPROTO_DSTOPTS = 0x3c
685 IPPROTO_EGP = 0x8
686 IPPROTO_EMCON = 0xe
687 IPPROTO_ENCAP = 0x62
688 IPPROTO_EON = 0x50
689 IPPROTO_ESP = 0x32
690 IPPROTO_ETHERIP = 0x61
691 IPPROTO_FRAGMENT = 0x2c
692 IPPROTO_GGP = 0x3
693 IPPROTO_GMTP = 0x64
694 IPPROTO_GRE = 0x2f
695 IPPROTO_HELLO = 0x3f
696 IPPROTO_HMP = 0x14
697 IPPROTO_HOPOPTS = 0x0
698 IPPROTO_ICMP = 0x1
699 IPPROTO_ICMPV6 = 0x3a
700 IPPROTO_IDP = 0x16
701 IPPROTO_IDPR = 0x23
702 IPPROTO_IDRP = 0x2d
703 IPPROTO_IGMP = 0x2
704 IPPROTO_IGP = 0x55
705 IPPROTO_IGRP = 0x58
706 IPPROTO_IL = 0x28
707 IPPROTO_INLSP = 0x34
708 IPPROTO_INP = 0x20
709 IPPROTO_IP = 0x0
710 IPPROTO_IPCOMP = 0x6c
711 IPPROTO_IPCV = 0x47
712 IPPROTO_IPEIP = 0x5e
713 IPPROTO_IPIP = 0x4
714 IPPROTO_IPPC = 0x43
715 IPPROTO_IPV4 = 0x4
716 IPPROTO_IPV6 = 0x29
717 IPPROTO_IRTP = 0x1c
718 IPPROTO_KRYPTOLAN = 0x41
719 IPPROTO_LARP = 0x5b
720 IPPROTO_LEAF1 = 0x19
721 IPPROTO_LEAF2 = 0x1a
722 IPPROTO_MAX = 0x100
723 IPPROTO_MAXID = 0x34
724 IPPROTO_MEAS = 0x13
725 IPPROTO_MHRP = 0x30
726 IPPROTO_MICP = 0x5f
727 IPPROTO_MTP = 0x5c
728 IPPROTO_MUX = 0x12
729 IPPROTO_ND = 0x4d
730 IPPROTO_NHRP = 0x36
731 IPPROTO_NONE = 0x3b
732 IPPROTO_NSP = 0x1f
733 IPPROTO_NVPII = 0xb
734 IPPROTO_OSPFIGP = 0x59
735 IPPROTO_PGM = 0x71
736 IPPROTO_PIGP = 0x9
737 IPPROTO_PIM = 0x67
738 IPPROTO_PRM = 0x15
739 IPPROTO_PUP = 0xc
740 IPPROTO_PVP = 0x4b
741 IPPROTO_RAW = 0xff
742 IPPROTO_RCCMON = 0xa
743 IPPROTO_RDP = 0x1b
744 IPPROTO_ROUTING = 0x2b
745 IPPROTO_RSVP = 0x2e
746 IPPROTO_RVD = 0x42
747 IPPROTO_SATEXPAK = 0x40
748 IPPROTO_SATMON = 0x45
749 IPPROTO_SCCSP = 0x60
750 IPPROTO_SCTP = 0x84
751 IPPROTO_SDRP = 0x2a
752 IPPROTO_SEP = 0x21
753 IPPROTO_SRPC = 0x5a
754 IPPROTO_ST = 0x7
755 IPPROTO_SVMTP = 0x52
756 IPPROTO_SWIPE = 0x35
757 IPPROTO_TCF = 0x57
758 IPPROTO_TCP = 0x6
759 IPPROTO_TP = 0x1d
760 IPPROTO_TPXX = 0x27
761 IPPROTO_TRUNK1 = 0x17
762 IPPROTO_TRUNK2 = 0x18
763 IPPROTO_TTP = 0x54
764 IPPROTO_UDP = 0x11
765 IPPROTO_VINES = 0x53
766 IPPROTO_VISA = 0x46
767 IPPROTO_VMTP = 0x51
768 IPPROTO_WBEXPAK = 0x4f
769 IPPROTO_WBMON = 0x4e
770 IPPROTO_WSN = 0x4a
771 IPPROTO_XNET = 0xf
772 IPPROTO_XTP = 0x24
773 IPV6_2292DSTOPTS = 0x17
774 IPV6_2292HOPLIMIT = 0x14
775 IPV6_2292HOPOPTS = 0x16
776 IPV6_2292NEXTHOP = 0x15
777 IPV6_2292PKTINFO = 0x13
778 IPV6_2292PKTOPTIONS = 0x19
779 IPV6_2292RTHDR = 0x18
780 IPV6_3542DSTOPTS = 0x32
781 IPV6_3542HOPLIMIT = 0x2f
782 IPV6_3542HOPOPTS = 0x31
783 IPV6_3542NEXTHOP = 0x30
784 IPV6_3542PKTINFO = 0x2e
785 IPV6_3542RTHDR = 0x33
786 IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
787 IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
788 IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
789 IPV6_AUTOFLOWLABEL = 0x3b
790 IPV6_BINDV6ONLY = 0x1b
791 IPV6_BOUND_IF = 0x7d
792 IPV6_CHECKSUM = 0x1a
793 IPV6_DEFAULT_MULTICAST_HOPS = 0x1
794 IPV6_DEFAULT_MULTICAST_LOOP = 0x1
795 IPV6_DEFHLIM = 0x40
796 IPV6_DONTFRAG = 0x3e
797 IPV6_DSTOPTS = 0x32
798 IPV6_FAITH = 0x1d
799 IPV6_FLOWINFO_MASK = 0xffffff0f
800 IPV6_FLOWLABEL_MASK = 0xffff0f00
801 IPV6_FLOW_ECN_MASK = 0x3000
802 IPV6_FRAGTTL = 0x3c
803 IPV6_FW_ADD = 0x1e
804 IPV6_FW_DEL = 0x1f
805 IPV6_FW_FLUSH = 0x20
806 IPV6_FW_GET = 0x22
807 IPV6_FW_ZERO = 0x21
808 IPV6_HLIMDEC = 0x1
809 IPV6_HOPLIMIT = 0x2f
810 IPV6_HOPOPTS = 0x31
811 IPV6_IPSEC_POLICY = 0x1c
812 IPV6_JOIN_GROUP = 0xc
813 IPV6_LEAVE_GROUP = 0xd
814 IPV6_MAXHLIM = 0xff
815 IPV6_MAXOPTHDR = 0x800
816 IPV6_MAXPACKET = 0xffff
817 IPV6_MAX_GROUP_SRC_FILTER = 0x200
818 IPV6_MAX_MEMBERSHIPS = 0xfff
819 IPV6_MAX_SOCK_SRC_FILTER = 0x80
820 IPV6_MIN_MEMBERSHIPS = 0x1f
821 IPV6_MMTU = 0x500
822 IPV6_MSFILTER = 0x4a
823 IPV6_MULTICAST_HOPS = 0xa
824 IPV6_MULTICAST_IF = 0x9
825 IPV6_MULTICAST_LOOP = 0xb
826 IPV6_NEXTHOP = 0x30
827 IPV6_PATHMTU = 0x2c
828 IPV6_PKTINFO = 0x2e
829 IPV6_PORTRANGE = 0xe
830 IPV6_PORTRANGE_DEFAULT = 0x0
831 IPV6_PORTRANGE_HIGH = 0x1
832 IPV6_PORTRANGE_LOW = 0x2
833 IPV6_PREFER_TEMPADDR = 0x3f
834 IPV6_RECVDSTOPTS = 0x28
835 IPV6_RECVHOPLIMIT = 0x25
836 IPV6_RECVHOPOPTS = 0x27
837 IPV6_RECVPATHMTU = 0x2b
838 IPV6_RECVPKTINFO = 0x3d
839 IPV6_RECVRTHDR = 0x26
840 IPV6_RECVTCLASS = 0x23
841 IPV6_RTHDR = 0x33
842 IPV6_RTHDRDSTOPTS = 0x39
843 IPV6_RTHDR_LOOSE = 0x0
844 IPV6_RTHDR_STRICT = 0x1
845 IPV6_RTHDR_TYPE_0 = 0x0
846 IPV6_SOCKOPT_RESERVED1 = 0x3
847 IPV6_TCLASS = 0x24
848 IPV6_UNICAST_HOPS = 0x4
849 IPV6_USE_MIN_MTU = 0x2a
850 IPV6_V6ONLY = 0x1b
851 IPV6_VERSION = 0x60
852 IPV6_VERSION_MASK = 0xf0
853 IP_ADD_MEMBERSHIP = 0xc
854 IP_ADD_SOURCE_MEMBERSHIP = 0x46
855 IP_BLOCK_SOURCE = 0x48
856 IP_BOUND_IF = 0x19
857 IP_DEFAULT_MULTICAST_LOOP = 0x1
858 IP_DEFAULT_MULTICAST_TTL = 0x1
859 IP_DF = 0x4000
860 IP_DONTFRAG = 0x1c
861 IP_DROP_MEMBERSHIP = 0xd
862 IP_DROP_SOURCE_MEMBERSHIP = 0x47
863 IP_DUMMYNET_CONFIGURE = 0x3c
864 IP_DUMMYNET_DEL = 0x3d
865 IP_DUMMYNET_FLUSH = 0x3e
866 IP_DUMMYNET_GET = 0x40
867 IP_FAITH = 0x16
868 IP_FW_ADD = 0x28
869 IP_FW_DEL = 0x29
870 IP_FW_FLUSH = 0x2a
871 IP_FW_GET = 0x2c
872 IP_FW_RESETLOG = 0x2d
873 IP_FW_ZERO = 0x2b
874 IP_HDRINCL = 0x2
875 IP_IPSEC_POLICY = 0x15
876 IP_MAXPACKET = 0xffff
877 IP_MAX_GROUP_SRC_FILTER = 0x200
878 IP_MAX_MEMBERSHIPS = 0xfff
879 IP_MAX_SOCK_MUTE_FILTER = 0x80
880 IP_MAX_SOCK_SRC_FILTER = 0x80
881 IP_MF = 0x2000
882 IP_MIN_MEMBERSHIPS = 0x1f
883 IP_MSFILTER = 0x4a
884 IP_MSS = 0x240
885 IP_MULTICAST_IF = 0x9
886 IP_MULTICAST_IFINDEX = 0x42
887 IP_MULTICAST_LOOP = 0xb
888 IP_MULTICAST_TTL = 0xa
889 IP_MULTICAST_VIF = 0xe
890 IP_NAT__XXX = 0x37
891 IP_OFFMASK = 0x1fff
892 IP_OLD_FW_ADD = 0x32
893 IP_OLD_FW_DEL = 0x33
894 IP_OLD_FW_FLUSH = 0x34
895 IP_OLD_FW_GET = 0x36
896 IP_OLD_FW_RESETLOG = 0x38
897 IP_OLD_FW_ZERO = 0x35
898 IP_OPTIONS = 0x1
899 IP_PKTINFO = 0x1a
900 IP_PORTRANGE = 0x13
901 IP_PORTRANGE_DEFAULT = 0x0
902 IP_PORTRANGE_HIGH = 0x1
903 IP_PORTRANGE_LOW = 0x2
904 IP_RECVDSTADDR = 0x7
905 IP_RECVIF = 0x14
906 IP_RECVOPTS = 0x5
907 IP_RECVPKTINFO = 0x1a
908 IP_RECVRETOPTS = 0x6
909 IP_RECVTOS = 0x1b
910 IP_RECVTTL = 0x18
911 IP_RETOPTS = 0x8
912 IP_RF = 0x8000
913 IP_RSVP_OFF = 0x10
914 IP_RSVP_ON = 0xf
915 IP_RSVP_VIF_OFF = 0x12
916 IP_RSVP_VIF_ON = 0x11
917 IP_STRIPHDR = 0x17
918 IP_TOS = 0x3
919 IP_TRAFFIC_MGT_BACKGROUND = 0x41
920 IP_TTL = 0x4
921 IP_UNBLOCK_SOURCE = 0x49
922 ISIG = 0x80
923 ISTRIP = 0x20
924 IUTF8 = 0x4000
925 IXANY = 0x800
926 IXOFF = 0x400
927 IXON = 0x200
928 KERN_HOSTNAME = 0xa
929 KERN_OSRELEASE = 0x2
930 KERN_OSTYPE = 0x1
931 KERN_VERSION = 0x4
932 LOCAL_PEERCRED = 0x1
933 LOCAL_PEEREPID = 0x3
934 LOCAL_PEEREUUID = 0x5
935 LOCAL_PEERPID = 0x2
936 LOCAL_PEERTOKEN = 0x6
937 LOCAL_PEERUUID = 0x4
938 LOCK_EX = 0x2
939 LOCK_NB = 0x4
940 LOCK_SH = 0x1
941 LOCK_UN = 0x8
942 MADV_CAN_REUSE = 0x9
943 MADV_DONTNEED = 0x4
944 MADV_FREE = 0x5
945 MADV_FREE_REUSABLE = 0x7
946 MADV_FREE_REUSE = 0x8
947 MADV_NORMAL = 0x0
948 MADV_PAGEOUT = 0xa
949 MADV_RANDOM = 0x1
950 MADV_SEQUENTIAL = 0x2
951 MADV_WILLNEED = 0x3
952 MADV_ZERO_WIRED_PAGES = 0x6
953 MAP_32BIT = 0x8000
954 MAP_ANON = 0x1000
955 MAP_ANONYMOUS = 0x1000
956 MAP_COPY = 0x2
957 MAP_FILE = 0x0
958 MAP_FIXED = 0x10
959 MAP_HASSEMAPHORE = 0x200
960 MAP_JIT = 0x800
961 MAP_NOCACHE = 0x400
962 MAP_NOEXTEND = 0x100
963 MAP_NORESERVE = 0x40
964 MAP_PRIVATE = 0x2
965 MAP_RENAME = 0x20
966 MAP_RESERVED0080 = 0x80
967 MAP_RESILIENT_CODESIGN = 0x2000
968 MAP_RESILIENT_MEDIA = 0x4000
969 MAP_SHARED = 0x1
970 MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000
971 MAP_UNIX03 = 0x40000
972 MCAST_BLOCK_SOURCE = 0x54
973 MCAST_EXCLUDE = 0x2
974 MCAST_INCLUDE = 0x1
975 MCAST_JOIN_GROUP = 0x50
976 MCAST_JOIN_SOURCE_GROUP = 0x52
977 MCAST_LEAVE_GROUP = 0x51
978 MCAST_LEAVE_SOURCE_GROUP = 0x53
979 MCAST_UNBLOCK_SOURCE = 0x55
980 MCAST_UNDEFINED = 0x0
981 MCL_CURRENT = 0x1
982 MCL_FUTURE = 0x2
983 MNT_ASYNC = 0x40
984 MNT_AUTOMOUNTED = 0x400000
985 MNT_CMDFLAGS = 0xf0000
986 MNT_CPROTECT = 0x80
987 MNT_DEFWRITE = 0x2000000
988 MNT_DONTBROWSE = 0x100000
989 MNT_DOVOLFS = 0x8000
990 MNT_DWAIT = 0x4
991 MNT_EXPORTED = 0x100
992 MNT_EXT_ROOT_DATA_VOL = 0x1
993 MNT_FORCE = 0x80000
994 MNT_IGNORE_OWNERSHIP = 0x200000
995 MNT_JOURNALED = 0x800000
996 MNT_LOCAL = 0x1000
997 MNT_MULTILABEL = 0x4000000
998 MNT_NOATIME = 0x10000000
999 MNT_NOBLOCK = 0x20000
1000 MNT_NODEV = 0x10
1001 MNT_NOEXEC = 0x4
1002 MNT_NOSUID = 0x8
1003 MNT_NOUSERXATTR = 0x1000000
1004 MNT_NOWAIT = 0x2
1005 MNT_QUARANTINE = 0x400
1006 MNT_QUOTA = 0x2000
1007 MNT_RDONLY = 0x1
1008 MNT_RELOAD = 0x40000
1009 MNT_REMOVABLE = 0x200
1010 MNT_ROOTFS = 0x4000
1011 MNT_SNAPSHOT = 0x40000000
1012 MNT_STRICTATIME = 0x80000000
1013 MNT_SYNCHRONOUS = 0x2
1014 MNT_UNION = 0x20
1015 MNT_UNKNOWNPERMISSIONS = 0x200000
1016 MNT_UPDATE = 0x10000
1017 MNT_VISFLAGMASK = 0xd7f0f7ff
1018 MNT_WAIT = 0x1
1019 MSG_CTRUNC = 0x20
1020 MSG_DONTROUTE = 0x4
1021 MSG_DONTWAIT = 0x80
1022 MSG_EOF = 0x100
1023 MSG_EOR = 0x8
1024 MSG_FLUSH = 0x400
1025 MSG_HAVEMORE = 0x2000
1026 MSG_HOLD = 0x800
1027 MSG_NEEDSA = 0x10000
1028 MSG_NOSIGNAL = 0x80000
1029 MSG_OOB = 0x1
1030 MSG_PEEK = 0x2
1031 MSG_RCVMORE = 0x4000
1032 MSG_SEND = 0x1000
1033 MSG_TRUNC = 0x10
1034 MSG_WAITALL = 0x40
1035 MSG_WAITSTREAM = 0x200
1036 MS_ASYNC = 0x1
1037 MS_DEACTIVATE = 0x8
1038 MS_INVALIDATE = 0x2
1039 MS_KILLPAGES = 0x4
1040 MS_SYNC = 0x10
1041 NAME_MAX = 0xff
1042 NET_RT_DUMP = 0x1
1043 NET_RT_DUMP2 = 0x7
1044 NET_RT_FLAGS = 0x2
1045 NET_RT_FLAGS_PRIV = 0xa
1046 NET_RT_IFLIST = 0x3
1047 NET_RT_IFLIST2 = 0x6
1048 NET_RT_MAXID = 0xb
1049 NET_RT_STAT = 0x4
1050 NET_RT_TRASH = 0x5
1051 NFDBITS = 0x20
1052 NL0 = 0x0
1053 NL1 = 0x100
1054 NL2 = 0x200
1055 NL3 = 0x300
1056 NLDLY = 0x300
1057 NOFLSH = 0x80000000
1058 NOKERNINFO = 0x2000000
1059 NOTE_ABSOLUTE = 0x8
1060 NOTE_ATTRIB = 0x8
1061 NOTE_BACKGROUND = 0x40
1062 NOTE_CHILD = 0x4
1063 NOTE_CRITICAL = 0x20
1064 NOTE_DELETE = 0x1
1065 NOTE_EXEC = 0x20000000
1066 NOTE_EXIT = 0x80000000
1067 NOTE_EXITSTATUS = 0x4000000
1068 NOTE_EXIT_CSERROR = 0x40000
1069 NOTE_EXIT_DECRYPTFAIL = 0x10000
1070 NOTE_EXIT_DETAIL = 0x2000000
1071 NOTE_EXIT_DETAIL_MASK = 0x70000
1072 NOTE_EXIT_MEMORY = 0x20000
1073 NOTE_EXIT_REPARENTED = 0x80000
1074 NOTE_EXTEND = 0x4
1075 NOTE_FFAND = 0x40000000
1076 NOTE_FFCOPY = 0xc0000000
1077 NOTE_FFCTRLMASK = 0xc0000000
1078 NOTE_FFLAGSMASK = 0xffffff
1079 NOTE_FFNOP = 0x0
1080 NOTE_FFOR = 0x80000000
1081 NOTE_FORK = 0x40000000
1082 NOTE_FUNLOCK = 0x100
1083 NOTE_LEEWAY = 0x10
1084 NOTE_LINK = 0x10
1085 NOTE_LOWAT = 0x1
1086 NOTE_MACHTIME = 0x100
1087 NOTE_MACH_CONTINUOUS_TIME = 0x80
1088 NOTE_NONE = 0x80
1089 NOTE_NSECONDS = 0x4
1090 NOTE_OOB = 0x2
1091 NOTE_PCTRLMASK = -0x100000
1092 NOTE_PDATAMASK = 0xfffff
1093 NOTE_REAP = 0x10000000
1094 NOTE_RENAME = 0x20
1095 NOTE_REVOKE = 0x40
1096 NOTE_SECONDS = 0x1
1097 NOTE_SIGNAL = 0x8000000
1098 NOTE_TRACK = 0x1
1099 NOTE_TRACKERR = 0x2
1100 NOTE_TRIGGER = 0x1000000
1101 NOTE_USECONDS = 0x2
1102 NOTE_VM_ERROR = 0x10000000
1103 NOTE_VM_PRESSURE = 0x80000000
1104 NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
1105 NOTE_VM_PRESSURE_TERMINATE = 0x40000000
1106 NOTE_WRITE = 0x2
1107 OCRNL = 0x10
1108 OFDEL = 0x20000
1109 OFILL = 0x80
1110 ONLCR = 0x2
1111 ONLRET = 0x40
1112 ONOCR = 0x20
1113 ONOEOT = 0x8
1114 OPOST = 0x1
1115 OXTABS = 0x4
1116 O_ACCMODE = 0x3
1117 O_ALERT = 0x20000000
1118 O_APPEND = 0x8
1119 O_ASYNC = 0x40
1120 O_CLOEXEC = 0x1000000
1121 O_CREAT = 0x200
1122 O_DIRECTORY = 0x100000
1123 O_DP_GETRAWENCRYPTED = 0x1
1124 O_DP_GETRAWUNENCRYPTED = 0x2
1125 O_DSYNC = 0x400000
1126 O_EVTONLY = 0x8000
1127 O_EXCL = 0x800
1128 O_EXLOCK = 0x20
1129 O_FSYNC = 0x80
1130 O_NDELAY = 0x4
1131 O_NOCTTY = 0x20000
1132 O_NOFOLLOW = 0x100
1133 O_NOFOLLOW_ANY = 0x20000000
1134 O_NONBLOCK = 0x4
1135 O_POPUP = 0x80000000
1136 O_RDONLY = 0x0
1137 O_RDWR = 0x2
1138 O_SHLOCK = 0x10
1139 O_SYMLINK = 0x200000
1140 O_SYNC = 0x80
1141 O_TRUNC = 0x400
1142 O_WRONLY = 0x1
1143 PARENB = 0x1000
1144 PARMRK = 0x8
1145 PARODD = 0x2000
1146 PENDIN = 0x20000000
1147 PRIO_PGRP = 0x1
1148 PRIO_PROCESS = 0x0
1149 PRIO_USER = 0x2
1150 PROT_EXEC = 0x4
1151 PROT_NONE = 0x0
1152 PROT_READ = 0x1
1153 PROT_WRITE = 0x2
1154 PT_ATTACH = 0xa
1155 PT_ATTACHEXC = 0xe
1156 PT_CONTINUE = 0x7
1157 PT_DENY_ATTACH = 0x1f
1158 PT_DETACH = 0xb
1159 PT_FIRSTMACH = 0x20
1160 PT_FORCEQUOTA = 0x1e
1161 PT_KILL = 0x8
1162 PT_READ_D = 0x2
1163 PT_READ_I = 0x1
1164 PT_READ_U = 0x3
1165 PT_SIGEXC = 0xc
1166 PT_STEP = 0x9
1167 PT_THUPDATE = 0xd
1168 PT_TRACE_ME = 0x0
1169 PT_WRITE_D = 0x5
1170 PT_WRITE_I = 0x4
1171 PT_WRITE_U = 0x6
1172 RLIMIT_AS = 0x5
1173 RLIMIT_CORE = 0x4
1174 RLIMIT_CPU = 0x0
1175 RLIMIT_CPU_USAGE_MONITOR = 0x2
1176 RLIMIT_DATA = 0x2
1177 RLIMIT_FSIZE = 0x1
1178 RLIMIT_MEMLOCK = 0x6
1179 RLIMIT_NOFILE = 0x8
1180 RLIMIT_NPROC = 0x7
1181 RLIMIT_RSS = 0x5
1182 RLIMIT_STACK = 0x3
1183 RLIM_INFINITY = 0x7fffffffffffffff
1184 RTAX_AUTHOR = 0x6
1185 RTAX_BRD = 0x7
1186 RTAX_DST = 0x0
1187 RTAX_GATEWAY = 0x1
1188 RTAX_GENMASK = 0x3
1189 RTAX_IFA = 0x5
1190 RTAX_IFP = 0x4
1191 RTAX_MAX = 0x8
1192 RTAX_NETMASK = 0x2
1193 RTA_AUTHOR = 0x40
1194 RTA_BRD = 0x80
1195 RTA_DST = 0x1
1196 RTA_GATEWAY = 0x2
1197 RTA_GENMASK = 0x8
1198 RTA_IFA = 0x20
1199 RTA_IFP = 0x10
1200 RTA_NETMASK = 0x4
1201 RTF_BLACKHOLE = 0x1000
1202 RTF_BROADCAST = 0x400000
1203 RTF_CLONING = 0x100
1204 RTF_CONDEMNED = 0x2000000
1205 RTF_DEAD = 0x20000000
1206 RTF_DELCLONE = 0x80
1207 RTF_DONE = 0x40
1208 RTF_DYNAMIC = 0x10
1209 RTF_GATEWAY = 0x2
1210 RTF_GLOBAL = 0x40000000
1211 RTF_HOST = 0x4
1212 RTF_IFREF = 0x4000000
1213 RTF_IFSCOPE = 0x1000000
1214 RTF_LLDATA = 0x400
1215 RTF_LLINFO = 0x400
1216 RTF_LOCAL = 0x200000
1217 RTF_MODIFIED = 0x20
1218 RTF_MULTICAST = 0x800000
1219 RTF_NOIFREF = 0x2000
1220 RTF_PINNED = 0x100000
1221 RTF_PRCLONING = 0x10000
1222 RTF_PROTO1 = 0x8000
1223 RTF_PROTO2 = 0x4000
1224 RTF_PROTO3 = 0x40000
1225 RTF_PROXY = 0x8000000
1226 RTF_REJECT = 0x8
1227 RTF_ROUTER = 0x10000000
1228 RTF_STATIC = 0x800
1229 RTF_UP = 0x1
1230 RTF_WASCLONED = 0x20000
1231 RTF_XRESOLVE = 0x200
1232 RTM_ADD = 0x1
1233 RTM_CHANGE = 0x3
1234 RTM_DELADDR = 0xd
1235 RTM_DELETE = 0x2
1236 RTM_DELMADDR = 0x10
1237 RTM_GET = 0x4
1238 RTM_GET2 = 0x14
1239 RTM_IFINFO = 0xe
1240 RTM_IFINFO2 = 0x12
1241 RTM_LOCK = 0x8
1242 RTM_LOSING = 0x5
1243 RTM_MISS = 0x7
1244 RTM_NEWADDR = 0xc
1245 RTM_NEWMADDR = 0xf
1246 RTM_NEWMADDR2 = 0x13
1247 RTM_OLDADD = 0x9
1248 RTM_OLDDEL = 0xa
1249 RTM_REDIRECT = 0x6
1250 RTM_RESOLVE = 0xb
1251 RTM_RTTUNIT = 0xf4240
1252 RTM_VERSION = 0x5
1253 RTV_EXPIRE = 0x4
1254 RTV_HOPCOUNT = 0x2
1255 RTV_MTU = 0x1
1256 RTV_RPIPE = 0x8
1257 RTV_RTT = 0x40
1258 RTV_RTTVAR = 0x80
1259 RTV_SPIPE = 0x10
1260 RTV_SSTHRESH = 0x20
1261 RUSAGE_CHILDREN = -0x1
1262 RUSAGE_SELF = 0x0
1263 SCM_CREDS = 0x3
1264 SCM_RIGHTS = 0x1
1265 SCM_TIMESTAMP = 0x2
1266 SCM_TIMESTAMP_MONOTONIC = 0x4
1267 SEEK_CUR = 0x1
1268 SEEK_DATA = 0x4
1269 SEEK_END = 0x2
1270 SEEK_HOLE = 0x3
1271 SEEK_SET = 0x0
1272 SHUT_RD = 0x0
1273 SHUT_RDWR = 0x2
1274 SHUT_WR = 0x1
1275 SIOCADDMULTI = 0x80206931
1276 SIOCAIFADDR = 0x8040691a
1277 SIOCARPIPLL = 0xc0206928
1278 SIOCATMARK = 0x40047307
1279 SIOCAUTOADDR = 0xc0206926
1280 SIOCAUTONETMASK = 0x80206927
1281 SIOCDELMULTI = 0x80206932
1282 SIOCDIFADDR = 0x80206919
1283 SIOCDIFPHYADDR = 0x80206941
1284 SIOCGDRVSPEC = 0xc028697b
1285 SIOCGETVLAN = 0xc020697f
1286 SIOCGHIWAT = 0x40047301
1287 SIOCGIF6LOWPAN = 0xc02069c5
1288 SIOCGIFADDR = 0xc0206921
1289 SIOCGIFALTMTU = 0xc0206948
1290 SIOCGIFASYNCMAP = 0xc020697c
1291 SIOCGIFBOND = 0xc0206947
1292 SIOCGIFBRDADDR = 0xc0206923
1293 SIOCGIFCAP = 0xc020695b
1294 SIOCGIFCONF = 0xc00c6924
1295 SIOCGIFDEVMTU = 0xc0206944
1296 SIOCGIFDSTADDR = 0xc0206922
1297 SIOCGIFFLAGS = 0xc0206911
1298 SIOCGIFFUNCTIONALTYPE = 0xc02069ad
1299 SIOCGIFGENERIC = 0xc020693a
1300 SIOCGIFKPI = 0xc0206987
1301 SIOCGIFMAC = 0xc0206982
1302 SIOCGIFMEDIA = 0xc02c6938
1303 SIOCGIFMETRIC = 0xc0206917
1304 SIOCGIFMTU = 0xc0206933
1305 SIOCGIFNETMASK = 0xc0206925
1306 SIOCGIFPDSTADDR = 0xc0206940
1307 SIOCGIFPHYS = 0xc0206935
1308 SIOCGIFPSRCADDR = 0xc020693f
1309 SIOCGIFSTATUS = 0xc331693d
1310 SIOCGIFVLAN = 0xc020697f
1311 SIOCGIFWAKEFLAGS = 0xc0206988
1312 SIOCGIFXMEDIA = 0xc02c6948
1313 SIOCGLOWAT = 0x40047303
1314 SIOCGPGRP = 0x40047309
1315 SIOCIFCREATE = 0xc0206978
1316 SIOCIFCREATE2 = 0xc020697a
1317 SIOCIFDESTROY = 0x80206979
1318 SIOCIFGCLONERS = 0xc0106981
1319 SIOCRSLVMULTI = 0xc010693b
1320 SIOCSDRVSPEC = 0x8028697b
1321 SIOCSETVLAN = 0x8020697e
1322 SIOCSHIWAT = 0x80047300
1323 SIOCSIF6LOWPAN = 0x802069c4
1324 SIOCSIFADDR = 0x8020690c
1325 SIOCSIFALTMTU = 0x80206945
1326 SIOCSIFASYNCMAP = 0x8020697d
1327 SIOCSIFBOND = 0x80206946
1328 SIOCSIFBRDADDR = 0x80206913
1329 SIOCSIFCAP = 0x8020695a
1330 SIOCSIFDSTADDR = 0x8020690e
1331 SIOCSIFFLAGS = 0x80206910
1332 SIOCSIFGENERIC = 0x80206939
1333 SIOCSIFKPI = 0x80206986
1334 SIOCSIFLLADDR = 0x8020693c
1335 SIOCSIFMAC = 0x80206983
1336 SIOCSIFMEDIA = 0xc0206937
1337 SIOCSIFMETRIC = 0x80206918
1338 SIOCSIFMTU = 0x80206934
1339 SIOCSIFNETMASK = 0x80206916
1340 SIOCSIFPHYADDR = 0x8040693e
1341 SIOCSIFPHYS = 0x80206936
1342 SIOCSIFVLAN = 0x8020697e
1343 SIOCSLOWAT = 0x80047302
1344 SIOCSPGRP = 0x80047308
1345 SOCK_DGRAM = 0x2
1346 SOCK_MAXADDRLEN = 0xff
1347 SOCK_RAW = 0x3
1348 SOCK_RDM = 0x4
1349 SOCK_SEQPACKET = 0x5
1350 SOCK_STREAM = 0x1
1351 SOL_LOCAL = 0x0
1352 SOL_SOCKET = 0xffff
1353 SOMAXCONN = 0x80
1354 SO_ACCEPTCONN = 0x2
1355 SO_BROADCAST = 0x20
1356 SO_DEBUG = 0x1
1357 SO_DONTROUTE = 0x10
1358 SO_DONTTRUNC = 0x2000
1359 SO_ERROR = 0x1007
1360 SO_KEEPALIVE = 0x8
1361 SO_LABEL = 0x1010
1362 SO_LINGER = 0x80
1363 SO_LINGER_SEC = 0x1080
1364 SO_NETSVC_MARKING_LEVEL = 0x1119
1365 SO_NET_SERVICE_TYPE = 0x1116
1366 SO_NKE = 0x1021
1367 SO_NOADDRERR = 0x1023
1368 SO_NOSIGPIPE = 0x1022
1369 SO_NOTIFYCONFLICT = 0x1026
1370 SO_NP_EXTENSIONS = 0x1083
1371 SO_NREAD = 0x1020
1372 SO_NUMRCVPKT = 0x1112
1373 SO_NWRITE = 0x1024
1374 SO_OOBINLINE = 0x100
1375 SO_PEERLABEL = 0x1011
1376 SO_RANDOMPORT = 0x1082
1377 SO_RCVBUF = 0x1002
1378 SO_RCVLOWAT = 0x1004
1379 SO_RCVTIMEO = 0x1006
1380 SO_REUSEADDR = 0x4
1381 SO_REUSEPORT = 0x200
1382 SO_REUSESHAREUID = 0x1025
1383 SO_SNDBUF = 0x1001
1384 SO_SNDLOWAT = 0x1003
1385 SO_SNDTIMEO = 0x1005
1386 SO_TIMESTAMP = 0x400
1387 SO_TIMESTAMP_MONOTONIC = 0x800
1388 SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
1389 SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
1390 SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2
1391 SO_TRACKER_TRANSPARENCY_VERSION = 0x3
1392 SO_TYPE = 0x1008
1393 SO_UPCALLCLOSEWAIT = 0x1027
1394 SO_USELOOPBACK = 0x40
1395 SO_WANTMORE = 0x4000
1396 SO_WANTOOBFLAG = 0x8000
1397 S_IEXEC = 0x40
1398 S_IFBLK = 0x6000
1399 S_IFCHR = 0x2000
1400 S_IFDIR = 0x4000
1401 S_IFIFO = 0x1000
1402 S_IFLNK = 0xa000
1403 S_IFMT = 0xf000
1404 S_IFREG = 0x8000
1405 S_IFSOCK = 0xc000
1406 S_IFWHT = 0xe000
1407 S_IREAD = 0x100
1408 S_IRGRP = 0x20
1409 S_IROTH = 0x4
1410 S_IRUSR = 0x100
1411 S_IRWXG = 0x38
1412 S_IRWXO = 0x7
1413 S_IRWXU = 0x1c0
1414 S_ISGID = 0x400
1415 S_ISTXT = 0x200
1416 S_ISUID = 0x800
1417 S_ISVTX = 0x200
1418 S_IWGRP = 0x10
1419 S_IWOTH = 0x2
1420 S_IWRITE = 0x80
1421 S_IWUSR = 0x80
1422 S_IXGRP = 0x8
1423 S_IXOTH = 0x1
1424 S_IXUSR = 0x40
1425 TAB0 = 0x0
1426 TAB1 = 0x400
1427 TAB2 = 0x800
1428 TAB3 = 0x4
1429 TABDLY = 0xc04
1430 TCIFLUSH = 0x1
1431 TCIOFF = 0x3
1432 TCIOFLUSH = 0x3
1433 TCION = 0x4
1434 TCOFLUSH = 0x2
1435 TCOOFF = 0x1
1436 TCOON = 0x2
1437 TCPOPT_CC = 0xb
1438 TCPOPT_CCECHO = 0xd
1439 TCPOPT_CCNEW = 0xc
1440 TCPOPT_EOL = 0x0
1441 TCPOPT_FASTOPEN = 0x22
1442 TCPOPT_MAXSEG = 0x2
1443 TCPOPT_NOP = 0x1
1444 TCPOPT_SACK = 0x5
1445 TCPOPT_SACK_HDR = 0x1010500
1446 TCPOPT_SACK_PERMITTED = 0x4
1447 TCPOPT_SACK_PERMIT_HDR = 0x1010402
1448 TCPOPT_SIGNATURE = 0x13
1449 TCPOPT_TIMESTAMP = 0x8
1450 TCPOPT_TSTAMP_HDR = 0x101080a
1451 TCPOPT_WINDOW = 0x3
1452 TCP_CONNECTIONTIMEOUT = 0x20
1453 TCP_CONNECTION_INFO = 0x106
1454 TCP_ENABLE_ECN = 0x104
1455 TCP_FASTOPEN = 0x105
1456 TCP_KEEPALIVE = 0x10
1457 TCP_KEEPCNT = 0x102
1458 TCP_KEEPINTVL = 0x101
1459 TCP_MAXHLEN = 0x3c
1460 TCP_MAXOLEN = 0x28
1461 TCP_MAXSEG = 0x2
1462 TCP_MAXWIN = 0xffff
1463 TCP_MAX_SACK = 0x4
1464 TCP_MAX_WINSHIFT = 0xe
1465 TCP_MINMSS = 0xd8
1466 TCP_MSS = 0x200
1467 TCP_NODELAY = 0x1
1468 TCP_NOOPT = 0x8
1469 TCP_NOPUSH = 0x4
1470 TCP_NOTSENT_LOWAT = 0x201
1471 TCP_RXT_CONNDROPTIME = 0x80
1472 TCP_RXT_FINDROP = 0x100
1473 TCP_SENDMOREACKS = 0x103
1474 TCSAFLUSH = 0x2
1475 TIOCCBRK = 0x2000747a
1476 TIOCCDTR = 0x20007478
1477 TIOCCONS = 0x80047462
1478 TIOCDCDTIMESTAMP = 0x40107458
1479 TIOCDRAIN = 0x2000745e
1480 TIOCDSIMICROCODE = 0x20007455
1481 TIOCEXCL = 0x2000740d
1482 TIOCEXT = 0x80047460
1483 TIOCFLUSH = 0x80047410
1484 TIOCGDRAINWAIT = 0x40047456
1485 TIOCGETA = 0x40487413
1486 TIOCGETD = 0x4004741a
1487 TIOCGPGRP = 0x40047477
1488 TIOCGWINSZ = 0x40087468
1489 TIOCIXOFF = 0x20007480
1490 TIOCIXON = 0x20007481
1491 TIOCMBIC = 0x8004746b
1492 TIOCMBIS = 0x8004746c
1493 TIOCMGDTRWAIT = 0x4004745a
1494 TIOCMGET = 0x4004746a
1495 TIOCMODG = 0x40047403
1496 TIOCMODS = 0x80047404
1497 TIOCMSDTRWAIT = 0x8004745b
1498 TIOCMSET = 0x8004746d
1499 TIOCM_CAR = 0x40
1500 TIOCM_CD = 0x40
1501 TIOCM_CTS = 0x20
1502 TIOCM_DSR = 0x100
1503 TIOCM_DTR = 0x2
1504 TIOCM_LE = 0x1
1505 TIOCM_RI = 0x80
1506 TIOCM_RNG = 0x80
1507 TIOCM_RTS = 0x4
1508 TIOCM_SR = 0x10
1509 TIOCM_ST = 0x8
1510 TIOCNOTTY = 0x20007471
1511 TIOCNXCL = 0x2000740e
1512 TIOCOUTQ = 0x40047473
1513 TIOCPKT = 0x80047470
1514 TIOCPKT_DATA = 0x0
1515 TIOCPKT_DOSTOP = 0x20
1516 TIOCPKT_FLUSHREAD = 0x1
1517 TIOCPKT_FLUSHWRITE = 0x2
1518 TIOCPKT_IOCTL = 0x40
1519 TIOCPKT_NOSTOP = 0x10
1520 TIOCPKT_START = 0x8
1521 TIOCPKT_STOP = 0x4
1522 TIOCPTYGNAME = 0x40807453
1523 TIOCPTYGRANT = 0x20007454
1524 TIOCPTYUNLK = 0x20007452
1525 TIOCREMOTE = 0x80047469
1526 TIOCSBRK = 0x2000747b
1527 TIOCSCONS = 0x20007463
1528 TIOCSCTTY = 0x20007461
1529 TIOCSDRAINWAIT = 0x80047457
1530 TIOCSDTR = 0x20007479
1531 TIOCSETA = 0x80487414
1532 TIOCSETAF = 0x80487416
1533 TIOCSETAW = 0x80487415
1534 TIOCSETD = 0x8004741b
1535 TIOCSIG = 0x2000745f
1536 TIOCSPGRP = 0x80047476
1537 TIOCSTART = 0x2000746e
1538 TIOCSTAT = 0x20007465
1539 TIOCSTI = 0x80017472
1540 TIOCSTOP = 0x2000746f
1541 TIOCSWINSZ = 0x80087467
1542 TIOCTIMESTAMP = 0x40107459
1543 TIOCUCNTL = 0x80047466
1544 TOSTOP = 0x400000
1545 VDISCARD = 0xf
1546 VDSUSP = 0xb
1547 VEOF = 0x0
1548 VEOL = 0x1
1549 VEOL2 = 0x2
1550 VERASE = 0x3
1551 VINTR = 0x8
1552 VKILL = 0x5
1553 VLNEXT = 0xe
1554 VMADDR_CID_ANY = 0xffffffff
1555 VMADDR_CID_HOST = 0x2
1556 VMADDR_CID_HYPERVISOR = 0x0
1557 VMADDR_CID_RESERVED = 0x1
1558 VMADDR_PORT_ANY = 0xffffffff
1559 VMIN = 0x10
1560 VM_LOADAVG = 0x2
1561 VM_MACHFACTOR = 0x4
1562 VM_MAXID = 0x6
1563 VM_METER = 0x1
1564 VM_SWAPUSAGE = 0x5
1565 VQUIT = 0x9
1566 VREPRINT = 0x6
1567 VSTART = 0xc
1568 VSTATUS = 0x12
1569 VSTOP = 0xd
1570 VSUSP = 0xa
1571 VT0 = 0x0
1572 VT1 = 0x10000
1573 VTDLY = 0x10000
1574 VTIME = 0x11
1575 VWERASE = 0x4
1576 WCONTINUED = 0x10
1577 WCOREFLAG = 0x80
1578 WEXITED = 0x4
1579 WNOHANG = 0x1
1580 WNOWAIT = 0x20
1581 WORDSIZE = 0x40
1582 WSTOPPED = 0x8
1583 WUNTRACED = 0x2
1584 XATTR_CREATE = 0x2
1585 XATTR_NODEFAULT = 0x10
1586 XATTR_NOFOLLOW = 0x1
1587 XATTR_NOSECURITY = 0x8
1588 XATTR_REPLACE = 0x4
1589 XATTR_SHOWCOMPRESSION = 0x20
15631590 )
15641591
15651592 // Errors
1111 import "syscall"
1212
1313 const (
14 AF_APPLETALK = 0x10
15 AF_CCITT = 0xa
16 AF_CHAOS = 0x5
17 AF_CNT = 0x15
18 AF_COIP = 0x14
19 AF_DATAKIT = 0x9
20 AF_DECnet = 0xc
21 AF_DLI = 0xd
22 AF_E164 = 0x1c
23 AF_ECMA = 0x8
24 AF_HYLINK = 0xf
25 AF_IEEE80211 = 0x25
26 AF_IMPLINK = 0x3
27 AF_INET = 0x2
28 AF_INET6 = 0x1e
29 AF_IPX = 0x17
30 AF_ISDN = 0x1c
31 AF_ISO = 0x7
32 AF_LAT = 0xe
33 AF_LINK = 0x12
34 AF_LOCAL = 0x1
35 AF_MAX = 0x29
36 AF_NATM = 0x1f
37 AF_NDRV = 0x1b
38 AF_NETBIOS = 0x21
39 AF_NS = 0x6
40 AF_OSI = 0x7
41 AF_PPP = 0x22
42 AF_PUP = 0x4
43 AF_RESERVED_36 = 0x24
44 AF_ROUTE = 0x11
45 AF_SIP = 0x18
46 AF_SNA = 0xb
47 AF_SYSTEM = 0x20
48 AF_SYS_CONTROL = 0x2
49 AF_UNIX = 0x1
50 AF_UNSPEC = 0x0
51 AF_UTUN = 0x26
52 AF_VSOCK = 0x28
53 ALTWERASE = 0x200
54 ATTR_BIT_MAP_COUNT = 0x5
55 ATTR_CMN_ACCESSMASK = 0x20000
56 ATTR_CMN_ACCTIME = 0x1000
57 ATTR_CMN_ADDEDTIME = 0x10000000
58 ATTR_CMN_BKUPTIME = 0x2000
59 ATTR_CMN_CHGTIME = 0x800
60 ATTR_CMN_CRTIME = 0x200
61 ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
62 ATTR_CMN_DEVID = 0x2
63 ATTR_CMN_DOCUMENT_ID = 0x100000
64 ATTR_CMN_ERROR = 0x20000000
65 ATTR_CMN_EXTENDED_SECURITY = 0x400000
66 ATTR_CMN_FILEID = 0x2000000
67 ATTR_CMN_FLAGS = 0x40000
68 ATTR_CMN_FNDRINFO = 0x4000
69 ATTR_CMN_FSID = 0x4
70 ATTR_CMN_FULLPATH = 0x8000000
71 ATTR_CMN_GEN_COUNT = 0x80000
72 ATTR_CMN_GRPID = 0x10000
73 ATTR_CMN_GRPUUID = 0x1000000
74 ATTR_CMN_MODTIME = 0x400
75 ATTR_CMN_NAME = 0x1
76 ATTR_CMN_NAMEDATTRCOUNT = 0x80000
77 ATTR_CMN_NAMEDATTRLIST = 0x100000
78 ATTR_CMN_OBJID = 0x20
79 ATTR_CMN_OBJPERMANENTID = 0x40
80 ATTR_CMN_OBJTAG = 0x10
81 ATTR_CMN_OBJTYPE = 0x8
82 ATTR_CMN_OWNERID = 0x8000
83 ATTR_CMN_PARENTID = 0x4000000
84 ATTR_CMN_PAROBJID = 0x80
85 ATTR_CMN_RETURNED_ATTRS = 0x80000000
86 ATTR_CMN_SCRIPT = 0x100
87 ATTR_CMN_SETMASK = 0x51c7ff00
88 ATTR_CMN_USERACCESS = 0x200000
89 ATTR_CMN_UUID = 0x800000
90 ATTR_CMN_VALIDMASK = 0xffffffff
91 ATTR_CMN_VOLSETMASK = 0x6700
92 ATTR_FILE_ALLOCSIZE = 0x4
93 ATTR_FILE_CLUMPSIZE = 0x10
94 ATTR_FILE_DATAALLOCSIZE = 0x400
95 ATTR_FILE_DATAEXTENTS = 0x800
96 ATTR_FILE_DATALENGTH = 0x200
97 ATTR_FILE_DEVTYPE = 0x20
98 ATTR_FILE_FILETYPE = 0x40
99 ATTR_FILE_FORKCOUNT = 0x80
100 ATTR_FILE_FORKLIST = 0x100
101 ATTR_FILE_IOBLOCKSIZE = 0x8
102 ATTR_FILE_LINKCOUNT = 0x1
103 ATTR_FILE_RSRCALLOCSIZE = 0x2000
104 ATTR_FILE_RSRCEXTENTS = 0x4000
105 ATTR_FILE_RSRCLENGTH = 0x1000
106 ATTR_FILE_SETMASK = 0x20
107 ATTR_FILE_TOTALSIZE = 0x2
108 ATTR_FILE_VALIDMASK = 0x37ff
109 ATTR_VOL_ALLOCATIONCLUMP = 0x40
110 ATTR_VOL_ATTRIBUTES = 0x40000000
111 ATTR_VOL_CAPABILITIES = 0x20000
112 ATTR_VOL_DIRCOUNT = 0x400
113 ATTR_VOL_ENCODINGSUSED = 0x10000
114 ATTR_VOL_FILECOUNT = 0x200
115 ATTR_VOL_FSTYPE = 0x1
116 ATTR_VOL_INFO = 0x80000000
117 ATTR_VOL_IOBLOCKSIZE = 0x80
118 ATTR_VOL_MAXOBJCOUNT = 0x800
119 ATTR_VOL_MINALLOCATION = 0x20
120 ATTR_VOL_MOUNTEDDEVICE = 0x8000
121 ATTR_VOL_MOUNTFLAGS = 0x4000
122 ATTR_VOL_MOUNTPOINT = 0x1000
123 ATTR_VOL_NAME = 0x2000
124 ATTR_VOL_OBJCOUNT = 0x100
125 ATTR_VOL_QUOTA_SIZE = 0x10000000
126 ATTR_VOL_RESERVED_SIZE = 0x20000000
127 ATTR_VOL_SETMASK = 0x80002000
128 ATTR_VOL_SIGNATURE = 0x2
129 ATTR_VOL_SIZE = 0x4
130 ATTR_VOL_SPACEAVAIL = 0x10
131 ATTR_VOL_SPACEFREE = 0x8
132 ATTR_VOL_UUID = 0x40000
133 ATTR_VOL_VALIDMASK = 0xf007ffff
134 B0 = 0x0
135 B110 = 0x6e
136 B115200 = 0x1c200
137 B1200 = 0x4b0
138 B134 = 0x86
139 B14400 = 0x3840
140 B150 = 0x96
141 B1800 = 0x708
142 B19200 = 0x4b00
143 B200 = 0xc8
144 B230400 = 0x38400
145 B2400 = 0x960
146 B28800 = 0x7080
147 B300 = 0x12c
148 B38400 = 0x9600
149 B4800 = 0x12c0
150 B50 = 0x32
151 B57600 = 0xe100
152 B600 = 0x258
153 B7200 = 0x1c20
154 B75 = 0x4b
155 B76800 = 0x12c00
156 B9600 = 0x2580
157 BIOCFLUSH = 0x20004268
158 BIOCGBLEN = 0x40044266
159 BIOCGDLT = 0x4004426a
160 BIOCGDLTLIST = 0xc00c4279
161 BIOCGETIF = 0x4020426b
162 BIOCGHDRCMPLT = 0x40044274
163 BIOCGRSIG = 0x40044272
164 BIOCGRTIMEOUT = 0x4010426e
165 BIOCGSEESENT = 0x40044276
166 BIOCGSTATS = 0x4008426f
167 BIOCIMMEDIATE = 0x80044270
168 BIOCPROMISC = 0x20004269
169 BIOCSBLEN = 0xc0044266
170 BIOCSDLT = 0x80044278
171 BIOCSETF = 0x80104267
172 BIOCSETFNR = 0x8010427e
173 BIOCSETIF = 0x8020426c
174 BIOCSHDRCMPLT = 0x80044275
175 BIOCSRSIG = 0x80044273
176 BIOCSRTIMEOUT = 0x8010426d
177 BIOCSSEESENT = 0x80044277
178 BIOCVERSION = 0x40044271
179 BPF_A = 0x10
180 BPF_ABS = 0x20
181 BPF_ADD = 0x0
182 BPF_ALIGNMENT = 0x4
183 BPF_ALU = 0x4
184 BPF_AND = 0x50
185 BPF_B = 0x10
186 BPF_DIV = 0x30
187 BPF_H = 0x8
188 BPF_IMM = 0x0
189 BPF_IND = 0x40
190 BPF_JA = 0x0
191 BPF_JEQ = 0x10
192 BPF_JGE = 0x30
193 BPF_JGT = 0x20
194 BPF_JMP = 0x5
195 BPF_JSET = 0x40
196 BPF_K = 0x0
197 BPF_LD = 0x0
198 BPF_LDX = 0x1
199 BPF_LEN = 0x80
200 BPF_LSH = 0x60
201 BPF_MAJOR_VERSION = 0x1
202 BPF_MAXBUFSIZE = 0x80000
203 BPF_MAXINSNS = 0x200
204 BPF_MEM = 0x60
205 BPF_MEMWORDS = 0x10
206 BPF_MINBUFSIZE = 0x20
207 BPF_MINOR_VERSION = 0x1
208 BPF_MISC = 0x7
209 BPF_MSH = 0xa0
210 BPF_MUL = 0x20
211 BPF_NEG = 0x80
212 BPF_OR = 0x40
213 BPF_RELEASE = 0x30bb6
214 BPF_RET = 0x6
215 BPF_RSH = 0x70
216 BPF_ST = 0x2
217 BPF_STX = 0x3
218 BPF_SUB = 0x10
219 BPF_TAX = 0x0
220 BPF_TXA = 0x80
221 BPF_W = 0x0
222 BPF_X = 0x8
223 BRKINT = 0x2
224 BS0 = 0x0
225 BS1 = 0x8000
226 BSDLY = 0x8000
227 CFLUSH = 0xf
228 CLOCAL = 0x8000
229 CLOCK_MONOTONIC = 0x6
230 CLOCK_MONOTONIC_RAW = 0x4
231 CLOCK_MONOTONIC_RAW_APPROX = 0x5
232 CLOCK_PROCESS_CPUTIME_ID = 0xc
233 CLOCK_REALTIME = 0x0
234 CLOCK_THREAD_CPUTIME_ID = 0x10
235 CLOCK_UPTIME_RAW = 0x8
236 CLOCK_UPTIME_RAW_APPROX = 0x9
237 CLONE_NOFOLLOW = 0x1
238 CLONE_NOOWNERCOPY = 0x2
239 CR0 = 0x0
240 CR1 = 0x1000
241 CR2 = 0x2000
242 CR3 = 0x3000
243 CRDLY = 0x3000
244 CREAD = 0x800
245 CRTSCTS = 0x30000
246 CS5 = 0x0
247 CS6 = 0x100
248 CS7 = 0x200
249 CS8 = 0x300
250 CSIZE = 0x300
251 CSTART = 0x11
252 CSTATUS = 0x14
253 CSTOP = 0x13
254 CSTOPB = 0x400
255 CSUSP = 0x1a
256 CTLIOCGINFO = 0xc0644e03
257 CTL_HW = 0x6
258 CTL_KERN = 0x1
259 CTL_MAXNAME = 0xc
260 CTL_NET = 0x4
261 DLT_A429 = 0xb8
262 DLT_A653_ICM = 0xb9
263 DLT_AIRONET_HEADER = 0x78
264 DLT_AOS = 0xde
265 DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
266 DLT_ARCNET = 0x7
267 DLT_ARCNET_LINUX = 0x81
268 DLT_ATM_CLIP = 0x13
269 DLT_ATM_RFC1483 = 0xb
270 DLT_AURORA = 0x7e
271 DLT_AX25 = 0x3
272 DLT_AX25_KISS = 0xca
273 DLT_BACNET_MS_TP = 0xa5
274 DLT_BLUETOOTH_HCI_H4 = 0xbb
275 DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
276 DLT_CAN20B = 0xbe
277 DLT_CAN_SOCKETCAN = 0xe3
278 DLT_CHAOS = 0x5
279 DLT_CHDLC = 0x68
280 DLT_CISCO_IOS = 0x76
281 DLT_C_HDLC = 0x68
282 DLT_C_HDLC_WITH_DIR = 0xcd
283 DLT_DBUS = 0xe7
284 DLT_DECT = 0xdd
285 DLT_DOCSIS = 0x8f
286 DLT_DVB_CI = 0xeb
287 DLT_ECONET = 0x73
288 DLT_EN10MB = 0x1
289 DLT_EN3MB = 0x2
290 DLT_ENC = 0x6d
291 DLT_ERF = 0xc5
292 DLT_ERF_ETH = 0xaf
293 DLT_ERF_POS = 0xb0
294 DLT_FC_2 = 0xe0
295 DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
296 DLT_FDDI = 0xa
297 DLT_FLEXRAY = 0xd2
298 DLT_FRELAY = 0x6b
299 DLT_FRELAY_WITH_DIR = 0xce
300 DLT_GCOM_SERIAL = 0xad
301 DLT_GCOM_T1E1 = 0xac
302 DLT_GPF_F = 0xab
303 DLT_GPF_T = 0xaa
304 DLT_GPRS_LLC = 0xa9
305 DLT_GSMTAP_ABIS = 0xda
306 DLT_GSMTAP_UM = 0xd9
307 DLT_HHDLC = 0x79
308 DLT_IBM_SN = 0x92
309 DLT_IBM_SP = 0x91
310 DLT_IEEE802 = 0x6
311 DLT_IEEE802_11 = 0x69
312 DLT_IEEE802_11_RADIO = 0x7f
313 DLT_IEEE802_11_RADIO_AVS = 0xa3
314 DLT_IEEE802_15_4 = 0xc3
315 DLT_IEEE802_15_4_LINUX = 0xbf
316 DLT_IEEE802_15_4_NOFCS = 0xe6
317 DLT_IEEE802_15_4_NONASK_PHY = 0xd7
318 DLT_IEEE802_16_MAC_CPS = 0xbc
319 DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
320 DLT_IPFILTER = 0x74
321 DLT_IPMB = 0xc7
322 DLT_IPMB_LINUX = 0xd1
323 DLT_IPNET = 0xe2
324 DLT_IPOIB = 0xf2
325 DLT_IPV4 = 0xe4
326 DLT_IPV6 = 0xe5
327 DLT_IP_OVER_FC = 0x7a
328 DLT_JUNIPER_ATM1 = 0x89
329 DLT_JUNIPER_ATM2 = 0x87
330 DLT_JUNIPER_ATM_CEMIC = 0xee
331 DLT_JUNIPER_CHDLC = 0xb5
332 DLT_JUNIPER_ES = 0x84
333 DLT_JUNIPER_ETHER = 0xb2
334 DLT_JUNIPER_FIBRECHANNEL = 0xea
335 DLT_JUNIPER_FRELAY = 0xb4
336 DLT_JUNIPER_GGSN = 0x85
337 DLT_JUNIPER_ISM = 0xc2
338 DLT_JUNIPER_MFR = 0x86
339 DLT_JUNIPER_MLFR = 0x83
340 DLT_JUNIPER_MLPPP = 0x82
341 DLT_JUNIPER_MONITOR = 0xa4
342 DLT_JUNIPER_PIC_PEER = 0xae
343 DLT_JUNIPER_PPP = 0xb3
344 DLT_JUNIPER_PPPOE = 0xa7
345 DLT_JUNIPER_PPPOE_ATM = 0xa8
346 DLT_JUNIPER_SERVICES = 0x88
347 DLT_JUNIPER_SRX_E2E = 0xe9
348 DLT_JUNIPER_ST = 0xc8
349 DLT_JUNIPER_VP = 0xb7
350 DLT_JUNIPER_VS = 0xe8
351 DLT_LAPB_WITH_DIR = 0xcf
352 DLT_LAPD = 0xcb
353 DLT_LIN = 0xd4
354 DLT_LINUX_EVDEV = 0xd8
355 DLT_LINUX_IRDA = 0x90
356 DLT_LINUX_LAPD = 0xb1
357 DLT_LINUX_PPP_WITHDIRECTION = 0xa6
358 DLT_LINUX_SLL = 0x71
359 DLT_LOOP = 0x6c
360 DLT_LTALK = 0x72
361 DLT_MATCHING_MAX = 0x10a
362 DLT_MATCHING_MIN = 0x68
363 DLT_MFR = 0xb6
364 DLT_MOST = 0xd3
365 DLT_MPEG_2_TS = 0xf3
366 DLT_MPLS = 0xdb
367 DLT_MTP2 = 0x8c
368 DLT_MTP2_WITH_PHDR = 0x8b
369 DLT_MTP3 = 0x8d
370 DLT_MUX27010 = 0xec
371 DLT_NETANALYZER = 0xf0
372 DLT_NETANALYZER_TRANSPARENT = 0xf1
373 DLT_NFC_LLCP = 0xf5
374 DLT_NFLOG = 0xef
375 DLT_NG40 = 0xf4
376 DLT_NULL = 0x0
377 DLT_PCI_EXP = 0x7d
378 DLT_PFLOG = 0x75
379 DLT_PFSYNC = 0x12
380 DLT_PPI = 0xc0
381 DLT_PPP = 0x9
382 DLT_PPP_BSDOS = 0x10
383 DLT_PPP_ETHER = 0x33
384 DLT_PPP_PPPD = 0xa6
385 DLT_PPP_SERIAL = 0x32
386 DLT_PPP_WITH_DIR = 0xcc
387 DLT_PPP_WITH_DIRECTION = 0xa6
388 DLT_PRISM_HEADER = 0x77
389 DLT_PRONET = 0x4
390 DLT_RAIF1 = 0xc6
391 DLT_RAW = 0xc
392 DLT_RIO = 0x7c
393 DLT_SCCP = 0x8e
394 DLT_SITA = 0xc4
395 DLT_SLIP = 0x8
396 DLT_SLIP_BSDOS = 0xf
397 DLT_STANAG_5066_D_PDU = 0xed
398 DLT_SUNATM = 0x7b
399 DLT_SYMANTEC_FIREWALL = 0x63
400 DLT_TZSP = 0x80
401 DLT_USB = 0xba
402 DLT_USB_DARWIN = 0x10a
403 DLT_USB_LINUX = 0xbd
404 DLT_USB_LINUX_MMAPPED = 0xdc
405 DLT_USER0 = 0x93
406 DLT_USER1 = 0x94
407 DLT_USER10 = 0x9d
408 DLT_USER11 = 0x9e
409 DLT_USER12 = 0x9f
410 DLT_USER13 = 0xa0
411 DLT_USER14 = 0xa1
412 DLT_USER15 = 0xa2
413 DLT_USER2 = 0x95
414 DLT_USER3 = 0x96
415 DLT_USER4 = 0x97
416 DLT_USER5 = 0x98
417 DLT_USER6 = 0x99
418 DLT_USER7 = 0x9a
419 DLT_USER8 = 0x9b
420 DLT_USER9 = 0x9c
421 DLT_WIHART = 0xdf
422 DLT_X2E_SERIAL = 0xd5
423 DLT_X2E_XORAYA = 0xd6
424 DT_BLK = 0x6
425 DT_CHR = 0x2
426 DT_DIR = 0x4
427 DT_FIFO = 0x1
428 DT_LNK = 0xa
429 DT_REG = 0x8
430 DT_SOCK = 0xc
431 DT_UNKNOWN = 0x0
432 DT_WHT = 0xe
433 ECHO = 0x8
434 ECHOCTL = 0x40
435 ECHOE = 0x2
436 ECHOK = 0x4
437 ECHOKE = 0x1
438 ECHONL = 0x10
439 ECHOPRT = 0x20
440 EVFILT_AIO = -0x3
441 EVFILT_EXCEPT = -0xf
442 EVFILT_FS = -0x9
443 EVFILT_MACHPORT = -0x8
444 EVFILT_PROC = -0x5
445 EVFILT_READ = -0x1
446 EVFILT_SIGNAL = -0x6
447 EVFILT_SYSCOUNT = 0x11
448 EVFILT_THREADMARKER = 0x11
449 EVFILT_TIMER = -0x7
450 EVFILT_USER = -0xa
451 EVFILT_VM = -0xc
452 EVFILT_VNODE = -0x4
453 EVFILT_WRITE = -0x2
454 EV_ADD = 0x1
455 EV_CLEAR = 0x20
456 EV_DELETE = 0x2
457 EV_DISABLE = 0x8
458 EV_DISPATCH = 0x80
459 EV_DISPATCH2 = 0x180
460 EV_ENABLE = 0x4
461 EV_EOF = 0x8000
462 EV_ERROR = 0x4000
463 EV_FLAG0 = 0x1000
464 EV_FLAG1 = 0x2000
465 EV_ONESHOT = 0x10
466 EV_OOBAND = 0x2000
467 EV_POLL = 0x1000
468 EV_RECEIPT = 0x40
469 EV_SYSFLAGS = 0xf000
470 EV_UDATA_SPECIFIC = 0x100
471 EV_VANISHED = 0x200
472 EXTA = 0x4b00
473 EXTB = 0x9600
474 EXTPROC = 0x800
475 FD_CLOEXEC = 0x1
476 FD_SETSIZE = 0x400
477 FF0 = 0x0
478 FF1 = 0x4000
479 FFDLY = 0x4000
480 FLUSHO = 0x800000
481 FSOPT_ATTR_CMN_EXTENDED = 0x20
482 FSOPT_NOFOLLOW = 0x1
483 FSOPT_NOINMEMUPDATE = 0x2
484 FSOPT_PACK_INVAL_ATTRS = 0x8
485 FSOPT_REPORT_FULLSIZE = 0x4
486 FSOPT_RETURN_REALDEV = 0x200
487 F_ADDFILESIGS = 0x3d
488 F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
489 F_ADDFILESIGS_INFO = 0x67
490 F_ADDFILESIGS_RETURN = 0x61
491 F_ADDFILESUPPL = 0x68
492 F_ADDSIGS = 0x3b
493 F_ALLOCATEALL = 0x4
494 F_ALLOCATECONTIG = 0x2
495 F_BARRIERFSYNC = 0x55
496 F_CHECK_LV = 0x62
497 F_CHKCLEAN = 0x29
498 F_DUPFD = 0x0
499 F_DUPFD_CLOEXEC = 0x43
500 F_FINDSIGS = 0x4e
501 F_FLUSH_DATA = 0x28
502 F_FREEZE_FS = 0x35
503 F_FULLFSYNC = 0x33
504 F_GETCODEDIR = 0x48
505 F_GETFD = 0x1
506 F_GETFL = 0x3
507 F_GETLK = 0x7
508 F_GETLKPID = 0x42
509 F_GETNOSIGPIPE = 0x4a
510 F_GETOWN = 0x5
511 F_GETPATH = 0x32
512 F_GETPATH_MTMINFO = 0x47
513 F_GETPATH_NOFIRMLINK = 0x66
514 F_GETPROTECTIONCLASS = 0x3f
515 F_GETPROTECTIONLEVEL = 0x4d
516 F_GETSIGSINFO = 0x69
517 F_GLOBAL_NOCACHE = 0x37
518 F_LOG2PHYS = 0x31
519 F_LOG2PHYS_EXT = 0x41
520 F_NOCACHE = 0x30
521 F_NODIRECT = 0x3e
522 F_OK = 0x0
523 F_PATHPKG_CHECK = 0x34
524 F_PEOFPOSMODE = 0x3
525 F_PREALLOCATE = 0x2a
526 F_PUNCHHOLE = 0x63
527 F_RDADVISE = 0x2c
528 F_RDAHEAD = 0x2d
529 F_RDLCK = 0x1
530 F_SETBACKINGSTORE = 0x46
531 F_SETFD = 0x2
532 F_SETFL = 0x4
533 F_SETLK = 0x8
534 F_SETLKW = 0x9
535 F_SETLKWTIMEOUT = 0xa
536 F_SETNOSIGPIPE = 0x49
537 F_SETOWN = 0x6
538 F_SETPROTECTIONCLASS = 0x40
539 F_SETSIZE = 0x2b
540 F_SINGLE_WRITER = 0x4c
541 F_SPECULATIVE_READ = 0x65
542 F_THAW_FS = 0x36
543 F_TRANSCODEKEY = 0x4b
544 F_TRIM_ACTIVE_FILE = 0x64
545 F_UNLCK = 0x2
546 F_VOLPOSMODE = 0x4
547 F_WRLCK = 0x3
548 HUPCL = 0x4000
549 HW_MACHINE = 0x1
550 ICANON = 0x100
551 ICMP6_FILTER = 0x12
552 ICRNL = 0x100
553 IEXTEN = 0x400
554 IFF_ALLMULTI = 0x200
555 IFF_ALTPHYS = 0x4000
556 IFF_BROADCAST = 0x2
557 IFF_DEBUG = 0x4
558 IFF_LINK0 = 0x1000
559 IFF_LINK1 = 0x2000
560 IFF_LINK2 = 0x4000
561 IFF_LOOPBACK = 0x8
562 IFF_MULTICAST = 0x8000
563 IFF_NOARP = 0x80
564 IFF_NOTRAILERS = 0x20
565 IFF_OACTIVE = 0x400
566 IFF_POINTOPOINT = 0x10
567 IFF_PROMISC = 0x100
568 IFF_RUNNING = 0x40
569 IFF_SIMPLEX = 0x800
570 IFF_UP = 0x1
571 IFNAMSIZ = 0x10
572 IFT_1822 = 0x2
573 IFT_6LOWPAN = 0x40
574 IFT_AAL5 = 0x31
575 IFT_ARCNET = 0x23
576 IFT_ARCNETPLUS = 0x24
577 IFT_ATM = 0x25
578 IFT_BRIDGE = 0xd1
579 IFT_CARP = 0xf8
580 IFT_CELLULAR = 0xff
581 IFT_CEPT = 0x13
582 IFT_DS3 = 0x1e
583 IFT_ENC = 0xf4
584 IFT_EON = 0x19
585 IFT_ETHER = 0x6
586 IFT_FAITH = 0x38
587 IFT_FDDI = 0xf
588 IFT_FRELAY = 0x20
589 IFT_FRELAYDCE = 0x2c
590 IFT_GIF = 0x37
591 IFT_HDH1822 = 0x3
592 IFT_HIPPI = 0x2f
593 IFT_HSSI = 0x2e
594 IFT_HY = 0xe
595 IFT_IEEE1394 = 0x90
596 IFT_IEEE8023ADLAG = 0x88
597 IFT_ISDNBASIC = 0x14
598 IFT_ISDNPRIMARY = 0x15
599 IFT_ISO88022LLC = 0x29
600 IFT_ISO88023 = 0x7
601 IFT_ISO88024 = 0x8
602 IFT_ISO88025 = 0x9
603 IFT_ISO88026 = 0xa
604 IFT_L2VLAN = 0x87
605 IFT_LAPB = 0x10
606 IFT_LOCALTALK = 0x2a
607 IFT_LOOP = 0x18
608 IFT_MIOX25 = 0x26
609 IFT_MODEM = 0x30
610 IFT_NSIP = 0x1b
611 IFT_OTHER = 0x1
612 IFT_P10 = 0xc
613 IFT_P80 = 0xd
614 IFT_PARA = 0x22
615 IFT_PDP = 0xff
616 IFT_PFLOG = 0xf5
617 IFT_PFSYNC = 0xf6
618 IFT_PKTAP = 0xfe
619 IFT_PPP = 0x17
620 IFT_PROPMUX = 0x36
621 IFT_PROPVIRTUAL = 0x35
622 IFT_PTPSERIAL = 0x16
623 IFT_RS232 = 0x21
624 IFT_SDLC = 0x11
625 IFT_SIP = 0x1f
626 IFT_SLIP = 0x1c
627 IFT_SMDSDXI = 0x2b
628 IFT_SMDSICIP = 0x34
629 IFT_SONET = 0x27
630 IFT_SONETPATH = 0x32
631 IFT_SONETVT = 0x33
632 IFT_STARLAN = 0xb
633 IFT_STF = 0x39
634 IFT_T1 = 0x12
635 IFT_ULTRA = 0x1d
636 IFT_V35 = 0x2d
637 IFT_X25 = 0x5
638 IFT_X25DDN = 0x4
639 IFT_X25PLE = 0x28
640 IFT_XETHER = 0x1a
641 IGNBRK = 0x1
642 IGNCR = 0x80
643 IGNPAR = 0x4
644 IMAXBEL = 0x2000
645 INLCR = 0x40
646 INPCK = 0x10
647 IN_CLASSA_HOST = 0xffffff
648 IN_CLASSA_MAX = 0x80
649 IN_CLASSA_NET = 0xff000000
650 IN_CLASSA_NSHIFT = 0x18
651 IN_CLASSB_HOST = 0xffff
652 IN_CLASSB_MAX = 0x10000
653 IN_CLASSB_NET = 0xffff0000
654 IN_CLASSB_NSHIFT = 0x10
655 IN_CLASSC_HOST = 0xff
656 IN_CLASSC_NET = 0xffffff00
657 IN_CLASSC_NSHIFT = 0x8
658 IN_CLASSD_HOST = 0xfffffff
659 IN_CLASSD_NET = 0xf0000000
660 IN_CLASSD_NSHIFT = 0x1c
661 IN_LINKLOCALNETNUM = 0xa9fe0000
662 IN_LOOPBACKNET = 0x7f
663 IPPROTO_3PC = 0x22
664 IPPROTO_ADFS = 0x44
665 IPPROTO_AH = 0x33
666 IPPROTO_AHIP = 0x3d
667 IPPROTO_APES = 0x63
668 IPPROTO_ARGUS = 0xd
669 IPPROTO_AX25 = 0x5d
670 IPPROTO_BHA = 0x31
671 IPPROTO_BLT = 0x1e
672 IPPROTO_BRSATMON = 0x4c
673 IPPROTO_CFTP = 0x3e
674 IPPROTO_CHAOS = 0x10
675 IPPROTO_CMTP = 0x26
676 IPPROTO_CPHB = 0x49
677 IPPROTO_CPNX = 0x48
678 IPPROTO_DDP = 0x25
679 IPPROTO_DGP = 0x56
680 IPPROTO_DIVERT = 0xfe
681 IPPROTO_DONE = 0x101
682 IPPROTO_DSTOPTS = 0x3c
683 IPPROTO_EGP = 0x8
684 IPPROTO_EMCON = 0xe
685 IPPROTO_ENCAP = 0x62
686 IPPROTO_EON = 0x50
687 IPPROTO_ESP = 0x32
688 IPPROTO_ETHERIP = 0x61
689 IPPROTO_FRAGMENT = 0x2c
690 IPPROTO_GGP = 0x3
691 IPPROTO_GMTP = 0x64
692 IPPROTO_GRE = 0x2f
693 IPPROTO_HELLO = 0x3f
694 IPPROTO_HMP = 0x14
695 IPPROTO_HOPOPTS = 0x0
696 IPPROTO_ICMP = 0x1
697 IPPROTO_ICMPV6 = 0x3a
698 IPPROTO_IDP = 0x16
699 IPPROTO_IDPR = 0x23
700 IPPROTO_IDRP = 0x2d
701 IPPROTO_IGMP = 0x2
702 IPPROTO_IGP = 0x55
703 IPPROTO_IGRP = 0x58
704 IPPROTO_IL = 0x28
705 IPPROTO_INLSP = 0x34
706 IPPROTO_INP = 0x20
707 IPPROTO_IP = 0x0
708 IPPROTO_IPCOMP = 0x6c
709 IPPROTO_IPCV = 0x47
710 IPPROTO_IPEIP = 0x5e
711 IPPROTO_IPIP = 0x4
712 IPPROTO_IPPC = 0x43
713 IPPROTO_IPV4 = 0x4
714 IPPROTO_IPV6 = 0x29
715 IPPROTO_IRTP = 0x1c
716 IPPROTO_KRYPTOLAN = 0x41
717 IPPROTO_LARP = 0x5b
718 IPPROTO_LEAF1 = 0x19
719 IPPROTO_LEAF2 = 0x1a
720 IPPROTO_MAX = 0x100
721 IPPROTO_MAXID = 0x34
722 IPPROTO_MEAS = 0x13
723 IPPROTO_MHRP = 0x30
724 IPPROTO_MICP = 0x5f
725 IPPROTO_MTP = 0x5c
726 IPPROTO_MUX = 0x12
727 IPPROTO_ND = 0x4d
728 IPPROTO_NHRP = 0x36
729 IPPROTO_NONE = 0x3b
730 IPPROTO_NSP = 0x1f
731 IPPROTO_NVPII = 0xb
732 IPPROTO_OSPFIGP = 0x59
733 IPPROTO_PGM = 0x71
734 IPPROTO_PIGP = 0x9
735 IPPROTO_PIM = 0x67
736 IPPROTO_PRM = 0x15
737 IPPROTO_PUP = 0xc
738 IPPROTO_PVP = 0x4b
739 IPPROTO_RAW = 0xff
740 IPPROTO_RCCMON = 0xa
741 IPPROTO_RDP = 0x1b
742 IPPROTO_ROUTING = 0x2b
743 IPPROTO_RSVP = 0x2e
744 IPPROTO_RVD = 0x42
745 IPPROTO_SATEXPAK = 0x40
746 IPPROTO_SATMON = 0x45
747 IPPROTO_SCCSP = 0x60
748 IPPROTO_SCTP = 0x84
749 IPPROTO_SDRP = 0x2a
750 IPPROTO_SEP = 0x21
751 IPPROTO_SRPC = 0x5a
752 IPPROTO_ST = 0x7
753 IPPROTO_SVMTP = 0x52
754 IPPROTO_SWIPE = 0x35
755 IPPROTO_TCF = 0x57
756 IPPROTO_TCP = 0x6
757 IPPROTO_TP = 0x1d
758 IPPROTO_TPXX = 0x27
759 IPPROTO_TRUNK1 = 0x17
760 IPPROTO_TRUNK2 = 0x18
761 IPPROTO_TTP = 0x54
762 IPPROTO_UDP = 0x11
763 IPPROTO_VINES = 0x53
764 IPPROTO_VISA = 0x46
765 IPPROTO_VMTP = 0x51
766 IPPROTO_WBEXPAK = 0x4f
767 IPPROTO_WBMON = 0x4e
768 IPPROTO_WSN = 0x4a
769 IPPROTO_XNET = 0xf
770 IPPROTO_XTP = 0x24
771 IPV6_2292DSTOPTS = 0x17
772 IPV6_2292HOPLIMIT = 0x14
773 IPV6_2292HOPOPTS = 0x16
774 IPV6_2292NEXTHOP = 0x15
775 IPV6_2292PKTINFO = 0x13
776 IPV6_2292PKTOPTIONS = 0x19
777 IPV6_2292RTHDR = 0x18
778 IPV6_3542DSTOPTS = 0x32
779 IPV6_3542HOPLIMIT = 0x2f
780 IPV6_3542HOPOPTS = 0x31
781 IPV6_3542NEXTHOP = 0x30
782 IPV6_3542PKTINFO = 0x2e
783 IPV6_3542RTHDR = 0x33
784 IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
785 IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
786 IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
787 IPV6_AUTOFLOWLABEL = 0x3b
788 IPV6_BINDV6ONLY = 0x1b
789 IPV6_BOUND_IF = 0x7d
790 IPV6_CHECKSUM = 0x1a
791 IPV6_DEFAULT_MULTICAST_HOPS = 0x1
792 IPV6_DEFAULT_MULTICAST_LOOP = 0x1
793 IPV6_DEFHLIM = 0x40
794 IPV6_DONTFRAG = 0x3e
795 IPV6_DSTOPTS = 0x32
796 IPV6_FAITH = 0x1d
797 IPV6_FLOWINFO_MASK = 0xffffff0f
798 IPV6_FLOWLABEL_MASK = 0xffff0f00
799 IPV6_FLOW_ECN_MASK = 0x3000
800 IPV6_FRAGTTL = 0x3c
801 IPV6_FW_ADD = 0x1e
802 IPV6_FW_DEL = 0x1f
803 IPV6_FW_FLUSH = 0x20
804 IPV6_FW_GET = 0x22
805 IPV6_FW_ZERO = 0x21
806 IPV6_HLIMDEC = 0x1
807 IPV6_HOPLIMIT = 0x2f
808 IPV6_HOPOPTS = 0x31
809 IPV6_IPSEC_POLICY = 0x1c
810 IPV6_JOIN_GROUP = 0xc
811 IPV6_LEAVE_GROUP = 0xd
812 IPV6_MAXHLIM = 0xff
813 IPV6_MAXOPTHDR = 0x800
814 IPV6_MAXPACKET = 0xffff
815 IPV6_MAX_GROUP_SRC_FILTER = 0x200
816 IPV6_MAX_MEMBERSHIPS = 0xfff
817 IPV6_MAX_SOCK_SRC_FILTER = 0x80
818 IPV6_MIN_MEMBERSHIPS = 0x1f
819 IPV6_MMTU = 0x500
820 IPV6_MSFILTER = 0x4a
821 IPV6_MULTICAST_HOPS = 0xa
822 IPV6_MULTICAST_IF = 0x9
823 IPV6_MULTICAST_LOOP = 0xb
824 IPV6_NEXTHOP = 0x30
825 IPV6_PATHMTU = 0x2c
826 IPV6_PKTINFO = 0x2e
827 IPV6_PORTRANGE = 0xe
828 IPV6_PORTRANGE_DEFAULT = 0x0
829 IPV6_PORTRANGE_HIGH = 0x1
830 IPV6_PORTRANGE_LOW = 0x2
831 IPV6_PREFER_TEMPADDR = 0x3f
832 IPV6_RECVDSTOPTS = 0x28
833 IPV6_RECVHOPLIMIT = 0x25
834 IPV6_RECVHOPOPTS = 0x27
835 IPV6_RECVPATHMTU = 0x2b
836 IPV6_RECVPKTINFO = 0x3d
837 IPV6_RECVRTHDR = 0x26
838 IPV6_RECVTCLASS = 0x23
839 IPV6_RTHDR = 0x33
840 IPV6_RTHDRDSTOPTS = 0x39
841 IPV6_RTHDR_LOOSE = 0x0
842 IPV6_RTHDR_STRICT = 0x1
843 IPV6_RTHDR_TYPE_0 = 0x0
844 IPV6_SOCKOPT_RESERVED1 = 0x3
845 IPV6_TCLASS = 0x24
846 IPV6_UNICAST_HOPS = 0x4
847 IPV6_USE_MIN_MTU = 0x2a
848 IPV6_V6ONLY = 0x1b
849 IPV6_VERSION = 0x60
850 IPV6_VERSION_MASK = 0xf0
851 IP_ADD_MEMBERSHIP = 0xc
852 IP_ADD_SOURCE_MEMBERSHIP = 0x46
853 IP_BLOCK_SOURCE = 0x48
854 IP_BOUND_IF = 0x19
855 IP_DEFAULT_MULTICAST_LOOP = 0x1
856 IP_DEFAULT_MULTICAST_TTL = 0x1
857 IP_DF = 0x4000
858 IP_DONTFRAG = 0x1c
859 IP_DROP_MEMBERSHIP = 0xd
860 IP_DROP_SOURCE_MEMBERSHIP = 0x47
861 IP_DUMMYNET_CONFIGURE = 0x3c
862 IP_DUMMYNET_DEL = 0x3d
863 IP_DUMMYNET_FLUSH = 0x3e
864 IP_DUMMYNET_GET = 0x40
865 IP_FAITH = 0x16
866 IP_FW_ADD = 0x28
867 IP_FW_DEL = 0x29
868 IP_FW_FLUSH = 0x2a
869 IP_FW_GET = 0x2c
870 IP_FW_RESETLOG = 0x2d
871 IP_FW_ZERO = 0x2b
872 IP_HDRINCL = 0x2
873 IP_IPSEC_POLICY = 0x15
874 IP_MAXPACKET = 0xffff
875 IP_MAX_GROUP_SRC_FILTER = 0x200
876 IP_MAX_MEMBERSHIPS = 0xfff
877 IP_MAX_SOCK_MUTE_FILTER = 0x80
878 IP_MAX_SOCK_SRC_FILTER = 0x80
879 IP_MF = 0x2000
880 IP_MIN_MEMBERSHIPS = 0x1f
881 IP_MSFILTER = 0x4a
882 IP_MSS = 0x240
883 IP_MULTICAST_IF = 0x9
884 IP_MULTICAST_IFINDEX = 0x42
885 IP_MULTICAST_LOOP = 0xb
886 IP_MULTICAST_TTL = 0xa
887 IP_MULTICAST_VIF = 0xe
888 IP_NAT__XXX = 0x37
889 IP_OFFMASK = 0x1fff
890 IP_OLD_FW_ADD = 0x32
891 IP_OLD_FW_DEL = 0x33
892 IP_OLD_FW_FLUSH = 0x34
893 IP_OLD_FW_GET = 0x36
894 IP_OLD_FW_RESETLOG = 0x38
895 IP_OLD_FW_ZERO = 0x35
896 IP_OPTIONS = 0x1
897 IP_PKTINFO = 0x1a
898 IP_PORTRANGE = 0x13
899 IP_PORTRANGE_DEFAULT = 0x0
900 IP_PORTRANGE_HIGH = 0x1
901 IP_PORTRANGE_LOW = 0x2
902 IP_RECVDSTADDR = 0x7
903 IP_RECVIF = 0x14
904 IP_RECVOPTS = 0x5
905 IP_RECVPKTINFO = 0x1a
906 IP_RECVRETOPTS = 0x6
907 IP_RECVTOS = 0x1b
908 IP_RECVTTL = 0x18
909 IP_RETOPTS = 0x8
910 IP_RF = 0x8000
911 IP_RSVP_OFF = 0x10
912 IP_RSVP_ON = 0xf
913 IP_RSVP_VIF_OFF = 0x12
914 IP_RSVP_VIF_ON = 0x11
915 IP_STRIPHDR = 0x17
916 IP_TOS = 0x3
917 IP_TRAFFIC_MGT_BACKGROUND = 0x41
918 IP_TTL = 0x4
919 IP_UNBLOCK_SOURCE = 0x49
920 ISIG = 0x80
921 ISTRIP = 0x20
922 IUTF8 = 0x4000
923 IXANY = 0x800
924 IXOFF = 0x400
925 IXON = 0x200
926 KERN_HOSTNAME = 0xa
927 KERN_OSRELEASE = 0x2
928 KERN_OSTYPE = 0x1
929 KERN_VERSION = 0x4
930 LOCAL_PEERCRED = 0x1
931 LOCAL_PEEREPID = 0x3
932 LOCAL_PEEREUUID = 0x5
933 LOCAL_PEERPID = 0x2
934 LOCAL_PEERTOKEN = 0x6
935 LOCAL_PEERUUID = 0x4
936 LOCK_EX = 0x2
937 LOCK_NB = 0x4
938 LOCK_SH = 0x1
939 LOCK_UN = 0x8
940 MADV_CAN_REUSE = 0x9
941 MADV_DONTNEED = 0x4
942 MADV_FREE = 0x5
943 MADV_FREE_REUSABLE = 0x7
944 MADV_FREE_REUSE = 0x8
945 MADV_NORMAL = 0x0
946 MADV_PAGEOUT = 0xa
947 MADV_RANDOM = 0x1
948 MADV_SEQUENTIAL = 0x2
949 MADV_WILLNEED = 0x3
950 MADV_ZERO_WIRED_PAGES = 0x6
951 MAP_32BIT = 0x8000
952 MAP_ANON = 0x1000
953 MAP_ANONYMOUS = 0x1000
954 MAP_COPY = 0x2
955 MAP_FILE = 0x0
956 MAP_FIXED = 0x10
957 MAP_HASSEMAPHORE = 0x200
958 MAP_JIT = 0x800
959 MAP_NOCACHE = 0x400
960 MAP_NOEXTEND = 0x100
961 MAP_NORESERVE = 0x40
962 MAP_PRIVATE = 0x2
963 MAP_RENAME = 0x20
964 MAP_RESERVED0080 = 0x80
965 MAP_RESILIENT_CODESIGN = 0x2000
966 MAP_RESILIENT_MEDIA = 0x4000
967 MAP_SHARED = 0x1
968 MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000
969 MAP_UNIX03 = 0x40000
970 MCAST_BLOCK_SOURCE = 0x54
971 MCAST_EXCLUDE = 0x2
972 MCAST_INCLUDE = 0x1
973 MCAST_JOIN_GROUP = 0x50
974 MCAST_JOIN_SOURCE_GROUP = 0x52
975 MCAST_LEAVE_GROUP = 0x51
976 MCAST_LEAVE_SOURCE_GROUP = 0x53
977 MCAST_UNBLOCK_SOURCE = 0x55
978 MCAST_UNDEFINED = 0x0
979 MCL_CURRENT = 0x1
980 MCL_FUTURE = 0x2
981 MNT_ASYNC = 0x40
982 MNT_AUTOMOUNTED = 0x400000
983 MNT_CMDFLAGS = 0xf0000
984 MNT_CPROTECT = 0x80
985 MNT_DEFWRITE = 0x2000000
986 MNT_DONTBROWSE = 0x100000
987 MNT_DOVOLFS = 0x8000
988 MNT_DWAIT = 0x4
989 MNT_EXPORTED = 0x100
990 MNT_EXT_ROOT_DATA_VOL = 0x1
991 MNT_FORCE = 0x80000
992 MNT_IGNORE_OWNERSHIP = 0x200000
993 MNT_JOURNALED = 0x800000
994 MNT_LOCAL = 0x1000
995 MNT_MULTILABEL = 0x4000000
996 MNT_NOATIME = 0x10000000
997 MNT_NOBLOCK = 0x20000
998 MNT_NODEV = 0x10
999 MNT_NOEXEC = 0x4
1000 MNT_NOSUID = 0x8
1001 MNT_NOUSERXATTR = 0x1000000
1002 MNT_NOWAIT = 0x2
1003 MNT_QUARANTINE = 0x400
1004 MNT_QUOTA = 0x2000
1005 MNT_RDONLY = 0x1
1006 MNT_RELOAD = 0x40000
1007 MNT_REMOVABLE = 0x200
1008 MNT_ROOTFS = 0x4000
1009 MNT_SNAPSHOT = 0x40000000
1010 MNT_STRICTATIME = 0x80000000
1011 MNT_SYNCHRONOUS = 0x2
1012 MNT_UNION = 0x20
1013 MNT_UNKNOWNPERMISSIONS = 0x200000
1014 MNT_UPDATE = 0x10000
1015 MNT_VISFLAGMASK = 0xd7f0f7ff
1016 MNT_WAIT = 0x1
1017 MSG_CTRUNC = 0x20
1018 MSG_DONTROUTE = 0x4
1019 MSG_DONTWAIT = 0x80
1020 MSG_EOF = 0x100
1021 MSG_EOR = 0x8
1022 MSG_FLUSH = 0x400
1023 MSG_HAVEMORE = 0x2000
1024 MSG_HOLD = 0x800
1025 MSG_NEEDSA = 0x10000
1026 MSG_NOSIGNAL = 0x80000
1027 MSG_OOB = 0x1
1028 MSG_PEEK = 0x2
1029 MSG_RCVMORE = 0x4000
1030 MSG_SEND = 0x1000
1031 MSG_TRUNC = 0x10
1032 MSG_WAITALL = 0x40
1033 MSG_WAITSTREAM = 0x200
1034 MS_ASYNC = 0x1
1035 MS_DEACTIVATE = 0x8
1036 MS_INVALIDATE = 0x2
1037 MS_KILLPAGES = 0x4
1038 MS_SYNC = 0x10
1039 NAME_MAX = 0xff
1040 NET_RT_DUMP = 0x1
1041 NET_RT_DUMP2 = 0x7
1042 NET_RT_FLAGS = 0x2
1043 NET_RT_FLAGS_PRIV = 0xa
1044 NET_RT_IFLIST = 0x3
1045 NET_RT_IFLIST2 = 0x6
1046 NET_RT_MAXID = 0xb
1047 NET_RT_STAT = 0x4
1048 NET_RT_TRASH = 0x5
1049 NFDBITS = 0x20
1050 NL0 = 0x0
1051 NL1 = 0x100
1052 NL2 = 0x200
1053 NL3 = 0x300
1054 NLDLY = 0x300
1055 NOFLSH = 0x80000000
1056 NOKERNINFO = 0x2000000
1057 NOTE_ABSOLUTE = 0x8
1058 NOTE_ATTRIB = 0x8
1059 NOTE_BACKGROUND = 0x40
1060 NOTE_CHILD = 0x4
1061 NOTE_CRITICAL = 0x20
1062 NOTE_DELETE = 0x1
1063 NOTE_EXEC = 0x20000000
1064 NOTE_EXIT = 0x80000000
1065 NOTE_EXITSTATUS = 0x4000000
1066 NOTE_EXIT_CSERROR = 0x40000
1067 NOTE_EXIT_DECRYPTFAIL = 0x10000
1068 NOTE_EXIT_DETAIL = 0x2000000
1069 NOTE_EXIT_DETAIL_MASK = 0x70000
1070 NOTE_EXIT_MEMORY = 0x20000
1071 NOTE_EXIT_REPARENTED = 0x80000
1072 NOTE_EXTEND = 0x4
1073 NOTE_FFAND = 0x40000000
1074 NOTE_FFCOPY = 0xc0000000
1075 NOTE_FFCTRLMASK = 0xc0000000
1076 NOTE_FFLAGSMASK = 0xffffff
1077 NOTE_FFNOP = 0x0
1078 NOTE_FFOR = 0x80000000
1079 NOTE_FORK = 0x40000000
1080 NOTE_FUNLOCK = 0x100
1081 NOTE_LEEWAY = 0x10
1082 NOTE_LINK = 0x10
1083 NOTE_LOWAT = 0x1
1084 NOTE_MACHTIME = 0x100
1085 NOTE_MACH_CONTINUOUS_TIME = 0x80
1086 NOTE_NONE = 0x80
1087 NOTE_NSECONDS = 0x4
1088 NOTE_OOB = 0x2
1089 NOTE_PCTRLMASK = -0x100000
1090 NOTE_PDATAMASK = 0xfffff
1091 NOTE_REAP = 0x10000000
1092 NOTE_RENAME = 0x20
1093 NOTE_REVOKE = 0x40
1094 NOTE_SECONDS = 0x1
1095 NOTE_SIGNAL = 0x8000000
1096 NOTE_TRACK = 0x1
1097 NOTE_TRACKERR = 0x2
1098 NOTE_TRIGGER = 0x1000000
1099 NOTE_USECONDS = 0x2
1100 NOTE_VM_ERROR = 0x10000000
1101 NOTE_VM_PRESSURE = 0x80000000
1102 NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
1103 NOTE_VM_PRESSURE_TERMINATE = 0x40000000
1104 NOTE_WRITE = 0x2
1105 OCRNL = 0x10
1106 OFDEL = 0x20000
1107 OFILL = 0x80
1108 ONLCR = 0x2
1109 ONLRET = 0x40
1110 ONOCR = 0x20
1111 ONOEOT = 0x8
1112 OPOST = 0x1
1113 OXTABS = 0x4
1114 O_ACCMODE = 0x3
1115 O_ALERT = 0x20000000
1116 O_APPEND = 0x8
1117 O_ASYNC = 0x40
1118 O_CLOEXEC = 0x1000000
1119 O_CREAT = 0x200
1120 O_DIRECTORY = 0x100000
1121 O_DP_GETRAWENCRYPTED = 0x1
1122 O_DP_GETRAWUNENCRYPTED = 0x2
1123 O_DSYNC = 0x400000
1124 O_EVTONLY = 0x8000
1125 O_EXCL = 0x800
1126 O_EXLOCK = 0x20
1127 O_FSYNC = 0x80
1128 O_NDELAY = 0x4
1129 O_NOCTTY = 0x20000
1130 O_NOFOLLOW = 0x100
1131 O_NOFOLLOW_ANY = 0x20000000
1132 O_NONBLOCK = 0x4
1133 O_POPUP = 0x80000000
1134 O_RDONLY = 0x0
1135 O_RDWR = 0x2
1136 O_SHLOCK = 0x10
1137 O_SYMLINK = 0x200000
1138 O_SYNC = 0x80
1139 O_TRUNC = 0x400
1140 O_WRONLY = 0x1
1141 PARENB = 0x1000
1142 PARMRK = 0x8
1143 PARODD = 0x2000
1144 PENDIN = 0x20000000
1145 PRIO_PGRP = 0x1
1146 PRIO_PROCESS = 0x0
1147 PRIO_USER = 0x2
1148 PROT_EXEC = 0x4
1149 PROT_NONE = 0x0
1150 PROT_READ = 0x1
1151 PROT_WRITE = 0x2
1152 PT_ATTACH = 0xa
1153 PT_ATTACHEXC = 0xe
1154 PT_CONTINUE = 0x7
1155 PT_DENY_ATTACH = 0x1f
1156 PT_DETACH = 0xb
1157 PT_FIRSTMACH = 0x20
1158 PT_FORCEQUOTA = 0x1e
1159 PT_KILL = 0x8
1160 PT_READ_D = 0x2
1161 PT_READ_I = 0x1
1162 PT_READ_U = 0x3
1163 PT_SIGEXC = 0xc
1164 PT_STEP = 0x9
1165 PT_THUPDATE = 0xd
1166 PT_TRACE_ME = 0x0
1167 PT_WRITE_D = 0x5
1168 PT_WRITE_I = 0x4
1169 PT_WRITE_U = 0x6
1170 RLIMIT_AS = 0x5
1171 RLIMIT_CORE = 0x4
1172 RLIMIT_CPU = 0x0
1173 RLIMIT_CPU_USAGE_MONITOR = 0x2
1174 RLIMIT_DATA = 0x2
1175 RLIMIT_FSIZE = 0x1
1176 RLIMIT_MEMLOCK = 0x6
1177 RLIMIT_NOFILE = 0x8
1178 RLIMIT_NPROC = 0x7
1179 RLIMIT_RSS = 0x5
1180 RLIMIT_STACK = 0x3
1181 RLIM_INFINITY = 0x7fffffffffffffff
1182 RTAX_AUTHOR = 0x6
1183 RTAX_BRD = 0x7
1184 RTAX_DST = 0x0
1185 RTAX_GATEWAY = 0x1
1186 RTAX_GENMASK = 0x3
1187 RTAX_IFA = 0x5
1188 RTAX_IFP = 0x4
1189 RTAX_MAX = 0x8
1190 RTAX_NETMASK = 0x2
1191 RTA_AUTHOR = 0x40
1192 RTA_BRD = 0x80
1193 RTA_DST = 0x1
1194 RTA_GATEWAY = 0x2
1195 RTA_GENMASK = 0x8
1196 RTA_IFA = 0x20
1197 RTA_IFP = 0x10
1198 RTA_NETMASK = 0x4
1199 RTF_BLACKHOLE = 0x1000
1200 RTF_BROADCAST = 0x400000
1201 RTF_CLONING = 0x100
1202 RTF_CONDEMNED = 0x2000000
1203 RTF_DEAD = 0x20000000
1204 RTF_DELCLONE = 0x80
1205 RTF_DONE = 0x40
1206 RTF_DYNAMIC = 0x10
1207 RTF_GATEWAY = 0x2
1208 RTF_HOST = 0x4
1209 RTF_IFREF = 0x4000000
1210 RTF_IFSCOPE = 0x1000000
1211 RTF_LLDATA = 0x400
1212 RTF_LLINFO = 0x400
1213 RTF_LOCAL = 0x200000
1214 RTF_MODIFIED = 0x20
1215 RTF_MULTICAST = 0x800000
1216 RTF_NOIFREF = 0x2000
1217 RTF_PINNED = 0x100000
1218 RTF_PRCLONING = 0x10000
1219 RTF_PROTO1 = 0x8000
1220 RTF_PROTO2 = 0x4000
1221 RTF_PROTO3 = 0x40000
1222 RTF_PROXY = 0x8000000
1223 RTF_REJECT = 0x8
1224 RTF_ROUTER = 0x10000000
1225 RTF_STATIC = 0x800
1226 RTF_UP = 0x1
1227 RTF_WASCLONED = 0x20000
1228 RTF_XRESOLVE = 0x200
1229 RTM_ADD = 0x1
1230 RTM_CHANGE = 0x3
1231 RTM_DELADDR = 0xd
1232 RTM_DELETE = 0x2
1233 RTM_DELMADDR = 0x10
1234 RTM_GET = 0x4
1235 RTM_GET2 = 0x14
1236 RTM_IFINFO = 0xe
1237 RTM_IFINFO2 = 0x12
1238 RTM_LOCK = 0x8
1239 RTM_LOSING = 0x5
1240 RTM_MISS = 0x7
1241 RTM_NEWADDR = 0xc
1242 RTM_NEWMADDR = 0xf
1243 RTM_NEWMADDR2 = 0x13
1244 RTM_OLDADD = 0x9
1245 RTM_OLDDEL = 0xa
1246 RTM_REDIRECT = 0x6
1247 RTM_RESOLVE = 0xb
1248 RTM_RTTUNIT = 0xf4240
1249 RTM_VERSION = 0x5
1250 RTV_EXPIRE = 0x4
1251 RTV_HOPCOUNT = 0x2
1252 RTV_MTU = 0x1
1253 RTV_RPIPE = 0x8
1254 RTV_RTT = 0x40
1255 RTV_RTTVAR = 0x80
1256 RTV_SPIPE = 0x10
1257 RTV_SSTHRESH = 0x20
1258 RUSAGE_CHILDREN = -0x1
1259 RUSAGE_SELF = 0x0
1260 SCM_CREDS = 0x3
1261 SCM_RIGHTS = 0x1
1262 SCM_TIMESTAMP = 0x2
1263 SCM_TIMESTAMP_MONOTONIC = 0x4
1264 SEEK_CUR = 0x1
1265 SEEK_DATA = 0x4
1266 SEEK_END = 0x2
1267 SEEK_HOLE = 0x3
1268 SEEK_SET = 0x0
1269 SHUT_RD = 0x0
1270 SHUT_RDWR = 0x2
1271 SHUT_WR = 0x1
1272 SIOCADDMULTI = 0x80206931
1273 SIOCAIFADDR = 0x8040691a
1274 SIOCARPIPLL = 0xc0206928
1275 SIOCATMARK = 0x40047307
1276 SIOCAUTOADDR = 0xc0206926
1277 SIOCAUTONETMASK = 0x80206927
1278 SIOCDELMULTI = 0x80206932
1279 SIOCDIFADDR = 0x80206919
1280 SIOCDIFPHYADDR = 0x80206941
1281 SIOCGDRVSPEC = 0xc028697b
1282 SIOCGETVLAN = 0xc020697f
1283 SIOCGHIWAT = 0x40047301
1284 SIOCGIF6LOWPAN = 0xc02069c5
1285 SIOCGIFADDR = 0xc0206921
1286 SIOCGIFALTMTU = 0xc0206948
1287 SIOCGIFASYNCMAP = 0xc020697c
1288 SIOCGIFBOND = 0xc0206947
1289 SIOCGIFBRDADDR = 0xc0206923
1290 SIOCGIFCAP = 0xc020695b
1291 SIOCGIFCONF = 0xc00c6924
1292 SIOCGIFDEVMTU = 0xc0206944
1293 SIOCGIFDSTADDR = 0xc0206922
1294 SIOCGIFFLAGS = 0xc0206911
1295 SIOCGIFFUNCTIONALTYPE = 0xc02069ad
1296 SIOCGIFGENERIC = 0xc020693a
1297 SIOCGIFKPI = 0xc0206987
1298 SIOCGIFMAC = 0xc0206982
1299 SIOCGIFMEDIA = 0xc02c6938
1300 SIOCGIFMETRIC = 0xc0206917
1301 SIOCGIFMTU = 0xc0206933
1302 SIOCGIFNETMASK = 0xc0206925
1303 SIOCGIFPDSTADDR = 0xc0206940
1304 SIOCGIFPHYS = 0xc0206935
1305 SIOCGIFPSRCADDR = 0xc020693f
1306 SIOCGIFSTATUS = 0xc331693d
1307 SIOCGIFVLAN = 0xc020697f
1308 SIOCGIFWAKEFLAGS = 0xc0206988
1309 SIOCGIFXMEDIA = 0xc02c6948
1310 SIOCGLOWAT = 0x40047303
1311 SIOCGPGRP = 0x40047309
1312 SIOCIFCREATE = 0xc0206978
1313 SIOCIFCREATE2 = 0xc020697a
1314 SIOCIFDESTROY = 0x80206979
1315 SIOCIFGCLONERS = 0xc0106981
1316 SIOCRSLVMULTI = 0xc010693b
1317 SIOCSDRVSPEC = 0x8028697b
1318 SIOCSETVLAN = 0x8020697e
1319 SIOCSHIWAT = 0x80047300
1320 SIOCSIF6LOWPAN = 0x802069c4
1321 SIOCSIFADDR = 0x8020690c
1322 SIOCSIFALTMTU = 0x80206945
1323 SIOCSIFASYNCMAP = 0x8020697d
1324 SIOCSIFBOND = 0x80206946
1325 SIOCSIFBRDADDR = 0x80206913
1326 SIOCSIFCAP = 0x8020695a
1327 SIOCSIFDSTADDR = 0x8020690e
1328 SIOCSIFFLAGS = 0x80206910
1329 SIOCSIFGENERIC = 0x80206939
1330 SIOCSIFKPI = 0x80206986
1331 SIOCSIFLLADDR = 0x8020693c
1332 SIOCSIFMAC = 0x80206983
1333 SIOCSIFMEDIA = 0xc0206937
1334 SIOCSIFMETRIC = 0x80206918
1335 SIOCSIFMTU = 0x80206934
1336 SIOCSIFNETMASK = 0x80206916
1337 SIOCSIFPHYADDR = 0x8040693e
1338 SIOCSIFPHYS = 0x80206936
1339 SIOCSIFVLAN = 0x8020697e
1340 SIOCSLOWAT = 0x80047302
1341 SIOCSPGRP = 0x80047308
1342 SOCK_DGRAM = 0x2
1343 SOCK_MAXADDRLEN = 0xff
1344 SOCK_RAW = 0x3
1345 SOCK_RDM = 0x4
1346 SOCK_SEQPACKET = 0x5
1347 SOCK_STREAM = 0x1
1348 SOL_LOCAL = 0x0
1349 SOL_SOCKET = 0xffff
1350 SOMAXCONN = 0x80
1351 SO_ACCEPTCONN = 0x2
1352 SO_BROADCAST = 0x20
1353 SO_DEBUG = 0x1
1354 SO_DONTROUTE = 0x10
1355 SO_DONTTRUNC = 0x2000
1356 SO_ERROR = 0x1007
1357 SO_KEEPALIVE = 0x8
1358 SO_LABEL = 0x1010
1359 SO_LINGER = 0x80
1360 SO_LINGER_SEC = 0x1080
1361 SO_NETSVC_MARKING_LEVEL = 0x1119
1362 SO_NET_SERVICE_TYPE = 0x1116
1363 SO_NKE = 0x1021
1364 SO_NOADDRERR = 0x1023
1365 SO_NOSIGPIPE = 0x1022
1366 SO_NOTIFYCONFLICT = 0x1026
1367 SO_NP_EXTENSIONS = 0x1083
1368 SO_NREAD = 0x1020
1369 SO_NUMRCVPKT = 0x1112
1370 SO_NWRITE = 0x1024
1371 SO_OOBINLINE = 0x100
1372 SO_PEERLABEL = 0x1011
1373 SO_RANDOMPORT = 0x1082
1374 SO_RCVBUF = 0x1002
1375 SO_RCVLOWAT = 0x1004
1376 SO_RCVTIMEO = 0x1006
1377 SO_REUSEADDR = 0x4
1378 SO_REUSEPORT = 0x200
1379 SO_REUSESHAREUID = 0x1025
1380 SO_SNDBUF = 0x1001
1381 SO_SNDLOWAT = 0x1003
1382 SO_SNDTIMEO = 0x1005
1383 SO_TIMESTAMP = 0x400
1384 SO_TIMESTAMP_MONOTONIC = 0x800
1385 SO_TYPE = 0x1008
1386 SO_UPCALLCLOSEWAIT = 0x1027
1387 SO_USELOOPBACK = 0x40
1388 SO_WANTMORE = 0x4000
1389 SO_WANTOOBFLAG = 0x8000
1390 S_IEXEC = 0x40
1391 S_IFBLK = 0x6000
1392 S_IFCHR = 0x2000
1393 S_IFDIR = 0x4000
1394 S_IFIFO = 0x1000
1395 S_IFLNK = 0xa000
1396 S_IFMT = 0xf000
1397 S_IFREG = 0x8000
1398 S_IFSOCK = 0xc000
1399 S_IFWHT = 0xe000
1400 S_IREAD = 0x100
1401 S_IRGRP = 0x20
1402 S_IROTH = 0x4
1403 S_IRUSR = 0x100
1404 S_IRWXG = 0x38
1405 S_IRWXO = 0x7
1406 S_IRWXU = 0x1c0
1407 S_ISGID = 0x400
1408 S_ISTXT = 0x200
1409 S_ISUID = 0x800
1410 S_ISVTX = 0x200
1411 S_IWGRP = 0x10
1412 S_IWOTH = 0x2
1413 S_IWRITE = 0x80
1414 S_IWUSR = 0x80
1415 S_IXGRP = 0x8
1416 S_IXOTH = 0x1
1417 S_IXUSR = 0x40
1418 TAB0 = 0x0
1419 TAB1 = 0x400
1420 TAB2 = 0x800
1421 TAB3 = 0x4
1422 TABDLY = 0xc04
1423 TCIFLUSH = 0x1
1424 TCIOFF = 0x3
1425 TCIOFLUSH = 0x3
1426 TCION = 0x4
1427 TCOFLUSH = 0x2
1428 TCOOFF = 0x1
1429 TCOON = 0x2
1430 TCP_CONNECTIONTIMEOUT = 0x20
1431 TCP_CONNECTION_INFO = 0x106
1432 TCP_ENABLE_ECN = 0x104
1433 TCP_FASTOPEN = 0x105
1434 TCP_KEEPALIVE = 0x10
1435 TCP_KEEPCNT = 0x102
1436 TCP_KEEPINTVL = 0x101
1437 TCP_MAXHLEN = 0x3c
1438 TCP_MAXOLEN = 0x28
1439 TCP_MAXSEG = 0x2
1440 TCP_MAXWIN = 0xffff
1441 TCP_MAX_SACK = 0x4
1442 TCP_MAX_WINSHIFT = 0xe
1443 TCP_MINMSS = 0xd8
1444 TCP_MSS = 0x200
1445 TCP_NODELAY = 0x1
1446 TCP_NOOPT = 0x8
1447 TCP_NOPUSH = 0x4
1448 TCP_NOTSENT_LOWAT = 0x201
1449 TCP_RXT_CONNDROPTIME = 0x80
1450 TCP_RXT_FINDROP = 0x100
1451 TCP_SENDMOREACKS = 0x103
1452 TCSAFLUSH = 0x2
1453 TIOCCBRK = 0x2000747a
1454 TIOCCDTR = 0x20007478
1455 TIOCCONS = 0x80047462
1456 TIOCDCDTIMESTAMP = 0x40107458
1457 TIOCDRAIN = 0x2000745e
1458 TIOCDSIMICROCODE = 0x20007455
1459 TIOCEXCL = 0x2000740d
1460 TIOCEXT = 0x80047460
1461 TIOCFLUSH = 0x80047410
1462 TIOCGDRAINWAIT = 0x40047456
1463 TIOCGETA = 0x40487413
1464 TIOCGETD = 0x4004741a
1465 TIOCGPGRP = 0x40047477
1466 TIOCGWINSZ = 0x40087468
1467 TIOCIXOFF = 0x20007480
1468 TIOCIXON = 0x20007481
1469 TIOCMBIC = 0x8004746b
1470 TIOCMBIS = 0x8004746c
1471 TIOCMGDTRWAIT = 0x4004745a
1472 TIOCMGET = 0x4004746a
1473 TIOCMODG = 0x40047403
1474 TIOCMODS = 0x80047404
1475 TIOCMSDTRWAIT = 0x8004745b
1476 TIOCMSET = 0x8004746d
1477 TIOCM_CAR = 0x40
1478 TIOCM_CD = 0x40
1479 TIOCM_CTS = 0x20
1480 TIOCM_DSR = 0x100
1481 TIOCM_DTR = 0x2
1482 TIOCM_LE = 0x1
1483 TIOCM_RI = 0x80
1484 TIOCM_RNG = 0x80
1485 TIOCM_RTS = 0x4
1486 TIOCM_SR = 0x10
1487 TIOCM_ST = 0x8
1488 TIOCNOTTY = 0x20007471
1489 TIOCNXCL = 0x2000740e
1490 TIOCOUTQ = 0x40047473
1491 TIOCPKT = 0x80047470
1492 TIOCPKT_DATA = 0x0
1493 TIOCPKT_DOSTOP = 0x20
1494 TIOCPKT_FLUSHREAD = 0x1
1495 TIOCPKT_FLUSHWRITE = 0x2
1496 TIOCPKT_IOCTL = 0x40
1497 TIOCPKT_NOSTOP = 0x10
1498 TIOCPKT_START = 0x8
1499 TIOCPKT_STOP = 0x4
1500 TIOCPTYGNAME = 0x40807453
1501 TIOCPTYGRANT = 0x20007454
1502 TIOCPTYUNLK = 0x20007452
1503 TIOCREMOTE = 0x80047469
1504 TIOCSBRK = 0x2000747b
1505 TIOCSCONS = 0x20007463
1506 TIOCSCTTY = 0x20007461
1507 TIOCSDRAINWAIT = 0x80047457
1508 TIOCSDTR = 0x20007479
1509 TIOCSETA = 0x80487414
1510 TIOCSETAF = 0x80487416
1511 TIOCSETAW = 0x80487415
1512 TIOCSETD = 0x8004741b
1513 TIOCSIG = 0x2000745f
1514 TIOCSPGRP = 0x80047476
1515 TIOCSTART = 0x2000746e
1516 TIOCSTAT = 0x20007465
1517 TIOCSTI = 0x80017472
1518 TIOCSTOP = 0x2000746f
1519 TIOCSWINSZ = 0x80087467
1520 TIOCTIMESTAMP = 0x40107459
1521 TIOCUCNTL = 0x80047466
1522 TOSTOP = 0x400000
1523 VDISCARD = 0xf
1524 VDSUSP = 0xb
1525 VEOF = 0x0
1526 VEOL = 0x1
1527 VEOL2 = 0x2
1528 VERASE = 0x3
1529 VINTR = 0x8
1530 VKILL = 0x5
1531 VLNEXT = 0xe
1532 VMIN = 0x10
1533 VM_LOADAVG = 0x2
1534 VM_MACHFACTOR = 0x4
1535 VM_MAXID = 0x6
1536 VM_METER = 0x1
1537 VM_SWAPUSAGE = 0x5
1538 VQUIT = 0x9
1539 VREPRINT = 0x6
1540 VSTART = 0xc
1541 VSTATUS = 0x12
1542 VSTOP = 0xd
1543 VSUSP = 0xa
1544 VT0 = 0x0
1545 VT1 = 0x10000
1546 VTDLY = 0x10000
1547 VTIME = 0x11
1548 VWERASE = 0x4
1549 WCONTINUED = 0x10
1550 WCOREFLAG = 0x80
1551 WEXITED = 0x4
1552 WNOHANG = 0x1
1553 WNOWAIT = 0x20
1554 WORDSIZE = 0x40
1555 WSTOPPED = 0x8
1556 WUNTRACED = 0x2
1557 XATTR_CREATE = 0x2
1558 XATTR_NODEFAULT = 0x10
1559 XATTR_NOFOLLOW = 0x1
1560 XATTR_NOSECURITY = 0x8
1561 XATTR_REPLACE = 0x4
1562 XATTR_SHOWCOMPRESSION = 0x20
14 AF_APPLETALK = 0x10
15 AF_CCITT = 0xa
16 AF_CHAOS = 0x5
17 AF_CNT = 0x15
18 AF_COIP = 0x14
19 AF_DATAKIT = 0x9
20 AF_DECnet = 0xc
21 AF_DLI = 0xd
22 AF_E164 = 0x1c
23 AF_ECMA = 0x8
24 AF_HYLINK = 0xf
25 AF_IEEE80211 = 0x25
26 AF_IMPLINK = 0x3
27 AF_INET = 0x2
28 AF_INET6 = 0x1e
29 AF_IPX = 0x17
30 AF_ISDN = 0x1c
31 AF_ISO = 0x7
32 AF_LAT = 0xe
33 AF_LINK = 0x12
34 AF_LOCAL = 0x1
35 AF_MAX = 0x29
36 AF_NATM = 0x1f
37 AF_NDRV = 0x1b
38 AF_NETBIOS = 0x21
39 AF_NS = 0x6
40 AF_OSI = 0x7
41 AF_PPP = 0x22
42 AF_PUP = 0x4
43 AF_RESERVED_36 = 0x24
44 AF_ROUTE = 0x11
45 AF_SIP = 0x18
46 AF_SNA = 0xb
47 AF_SYSTEM = 0x20
48 AF_SYS_CONTROL = 0x2
49 AF_UNIX = 0x1
50 AF_UNSPEC = 0x0
51 AF_UTUN = 0x26
52 AF_VSOCK = 0x28
53 ALTWERASE = 0x200
54 ATTR_BIT_MAP_COUNT = 0x5
55 ATTR_CMN_ACCESSMASK = 0x20000
56 ATTR_CMN_ACCTIME = 0x1000
57 ATTR_CMN_ADDEDTIME = 0x10000000
58 ATTR_CMN_BKUPTIME = 0x2000
59 ATTR_CMN_CHGTIME = 0x800
60 ATTR_CMN_CRTIME = 0x200
61 ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
62 ATTR_CMN_DEVID = 0x2
63 ATTR_CMN_DOCUMENT_ID = 0x100000
64 ATTR_CMN_ERROR = 0x20000000
65 ATTR_CMN_EXTENDED_SECURITY = 0x400000
66 ATTR_CMN_FILEID = 0x2000000
67 ATTR_CMN_FLAGS = 0x40000
68 ATTR_CMN_FNDRINFO = 0x4000
69 ATTR_CMN_FSID = 0x4
70 ATTR_CMN_FULLPATH = 0x8000000
71 ATTR_CMN_GEN_COUNT = 0x80000
72 ATTR_CMN_GRPID = 0x10000
73 ATTR_CMN_GRPUUID = 0x1000000
74 ATTR_CMN_MODTIME = 0x400
75 ATTR_CMN_NAME = 0x1
76 ATTR_CMN_NAMEDATTRCOUNT = 0x80000
77 ATTR_CMN_NAMEDATTRLIST = 0x100000
78 ATTR_CMN_OBJID = 0x20
79 ATTR_CMN_OBJPERMANENTID = 0x40
80 ATTR_CMN_OBJTAG = 0x10
81 ATTR_CMN_OBJTYPE = 0x8
82 ATTR_CMN_OWNERID = 0x8000
83 ATTR_CMN_PARENTID = 0x4000000
84 ATTR_CMN_PAROBJID = 0x80
85 ATTR_CMN_RETURNED_ATTRS = 0x80000000
86 ATTR_CMN_SCRIPT = 0x100
87 ATTR_CMN_SETMASK = 0x51c7ff00
88 ATTR_CMN_USERACCESS = 0x200000
89 ATTR_CMN_UUID = 0x800000
90 ATTR_CMN_VALIDMASK = 0xffffffff
91 ATTR_CMN_VOLSETMASK = 0x6700
92 ATTR_FILE_ALLOCSIZE = 0x4
93 ATTR_FILE_CLUMPSIZE = 0x10
94 ATTR_FILE_DATAALLOCSIZE = 0x400
95 ATTR_FILE_DATAEXTENTS = 0x800
96 ATTR_FILE_DATALENGTH = 0x200
97 ATTR_FILE_DEVTYPE = 0x20
98 ATTR_FILE_FILETYPE = 0x40
99 ATTR_FILE_FORKCOUNT = 0x80
100 ATTR_FILE_FORKLIST = 0x100
101 ATTR_FILE_IOBLOCKSIZE = 0x8
102 ATTR_FILE_LINKCOUNT = 0x1
103 ATTR_FILE_RSRCALLOCSIZE = 0x2000
104 ATTR_FILE_RSRCEXTENTS = 0x4000
105 ATTR_FILE_RSRCLENGTH = 0x1000
106 ATTR_FILE_SETMASK = 0x20
107 ATTR_FILE_TOTALSIZE = 0x2
108 ATTR_FILE_VALIDMASK = 0x37ff
109 ATTR_VOL_ALLOCATIONCLUMP = 0x40
110 ATTR_VOL_ATTRIBUTES = 0x40000000
111 ATTR_VOL_CAPABILITIES = 0x20000
112 ATTR_VOL_DIRCOUNT = 0x400
113 ATTR_VOL_ENCODINGSUSED = 0x10000
114 ATTR_VOL_FILECOUNT = 0x200
115 ATTR_VOL_FSTYPE = 0x1
116 ATTR_VOL_INFO = 0x80000000
117 ATTR_VOL_IOBLOCKSIZE = 0x80
118 ATTR_VOL_MAXOBJCOUNT = 0x800
119 ATTR_VOL_MINALLOCATION = 0x20
120 ATTR_VOL_MOUNTEDDEVICE = 0x8000
121 ATTR_VOL_MOUNTFLAGS = 0x4000
122 ATTR_VOL_MOUNTPOINT = 0x1000
123 ATTR_VOL_NAME = 0x2000
124 ATTR_VOL_OBJCOUNT = 0x100
125 ATTR_VOL_QUOTA_SIZE = 0x10000000
126 ATTR_VOL_RESERVED_SIZE = 0x20000000
127 ATTR_VOL_SETMASK = 0x80002000
128 ATTR_VOL_SIGNATURE = 0x2
129 ATTR_VOL_SIZE = 0x4
130 ATTR_VOL_SPACEAVAIL = 0x10
131 ATTR_VOL_SPACEFREE = 0x8
132 ATTR_VOL_SPACEUSED = 0x800000
133 ATTR_VOL_UUID = 0x40000
134 ATTR_VOL_VALIDMASK = 0xf087ffff
135 B0 = 0x0
136 B110 = 0x6e
137 B115200 = 0x1c200
138 B1200 = 0x4b0
139 B134 = 0x86
140 B14400 = 0x3840
141 B150 = 0x96
142 B1800 = 0x708
143 B19200 = 0x4b00
144 B200 = 0xc8
145 B230400 = 0x38400
146 B2400 = 0x960
147 B28800 = 0x7080
148 B300 = 0x12c
149 B38400 = 0x9600
150 B4800 = 0x12c0
151 B50 = 0x32
152 B57600 = 0xe100
153 B600 = 0x258
154 B7200 = 0x1c20
155 B75 = 0x4b
156 B76800 = 0x12c00
157 B9600 = 0x2580
158 BIOCFLUSH = 0x20004268
159 BIOCGBLEN = 0x40044266
160 BIOCGDLT = 0x4004426a
161 BIOCGDLTLIST = 0xc00c4279
162 BIOCGETIF = 0x4020426b
163 BIOCGHDRCMPLT = 0x40044274
164 BIOCGRSIG = 0x40044272
165 BIOCGRTIMEOUT = 0x4010426e
166 BIOCGSEESENT = 0x40044276
167 BIOCGSTATS = 0x4008426f
168 BIOCIMMEDIATE = 0x80044270
169 BIOCPROMISC = 0x20004269
170 BIOCSBLEN = 0xc0044266
171 BIOCSDLT = 0x80044278
172 BIOCSETF = 0x80104267
173 BIOCSETFNR = 0x8010427e
174 BIOCSETIF = 0x8020426c
175 BIOCSHDRCMPLT = 0x80044275
176 BIOCSRSIG = 0x80044273
177 BIOCSRTIMEOUT = 0x8010426d
178 BIOCSSEESENT = 0x80044277
179 BIOCVERSION = 0x40044271
180 BPF_A = 0x10
181 BPF_ABS = 0x20
182 BPF_ADD = 0x0
183 BPF_ALIGNMENT = 0x4
184 BPF_ALU = 0x4
185 BPF_AND = 0x50
186 BPF_B = 0x10
187 BPF_DIV = 0x30
188 BPF_H = 0x8
189 BPF_IMM = 0x0
190 BPF_IND = 0x40
191 BPF_JA = 0x0
192 BPF_JEQ = 0x10
193 BPF_JGE = 0x30
194 BPF_JGT = 0x20
195 BPF_JMP = 0x5
196 BPF_JSET = 0x40
197 BPF_K = 0x0
198 BPF_LD = 0x0
199 BPF_LDX = 0x1
200 BPF_LEN = 0x80
201 BPF_LSH = 0x60
202 BPF_MAJOR_VERSION = 0x1
203 BPF_MAXBUFSIZE = 0x80000
204 BPF_MAXINSNS = 0x200
205 BPF_MEM = 0x60
206 BPF_MEMWORDS = 0x10
207 BPF_MINBUFSIZE = 0x20
208 BPF_MINOR_VERSION = 0x1
209 BPF_MISC = 0x7
210 BPF_MSH = 0xa0
211 BPF_MUL = 0x20
212 BPF_NEG = 0x80
213 BPF_OR = 0x40
214 BPF_RELEASE = 0x30bb6
215 BPF_RET = 0x6
216 BPF_RSH = 0x70
217 BPF_ST = 0x2
218 BPF_STX = 0x3
219 BPF_SUB = 0x10
220 BPF_TAX = 0x0
221 BPF_TXA = 0x80
222 BPF_W = 0x0
223 BPF_X = 0x8
224 BRKINT = 0x2
225 BS0 = 0x0
226 BS1 = 0x8000
227 BSDLY = 0x8000
228 CFLUSH = 0xf
229 CLOCAL = 0x8000
230 CLOCK_MONOTONIC = 0x6
231 CLOCK_MONOTONIC_RAW = 0x4
232 CLOCK_MONOTONIC_RAW_APPROX = 0x5
233 CLOCK_PROCESS_CPUTIME_ID = 0xc
234 CLOCK_REALTIME = 0x0
235 CLOCK_THREAD_CPUTIME_ID = 0x10
236 CLOCK_UPTIME_RAW = 0x8
237 CLOCK_UPTIME_RAW_APPROX = 0x9
238 CLONE_NOFOLLOW = 0x1
239 CLONE_NOOWNERCOPY = 0x2
240 CR0 = 0x0
241 CR1 = 0x1000
242 CR2 = 0x2000
243 CR3 = 0x3000
244 CRDLY = 0x3000
245 CREAD = 0x800
246 CRTSCTS = 0x30000
247 CS5 = 0x0
248 CS6 = 0x100
249 CS7 = 0x200
250 CS8 = 0x300
251 CSIZE = 0x300
252 CSTART = 0x11
253 CSTATUS = 0x14
254 CSTOP = 0x13
255 CSTOPB = 0x400
256 CSUSP = 0x1a
257 CTLIOCGINFO = 0xc0644e03
258 CTL_HW = 0x6
259 CTL_KERN = 0x1
260 CTL_MAXNAME = 0xc
261 CTL_NET = 0x4
262 DLT_A429 = 0xb8
263 DLT_A653_ICM = 0xb9
264 DLT_AIRONET_HEADER = 0x78
265 DLT_AOS = 0xde
266 DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
267 DLT_ARCNET = 0x7
268 DLT_ARCNET_LINUX = 0x81
269 DLT_ATM_CLIP = 0x13
270 DLT_ATM_RFC1483 = 0xb
271 DLT_AURORA = 0x7e
272 DLT_AX25 = 0x3
273 DLT_AX25_KISS = 0xca
274 DLT_BACNET_MS_TP = 0xa5
275 DLT_BLUETOOTH_HCI_H4 = 0xbb
276 DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
277 DLT_CAN20B = 0xbe
278 DLT_CAN_SOCKETCAN = 0xe3
279 DLT_CHAOS = 0x5
280 DLT_CHDLC = 0x68
281 DLT_CISCO_IOS = 0x76
282 DLT_C_HDLC = 0x68
283 DLT_C_HDLC_WITH_DIR = 0xcd
284 DLT_DBUS = 0xe7
285 DLT_DECT = 0xdd
286 DLT_DOCSIS = 0x8f
287 DLT_DVB_CI = 0xeb
288 DLT_ECONET = 0x73
289 DLT_EN10MB = 0x1
290 DLT_EN3MB = 0x2
291 DLT_ENC = 0x6d
292 DLT_ERF = 0xc5
293 DLT_ERF_ETH = 0xaf
294 DLT_ERF_POS = 0xb0
295 DLT_FC_2 = 0xe0
296 DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
297 DLT_FDDI = 0xa
298 DLT_FLEXRAY = 0xd2
299 DLT_FRELAY = 0x6b
300 DLT_FRELAY_WITH_DIR = 0xce
301 DLT_GCOM_SERIAL = 0xad
302 DLT_GCOM_T1E1 = 0xac
303 DLT_GPF_F = 0xab
304 DLT_GPF_T = 0xaa
305 DLT_GPRS_LLC = 0xa9
306 DLT_GSMTAP_ABIS = 0xda
307 DLT_GSMTAP_UM = 0xd9
308 DLT_HHDLC = 0x79
309 DLT_IBM_SN = 0x92
310 DLT_IBM_SP = 0x91
311 DLT_IEEE802 = 0x6
312 DLT_IEEE802_11 = 0x69
313 DLT_IEEE802_11_RADIO = 0x7f
314 DLT_IEEE802_11_RADIO_AVS = 0xa3
315 DLT_IEEE802_15_4 = 0xc3
316 DLT_IEEE802_15_4_LINUX = 0xbf
317 DLT_IEEE802_15_4_NOFCS = 0xe6
318 DLT_IEEE802_15_4_NONASK_PHY = 0xd7
319 DLT_IEEE802_16_MAC_CPS = 0xbc
320 DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
321 DLT_IPFILTER = 0x74
322 DLT_IPMB = 0xc7
323 DLT_IPMB_LINUX = 0xd1
324 DLT_IPNET = 0xe2
325 DLT_IPOIB = 0xf2
326 DLT_IPV4 = 0xe4
327 DLT_IPV6 = 0xe5
328 DLT_IP_OVER_FC = 0x7a
329 DLT_JUNIPER_ATM1 = 0x89
330 DLT_JUNIPER_ATM2 = 0x87
331 DLT_JUNIPER_ATM_CEMIC = 0xee
332 DLT_JUNIPER_CHDLC = 0xb5
333 DLT_JUNIPER_ES = 0x84
334 DLT_JUNIPER_ETHER = 0xb2
335 DLT_JUNIPER_FIBRECHANNEL = 0xea
336 DLT_JUNIPER_FRELAY = 0xb4
337 DLT_JUNIPER_GGSN = 0x85
338 DLT_JUNIPER_ISM = 0xc2
339 DLT_JUNIPER_MFR = 0x86
340 DLT_JUNIPER_MLFR = 0x83
341 DLT_JUNIPER_MLPPP = 0x82
342 DLT_JUNIPER_MONITOR = 0xa4
343 DLT_JUNIPER_PIC_PEER = 0xae
344 DLT_JUNIPER_PPP = 0xb3
345 DLT_JUNIPER_PPPOE = 0xa7
346 DLT_JUNIPER_PPPOE_ATM = 0xa8
347 DLT_JUNIPER_SERVICES = 0x88
348 DLT_JUNIPER_SRX_E2E = 0xe9
349 DLT_JUNIPER_ST = 0xc8
350 DLT_JUNIPER_VP = 0xb7
351 DLT_JUNIPER_VS = 0xe8
352 DLT_LAPB_WITH_DIR = 0xcf
353 DLT_LAPD = 0xcb
354 DLT_LIN = 0xd4
355 DLT_LINUX_EVDEV = 0xd8
356 DLT_LINUX_IRDA = 0x90
357 DLT_LINUX_LAPD = 0xb1
358 DLT_LINUX_PPP_WITHDIRECTION = 0xa6
359 DLT_LINUX_SLL = 0x71
360 DLT_LOOP = 0x6c
361 DLT_LTALK = 0x72
362 DLT_MATCHING_MAX = 0x10a
363 DLT_MATCHING_MIN = 0x68
364 DLT_MFR = 0xb6
365 DLT_MOST = 0xd3
366 DLT_MPEG_2_TS = 0xf3
367 DLT_MPLS = 0xdb
368 DLT_MTP2 = 0x8c
369 DLT_MTP2_WITH_PHDR = 0x8b
370 DLT_MTP3 = 0x8d
371 DLT_MUX27010 = 0xec
372 DLT_NETANALYZER = 0xf0
373 DLT_NETANALYZER_TRANSPARENT = 0xf1
374 DLT_NFC_LLCP = 0xf5
375 DLT_NFLOG = 0xef
376 DLT_NG40 = 0xf4
377 DLT_NULL = 0x0
378 DLT_PCI_EXP = 0x7d
379 DLT_PFLOG = 0x75
380 DLT_PFSYNC = 0x12
381 DLT_PPI = 0xc0
382 DLT_PPP = 0x9
383 DLT_PPP_BSDOS = 0x10
384 DLT_PPP_ETHER = 0x33
385 DLT_PPP_PPPD = 0xa6
386 DLT_PPP_SERIAL = 0x32
387 DLT_PPP_WITH_DIR = 0xcc
388 DLT_PPP_WITH_DIRECTION = 0xa6
389 DLT_PRISM_HEADER = 0x77
390 DLT_PRONET = 0x4
391 DLT_RAIF1 = 0xc6
392 DLT_RAW = 0xc
393 DLT_RIO = 0x7c
394 DLT_SCCP = 0x8e
395 DLT_SITA = 0xc4
396 DLT_SLIP = 0x8
397 DLT_SLIP_BSDOS = 0xf
398 DLT_STANAG_5066_D_PDU = 0xed
399 DLT_SUNATM = 0x7b
400 DLT_SYMANTEC_FIREWALL = 0x63
401 DLT_TZSP = 0x80
402 DLT_USB = 0xba
403 DLT_USB_DARWIN = 0x10a
404 DLT_USB_LINUX = 0xbd
405 DLT_USB_LINUX_MMAPPED = 0xdc
406 DLT_USER0 = 0x93
407 DLT_USER1 = 0x94
408 DLT_USER10 = 0x9d
409 DLT_USER11 = 0x9e
410 DLT_USER12 = 0x9f
411 DLT_USER13 = 0xa0
412 DLT_USER14 = 0xa1
413 DLT_USER15 = 0xa2
414 DLT_USER2 = 0x95
415 DLT_USER3 = 0x96
416 DLT_USER4 = 0x97
417 DLT_USER5 = 0x98
418 DLT_USER6 = 0x99
419 DLT_USER7 = 0x9a
420 DLT_USER8 = 0x9b
421 DLT_USER9 = 0x9c
422 DLT_WIHART = 0xdf
423 DLT_X2E_SERIAL = 0xd5
424 DLT_X2E_XORAYA = 0xd6
425 DT_BLK = 0x6
426 DT_CHR = 0x2
427 DT_DIR = 0x4
428 DT_FIFO = 0x1
429 DT_LNK = 0xa
430 DT_REG = 0x8
431 DT_SOCK = 0xc
432 DT_UNKNOWN = 0x0
433 DT_WHT = 0xe
434 ECHO = 0x8
435 ECHOCTL = 0x40
436 ECHOE = 0x2
437 ECHOK = 0x4
438 ECHOKE = 0x1
439 ECHONL = 0x10
440 ECHOPRT = 0x20
441 EVFILT_AIO = -0x3
442 EVFILT_EXCEPT = -0xf
443 EVFILT_FS = -0x9
444 EVFILT_MACHPORT = -0x8
445 EVFILT_PROC = -0x5
446 EVFILT_READ = -0x1
447 EVFILT_SIGNAL = -0x6
448 EVFILT_SYSCOUNT = 0x11
449 EVFILT_THREADMARKER = 0x11
450 EVFILT_TIMER = -0x7
451 EVFILT_USER = -0xa
452 EVFILT_VM = -0xc
453 EVFILT_VNODE = -0x4
454 EVFILT_WRITE = -0x2
455 EV_ADD = 0x1
456 EV_CLEAR = 0x20
457 EV_DELETE = 0x2
458 EV_DISABLE = 0x8
459 EV_DISPATCH = 0x80
460 EV_DISPATCH2 = 0x180
461 EV_ENABLE = 0x4
462 EV_EOF = 0x8000
463 EV_ERROR = 0x4000
464 EV_FLAG0 = 0x1000
465 EV_FLAG1 = 0x2000
466 EV_ONESHOT = 0x10
467 EV_OOBAND = 0x2000
468 EV_POLL = 0x1000
469 EV_RECEIPT = 0x40
470 EV_SYSFLAGS = 0xf000
471 EV_UDATA_SPECIFIC = 0x100
472 EV_VANISHED = 0x200
473 EXTA = 0x4b00
474 EXTB = 0x9600
475 EXTPROC = 0x800
476 FD_CLOEXEC = 0x1
477 FD_SETSIZE = 0x400
478 FF0 = 0x0
479 FF1 = 0x4000
480 FFDLY = 0x4000
481 FLUSHO = 0x800000
482 FSOPT_ATTR_CMN_EXTENDED = 0x20
483 FSOPT_NOFOLLOW = 0x1
484 FSOPT_NOINMEMUPDATE = 0x2
485 FSOPT_PACK_INVAL_ATTRS = 0x8
486 FSOPT_REPORT_FULLSIZE = 0x4
487 FSOPT_RETURN_REALDEV = 0x200
488 F_ADDFILESIGS = 0x3d
489 F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
490 F_ADDFILESIGS_INFO = 0x67
491 F_ADDFILESIGS_RETURN = 0x61
492 F_ADDFILESUPPL = 0x68
493 F_ADDSIGS = 0x3b
494 F_ALLOCATEALL = 0x4
495 F_ALLOCATECONTIG = 0x2
496 F_BARRIERFSYNC = 0x55
497 F_CHECK_LV = 0x62
498 F_CHKCLEAN = 0x29
499 F_DUPFD = 0x0
500 F_DUPFD_CLOEXEC = 0x43
501 F_FINDSIGS = 0x4e
502 F_FLUSH_DATA = 0x28
503 F_FREEZE_FS = 0x35
504 F_FULLFSYNC = 0x33
505 F_GETCODEDIR = 0x48
506 F_GETFD = 0x1
507 F_GETFL = 0x3
508 F_GETLK = 0x7
509 F_GETLKPID = 0x42
510 F_GETNOSIGPIPE = 0x4a
511 F_GETOWN = 0x5
512 F_GETPATH = 0x32
513 F_GETPATH_MTMINFO = 0x47
514 F_GETPATH_NOFIRMLINK = 0x66
515 F_GETPROTECTIONCLASS = 0x3f
516 F_GETPROTECTIONLEVEL = 0x4d
517 F_GETSIGSINFO = 0x69
518 F_GLOBAL_NOCACHE = 0x37
519 F_LOG2PHYS = 0x31
520 F_LOG2PHYS_EXT = 0x41
521 F_NOCACHE = 0x30
522 F_NODIRECT = 0x3e
523 F_OK = 0x0
524 F_PATHPKG_CHECK = 0x34
525 F_PEOFPOSMODE = 0x3
526 F_PREALLOCATE = 0x2a
527 F_PUNCHHOLE = 0x63
528 F_RDADVISE = 0x2c
529 F_RDAHEAD = 0x2d
530 F_RDLCK = 0x1
531 F_SETBACKINGSTORE = 0x46
532 F_SETFD = 0x2
533 F_SETFL = 0x4
534 F_SETLK = 0x8
535 F_SETLKW = 0x9
536 F_SETLKWTIMEOUT = 0xa
537 F_SETNOSIGPIPE = 0x49
538 F_SETOWN = 0x6
539 F_SETPROTECTIONCLASS = 0x40
540 F_SETSIZE = 0x2b
541 F_SINGLE_WRITER = 0x4c
542 F_SPECULATIVE_READ = 0x65
543 F_THAW_FS = 0x36
544 F_TRANSCODEKEY = 0x4b
545 F_TRIM_ACTIVE_FILE = 0x64
546 F_UNLCK = 0x2
547 F_VOLPOSMODE = 0x4
548 F_WRLCK = 0x3
549 HUPCL = 0x4000
550 HW_MACHINE = 0x1
551 ICANON = 0x100
552 ICMP6_FILTER = 0x12
553 ICRNL = 0x100
554 IEXTEN = 0x400
555 IFF_ALLMULTI = 0x200
556 IFF_ALTPHYS = 0x4000
557 IFF_BROADCAST = 0x2
558 IFF_DEBUG = 0x4
559 IFF_LINK0 = 0x1000
560 IFF_LINK1 = 0x2000
561 IFF_LINK2 = 0x4000
562 IFF_LOOPBACK = 0x8
563 IFF_MULTICAST = 0x8000
564 IFF_NOARP = 0x80
565 IFF_NOTRAILERS = 0x20
566 IFF_OACTIVE = 0x400
567 IFF_POINTOPOINT = 0x10
568 IFF_PROMISC = 0x100
569 IFF_RUNNING = 0x40
570 IFF_SIMPLEX = 0x800
571 IFF_UP = 0x1
572 IFNAMSIZ = 0x10
573 IFT_1822 = 0x2
574 IFT_6LOWPAN = 0x40
575 IFT_AAL5 = 0x31
576 IFT_ARCNET = 0x23
577 IFT_ARCNETPLUS = 0x24
578 IFT_ATM = 0x25
579 IFT_BRIDGE = 0xd1
580 IFT_CARP = 0xf8
581 IFT_CELLULAR = 0xff
582 IFT_CEPT = 0x13
583 IFT_DS3 = 0x1e
584 IFT_ENC = 0xf4
585 IFT_EON = 0x19
586 IFT_ETHER = 0x6
587 IFT_FAITH = 0x38
588 IFT_FDDI = 0xf
589 IFT_FRELAY = 0x20
590 IFT_FRELAYDCE = 0x2c
591 IFT_GIF = 0x37
592 IFT_HDH1822 = 0x3
593 IFT_HIPPI = 0x2f
594 IFT_HSSI = 0x2e
595 IFT_HY = 0xe
596 IFT_IEEE1394 = 0x90
597 IFT_IEEE8023ADLAG = 0x88
598 IFT_ISDNBASIC = 0x14
599 IFT_ISDNPRIMARY = 0x15
600 IFT_ISO88022LLC = 0x29
601 IFT_ISO88023 = 0x7
602 IFT_ISO88024 = 0x8
603 IFT_ISO88025 = 0x9
604 IFT_ISO88026 = 0xa
605 IFT_L2VLAN = 0x87
606 IFT_LAPB = 0x10
607 IFT_LOCALTALK = 0x2a
608 IFT_LOOP = 0x18
609 IFT_MIOX25 = 0x26
610 IFT_MODEM = 0x30
611 IFT_NSIP = 0x1b
612 IFT_OTHER = 0x1
613 IFT_P10 = 0xc
614 IFT_P80 = 0xd
615 IFT_PARA = 0x22
616 IFT_PDP = 0xff
617 IFT_PFLOG = 0xf5
618 IFT_PFSYNC = 0xf6
619 IFT_PKTAP = 0xfe
620 IFT_PPP = 0x17
621 IFT_PROPMUX = 0x36
622 IFT_PROPVIRTUAL = 0x35
623 IFT_PTPSERIAL = 0x16
624 IFT_RS232 = 0x21
625 IFT_SDLC = 0x11
626 IFT_SIP = 0x1f
627 IFT_SLIP = 0x1c
628 IFT_SMDSDXI = 0x2b
629 IFT_SMDSICIP = 0x34
630 IFT_SONET = 0x27
631 IFT_SONETPATH = 0x32
632 IFT_SONETVT = 0x33
633 IFT_STARLAN = 0xb
634 IFT_STF = 0x39
635 IFT_T1 = 0x12
636 IFT_ULTRA = 0x1d
637 IFT_V35 = 0x2d
638 IFT_X25 = 0x5
639 IFT_X25DDN = 0x4
640 IFT_X25PLE = 0x28
641 IFT_XETHER = 0x1a
642 IGNBRK = 0x1
643 IGNCR = 0x80
644 IGNPAR = 0x4
645 IMAXBEL = 0x2000
646 INLCR = 0x40
647 INPCK = 0x10
648 IN_CLASSA_HOST = 0xffffff
649 IN_CLASSA_MAX = 0x80
650 IN_CLASSA_NET = 0xff000000
651 IN_CLASSA_NSHIFT = 0x18
652 IN_CLASSB_HOST = 0xffff
653 IN_CLASSB_MAX = 0x10000
654 IN_CLASSB_NET = 0xffff0000
655 IN_CLASSB_NSHIFT = 0x10
656 IN_CLASSC_HOST = 0xff
657 IN_CLASSC_NET = 0xffffff00
658 IN_CLASSC_NSHIFT = 0x8
659 IN_CLASSD_HOST = 0xfffffff
660 IN_CLASSD_NET = 0xf0000000
661 IN_CLASSD_NSHIFT = 0x1c
662 IN_LINKLOCALNETNUM = 0xa9fe0000
663 IN_LOOPBACKNET = 0x7f
664 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1
665 IPPROTO_3PC = 0x22
666 IPPROTO_ADFS = 0x44
667 IPPROTO_AH = 0x33
668 IPPROTO_AHIP = 0x3d
669 IPPROTO_APES = 0x63
670 IPPROTO_ARGUS = 0xd
671 IPPROTO_AX25 = 0x5d
672 IPPROTO_BHA = 0x31
673 IPPROTO_BLT = 0x1e
674 IPPROTO_BRSATMON = 0x4c
675 IPPROTO_CFTP = 0x3e
676 IPPROTO_CHAOS = 0x10
677 IPPROTO_CMTP = 0x26
678 IPPROTO_CPHB = 0x49
679 IPPROTO_CPNX = 0x48
680 IPPROTO_DDP = 0x25
681 IPPROTO_DGP = 0x56
682 IPPROTO_DIVERT = 0xfe
683 IPPROTO_DONE = 0x101
684 IPPROTO_DSTOPTS = 0x3c
685 IPPROTO_EGP = 0x8
686 IPPROTO_EMCON = 0xe
687 IPPROTO_ENCAP = 0x62
688 IPPROTO_EON = 0x50
689 IPPROTO_ESP = 0x32
690 IPPROTO_ETHERIP = 0x61
691 IPPROTO_FRAGMENT = 0x2c
692 IPPROTO_GGP = 0x3
693 IPPROTO_GMTP = 0x64
694 IPPROTO_GRE = 0x2f
695 IPPROTO_HELLO = 0x3f
696 IPPROTO_HMP = 0x14
697 IPPROTO_HOPOPTS = 0x0
698 IPPROTO_ICMP = 0x1
699 IPPROTO_ICMPV6 = 0x3a
700 IPPROTO_IDP = 0x16
701 IPPROTO_IDPR = 0x23
702 IPPROTO_IDRP = 0x2d
703 IPPROTO_IGMP = 0x2
704 IPPROTO_IGP = 0x55
705 IPPROTO_IGRP = 0x58
706 IPPROTO_IL = 0x28
707 IPPROTO_INLSP = 0x34
708 IPPROTO_INP = 0x20
709 IPPROTO_IP = 0x0
710 IPPROTO_IPCOMP = 0x6c
711 IPPROTO_IPCV = 0x47
712 IPPROTO_IPEIP = 0x5e
713 IPPROTO_IPIP = 0x4
714 IPPROTO_IPPC = 0x43
715 IPPROTO_IPV4 = 0x4
716 IPPROTO_IPV6 = 0x29
717 IPPROTO_IRTP = 0x1c
718 IPPROTO_KRYPTOLAN = 0x41
719 IPPROTO_LARP = 0x5b
720 IPPROTO_LEAF1 = 0x19
721 IPPROTO_LEAF2 = 0x1a
722 IPPROTO_MAX = 0x100
723 IPPROTO_MAXID = 0x34
724 IPPROTO_MEAS = 0x13
725 IPPROTO_MHRP = 0x30
726 IPPROTO_MICP = 0x5f
727 IPPROTO_MTP = 0x5c
728 IPPROTO_MUX = 0x12
729 IPPROTO_ND = 0x4d
730 IPPROTO_NHRP = 0x36
731 IPPROTO_NONE = 0x3b
732 IPPROTO_NSP = 0x1f
733 IPPROTO_NVPII = 0xb
734 IPPROTO_OSPFIGP = 0x59
735 IPPROTO_PGM = 0x71
736 IPPROTO_PIGP = 0x9
737 IPPROTO_PIM = 0x67
738 IPPROTO_PRM = 0x15
739 IPPROTO_PUP = 0xc
740 IPPROTO_PVP = 0x4b
741 IPPROTO_RAW = 0xff
742 IPPROTO_RCCMON = 0xa
743 IPPROTO_RDP = 0x1b
744 IPPROTO_ROUTING = 0x2b
745 IPPROTO_RSVP = 0x2e
746 IPPROTO_RVD = 0x42
747 IPPROTO_SATEXPAK = 0x40
748 IPPROTO_SATMON = 0x45
749 IPPROTO_SCCSP = 0x60
750 IPPROTO_SCTP = 0x84
751 IPPROTO_SDRP = 0x2a
752 IPPROTO_SEP = 0x21
753 IPPROTO_SRPC = 0x5a
754 IPPROTO_ST = 0x7
755 IPPROTO_SVMTP = 0x52
756 IPPROTO_SWIPE = 0x35
757 IPPROTO_TCF = 0x57
758 IPPROTO_TCP = 0x6
759 IPPROTO_TP = 0x1d
760 IPPROTO_TPXX = 0x27
761 IPPROTO_TRUNK1 = 0x17
762 IPPROTO_TRUNK2 = 0x18
763 IPPROTO_TTP = 0x54
764 IPPROTO_UDP = 0x11
765 IPPROTO_VINES = 0x53
766 IPPROTO_VISA = 0x46
767 IPPROTO_VMTP = 0x51
768 IPPROTO_WBEXPAK = 0x4f
769 IPPROTO_WBMON = 0x4e
770 IPPROTO_WSN = 0x4a
771 IPPROTO_XNET = 0xf
772 IPPROTO_XTP = 0x24
773 IPV6_2292DSTOPTS = 0x17
774 IPV6_2292HOPLIMIT = 0x14
775 IPV6_2292HOPOPTS = 0x16
776 IPV6_2292NEXTHOP = 0x15
777 IPV6_2292PKTINFO = 0x13
778 IPV6_2292PKTOPTIONS = 0x19
779 IPV6_2292RTHDR = 0x18
780 IPV6_3542DSTOPTS = 0x32
781 IPV6_3542HOPLIMIT = 0x2f
782 IPV6_3542HOPOPTS = 0x31
783 IPV6_3542NEXTHOP = 0x30
784 IPV6_3542PKTINFO = 0x2e
785 IPV6_3542RTHDR = 0x33
786 IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
787 IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
788 IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
789 IPV6_AUTOFLOWLABEL = 0x3b
790 IPV6_BINDV6ONLY = 0x1b
791 IPV6_BOUND_IF = 0x7d
792 IPV6_CHECKSUM = 0x1a
793 IPV6_DEFAULT_MULTICAST_HOPS = 0x1
794 IPV6_DEFAULT_MULTICAST_LOOP = 0x1
795 IPV6_DEFHLIM = 0x40
796 IPV6_DONTFRAG = 0x3e
797 IPV6_DSTOPTS = 0x32
798 IPV6_FAITH = 0x1d
799 IPV6_FLOWINFO_MASK = 0xffffff0f
800 IPV6_FLOWLABEL_MASK = 0xffff0f00
801 IPV6_FLOW_ECN_MASK = 0x3000
802 IPV6_FRAGTTL = 0x3c
803 IPV6_FW_ADD = 0x1e
804 IPV6_FW_DEL = 0x1f
805 IPV6_FW_FLUSH = 0x20
806 IPV6_FW_GET = 0x22
807 IPV6_FW_ZERO = 0x21
808 IPV6_HLIMDEC = 0x1
809 IPV6_HOPLIMIT = 0x2f
810 IPV6_HOPOPTS = 0x31
811 IPV6_IPSEC_POLICY = 0x1c
812 IPV6_JOIN_GROUP = 0xc
813 IPV6_LEAVE_GROUP = 0xd
814 IPV6_MAXHLIM = 0xff
815 IPV6_MAXOPTHDR = 0x800
816 IPV6_MAXPACKET = 0xffff
817 IPV6_MAX_GROUP_SRC_FILTER = 0x200
818 IPV6_MAX_MEMBERSHIPS = 0xfff
819 IPV6_MAX_SOCK_SRC_FILTER = 0x80
820 IPV6_MIN_MEMBERSHIPS = 0x1f
821 IPV6_MMTU = 0x500
822 IPV6_MSFILTER = 0x4a
823 IPV6_MULTICAST_HOPS = 0xa
824 IPV6_MULTICAST_IF = 0x9
825 IPV6_MULTICAST_LOOP = 0xb
826 IPV6_NEXTHOP = 0x30
827 IPV6_PATHMTU = 0x2c
828 IPV6_PKTINFO = 0x2e
829 IPV6_PORTRANGE = 0xe
830 IPV6_PORTRANGE_DEFAULT = 0x0
831 IPV6_PORTRANGE_HIGH = 0x1
832 IPV6_PORTRANGE_LOW = 0x2
833 IPV6_PREFER_TEMPADDR = 0x3f
834 IPV6_RECVDSTOPTS = 0x28
835 IPV6_RECVHOPLIMIT = 0x25
836 IPV6_RECVHOPOPTS = 0x27
837 IPV6_RECVPATHMTU = 0x2b
838 IPV6_RECVPKTINFO = 0x3d
839 IPV6_RECVRTHDR = 0x26
840 IPV6_RECVTCLASS = 0x23
841 IPV6_RTHDR = 0x33
842 IPV6_RTHDRDSTOPTS = 0x39
843 IPV6_RTHDR_LOOSE = 0x0
844 IPV6_RTHDR_STRICT = 0x1
845 IPV6_RTHDR_TYPE_0 = 0x0
846 IPV6_SOCKOPT_RESERVED1 = 0x3
847 IPV6_TCLASS = 0x24
848 IPV6_UNICAST_HOPS = 0x4
849 IPV6_USE_MIN_MTU = 0x2a
850 IPV6_V6ONLY = 0x1b
851 IPV6_VERSION = 0x60
852 IPV6_VERSION_MASK = 0xf0
853 IP_ADD_MEMBERSHIP = 0xc
854 IP_ADD_SOURCE_MEMBERSHIP = 0x46
855 IP_BLOCK_SOURCE = 0x48
856 IP_BOUND_IF = 0x19
857 IP_DEFAULT_MULTICAST_LOOP = 0x1
858 IP_DEFAULT_MULTICAST_TTL = 0x1
859 IP_DF = 0x4000
860 IP_DONTFRAG = 0x1c
861 IP_DROP_MEMBERSHIP = 0xd
862 IP_DROP_SOURCE_MEMBERSHIP = 0x47
863 IP_DUMMYNET_CONFIGURE = 0x3c
864 IP_DUMMYNET_DEL = 0x3d
865 IP_DUMMYNET_FLUSH = 0x3e
866 IP_DUMMYNET_GET = 0x40
867 IP_FAITH = 0x16
868 IP_FW_ADD = 0x28
869 IP_FW_DEL = 0x29
870 IP_FW_FLUSH = 0x2a
871 IP_FW_GET = 0x2c
872 IP_FW_RESETLOG = 0x2d
873 IP_FW_ZERO = 0x2b
874 IP_HDRINCL = 0x2
875 IP_IPSEC_POLICY = 0x15
876 IP_MAXPACKET = 0xffff
877 IP_MAX_GROUP_SRC_FILTER = 0x200
878 IP_MAX_MEMBERSHIPS = 0xfff
879 IP_MAX_SOCK_MUTE_FILTER = 0x80
880 IP_MAX_SOCK_SRC_FILTER = 0x80
881 IP_MF = 0x2000
882 IP_MIN_MEMBERSHIPS = 0x1f
883 IP_MSFILTER = 0x4a
884 IP_MSS = 0x240
885 IP_MULTICAST_IF = 0x9
886 IP_MULTICAST_IFINDEX = 0x42
887 IP_MULTICAST_LOOP = 0xb
888 IP_MULTICAST_TTL = 0xa
889 IP_MULTICAST_VIF = 0xe
890 IP_NAT__XXX = 0x37
891 IP_OFFMASK = 0x1fff
892 IP_OLD_FW_ADD = 0x32
893 IP_OLD_FW_DEL = 0x33
894 IP_OLD_FW_FLUSH = 0x34
895 IP_OLD_FW_GET = 0x36
896 IP_OLD_FW_RESETLOG = 0x38
897 IP_OLD_FW_ZERO = 0x35
898 IP_OPTIONS = 0x1
899 IP_PKTINFO = 0x1a
900 IP_PORTRANGE = 0x13
901 IP_PORTRANGE_DEFAULT = 0x0
902 IP_PORTRANGE_HIGH = 0x1
903 IP_PORTRANGE_LOW = 0x2
904 IP_RECVDSTADDR = 0x7
905 IP_RECVIF = 0x14
906 IP_RECVOPTS = 0x5
907 IP_RECVPKTINFO = 0x1a
908 IP_RECVRETOPTS = 0x6
909 IP_RECVTOS = 0x1b
910 IP_RECVTTL = 0x18
911 IP_RETOPTS = 0x8
912 IP_RF = 0x8000
913 IP_RSVP_OFF = 0x10
914 IP_RSVP_ON = 0xf
915 IP_RSVP_VIF_OFF = 0x12
916 IP_RSVP_VIF_ON = 0x11
917 IP_STRIPHDR = 0x17
918 IP_TOS = 0x3
919 IP_TRAFFIC_MGT_BACKGROUND = 0x41
920 IP_TTL = 0x4
921 IP_UNBLOCK_SOURCE = 0x49
922 ISIG = 0x80
923 ISTRIP = 0x20
924 IUTF8 = 0x4000
925 IXANY = 0x800
926 IXOFF = 0x400
927 IXON = 0x200
928 KERN_HOSTNAME = 0xa
929 KERN_OSRELEASE = 0x2
930 KERN_OSTYPE = 0x1
931 KERN_VERSION = 0x4
932 LOCAL_PEERCRED = 0x1
933 LOCAL_PEEREPID = 0x3
934 LOCAL_PEEREUUID = 0x5
935 LOCAL_PEERPID = 0x2
936 LOCAL_PEERTOKEN = 0x6
937 LOCAL_PEERUUID = 0x4
938 LOCK_EX = 0x2
939 LOCK_NB = 0x4
940 LOCK_SH = 0x1
941 LOCK_UN = 0x8
942 MADV_CAN_REUSE = 0x9
943 MADV_DONTNEED = 0x4
944 MADV_FREE = 0x5
945 MADV_FREE_REUSABLE = 0x7
946 MADV_FREE_REUSE = 0x8
947 MADV_NORMAL = 0x0
948 MADV_PAGEOUT = 0xa
949 MADV_RANDOM = 0x1
950 MADV_SEQUENTIAL = 0x2
951 MADV_WILLNEED = 0x3
952 MADV_ZERO_WIRED_PAGES = 0x6
953 MAP_32BIT = 0x8000
954 MAP_ANON = 0x1000
955 MAP_ANONYMOUS = 0x1000
956 MAP_COPY = 0x2
957 MAP_FILE = 0x0
958 MAP_FIXED = 0x10
959 MAP_HASSEMAPHORE = 0x200
960 MAP_JIT = 0x800
961 MAP_NOCACHE = 0x400
962 MAP_NOEXTEND = 0x100
963 MAP_NORESERVE = 0x40
964 MAP_PRIVATE = 0x2
965 MAP_RENAME = 0x20
966 MAP_RESERVED0080 = 0x80
967 MAP_RESILIENT_CODESIGN = 0x2000
968 MAP_RESILIENT_MEDIA = 0x4000
969 MAP_SHARED = 0x1
970 MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000
971 MAP_UNIX03 = 0x40000
972 MCAST_BLOCK_SOURCE = 0x54
973 MCAST_EXCLUDE = 0x2
974 MCAST_INCLUDE = 0x1
975 MCAST_JOIN_GROUP = 0x50
976 MCAST_JOIN_SOURCE_GROUP = 0x52
977 MCAST_LEAVE_GROUP = 0x51
978 MCAST_LEAVE_SOURCE_GROUP = 0x53
979 MCAST_UNBLOCK_SOURCE = 0x55
980 MCAST_UNDEFINED = 0x0
981 MCL_CURRENT = 0x1
982 MCL_FUTURE = 0x2
983 MNT_ASYNC = 0x40
984 MNT_AUTOMOUNTED = 0x400000
985 MNT_CMDFLAGS = 0xf0000
986 MNT_CPROTECT = 0x80
987 MNT_DEFWRITE = 0x2000000
988 MNT_DONTBROWSE = 0x100000
989 MNT_DOVOLFS = 0x8000
990 MNT_DWAIT = 0x4
991 MNT_EXPORTED = 0x100
992 MNT_EXT_ROOT_DATA_VOL = 0x1
993 MNT_FORCE = 0x80000
994 MNT_IGNORE_OWNERSHIP = 0x200000
995 MNT_JOURNALED = 0x800000
996 MNT_LOCAL = 0x1000
997 MNT_MULTILABEL = 0x4000000
998 MNT_NOATIME = 0x10000000
999 MNT_NOBLOCK = 0x20000
1000 MNT_NODEV = 0x10
1001 MNT_NOEXEC = 0x4
1002 MNT_NOSUID = 0x8
1003 MNT_NOUSERXATTR = 0x1000000
1004 MNT_NOWAIT = 0x2
1005 MNT_QUARANTINE = 0x400
1006 MNT_QUOTA = 0x2000
1007 MNT_RDONLY = 0x1
1008 MNT_RELOAD = 0x40000
1009 MNT_REMOVABLE = 0x200
1010 MNT_ROOTFS = 0x4000
1011 MNT_SNAPSHOT = 0x40000000
1012 MNT_STRICTATIME = 0x80000000
1013 MNT_SYNCHRONOUS = 0x2
1014 MNT_UNION = 0x20
1015 MNT_UNKNOWNPERMISSIONS = 0x200000
1016 MNT_UPDATE = 0x10000
1017 MNT_VISFLAGMASK = 0xd7f0f7ff
1018 MNT_WAIT = 0x1
1019 MSG_CTRUNC = 0x20
1020 MSG_DONTROUTE = 0x4
1021 MSG_DONTWAIT = 0x80
1022 MSG_EOF = 0x100
1023 MSG_EOR = 0x8
1024 MSG_FLUSH = 0x400
1025 MSG_HAVEMORE = 0x2000
1026 MSG_HOLD = 0x800
1027 MSG_NEEDSA = 0x10000
1028 MSG_NOSIGNAL = 0x80000
1029 MSG_OOB = 0x1
1030 MSG_PEEK = 0x2
1031 MSG_RCVMORE = 0x4000
1032 MSG_SEND = 0x1000
1033 MSG_TRUNC = 0x10
1034 MSG_WAITALL = 0x40
1035 MSG_WAITSTREAM = 0x200
1036 MS_ASYNC = 0x1
1037 MS_DEACTIVATE = 0x8
1038 MS_INVALIDATE = 0x2
1039 MS_KILLPAGES = 0x4
1040 MS_SYNC = 0x10
1041 NAME_MAX = 0xff
1042 NET_RT_DUMP = 0x1
1043 NET_RT_DUMP2 = 0x7
1044 NET_RT_FLAGS = 0x2
1045 NET_RT_FLAGS_PRIV = 0xa
1046 NET_RT_IFLIST = 0x3
1047 NET_RT_IFLIST2 = 0x6
1048 NET_RT_MAXID = 0xb
1049 NET_RT_STAT = 0x4
1050 NET_RT_TRASH = 0x5
1051 NFDBITS = 0x20
1052 NL0 = 0x0
1053 NL1 = 0x100
1054 NL2 = 0x200
1055 NL3 = 0x300
1056 NLDLY = 0x300
1057 NOFLSH = 0x80000000
1058 NOKERNINFO = 0x2000000
1059 NOTE_ABSOLUTE = 0x8
1060 NOTE_ATTRIB = 0x8
1061 NOTE_BACKGROUND = 0x40
1062 NOTE_CHILD = 0x4
1063 NOTE_CRITICAL = 0x20
1064 NOTE_DELETE = 0x1
1065 NOTE_EXEC = 0x20000000
1066 NOTE_EXIT = 0x80000000
1067 NOTE_EXITSTATUS = 0x4000000
1068 NOTE_EXIT_CSERROR = 0x40000
1069 NOTE_EXIT_DECRYPTFAIL = 0x10000
1070 NOTE_EXIT_DETAIL = 0x2000000
1071 NOTE_EXIT_DETAIL_MASK = 0x70000
1072 NOTE_EXIT_MEMORY = 0x20000
1073 NOTE_EXIT_REPARENTED = 0x80000
1074 NOTE_EXTEND = 0x4
1075 NOTE_FFAND = 0x40000000
1076 NOTE_FFCOPY = 0xc0000000
1077 NOTE_FFCTRLMASK = 0xc0000000
1078 NOTE_FFLAGSMASK = 0xffffff
1079 NOTE_FFNOP = 0x0
1080 NOTE_FFOR = 0x80000000
1081 NOTE_FORK = 0x40000000
1082 NOTE_FUNLOCK = 0x100
1083 NOTE_LEEWAY = 0x10
1084 NOTE_LINK = 0x10
1085 NOTE_LOWAT = 0x1
1086 NOTE_MACHTIME = 0x100
1087 NOTE_MACH_CONTINUOUS_TIME = 0x80
1088 NOTE_NONE = 0x80
1089 NOTE_NSECONDS = 0x4
1090 NOTE_OOB = 0x2
1091 NOTE_PCTRLMASK = -0x100000
1092 NOTE_PDATAMASK = 0xfffff
1093 NOTE_REAP = 0x10000000
1094 NOTE_RENAME = 0x20
1095 NOTE_REVOKE = 0x40
1096 NOTE_SECONDS = 0x1
1097 NOTE_SIGNAL = 0x8000000
1098 NOTE_TRACK = 0x1
1099 NOTE_TRACKERR = 0x2
1100 NOTE_TRIGGER = 0x1000000
1101 NOTE_USECONDS = 0x2
1102 NOTE_VM_ERROR = 0x10000000
1103 NOTE_VM_PRESSURE = 0x80000000
1104 NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
1105 NOTE_VM_PRESSURE_TERMINATE = 0x40000000
1106 NOTE_WRITE = 0x2
1107 OCRNL = 0x10
1108 OFDEL = 0x20000
1109 OFILL = 0x80
1110 ONLCR = 0x2
1111 ONLRET = 0x40
1112 ONOCR = 0x20
1113 ONOEOT = 0x8
1114 OPOST = 0x1
1115 OXTABS = 0x4
1116 O_ACCMODE = 0x3
1117 O_ALERT = 0x20000000
1118 O_APPEND = 0x8
1119 O_ASYNC = 0x40
1120 O_CLOEXEC = 0x1000000
1121 O_CREAT = 0x200
1122 O_DIRECTORY = 0x100000
1123 O_DP_GETRAWENCRYPTED = 0x1
1124 O_DP_GETRAWUNENCRYPTED = 0x2
1125 O_DSYNC = 0x400000
1126 O_EVTONLY = 0x8000
1127 O_EXCL = 0x800
1128 O_EXLOCK = 0x20
1129 O_FSYNC = 0x80
1130 O_NDELAY = 0x4
1131 O_NOCTTY = 0x20000
1132 O_NOFOLLOW = 0x100
1133 O_NOFOLLOW_ANY = 0x20000000
1134 O_NONBLOCK = 0x4
1135 O_POPUP = 0x80000000
1136 O_RDONLY = 0x0
1137 O_RDWR = 0x2
1138 O_SHLOCK = 0x10
1139 O_SYMLINK = 0x200000
1140 O_SYNC = 0x80
1141 O_TRUNC = 0x400
1142 O_WRONLY = 0x1
1143 PARENB = 0x1000
1144 PARMRK = 0x8
1145 PARODD = 0x2000
1146 PENDIN = 0x20000000
1147 PRIO_PGRP = 0x1
1148 PRIO_PROCESS = 0x0
1149 PRIO_USER = 0x2
1150 PROT_EXEC = 0x4
1151 PROT_NONE = 0x0
1152 PROT_READ = 0x1
1153 PROT_WRITE = 0x2
1154 PT_ATTACH = 0xa
1155 PT_ATTACHEXC = 0xe
1156 PT_CONTINUE = 0x7
1157 PT_DENY_ATTACH = 0x1f
1158 PT_DETACH = 0xb
1159 PT_FIRSTMACH = 0x20
1160 PT_FORCEQUOTA = 0x1e
1161 PT_KILL = 0x8
1162 PT_READ_D = 0x2
1163 PT_READ_I = 0x1
1164 PT_READ_U = 0x3
1165 PT_SIGEXC = 0xc
1166 PT_STEP = 0x9
1167 PT_THUPDATE = 0xd
1168 PT_TRACE_ME = 0x0
1169 PT_WRITE_D = 0x5
1170 PT_WRITE_I = 0x4
1171 PT_WRITE_U = 0x6
1172 RLIMIT_AS = 0x5
1173 RLIMIT_CORE = 0x4
1174 RLIMIT_CPU = 0x0
1175 RLIMIT_CPU_USAGE_MONITOR = 0x2
1176 RLIMIT_DATA = 0x2
1177 RLIMIT_FSIZE = 0x1
1178 RLIMIT_MEMLOCK = 0x6
1179 RLIMIT_NOFILE = 0x8
1180 RLIMIT_NPROC = 0x7
1181 RLIMIT_RSS = 0x5
1182 RLIMIT_STACK = 0x3
1183 RLIM_INFINITY = 0x7fffffffffffffff
1184 RTAX_AUTHOR = 0x6
1185 RTAX_BRD = 0x7
1186 RTAX_DST = 0x0
1187 RTAX_GATEWAY = 0x1
1188 RTAX_GENMASK = 0x3
1189 RTAX_IFA = 0x5
1190 RTAX_IFP = 0x4
1191 RTAX_MAX = 0x8
1192 RTAX_NETMASK = 0x2
1193 RTA_AUTHOR = 0x40
1194 RTA_BRD = 0x80
1195 RTA_DST = 0x1
1196 RTA_GATEWAY = 0x2
1197 RTA_GENMASK = 0x8
1198 RTA_IFA = 0x20
1199 RTA_IFP = 0x10
1200 RTA_NETMASK = 0x4
1201 RTF_BLACKHOLE = 0x1000
1202 RTF_BROADCAST = 0x400000
1203 RTF_CLONING = 0x100
1204 RTF_CONDEMNED = 0x2000000
1205 RTF_DEAD = 0x20000000
1206 RTF_DELCLONE = 0x80
1207 RTF_DONE = 0x40
1208 RTF_DYNAMIC = 0x10
1209 RTF_GATEWAY = 0x2
1210 RTF_GLOBAL = 0x40000000
1211 RTF_HOST = 0x4
1212 RTF_IFREF = 0x4000000
1213 RTF_IFSCOPE = 0x1000000
1214 RTF_LLDATA = 0x400
1215 RTF_LLINFO = 0x400
1216 RTF_LOCAL = 0x200000
1217 RTF_MODIFIED = 0x20
1218 RTF_MULTICAST = 0x800000
1219 RTF_NOIFREF = 0x2000
1220 RTF_PINNED = 0x100000
1221 RTF_PRCLONING = 0x10000
1222 RTF_PROTO1 = 0x8000
1223 RTF_PROTO2 = 0x4000
1224 RTF_PROTO3 = 0x40000
1225 RTF_PROXY = 0x8000000
1226 RTF_REJECT = 0x8
1227 RTF_ROUTER = 0x10000000
1228 RTF_STATIC = 0x800
1229 RTF_UP = 0x1
1230 RTF_WASCLONED = 0x20000
1231 RTF_XRESOLVE = 0x200
1232 RTM_ADD = 0x1
1233 RTM_CHANGE = 0x3
1234 RTM_DELADDR = 0xd
1235 RTM_DELETE = 0x2
1236 RTM_DELMADDR = 0x10
1237 RTM_GET = 0x4
1238 RTM_GET2 = 0x14
1239 RTM_IFINFO = 0xe
1240 RTM_IFINFO2 = 0x12
1241 RTM_LOCK = 0x8
1242 RTM_LOSING = 0x5
1243 RTM_MISS = 0x7
1244 RTM_NEWADDR = 0xc
1245 RTM_NEWMADDR = 0xf
1246 RTM_NEWMADDR2 = 0x13
1247 RTM_OLDADD = 0x9
1248 RTM_OLDDEL = 0xa
1249 RTM_REDIRECT = 0x6
1250 RTM_RESOLVE = 0xb
1251 RTM_RTTUNIT = 0xf4240
1252 RTM_VERSION = 0x5
1253 RTV_EXPIRE = 0x4
1254 RTV_HOPCOUNT = 0x2
1255 RTV_MTU = 0x1
1256 RTV_RPIPE = 0x8
1257 RTV_RTT = 0x40
1258 RTV_RTTVAR = 0x80
1259 RTV_SPIPE = 0x10
1260 RTV_SSTHRESH = 0x20
1261 RUSAGE_CHILDREN = -0x1
1262 RUSAGE_SELF = 0x0
1263 SCM_CREDS = 0x3
1264 SCM_RIGHTS = 0x1
1265 SCM_TIMESTAMP = 0x2
1266 SCM_TIMESTAMP_MONOTONIC = 0x4
1267 SEEK_CUR = 0x1
1268 SEEK_DATA = 0x4
1269 SEEK_END = 0x2
1270 SEEK_HOLE = 0x3
1271 SEEK_SET = 0x0
1272 SHUT_RD = 0x0
1273 SHUT_RDWR = 0x2
1274 SHUT_WR = 0x1
1275 SIOCADDMULTI = 0x80206931
1276 SIOCAIFADDR = 0x8040691a
1277 SIOCARPIPLL = 0xc0206928
1278 SIOCATMARK = 0x40047307
1279 SIOCAUTOADDR = 0xc0206926
1280 SIOCAUTONETMASK = 0x80206927
1281 SIOCDELMULTI = 0x80206932
1282 SIOCDIFADDR = 0x80206919
1283 SIOCDIFPHYADDR = 0x80206941
1284 SIOCGDRVSPEC = 0xc028697b
1285 SIOCGETVLAN = 0xc020697f
1286 SIOCGHIWAT = 0x40047301
1287 SIOCGIF6LOWPAN = 0xc02069c5
1288 SIOCGIFADDR = 0xc0206921
1289 SIOCGIFALTMTU = 0xc0206948
1290 SIOCGIFASYNCMAP = 0xc020697c
1291 SIOCGIFBOND = 0xc0206947
1292 SIOCGIFBRDADDR = 0xc0206923
1293 SIOCGIFCAP = 0xc020695b
1294 SIOCGIFCONF = 0xc00c6924
1295 SIOCGIFDEVMTU = 0xc0206944
1296 SIOCGIFDSTADDR = 0xc0206922
1297 SIOCGIFFLAGS = 0xc0206911
1298 SIOCGIFFUNCTIONALTYPE = 0xc02069ad
1299 SIOCGIFGENERIC = 0xc020693a
1300 SIOCGIFKPI = 0xc0206987
1301 SIOCGIFMAC = 0xc0206982
1302 SIOCGIFMEDIA = 0xc02c6938
1303 SIOCGIFMETRIC = 0xc0206917
1304 SIOCGIFMTU = 0xc0206933
1305 SIOCGIFNETMASK = 0xc0206925
1306 SIOCGIFPDSTADDR = 0xc0206940
1307 SIOCGIFPHYS = 0xc0206935
1308 SIOCGIFPSRCADDR = 0xc020693f
1309 SIOCGIFSTATUS = 0xc331693d
1310 SIOCGIFVLAN = 0xc020697f
1311 SIOCGIFWAKEFLAGS = 0xc0206988
1312 SIOCGIFXMEDIA = 0xc02c6948
1313 SIOCGLOWAT = 0x40047303
1314 SIOCGPGRP = 0x40047309
1315 SIOCIFCREATE = 0xc0206978
1316 SIOCIFCREATE2 = 0xc020697a
1317 SIOCIFDESTROY = 0x80206979
1318 SIOCIFGCLONERS = 0xc0106981
1319 SIOCRSLVMULTI = 0xc010693b
1320 SIOCSDRVSPEC = 0x8028697b
1321 SIOCSETVLAN = 0x8020697e
1322 SIOCSHIWAT = 0x80047300
1323 SIOCSIF6LOWPAN = 0x802069c4
1324 SIOCSIFADDR = 0x8020690c
1325 SIOCSIFALTMTU = 0x80206945
1326 SIOCSIFASYNCMAP = 0x8020697d
1327 SIOCSIFBOND = 0x80206946
1328 SIOCSIFBRDADDR = 0x80206913
1329 SIOCSIFCAP = 0x8020695a
1330 SIOCSIFDSTADDR = 0x8020690e
1331 SIOCSIFFLAGS = 0x80206910
1332 SIOCSIFGENERIC = 0x80206939
1333 SIOCSIFKPI = 0x80206986
1334 SIOCSIFLLADDR = 0x8020693c
1335 SIOCSIFMAC = 0x80206983
1336 SIOCSIFMEDIA = 0xc0206937
1337 SIOCSIFMETRIC = 0x80206918
1338 SIOCSIFMTU = 0x80206934
1339 SIOCSIFNETMASK = 0x80206916
1340 SIOCSIFPHYADDR = 0x8040693e
1341 SIOCSIFPHYS = 0x80206936
1342 SIOCSIFVLAN = 0x8020697e
1343 SIOCSLOWAT = 0x80047302
1344 SIOCSPGRP = 0x80047308
1345 SOCK_DGRAM = 0x2
1346 SOCK_MAXADDRLEN = 0xff
1347 SOCK_RAW = 0x3
1348 SOCK_RDM = 0x4
1349 SOCK_SEQPACKET = 0x5
1350 SOCK_STREAM = 0x1
1351 SOL_LOCAL = 0x0
1352 SOL_SOCKET = 0xffff
1353 SOMAXCONN = 0x80
1354 SO_ACCEPTCONN = 0x2
1355 SO_BROADCAST = 0x20
1356 SO_DEBUG = 0x1
1357 SO_DONTROUTE = 0x10
1358 SO_DONTTRUNC = 0x2000
1359 SO_ERROR = 0x1007
1360 SO_KEEPALIVE = 0x8
1361 SO_LABEL = 0x1010
1362 SO_LINGER = 0x80
1363 SO_LINGER_SEC = 0x1080
1364 SO_NETSVC_MARKING_LEVEL = 0x1119
1365 SO_NET_SERVICE_TYPE = 0x1116
1366 SO_NKE = 0x1021
1367 SO_NOADDRERR = 0x1023
1368 SO_NOSIGPIPE = 0x1022
1369 SO_NOTIFYCONFLICT = 0x1026
1370 SO_NP_EXTENSIONS = 0x1083
1371 SO_NREAD = 0x1020
1372 SO_NUMRCVPKT = 0x1112
1373 SO_NWRITE = 0x1024
1374 SO_OOBINLINE = 0x100
1375 SO_PEERLABEL = 0x1011
1376 SO_RANDOMPORT = 0x1082
1377 SO_RCVBUF = 0x1002
1378 SO_RCVLOWAT = 0x1004
1379 SO_RCVTIMEO = 0x1006
1380 SO_REUSEADDR = 0x4
1381 SO_REUSEPORT = 0x200
1382 SO_REUSESHAREUID = 0x1025
1383 SO_SNDBUF = 0x1001
1384 SO_SNDLOWAT = 0x1003
1385 SO_SNDTIMEO = 0x1005
1386 SO_TIMESTAMP = 0x400
1387 SO_TIMESTAMP_MONOTONIC = 0x800
1388 SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
1389 SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
1390 SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2
1391 SO_TRACKER_TRANSPARENCY_VERSION = 0x3
1392 SO_TYPE = 0x1008
1393 SO_UPCALLCLOSEWAIT = 0x1027
1394 SO_USELOOPBACK = 0x40
1395 SO_WANTMORE = 0x4000
1396 SO_WANTOOBFLAG = 0x8000
1397 S_IEXEC = 0x40
1398 S_IFBLK = 0x6000
1399 S_IFCHR = 0x2000
1400 S_IFDIR = 0x4000
1401 S_IFIFO = 0x1000
1402 S_IFLNK = 0xa000
1403 S_IFMT = 0xf000
1404 S_IFREG = 0x8000
1405 S_IFSOCK = 0xc000
1406 S_IFWHT = 0xe000
1407 S_IREAD = 0x100
1408 S_IRGRP = 0x20
1409 S_IROTH = 0x4
1410 S_IRUSR = 0x100
1411 S_IRWXG = 0x38
1412 S_IRWXO = 0x7
1413 S_IRWXU = 0x1c0
1414 S_ISGID = 0x400
1415 S_ISTXT = 0x200
1416 S_ISUID = 0x800
1417 S_ISVTX = 0x200
1418 S_IWGRP = 0x10
1419 S_IWOTH = 0x2
1420 S_IWRITE = 0x80
1421 S_IWUSR = 0x80
1422 S_IXGRP = 0x8
1423 S_IXOTH = 0x1
1424 S_IXUSR = 0x40
1425 TAB0 = 0x0
1426 TAB1 = 0x400
1427 TAB2 = 0x800
1428 TAB3 = 0x4
1429 TABDLY = 0xc04
1430 TCIFLUSH = 0x1
1431 TCIOFF = 0x3
1432 TCIOFLUSH = 0x3
1433 TCION = 0x4
1434 TCOFLUSH = 0x2
1435 TCOOFF = 0x1
1436 TCOON = 0x2
1437 TCPOPT_CC = 0xb
1438 TCPOPT_CCECHO = 0xd
1439 TCPOPT_CCNEW = 0xc
1440 TCPOPT_EOL = 0x0
1441 TCPOPT_FASTOPEN = 0x22
1442 TCPOPT_MAXSEG = 0x2
1443 TCPOPT_NOP = 0x1
1444 TCPOPT_SACK = 0x5
1445 TCPOPT_SACK_HDR = 0x1010500
1446 TCPOPT_SACK_PERMITTED = 0x4
1447 TCPOPT_SACK_PERMIT_HDR = 0x1010402
1448 TCPOPT_SIGNATURE = 0x13
1449 TCPOPT_TIMESTAMP = 0x8
1450 TCPOPT_TSTAMP_HDR = 0x101080a
1451 TCPOPT_WINDOW = 0x3
1452 TCP_CONNECTIONTIMEOUT = 0x20
1453 TCP_CONNECTION_INFO = 0x106
1454 TCP_ENABLE_ECN = 0x104
1455 TCP_FASTOPEN = 0x105
1456 TCP_KEEPALIVE = 0x10
1457 TCP_KEEPCNT = 0x102
1458 TCP_KEEPINTVL = 0x101
1459 TCP_MAXHLEN = 0x3c
1460 TCP_MAXOLEN = 0x28
1461 TCP_MAXSEG = 0x2
1462 TCP_MAXWIN = 0xffff
1463 TCP_MAX_SACK = 0x4
1464 TCP_MAX_WINSHIFT = 0xe
1465 TCP_MINMSS = 0xd8
1466 TCP_MSS = 0x200
1467 TCP_NODELAY = 0x1
1468 TCP_NOOPT = 0x8
1469 TCP_NOPUSH = 0x4
1470 TCP_NOTSENT_LOWAT = 0x201
1471 TCP_RXT_CONNDROPTIME = 0x80
1472 TCP_RXT_FINDROP = 0x100
1473 TCP_SENDMOREACKS = 0x103
1474 TCSAFLUSH = 0x2
1475 TIOCCBRK = 0x2000747a
1476 TIOCCDTR = 0x20007478
1477 TIOCCONS = 0x80047462
1478 TIOCDCDTIMESTAMP = 0x40107458
1479 TIOCDRAIN = 0x2000745e
1480 TIOCDSIMICROCODE = 0x20007455
1481 TIOCEXCL = 0x2000740d
1482 TIOCEXT = 0x80047460
1483 TIOCFLUSH = 0x80047410
1484 TIOCGDRAINWAIT = 0x40047456
1485 TIOCGETA = 0x40487413
1486 TIOCGETD = 0x4004741a
1487 TIOCGPGRP = 0x40047477
1488 TIOCGWINSZ = 0x40087468
1489 TIOCIXOFF = 0x20007480
1490 TIOCIXON = 0x20007481
1491 TIOCMBIC = 0x8004746b
1492 TIOCMBIS = 0x8004746c
1493 TIOCMGDTRWAIT = 0x4004745a
1494 TIOCMGET = 0x4004746a
1495 TIOCMODG = 0x40047403
1496 TIOCMODS = 0x80047404
1497 TIOCMSDTRWAIT = 0x8004745b
1498 TIOCMSET = 0x8004746d
1499 TIOCM_CAR = 0x40
1500 TIOCM_CD = 0x40
1501 TIOCM_CTS = 0x20
1502 TIOCM_DSR = 0x100
1503 TIOCM_DTR = 0x2
1504 TIOCM_LE = 0x1
1505 TIOCM_RI = 0x80
1506 TIOCM_RNG = 0x80
1507 TIOCM_RTS = 0x4
1508 TIOCM_SR = 0x10
1509 TIOCM_ST = 0x8
1510 TIOCNOTTY = 0x20007471
1511 TIOCNXCL = 0x2000740e
1512 TIOCOUTQ = 0x40047473
1513 TIOCPKT = 0x80047470
1514 TIOCPKT_DATA = 0x0
1515 TIOCPKT_DOSTOP = 0x20
1516 TIOCPKT_FLUSHREAD = 0x1
1517 TIOCPKT_FLUSHWRITE = 0x2
1518 TIOCPKT_IOCTL = 0x40
1519 TIOCPKT_NOSTOP = 0x10
1520 TIOCPKT_START = 0x8
1521 TIOCPKT_STOP = 0x4
1522 TIOCPTYGNAME = 0x40807453
1523 TIOCPTYGRANT = 0x20007454
1524 TIOCPTYUNLK = 0x20007452
1525 TIOCREMOTE = 0x80047469
1526 TIOCSBRK = 0x2000747b
1527 TIOCSCONS = 0x20007463
1528 TIOCSCTTY = 0x20007461
1529 TIOCSDRAINWAIT = 0x80047457
1530 TIOCSDTR = 0x20007479
1531 TIOCSETA = 0x80487414
1532 TIOCSETAF = 0x80487416
1533 TIOCSETAW = 0x80487415
1534 TIOCSETD = 0x8004741b
1535 TIOCSIG = 0x2000745f
1536 TIOCSPGRP = 0x80047476
1537 TIOCSTART = 0x2000746e
1538 TIOCSTAT = 0x20007465
1539 TIOCSTI = 0x80017472
1540 TIOCSTOP = 0x2000746f
1541 TIOCSWINSZ = 0x80087467
1542 TIOCTIMESTAMP = 0x40107459
1543 TIOCUCNTL = 0x80047466
1544 TOSTOP = 0x400000
1545 VDISCARD = 0xf
1546 VDSUSP = 0xb
1547 VEOF = 0x0
1548 VEOL = 0x1
1549 VEOL2 = 0x2
1550 VERASE = 0x3
1551 VINTR = 0x8
1552 VKILL = 0x5
1553 VLNEXT = 0xe
1554 VMADDR_CID_ANY = 0xffffffff
1555 VMADDR_CID_HOST = 0x2
1556 VMADDR_CID_HYPERVISOR = 0x0
1557 VMADDR_CID_RESERVED = 0x1
1558 VMADDR_PORT_ANY = 0xffffffff
1559 VMIN = 0x10
1560 VM_LOADAVG = 0x2
1561 VM_MACHFACTOR = 0x4
1562 VM_MAXID = 0x6
1563 VM_METER = 0x1
1564 VM_SWAPUSAGE = 0x5
1565 VQUIT = 0x9
1566 VREPRINT = 0x6
1567 VSTART = 0xc
1568 VSTATUS = 0x12
1569 VSTOP = 0xd
1570 VSUSP = 0xa
1571 VT0 = 0x0
1572 VT1 = 0x10000
1573 VTDLY = 0x10000
1574 VTIME = 0x11
1575 VWERASE = 0x4
1576 WCONTINUED = 0x10
1577 WCOREFLAG = 0x80
1578 WEXITED = 0x4
1579 WNOHANG = 0x1
1580 WNOWAIT = 0x20
1581 WORDSIZE = 0x40
1582 WSTOPPED = 0x8
1583 WUNTRACED = 0x2
1584 XATTR_CREATE = 0x2
1585 XATTR_NODEFAULT = 0x10
1586 XATTR_NOFOLLOW = 0x1
1587 XATTR_NOSECURITY = 0x8
1588 XATTR_REPLACE = 0x4
1589 XATTR_SHOWCOMPRESSION = 0x20
15631590 )
15641591
15651592 // Errors
0 // Code generated by mkmerge.go; DO NOT EDIT.
0 // Code generated by mkmerge; DO NOT EDIT.
11
22 //go:build linux
33 // +build linux
115115 ARPHRD_LAPB = 0x204
116116 ARPHRD_LOCALTLK = 0x305
117117 ARPHRD_LOOPBACK = 0x304
118 ARPHRD_MCTP = 0x122
118119 ARPHRD_METRICOM = 0x17
119120 ARPHRD_NETLINK = 0x338
120121 ARPHRD_NETROM = 0x0
227228 BPF_OR = 0x40
228229 BPF_PSEUDO_BTF_ID = 0x3
229230 BPF_PSEUDO_CALL = 0x1
231 BPF_PSEUDO_FUNC = 0x4
232 BPF_PSEUDO_KFUNC_CALL = 0x2
230233 BPF_PSEUDO_MAP_FD = 0x1
234 BPF_PSEUDO_MAP_IDX = 0x5
235 BPF_PSEUDO_MAP_IDX_VALUE = 0x6
231236 BPF_PSEUDO_MAP_VALUE = 0x2
232237 BPF_RET = 0x6
233238 BPF_RSH = 0x70
467472 DM_DEV_WAIT = 0xc138fd08
468473 DM_DIR = "mapper"
469474 DM_GET_TARGET_VERSION = 0xc138fd11
475 DM_IMA_MEASUREMENT_FLAG = 0x80000
470476 DM_INACTIVE_PRESENT_FLAG = 0x40
471477 DM_INTERNAL_SUSPEND_FLAG = 0x40000
472478 DM_IOCTL = 0xfd
474480 DM_LIST_VERSIONS = 0xc138fd0d
475481 DM_MAX_TYPE_NAME = 0x10
476482 DM_NAME_LEN = 0x80
483 DM_NAME_LIST_FLAG_DOESNT_HAVE_UUID = 0x2
484 DM_NAME_LIST_FLAG_HAS_UUID = 0x1
477485 DM_NOFLUSH_FLAG = 0x800
478486 DM_PERSISTENT_DEV_FLAG = 0x8
479487 DM_QUERY_INACTIVE_TABLE_FLAG = 0x1000
493501 DM_UUID_FLAG = 0x4000
494502 DM_UUID_LEN = 0x81
495503 DM_VERSION = 0xc138fd00
496 DM_VERSION_EXTRA = "-ioctl (2021-02-01)"
504 DM_VERSION_EXTRA = "-ioctl (2021-03-22)"
497505 DM_VERSION_MAJOR = 0x4
498 DM_VERSION_MINOR = 0x2c
506 DM_VERSION_MINOR = 0x2d
499507 DM_VERSION_PATCHLEVEL = 0x0
500508 DT_BLK = 0x6
501509 DT_CHR = 0x2
709717 ETH_P_LOOPBACK = 0x9000
710718 ETH_P_MACSEC = 0x88e5
711719 ETH_P_MAP = 0xf9
720 ETH_P_MCTP = 0xfa
712721 ETH_P_MOBITEX = 0x15
713722 ETH_P_MPLS_MC = 0x8848
714723 ETH_P_MPLS_UC = 0x8847
744753 ETH_P_WCCP = 0x883e
745754 ETH_P_X25 = 0x805
746755 ETH_P_XDSA = 0xf8
756 EV_ABS = 0x3
757 EV_CNT = 0x20
758 EV_FF = 0x15
759 EV_FF_STATUS = 0x17
760 EV_KEY = 0x1
761 EV_LED = 0x11
762 EV_MAX = 0x1f
763 EV_MSC = 0x4
764 EV_PWR = 0x16
765 EV_REL = 0x2
766 EV_REP = 0x14
767 EV_SND = 0x12
768 EV_SW = 0x5
769 EV_SYN = 0x0
770 EV_VERSION = 0x10001
747771 EXABYTE_ENABLE_NEST = 0xf0
748772 EXT2_SUPER_MAGIC = 0xef53
749773 EXT3_SUPER_MAGIC = 0xef53
782806 FAN_DELETE_SELF = 0x400
783807 FAN_DENY = 0x2
784808 FAN_ENABLE_AUDIT = 0x40
809 FAN_EPIDFD = -0x2
785810 FAN_EVENT_INFO_TYPE_DFID = 0x3
786811 FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
787812 FAN_EVENT_INFO_TYPE_FID = 0x1
813 FAN_EVENT_INFO_TYPE_PIDFD = 0x4
788814 FAN_EVENT_METADATA_LEN = 0x18
789815 FAN_EVENT_ON_CHILD = 0x8000000
790816 FAN_MARK_ADD = 0x1
804830 FAN_MOVE_SELF = 0x800
805831 FAN_NOFD = -0x1
806832 FAN_NONBLOCK = 0x2
833 FAN_NOPIDFD = -0x1
807834 FAN_ONDIR = 0x40000000
808835 FAN_OPEN = 0x20
809836 FAN_OPEN_EXEC = 0x1000
814841 FAN_REPORT_DIR_FID = 0x400
815842 FAN_REPORT_FID = 0x200
816843 FAN_REPORT_NAME = 0x800
844 FAN_REPORT_PIDFD = 0x80
817845 FAN_REPORT_TID = 0x100
818846 FAN_UNLIMITED_MARKS = 0x20
819847 FAN_UNLIMITED_QUEUE = 0x10
9801008 HPFS_SUPER_MAGIC = 0xf995e849
9811009 HUGETLBFS_MAGIC = 0x958458f6
9821010 IBSHIFT = 0x10
983 ICMPV6_FILTER = 0x1
984 ICMPV6_FILTER_BLOCK = 0x1
985 ICMPV6_FILTER_BLOCKOTHERS = 0x3
986 ICMPV6_FILTER_PASS = 0x2
987 ICMPV6_FILTER_PASSONLY = 0x4
988 ICMP_FILTER = 0x1
9891011 ICRNL = 0x100
9901012 IFA_F_DADFAILED = 0x8
9911013 IFA_F_DEPRECATED = 0x20
12561278 KEXEC_ARCH_PARISC = 0xf0000
12571279 KEXEC_ARCH_PPC = 0x140000
12581280 KEXEC_ARCH_PPC64 = 0x150000
1281 KEXEC_ARCH_RISCV = 0xf30000
12591282 KEXEC_ARCH_S390 = 0x160000
12601283 KEXEC_ARCH_SH = 0x2a0000
12611284 KEXEC_ARCH_X86_64 = 0x3e0000
13311354 KEY_SPEC_THREAD_KEYRING = -0x1
13321355 KEY_SPEC_USER_KEYRING = -0x4
13331356 KEY_SPEC_USER_SESSION_KEYRING = -0x5
1357 LANDLOCK_ACCESS_FS_EXECUTE = 0x1
1358 LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800
1359 LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40
1360 LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80
1361 LANDLOCK_ACCESS_FS_MAKE_FIFO = 0x400
1362 LANDLOCK_ACCESS_FS_MAKE_REG = 0x100
1363 LANDLOCK_ACCESS_FS_MAKE_SOCK = 0x200
1364 LANDLOCK_ACCESS_FS_MAKE_SYM = 0x1000
1365 LANDLOCK_ACCESS_FS_READ_DIR = 0x8
1366 LANDLOCK_ACCESS_FS_READ_FILE = 0x4
1367 LANDLOCK_ACCESS_FS_REMOVE_DIR = 0x10
1368 LANDLOCK_ACCESS_FS_REMOVE_FILE = 0x20
1369 LANDLOCK_ACCESS_FS_WRITE_FILE = 0x2
1370 LANDLOCK_CREATE_RULESET_VERSION = 0x1
13341371 LINUX_REBOOT_CMD_CAD_OFF = 0x0
13351372 LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
13361373 LINUX_REBOOT_CMD_HALT = 0xcdef0123
13811418 MADV_NOHUGEPAGE = 0xf
13821419 MADV_NORMAL = 0x0
13831420 MADV_PAGEOUT = 0x15
1421 MADV_POPULATE_READ = 0x16
1422 MADV_POPULATE_WRITE = 0x17
13841423 MADV_RANDOM = 0x1
13851424 MADV_REMOVE = 0x9
13861425 MADV_SEQUENTIAL = 0x2
16351674 NFNL_MSG_BATCH_END = 0x11
16361675 NFNL_NFA_NEST = 0x8000
16371676 NFNL_SUBSYS_ACCT = 0x7
1638 NFNL_SUBSYS_COUNT = 0xc
1677 NFNL_SUBSYS_COUNT = 0xd
16391678 NFNL_SUBSYS_CTHELPER = 0x9
16401679 NFNL_SUBSYS_CTNETLINK = 0x1
16411680 NFNL_SUBSYS_CTNETLINK_EXP = 0x2
16421681 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
1682 NFNL_SUBSYS_HOOK = 0xc
16431683 NFNL_SUBSYS_IPSET = 0x6
16441684 NFNL_SUBSYS_NFTABLES = 0xa
16451685 NFNL_SUBSYS_NFT_COMPAT = 0xb
17551795 PERF_ATTR_SIZE_VER4 = 0x68
17561796 PERF_ATTR_SIZE_VER5 = 0x70
17571797 PERF_ATTR_SIZE_VER6 = 0x78
1798 PERF_ATTR_SIZE_VER7 = 0x80
17581799 PERF_AUX_FLAG_COLLISION = 0x8
1800 PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT = 0x0
1801 PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW = 0x100
17591802 PERF_AUX_FLAG_OVERWRITE = 0x2
17601803 PERF_AUX_FLAG_PARTIAL = 0x4
1804 PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK = 0xff00
17611805 PERF_AUX_FLAG_TRUNCATED = 0x1
17621806 PERF_FLAG_FD_CLOEXEC = 0x8
17631807 PERF_FLAG_FD_NO_GROUP = 0x1
17641808 PERF_FLAG_FD_OUTPUT = 0x2
17651809 PERF_FLAG_PID_CGROUP = 0x4
1810 PERF_HW_EVENT_MASK = 0xffffffff
17661811 PERF_MAX_CONTEXTS_PER_STACK = 0x8
17671812 PERF_MAX_STACK_DEPTH = 0x7f
17681813 PERF_MEM_BLK_ADDR = 0x4
18211866 PERF_MEM_TLB_OS = 0x40
18221867 PERF_MEM_TLB_SHIFT = 0x1a
18231868 PERF_MEM_TLB_WK = 0x20
1869 PERF_PMU_TYPE_SHIFT = 0x20
18241870 PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER = 0x1
18251871 PERF_RECORD_MISC_COMM_EXEC = 0x2000
18261872 PERF_RECORD_MISC_CPUMODE_MASK = 0x7
19201966 PR_PAC_APGAKEY = 0x10
19211967 PR_PAC_APIAKEY = 0x1
19221968 PR_PAC_APIBKEY = 0x2
1969 PR_PAC_GET_ENABLED_KEYS = 0x3d
19231970 PR_PAC_RESET_KEYS = 0x36
1971 PR_PAC_SET_ENABLED_KEYS = 0x3c
1972 PR_SCHED_CORE = 0x3e
1973 PR_SCHED_CORE_CREATE = 0x1
1974 PR_SCHED_CORE_GET = 0x0
1975 PR_SCHED_CORE_MAX = 0x4
1976 PR_SCHED_CORE_SHARE_FROM = 0x3
1977 PR_SCHED_CORE_SHARE_TO = 0x2
19241978 PR_SET_CHILD_SUBREAPER = 0x24
19251979 PR_SET_DUMPABLE = 0x4
19261980 PR_SET_ENDIAN = 0x14
19642018 PR_SPEC_ENABLE = 0x2
19652019 PR_SPEC_FORCE_DISABLE = 0x8
19662020 PR_SPEC_INDIRECT_BRANCH = 0x1
2021 PR_SPEC_L1D_FLUSH = 0x2
19672022 PR_SPEC_NOT_AFFECTED = 0x0
19682023 PR_SPEC_PRCTL = 0x1
19692024 PR_SPEC_STORE_BYPASS = 0x0
20022057 PTRACE_GETREGSET = 0x4204
20032058 PTRACE_GETSIGINFO = 0x4202
20042059 PTRACE_GETSIGMASK = 0x420a
2060 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
20052061 PTRACE_GET_SYSCALL_INFO = 0x420e
20062062 PTRACE_INTERRUPT = 0x4207
20072063 PTRACE_KILL = 0x8
21622218 RTM_DELNEIGH = 0x1d
21632219 RTM_DELNETCONF = 0x51
21642220 RTM_DELNEXTHOP = 0x69
2221 RTM_DELNEXTHOPBUCKET = 0x75
21652222 RTM_DELNSID = 0x59
21662223 RTM_DELQDISC = 0x25
21672224 RTM_DELROUTE = 0x19
21922249 RTM_GETNEIGHTBL = 0x42
21932250 RTM_GETNETCONF = 0x52
21942251 RTM_GETNEXTHOP = 0x6a
2252 RTM_GETNEXTHOPBUCKET = 0x76
21952253 RTM_GETNSID = 0x5a
21962254 RTM_GETQDISC = 0x26
21972255 RTM_GETROUTE = 0x1a
22002258 RTM_GETTCLASS = 0x2a
22012259 RTM_GETTFILTER = 0x2e
22022260 RTM_GETVLAN = 0x72
2203 RTM_MAX = 0x73
2261 RTM_MAX = 0x77
22042262 RTM_NEWACTION = 0x30
22052263 RTM_NEWADDR = 0x14
22062264 RTM_NEWADDRLABEL = 0x48
22142272 RTM_NEWNEIGHTBL = 0x40
22152273 RTM_NEWNETCONF = 0x50
22162274 RTM_NEWNEXTHOP = 0x68
2275 RTM_NEWNEXTHOPBUCKET = 0x74
22172276 RTM_NEWNSID = 0x58
22182277 RTM_NEWNVLAN = 0x70
22192278 RTM_NEWPREFIX = 0x34
22232282 RTM_NEWSTATS = 0x5c
22242283 RTM_NEWTCLASS = 0x28
22252284 RTM_NEWTFILTER = 0x2c
2226 RTM_NR_FAMILIES = 0x19
2227 RTM_NR_MSGTYPES = 0x64
2285 RTM_NR_FAMILIES = 0x1a
2286 RTM_NR_MSGTYPES = 0x68
22282287 RTM_SETDCB = 0x4f
22292288 RTM_SETLINK = 0x13
22302289 RTM_SETNEIGHTBL = 0x43
22522311 RTPROT_MROUTED = 0x11
22532312 RTPROT_MRT = 0xa
22542313 RTPROT_NTK = 0xf
2314 RTPROT_OPENR = 0x63
22552315 RTPROT_OSPF = 0xbc
22562316 RTPROT_RA = 0x9
22572317 RTPROT_REDIRECT = 0x1
22822342 SECCOMP_MODE_DISABLED = 0x0
22832343 SECCOMP_MODE_FILTER = 0x2
22842344 SECCOMP_MODE_STRICT = 0x1
2345 SECRETMEM_MAGIC = 0x5345434d
22852346 SECURITYFS_MAGIC = 0x73636673
22862347 SEEK_CUR = 0x1
22872348 SEEK_DATA = 0x3
23932454 SMART_WRITE_THRESHOLDS = 0xd7
23942455 SMB_SUPER_MAGIC = 0x517b
23952456 SOCKFS_MAGIC = 0x534f434b
2457 SOCK_BUF_LOCK_MASK = 0x3
23962458 SOCK_DCCP = 0x6
23972459 SOCK_IOC_TYPE = 0x89
23982460 SOCK_PACKET = 0xa
23992461 SOCK_RAW = 0x3
2462 SOCK_RCVBUF_LOCK = 0x2
24002463 SOCK_RDM = 0x4
24012464 SOCK_SEQPACKET = 0x5
2465 SOCK_SNDBUF_LOCK = 0x1
24022466 SOL_AAL = 0x109
24032467 SOL_ALG = 0x117
24042468 SOL_ATM = 0x108
25352599 TCOFLUSH = 0x1
25362600 TCOOFF = 0x0
25372601 TCOON = 0x1
2602 TCPOPT_EOL = 0x0
2603 TCPOPT_MAXSEG = 0x2
2604 TCPOPT_NOP = 0x1
2605 TCPOPT_SACK = 0x5
2606 TCPOPT_SACK_PERMITTED = 0x4
2607 TCPOPT_TIMESTAMP = 0x8
2608 TCPOPT_TSTAMP_HDR = 0x101080a
2609 TCPOPT_WINDOW = 0x3
25382610 TCP_CC_INFO = 0x1a
25392611 TCP_CM_INQ = 0x24
25402612 TCP_CONGESTION = 0xd
44 // +build 386,linux
55
66 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/_const.go
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/unix/_const.go
88
99 package unix
1010
146146 NS_GET_USERNS = 0xb701
147147 OLCUC = 0x2
148148 ONLCR = 0x4
149 OTPERASE = 0x400c4d19
149150 OTPGETREGIONCOUNT = 0x40044d0e
150151 OTPGETREGIONINFO = 0x400c4d0f
151152 OTPLOCK = 0x800c4d10
291292 SO_BPF_EXTENSIONS = 0x30
292293 SO_BROADCAST = 0x6
293294 SO_BSDCOMPAT = 0xe
295 SO_BUF_LOCK = 0x48
294296 SO_BUSY_POLL = 0x2e
295297 SO_BUSY_POLL_BUDGET = 0x46
296298 SO_CNX_ADVICE = 0x35
307309 SO_MARK = 0x24
308310 SO_MAX_PACING_RATE = 0x2f
309311 SO_MEMINFO = 0x37
312 SO_NETNS_COOKIE = 0x47
310313 SO_NOFCS = 0x2b
311314 SO_OOBINLINE = 0xa
312315 SO_PASSCRED = 0x10
44 // +build amd64,linux
55
66 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/_const.go
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/unix/_const.go
88
99 package unix
1010
146146 NS_GET_USERNS = 0xb701
147147 OLCUC = 0x2
148148 ONLCR = 0x4
149 OTPERASE = 0x400c4d19
149150 OTPGETREGIONCOUNT = 0x40044d0e
150151 OTPGETREGIONINFO = 0x400c4d0f
151152 OTPLOCK = 0x800c4d10
292293 SO_BPF_EXTENSIONS = 0x30
293294 SO_BROADCAST = 0x6
294295 SO_BSDCOMPAT = 0xe
296 SO_BUF_LOCK = 0x48
295297 SO_BUSY_POLL = 0x2e
296298 SO_BUSY_POLL_BUDGET = 0x46
297299 SO_CNX_ADVICE = 0x35
308310 SO_MARK = 0x24
309311 SO_MAX_PACING_RATE = 0x2f
310312 SO_MEMINFO = 0x37
313 SO_NETNS_COOKIE = 0x47
311314 SO_NOFCS = 0x2b
312315 SO_OOBINLINE = 0xa
313316 SO_PASSCRED = 0x10
44 // +build arm,linux
55
66 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
88
99 package unix
1010
144144 NS_GET_USERNS = 0xb701
145145 OLCUC = 0x2
146146 ONLCR = 0x4
147 OTPERASE = 0x400c4d19
147148 OTPGETREGIONCOUNT = 0x40044d0e
148149 OTPGETREGIONINFO = 0x400c4d0f
149150 OTPLOCK = 0x800c4d10
298299 SO_BPF_EXTENSIONS = 0x30
299300 SO_BROADCAST = 0x6
300301 SO_BSDCOMPAT = 0xe
302 SO_BUF_LOCK = 0x48
301303 SO_BUSY_POLL = 0x2e
302304 SO_BUSY_POLL_BUDGET = 0x46
303305 SO_CNX_ADVICE = 0x35
314316 SO_MARK = 0x24
315317 SO_MAX_PACING_RATE = 0x2f
316318 SO_MEMINFO = 0x37
319 SO_NETNS_COOKIE = 0x47
317320 SO_NOFCS = 0x2b
318321 SO_OOBINLINE = 0xa
319322 SO_PASSCRED = 0x10
44 // +build arm64,linux
55
66 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
88
99 package unix
1010
147147 NS_GET_USERNS = 0xb701
148148 OLCUC = 0x2
149149 ONLCR = 0x4
150 OTPERASE = 0x400c4d19
150151 OTPGETREGIONCOUNT = 0x40044d0e
151152 OTPGETREGIONINFO = 0x400c4d0f
152153 OTPLOCK = 0x800c4d10
288289 SO_BPF_EXTENSIONS = 0x30
289290 SO_BROADCAST = 0x6
290291 SO_BSDCOMPAT = 0xe
292 SO_BUF_LOCK = 0x48
291293 SO_BUSY_POLL = 0x2e
292294 SO_BUSY_POLL_BUDGET = 0x46
293295 SO_CNX_ADVICE = 0x35
304306 SO_MARK = 0x24
305307 SO_MAX_PACING_RATE = 0x2f
306308 SO_MEMINFO = 0x37
309 SO_NETNS_COOKIE = 0x47
307310 SO_NOFCS = 0x2b
308311 SO_OOBINLINE = 0xa
309312 SO_PASSCRED = 0x10
44 // +build mips,linux
55
66 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
88
99 package unix
1010
144144 NS_GET_USERNS = 0x2000b701
145145 OLCUC = 0x2
146146 ONLCR = 0x4
147 OTPERASE = 0x800c4d19
147148 OTPGETREGIONCOUNT = 0x80044d0e
148149 OTPGETREGIONINFO = 0x800c4d0f
149150 OTPLOCK = 0x400c4d10
291292 SO_BPF_EXTENSIONS = 0x30
292293 SO_BROADCAST = 0x20
293294 SO_BSDCOMPAT = 0xe
295 SO_BUF_LOCK = 0x48
294296 SO_BUSY_POLL = 0x2e
295297 SO_BUSY_POLL_BUDGET = 0x46
296298 SO_CNX_ADVICE = 0x35
307309 SO_MARK = 0x24
308310 SO_MAX_PACING_RATE = 0x2f
309311 SO_MEMINFO = 0x37
312 SO_NETNS_COOKIE = 0x47
310313 SO_NOFCS = 0x2b
311314 SO_OOBINLINE = 0x100
312315 SO_PASSCRED = 0x11
44 // +build mips64,linux
55
66 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
88
99 package unix
1010
144144 NS_GET_USERNS = 0x2000b701
145145 OLCUC = 0x2
146146 ONLCR = 0x4
147 OTPERASE = 0x800c4d19
147148 OTPGETREGIONCOUNT = 0x80044d0e
148149 OTPGETREGIONINFO = 0x800c4d0f
149150 OTPLOCK = 0x400c4d10
291292 SO_BPF_EXTENSIONS = 0x30
292293 SO_BROADCAST = 0x20
293294 SO_BSDCOMPAT = 0xe
295 SO_BUF_LOCK = 0x48
294296 SO_BUSY_POLL = 0x2e
295297 SO_BUSY_POLL_BUDGET = 0x46
296298 SO_CNX_ADVICE = 0x35
307309 SO_MARK = 0x24
308310 SO_MAX_PACING_RATE = 0x2f
309311 SO_MEMINFO = 0x37
312 SO_NETNS_COOKIE = 0x47
310313 SO_NOFCS = 0x2b
311314 SO_OOBINLINE = 0x100
312315 SO_PASSCRED = 0x11
44 // +build mips64le,linux
55
66 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
88
99 package unix
1010
144144 NS_GET_USERNS = 0x2000b701
145145 OLCUC = 0x2
146146 ONLCR = 0x4
147 OTPERASE = 0x800c4d19
147148 OTPGETREGIONCOUNT = 0x80044d0e
148149 OTPGETREGIONINFO = 0x800c4d0f
149150 OTPLOCK = 0x400c4d10
291292 SO_BPF_EXTENSIONS = 0x30
292293 SO_BROADCAST = 0x20
293294 SO_BSDCOMPAT = 0xe
295 SO_BUF_LOCK = 0x48
294296 SO_BUSY_POLL = 0x2e
295297 SO_BUSY_POLL_BUDGET = 0x46
296298 SO_CNX_ADVICE = 0x35
307309 SO_MARK = 0x24
308310 SO_MAX_PACING_RATE = 0x2f
309311 SO_MEMINFO = 0x37
312 SO_NETNS_COOKIE = 0x47
310313 SO_NOFCS = 0x2b
311314 SO_OOBINLINE = 0x100
312315 SO_PASSCRED = 0x11
44 // +build mipsle,linux
55
66 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
88
99 package unix
1010
144144 NS_GET_USERNS = 0x2000b701
145145 OLCUC = 0x2
146146 ONLCR = 0x4
147 OTPERASE = 0x800c4d19
147148 OTPGETREGIONCOUNT = 0x80044d0e
148149 OTPGETREGIONINFO = 0x800c4d0f
149150 OTPLOCK = 0x400c4d10
291292 SO_BPF_EXTENSIONS = 0x30
292293 SO_BROADCAST = 0x20
293294 SO_BSDCOMPAT = 0xe
295 SO_BUF_LOCK = 0x48
294296 SO_BUSY_POLL = 0x2e
295297 SO_BUSY_POLL_BUDGET = 0x46
296298 SO_CNX_ADVICE = 0x35
307309 SO_MARK = 0x24
308310 SO_MAX_PACING_RATE = 0x2f
309311 SO_MEMINFO = 0x37
312 SO_NETNS_COOKIE = 0x47
310313 SO_NOFCS = 0x2b
311314 SO_OOBINLINE = 0x100
312315 SO_PASSCRED = 0x11
44 // +build ppc,linux
55
66 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
88
99 package unix
1010
146146 NS_GET_USERNS = 0x2000b701
147147 OLCUC = 0x4
148148 ONLCR = 0x2
149 OTPERASE = 0x800c4d19
149150 OTPGETREGIONCOUNT = 0x80044d0e
150151 OTPGETREGIONINFO = 0x800c4d0f
151152 OTPLOCK = 0x400c4d10
346347 SO_BPF_EXTENSIONS = 0x30
347348 SO_BROADCAST = 0x6
348349 SO_BSDCOMPAT = 0xe
350 SO_BUF_LOCK = 0x48
349351 SO_BUSY_POLL = 0x2e
350352 SO_BUSY_POLL_BUDGET = 0x46
351353 SO_CNX_ADVICE = 0x35
362364 SO_MARK = 0x24
363365 SO_MAX_PACING_RATE = 0x2f
364366 SO_MEMINFO = 0x37
367 SO_NETNS_COOKIE = 0x47
365368 SO_NOFCS = 0x2b
366369 SO_OOBINLINE = 0xa
367370 SO_PASSCRED = 0x14
44 // +build ppc64,linux
55
66 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
88
99 package unix
1010
146146 NS_GET_USERNS = 0x2000b701
147147 OLCUC = 0x4
148148 ONLCR = 0x2
149 OTPERASE = 0x800c4d19
149150 OTPGETREGIONCOUNT = 0x80044d0e
150151 OTPGETREGIONINFO = 0x800c4d0f
151152 OTPLOCK = 0x400c4d10
350351 SO_BPF_EXTENSIONS = 0x30
351352 SO_BROADCAST = 0x6
352353 SO_BSDCOMPAT = 0xe
354 SO_BUF_LOCK = 0x48
353355 SO_BUSY_POLL = 0x2e
354356 SO_BUSY_POLL_BUDGET = 0x46
355357 SO_CNX_ADVICE = 0x35
366368 SO_MARK = 0x24
367369 SO_MAX_PACING_RATE = 0x2f
368370 SO_MEMINFO = 0x37
371 SO_NETNS_COOKIE = 0x47
369372 SO_NOFCS = 0x2b
370373 SO_OOBINLINE = 0xa
371374 SO_PASSCRED = 0x14
44 // +build ppc64le,linux
55
66 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
88
99 package unix
1010
146146 NS_GET_USERNS = 0x2000b701
147147 OLCUC = 0x4
148148 ONLCR = 0x2
149 OTPERASE = 0x800c4d19
149150 OTPGETREGIONCOUNT = 0x80044d0e
150151 OTPGETREGIONINFO = 0x800c4d0f
151152 OTPLOCK = 0x400c4d10
350351 SO_BPF_EXTENSIONS = 0x30
351352 SO_BROADCAST = 0x6
352353 SO_BSDCOMPAT = 0xe
354 SO_BUF_LOCK = 0x48
353355 SO_BUSY_POLL = 0x2e
354356 SO_BUSY_POLL_BUDGET = 0x46
355357 SO_CNX_ADVICE = 0x35
366368 SO_MARK = 0x24
367369 SO_MAX_PACING_RATE = 0x2f
368370 SO_MEMINFO = 0x37
371 SO_NETNS_COOKIE = 0x47
369372 SO_NOFCS = 0x2b
370373 SO_OOBINLINE = 0xa
371374 SO_PASSCRED = 0x14
44 // +build riscv64,linux
55
66 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
88
99 package unix
1010
144144 NS_GET_USERNS = 0xb701
145145 OLCUC = 0x2
146146 ONLCR = 0x4
147 OTPERASE = 0x400c4d19
147148 OTPGETREGIONCOUNT = 0x40044d0e
148149 OTPGETREGIONINFO = 0x400c4d0f
149150 OTPLOCK = 0x800c4d10
279280 SO_BPF_EXTENSIONS = 0x30
280281 SO_BROADCAST = 0x6
281282 SO_BSDCOMPAT = 0xe
283 SO_BUF_LOCK = 0x48
282284 SO_BUSY_POLL = 0x2e
283285 SO_BUSY_POLL_BUDGET = 0x46
284286 SO_CNX_ADVICE = 0x35
295297 SO_MARK = 0x24
296298 SO_MAX_PACING_RATE = 0x2f
297299 SO_MEMINFO = 0x37
300 SO_NETNS_COOKIE = 0x47
298301 SO_NOFCS = 0x2b
299302 SO_OOBINLINE = 0xa
300303 SO_PASSCRED = 0x10
44 // +build s390x,linux
55
66 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
88
99 package unix
1010
144144 NS_GET_USERNS = 0xb701
145145 OLCUC = 0x2
146146 ONLCR = 0x4
147 OTPERASE = 0x400c4d19
147148 OTPGETREGIONCOUNT = 0x40044d0e
148149 OTPGETREGIONINFO = 0x400c4d0f
149150 OTPLOCK = 0x800c4d10
354355 SO_BPF_EXTENSIONS = 0x30
355356 SO_BROADCAST = 0x6
356357 SO_BSDCOMPAT = 0xe
358 SO_BUF_LOCK = 0x48
357359 SO_BUSY_POLL = 0x2e
358360 SO_BUSY_POLL_BUDGET = 0x46
359361 SO_CNX_ADVICE = 0x35
370372 SO_MARK = 0x24
371373 SO_MAX_PACING_RATE = 0x2f
372374 SO_MEMINFO = 0x37
375 SO_NETNS_COOKIE = 0x47
373376 SO_NOFCS = 0x2b
374377 SO_OOBINLINE = 0xa
375378 SO_PASSCRED = 0x10
44 // +build sparc64,linux
55
66 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
7 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
88
99 package unix
1010
149149 NS_GET_USERNS = 0x2000b701
150150 OLCUC = 0x2
151151 ONLCR = 0x4
152 OTPERASE = 0x800c4d19
152153 OTPGETREGIONCOUNT = 0x80044d0e
153154 OTPGETREGIONINFO = 0x800c4d0f
154155 OTPLOCK = 0x400c4d10
345346 SO_BPF_EXTENSIONS = 0x32
346347 SO_BROADCAST = 0x20
347348 SO_BSDCOMPAT = 0x400
349 SO_BUF_LOCK = 0x51
348350 SO_BUSY_POLL = 0x30
349351 SO_BUSY_POLL_BUDGET = 0x49
350352 SO_CNX_ADVICE = 0x37
361363 SO_MARK = 0x22
362364 SO_MAX_PACING_RATE = 0x31
363365 SO_MEMINFO = 0x39
366 SO_NETNS_COOKIE = 0x50
364367 SO_NOFCS = 0x27
365368 SO_OOBINLINE = 0x100
366369 SO_PASSCRED = 0x2
10191019 RLIMIT_CPU = 0x0
10201020 RLIMIT_DATA = 0x2
10211021 RLIMIT_FSIZE = 0x1
1022 RLIMIT_MEMLOCK = 0x6
10221023 RLIMIT_NOFILE = 0x8
1024 RLIMIT_NPROC = 0x7
1025 RLIMIT_RSS = 0x5
10231026 RLIMIT_STACK = 0x3
10241027 RLIM_INFINITY = 0x7fffffffffffffff
10251028 RTAX_AUTHOR = 0x6
10191019 RLIMIT_CPU = 0x0
10201020 RLIMIT_DATA = 0x2
10211021 RLIMIT_FSIZE = 0x1
1022 RLIMIT_MEMLOCK = 0x6
10221023 RLIMIT_NOFILE = 0x8
1024 RLIMIT_NPROC = 0x7
1025 RLIMIT_RSS = 0x5
10231026 RLIMIT_STACK = 0x3
10241027 RLIM_INFINITY = 0x7fffffffffffffff
10251028 RTAX_AUTHOR = 0x6
1616 int wait4(int, uintptr_t, int, uintptr_t);
1717 int ioctl(int, int, uintptr_t);
1818 int fcntl(uintptr_t, int, uintptr_t);
19 int fsync_range(int, int, long long, long long);
1920 int acct(uintptr_t);
2021 int chdir(uintptr_t);
2122 int chroot(uintptr_t);
2829 int fchmodat(int, uintptr_t, unsigned int, int);
2930 int fchownat(int, uintptr_t, int, int, int);
3031 int fdatasync(int);
31 int fsync(int);
3232 int getpgid(int);
3333 int getpgrp();
3434 int getpid();
254254
255255 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
256256
257 func fsyncRange(fd int, how int, start int64, length int64) (err error) {
258 r0, er := C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length))
259 if r0 == -1 && er != nil {
260 err = er
261 }
262 return
263 }
264
265 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
266
257267 func Acct(path string) (err error) {
258268 _p0 := uintptr(unsafe.Pointer(C.CString(path)))
259269 r0, er := C.acct(C.uintptr_t(_p0))
370380
371381 func Fdatasync(fd int) (err error) {
372382 r0, er := C.fdatasync(C.int(fd))
373 if r0 == -1 && er != nil {
374 err = er
375 }
376 return
377 }
378
379 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
380
381 func Fsync(fd int) (err error) {
382 r0, er := C.fsync(C.int(fd))
383383 if r0 == -1 && er != nil {
384384 err = er
385385 }
134134
135135 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
136136
137 func fsyncRange(fd int, how int, start int64, length int64) (err error) {
138 _, e1 := callfsync_range(fd, how, start, length)
139 if e1 != 0 {
140 err = errnoErr(e1)
141 }
142 return
143 }
144
145 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
146
137147 func Acct(path string) (err error) {
138148 var _p0 *byte
139149 _p0, err = BytePtrFromString(path)
282292
283293 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
284294
285 func Fsync(fd int) (err error) {
286 _, e1 := callfsync(fd)
287 if e1 != 0 {
288 err = errnoErr(e1)
289 }
290 return
291 }
292
293 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
294
295295 func Getpgid(pid int) (pgid int, err error) {
296296 r0, e1 := callgetpgid(pid)
297297 pgid = int(r0)
1717 //go:cgo_import_dynamic libc_wait4 wait4 "libc.a/shr_64.o"
1818 //go:cgo_import_dynamic libc_ioctl ioctl "libc.a/shr_64.o"
1919 //go:cgo_import_dynamic libc_fcntl fcntl "libc.a/shr_64.o"
20 //go:cgo_import_dynamic libc_fsync_range fsync_range "libc.a/shr_64.o"
2021 //go:cgo_import_dynamic libc_acct acct "libc.a/shr_64.o"
2122 //go:cgo_import_dynamic libc_chdir chdir "libc.a/shr_64.o"
2223 //go:cgo_import_dynamic libc_chroot chroot "libc.a/shr_64.o"
2930 //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.a/shr_64.o"
3031 //go:cgo_import_dynamic libc_fchownat fchownat "libc.a/shr_64.o"
3132 //go:cgo_import_dynamic libc_fdatasync fdatasync "libc.a/shr_64.o"
32 //go:cgo_import_dynamic libc_fsync fsync "libc.a/shr_64.o"
3333 //go:cgo_import_dynamic libc_getpgid getpgid "libc.a/shr_64.o"
3434 //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.a/shr_64.o"
3535 //go:cgo_import_dynamic libc_getpid getpid "libc.a/shr_64.o"
135135 //go:linkname libc_wait4 libc_wait4
136136 //go:linkname libc_ioctl libc_ioctl
137137 //go:linkname libc_fcntl libc_fcntl
138 //go:linkname libc_fsync_range libc_fsync_range
138139 //go:linkname libc_acct libc_acct
139140 //go:linkname libc_chdir libc_chdir
140141 //go:linkname libc_chroot libc_chroot
147148 //go:linkname libc_fchmodat libc_fchmodat
148149 //go:linkname libc_fchownat libc_fchownat
149150 //go:linkname libc_fdatasync libc_fdatasync
150 //go:linkname libc_fsync libc_fsync
151151 //go:linkname libc_getpgid libc_getpgid
152152 //go:linkname libc_getpgrp libc_getpgrp
153153 //go:linkname libc_getpid libc_getpid
256256 libc_wait4,
257257 libc_ioctl,
258258 libc_fcntl,
259 libc_fsync_range,
259260 libc_acct,
260261 libc_chdir,
261262 libc_chroot,
268269 libc_fchmodat,
269270 libc_fchownat,
270271 libc_fdatasync,
271 libc_fsync,
272272 libc_getpgid,
273273 libc_getpgrp,
274274 libc_getpid,
429429
430430 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
431431
432 func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {
433 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync_range)), 4, uintptr(fd), uintptr(how), uintptr(start), uintptr(length), 0, 0)
434 return
435 }
436
437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
438
432439 func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
433440 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_acct)), 1, _p0, 0, 0, 0, 0, 0)
434441 return
513520
514521 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
515522
516 func callfsync(fd int) (r1 uintptr, e1 Errno) {
517 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
518 return
519 }
520
521 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
522
523523 func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
524524 r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
525525 return
1515 int wait4(int, uintptr_t, int, uintptr_t);
1616 int ioctl(int, int, uintptr_t);
1717 int fcntl(uintptr_t, int, uintptr_t);
18 int fsync_range(int, int, long long, long long);
1819 int acct(uintptr_t);
1920 int chdir(uintptr_t);
2021 int chroot(uintptr_t);
2728 int fchmodat(int, uintptr_t, unsigned int, int);
2829 int fchownat(int, uintptr_t, int, int, int);
2930 int fdatasync(int);
30 int fsync(int);
3131 int getpgid(int);
3232 int getpgrp();
3333 int getpid();
198198
199199 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
200200
201 func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {
202 r1 = uintptr(C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length)))
203 e1 = syscall.GetErrno()
204 return
205 }
206
207 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
208
201209 func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
202210 r1 = uintptr(C.acct(C.uintptr_t(_p0)))
203211 e1 = syscall.GetErrno()
294302
295303 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
296304
297 func callfsync(fd int) (r1 uintptr, e1 Errno) {
298 r1 = uintptr(C.fsync(C.int(fd)))
299 e1 = syscall.GetErrno()
300 return
301 }
302
303 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
304
305305 func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
306306 r1 = uintptr(C.getpgid(C.int(pid)))
307307 e1 = syscall.GetErrno()
733733
734734 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
735735
736 func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
737 r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
738 ret = uintptr(r0)
739 if e1 != 0 {
740 err = errnoErr(e1)
741 }
742 return
743 }
744
745 var libc_shmat_trampoline_addr uintptr
746
747 //go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib"
748
749 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
750
751 func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
752 r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
753 result = int(r0)
754 if e1 != 0 {
755 err = errnoErr(e1)
756 }
757 return
758 }
759
760 var libc_shmctl_trampoline_addr uintptr
761
762 //go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib"
763
764 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
765
766 func shmdt(addr uintptr) (err error) {
767 _, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
768 if e1 != 0 {
769 err = errnoErr(e1)
770 }
771 return
772 }
773
774 var libc_shmdt_trampoline_addr uintptr
775
776 //go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib"
777
778 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
779
780 func shmget(key int, size int, flag int) (id int, err error) {
781 r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
782 id = int(r0)
783 if e1 != 0 {
784 err = errnoErr(e1)
785 }
786 return
787 }
788
789 var libc_shmget_trampoline_addr uintptr
790
791 //go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib"
792
793 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
794
736795 func Access(path string, mode uint32) (err error) {
737796 var _p0 *byte
738797 _p0, err = BytePtrFromString(path)
263263 GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
264264 DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
265265
266 TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
267 JMP libc_shmat(SB)
268
269 GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8
270 DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
271
272 TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
273 JMP libc_shmctl(SB)
274
275 GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8
276 DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
277
278 TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
279 JMP libc_shmdt(SB)
280
281 GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8
282 DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
283
284 TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
285 JMP libc_shmget(SB)
286
287 GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8
288 DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
289
266290 TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
267291 JMP libc_access(SB)
268292
733733
734734 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
735735
736 func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
737 r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
738 ret = uintptr(r0)
739 if e1 != 0 {
740 err = errnoErr(e1)
741 }
742 return
743 }
744
745 var libc_shmat_trampoline_addr uintptr
746
747 //go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib"
748
749 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
750
751 func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
752 r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
753 result = int(r0)
754 if e1 != 0 {
755 err = errnoErr(e1)
756 }
757 return
758 }
759
760 var libc_shmctl_trampoline_addr uintptr
761
762 //go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib"
763
764 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
765
766 func shmdt(addr uintptr) (err error) {
767 _, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
768 if e1 != 0 {
769 err = errnoErr(e1)
770 }
771 return
772 }
773
774 var libc_shmdt_trampoline_addr uintptr
775
776 //go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib"
777
778 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
779
780 func shmget(key int, size int, flag int) (id int, err error) {
781 r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
782 id = int(r0)
783 if e1 != 0 {
784 err = errnoErr(e1)
785 }
786 return
787 }
788
789 var libc_shmget_trampoline_addr uintptr
790
791 //go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib"
792
793 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
794
736795 func Access(path string, mode uint32) (err error) {
737796 var _p0 *byte
738797 _p0, err = BytePtrFromString(path)
263263 GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
264264 DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
265265
266 TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
267 JMP libc_shmat(SB)
268
269 GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8
270 DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
271
272 TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
273 JMP libc_shmctl(SB)
274
275 GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8
276 DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
277
278 TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
279 JMP libc_shmdt(SB)
280
281 GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8
282 DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
283
284 TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
285 JMP libc_shmget(SB)
286
287 GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8
288 DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
289
266290 TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
267291 JMP libc_access(SB)
268292
0 // Code generated by mkmerge.go; DO NOT EDIT.
0 // Code generated by mkmerge; DO NOT EDIT.
11
22 //go:build linux
33 // +build linux
4747
4848 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
4949
50 func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
51 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
52 if e1 != 0 {
53 err = errnoErr(e1)
54 }
55 return
56 }
57
58 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
59
5060 func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
5161 var _p0 *byte
5262 _p0, err = BytePtrFromString(oldpath)
91101 }
92102 r0, _, e1 := Syscall6(SYS_OPENAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(open_how)), uintptr(size), 0, 0)
93103 fd = int(r0)
104 if e1 != 0 {
105 err = errnoErr(e1)
106 }
107 return
108 }
109
110 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
111
112 func pipe2(p *[2]_C_int, flags int) (err error) {
113 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
94114 if e1 != 0 {
95115 err = errnoErr(e1)
96116 }
12001220
12011221 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
12021222
1203 func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
1223 func Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
12041224 _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
12051225 if e1 != 0 {
12061226 err = errnoErr(e1)
19341954
19351955 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
19361956
1937 func pipe2(p *[2]_C_int, flags int) (err error) {
1938 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
1939 if e1 != 0 {
1940 err = errnoErr(e1)
1941 }
1942 return
1943 }
1957 func PidfdOpen(pid int, flags int) (fd int, err error) {
1958 r0, _, e1 := Syscall(SYS_PIDFD_OPEN, uintptr(pid), uintptr(flags), 0)
1959 fd = int(r0)
1960 if e1 != 0 {
1961 err = errnoErr(e1)
1962 }
1963 return
1964 }
1965
1966 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1967
1968 func PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) {
1969 r0, _, e1 := Syscall(SYS_PIDFD_GETFD, uintptr(pidfd), uintptr(targetfd), uintptr(flags))
1970 fd = int(r0)
1971 if e1 != 0 {
1972 err = errnoErr(e1)
1973 }
1974 return
1975 }
1976
1977 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1978
1979 func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
1980 r0, _, e1 := Syscall(SYS_SHMAT, uintptr(id), uintptr(addr), uintptr(flag))
1981 ret = uintptr(r0)
1982 if e1 != 0 {
1983 err = errnoErr(e1)
1984 }
1985 return
1986 }
1987
1988 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
1989
1990 func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
1991 r0, _, e1 := Syscall(SYS_SHMCTL, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
1992 result = int(r0)
1993 if e1 != 0 {
1994 err = errnoErr(e1)
1995 }
1996 return
1997 }
1998
1999 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2000
2001 func shmdt(addr uintptr) (err error) {
2002 _, _, e1 := Syscall(SYS_SHMDT, uintptr(addr), 0, 0)
2003 if e1 != 0 {
2004 err = errnoErr(e1)
2005 }
2006 return
2007 }
2008
2009 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2010
2011 func shmget(key int, size int, flag int) (id int, err error) {
2012 r0, _, e1 := Syscall(SYS_SHMGET, uintptr(key), uintptr(size), uintptr(flag))
2013 id = int(r0)
2014 if e1 != 0 {
2015 err = errnoErr(e1)
2016 }
2017 return
2018 }
3737 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
3838 r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
3939 n = int64(int64(r1)<<32 | int64(r0))
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func pipe(p *[2]_C_int) (err error) {
49 _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
50 if e1 != 0 {
51 err = errnoErr(e1)
52 }
53 return
54 }
55
56 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
57
58 func dup2(oldfd int, newfd int) (err error) {
59 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
60 if e1 != 0 {
61 err = errnoErr(e1)
62 }
63 return
64 }
65
66 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
67
68 func EpollCreate(size int) (fd int, err error) {
69 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
70 fd = int(r0)
7140 if e1 != 0 {
7241 err = errnoErr(e1)
7342 }
180149
181150 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
182151
183 func InotifyInit() (fd int, err error) {
184 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
185 fd = int(r0)
186 if e1 != 0 {
187 err = errnoErr(e1)
188 }
189 return
190 }
191
192 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
193
194152 func Ioperm(from int, num int, on int) (err error) {
195153 _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
196154 if e1 != 0 {
565523 }
566524 return
567525 }
568
569 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
570
571 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
572 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
573 n = int(r0)
574 if e1 != 0 {
575 err = errnoErr(e1)
576 }
577 return
578 }
3737 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
3838 r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
3939 n = int64(r0)
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func dup2(oldfd int, newfd int) (err error) {
49 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
50 if e1 != 0 {
51 err = errnoErr(e1)
52 }
53 return
54 }
55
56 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
57
58 func EpollCreate(size int) (fd int, err error) {
59 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
60 fd = int(r0)
6140 if e1 != 0 {
6241 err = errnoErr(e1)
6342 }
190169
191170 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
192171
193 func inotifyInit() (fd int, err error) {
194 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
195 fd = int(r0)
196 if e1 != 0 {
197 err = errnoErr(e1)
198 }
199 return
200 }
201
202 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
203
204172 func Ioperm(from int, num int, on int) (err error) {
205173 _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
206174 if e1 != 0 {
710678
711679 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
712680
713 func pipe(p *[2]_C_int) (err error) {
714 _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
715 if e1 != 0 {
716 err = errnoErr(e1)
717 }
718 return
719 }
720
721 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
722
723 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
724 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
725 n = int(r0)
726 if e1 != 0 {
727 err = errnoErr(e1)
728 }
729 return
730 }
731
732 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
733
734681 func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
735682 var _p0 *byte
736683 _p0, err = BytePtrFromString(cmdline)
3737 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
3838 r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
3939 n = int64(int64(r1)<<32 | int64(r0))
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func pipe(p *[2]_C_int) (err error) {
49 _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
5040 if e1 != 0 {
5141 err = errnoErr(e1)
5242 }
234224
235225 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
236226
237 func dup2(oldfd int, newfd int) (err error) {
238 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
239 if e1 != 0 {
240 err = errnoErr(e1)
241 }
242 return
243 }
244
245 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
246
247 func EpollCreate(size int) (fd int, err error) {
248 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
249 fd = int(r0)
250 if e1 != 0 {
251 err = errnoErr(e1)
252 }
253 return
254 }
255
256 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
257
258227 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
259228 var _p0 unsafe.Pointer
260229 if len(events) > 0 {
339308
340309 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
341310
342 func InotifyInit() (fd int, err error) {
343 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
344 fd = int(r0)
345 if e1 != 0 {
346 err = errnoErr(e1)
347 }
348 return
349 }
350
351 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
352
353311 func Lchown(path string, uid int, gid int) (err error) {
354312 var _p0 *byte
355313 _p0, err = BytePtrFromString(path)
680638
681639 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
682640
683 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
684 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
685 n = int(r0)
686 if e1 != 0 {
687 err = errnoErr(e1)
688 }
689 return
690 }
691
692 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
693
694641 func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) {
695642 _, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32))
696643 if e1 != 0 {
3737 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
3838 r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
3939 n = int64(int64(r0)<<32 | int64(r1))
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func dup2(oldfd int, newfd int) (err error) {
49 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
50 if e1 != 0 {
51 err = errnoErr(e1)
52 }
53 return
54 }
55
56 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
57
58 func EpollCreate(size int) (fd int, err error) {
59 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
60 fd = int(r0)
6140 if e1 != 0 {
6241 err = errnoErr(e1)
6342 }
543522
544523 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545524
546 func InotifyInit() (fd int, err error) {
547 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
548 fd = int(r0)
549 if e1 != 0 {
550 err = errnoErr(e1)
551 }
552 return
553 }
554
555 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
556
557525 func Ioperm(from int, num int, on int) (err error) {
558526 _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
559527 if e1 != 0 {
705673
706674 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
707675
708 func pipe() (p1 int, p2 int, err error) {
709 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
710 p1 = int(r0)
711 p2 = int(r1)
712 if e1 != 0 {
713 err = errnoErr(e1)
714 }
715 return
716 }
717
718 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
719
720676 func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
721677 r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
722678 xaddr = uintptr(r0)
745701 }
746702 return
747703 }
748
749 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
750
751 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
752 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
753 n = int(r0)
754 if e1 != 0 {
755 err = errnoErr(e1)
756 }
757 return
758 }
3737 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
3838 r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
3939 n = int64(r0)
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func dup2(oldfd int, newfd int) (err error) {
49 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
50 if e1 != 0 {
51 err = errnoErr(e1)
52 }
53 return
54 }
55
56 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
57
58 func EpollCreate(size int) (fd int, err error) {
59 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
60 fd = int(r0)
6140 if e1 != 0 {
6241 err = errnoErr(e1)
6342 }
716695 }
717696 return
718697 }
719
720 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
721
722 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
723 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
724 n = int(r0)
725 if e1 != 0 {
726 err = errnoErr(e1)
727 }
728 return
729 }
3737 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
3838 r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
3939 n = int64(r0)
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func dup2(oldfd int, newfd int) (err error) {
49 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
50 if e1 != 0 {
51 err = errnoErr(e1)
52 }
53 return
54 }
55
56 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
57
58 func EpollCreate(size int) (fd int, err error) {
59 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
60 fd = int(r0)
6140 if e1 != 0 {
6241 err = errnoErr(e1)
6342 }
716695 }
717696 return
718697 }
719
720 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
721
722 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
723 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
724 n = int(r0)
725 if e1 != 0 {
726 err = errnoErr(e1)
727 }
728 return
729 }
3737 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
3838 r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
3939 n = int64(int64(r1)<<32 | int64(r0))
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func dup2(oldfd int, newfd int) (err error) {
49 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
50 if e1 != 0 {
51 err = errnoErr(e1)
52 }
53 return
54 }
55
56 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
57
58 func EpollCreate(size int) (fd int, err error) {
59 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
60 fd = int(r0)
6140 if e1 != 0 {
6241 err = errnoErr(e1)
6342 }
543522
544523 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
545524
546 func InotifyInit() (fd int, err error) {
547 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
548 fd = int(r0)
549 if e1 != 0 {
550 err = errnoErr(e1)
551 }
552 return
553 }
554
555 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
556
557525 func Ioperm(from int, num int, on int) (err error) {
558526 _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
559527 if e1 != 0 {
705673
706674 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
707675
708 func pipe() (p1 int, p2 int, err error) {
709 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
710 p1 = int(r0)
711 p2 = int(r1)
712 if e1 != 0 {
713 err = errnoErr(e1)
714 }
715 return
716 }
717
718 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
719
720676 func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
721677 r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
722678 xaddr = uintptr(r0)
745701 }
746702 return
747703 }
748
749 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
750
751 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
752 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
753 n = int(r0)
754 if e1 != 0 {
755 err = errnoErr(e1)
756 }
757 return
758 }
3737 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
3838 r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
3939 n = int64(int64(r0)<<32 | int64(r1))
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func dup2(oldfd int, newfd int) (err error) {
49 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
50 if e1 != 0 {
51 err = errnoErr(e1)
52 }
53 return
54 }
55
56 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
57
58 func EpollCreate(size int) (fd int, err error) {
59 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
60 fd = int(r0)
6140 if e1 != 0 {
6241 err = errnoErr(e1)
6342 }
160139
161140 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
162141
163 func InotifyInit() (fd int, err error) {
164 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
165 fd = int(r0)
166 if e1 != 0 {
167 err = errnoErr(e1)
168 }
169 return
170 }
171
172 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
173
174142 func Ioperm(from int, num int, on int) (err error) {
175143 _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
176144 if e1 != 0 {
716684
717685 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
718686
719 func pipe(p *[2]_C_int) (err error) {
720 _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
721 if e1 != 0 {
722 err = errnoErr(e1)
723 }
724 return
725 }
726
727 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
728
729 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
730 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
731 n = int(r0)
732 if e1 != 0 {
733 err = errnoErr(e1)
734 }
735 return
736 }
737
738 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
739
740687 func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
741688 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n))
742689 if e1 != 0 {
3737 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
3838 r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
3939 n = int64(r0)
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func dup2(oldfd int, newfd int) (err error) {
49 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
50 if e1 != 0 {
51 err = errnoErr(e1)
52 }
53 return
54 }
55
56 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
57
58 func EpollCreate(size int) (fd int, err error) {
59 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
60 fd = int(r0)
6140 if e1 != 0 {
6241 err = errnoErr(e1)
6342 }
190169
191170 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
192171
193 func InotifyInit() (fd int, err error) {
194 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
195 fd = int(r0)
196 if e1 != 0 {
197 err = errnoErr(e1)
198 }
199 return
200 }
201
202 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
203
204172 func Ioperm(from int, num int, on int) (err error) {
205173 _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
206174 if e1 != 0 {
762730
763731 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
764732
765 func pipe(p *[2]_C_int) (err error) {
766 _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
767 if e1 != 0 {
768 err = errnoErr(e1)
769 }
770 return
771 }
772
773 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
774
775 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
776 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
777 n = int(r0)
778 if e1 != 0 {
779 err = errnoErr(e1)
780 }
781 return
782 }
783
784 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
785
786733 func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
787734 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
788735 if e1 != 0 {
3737 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
3838 r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
3939 n = int64(r0)
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func dup2(oldfd int, newfd int) (err error) {
49 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
50 if e1 != 0 {
51 err = errnoErr(e1)
52 }
53 return
54 }
55
56 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
57
58 func EpollCreate(size int) (fd int, err error) {
59 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
60 fd = int(r0)
6140 if e1 != 0 {
6241 err = errnoErr(e1)
6342 }
190169
191170 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
192171
193 func InotifyInit() (fd int, err error) {
194 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
195 fd = int(r0)
196 if e1 != 0 {
197 err = errnoErr(e1)
198 }
199 return
200 }
201
202 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
203
204172 func Ioperm(from int, num int, on int) (err error) {
205173 _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
206174 if e1 != 0 {
762730
763731 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
764732
765 func pipe(p *[2]_C_int) (err error) {
766 _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
767 if e1 != 0 {
768 err = errnoErr(e1)
769 }
770 return
771 }
772
773 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
774
775 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
776 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
777 n = int(r0)
778 if e1 != 0 {
779 err = errnoErr(e1)
780 }
781 return
782 }
783
784 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
785
786733 func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
787734 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
788735 if e1 != 0 {
3737 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
3838 r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
3939 n = int64(r0)
40 if e1 != 0 {
41 err = errnoErr(e1)
42 }
43 return
44 }
45
46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
47
48 func dup2(oldfd int, newfd int) (err error) {
49 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
50 if e1 != 0 {
51 err = errnoErr(e1)
52 }
53 return
54 }
55
56 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
57
58 func EpollCreate(size int) (fd int, err error) {
59 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
60 fd = int(r0)
6140 if e1 != 0 {
6241 err = errnoErr(e1)
6342 }
190169
191170 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
192171
193 func InotifyInit() (fd int, err error) {
194 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
195 fd = int(r0)
196 if e1 != 0 {
197 err = errnoErr(e1)
198 }
199 return
200 }
201
202 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
203
204172 func Lchown(path string, uid int, gid int) (err error) {
205173 var _p0 *byte
206174 _p0, err = BytePtrFromString(path)
552520
553521 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
554522
555 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
556 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
557 n = int(r0)
558 if e1 != 0 {
559 err = errnoErr(e1)
560 }
561 return
562 }
563
564 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
565
566523 func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
567524 var _p0 *byte
568525 _p0, err = BytePtrFromString(cmdline)
7272
7373 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
7474
75 func dup2(oldfd int, newfd int) (err error) {
76 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
77 if e1 != 0 {
78 err = errnoErr(e1)
79 }
80 return
81 }
82
83 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
84
8575 func Fchown(fd int, uid int, gid int) (err error) {
8676 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
8777 if e1 != 0 {
174164 func Getuid() (uid int) {
175165 r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
176166 uid = int(r0)
177 return
178 }
179
180 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
181
182 func InotifyInit() (fd int, err error) {
183 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
184 fd = int(r0)
185 if e1 != 0 {
186 err = errnoErr(e1)
187 }
188167 return
189168 }
190169
717696 }
718697 return
719698 }
720
721 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
722
723 func pipe(p *[2]_C_int) (err error) {
724 _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
725 if e1 != 0 {
726 err = errnoErr(e1)
727 }
728 return
729 }
730
731 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
732
733 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
734 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
735 n = int(r0)
736 if e1 != 0 {
737 err = errnoErr(e1)
738 }
739 return
740 }
140140 //go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so"
141141 //go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
142142 //go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
143 //go:cgo_import_dynamic libc_port_create port_create "libc.so"
144 //go:cgo_import_dynamic libc_port_associate port_associate "libc.so"
145 //go:cgo_import_dynamic libc_port_dissociate port_dissociate "libc.so"
146 //go:cgo_import_dynamic libc_port_get port_get "libc.so"
147 //go:cgo_import_dynamic libc_port_getn port_getn "libc.so"
143148
144149 //go:linkname procpipe libc_pipe
145150 //go:linkname procpipe2 libc_pipe2
271276 //go:linkname procgetpeername libc_getpeername
272277 //go:linkname procsetsockopt libc_setsockopt
273278 //go:linkname procrecvfrom libc_recvfrom
279 //go:linkname procport_create libc_port_create
280 //go:linkname procport_associate libc_port_associate
281 //go:linkname procport_dissociate libc_port_dissociate
282 //go:linkname procport_get libc_port_get
283 //go:linkname procport_getn libc_port_getn
274284
275285 var (
276286 procpipe,
402412 proc__xnet_getsockopt,
403413 procgetpeername,
404414 procsetsockopt,
405 procrecvfrom syscallFunc
415 procrecvfrom,
416 procport_create,
417 procport_associate,
418 procport_dissociate,
419 procport_get,
420 procport_getn syscallFunc
406421 )
407422
408423 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
19801995 }
19811996 return
19821997 }
1998
1999 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2000
2001 func port_create() (n int, err error) {
2002 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_create)), 0, 0, 0, 0, 0, 0, 0)
2003 n = int(r0)
2004 if e1 != 0 {
2005 err = e1
2006 }
2007 return
2008 }
2009
2010 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2011
2012 func port_associate(port int, source int, object uintptr, events int, user *byte) (n int, err error) {
2013 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_associate)), 5, uintptr(port), uintptr(source), uintptr(object), uintptr(events), uintptr(unsafe.Pointer(user)), 0)
2014 n = int(r0)
2015 if e1 != 0 {
2016 err = e1
2017 }
2018 return
2019 }
2020
2021 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2022
2023 func port_dissociate(port int, source int, object uintptr) (n int, err error) {
2024 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_dissociate)), 3, uintptr(port), uintptr(source), uintptr(object), 0, 0, 0)
2025 n = int(r0)
2026 if e1 != 0 {
2027 err = e1
2028 }
2029 return
2030 }
2031
2032 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2033
2034 func port_get(port int, pe *portEvent, timeout *Timespec) (n int, err error) {
2035 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_get)), 3, uintptr(port), uintptr(unsafe.Pointer(pe)), uintptr(unsafe.Pointer(timeout)), 0, 0, 0)
2036 n = int(r0)
2037 if e1 != 0 {
2038 err = e1
2039 }
2040 return
2041 }
2042
2043 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
2044
2045 func port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Timespec) (n int, err error) {
2046 r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_getn)), 5, uintptr(port), uintptr(unsafe.Pointer(pe)), uintptr(max), uintptr(unsafe.Pointer(nget)), uintptr(unsafe.Pointer(timeout)), 0)
2047 n = int(r0)
2048 if e1 != 0 {
2049 err = e1
2050 }
2051 return
2052 }
438438 SYS_PROCESS_MADVISE = 440
439439 SYS_EPOLL_PWAIT2 = 441
440440 SYS_MOUNT_SETATTR = 442
441 SYS_QUOTACTL_FD = 443
442 SYS_LANDLOCK_CREATE_RULESET = 444
443 SYS_LANDLOCK_ADD_RULE = 445
444 SYS_LANDLOCK_RESTRICT_SELF = 446
445 SYS_MEMFD_SECRET = 447
446 SYS_PROCESS_MRELEASE = 448
441447 )
66 package unix
77
88 const (
9 SYS_READ = 0
10 SYS_WRITE = 1
11 SYS_OPEN = 2
12 SYS_CLOSE = 3
13 SYS_STAT = 4
14 SYS_FSTAT = 5
15 SYS_LSTAT = 6
16 SYS_POLL = 7
17 SYS_LSEEK = 8
18 SYS_MMAP = 9
19 SYS_MPROTECT = 10
20 SYS_MUNMAP = 11
21 SYS_BRK = 12
22 SYS_RT_SIGACTION = 13
23 SYS_RT_SIGPROCMASK = 14
24 SYS_RT_SIGRETURN = 15
25 SYS_IOCTL = 16
26 SYS_PREAD64 = 17
27 SYS_PWRITE64 = 18
28 SYS_READV = 19
29 SYS_WRITEV = 20
30 SYS_ACCESS = 21
31 SYS_PIPE = 22
32 SYS_SELECT = 23
33 SYS_SCHED_YIELD = 24
34 SYS_MREMAP = 25
35 SYS_MSYNC = 26
36 SYS_MINCORE = 27
37 SYS_MADVISE = 28
38 SYS_SHMGET = 29
39 SYS_SHMAT = 30
40 SYS_SHMCTL = 31
41 SYS_DUP = 32
42 SYS_DUP2 = 33
43 SYS_PAUSE = 34
44 SYS_NANOSLEEP = 35
45 SYS_GETITIMER = 36
46 SYS_ALARM = 37
47 SYS_SETITIMER = 38
48 SYS_GETPID = 39
49 SYS_SENDFILE = 40
50 SYS_SOCKET = 41
51 SYS_CONNECT = 42
52 SYS_ACCEPT = 43
53 SYS_SENDTO = 44
54 SYS_RECVFROM = 45
55 SYS_SENDMSG = 46
56 SYS_RECVMSG = 47
57 SYS_SHUTDOWN = 48
58 SYS_BIND = 49
59 SYS_LISTEN = 50
60 SYS_GETSOCKNAME = 51
61 SYS_GETPEERNAME = 52
62 SYS_SOCKETPAIR = 53
63 SYS_SETSOCKOPT = 54
64 SYS_GETSOCKOPT = 55
65 SYS_CLONE = 56
66 SYS_FORK = 57
67 SYS_VFORK = 58
68 SYS_EXECVE = 59
69 SYS_EXIT = 60
70 SYS_WAIT4 = 61
71 SYS_KILL = 62
72 SYS_UNAME = 63
73 SYS_SEMGET = 64
74 SYS_SEMOP = 65
75 SYS_SEMCTL = 66
76 SYS_SHMDT = 67
77 SYS_MSGGET = 68
78 SYS_MSGSND = 69
79 SYS_MSGRCV = 70
80 SYS_MSGCTL = 71
81 SYS_FCNTL = 72
82 SYS_FLOCK = 73
83 SYS_FSYNC = 74
84 SYS_FDATASYNC = 75
85 SYS_TRUNCATE = 76
86 SYS_FTRUNCATE = 77
87 SYS_GETDENTS = 78
88 SYS_GETCWD = 79
89 SYS_CHDIR = 80
90 SYS_FCHDIR = 81
91 SYS_RENAME = 82
92 SYS_MKDIR = 83
93 SYS_RMDIR = 84
94 SYS_CREAT = 85
95 SYS_LINK = 86
96 SYS_UNLINK = 87
97 SYS_SYMLINK = 88
98 SYS_READLINK = 89
99 SYS_CHMOD = 90
100 SYS_FCHMOD = 91
101 SYS_CHOWN = 92
102 SYS_FCHOWN = 93
103 SYS_LCHOWN = 94
104 SYS_UMASK = 95
105 SYS_GETTIMEOFDAY = 96
106 SYS_GETRLIMIT = 97
107 SYS_GETRUSAGE = 98
108 SYS_SYSINFO = 99
109 SYS_TIMES = 100
110 SYS_PTRACE = 101
111 SYS_GETUID = 102
112 SYS_SYSLOG = 103
113 SYS_GETGID = 104
114 SYS_SETUID = 105
115 SYS_SETGID = 106
116 SYS_GETEUID = 107
117 SYS_GETEGID = 108
118 SYS_SETPGID = 109
119 SYS_GETPPID = 110
120 SYS_GETPGRP = 111
121 SYS_SETSID = 112
122 SYS_SETREUID = 113
123 SYS_SETREGID = 114
124 SYS_GETGROUPS = 115
125 SYS_SETGROUPS = 116
126 SYS_SETRESUID = 117
127 SYS_GETRESUID = 118
128 SYS_SETRESGID = 119
129 SYS_GETRESGID = 120
130 SYS_GETPGID = 121
131 SYS_SETFSUID = 122
132 SYS_SETFSGID = 123
133 SYS_GETSID = 124
134 SYS_CAPGET = 125
135 SYS_CAPSET = 126
136 SYS_RT_SIGPENDING = 127
137 SYS_RT_SIGTIMEDWAIT = 128
138 SYS_RT_SIGQUEUEINFO = 129
139 SYS_RT_SIGSUSPEND = 130
140 SYS_SIGALTSTACK = 131
141 SYS_UTIME = 132
142 SYS_MKNOD = 133
143 SYS_USELIB = 134
144 SYS_PERSONALITY = 135
145 SYS_USTAT = 136
146 SYS_STATFS = 137
147 SYS_FSTATFS = 138
148 SYS_SYSFS = 139
149 SYS_GETPRIORITY = 140
150 SYS_SETPRIORITY = 141
151 SYS_SCHED_SETPARAM = 142
152 SYS_SCHED_GETPARAM = 143
153 SYS_SCHED_SETSCHEDULER = 144
154 SYS_SCHED_GETSCHEDULER = 145
155 SYS_SCHED_GET_PRIORITY_MAX = 146
156 SYS_SCHED_GET_PRIORITY_MIN = 147
157 SYS_SCHED_RR_GET_INTERVAL = 148
158 SYS_MLOCK = 149
159 SYS_MUNLOCK = 150
160 SYS_MLOCKALL = 151
161 SYS_MUNLOCKALL = 152
162 SYS_VHANGUP = 153
163 SYS_MODIFY_LDT = 154
164 SYS_PIVOT_ROOT = 155
165 SYS__SYSCTL = 156
166 SYS_PRCTL = 157
167 SYS_ARCH_PRCTL = 158
168 SYS_ADJTIMEX = 159
169 SYS_SETRLIMIT = 160
170 SYS_CHROOT = 161
171 SYS_SYNC = 162
172 SYS_ACCT = 163
173 SYS_SETTIMEOFDAY = 164
174 SYS_MOUNT = 165
175 SYS_UMOUNT2 = 166
176 SYS_SWAPON = 167
177 SYS_SWAPOFF = 168
178 SYS_REBOOT = 169
179 SYS_SETHOSTNAME = 170
180 SYS_SETDOMAINNAME = 171
181 SYS_IOPL = 172
182 SYS_IOPERM = 173
183 SYS_CREATE_MODULE = 174
184 SYS_INIT_MODULE = 175
185 SYS_DELETE_MODULE = 176
186 SYS_GET_KERNEL_SYMS = 177
187 SYS_QUERY_MODULE = 178
188 SYS_QUOTACTL = 179
189 SYS_NFSSERVCTL = 180
190 SYS_GETPMSG = 181
191 SYS_PUTPMSG = 182
192 SYS_AFS_SYSCALL = 183
193 SYS_TUXCALL = 184
194 SYS_SECURITY = 185
195 SYS_GETTID = 186
196 SYS_READAHEAD = 187
197 SYS_SETXATTR = 188
198 SYS_LSETXATTR = 189
199 SYS_FSETXATTR = 190
200 SYS_GETXATTR = 191
201 SYS_LGETXATTR = 192
202 SYS_FGETXATTR = 193
203 SYS_LISTXATTR = 194
204 SYS_LLISTXATTR = 195
205 SYS_FLISTXATTR = 196
206 SYS_REMOVEXATTR = 197
207 SYS_LREMOVEXATTR = 198
208 SYS_FREMOVEXATTR = 199
209 SYS_TKILL = 200
210 SYS_TIME = 201
211 SYS_FUTEX = 202
212 SYS_SCHED_SETAFFINITY = 203
213 SYS_SCHED_GETAFFINITY = 204
214 SYS_SET_THREAD_AREA = 205
215 SYS_IO_SETUP = 206
216 SYS_IO_DESTROY = 207
217 SYS_IO_GETEVENTS = 208
218 SYS_IO_SUBMIT = 209
219 SYS_IO_CANCEL = 210
220 SYS_GET_THREAD_AREA = 211
221 SYS_LOOKUP_DCOOKIE = 212
222 SYS_EPOLL_CREATE = 213
223 SYS_EPOLL_CTL_OLD = 214
224 SYS_EPOLL_WAIT_OLD = 215
225 SYS_REMAP_FILE_PAGES = 216
226 SYS_GETDENTS64 = 217
227 SYS_SET_TID_ADDRESS = 218
228 SYS_RESTART_SYSCALL = 219
229 SYS_SEMTIMEDOP = 220
230 SYS_FADVISE64 = 221
231 SYS_TIMER_CREATE = 222
232 SYS_TIMER_SETTIME = 223
233 SYS_TIMER_GETTIME = 224
234 SYS_TIMER_GETOVERRUN = 225
235 SYS_TIMER_DELETE = 226
236 SYS_CLOCK_SETTIME = 227
237 SYS_CLOCK_GETTIME = 228
238 SYS_CLOCK_GETRES = 229
239 SYS_CLOCK_NANOSLEEP = 230
240 SYS_EXIT_GROUP = 231
241 SYS_EPOLL_WAIT = 232
242 SYS_EPOLL_CTL = 233
243 SYS_TGKILL = 234
244 SYS_UTIMES = 235
245 SYS_VSERVER = 236
246 SYS_MBIND = 237
247 SYS_SET_MEMPOLICY = 238
248 SYS_GET_MEMPOLICY = 239
249 SYS_MQ_OPEN = 240
250 SYS_MQ_UNLINK = 241
251 SYS_MQ_TIMEDSEND = 242
252 SYS_MQ_TIMEDRECEIVE = 243
253 SYS_MQ_NOTIFY = 244
254 SYS_MQ_GETSETATTR = 245
255 SYS_KEXEC_LOAD = 246
256 SYS_WAITID = 247
257 SYS_ADD_KEY = 248
258 SYS_REQUEST_KEY = 249
259 SYS_KEYCTL = 250
260 SYS_IOPRIO_SET = 251
261 SYS_IOPRIO_GET = 252
262 SYS_INOTIFY_INIT = 253
263 SYS_INOTIFY_ADD_WATCH = 254
264 SYS_INOTIFY_RM_WATCH = 255
265 SYS_MIGRATE_PAGES = 256
266 SYS_OPENAT = 257
267 SYS_MKDIRAT = 258
268 SYS_MKNODAT = 259
269 SYS_FCHOWNAT = 260
270 SYS_FUTIMESAT = 261
271 SYS_NEWFSTATAT = 262
272 SYS_UNLINKAT = 263
273 SYS_RENAMEAT = 264
274 SYS_LINKAT = 265
275 SYS_SYMLINKAT = 266
276 SYS_READLINKAT = 267
277 SYS_FCHMODAT = 268
278 SYS_FACCESSAT = 269
279 SYS_PSELECT6 = 270
280 SYS_PPOLL = 271
281 SYS_UNSHARE = 272
282 SYS_SET_ROBUST_LIST = 273
283 SYS_GET_ROBUST_LIST = 274
284 SYS_SPLICE = 275
285 SYS_TEE = 276
286 SYS_SYNC_FILE_RANGE = 277
287 SYS_VMSPLICE = 278
288 SYS_MOVE_PAGES = 279
289 SYS_UTIMENSAT = 280
290 SYS_EPOLL_PWAIT = 281
291 SYS_SIGNALFD = 282
292 SYS_TIMERFD_CREATE = 283
293 SYS_EVENTFD = 284
294 SYS_FALLOCATE = 285
295 SYS_TIMERFD_SETTIME = 286
296 SYS_TIMERFD_GETTIME = 287
297 SYS_ACCEPT4 = 288
298 SYS_SIGNALFD4 = 289
299 SYS_EVENTFD2 = 290
300 SYS_EPOLL_CREATE1 = 291
301 SYS_DUP3 = 292
302 SYS_PIPE2 = 293
303 SYS_INOTIFY_INIT1 = 294
304 SYS_PREADV = 295
305 SYS_PWRITEV = 296
306 SYS_RT_TGSIGQUEUEINFO = 297
307 SYS_PERF_EVENT_OPEN = 298
308 SYS_RECVMMSG = 299
309 SYS_FANOTIFY_INIT = 300
310 SYS_FANOTIFY_MARK = 301
311 SYS_PRLIMIT64 = 302
312 SYS_NAME_TO_HANDLE_AT = 303
313 SYS_OPEN_BY_HANDLE_AT = 304
314 SYS_CLOCK_ADJTIME = 305
315 SYS_SYNCFS = 306
316 SYS_SENDMMSG = 307
317 SYS_SETNS = 308
318 SYS_GETCPU = 309
319 SYS_PROCESS_VM_READV = 310
320 SYS_PROCESS_VM_WRITEV = 311
321 SYS_KCMP = 312
322 SYS_FINIT_MODULE = 313
323 SYS_SCHED_SETATTR = 314
324 SYS_SCHED_GETATTR = 315
325 SYS_RENAMEAT2 = 316
326 SYS_SECCOMP = 317
327 SYS_GETRANDOM = 318
328 SYS_MEMFD_CREATE = 319
329 SYS_KEXEC_FILE_LOAD = 320
330 SYS_BPF = 321
331 SYS_EXECVEAT = 322
332 SYS_USERFAULTFD = 323
333 SYS_MEMBARRIER = 324
334 SYS_MLOCK2 = 325
335 SYS_COPY_FILE_RANGE = 326
336 SYS_PREADV2 = 327
337 SYS_PWRITEV2 = 328
338 SYS_PKEY_MPROTECT = 329
339 SYS_PKEY_ALLOC = 330
340 SYS_PKEY_FREE = 331
341 SYS_STATX = 332
342 SYS_IO_PGETEVENTS = 333
343 SYS_RSEQ = 334
344 SYS_PIDFD_SEND_SIGNAL = 424
345 SYS_IO_URING_SETUP = 425
346 SYS_IO_URING_ENTER = 426
347 SYS_IO_URING_REGISTER = 427
348 SYS_OPEN_TREE = 428
349 SYS_MOVE_MOUNT = 429
350 SYS_FSOPEN = 430
351 SYS_FSCONFIG = 431
352 SYS_FSMOUNT = 432
353 SYS_FSPICK = 433
354 SYS_PIDFD_OPEN = 434
355 SYS_CLONE3 = 435
356 SYS_CLOSE_RANGE = 436
357 SYS_OPENAT2 = 437
358 SYS_PIDFD_GETFD = 438
359 SYS_FACCESSAT2 = 439
360 SYS_PROCESS_MADVISE = 440
361 SYS_EPOLL_PWAIT2 = 441
362 SYS_MOUNT_SETATTR = 442
9 SYS_READ = 0
10 SYS_WRITE = 1
11 SYS_OPEN = 2
12 SYS_CLOSE = 3
13 SYS_STAT = 4
14 SYS_FSTAT = 5
15 SYS_LSTAT = 6
16 SYS_POLL = 7
17 SYS_LSEEK = 8
18 SYS_MMAP = 9
19 SYS_MPROTECT = 10
20 SYS_MUNMAP = 11
21 SYS_BRK = 12
22 SYS_RT_SIGACTION = 13
23 SYS_RT_SIGPROCMASK = 14
24 SYS_RT_SIGRETURN = 15
25 SYS_IOCTL = 16
26 SYS_PREAD64 = 17
27 SYS_PWRITE64 = 18
28 SYS_READV = 19
29 SYS_WRITEV = 20
30 SYS_ACCESS = 21
31 SYS_PIPE = 22
32 SYS_SELECT = 23
33 SYS_SCHED_YIELD = 24
34 SYS_MREMAP = 25
35 SYS_MSYNC = 26
36 SYS_MINCORE = 27
37 SYS_MADVISE = 28
38 SYS_SHMGET = 29
39 SYS_SHMAT = 30
40 SYS_SHMCTL = 31
41 SYS_DUP = 32
42 SYS_DUP2 = 33
43 SYS_PAUSE = 34
44 SYS_NANOSLEEP = 35
45 SYS_GETITIMER = 36
46 SYS_ALARM = 37
47 SYS_SETITIMER = 38
48 SYS_GETPID = 39
49 SYS_SENDFILE = 40
50 SYS_SOCKET = 41
51 SYS_CONNECT = 42
52 SYS_ACCEPT = 43
53 SYS_SENDTO = 44
54 SYS_RECVFROM = 45
55 SYS_SENDMSG = 46
56 SYS_RECVMSG = 47
57 SYS_SHUTDOWN = 48
58 SYS_BIND = 49
59 SYS_LISTEN = 50
60 SYS_GETSOCKNAME = 51
61 SYS_GETPEERNAME = 52
62 SYS_SOCKETPAIR = 53
63 SYS_SETSOCKOPT = 54
64 SYS_GETSOCKOPT = 55
65 SYS_CLONE = 56
66 SYS_FORK = 57
67 SYS_VFORK = 58
68 SYS_EXECVE = 59
69 SYS_EXIT = 60
70 SYS_WAIT4 = 61
71 SYS_KILL = 62
72 SYS_UNAME = 63
73 SYS_SEMGET = 64
74 SYS_SEMOP = 65
75 SYS_SEMCTL = 66
76 SYS_SHMDT = 67
77 SYS_MSGGET = 68
78 SYS_MSGSND = 69
79 SYS_MSGRCV = 70
80 SYS_MSGCTL = 71
81 SYS_FCNTL = 72
82 SYS_FLOCK = 73
83 SYS_FSYNC = 74
84 SYS_FDATASYNC = 75
85 SYS_TRUNCATE = 76
86 SYS_FTRUNCATE = 77
87 SYS_GETDENTS = 78
88 SYS_GETCWD = 79
89 SYS_CHDIR = 80
90 SYS_FCHDIR = 81
91 SYS_RENAME = 82
92 SYS_MKDIR = 83
93 SYS_RMDIR = 84
94 SYS_CREAT = 85
95 SYS_LINK = 86
96 SYS_UNLINK = 87
97 SYS_SYMLINK = 88
98 SYS_READLINK = 89
99 SYS_CHMOD = 90
100 SYS_FCHMOD = 91
101 SYS_CHOWN = 92
102 SYS_FCHOWN = 93
103 SYS_LCHOWN = 94
104 SYS_UMASK = 95
105 SYS_GETTIMEOFDAY = 96
106 SYS_GETRLIMIT = 97
107 SYS_GETRUSAGE = 98
108 SYS_SYSINFO = 99
109 SYS_TIMES = 100
110 SYS_PTRACE = 101
111 SYS_GETUID = 102
112 SYS_SYSLOG = 103
113 SYS_GETGID = 104
114 SYS_SETUID = 105
115 SYS_SETGID = 106
116 SYS_GETEUID = 107
117 SYS_GETEGID = 108
118 SYS_SETPGID = 109
119 SYS_GETPPID = 110
120 SYS_GETPGRP = 111
121 SYS_SETSID = 112
122 SYS_SETREUID = 113
123 SYS_SETREGID = 114
124 SYS_GETGROUPS = 115
125 SYS_SETGROUPS = 116
126 SYS_SETRESUID = 117
127 SYS_GETRESUID = 118
128 SYS_SETRESGID = 119
129 SYS_GETRESGID = 120
130 SYS_GETPGID = 121
131 SYS_SETFSUID = 122
132 SYS_SETFSGID = 123
133 SYS_GETSID = 124
134 SYS_CAPGET = 125
135 SYS_CAPSET = 126
136 SYS_RT_SIGPENDING = 127
137 SYS_RT_SIGTIMEDWAIT = 128
138 SYS_RT_SIGQUEUEINFO = 129
139 SYS_RT_SIGSUSPEND = 130
140 SYS_SIGALTSTACK = 131
141 SYS_UTIME = 132
142 SYS_MKNOD = 133
143 SYS_USELIB = 134
144 SYS_PERSONALITY = 135
145 SYS_USTAT = 136
146 SYS_STATFS = 137
147 SYS_FSTATFS = 138
148 SYS_SYSFS = 139
149 SYS_GETPRIORITY = 140
150 SYS_SETPRIORITY = 141
151 SYS_SCHED_SETPARAM = 142
152 SYS_SCHED_GETPARAM = 143
153 SYS_SCHED_SETSCHEDULER = 144
154 SYS_SCHED_GETSCHEDULER = 145
155 SYS_SCHED_GET_PRIORITY_MAX = 146
156 SYS_SCHED_GET_PRIORITY_MIN = 147
157 SYS_SCHED_RR_GET_INTERVAL = 148
158 SYS_MLOCK = 149
159 SYS_MUNLOCK = 150
160 SYS_MLOCKALL = 151
161 SYS_MUNLOCKALL = 152
162 SYS_VHANGUP = 153
163 SYS_MODIFY_LDT = 154
164 SYS_PIVOT_ROOT = 155
165 SYS__SYSCTL = 156
166 SYS_PRCTL = 157
167 SYS_ARCH_PRCTL = 158
168 SYS_ADJTIMEX = 159
169 SYS_SETRLIMIT = 160
170 SYS_CHROOT = 161
171 SYS_SYNC = 162
172 SYS_ACCT = 163
173 SYS_SETTIMEOFDAY = 164
174 SYS_MOUNT = 165
175 SYS_UMOUNT2 = 166
176 SYS_SWAPON = 167
177 SYS_SWAPOFF = 168
178 SYS_REBOOT = 169
179 SYS_SETHOSTNAME = 170
180 SYS_SETDOMAINNAME = 171
181 SYS_IOPL = 172
182 SYS_IOPERM = 173
183 SYS_CREATE_MODULE = 174
184 SYS_INIT_MODULE = 175
185 SYS_DELETE_MODULE = 176
186 SYS_GET_KERNEL_SYMS = 177
187 SYS_QUERY_MODULE = 178
188 SYS_QUOTACTL = 179
189 SYS_NFSSERVCTL = 180
190 SYS_GETPMSG = 181
191 SYS_PUTPMSG = 182
192 SYS_AFS_SYSCALL = 183
193 SYS_TUXCALL = 184
194 SYS_SECURITY = 185
195 SYS_GETTID = 186
196 SYS_READAHEAD = 187
197 SYS_SETXATTR = 188
198 SYS_LSETXATTR = 189
199 SYS_FSETXATTR = 190
200 SYS_GETXATTR = 191
201 SYS_LGETXATTR = 192
202 SYS_FGETXATTR = 193
203 SYS_LISTXATTR = 194
204 SYS_LLISTXATTR = 195
205 SYS_FLISTXATTR = 196
206 SYS_REMOVEXATTR = 197
207 SYS_LREMOVEXATTR = 198
208 SYS_FREMOVEXATTR = 199
209 SYS_TKILL = 200
210 SYS_TIME = 201
211 SYS_FUTEX = 202
212 SYS_SCHED_SETAFFINITY = 203
213 SYS_SCHED_GETAFFINITY = 204
214 SYS_SET_THREAD_AREA = 205
215 SYS_IO_SETUP = 206
216 SYS_IO_DESTROY = 207
217 SYS_IO_GETEVENTS = 208
218 SYS_IO_SUBMIT = 209
219 SYS_IO_CANCEL = 210
220 SYS_GET_THREAD_AREA = 211
221 SYS_LOOKUP_DCOOKIE = 212
222 SYS_EPOLL_CREATE = 213
223 SYS_EPOLL_CTL_OLD = 214
224 SYS_EPOLL_WAIT_OLD = 215
225 SYS_REMAP_FILE_PAGES = 216
226 SYS_GETDENTS64 = 217
227 SYS_SET_TID_ADDRESS = 218
228 SYS_RESTART_SYSCALL = 219
229 SYS_SEMTIMEDOP = 220
230 SYS_FADVISE64 = 221
231 SYS_TIMER_CREATE = 222
232 SYS_TIMER_SETTIME = 223
233 SYS_TIMER_GETTIME = 224
234 SYS_TIMER_GETOVERRUN = 225
235 SYS_TIMER_DELETE = 226
236 SYS_CLOCK_SETTIME = 227
237 SYS_CLOCK_GETTIME = 228
238 SYS_CLOCK_GETRES = 229
239 SYS_CLOCK_NANOSLEEP = 230
240 SYS_EXIT_GROUP = 231
241 SYS_EPOLL_WAIT = 232
242 SYS_EPOLL_CTL = 233
243 SYS_TGKILL = 234
244 SYS_UTIMES = 235
245 SYS_VSERVER = 236
246 SYS_MBIND = 237
247 SYS_SET_MEMPOLICY = 238
248 SYS_GET_MEMPOLICY = 239
249 SYS_MQ_OPEN = 240
250 SYS_MQ_UNLINK = 241
251 SYS_MQ_TIMEDSEND = 242
252 SYS_MQ_TIMEDRECEIVE = 243
253 SYS_MQ_NOTIFY = 244
254 SYS_MQ_GETSETATTR = 245
255 SYS_KEXEC_LOAD = 246
256 SYS_WAITID = 247
257 SYS_ADD_KEY = 248
258 SYS_REQUEST_KEY = 249
259 SYS_KEYCTL = 250
260 SYS_IOPRIO_SET = 251
261 SYS_IOPRIO_GET = 252
262 SYS_INOTIFY_INIT = 253
263 SYS_INOTIFY_ADD_WATCH = 254
264 SYS_INOTIFY_RM_WATCH = 255
265 SYS_MIGRATE_PAGES = 256
266 SYS_OPENAT = 257
267 SYS_MKDIRAT = 258
268 SYS_MKNODAT = 259
269 SYS_FCHOWNAT = 260
270 SYS_FUTIMESAT = 261
271 SYS_NEWFSTATAT = 262
272 SYS_UNLINKAT = 263
273 SYS_RENAMEAT = 264
274 SYS_LINKAT = 265
275 SYS_SYMLINKAT = 266
276 SYS_READLINKAT = 267
277 SYS_FCHMODAT = 268
278 SYS_FACCESSAT = 269
279 SYS_PSELECT6 = 270
280 SYS_PPOLL = 271
281 SYS_UNSHARE = 272
282 SYS_SET_ROBUST_LIST = 273
283 SYS_GET_ROBUST_LIST = 274
284 SYS_SPLICE = 275
285 SYS_TEE = 276
286 SYS_SYNC_FILE_RANGE = 277
287 SYS_VMSPLICE = 278
288 SYS_MOVE_PAGES = 279
289 SYS_UTIMENSAT = 280
290 SYS_EPOLL_PWAIT = 281
291 SYS_SIGNALFD = 282
292 SYS_TIMERFD_CREATE = 283
293 SYS_EVENTFD = 284
294 SYS_FALLOCATE = 285
295 SYS_TIMERFD_SETTIME = 286
296 SYS_TIMERFD_GETTIME = 287
297 SYS_ACCEPT4 = 288
298 SYS_SIGNALFD4 = 289
299 SYS_EVENTFD2 = 290
300 SYS_EPOLL_CREATE1 = 291
301 SYS_DUP3 = 292
302 SYS_PIPE2 = 293
303 SYS_INOTIFY_INIT1 = 294
304 SYS_PREADV = 295
305 SYS_PWRITEV = 296
306 SYS_RT_TGSIGQUEUEINFO = 297
307 SYS_PERF_EVENT_OPEN = 298
308 SYS_RECVMMSG = 299
309 SYS_FANOTIFY_INIT = 300
310 SYS_FANOTIFY_MARK = 301
311 SYS_PRLIMIT64 = 302
312 SYS_NAME_TO_HANDLE_AT = 303
313 SYS_OPEN_BY_HANDLE_AT = 304
314 SYS_CLOCK_ADJTIME = 305
315 SYS_SYNCFS = 306
316 SYS_SENDMMSG = 307
317 SYS_SETNS = 308
318 SYS_GETCPU = 309
319 SYS_PROCESS_VM_READV = 310
320 SYS_PROCESS_VM_WRITEV = 311
321 SYS_KCMP = 312
322 SYS_FINIT_MODULE = 313
323 SYS_SCHED_SETATTR = 314
324 SYS_SCHED_GETATTR = 315
325 SYS_RENAMEAT2 = 316
326 SYS_SECCOMP = 317
327 SYS_GETRANDOM = 318
328 SYS_MEMFD_CREATE = 319
329 SYS_KEXEC_FILE_LOAD = 320
330 SYS_BPF = 321
331 SYS_EXECVEAT = 322
332 SYS_USERFAULTFD = 323
333 SYS_MEMBARRIER = 324
334 SYS_MLOCK2 = 325
335 SYS_COPY_FILE_RANGE = 326
336 SYS_PREADV2 = 327
337 SYS_PWRITEV2 = 328
338 SYS_PKEY_MPROTECT = 329
339 SYS_PKEY_ALLOC = 330
340 SYS_PKEY_FREE = 331
341 SYS_STATX = 332
342 SYS_IO_PGETEVENTS = 333
343 SYS_RSEQ = 334
344 SYS_PIDFD_SEND_SIGNAL = 424
345 SYS_IO_URING_SETUP = 425
346 SYS_IO_URING_ENTER = 426
347 SYS_IO_URING_REGISTER = 427
348 SYS_OPEN_TREE = 428
349 SYS_MOVE_MOUNT = 429
350 SYS_FSOPEN = 430
351 SYS_FSCONFIG = 431
352 SYS_FSMOUNT = 432
353 SYS_FSPICK = 433
354 SYS_PIDFD_OPEN = 434
355 SYS_CLONE3 = 435
356 SYS_CLOSE_RANGE = 436
357 SYS_OPENAT2 = 437
358 SYS_PIDFD_GETFD = 438
359 SYS_FACCESSAT2 = 439
360 SYS_PROCESS_MADVISE = 440
361 SYS_EPOLL_PWAIT2 = 441
362 SYS_MOUNT_SETATTR = 442
363 SYS_QUOTACTL_FD = 443
364 SYS_LANDLOCK_CREATE_RULESET = 444
365 SYS_LANDLOCK_ADD_RULE = 445
366 SYS_LANDLOCK_RESTRICT_SELF = 446
367 SYS_MEMFD_SECRET = 447
368 SYS_PROCESS_MRELEASE = 448
363369 )
66 package unix
77
88 const (
9 SYS_SYSCALL_MASK = 0
910 SYS_RESTART_SYSCALL = 0
1011 SYS_EXIT = 1
1112 SYS_FORK = 2
402403 SYS_PROCESS_MADVISE = 440
403404 SYS_EPOLL_PWAIT2 = 441
404405 SYS_MOUNT_SETATTR = 442
406 SYS_QUOTACTL_FD = 443
407 SYS_LANDLOCK_CREATE_RULESET = 444
408 SYS_LANDLOCK_ADD_RULE = 445
409 SYS_LANDLOCK_RESTRICT_SELF = 446
410 SYS_PROCESS_MRELEASE = 448
405411 )
66 package unix
77
88 const (
9 SYS_IO_SETUP = 0
10 SYS_IO_DESTROY = 1
11 SYS_IO_SUBMIT = 2
12 SYS_IO_CANCEL = 3
13 SYS_IO_GETEVENTS = 4
14 SYS_SETXATTR = 5
15 SYS_LSETXATTR = 6
16 SYS_FSETXATTR = 7
17 SYS_GETXATTR = 8
18 SYS_LGETXATTR = 9
19 SYS_FGETXATTR = 10
20 SYS_LISTXATTR = 11
21 SYS_LLISTXATTR = 12
22 SYS_FLISTXATTR = 13
23 SYS_REMOVEXATTR = 14
24 SYS_LREMOVEXATTR = 15
25 SYS_FREMOVEXATTR = 16
26 SYS_GETCWD = 17
27 SYS_LOOKUP_DCOOKIE = 18
28 SYS_EVENTFD2 = 19
29 SYS_EPOLL_CREATE1 = 20
30 SYS_EPOLL_CTL = 21
31 SYS_EPOLL_PWAIT = 22
32 SYS_DUP = 23
33 SYS_DUP3 = 24
34 SYS_FCNTL = 25
35 SYS_INOTIFY_INIT1 = 26
36 SYS_INOTIFY_ADD_WATCH = 27
37 SYS_INOTIFY_RM_WATCH = 28
38 SYS_IOCTL = 29
39 SYS_IOPRIO_SET = 30
40 SYS_IOPRIO_GET = 31
41 SYS_FLOCK = 32
42 SYS_MKNODAT = 33
43 SYS_MKDIRAT = 34
44 SYS_UNLINKAT = 35
45 SYS_SYMLINKAT = 36
46 SYS_LINKAT = 37
47 SYS_RENAMEAT = 38
48 SYS_UMOUNT2 = 39
49 SYS_MOUNT = 40
50 SYS_PIVOT_ROOT = 41
51 SYS_NFSSERVCTL = 42
52 SYS_STATFS = 43
53 SYS_FSTATFS = 44
54 SYS_TRUNCATE = 45
55 SYS_FTRUNCATE = 46
56 SYS_FALLOCATE = 47
57 SYS_FACCESSAT = 48
58 SYS_CHDIR = 49
59 SYS_FCHDIR = 50
60 SYS_CHROOT = 51
61 SYS_FCHMOD = 52
62 SYS_FCHMODAT = 53
63 SYS_FCHOWNAT = 54
64 SYS_FCHOWN = 55
65 SYS_OPENAT = 56
66 SYS_CLOSE = 57
67 SYS_VHANGUP = 58
68 SYS_PIPE2 = 59
69 SYS_QUOTACTL = 60
70 SYS_GETDENTS64 = 61
71 SYS_LSEEK = 62
72 SYS_READ = 63
73 SYS_WRITE = 64
74 SYS_READV = 65
75 SYS_WRITEV = 66
76 SYS_PREAD64 = 67
77 SYS_PWRITE64 = 68
78 SYS_PREADV = 69
79 SYS_PWRITEV = 70
80 SYS_SENDFILE = 71
81 SYS_PSELECT6 = 72
82 SYS_PPOLL = 73
83 SYS_SIGNALFD4 = 74
84 SYS_VMSPLICE = 75
85 SYS_SPLICE = 76
86 SYS_TEE = 77
87 SYS_READLINKAT = 78
88 SYS_FSTATAT = 79
89 SYS_FSTAT = 80
90 SYS_SYNC = 81
91 SYS_FSYNC = 82
92 SYS_FDATASYNC = 83
93 SYS_SYNC_FILE_RANGE = 84
94 SYS_TIMERFD_CREATE = 85
95 SYS_TIMERFD_SETTIME = 86
96 SYS_TIMERFD_GETTIME = 87
97 SYS_UTIMENSAT = 88
98 SYS_ACCT = 89
99 SYS_CAPGET = 90
100 SYS_CAPSET = 91
101 SYS_PERSONALITY = 92
102 SYS_EXIT = 93
103 SYS_EXIT_GROUP = 94
104 SYS_WAITID = 95
105 SYS_SET_TID_ADDRESS = 96
106 SYS_UNSHARE = 97
107 SYS_FUTEX = 98
108 SYS_SET_ROBUST_LIST = 99
109 SYS_GET_ROBUST_LIST = 100
110 SYS_NANOSLEEP = 101
111 SYS_GETITIMER = 102
112 SYS_SETITIMER = 103
113 SYS_KEXEC_LOAD = 104
114 SYS_INIT_MODULE = 105
115 SYS_DELETE_MODULE = 106
116 SYS_TIMER_CREATE = 107
117 SYS_TIMER_GETTIME = 108
118 SYS_TIMER_GETOVERRUN = 109
119 SYS_TIMER_SETTIME = 110
120 SYS_TIMER_DELETE = 111
121 SYS_CLOCK_SETTIME = 112
122 SYS_CLOCK_GETTIME = 113
123 SYS_CLOCK_GETRES = 114
124 SYS_CLOCK_NANOSLEEP = 115
125 SYS_SYSLOG = 116
126 SYS_PTRACE = 117
127 SYS_SCHED_SETPARAM = 118
128 SYS_SCHED_SETSCHEDULER = 119
129 SYS_SCHED_GETSCHEDULER = 120
130 SYS_SCHED_GETPARAM = 121
131 SYS_SCHED_SETAFFINITY = 122
132 SYS_SCHED_GETAFFINITY = 123
133 SYS_SCHED_YIELD = 124
134 SYS_SCHED_GET_PRIORITY_MAX = 125
135 SYS_SCHED_GET_PRIORITY_MIN = 126
136 SYS_SCHED_RR_GET_INTERVAL = 127
137 SYS_RESTART_SYSCALL = 128
138 SYS_KILL = 129
139 SYS_TKILL = 130
140 SYS_TGKILL = 131
141 SYS_SIGALTSTACK = 132
142 SYS_RT_SIGSUSPEND = 133
143 SYS_RT_SIGACTION = 134
144 SYS_RT_SIGPROCMASK = 135
145 SYS_RT_SIGPENDING = 136
146 SYS_RT_SIGTIMEDWAIT = 137
147 SYS_RT_SIGQUEUEINFO = 138
148 SYS_RT_SIGRETURN = 139
149 SYS_SETPRIORITY = 140
150 SYS_GETPRIORITY = 141
151 SYS_REBOOT = 142
152 SYS_SETREGID = 143
153 SYS_SETGID = 144
154 SYS_SETREUID = 145
155 SYS_SETUID = 146
156 SYS_SETRESUID = 147
157 SYS_GETRESUID = 148
158 SYS_SETRESGID = 149
159 SYS_GETRESGID = 150
160 SYS_SETFSUID = 151
161 SYS_SETFSGID = 152
162 SYS_TIMES = 153
163 SYS_SETPGID = 154
164 SYS_GETPGID = 155
165 SYS_GETSID = 156
166 SYS_SETSID = 157
167 SYS_GETGROUPS = 158
168 SYS_SETGROUPS = 159
169 SYS_UNAME = 160
170 SYS_SETHOSTNAME = 161
171 SYS_SETDOMAINNAME = 162
172 SYS_GETRLIMIT = 163
173 SYS_SETRLIMIT = 164
174 SYS_GETRUSAGE = 165
175 SYS_UMASK = 166
176 SYS_PRCTL = 167
177 SYS_GETCPU = 168
178 SYS_GETTIMEOFDAY = 169
179 SYS_SETTIMEOFDAY = 170
180 SYS_ADJTIMEX = 171
181 SYS_GETPID = 172
182 SYS_GETPPID = 173
183 SYS_GETUID = 174
184 SYS_GETEUID = 175
185 SYS_GETGID = 176
186 SYS_GETEGID = 177
187 SYS_GETTID = 178
188 SYS_SYSINFO = 179
189 SYS_MQ_OPEN = 180
190 SYS_MQ_UNLINK = 181
191 SYS_MQ_TIMEDSEND = 182
192 SYS_MQ_TIMEDRECEIVE = 183
193 SYS_MQ_NOTIFY = 184
194 SYS_MQ_GETSETATTR = 185
195 SYS_MSGGET = 186
196 SYS_MSGCTL = 187
197 SYS_MSGRCV = 188
198 SYS_MSGSND = 189
199 SYS_SEMGET = 190
200 SYS_SEMCTL = 191
201 SYS_SEMTIMEDOP = 192
202 SYS_SEMOP = 193
203 SYS_SHMGET = 194
204 SYS_SHMCTL = 195
205 SYS_SHMAT = 196
206 SYS_SHMDT = 197
207 SYS_SOCKET = 198
208 SYS_SOCKETPAIR = 199
209 SYS_BIND = 200
210 SYS_LISTEN = 201
211 SYS_ACCEPT = 202
212 SYS_CONNECT = 203
213 SYS_GETSOCKNAME = 204
214 SYS_GETPEERNAME = 205
215 SYS_SENDTO = 206
216 SYS_RECVFROM = 207
217 SYS_SETSOCKOPT = 208
218 SYS_GETSOCKOPT = 209
219 SYS_SHUTDOWN = 210
220 SYS_SENDMSG = 211
221 SYS_RECVMSG = 212
222 SYS_READAHEAD = 213
223 SYS_BRK = 214
224 SYS_MUNMAP = 215
225 SYS_MREMAP = 216
226 SYS_ADD_KEY = 217
227 SYS_REQUEST_KEY = 218
228 SYS_KEYCTL = 219
229 SYS_CLONE = 220
230 SYS_EXECVE = 221
231 SYS_MMAP = 222
232 SYS_FADVISE64 = 223
233 SYS_SWAPON = 224
234 SYS_SWAPOFF = 225
235 SYS_MPROTECT = 226
236 SYS_MSYNC = 227
237 SYS_MLOCK = 228
238 SYS_MUNLOCK = 229
239 SYS_MLOCKALL = 230
240 SYS_MUNLOCKALL = 231
241 SYS_MINCORE = 232
242 SYS_MADVISE = 233
243 SYS_REMAP_FILE_PAGES = 234
244 SYS_MBIND = 235
245 SYS_GET_MEMPOLICY = 236
246 SYS_SET_MEMPOLICY = 237
247 SYS_MIGRATE_PAGES = 238
248 SYS_MOVE_PAGES = 239
249 SYS_RT_TGSIGQUEUEINFO = 240
250 SYS_PERF_EVENT_OPEN = 241
251 SYS_ACCEPT4 = 242
252 SYS_RECVMMSG = 243
253 SYS_ARCH_SPECIFIC_SYSCALL = 244
254 SYS_WAIT4 = 260
255 SYS_PRLIMIT64 = 261
256 SYS_FANOTIFY_INIT = 262
257 SYS_FANOTIFY_MARK = 263
258 SYS_NAME_TO_HANDLE_AT = 264
259 SYS_OPEN_BY_HANDLE_AT = 265
260 SYS_CLOCK_ADJTIME = 266
261 SYS_SYNCFS = 267
262 SYS_SETNS = 268
263 SYS_SENDMMSG = 269
264 SYS_PROCESS_VM_READV = 270
265 SYS_PROCESS_VM_WRITEV = 271
266 SYS_KCMP = 272
267 SYS_FINIT_MODULE = 273
268 SYS_SCHED_SETATTR = 274
269 SYS_SCHED_GETATTR = 275
270 SYS_RENAMEAT2 = 276
271 SYS_SECCOMP = 277
272 SYS_GETRANDOM = 278
273 SYS_MEMFD_CREATE = 279
274 SYS_BPF = 280
275 SYS_EXECVEAT = 281
276 SYS_USERFAULTFD = 282
277 SYS_MEMBARRIER = 283
278 SYS_MLOCK2 = 284
279 SYS_COPY_FILE_RANGE = 285
280 SYS_PREADV2 = 286
281 SYS_PWRITEV2 = 287
282 SYS_PKEY_MPROTECT = 288
283 SYS_PKEY_ALLOC = 289
284 SYS_PKEY_FREE = 290
285 SYS_STATX = 291
286 SYS_IO_PGETEVENTS = 292
287 SYS_RSEQ = 293
288 SYS_KEXEC_FILE_LOAD = 294
289 SYS_PIDFD_SEND_SIGNAL = 424
290 SYS_IO_URING_SETUP = 425
291 SYS_IO_URING_ENTER = 426
292 SYS_IO_URING_REGISTER = 427
293 SYS_OPEN_TREE = 428
294 SYS_MOVE_MOUNT = 429
295 SYS_FSOPEN = 430
296 SYS_FSCONFIG = 431
297 SYS_FSMOUNT = 432
298 SYS_FSPICK = 433
299 SYS_PIDFD_OPEN = 434
300 SYS_CLONE3 = 435
301 SYS_CLOSE_RANGE = 436
302 SYS_OPENAT2 = 437
303 SYS_PIDFD_GETFD = 438
304 SYS_FACCESSAT2 = 439
305 SYS_PROCESS_MADVISE = 440
306 SYS_EPOLL_PWAIT2 = 441
307 SYS_MOUNT_SETATTR = 442
9 SYS_IO_SETUP = 0
10 SYS_IO_DESTROY = 1
11 SYS_IO_SUBMIT = 2
12 SYS_IO_CANCEL = 3
13 SYS_IO_GETEVENTS = 4
14 SYS_SETXATTR = 5
15 SYS_LSETXATTR = 6
16 SYS_FSETXATTR = 7
17 SYS_GETXATTR = 8
18 SYS_LGETXATTR = 9
19 SYS_FGETXATTR = 10
20 SYS_LISTXATTR = 11
21 SYS_LLISTXATTR = 12
22 SYS_FLISTXATTR = 13
23 SYS_REMOVEXATTR = 14
24 SYS_LREMOVEXATTR = 15
25 SYS_FREMOVEXATTR = 16
26 SYS_GETCWD = 17
27 SYS_LOOKUP_DCOOKIE = 18
28 SYS_EVENTFD2 = 19
29 SYS_EPOLL_CREATE1 = 20
30 SYS_EPOLL_CTL = 21
31 SYS_EPOLL_PWAIT = 22
32 SYS_DUP = 23
33 SYS_DUP3 = 24
34 SYS_FCNTL = 25
35 SYS_INOTIFY_INIT1 = 26
36 SYS_INOTIFY_ADD_WATCH = 27
37 SYS_INOTIFY_RM_WATCH = 28
38 SYS_IOCTL = 29
39 SYS_IOPRIO_SET = 30
40 SYS_IOPRIO_GET = 31
41 SYS_FLOCK = 32
42 SYS_MKNODAT = 33
43 SYS_MKDIRAT = 34
44 SYS_UNLINKAT = 35
45 SYS_SYMLINKAT = 36
46 SYS_LINKAT = 37
47 SYS_RENAMEAT = 38
48 SYS_UMOUNT2 = 39
49 SYS_MOUNT = 40
50 SYS_PIVOT_ROOT = 41
51 SYS_NFSSERVCTL = 42
52 SYS_STATFS = 43
53 SYS_FSTATFS = 44
54 SYS_TRUNCATE = 45
55 SYS_FTRUNCATE = 46
56 SYS_FALLOCATE = 47
57 SYS_FACCESSAT = 48
58 SYS_CHDIR = 49
59 SYS_FCHDIR = 50
60 SYS_CHROOT = 51
61 SYS_FCHMOD = 52
62 SYS_FCHMODAT = 53
63 SYS_FCHOWNAT = 54
64 SYS_FCHOWN = 55
65 SYS_OPENAT = 56
66 SYS_CLOSE = 57
67 SYS_VHANGUP = 58
68 SYS_PIPE2 = 59
69 SYS_QUOTACTL = 60
70 SYS_GETDENTS64 = 61
71 SYS_LSEEK = 62
72 SYS_READ = 63
73 SYS_WRITE = 64
74 SYS_READV = 65
75 SYS_WRITEV = 66
76 SYS_PREAD64 = 67
77 SYS_PWRITE64 = 68
78 SYS_PREADV = 69
79 SYS_PWRITEV = 70
80 SYS_SENDFILE = 71
81 SYS_PSELECT6 = 72
82 SYS_PPOLL = 73
83 SYS_SIGNALFD4 = 74
84 SYS_VMSPLICE = 75
85 SYS_SPLICE = 76
86 SYS_TEE = 77
87 SYS_READLINKAT = 78
88 SYS_FSTATAT = 79
89 SYS_FSTAT = 80
90 SYS_SYNC = 81
91 SYS_FSYNC = 82
92 SYS_FDATASYNC = 83
93 SYS_SYNC_FILE_RANGE = 84
94 SYS_TIMERFD_CREATE = 85
95 SYS_TIMERFD_SETTIME = 86
96 SYS_TIMERFD_GETTIME = 87
97 SYS_UTIMENSAT = 88
98 SYS_ACCT = 89
99 SYS_CAPGET = 90
100 SYS_CAPSET = 91
101 SYS_PERSONALITY = 92
102 SYS_EXIT = 93
103 SYS_EXIT_GROUP = 94
104 SYS_WAITID = 95
105 SYS_SET_TID_ADDRESS = 96
106 SYS_UNSHARE = 97
107 SYS_FUTEX = 98
108 SYS_SET_ROBUST_LIST = 99
109 SYS_GET_ROBUST_LIST = 100
110 SYS_NANOSLEEP = 101
111 SYS_GETITIMER = 102
112 SYS_SETITIMER = 103
113 SYS_KEXEC_LOAD = 104
114 SYS_INIT_MODULE = 105
115 SYS_DELETE_MODULE = 106
116 SYS_TIMER_CREATE = 107
117 SYS_TIMER_GETTIME = 108
118 SYS_TIMER_GETOVERRUN = 109
119 SYS_TIMER_SETTIME = 110
120 SYS_TIMER_DELETE = 111
121 SYS_CLOCK_SETTIME = 112
122 SYS_CLOCK_GETTIME = 113
123 SYS_CLOCK_GETRES = 114
124 SYS_CLOCK_NANOSLEEP = 115
125 SYS_SYSLOG = 116
126 SYS_PTRACE = 117
127 SYS_SCHED_SETPARAM = 118
128 SYS_SCHED_SETSCHEDULER = 119
129 SYS_SCHED_GETSCHEDULER = 120
130 SYS_SCHED_GETPARAM = 121
131 SYS_SCHED_SETAFFINITY = 122
132 SYS_SCHED_GETAFFINITY = 123
133 SYS_SCHED_YIELD = 124
134 SYS_SCHED_GET_PRIORITY_MAX = 125
135 SYS_SCHED_GET_PRIORITY_MIN = 126
136 SYS_SCHED_RR_GET_INTERVAL = 127
137 SYS_RESTART_SYSCALL = 128
138 SYS_KILL = 129
139 SYS_TKILL = 130
140 SYS_TGKILL = 131
141 SYS_SIGALTSTACK = 132
142 SYS_RT_SIGSUSPEND = 133
143 SYS_RT_SIGACTION = 134
144 SYS_RT_SIGPROCMASK = 135
145 SYS_RT_SIGPENDING = 136
146 SYS_RT_SIGTIMEDWAIT = 137
147 SYS_RT_SIGQUEUEINFO = 138
148 SYS_RT_SIGRETURN = 139
149 SYS_SETPRIORITY = 140
150 SYS_GETPRIORITY = 141
151 SYS_REBOOT = 142
152 SYS_SETREGID = 143
153 SYS_SETGID = 144
154 SYS_SETREUID = 145
155 SYS_SETUID = 146
156 SYS_SETRESUID = 147
157 SYS_GETRESUID = 148
158 SYS_SETRESGID = 149
159 SYS_GETRESGID = 150
160 SYS_SETFSUID = 151
161 SYS_SETFSGID = 152
162 SYS_TIMES = 153
163 SYS_SETPGID = 154
164 SYS_GETPGID = 155
165 SYS_GETSID = 156
166 SYS_SETSID = 157
167 SYS_GETGROUPS = 158
168 SYS_SETGROUPS = 159
169 SYS_UNAME = 160
170 SYS_SETHOSTNAME = 161
171 SYS_SETDOMAINNAME = 162
172 SYS_GETRLIMIT = 163
173 SYS_SETRLIMIT = 164
174 SYS_GETRUSAGE = 165
175 SYS_UMASK = 166
176 SYS_PRCTL = 167
177 SYS_GETCPU = 168
178 SYS_GETTIMEOFDAY = 169
179 SYS_SETTIMEOFDAY = 170
180 SYS_ADJTIMEX = 171
181 SYS_GETPID = 172
182 SYS_GETPPID = 173
183 SYS_GETUID = 174
184 SYS_GETEUID = 175
185 SYS_GETGID = 176
186 SYS_GETEGID = 177
187 SYS_GETTID = 178
188 SYS_SYSINFO = 179
189 SYS_MQ_OPEN = 180
190 SYS_MQ_UNLINK = 181
191 SYS_MQ_TIMEDSEND = 182
192 SYS_MQ_TIMEDRECEIVE = 183
193 SYS_MQ_NOTIFY = 184
194 SYS_MQ_GETSETATTR = 185
195 SYS_MSGGET = 186
196 SYS_MSGCTL = 187
197 SYS_MSGRCV = 188
198 SYS_MSGSND = 189
199 SYS_SEMGET = 190
200 SYS_SEMCTL = 191
201 SYS_SEMTIMEDOP = 192
202 SYS_SEMOP = 193
203 SYS_SHMGET = 194
204 SYS_SHMCTL = 195
205 SYS_SHMAT = 196
206 SYS_SHMDT = 197
207 SYS_SOCKET = 198
208 SYS_SOCKETPAIR = 199
209 SYS_BIND = 200
210 SYS_LISTEN = 201
211 SYS_ACCEPT = 202
212 SYS_CONNECT = 203
213 SYS_GETSOCKNAME = 204
214 SYS_GETPEERNAME = 205
215 SYS_SENDTO = 206
216 SYS_RECVFROM = 207
217 SYS_SETSOCKOPT = 208
218 SYS_GETSOCKOPT = 209
219 SYS_SHUTDOWN = 210
220 SYS_SENDMSG = 211
221 SYS_RECVMSG = 212
222 SYS_READAHEAD = 213
223 SYS_BRK = 214
224 SYS_MUNMAP = 215
225 SYS_MREMAP = 216
226 SYS_ADD_KEY = 217
227 SYS_REQUEST_KEY = 218
228 SYS_KEYCTL = 219
229 SYS_CLONE = 220
230 SYS_EXECVE = 221
231 SYS_MMAP = 222
232 SYS_FADVISE64 = 223
233 SYS_SWAPON = 224
234 SYS_SWAPOFF = 225
235 SYS_MPROTECT = 226
236 SYS_MSYNC = 227
237 SYS_MLOCK = 228
238 SYS_MUNLOCK = 229
239 SYS_MLOCKALL = 230
240 SYS_MUNLOCKALL = 231
241 SYS_MINCORE = 232
242 SYS_MADVISE = 233
243 SYS_REMAP_FILE_PAGES = 234
244 SYS_MBIND = 235
245 SYS_GET_MEMPOLICY = 236
246 SYS_SET_MEMPOLICY = 237
247 SYS_MIGRATE_PAGES = 238
248 SYS_MOVE_PAGES = 239
249 SYS_RT_TGSIGQUEUEINFO = 240
250 SYS_PERF_EVENT_OPEN = 241
251 SYS_ACCEPT4 = 242
252 SYS_RECVMMSG = 243
253 SYS_ARCH_SPECIFIC_SYSCALL = 244
254 SYS_WAIT4 = 260
255 SYS_PRLIMIT64 = 261
256 SYS_FANOTIFY_INIT = 262
257 SYS_FANOTIFY_MARK = 263
258 SYS_NAME_TO_HANDLE_AT = 264
259 SYS_OPEN_BY_HANDLE_AT = 265
260 SYS_CLOCK_ADJTIME = 266
261 SYS_SYNCFS = 267
262 SYS_SETNS = 268
263 SYS_SENDMMSG = 269
264 SYS_PROCESS_VM_READV = 270
265 SYS_PROCESS_VM_WRITEV = 271
266 SYS_KCMP = 272
267 SYS_FINIT_MODULE = 273
268 SYS_SCHED_SETATTR = 274
269 SYS_SCHED_GETATTR = 275
270 SYS_RENAMEAT2 = 276
271 SYS_SECCOMP = 277
272 SYS_GETRANDOM = 278
273 SYS_MEMFD_CREATE = 279
274 SYS_BPF = 280
275 SYS_EXECVEAT = 281
276 SYS_USERFAULTFD = 282
277 SYS_MEMBARRIER = 283
278 SYS_MLOCK2 = 284
279 SYS_COPY_FILE_RANGE = 285
280 SYS_PREADV2 = 286
281 SYS_PWRITEV2 = 287
282 SYS_PKEY_MPROTECT = 288
283 SYS_PKEY_ALLOC = 289
284 SYS_PKEY_FREE = 290
285 SYS_STATX = 291
286 SYS_IO_PGETEVENTS = 292
287 SYS_RSEQ = 293
288 SYS_KEXEC_FILE_LOAD = 294
289 SYS_PIDFD_SEND_SIGNAL = 424
290 SYS_IO_URING_SETUP = 425
291 SYS_IO_URING_ENTER = 426
292 SYS_IO_URING_REGISTER = 427
293 SYS_OPEN_TREE = 428
294 SYS_MOVE_MOUNT = 429
295 SYS_FSOPEN = 430
296 SYS_FSCONFIG = 431
297 SYS_FSMOUNT = 432
298 SYS_FSPICK = 433
299 SYS_PIDFD_OPEN = 434
300 SYS_CLONE3 = 435
301 SYS_CLOSE_RANGE = 436
302 SYS_OPENAT2 = 437
303 SYS_PIDFD_GETFD = 438
304 SYS_FACCESSAT2 = 439
305 SYS_PROCESS_MADVISE = 440
306 SYS_EPOLL_PWAIT2 = 441
307 SYS_MOUNT_SETATTR = 442
308 SYS_QUOTACTL_FD = 443
309 SYS_LANDLOCK_CREATE_RULESET = 444
310 SYS_LANDLOCK_ADD_RULE = 445
311 SYS_LANDLOCK_RESTRICT_SELF = 446
312 SYS_MEMFD_SECRET = 447
313 SYS_PROCESS_MRELEASE = 448
308314 )
423423 SYS_PROCESS_MADVISE = 4440
424424 SYS_EPOLL_PWAIT2 = 4441
425425 SYS_MOUNT_SETATTR = 4442
426 SYS_QUOTACTL_FD = 4443
427 SYS_LANDLOCK_CREATE_RULESET = 4444
428 SYS_LANDLOCK_ADD_RULE = 4445
429 SYS_LANDLOCK_RESTRICT_SELF = 4446
430 SYS_PROCESS_MRELEASE = 4448
426431 )
66 package unix
77
88 const (
9 SYS_READ = 5000
10 SYS_WRITE = 5001
11 SYS_OPEN = 5002
12 SYS_CLOSE = 5003
13 SYS_STAT = 5004
14 SYS_FSTAT = 5005
15 SYS_LSTAT = 5006
16 SYS_POLL = 5007
17 SYS_LSEEK = 5008
18 SYS_MMAP = 5009
19 SYS_MPROTECT = 5010
20 SYS_MUNMAP = 5011
21 SYS_BRK = 5012
22 SYS_RT_SIGACTION = 5013
23 SYS_RT_SIGPROCMASK = 5014
24 SYS_IOCTL = 5015
25 SYS_PREAD64 = 5016
26 SYS_PWRITE64 = 5017
27 SYS_READV = 5018
28 SYS_WRITEV = 5019
29 SYS_ACCESS = 5020
30 SYS_PIPE = 5021
31 SYS__NEWSELECT = 5022
32 SYS_SCHED_YIELD = 5023
33 SYS_MREMAP = 5024
34 SYS_MSYNC = 5025
35 SYS_MINCORE = 5026
36 SYS_MADVISE = 5027
37 SYS_SHMGET = 5028
38 SYS_SHMAT = 5029
39 SYS_SHMCTL = 5030
40 SYS_DUP = 5031
41 SYS_DUP2 = 5032
42 SYS_PAUSE = 5033
43 SYS_NANOSLEEP = 5034
44 SYS_GETITIMER = 5035
45 SYS_SETITIMER = 5036
46 SYS_ALARM = 5037
47 SYS_GETPID = 5038
48 SYS_SENDFILE = 5039
49 SYS_SOCKET = 5040
50 SYS_CONNECT = 5041
51 SYS_ACCEPT = 5042
52 SYS_SENDTO = 5043
53 SYS_RECVFROM = 5044
54 SYS_SENDMSG = 5045
55 SYS_RECVMSG = 5046
56 SYS_SHUTDOWN = 5047
57 SYS_BIND = 5048
58 SYS_LISTEN = 5049
59 SYS_GETSOCKNAME = 5050
60 SYS_GETPEERNAME = 5051
61 SYS_SOCKETPAIR = 5052
62 SYS_SETSOCKOPT = 5053
63 SYS_GETSOCKOPT = 5054
64 SYS_CLONE = 5055
65 SYS_FORK = 5056
66 SYS_EXECVE = 5057
67 SYS_EXIT = 5058
68 SYS_WAIT4 = 5059
69 SYS_KILL = 5060
70 SYS_UNAME = 5061
71 SYS_SEMGET = 5062
72 SYS_SEMOP = 5063
73 SYS_SEMCTL = 5064
74 SYS_SHMDT = 5065
75 SYS_MSGGET = 5066
76 SYS_MSGSND = 5067
77 SYS_MSGRCV = 5068
78 SYS_MSGCTL = 5069
79 SYS_FCNTL = 5070
80 SYS_FLOCK = 5071
81 SYS_FSYNC = 5072
82 SYS_FDATASYNC = 5073
83 SYS_TRUNCATE = 5074
84 SYS_FTRUNCATE = 5075
85 SYS_GETDENTS = 5076
86 SYS_GETCWD = 5077
87 SYS_CHDIR = 5078
88 SYS_FCHDIR = 5079
89 SYS_RENAME = 5080
90 SYS_MKDIR = 5081
91 SYS_RMDIR = 5082
92 SYS_CREAT = 5083
93 SYS_LINK = 5084
94 SYS_UNLINK = 5085
95 SYS_SYMLINK = 5086
96 SYS_READLINK = 5087
97 SYS_CHMOD = 5088
98 SYS_FCHMOD = 5089
99 SYS_CHOWN = 5090
100 SYS_FCHOWN = 5091
101 SYS_LCHOWN = 5092
102 SYS_UMASK = 5093
103 SYS_GETTIMEOFDAY = 5094
104 SYS_GETRLIMIT = 5095
105 SYS_GETRUSAGE = 5096
106 SYS_SYSINFO = 5097
107 SYS_TIMES = 5098
108 SYS_PTRACE = 5099
109 SYS_GETUID = 5100
110 SYS_SYSLOG = 5101
111 SYS_GETGID = 5102
112 SYS_SETUID = 5103
113 SYS_SETGID = 5104
114 SYS_GETEUID = 5105
115 SYS_GETEGID = 5106
116 SYS_SETPGID = 5107
117 SYS_GETPPID = 5108
118 SYS_GETPGRP = 5109
119 SYS_SETSID = 5110
120 SYS_SETREUID = 5111
121 SYS_SETREGID = 5112
122 SYS_GETGROUPS = 5113
123 SYS_SETGROUPS = 5114
124 SYS_SETRESUID = 5115
125 SYS_GETRESUID = 5116
126 SYS_SETRESGID = 5117
127 SYS_GETRESGID = 5118
128 SYS_GETPGID = 5119
129 SYS_SETFSUID = 5120
130 SYS_SETFSGID = 5121
131 SYS_GETSID = 5122
132 SYS_CAPGET = 5123
133 SYS_CAPSET = 5124
134 SYS_RT_SIGPENDING = 5125
135 SYS_RT_SIGTIMEDWAIT = 5126
136 SYS_RT_SIGQUEUEINFO = 5127
137 SYS_RT_SIGSUSPEND = 5128
138 SYS_SIGALTSTACK = 5129
139 SYS_UTIME = 5130
140 SYS_MKNOD = 5131
141 SYS_PERSONALITY = 5132
142 SYS_USTAT = 5133
143 SYS_STATFS = 5134
144 SYS_FSTATFS = 5135
145 SYS_SYSFS = 5136
146 SYS_GETPRIORITY = 5137
147 SYS_SETPRIORITY = 5138
148 SYS_SCHED_SETPARAM = 5139
149 SYS_SCHED_GETPARAM = 5140
150 SYS_SCHED_SETSCHEDULER = 5141
151 SYS_SCHED_GETSCHEDULER = 5142
152 SYS_SCHED_GET_PRIORITY_MAX = 5143
153 SYS_SCHED_GET_PRIORITY_MIN = 5144
154 SYS_SCHED_RR_GET_INTERVAL = 5145
155 SYS_MLOCK = 5146
156 SYS_MUNLOCK = 5147
157 SYS_MLOCKALL = 5148
158 SYS_MUNLOCKALL = 5149
159 SYS_VHANGUP = 5150
160 SYS_PIVOT_ROOT = 5151
161 SYS__SYSCTL = 5152
162 SYS_PRCTL = 5153
163 SYS_ADJTIMEX = 5154
164 SYS_SETRLIMIT = 5155
165 SYS_CHROOT = 5156
166 SYS_SYNC = 5157
167 SYS_ACCT = 5158
168 SYS_SETTIMEOFDAY = 5159
169 SYS_MOUNT = 5160
170 SYS_UMOUNT2 = 5161
171 SYS_SWAPON = 5162
172 SYS_SWAPOFF = 5163
173 SYS_REBOOT = 5164
174 SYS_SETHOSTNAME = 5165
175 SYS_SETDOMAINNAME = 5166
176 SYS_CREATE_MODULE = 5167
177 SYS_INIT_MODULE = 5168
178 SYS_DELETE_MODULE = 5169
179 SYS_GET_KERNEL_SYMS = 5170
180 SYS_QUERY_MODULE = 5171
181 SYS_QUOTACTL = 5172
182 SYS_NFSSERVCTL = 5173
183 SYS_GETPMSG = 5174
184 SYS_PUTPMSG = 5175
185 SYS_AFS_SYSCALL = 5176
186 SYS_RESERVED177 = 5177
187 SYS_GETTID = 5178
188 SYS_READAHEAD = 5179
189 SYS_SETXATTR = 5180
190 SYS_LSETXATTR = 5181
191 SYS_FSETXATTR = 5182
192 SYS_GETXATTR = 5183
193 SYS_LGETXATTR = 5184
194 SYS_FGETXATTR = 5185
195 SYS_LISTXATTR = 5186
196 SYS_LLISTXATTR = 5187
197 SYS_FLISTXATTR = 5188
198 SYS_REMOVEXATTR = 5189
199 SYS_LREMOVEXATTR = 5190
200 SYS_FREMOVEXATTR = 5191
201 SYS_TKILL = 5192
202 SYS_RESERVED193 = 5193
203 SYS_FUTEX = 5194
204 SYS_SCHED_SETAFFINITY = 5195
205 SYS_SCHED_GETAFFINITY = 5196
206 SYS_CACHEFLUSH = 5197
207 SYS_CACHECTL = 5198
208 SYS_SYSMIPS = 5199
209 SYS_IO_SETUP = 5200
210 SYS_IO_DESTROY = 5201
211 SYS_IO_GETEVENTS = 5202
212 SYS_IO_SUBMIT = 5203
213 SYS_IO_CANCEL = 5204
214 SYS_EXIT_GROUP = 5205
215 SYS_LOOKUP_DCOOKIE = 5206
216 SYS_EPOLL_CREATE = 5207
217 SYS_EPOLL_CTL = 5208
218 SYS_EPOLL_WAIT = 5209
219 SYS_REMAP_FILE_PAGES = 5210
220 SYS_RT_SIGRETURN = 5211
221 SYS_SET_TID_ADDRESS = 5212
222 SYS_RESTART_SYSCALL = 5213
223 SYS_SEMTIMEDOP = 5214
224 SYS_FADVISE64 = 5215
225 SYS_TIMER_CREATE = 5216
226 SYS_TIMER_SETTIME = 5217
227 SYS_TIMER_GETTIME = 5218
228 SYS_TIMER_GETOVERRUN = 5219
229 SYS_TIMER_DELETE = 5220
230 SYS_CLOCK_SETTIME = 5221
231 SYS_CLOCK_GETTIME = 5222
232 SYS_CLOCK_GETRES = 5223
233 SYS_CLOCK_NANOSLEEP = 5224
234 SYS_TGKILL = 5225
235 SYS_UTIMES = 5226
236 SYS_MBIND = 5227
237 SYS_GET_MEMPOLICY = 5228
238 SYS_SET_MEMPOLICY = 5229
239 SYS_MQ_OPEN = 5230
240 SYS_MQ_UNLINK = 5231
241 SYS_MQ_TIMEDSEND = 5232
242 SYS_MQ_TIMEDRECEIVE = 5233
243 SYS_MQ_NOTIFY = 5234
244 SYS_MQ_GETSETATTR = 5235
245 SYS_VSERVER = 5236
246 SYS_WAITID = 5237
247 SYS_ADD_KEY = 5239
248 SYS_REQUEST_KEY = 5240
249 SYS_KEYCTL = 5241
250 SYS_SET_THREAD_AREA = 5242
251 SYS_INOTIFY_INIT = 5243
252 SYS_INOTIFY_ADD_WATCH = 5244
253 SYS_INOTIFY_RM_WATCH = 5245
254 SYS_MIGRATE_PAGES = 5246
255 SYS_OPENAT = 5247
256 SYS_MKDIRAT = 5248
257 SYS_MKNODAT = 5249
258 SYS_FCHOWNAT = 5250
259 SYS_FUTIMESAT = 5251
260 SYS_NEWFSTATAT = 5252
261 SYS_UNLINKAT = 5253
262 SYS_RENAMEAT = 5254
263 SYS_LINKAT = 5255
264 SYS_SYMLINKAT = 5256
265 SYS_READLINKAT = 5257
266 SYS_FCHMODAT = 5258
267 SYS_FACCESSAT = 5259
268 SYS_PSELECT6 = 5260
269 SYS_PPOLL = 5261
270 SYS_UNSHARE = 5262
271 SYS_SPLICE = 5263
272 SYS_SYNC_FILE_RANGE = 5264
273 SYS_TEE = 5265
274 SYS_VMSPLICE = 5266
275 SYS_MOVE_PAGES = 5267
276 SYS_SET_ROBUST_LIST = 5268
277 SYS_GET_ROBUST_LIST = 5269
278 SYS_KEXEC_LOAD = 5270
279 SYS_GETCPU = 5271
280 SYS_EPOLL_PWAIT = 5272
281 SYS_IOPRIO_SET = 5273
282 SYS_IOPRIO_GET = 5274
283 SYS_UTIMENSAT = 5275
284 SYS_SIGNALFD = 5276
285 SYS_TIMERFD = 5277
286 SYS_EVENTFD = 5278
287 SYS_FALLOCATE = 5279
288 SYS_TIMERFD_CREATE = 5280
289 SYS_TIMERFD_GETTIME = 5281
290 SYS_TIMERFD_SETTIME = 5282
291 SYS_SIGNALFD4 = 5283
292 SYS_EVENTFD2 = 5284
293 SYS_EPOLL_CREATE1 = 5285
294 SYS_DUP3 = 5286
295 SYS_PIPE2 = 5287
296 SYS_INOTIFY_INIT1 = 5288
297 SYS_PREADV = 5289
298 SYS_PWRITEV = 5290
299 SYS_RT_TGSIGQUEUEINFO = 5291
300 SYS_PERF_EVENT_OPEN = 5292
301 SYS_ACCEPT4 = 5293
302 SYS_RECVMMSG = 5294
303 SYS_FANOTIFY_INIT = 5295
304 SYS_FANOTIFY_MARK = 5296
305 SYS_PRLIMIT64 = 5297
306 SYS_NAME_TO_HANDLE_AT = 5298
307 SYS_OPEN_BY_HANDLE_AT = 5299
308 SYS_CLOCK_ADJTIME = 5300
309 SYS_SYNCFS = 5301
310 SYS_SENDMMSG = 5302
311 SYS_SETNS = 5303
312 SYS_PROCESS_VM_READV = 5304
313 SYS_PROCESS_VM_WRITEV = 5305
314 SYS_KCMP = 5306
315 SYS_FINIT_MODULE = 5307
316 SYS_GETDENTS64 = 5308
317 SYS_SCHED_SETATTR = 5309
318 SYS_SCHED_GETATTR = 5310
319 SYS_RENAMEAT2 = 5311
320 SYS_SECCOMP = 5312
321 SYS_GETRANDOM = 5313
322 SYS_MEMFD_CREATE = 5314
323 SYS_BPF = 5315
324 SYS_EXECVEAT = 5316
325 SYS_USERFAULTFD = 5317
326 SYS_MEMBARRIER = 5318
327 SYS_MLOCK2 = 5319
328 SYS_COPY_FILE_RANGE = 5320
329 SYS_PREADV2 = 5321
330 SYS_PWRITEV2 = 5322
331 SYS_PKEY_MPROTECT = 5323
332 SYS_PKEY_ALLOC = 5324
333 SYS_PKEY_FREE = 5325
334 SYS_STATX = 5326
335 SYS_RSEQ = 5327
336 SYS_IO_PGETEVENTS = 5328
337 SYS_PIDFD_SEND_SIGNAL = 5424
338 SYS_IO_URING_SETUP = 5425
339 SYS_IO_URING_ENTER = 5426
340 SYS_IO_URING_REGISTER = 5427
341 SYS_OPEN_TREE = 5428
342 SYS_MOVE_MOUNT = 5429
343 SYS_FSOPEN = 5430
344 SYS_FSCONFIG = 5431
345 SYS_FSMOUNT = 5432
346 SYS_FSPICK = 5433
347 SYS_PIDFD_OPEN = 5434
348 SYS_CLONE3 = 5435
349 SYS_CLOSE_RANGE = 5436
350 SYS_OPENAT2 = 5437
351 SYS_PIDFD_GETFD = 5438
352 SYS_FACCESSAT2 = 5439
353 SYS_PROCESS_MADVISE = 5440
354 SYS_EPOLL_PWAIT2 = 5441
355 SYS_MOUNT_SETATTR = 5442
9 SYS_READ = 5000
10 SYS_WRITE = 5001
11 SYS_OPEN = 5002
12 SYS_CLOSE = 5003
13 SYS_STAT = 5004
14 SYS_FSTAT = 5005
15 SYS_LSTAT = 5006
16 SYS_POLL = 5007
17 SYS_LSEEK = 5008
18 SYS_MMAP = 5009
19 SYS_MPROTECT = 5010
20 SYS_MUNMAP = 5011
21 SYS_BRK = 5012
22 SYS_RT_SIGACTION = 5013
23 SYS_RT_SIGPROCMASK = 5014
24 SYS_IOCTL = 5015
25 SYS_PREAD64 = 5016
26 SYS_PWRITE64 = 5017
27 SYS_READV = 5018
28 SYS_WRITEV = 5019
29 SYS_ACCESS = 5020
30 SYS_PIPE = 5021
31 SYS__NEWSELECT = 5022
32 SYS_SCHED_YIELD = 5023
33 SYS_MREMAP = 5024
34 SYS_MSYNC = 5025
35 SYS_MINCORE = 5026
36 SYS_MADVISE = 5027
37 SYS_SHMGET = 5028
38 SYS_SHMAT = 5029
39 SYS_SHMCTL = 5030
40 SYS_DUP = 5031
41 SYS_DUP2 = 5032
42 SYS_PAUSE = 5033
43 SYS_NANOSLEEP = 5034
44 SYS_GETITIMER = 5035
45 SYS_SETITIMER = 5036
46 SYS_ALARM = 5037
47 SYS_GETPID = 5038
48 SYS_SENDFILE = 5039
49 SYS_SOCKET = 5040
50 SYS_CONNECT = 5041
51 SYS_ACCEPT = 5042
52 SYS_SENDTO = 5043
53 SYS_RECVFROM = 5044
54 SYS_SENDMSG = 5045
55 SYS_RECVMSG = 5046
56 SYS_SHUTDOWN = 5047
57 SYS_BIND = 5048
58 SYS_LISTEN = 5049
59 SYS_GETSOCKNAME = 5050
60 SYS_GETPEERNAME = 5051
61 SYS_SOCKETPAIR = 5052
62 SYS_SETSOCKOPT = 5053
63 SYS_GETSOCKOPT = 5054
64 SYS_CLONE = 5055
65 SYS_FORK = 5056
66 SYS_EXECVE = 5057
67 SYS_EXIT = 5058
68 SYS_WAIT4 = 5059
69 SYS_KILL = 5060
70 SYS_UNAME = 5061
71 SYS_SEMGET = 5062
72 SYS_SEMOP = 5063
73 SYS_SEMCTL = 5064
74 SYS_SHMDT = 5065
75 SYS_MSGGET = 5066
76 SYS_MSGSND = 5067
77 SYS_MSGRCV = 5068
78 SYS_MSGCTL = 5069
79 SYS_FCNTL = 5070
80 SYS_FLOCK = 5071
81 SYS_FSYNC = 5072
82 SYS_FDATASYNC = 5073
83 SYS_TRUNCATE = 5074
84 SYS_FTRUNCATE = 5075
85 SYS_GETDENTS = 5076
86 SYS_GETCWD = 5077
87 SYS_CHDIR = 5078
88 SYS_FCHDIR = 5079
89 SYS_RENAME = 5080
90 SYS_MKDIR = 5081
91 SYS_RMDIR = 5082
92 SYS_CREAT = 5083
93 SYS_LINK = 5084
94 SYS_UNLINK = 5085
95 SYS_SYMLINK = 5086
96 SYS_READLINK = 5087
97 SYS_CHMOD = 5088
98 SYS_FCHMOD = 5089
99 SYS_CHOWN = 5090
100 SYS_FCHOWN = 5091
101 SYS_LCHOWN = 5092
102 SYS_UMASK = 5093
103 SYS_GETTIMEOFDAY = 5094
104 SYS_GETRLIMIT = 5095
105 SYS_GETRUSAGE = 5096
106 SYS_SYSINFO = 5097
107 SYS_TIMES = 5098
108 SYS_PTRACE = 5099
109 SYS_GETUID = 5100
110 SYS_SYSLOG = 5101
111 SYS_GETGID = 5102
112 SYS_SETUID = 5103
113 SYS_SETGID = 5104
114 SYS_GETEUID = 5105
115 SYS_GETEGID = 5106
116 SYS_SETPGID = 5107
117 SYS_GETPPID = 5108
118 SYS_GETPGRP = 5109
119 SYS_SETSID = 5110
120 SYS_SETREUID = 5111
121 SYS_SETREGID = 5112
122 SYS_GETGROUPS = 5113
123 SYS_SETGROUPS = 5114
124 SYS_SETRESUID = 5115
125 SYS_GETRESUID = 5116
126 SYS_SETRESGID = 5117
127 SYS_GETRESGID = 5118
128 SYS_GETPGID = 5119
129 SYS_SETFSUID = 5120
130 SYS_SETFSGID = 5121
131 SYS_GETSID = 5122
132 SYS_CAPGET = 5123
133 SYS_CAPSET = 5124
134 SYS_RT_SIGPENDING = 5125
135 SYS_RT_SIGTIMEDWAIT = 5126
136 SYS_RT_SIGQUEUEINFO = 5127
137 SYS_RT_SIGSUSPEND = 5128
138 SYS_SIGALTSTACK = 5129
139 SYS_UTIME = 5130
140 SYS_MKNOD = 5131
141 SYS_PERSONALITY = 5132
142 SYS_USTAT = 5133
143 SYS_STATFS = 5134
144 SYS_FSTATFS = 5135
145 SYS_SYSFS = 5136
146 SYS_GETPRIORITY = 5137
147 SYS_SETPRIORITY = 5138
148 SYS_SCHED_SETPARAM = 5139
149 SYS_SCHED_GETPARAM = 5140
150 SYS_SCHED_SETSCHEDULER = 5141
151 SYS_SCHED_GETSCHEDULER = 5142
152 SYS_SCHED_GET_PRIORITY_MAX = 5143
153 SYS_SCHED_GET_PRIORITY_MIN = 5144
154 SYS_SCHED_RR_GET_INTERVAL = 5145
155 SYS_MLOCK = 5146
156 SYS_MUNLOCK = 5147
157 SYS_MLOCKALL = 5148
158 SYS_MUNLOCKALL = 5149
159 SYS_VHANGUP = 5150
160 SYS_PIVOT_ROOT = 5151
161 SYS__SYSCTL = 5152
162 SYS_PRCTL = 5153
163 SYS_ADJTIMEX = 5154
164 SYS_SETRLIMIT = 5155
165 SYS_CHROOT = 5156
166 SYS_SYNC = 5157
167 SYS_ACCT = 5158
168 SYS_SETTIMEOFDAY = 5159
169 SYS_MOUNT = 5160
170 SYS_UMOUNT2 = 5161
171 SYS_SWAPON = 5162
172 SYS_SWAPOFF = 5163
173 SYS_REBOOT = 5164
174 SYS_SETHOSTNAME = 5165
175 SYS_SETDOMAINNAME = 5166
176 SYS_CREATE_MODULE = 5167
177 SYS_INIT_MODULE = 5168
178 SYS_DELETE_MODULE = 5169
179 SYS_GET_KERNEL_SYMS = 5170
180 SYS_QUERY_MODULE = 5171
181 SYS_QUOTACTL = 5172
182 SYS_NFSSERVCTL = 5173
183 SYS_GETPMSG = 5174
184 SYS_PUTPMSG = 5175
185 SYS_AFS_SYSCALL = 5176
186 SYS_RESERVED177 = 5177
187 SYS_GETTID = 5178
188 SYS_READAHEAD = 5179
189 SYS_SETXATTR = 5180
190 SYS_LSETXATTR = 5181
191 SYS_FSETXATTR = 5182
192 SYS_GETXATTR = 5183
193 SYS_LGETXATTR = 5184
194 SYS_FGETXATTR = 5185
195 SYS_LISTXATTR = 5186
196 SYS_LLISTXATTR = 5187
197 SYS_FLISTXATTR = 5188
198 SYS_REMOVEXATTR = 5189
199 SYS_LREMOVEXATTR = 5190
200 SYS_FREMOVEXATTR = 5191
201 SYS_TKILL = 5192
202 SYS_RESERVED193 = 5193
203 SYS_FUTEX = 5194
204 SYS_SCHED_SETAFFINITY = 5195
205 SYS_SCHED_GETAFFINITY = 5196
206 SYS_CACHEFLUSH = 5197
207 SYS_CACHECTL = 5198
208 SYS_SYSMIPS = 5199
209 SYS_IO_SETUP = 5200
210 SYS_IO_DESTROY = 5201
211 SYS_IO_GETEVENTS = 5202
212 SYS_IO_SUBMIT = 5203
213 SYS_IO_CANCEL = 5204
214 SYS_EXIT_GROUP = 5205
215 SYS_LOOKUP_DCOOKIE = 5206
216 SYS_EPOLL_CREATE = 5207
217 SYS_EPOLL_CTL = 5208
218 SYS_EPOLL_WAIT = 5209
219 SYS_REMAP_FILE_PAGES = 5210
220 SYS_RT_SIGRETURN = 5211
221 SYS_SET_TID_ADDRESS = 5212
222 SYS_RESTART_SYSCALL = 5213
223 SYS_SEMTIMEDOP = 5214
224 SYS_FADVISE64 = 5215
225 SYS_TIMER_CREATE = 5216
226 SYS_TIMER_SETTIME = 5217
227 SYS_TIMER_GETTIME = 5218
228 SYS_TIMER_GETOVERRUN = 5219
229 SYS_TIMER_DELETE = 5220
230 SYS_CLOCK_SETTIME = 5221
231 SYS_CLOCK_GETTIME = 5222
232 SYS_CLOCK_GETRES = 5223
233 SYS_CLOCK_NANOSLEEP = 5224
234 SYS_TGKILL = 5225
235 SYS_UTIMES = 5226
236 SYS_MBIND = 5227
237 SYS_GET_MEMPOLICY = 5228
238 SYS_SET_MEMPOLICY = 5229
239 SYS_MQ_OPEN = 5230
240 SYS_MQ_UNLINK = 5231
241 SYS_MQ_TIMEDSEND = 5232
242 SYS_MQ_TIMEDRECEIVE = 5233
243 SYS_MQ_NOTIFY = 5234
244 SYS_MQ_GETSETATTR = 5235
245 SYS_VSERVER = 5236
246 SYS_WAITID = 5237
247 SYS_ADD_KEY = 5239
248 SYS_REQUEST_KEY = 5240
249 SYS_KEYCTL = 5241
250 SYS_SET_THREAD_AREA = 5242
251 SYS_INOTIFY_INIT = 5243
252 SYS_INOTIFY_ADD_WATCH = 5244
253 SYS_INOTIFY_RM_WATCH = 5245
254 SYS_MIGRATE_PAGES = 5246
255 SYS_OPENAT = 5247
256 SYS_MKDIRAT = 5248
257 SYS_MKNODAT = 5249
258 SYS_FCHOWNAT = 5250
259 SYS_FUTIMESAT = 5251
260 SYS_NEWFSTATAT = 5252
261 SYS_UNLINKAT = 5253
262 SYS_RENAMEAT = 5254
263 SYS_LINKAT = 5255
264 SYS_SYMLINKAT = 5256
265 SYS_READLINKAT = 5257
266 SYS_FCHMODAT = 5258
267 SYS_FACCESSAT = 5259
268 SYS_PSELECT6 = 5260
269 SYS_PPOLL = 5261
270 SYS_UNSHARE = 5262
271 SYS_SPLICE = 5263
272 SYS_SYNC_FILE_RANGE = 5264
273 SYS_TEE = 5265
274 SYS_VMSPLICE = 5266
275 SYS_MOVE_PAGES = 5267
276 SYS_SET_ROBUST_LIST = 5268
277 SYS_GET_ROBUST_LIST = 5269
278 SYS_KEXEC_LOAD = 5270
279 SYS_GETCPU = 5271
280 SYS_EPOLL_PWAIT = 5272
281 SYS_IOPRIO_SET = 5273
282 SYS_IOPRIO_GET = 5274
283 SYS_UTIMENSAT = 5275
284 SYS_SIGNALFD = 5276
285 SYS_TIMERFD = 5277
286 SYS_EVENTFD = 5278
287 SYS_FALLOCATE = 5279
288 SYS_TIMERFD_CREATE = 5280
289 SYS_TIMERFD_GETTIME = 5281
290 SYS_TIMERFD_SETTIME = 5282
291 SYS_SIGNALFD4 = 5283
292 SYS_EVENTFD2 = 5284
293 SYS_EPOLL_CREATE1 = 5285
294 SYS_DUP3 = 5286
295 SYS_PIPE2 = 5287
296 SYS_INOTIFY_INIT1 = 5288
297 SYS_PREADV = 5289
298 SYS_PWRITEV = 5290
299 SYS_RT_TGSIGQUEUEINFO = 5291
300 SYS_PERF_EVENT_OPEN = 5292
301 SYS_ACCEPT4 = 5293
302 SYS_RECVMMSG = 5294
303 SYS_FANOTIFY_INIT = 5295
304 SYS_FANOTIFY_MARK = 5296
305 SYS_PRLIMIT64 = 5297
306 SYS_NAME_TO_HANDLE_AT = 5298
307 SYS_OPEN_BY_HANDLE_AT = 5299
308 SYS_CLOCK_ADJTIME = 5300
309 SYS_SYNCFS = 5301
310 SYS_SENDMMSG = 5302
311 SYS_SETNS = 5303
312 SYS_PROCESS_VM_READV = 5304
313 SYS_PROCESS_VM_WRITEV = 5305
314 SYS_KCMP = 5306
315 SYS_FINIT_MODULE = 5307
316 SYS_GETDENTS64 = 5308
317 SYS_SCHED_SETATTR = 5309
318 SYS_SCHED_GETATTR = 5310
319 SYS_RENAMEAT2 = 5311
320 SYS_SECCOMP = 5312
321 SYS_GETRANDOM = 5313
322 SYS_MEMFD_CREATE = 5314
323 SYS_BPF = 5315
324 SYS_EXECVEAT = 5316
325 SYS_USERFAULTFD = 5317
326 SYS_MEMBARRIER = 5318
327 SYS_MLOCK2 = 5319
328 SYS_COPY_FILE_RANGE = 5320
329 SYS_PREADV2 = 5321
330 SYS_PWRITEV2 = 5322
331 SYS_PKEY_MPROTECT = 5323
332 SYS_PKEY_ALLOC = 5324
333 SYS_PKEY_FREE = 5325
334 SYS_STATX = 5326
335 SYS_RSEQ = 5327
336 SYS_IO_PGETEVENTS = 5328
337 SYS_PIDFD_SEND_SIGNAL = 5424
338 SYS_IO_URING_SETUP = 5425
339 SYS_IO_URING_ENTER = 5426
340 SYS_IO_URING_REGISTER = 5427
341 SYS_OPEN_TREE = 5428
342 SYS_MOVE_MOUNT = 5429
343 SYS_FSOPEN = 5430
344 SYS_FSCONFIG = 5431
345 SYS_FSMOUNT = 5432
346 SYS_FSPICK = 5433
347 SYS_PIDFD_OPEN = 5434
348 SYS_CLONE3 = 5435
349 SYS_CLOSE_RANGE = 5436
350 SYS_OPENAT2 = 5437
351 SYS_PIDFD_GETFD = 5438
352 SYS_FACCESSAT2 = 5439
353 SYS_PROCESS_MADVISE = 5440
354 SYS_EPOLL_PWAIT2 = 5441
355 SYS_MOUNT_SETATTR = 5442
356 SYS_QUOTACTL_FD = 5443
357 SYS_LANDLOCK_CREATE_RULESET = 5444
358 SYS_LANDLOCK_ADD_RULE = 5445
359 SYS_LANDLOCK_RESTRICT_SELF = 5446
360 SYS_PROCESS_MRELEASE = 5448
356361 )
66 package unix
77
88 const (
9 SYS_READ = 5000
10 SYS_WRITE = 5001
11 SYS_OPEN = 5002
12 SYS_CLOSE = 5003
13 SYS_STAT = 5004
14 SYS_FSTAT = 5005
15 SYS_LSTAT = 5006
16 SYS_POLL = 5007
17 SYS_LSEEK = 5008
18 SYS_MMAP = 5009
19 SYS_MPROTECT = 5010
20 SYS_MUNMAP = 5011
21 SYS_BRK = 5012
22 SYS_RT_SIGACTION = 5013
23 SYS_RT_SIGPROCMASK = 5014
24 SYS_IOCTL = 5015
25 SYS_PREAD64 = 5016
26 SYS_PWRITE64 = 5017
27 SYS_READV = 5018
28 SYS_WRITEV = 5019
29 SYS_ACCESS = 5020
30 SYS_PIPE = 5021
31 SYS__NEWSELECT = 5022
32 SYS_SCHED_YIELD = 5023
33 SYS_MREMAP = 5024
34 SYS_MSYNC = 5025
35 SYS_MINCORE = 5026
36 SYS_MADVISE = 5027
37 SYS_SHMGET = 5028
38 SYS_SHMAT = 5029
39 SYS_SHMCTL = 5030
40 SYS_DUP = 5031
41 SYS_DUP2 = 5032
42 SYS_PAUSE = 5033
43 SYS_NANOSLEEP = 5034
44 SYS_GETITIMER = 5035
45 SYS_SETITIMER = 5036
46 SYS_ALARM = 5037
47 SYS_GETPID = 5038
48 SYS_SENDFILE = 5039
49 SYS_SOCKET = 5040
50 SYS_CONNECT = 5041
51 SYS_ACCEPT = 5042
52 SYS_SENDTO = 5043
53 SYS_RECVFROM = 5044
54 SYS_SENDMSG = 5045
55 SYS_RECVMSG = 5046
56 SYS_SHUTDOWN = 5047
57 SYS_BIND = 5048
58 SYS_LISTEN = 5049
59 SYS_GETSOCKNAME = 5050
60 SYS_GETPEERNAME = 5051
61 SYS_SOCKETPAIR = 5052
62 SYS_SETSOCKOPT = 5053
63 SYS_GETSOCKOPT = 5054
64 SYS_CLONE = 5055
65 SYS_FORK = 5056
66 SYS_EXECVE = 5057
67 SYS_EXIT = 5058
68 SYS_WAIT4 = 5059
69 SYS_KILL = 5060
70 SYS_UNAME = 5061
71 SYS_SEMGET = 5062
72 SYS_SEMOP = 5063
73 SYS_SEMCTL = 5064
74 SYS_SHMDT = 5065
75 SYS_MSGGET = 5066
76 SYS_MSGSND = 5067
77 SYS_MSGRCV = 5068
78 SYS_MSGCTL = 5069
79 SYS_FCNTL = 5070
80 SYS_FLOCK = 5071
81 SYS_FSYNC = 5072
82 SYS_FDATASYNC = 5073
83 SYS_TRUNCATE = 5074
84 SYS_FTRUNCATE = 5075
85 SYS_GETDENTS = 5076
86 SYS_GETCWD = 5077
87 SYS_CHDIR = 5078
88 SYS_FCHDIR = 5079
89 SYS_RENAME = 5080
90 SYS_MKDIR = 5081
91 SYS_RMDIR = 5082
92 SYS_CREAT = 5083
93 SYS_LINK = 5084
94 SYS_UNLINK = 5085
95 SYS_SYMLINK = 5086
96 SYS_READLINK = 5087
97 SYS_CHMOD = 5088
98 SYS_FCHMOD = 5089
99 SYS_CHOWN = 5090
100 SYS_FCHOWN = 5091
101 SYS_LCHOWN = 5092
102 SYS_UMASK = 5093
103 SYS_GETTIMEOFDAY = 5094
104 SYS_GETRLIMIT = 5095
105 SYS_GETRUSAGE = 5096
106 SYS_SYSINFO = 5097
107 SYS_TIMES = 5098
108 SYS_PTRACE = 5099
109 SYS_GETUID = 5100
110 SYS_SYSLOG = 5101
111 SYS_GETGID = 5102
112 SYS_SETUID = 5103
113 SYS_SETGID = 5104
114 SYS_GETEUID = 5105
115 SYS_GETEGID = 5106
116 SYS_SETPGID = 5107
117 SYS_GETPPID = 5108
118 SYS_GETPGRP = 5109
119 SYS_SETSID = 5110
120 SYS_SETREUID = 5111
121 SYS_SETREGID = 5112
122 SYS_GETGROUPS = 5113
123 SYS_SETGROUPS = 5114
124 SYS_SETRESUID = 5115
125 SYS_GETRESUID = 5116
126 SYS_SETRESGID = 5117
127 SYS_GETRESGID = 5118
128 SYS_GETPGID = 5119
129 SYS_SETFSUID = 5120
130 SYS_SETFSGID = 5121
131 SYS_GETSID = 5122
132 SYS_CAPGET = 5123
133 SYS_CAPSET = 5124
134 SYS_RT_SIGPENDING = 5125
135 SYS_RT_SIGTIMEDWAIT = 5126
136 SYS_RT_SIGQUEUEINFO = 5127
137 SYS_RT_SIGSUSPEND = 5128
138 SYS_SIGALTSTACK = 5129
139 SYS_UTIME = 5130
140 SYS_MKNOD = 5131
141 SYS_PERSONALITY = 5132
142 SYS_USTAT = 5133
143 SYS_STATFS = 5134
144 SYS_FSTATFS = 5135
145 SYS_SYSFS = 5136
146 SYS_GETPRIORITY = 5137
147 SYS_SETPRIORITY = 5138
148 SYS_SCHED_SETPARAM = 5139
149 SYS_SCHED_GETPARAM = 5140
150 SYS_SCHED_SETSCHEDULER = 5141
151 SYS_SCHED_GETSCHEDULER = 5142
152 SYS_SCHED_GET_PRIORITY_MAX = 5143
153 SYS_SCHED_GET_PRIORITY_MIN = 5144
154 SYS_SCHED_RR_GET_INTERVAL = 5145
155 SYS_MLOCK = 5146
156 SYS_MUNLOCK = 5147
157 SYS_MLOCKALL = 5148
158 SYS_MUNLOCKALL = 5149
159 SYS_VHANGUP = 5150
160 SYS_PIVOT_ROOT = 5151
161 SYS__SYSCTL = 5152
162 SYS_PRCTL = 5153
163 SYS_ADJTIMEX = 5154
164 SYS_SETRLIMIT = 5155
165 SYS_CHROOT = 5156
166 SYS_SYNC = 5157
167 SYS_ACCT = 5158
168 SYS_SETTIMEOFDAY = 5159
169 SYS_MOUNT = 5160
170 SYS_UMOUNT2 = 5161
171 SYS_SWAPON = 5162
172 SYS_SWAPOFF = 5163
173 SYS_REBOOT = 5164
174 SYS_SETHOSTNAME = 5165
175 SYS_SETDOMAINNAME = 5166
176 SYS_CREATE_MODULE = 5167
177 SYS_INIT_MODULE = 5168
178 SYS_DELETE_MODULE = 5169
179 SYS_GET_KERNEL_SYMS = 5170
180 SYS_QUERY_MODULE = 5171
181 SYS_QUOTACTL = 5172
182 SYS_NFSSERVCTL = 5173
183 SYS_GETPMSG = 5174
184 SYS_PUTPMSG = 5175
185 SYS_AFS_SYSCALL = 5176
186 SYS_RESERVED177 = 5177
187 SYS_GETTID = 5178
188 SYS_READAHEAD = 5179
189 SYS_SETXATTR = 5180
190 SYS_LSETXATTR = 5181
191 SYS_FSETXATTR = 5182
192 SYS_GETXATTR = 5183
193 SYS_LGETXATTR = 5184
194 SYS_FGETXATTR = 5185
195 SYS_LISTXATTR = 5186
196 SYS_LLISTXATTR = 5187
197 SYS_FLISTXATTR = 5188
198 SYS_REMOVEXATTR = 5189
199 SYS_LREMOVEXATTR = 5190
200 SYS_FREMOVEXATTR = 5191
201 SYS_TKILL = 5192
202 SYS_RESERVED193 = 5193
203 SYS_FUTEX = 5194
204 SYS_SCHED_SETAFFINITY = 5195
205 SYS_SCHED_GETAFFINITY = 5196
206 SYS_CACHEFLUSH = 5197
207 SYS_CACHECTL = 5198
208 SYS_SYSMIPS = 5199
209 SYS_IO_SETUP = 5200
210 SYS_IO_DESTROY = 5201
211 SYS_IO_GETEVENTS = 5202
212 SYS_IO_SUBMIT = 5203
213 SYS_IO_CANCEL = 5204
214 SYS_EXIT_GROUP = 5205
215 SYS_LOOKUP_DCOOKIE = 5206
216 SYS_EPOLL_CREATE = 5207
217 SYS_EPOLL_CTL = 5208
218 SYS_EPOLL_WAIT = 5209
219 SYS_REMAP_FILE_PAGES = 5210
220 SYS_RT_SIGRETURN = 5211
221 SYS_SET_TID_ADDRESS = 5212
222 SYS_RESTART_SYSCALL = 5213
223 SYS_SEMTIMEDOP = 5214
224 SYS_FADVISE64 = 5215
225 SYS_TIMER_CREATE = 5216
226 SYS_TIMER_SETTIME = 5217
227 SYS_TIMER_GETTIME = 5218
228 SYS_TIMER_GETOVERRUN = 5219
229 SYS_TIMER_DELETE = 5220
230 SYS_CLOCK_SETTIME = 5221
231 SYS_CLOCK_GETTIME = 5222
232 SYS_CLOCK_GETRES = 5223
233 SYS_CLOCK_NANOSLEEP = 5224
234 SYS_TGKILL = 5225
235 SYS_UTIMES = 5226
236 SYS_MBIND = 5227
237 SYS_GET_MEMPOLICY = 5228
238 SYS_SET_MEMPOLICY = 5229
239 SYS_MQ_OPEN = 5230
240 SYS_MQ_UNLINK = 5231
241 SYS_MQ_TIMEDSEND = 5232
242 SYS_MQ_TIMEDRECEIVE = 5233
243 SYS_MQ_NOTIFY = 5234
244 SYS_MQ_GETSETATTR = 5235
245 SYS_VSERVER = 5236
246 SYS_WAITID = 5237
247 SYS_ADD_KEY = 5239
248 SYS_REQUEST_KEY = 5240
249 SYS_KEYCTL = 5241
250 SYS_SET_THREAD_AREA = 5242
251 SYS_INOTIFY_INIT = 5243
252 SYS_INOTIFY_ADD_WATCH = 5244
253 SYS_INOTIFY_RM_WATCH = 5245
254 SYS_MIGRATE_PAGES = 5246
255 SYS_OPENAT = 5247
256 SYS_MKDIRAT = 5248
257 SYS_MKNODAT = 5249
258 SYS_FCHOWNAT = 5250
259 SYS_FUTIMESAT = 5251
260 SYS_NEWFSTATAT = 5252
261 SYS_UNLINKAT = 5253
262 SYS_RENAMEAT = 5254
263 SYS_LINKAT = 5255
264 SYS_SYMLINKAT = 5256
265 SYS_READLINKAT = 5257
266 SYS_FCHMODAT = 5258
267 SYS_FACCESSAT = 5259
268 SYS_PSELECT6 = 5260
269 SYS_PPOLL = 5261
270 SYS_UNSHARE = 5262
271 SYS_SPLICE = 5263
272 SYS_SYNC_FILE_RANGE = 5264
273 SYS_TEE = 5265
274 SYS_VMSPLICE = 5266
275 SYS_MOVE_PAGES = 5267
276 SYS_SET_ROBUST_LIST = 5268
277 SYS_GET_ROBUST_LIST = 5269
278 SYS_KEXEC_LOAD = 5270
279 SYS_GETCPU = 5271
280 SYS_EPOLL_PWAIT = 5272
281 SYS_IOPRIO_SET = 5273
282 SYS_IOPRIO_GET = 5274
283 SYS_UTIMENSAT = 5275
284 SYS_SIGNALFD = 5276
285 SYS_TIMERFD = 5277
286 SYS_EVENTFD = 5278
287 SYS_FALLOCATE = 5279
288 SYS_TIMERFD_CREATE = 5280
289 SYS_TIMERFD_GETTIME = 5281
290 SYS_TIMERFD_SETTIME = 5282
291 SYS_SIGNALFD4 = 5283
292 SYS_EVENTFD2 = 5284
293 SYS_EPOLL_CREATE1 = 5285
294 SYS_DUP3 = 5286
295 SYS_PIPE2 = 5287
296 SYS_INOTIFY_INIT1 = 5288
297 SYS_PREADV = 5289
298 SYS_PWRITEV = 5290
299 SYS_RT_TGSIGQUEUEINFO = 5291
300 SYS_PERF_EVENT_OPEN = 5292
301 SYS_ACCEPT4 = 5293
302 SYS_RECVMMSG = 5294
303 SYS_FANOTIFY_INIT = 5295
304 SYS_FANOTIFY_MARK = 5296
305 SYS_PRLIMIT64 = 5297
306 SYS_NAME_TO_HANDLE_AT = 5298
307 SYS_OPEN_BY_HANDLE_AT = 5299
308 SYS_CLOCK_ADJTIME = 5300
309 SYS_SYNCFS = 5301
310 SYS_SENDMMSG = 5302
311 SYS_SETNS = 5303
312 SYS_PROCESS_VM_READV = 5304
313 SYS_PROCESS_VM_WRITEV = 5305
314 SYS_KCMP = 5306
315 SYS_FINIT_MODULE = 5307
316 SYS_GETDENTS64 = 5308
317 SYS_SCHED_SETATTR = 5309
318 SYS_SCHED_GETATTR = 5310
319 SYS_RENAMEAT2 = 5311
320 SYS_SECCOMP = 5312
321 SYS_GETRANDOM = 5313
322 SYS_MEMFD_CREATE = 5314
323 SYS_BPF = 5315
324 SYS_EXECVEAT = 5316
325 SYS_USERFAULTFD = 5317
326 SYS_MEMBARRIER = 5318
327 SYS_MLOCK2 = 5319
328 SYS_COPY_FILE_RANGE = 5320
329 SYS_PREADV2 = 5321
330 SYS_PWRITEV2 = 5322
331 SYS_PKEY_MPROTECT = 5323
332 SYS_PKEY_ALLOC = 5324
333 SYS_PKEY_FREE = 5325
334 SYS_STATX = 5326
335 SYS_RSEQ = 5327
336 SYS_IO_PGETEVENTS = 5328
337 SYS_PIDFD_SEND_SIGNAL = 5424
338 SYS_IO_URING_SETUP = 5425
339 SYS_IO_URING_ENTER = 5426
340 SYS_IO_URING_REGISTER = 5427
341 SYS_OPEN_TREE = 5428
342 SYS_MOVE_MOUNT = 5429
343 SYS_FSOPEN = 5430
344 SYS_FSCONFIG = 5431
345 SYS_FSMOUNT = 5432
346 SYS_FSPICK = 5433
347 SYS_PIDFD_OPEN = 5434
348 SYS_CLONE3 = 5435
349 SYS_CLOSE_RANGE = 5436
350 SYS_OPENAT2 = 5437
351 SYS_PIDFD_GETFD = 5438
352 SYS_FACCESSAT2 = 5439
353 SYS_PROCESS_MADVISE = 5440
354 SYS_EPOLL_PWAIT2 = 5441
355 SYS_MOUNT_SETATTR = 5442
9 SYS_READ = 5000
10 SYS_WRITE = 5001
11 SYS_OPEN = 5002
12 SYS_CLOSE = 5003
13 SYS_STAT = 5004
14 SYS_FSTAT = 5005
15 SYS_LSTAT = 5006
16 SYS_POLL = 5007
17 SYS_LSEEK = 5008
18 SYS_MMAP = 5009
19 SYS_MPROTECT = 5010
20 SYS_MUNMAP = 5011
21 SYS_BRK = 5012
22 SYS_RT_SIGACTION = 5013
23 SYS_RT_SIGPROCMASK = 5014
24 SYS_IOCTL = 5015
25 SYS_PREAD64 = 5016
26 SYS_PWRITE64 = 5017
27 SYS_READV = 5018
28 SYS_WRITEV = 5019
29 SYS_ACCESS = 5020
30 SYS_PIPE = 5021
31 SYS__NEWSELECT = 5022
32 SYS_SCHED_YIELD = 5023
33 SYS_MREMAP = 5024
34 SYS_MSYNC = 5025
35 SYS_MINCORE = 5026
36 SYS_MADVISE = 5027
37 SYS_SHMGET = 5028
38 SYS_SHMAT = 5029
39 SYS_SHMCTL = 5030
40 SYS_DUP = 5031
41 SYS_DUP2 = 5032
42 SYS_PAUSE = 5033
43 SYS_NANOSLEEP = 5034
44 SYS_GETITIMER = 5035
45 SYS_SETITIMER = 5036
46 SYS_ALARM = 5037
47 SYS_GETPID = 5038
48 SYS_SENDFILE = 5039
49 SYS_SOCKET = 5040
50 SYS_CONNECT = 5041
51 SYS_ACCEPT = 5042
52 SYS_SENDTO = 5043
53 SYS_RECVFROM = 5044
54 SYS_SENDMSG = 5045
55 SYS_RECVMSG = 5046
56 SYS_SHUTDOWN = 5047
57 SYS_BIND = 5048
58 SYS_LISTEN = 5049
59 SYS_GETSOCKNAME = 5050
60 SYS_GETPEERNAME = 5051
61 SYS_SOCKETPAIR = 5052
62 SYS_SETSOCKOPT = 5053
63 SYS_GETSOCKOPT = 5054
64 SYS_CLONE = 5055
65 SYS_FORK = 5056
66 SYS_EXECVE = 5057
67 SYS_EXIT = 5058
68 SYS_WAIT4 = 5059
69 SYS_KILL = 5060
70 SYS_UNAME = 5061
71 SYS_SEMGET = 5062
72 SYS_SEMOP = 5063
73 SYS_SEMCTL = 5064
74 SYS_SHMDT = 5065
75 SYS_MSGGET = 5066
76 SYS_MSGSND = 5067
77 SYS_MSGRCV = 5068
78 SYS_MSGCTL = 5069
79 SYS_FCNTL = 5070
80 SYS_FLOCK = 5071
81 SYS_FSYNC = 5072
82 SYS_FDATASYNC = 5073
83 SYS_TRUNCATE = 5074
84 SYS_FTRUNCATE = 5075
85 SYS_GETDENTS = 5076
86 SYS_GETCWD = 5077
87 SYS_CHDIR = 5078
88 SYS_FCHDIR = 5079
89 SYS_RENAME = 5080
90 SYS_MKDIR = 5081
91 SYS_RMDIR = 5082
92 SYS_CREAT = 5083
93 SYS_LINK = 5084
94 SYS_UNLINK = 5085
95 SYS_SYMLINK = 5086
96 SYS_READLINK = 5087
97 SYS_CHMOD = 5088
98 SYS_FCHMOD = 5089
99 SYS_CHOWN = 5090
100 SYS_FCHOWN = 5091
101 SYS_LCHOWN = 5092
102 SYS_UMASK = 5093
103 SYS_GETTIMEOFDAY = 5094
104 SYS_GETRLIMIT = 5095
105 SYS_GETRUSAGE = 5096
106 SYS_SYSINFO = 5097
107 SYS_TIMES = 5098
108 SYS_PTRACE = 5099
109 SYS_GETUID = 5100
110 SYS_SYSLOG = 5101
111 SYS_GETGID = 5102
112 SYS_SETUID = 5103
113 SYS_SETGID = 5104
114 SYS_GETEUID = 5105
115 SYS_GETEGID = 5106
116 SYS_SETPGID = 5107
117 SYS_GETPPID = 5108
118 SYS_GETPGRP = 5109
119 SYS_SETSID = 5110
120 SYS_SETREUID = 5111
121 SYS_SETREGID = 5112
122 SYS_GETGROUPS = 5113
123 SYS_SETGROUPS = 5114
124 SYS_SETRESUID = 5115
125 SYS_GETRESUID = 5116
126 SYS_SETRESGID = 5117
127 SYS_GETRESGID = 5118
128 SYS_GETPGID = 5119
129 SYS_SETFSUID = 5120
130 SYS_SETFSGID = 5121
131 SYS_GETSID = 5122
132 SYS_CAPGET = 5123
133 SYS_CAPSET = 5124
134 SYS_RT_SIGPENDING = 5125
135 SYS_RT_SIGTIMEDWAIT = 5126
136 SYS_RT_SIGQUEUEINFO = 5127
137 SYS_RT_SIGSUSPEND = 5128
138 SYS_SIGALTSTACK = 5129
139 SYS_UTIME = 5130
140 SYS_MKNOD = 5131
141 SYS_PERSONALITY = 5132
142 SYS_USTAT = 5133
143 SYS_STATFS = 5134
144 SYS_FSTATFS = 5135
145 SYS_SYSFS = 5136
146 SYS_GETPRIORITY = 5137
147 SYS_SETPRIORITY = 5138
148 SYS_SCHED_SETPARAM = 5139
149 SYS_SCHED_GETPARAM = 5140
150 SYS_SCHED_SETSCHEDULER = 5141
151 SYS_SCHED_GETSCHEDULER = 5142
152 SYS_SCHED_GET_PRIORITY_MAX = 5143
153 SYS_SCHED_GET_PRIORITY_MIN = 5144
154 SYS_SCHED_RR_GET_INTERVAL = 5145
155 SYS_MLOCK = 5146
156 SYS_MUNLOCK = 5147
157 SYS_MLOCKALL = 5148
158 SYS_MUNLOCKALL = 5149
159 SYS_VHANGUP = 5150
160 SYS_PIVOT_ROOT = 5151
161 SYS__SYSCTL = 5152
162 SYS_PRCTL = 5153
163 SYS_ADJTIMEX = 5154
164 SYS_SETRLIMIT = 5155
165 SYS_CHROOT = 5156
166 SYS_SYNC = 5157
167 SYS_ACCT = 5158
168 SYS_SETTIMEOFDAY = 5159
169 SYS_MOUNT = 5160
170 SYS_UMOUNT2 = 5161
171 SYS_SWAPON = 5162
172 SYS_SWAPOFF = 5163
173 SYS_REBOOT = 5164
174 SYS_SETHOSTNAME = 5165
175 SYS_SETDOMAINNAME = 5166
176 SYS_CREATE_MODULE = 5167
177 SYS_INIT_MODULE = 5168
178 SYS_DELETE_MODULE = 5169
179 SYS_GET_KERNEL_SYMS = 5170
180 SYS_QUERY_MODULE = 5171
181 SYS_QUOTACTL = 5172
182 SYS_NFSSERVCTL = 5173
183 SYS_GETPMSG = 5174
184 SYS_PUTPMSG = 5175
185 SYS_AFS_SYSCALL = 5176
186 SYS_RESERVED177 = 5177
187 SYS_GETTID = 5178
188 SYS_READAHEAD = 5179
189 SYS_SETXATTR = 5180
190 SYS_LSETXATTR = 5181
191 SYS_FSETXATTR = 5182
192 SYS_GETXATTR = 5183
193 SYS_LGETXATTR = 5184
194 SYS_FGETXATTR = 5185
195 SYS_LISTXATTR = 5186
196 SYS_LLISTXATTR = 5187
197 SYS_FLISTXATTR = 5188
198 SYS_REMOVEXATTR = 5189
199 SYS_LREMOVEXATTR = 5190
200 SYS_FREMOVEXATTR = 5191
201 SYS_TKILL = 5192
202 SYS_RESERVED193 = 5193
203 SYS_FUTEX = 5194
204 SYS_SCHED_SETAFFINITY = 5195
205 SYS_SCHED_GETAFFINITY = 5196
206 SYS_CACHEFLUSH = 5197
207 SYS_CACHECTL = 5198
208 SYS_SYSMIPS = 5199
209 SYS_IO_SETUP = 5200
210 SYS_IO_DESTROY = 5201
211 SYS_IO_GETEVENTS = 5202
212 SYS_IO_SUBMIT = 5203
213 SYS_IO_CANCEL = 5204
214 SYS_EXIT_GROUP = 5205
215 SYS_LOOKUP_DCOOKIE = 5206
216 SYS_EPOLL_CREATE = 5207
217 SYS_EPOLL_CTL = 5208
218 SYS_EPOLL_WAIT = 5209
219 SYS_REMAP_FILE_PAGES = 5210
220 SYS_RT_SIGRETURN = 5211
221 SYS_SET_TID_ADDRESS = 5212
222 SYS_RESTART_SYSCALL = 5213
223 SYS_SEMTIMEDOP = 5214
224 SYS_FADVISE64 = 5215
225 SYS_TIMER_CREATE = 5216
226 SYS_TIMER_SETTIME = 5217
227 SYS_TIMER_GETTIME = 5218
228 SYS_TIMER_GETOVERRUN = 5219
229 SYS_TIMER_DELETE = 5220
230 SYS_CLOCK_SETTIME = 5221
231 SYS_CLOCK_GETTIME = 5222
232 SYS_CLOCK_GETRES = 5223
233 SYS_CLOCK_NANOSLEEP = 5224
234 SYS_TGKILL = 5225
235 SYS_UTIMES = 5226
236 SYS_MBIND = 5227
237 SYS_GET_MEMPOLICY = 5228
238 SYS_SET_MEMPOLICY = 5229
239 SYS_MQ_OPEN = 5230
240 SYS_MQ_UNLINK = 5231
241 SYS_MQ_TIMEDSEND = 5232
242 SYS_MQ_TIMEDRECEIVE = 5233
243 SYS_MQ_NOTIFY = 5234
244 SYS_MQ_GETSETATTR = 5235
245 SYS_VSERVER = 5236
246 SYS_WAITID = 5237
247 SYS_ADD_KEY = 5239
248 SYS_REQUEST_KEY = 5240
249 SYS_KEYCTL = 5241
250 SYS_SET_THREAD_AREA = 5242
251 SYS_INOTIFY_INIT = 5243
252 SYS_INOTIFY_ADD_WATCH = 5244
253 SYS_INOTIFY_RM_WATCH = 5245
254 SYS_MIGRATE_PAGES = 5246
255 SYS_OPENAT = 5247
256 SYS_MKDIRAT = 5248
257 SYS_MKNODAT = 5249
258 SYS_FCHOWNAT = 5250
259 SYS_FUTIMESAT = 5251
260 SYS_NEWFSTATAT = 5252
261 SYS_UNLINKAT = 5253
262 SYS_RENAMEAT = 5254
263 SYS_LINKAT = 5255
264 SYS_SYMLINKAT = 5256
265 SYS_READLINKAT = 5257
266 SYS_FCHMODAT = 5258
267 SYS_FACCESSAT = 5259
268 SYS_PSELECT6 = 5260
269 SYS_PPOLL = 5261
270 SYS_UNSHARE = 5262
271 SYS_SPLICE = 5263
272 SYS_SYNC_FILE_RANGE = 5264
273 SYS_TEE = 5265
274 SYS_VMSPLICE = 5266
275 SYS_MOVE_PAGES = 5267
276 SYS_SET_ROBUST_LIST = 5268
277 SYS_GET_ROBUST_LIST = 5269
278 SYS_KEXEC_LOAD = 5270
279 SYS_GETCPU = 5271
280 SYS_EPOLL_PWAIT = 5272
281 SYS_IOPRIO_SET = 5273
282 SYS_IOPRIO_GET = 5274
283 SYS_UTIMENSAT = 5275
284 SYS_SIGNALFD = 5276
285 SYS_TIMERFD = 5277
286 SYS_EVENTFD = 5278
287 SYS_FALLOCATE = 5279
288 SYS_TIMERFD_CREATE = 5280
289 SYS_TIMERFD_GETTIME = 5281
290 SYS_TIMERFD_SETTIME = 5282
291 SYS_SIGNALFD4 = 5283
292 SYS_EVENTFD2 = 5284
293 SYS_EPOLL_CREATE1 = 5285
294 SYS_DUP3 = 5286
295 SYS_PIPE2 = 5287
296 SYS_INOTIFY_INIT1 = 5288
297 SYS_PREADV = 5289
298 SYS_PWRITEV = 5290
299 SYS_RT_TGSIGQUEUEINFO = 5291
300 SYS_PERF_EVENT_OPEN = 5292
301 SYS_ACCEPT4 = 5293
302 SYS_RECVMMSG = 5294
303 SYS_FANOTIFY_INIT = 5295
304 SYS_FANOTIFY_MARK = 5296
305 SYS_PRLIMIT64 = 5297
306 SYS_NAME_TO_HANDLE_AT = 5298
307 SYS_OPEN_BY_HANDLE_AT = 5299
308 SYS_CLOCK_ADJTIME = 5300
309 SYS_SYNCFS = 5301
310 SYS_SENDMMSG = 5302
311 SYS_SETNS = 5303
312 SYS_PROCESS_VM_READV = 5304
313 SYS_PROCESS_VM_WRITEV = 5305
314 SYS_KCMP = 5306
315 SYS_FINIT_MODULE = 5307
316 SYS_GETDENTS64 = 5308
317 SYS_SCHED_SETATTR = 5309
318 SYS_SCHED_GETATTR = 5310
319 SYS_RENAMEAT2 = 5311
320 SYS_SECCOMP = 5312
321 SYS_GETRANDOM = 5313
322 SYS_MEMFD_CREATE = 5314
323 SYS_BPF = 5315
324 SYS_EXECVEAT = 5316
325 SYS_USERFAULTFD = 5317
326 SYS_MEMBARRIER = 5318
327 SYS_MLOCK2 = 5319
328 SYS_COPY_FILE_RANGE = 5320
329 SYS_PREADV2 = 5321
330 SYS_PWRITEV2 = 5322
331 SYS_PKEY_MPROTECT = 5323
332 SYS_PKEY_ALLOC = 5324
333 SYS_PKEY_FREE = 5325
334 SYS_STATX = 5326
335 SYS_RSEQ = 5327
336 SYS_IO_PGETEVENTS = 5328
337 SYS_PIDFD_SEND_SIGNAL = 5424
338 SYS_IO_URING_SETUP = 5425
339 SYS_IO_URING_ENTER = 5426
340 SYS_IO_URING_REGISTER = 5427
341 SYS_OPEN_TREE = 5428
342 SYS_MOVE_MOUNT = 5429
343 SYS_FSOPEN = 5430
344 SYS_FSCONFIG = 5431
345 SYS_FSMOUNT = 5432
346 SYS_FSPICK = 5433
347 SYS_PIDFD_OPEN = 5434
348 SYS_CLONE3 = 5435
349 SYS_CLOSE_RANGE = 5436
350 SYS_OPENAT2 = 5437
351 SYS_PIDFD_GETFD = 5438
352 SYS_FACCESSAT2 = 5439
353 SYS_PROCESS_MADVISE = 5440
354 SYS_EPOLL_PWAIT2 = 5441
355 SYS_MOUNT_SETATTR = 5442
356 SYS_QUOTACTL_FD = 5443
357 SYS_LANDLOCK_CREATE_RULESET = 5444
358 SYS_LANDLOCK_ADD_RULE = 5445
359 SYS_LANDLOCK_RESTRICT_SELF = 5446
360 SYS_PROCESS_MRELEASE = 5448
356361 )
423423 SYS_PROCESS_MADVISE = 4440
424424 SYS_EPOLL_PWAIT2 = 4441
425425 SYS_MOUNT_SETATTR = 4442
426 SYS_QUOTACTL_FD = 4443
427 SYS_LANDLOCK_CREATE_RULESET = 4444
428 SYS_LANDLOCK_ADD_RULE = 4445
429 SYS_LANDLOCK_RESTRICT_SELF = 4446
430 SYS_PROCESS_MRELEASE = 4448
426431 )
430430 SYS_PROCESS_MADVISE = 440
431431 SYS_EPOLL_PWAIT2 = 441
432432 SYS_MOUNT_SETATTR = 442
433 SYS_QUOTACTL_FD = 443
434 SYS_LANDLOCK_CREATE_RULESET = 444
435 SYS_LANDLOCK_ADD_RULE = 445
436 SYS_LANDLOCK_RESTRICT_SELF = 446
437 SYS_PROCESS_MRELEASE = 448
433438 )
66 package unix
77
88 const (
9 SYS_RESTART_SYSCALL = 0
10 SYS_EXIT = 1
11 SYS_FORK = 2
12 SYS_READ = 3
13 SYS_WRITE = 4
14 SYS_OPEN = 5
15 SYS_CLOSE = 6
16 SYS_WAITPID = 7
17 SYS_CREAT = 8
18 SYS_LINK = 9
19 SYS_UNLINK = 10
20 SYS_EXECVE = 11
21 SYS_CHDIR = 12
22 SYS_TIME = 13
23 SYS_MKNOD = 14
24 SYS_CHMOD = 15
25 SYS_LCHOWN = 16
26 SYS_BREAK = 17
27 SYS_OLDSTAT = 18
28 SYS_LSEEK = 19
29 SYS_GETPID = 20
30 SYS_MOUNT = 21
31 SYS_UMOUNT = 22
32 SYS_SETUID = 23
33 SYS_GETUID = 24
34 SYS_STIME = 25
35 SYS_PTRACE = 26
36 SYS_ALARM = 27
37 SYS_OLDFSTAT = 28
38 SYS_PAUSE = 29
39 SYS_UTIME = 30
40 SYS_STTY = 31
41 SYS_GTTY = 32
42 SYS_ACCESS = 33
43 SYS_NICE = 34
44 SYS_FTIME = 35
45 SYS_SYNC = 36
46 SYS_KILL = 37
47 SYS_RENAME = 38
48 SYS_MKDIR = 39
49 SYS_RMDIR = 40
50 SYS_DUP = 41
51 SYS_PIPE = 42
52 SYS_TIMES = 43
53 SYS_PROF = 44
54 SYS_BRK = 45
55 SYS_SETGID = 46
56 SYS_GETGID = 47
57 SYS_SIGNAL = 48
58 SYS_GETEUID = 49
59 SYS_GETEGID = 50
60 SYS_ACCT = 51
61 SYS_UMOUNT2 = 52
62 SYS_LOCK = 53
63 SYS_IOCTL = 54
64 SYS_FCNTL = 55
65 SYS_MPX = 56
66 SYS_SETPGID = 57
67 SYS_ULIMIT = 58
68 SYS_OLDOLDUNAME = 59
69 SYS_UMASK = 60
70 SYS_CHROOT = 61
71 SYS_USTAT = 62
72 SYS_DUP2 = 63
73 SYS_GETPPID = 64
74 SYS_GETPGRP = 65
75 SYS_SETSID = 66
76 SYS_SIGACTION = 67
77 SYS_SGETMASK = 68
78 SYS_SSETMASK = 69
79 SYS_SETREUID = 70
80 SYS_SETREGID = 71
81 SYS_SIGSUSPEND = 72
82 SYS_SIGPENDING = 73
83 SYS_SETHOSTNAME = 74
84 SYS_SETRLIMIT = 75
85 SYS_GETRLIMIT = 76
86 SYS_GETRUSAGE = 77
87 SYS_GETTIMEOFDAY = 78
88 SYS_SETTIMEOFDAY = 79
89 SYS_GETGROUPS = 80
90 SYS_SETGROUPS = 81
91 SYS_SELECT = 82
92 SYS_SYMLINK = 83
93 SYS_OLDLSTAT = 84
94 SYS_READLINK = 85
95 SYS_USELIB = 86
96 SYS_SWAPON = 87
97 SYS_REBOOT = 88
98 SYS_READDIR = 89
99 SYS_MMAP = 90
100 SYS_MUNMAP = 91
101 SYS_TRUNCATE = 92
102 SYS_FTRUNCATE = 93
103 SYS_FCHMOD = 94
104 SYS_FCHOWN = 95
105 SYS_GETPRIORITY = 96
106 SYS_SETPRIORITY = 97
107 SYS_PROFIL = 98
108 SYS_STATFS = 99
109 SYS_FSTATFS = 100
110 SYS_IOPERM = 101
111 SYS_SOCKETCALL = 102
112 SYS_SYSLOG = 103
113 SYS_SETITIMER = 104
114 SYS_GETITIMER = 105
115 SYS_STAT = 106
116 SYS_LSTAT = 107
117 SYS_FSTAT = 108
118 SYS_OLDUNAME = 109
119 SYS_IOPL = 110
120 SYS_VHANGUP = 111
121 SYS_IDLE = 112
122 SYS_VM86 = 113
123 SYS_WAIT4 = 114
124 SYS_SWAPOFF = 115
125 SYS_SYSINFO = 116
126 SYS_IPC = 117
127 SYS_FSYNC = 118
128 SYS_SIGRETURN = 119
129 SYS_CLONE = 120
130 SYS_SETDOMAINNAME = 121
131 SYS_UNAME = 122
132 SYS_MODIFY_LDT = 123
133 SYS_ADJTIMEX = 124
134 SYS_MPROTECT = 125
135 SYS_SIGPROCMASK = 126
136 SYS_CREATE_MODULE = 127
137 SYS_INIT_MODULE = 128
138 SYS_DELETE_MODULE = 129
139 SYS_GET_KERNEL_SYMS = 130
140 SYS_QUOTACTL = 131
141 SYS_GETPGID = 132
142 SYS_FCHDIR = 133
143 SYS_BDFLUSH = 134
144 SYS_SYSFS = 135
145 SYS_PERSONALITY = 136
146 SYS_AFS_SYSCALL = 137
147 SYS_SETFSUID = 138
148 SYS_SETFSGID = 139
149 SYS__LLSEEK = 140
150 SYS_GETDENTS = 141
151 SYS__NEWSELECT = 142
152 SYS_FLOCK = 143
153 SYS_MSYNC = 144
154 SYS_READV = 145
155 SYS_WRITEV = 146
156 SYS_GETSID = 147
157 SYS_FDATASYNC = 148
158 SYS__SYSCTL = 149
159 SYS_MLOCK = 150
160 SYS_MUNLOCK = 151
161 SYS_MLOCKALL = 152
162 SYS_MUNLOCKALL = 153
163 SYS_SCHED_SETPARAM = 154
164 SYS_SCHED_GETPARAM = 155
165 SYS_SCHED_SETSCHEDULER = 156
166 SYS_SCHED_GETSCHEDULER = 157
167 SYS_SCHED_YIELD = 158
168 SYS_SCHED_GET_PRIORITY_MAX = 159
169 SYS_SCHED_GET_PRIORITY_MIN = 160
170 SYS_SCHED_RR_GET_INTERVAL = 161
171 SYS_NANOSLEEP = 162
172 SYS_MREMAP = 163
173 SYS_SETRESUID = 164
174 SYS_GETRESUID = 165
175 SYS_QUERY_MODULE = 166
176 SYS_POLL = 167
177 SYS_NFSSERVCTL = 168
178 SYS_SETRESGID = 169
179 SYS_GETRESGID = 170
180 SYS_PRCTL = 171
181 SYS_RT_SIGRETURN = 172
182 SYS_RT_SIGACTION = 173
183 SYS_RT_SIGPROCMASK = 174
184 SYS_RT_SIGPENDING = 175
185 SYS_RT_SIGTIMEDWAIT = 176
186 SYS_RT_SIGQUEUEINFO = 177
187 SYS_RT_SIGSUSPEND = 178
188 SYS_PREAD64 = 179
189 SYS_PWRITE64 = 180
190 SYS_CHOWN = 181
191 SYS_GETCWD = 182
192 SYS_CAPGET = 183
193 SYS_CAPSET = 184
194 SYS_SIGALTSTACK = 185
195 SYS_SENDFILE = 186
196 SYS_GETPMSG = 187
197 SYS_PUTPMSG = 188
198 SYS_VFORK = 189
199 SYS_UGETRLIMIT = 190
200 SYS_READAHEAD = 191
201 SYS_PCICONFIG_READ = 198
202 SYS_PCICONFIG_WRITE = 199
203 SYS_PCICONFIG_IOBASE = 200
204 SYS_MULTIPLEXER = 201
205 SYS_GETDENTS64 = 202
206 SYS_PIVOT_ROOT = 203
207 SYS_MADVISE = 205
208 SYS_MINCORE = 206
209 SYS_GETTID = 207
210 SYS_TKILL = 208
211 SYS_SETXATTR = 209
212 SYS_LSETXATTR = 210
213 SYS_FSETXATTR = 211
214 SYS_GETXATTR = 212
215 SYS_LGETXATTR = 213
216 SYS_FGETXATTR = 214
217 SYS_LISTXATTR = 215
218 SYS_LLISTXATTR = 216
219 SYS_FLISTXATTR = 217
220 SYS_REMOVEXATTR = 218
221 SYS_LREMOVEXATTR = 219
222 SYS_FREMOVEXATTR = 220
223 SYS_FUTEX = 221
224 SYS_SCHED_SETAFFINITY = 222
225 SYS_SCHED_GETAFFINITY = 223
226 SYS_TUXCALL = 225
227 SYS_IO_SETUP = 227
228 SYS_IO_DESTROY = 228
229 SYS_IO_GETEVENTS = 229
230 SYS_IO_SUBMIT = 230
231 SYS_IO_CANCEL = 231
232 SYS_SET_TID_ADDRESS = 232
233 SYS_FADVISE64 = 233
234 SYS_EXIT_GROUP = 234
235 SYS_LOOKUP_DCOOKIE = 235
236 SYS_EPOLL_CREATE = 236
237 SYS_EPOLL_CTL = 237
238 SYS_EPOLL_WAIT = 238
239 SYS_REMAP_FILE_PAGES = 239
240 SYS_TIMER_CREATE = 240
241 SYS_TIMER_SETTIME = 241
242 SYS_TIMER_GETTIME = 242
243 SYS_TIMER_GETOVERRUN = 243
244 SYS_TIMER_DELETE = 244
245 SYS_CLOCK_SETTIME = 245
246 SYS_CLOCK_GETTIME = 246
247 SYS_CLOCK_GETRES = 247
248 SYS_CLOCK_NANOSLEEP = 248
249 SYS_SWAPCONTEXT = 249
250 SYS_TGKILL = 250
251 SYS_UTIMES = 251
252 SYS_STATFS64 = 252
253 SYS_FSTATFS64 = 253
254 SYS_RTAS = 255
255 SYS_SYS_DEBUG_SETCONTEXT = 256
256 SYS_MIGRATE_PAGES = 258
257 SYS_MBIND = 259
258 SYS_GET_MEMPOLICY = 260
259 SYS_SET_MEMPOLICY = 261
260 SYS_MQ_OPEN = 262
261 SYS_MQ_UNLINK = 263
262 SYS_MQ_TIMEDSEND = 264
263 SYS_MQ_TIMEDRECEIVE = 265
264 SYS_MQ_NOTIFY = 266
265 SYS_MQ_GETSETATTR = 267
266 SYS_KEXEC_LOAD = 268
267 SYS_ADD_KEY = 269
268 SYS_REQUEST_KEY = 270
269 SYS_KEYCTL = 271
270 SYS_WAITID = 272
271 SYS_IOPRIO_SET = 273
272 SYS_IOPRIO_GET = 274
273 SYS_INOTIFY_INIT = 275
274 SYS_INOTIFY_ADD_WATCH = 276
275 SYS_INOTIFY_RM_WATCH = 277
276 SYS_SPU_RUN = 278
277 SYS_SPU_CREATE = 279
278 SYS_PSELECT6 = 280
279 SYS_PPOLL = 281
280 SYS_UNSHARE = 282
281 SYS_SPLICE = 283
282 SYS_TEE = 284
283 SYS_VMSPLICE = 285
284 SYS_OPENAT = 286
285 SYS_MKDIRAT = 287
286 SYS_MKNODAT = 288
287 SYS_FCHOWNAT = 289
288 SYS_FUTIMESAT = 290
289 SYS_NEWFSTATAT = 291
290 SYS_UNLINKAT = 292
291 SYS_RENAMEAT = 293
292 SYS_LINKAT = 294
293 SYS_SYMLINKAT = 295
294 SYS_READLINKAT = 296
295 SYS_FCHMODAT = 297
296 SYS_FACCESSAT = 298
297 SYS_GET_ROBUST_LIST = 299
298 SYS_SET_ROBUST_LIST = 300
299 SYS_MOVE_PAGES = 301
300 SYS_GETCPU = 302
301 SYS_EPOLL_PWAIT = 303
302 SYS_UTIMENSAT = 304
303 SYS_SIGNALFD = 305
304 SYS_TIMERFD_CREATE = 306
305 SYS_EVENTFD = 307
306 SYS_SYNC_FILE_RANGE2 = 308
307 SYS_FALLOCATE = 309
308 SYS_SUBPAGE_PROT = 310
309 SYS_TIMERFD_SETTIME = 311
310 SYS_TIMERFD_GETTIME = 312
311 SYS_SIGNALFD4 = 313
312 SYS_EVENTFD2 = 314
313 SYS_EPOLL_CREATE1 = 315
314 SYS_DUP3 = 316
315 SYS_PIPE2 = 317
316 SYS_INOTIFY_INIT1 = 318
317 SYS_PERF_EVENT_OPEN = 319
318 SYS_PREADV = 320
319 SYS_PWRITEV = 321
320 SYS_RT_TGSIGQUEUEINFO = 322
321 SYS_FANOTIFY_INIT = 323
322 SYS_FANOTIFY_MARK = 324
323 SYS_PRLIMIT64 = 325
324 SYS_SOCKET = 326
325 SYS_BIND = 327
326 SYS_CONNECT = 328
327 SYS_LISTEN = 329
328 SYS_ACCEPT = 330
329 SYS_GETSOCKNAME = 331
330 SYS_GETPEERNAME = 332
331 SYS_SOCKETPAIR = 333
332 SYS_SEND = 334
333 SYS_SENDTO = 335
334 SYS_RECV = 336
335 SYS_RECVFROM = 337
336 SYS_SHUTDOWN = 338
337 SYS_SETSOCKOPT = 339
338 SYS_GETSOCKOPT = 340
339 SYS_SENDMSG = 341
340 SYS_RECVMSG = 342
341 SYS_RECVMMSG = 343
342 SYS_ACCEPT4 = 344
343 SYS_NAME_TO_HANDLE_AT = 345
344 SYS_OPEN_BY_HANDLE_AT = 346
345 SYS_CLOCK_ADJTIME = 347
346 SYS_SYNCFS = 348
347 SYS_SENDMMSG = 349
348 SYS_SETNS = 350
349 SYS_PROCESS_VM_READV = 351
350 SYS_PROCESS_VM_WRITEV = 352
351 SYS_FINIT_MODULE = 353
352 SYS_KCMP = 354
353 SYS_SCHED_SETATTR = 355
354 SYS_SCHED_GETATTR = 356
355 SYS_RENAMEAT2 = 357
356 SYS_SECCOMP = 358
357 SYS_GETRANDOM = 359
358 SYS_MEMFD_CREATE = 360
359 SYS_BPF = 361
360 SYS_EXECVEAT = 362
361 SYS_SWITCH_ENDIAN = 363
362 SYS_USERFAULTFD = 364
363 SYS_MEMBARRIER = 365
364 SYS_MLOCK2 = 378
365 SYS_COPY_FILE_RANGE = 379
366 SYS_PREADV2 = 380
367 SYS_PWRITEV2 = 381
368 SYS_KEXEC_FILE_LOAD = 382
369 SYS_STATX = 383
370 SYS_PKEY_ALLOC = 384
371 SYS_PKEY_FREE = 385
372 SYS_PKEY_MPROTECT = 386
373 SYS_RSEQ = 387
374 SYS_IO_PGETEVENTS = 388
375 SYS_SEMTIMEDOP = 392
376 SYS_SEMGET = 393
377 SYS_SEMCTL = 394
378 SYS_SHMGET = 395
379 SYS_SHMCTL = 396
380 SYS_SHMAT = 397
381 SYS_SHMDT = 398
382 SYS_MSGGET = 399
383 SYS_MSGSND = 400
384 SYS_MSGRCV = 401
385 SYS_MSGCTL = 402
386 SYS_PIDFD_SEND_SIGNAL = 424
387 SYS_IO_URING_SETUP = 425
388 SYS_IO_URING_ENTER = 426
389 SYS_IO_URING_REGISTER = 427
390 SYS_OPEN_TREE = 428
391 SYS_MOVE_MOUNT = 429
392 SYS_FSOPEN = 430
393 SYS_FSCONFIG = 431
394 SYS_FSMOUNT = 432
395 SYS_FSPICK = 433
396 SYS_PIDFD_OPEN = 434
397 SYS_CLONE3 = 435
398 SYS_CLOSE_RANGE = 436
399 SYS_OPENAT2 = 437
400 SYS_PIDFD_GETFD = 438
401 SYS_FACCESSAT2 = 439
402 SYS_PROCESS_MADVISE = 440
403 SYS_EPOLL_PWAIT2 = 441
404 SYS_MOUNT_SETATTR = 442
9 SYS_RESTART_SYSCALL = 0
10 SYS_EXIT = 1
11 SYS_FORK = 2
12 SYS_READ = 3
13 SYS_WRITE = 4
14 SYS_OPEN = 5
15 SYS_CLOSE = 6
16 SYS_WAITPID = 7
17 SYS_CREAT = 8
18 SYS_LINK = 9
19 SYS_UNLINK = 10
20 SYS_EXECVE = 11
21 SYS_CHDIR = 12
22 SYS_TIME = 13
23 SYS_MKNOD = 14
24 SYS_CHMOD = 15
25 SYS_LCHOWN = 16
26 SYS_BREAK = 17
27 SYS_OLDSTAT = 18
28 SYS_LSEEK = 19
29 SYS_GETPID = 20
30 SYS_MOUNT = 21
31 SYS_UMOUNT = 22
32 SYS_SETUID = 23
33 SYS_GETUID = 24
34 SYS_STIME = 25
35 SYS_PTRACE = 26
36 SYS_ALARM = 27
37 SYS_OLDFSTAT = 28
38 SYS_PAUSE = 29
39 SYS_UTIME = 30
40 SYS_STTY = 31
41 SYS_GTTY = 32
42 SYS_ACCESS = 33
43 SYS_NICE = 34
44 SYS_FTIME = 35
45 SYS_SYNC = 36
46 SYS_KILL = 37
47 SYS_RENAME = 38
48 SYS_MKDIR = 39
49 SYS_RMDIR = 40
50 SYS_DUP = 41
51 SYS_PIPE = 42
52 SYS_TIMES = 43
53 SYS_PROF = 44
54 SYS_BRK = 45
55 SYS_SETGID = 46
56 SYS_GETGID = 47
57 SYS_SIGNAL = 48
58 SYS_GETEUID = 49
59 SYS_GETEGID = 50
60 SYS_ACCT = 51
61 SYS_UMOUNT2 = 52
62 SYS_LOCK = 53
63 SYS_IOCTL = 54
64 SYS_FCNTL = 55
65 SYS_MPX = 56
66 SYS_SETPGID = 57
67 SYS_ULIMIT = 58
68 SYS_OLDOLDUNAME = 59
69 SYS_UMASK = 60
70 SYS_CHROOT = 61
71 SYS_USTAT = 62
72 SYS_DUP2 = 63
73 SYS_GETPPID = 64
74 SYS_GETPGRP = 65
75 SYS_SETSID = 66
76 SYS_SIGACTION = 67
77 SYS_SGETMASK = 68
78 SYS_SSETMASK = 69
79 SYS_SETREUID = 70
80 SYS_SETREGID = 71
81 SYS_SIGSUSPEND = 72
82 SYS_SIGPENDING = 73
83 SYS_SETHOSTNAME = 74
84 SYS_SETRLIMIT = 75
85 SYS_GETRLIMIT = 76
86 SYS_GETRUSAGE = 77
87 SYS_GETTIMEOFDAY = 78
88 SYS_SETTIMEOFDAY = 79
89 SYS_GETGROUPS = 80
90 SYS_SETGROUPS = 81
91 SYS_SELECT = 82
92 SYS_SYMLINK = 83
93 SYS_OLDLSTAT = 84
94 SYS_READLINK = 85
95 SYS_USELIB = 86
96 SYS_SWAPON = 87
97 SYS_REBOOT = 88
98 SYS_READDIR = 89
99 SYS_MMAP = 90
100 SYS_MUNMAP = 91
101 SYS_TRUNCATE = 92
102 SYS_FTRUNCATE = 93
103 SYS_FCHMOD = 94
104 SYS_FCHOWN = 95
105 SYS_GETPRIORITY = 96
106 SYS_SETPRIORITY = 97
107 SYS_PROFIL = 98
108 SYS_STATFS = 99
109 SYS_FSTATFS = 100
110 SYS_IOPERM = 101
111 SYS_SOCKETCALL = 102
112 SYS_SYSLOG = 103
113 SYS_SETITIMER = 104
114 SYS_GETITIMER = 105
115 SYS_STAT = 106
116 SYS_LSTAT = 107
117 SYS_FSTAT = 108
118 SYS_OLDUNAME = 109
119 SYS_IOPL = 110
120 SYS_VHANGUP = 111
121 SYS_IDLE = 112
122 SYS_VM86 = 113
123 SYS_WAIT4 = 114
124 SYS_SWAPOFF = 115
125 SYS_SYSINFO = 116
126 SYS_IPC = 117
127 SYS_FSYNC = 118
128 SYS_SIGRETURN = 119
129 SYS_CLONE = 120
130 SYS_SETDOMAINNAME = 121
131 SYS_UNAME = 122
132 SYS_MODIFY_LDT = 123
133 SYS_ADJTIMEX = 124
134 SYS_MPROTECT = 125
135 SYS_SIGPROCMASK = 126
136 SYS_CREATE_MODULE = 127
137 SYS_INIT_MODULE = 128
138 SYS_DELETE_MODULE = 129
139 SYS_GET_KERNEL_SYMS = 130
140 SYS_QUOTACTL = 131
141 SYS_GETPGID = 132
142 SYS_FCHDIR = 133
143 SYS_BDFLUSH = 134
144 SYS_SYSFS = 135
145 SYS_PERSONALITY = 136
146 SYS_AFS_SYSCALL = 137
147 SYS_SETFSUID = 138
148 SYS_SETFSGID = 139
149 SYS__LLSEEK = 140
150 SYS_GETDENTS = 141
151 SYS__NEWSELECT = 142
152 SYS_FLOCK = 143
153 SYS_MSYNC = 144
154 SYS_READV = 145
155 SYS_WRITEV = 146
156 SYS_GETSID = 147
157 SYS_FDATASYNC = 148
158 SYS__SYSCTL = 149
159 SYS_MLOCK = 150
160 SYS_MUNLOCK = 151
161 SYS_MLOCKALL = 152
162 SYS_MUNLOCKALL = 153
163 SYS_SCHED_SETPARAM = 154
164 SYS_SCHED_GETPARAM = 155
165 SYS_SCHED_SETSCHEDULER = 156
166 SYS_SCHED_GETSCHEDULER = 157
167 SYS_SCHED_YIELD = 158
168 SYS_SCHED_GET_PRIORITY_MAX = 159
169 SYS_SCHED_GET_PRIORITY_MIN = 160
170 SYS_SCHED_RR_GET_INTERVAL = 161
171 SYS_NANOSLEEP = 162
172 SYS_MREMAP = 163
173 SYS_SETRESUID = 164
174 SYS_GETRESUID = 165
175 SYS_QUERY_MODULE = 166
176 SYS_POLL = 167
177 SYS_NFSSERVCTL = 168
178 SYS_SETRESGID = 169
179 SYS_GETRESGID = 170
180 SYS_PRCTL = 171
181 SYS_RT_SIGRETURN = 172
182 SYS_RT_SIGACTION = 173
183 SYS_RT_SIGPROCMASK = 174
184 SYS_RT_SIGPENDING = 175
185 SYS_RT_SIGTIMEDWAIT = 176
186 SYS_RT_SIGQUEUEINFO = 177
187 SYS_RT_SIGSUSPEND = 178
188 SYS_PREAD64 = 179
189 SYS_PWRITE64 = 180
190 SYS_CHOWN = 181
191 SYS_GETCWD = 182
192 SYS_CAPGET = 183
193 SYS_CAPSET = 184
194 SYS_SIGALTSTACK = 185
195 SYS_SENDFILE = 186
196 SYS_GETPMSG = 187
197 SYS_PUTPMSG = 188
198 SYS_VFORK = 189
199 SYS_UGETRLIMIT = 190
200 SYS_READAHEAD = 191
201 SYS_PCICONFIG_READ = 198
202 SYS_PCICONFIG_WRITE = 199
203 SYS_PCICONFIG_IOBASE = 200
204 SYS_MULTIPLEXER = 201
205 SYS_GETDENTS64 = 202
206 SYS_PIVOT_ROOT = 203
207 SYS_MADVISE = 205
208 SYS_MINCORE = 206
209 SYS_GETTID = 207
210 SYS_TKILL = 208
211 SYS_SETXATTR = 209
212 SYS_LSETXATTR = 210
213 SYS_FSETXATTR = 211
214 SYS_GETXATTR = 212
215 SYS_LGETXATTR = 213
216 SYS_FGETXATTR = 214
217 SYS_LISTXATTR = 215
218 SYS_LLISTXATTR = 216
219 SYS_FLISTXATTR = 217
220 SYS_REMOVEXATTR = 218
221 SYS_LREMOVEXATTR = 219
222 SYS_FREMOVEXATTR = 220
223 SYS_FUTEX = 221
224 SYS_SCHED_SETAFFINITY = 222
225 SYS_SCHED_GETAFFINITY = 223
226 SYS_TUXCALL = 225
227 SYS_IO_SETUP = 227
228 SYS_IO_DESTROY = 228
229 SYS_IO_GETEVENTS = 229
230 SYS_IO_SUBMIT = 230
231 SYS_IO_CANCEL = 231
232 SYS_SET_TID_ADDRESS = 232
233 SYS_FADVISE64 = 233
234 SYS_EXIT_GROUP = 234
235 SYS_LOOKUP_DCOOKIE = 235
236 SYS_EPOLL_CREATE = 236
237 SYS_EPOLL_CTL = 237
238 SYS_EPOLL_WAIT = 238
239 SYS_REMAP_FILE_PAGES = 239
240 SYS_TIMER_CREATE = 240
241 SYS_TIMER_SETTIME = 241
242 SYS_TIMER_GETTIME = 242
243 SYS_TIMER_GETOVERRUN = 243
244 SYS_TIMER_DELETE = 244
245 SYS_CLOCK_SETTIME = 245
246 SYS_CLOCK_GETTIME = 246
247 SYS_CLOCK_GETRES = 247
248 SYS_CLOCK_NANOSLEEP = 248
249 SYS_SWAPCONTEXT = 249
250 SYS_TGKILL = 250
251 SYS_UTIMES = 251
252 SYS_STATFS64 = 252
253 SYS_FSTATFS64 = 253
254 SYS_RTAS = 255
255 SYS_SYS_DEBUG_SETCONTEXT = 256
256 SYS_MIGRATE_PAGES = 258
257 SYS_MBIND = 259
258 SYS_GET_MEMPOLICY = 260
259 SYS_SET_MEMPOLICY = 261
260 SYS_MQ_OPEN = 262
261 SYS_MQ_UNLINK = 263
262 SYS_MQ_TIMEDSEND = 264
263 SYS_MQ_TIMEDRECEIVE = 265
264 SYS_MQ_NOTIFY = 266
265 SYS_MQ_GETSETATTR = 267
266 SYS_KEXEC_LOAD = 268
267 SYS_ADD_KEY = 269
268 SYS_REQUEST_KEY = 270
269 SYS_KEYCTL = 271
270 SYS_WAITID = 272
271 SYS_IOPRIO_SET = 273
272 SYS_IOPRIO_GET = 274
273 SYS_INOTIFY_INIT = 275
274 SYS_INOTIFY_ADD_WATCH = 276
275 SYS_INOTIFY_RM_WATCH = 277
276 SYS_SPU_RUN = 278
277 SYS_SPU_CREATE = 279
278 SYS_PSELECT6 = 280
279 SYS_PPOLL = 281
280 SYS_UNSHARE = 282
281 SYS_SPLICE = 283
282 SYS_TEE = 284
283 SYS_VMSPLICE = 285
284 SYS_OPENAT = 286
285 SYS_MKDIRAT = 287
286 SYS_MKNODAT = 288
287 SYS_FCHOWNAT = 289
288 SYS_FUTIMESAT = 290
289 SYS_NEWFSTATAT = 291
290 SYS_UNLINKAT = 292
291 SYS_RENAMEAT = 293
292 SYS_LINKAT = 294
293 SYS_SYMLINKAT = 295
294 SYS_READLINKAT = 296
295 SYS_FCHMODAT = 297
296 SYS_FACCESSAT = 298
297 SYS_GET_ROBUST_LIST = 299
298 SYS_SET_ROBUST_LIST = 300
299 SYS_MOVE_PAGES = 301
300 SYS_GETCPU = 302
301 SYS_EPOLL_PWAIT = 303
302 SYS_UTIMENSAT = 304
303 SYS_SIGNALFD = 305
304 SYS_TIMERFD_CREATE = 306
305 SYS_EVENTFD = 307
306 SYS_SYNC_FILE_RANGE2 = 308
307 SYS_FALLOCATE = 309
308 SYS_SUBPAGE_PROT = 310
309 SYS_TIMERFD_SETTIME = 311
310 SYS_TIMERFD_GETTIME = 312
311 SYS_SIGNALFD4 = 313
312 SYS_EVENTFD2 = 314
313 SYS_EPOLL_CREATE1 = 315
314 SYS_DUP3 = 316
315 SYS_PIPE2 = 317
316 SYS_INOTIFY_INIT1 = 318
317 SYS_PERF_EVENT_OPEN = 319
318 SYS_PREADV = 320
319 SYS_PWRITEV = 321
320 SYS_RT_TGSIGQUEUEINFO = 322
321 SYS_FANOTIFY_INIT = 323
322 SYS_FANOTIFY_MARK = 324
323 SYS_PRLIMIT64 = 325
324 SYS_SOCKET = 326
325 SYS_BIND = 327
326 SYS_CONNECT = 328
327 SYS_LISTEN = 329
328 SYS_ACCEPT = 330
329 SYS_GETSOCKNAME = 331
330 SYS_GETPEERNAME = 332
331 SYS_SOCKETPAIR = 333
332 SYS_SEND = 334
333 SYS_SENDTO = 335
334 SYS_RECV = 336
335 SYS_RECVFROM = 337
336 SYS_SHUTDOWN = 338
337 SYS_SETSOCKOPT = 339
338 SYS_GETSOCKOPT = 340
339 SYS_SENDMSG = 341
340 SYS_RECVMSG = 342
341 SYS_RECVMMSG = 343
342 SYS_ACCEPT4 = 344
343 SYS_NAME_TO_HANDLE_AT = 345
344 SYS_OPEN_BY_HANDLE_AT = 346
345 SYS_CLOCK_ADJTIME = 347
346 SYS_SYNCFS = 348
347 SYS_SENDMMSG = 349
348 SYS_SETNS = 350
349 SYS_PROCESS_VM_READV = 351
350 SYS_PROCESS_VM_WRITEV = 352
351 SYS_FINIT_MODULE = 353
352 SYS_KCMP = 354
353 SYS_SCHED_SETATTR = 355
354 SYS_SCHED_GETATTR = 356
355 SYS_RENAMEAT2 = 357
356 SYS_SECCOMP = 358
357 SYS_GETRANDOM = 359
358 SYS_MEMFD_CREATE = 360
359 SYS_BPF = 361
360 SYS_EXECVEAT = 362
361 SYS_SWITCH_ENDIAN = 363
362 SYS_USERFAULTFD = 364
363 SYS_MEMBARRIER = 365
364 SYS_MLOCK2 = 378
365 SYS_COPY_FILE_RANGE = 379
366 SYS_PREADV2 = 380
367 SYS_PWRITEV2 = 381
368 SYS_KEXEC_FILE_LOAD = 382
369 SYS_STATX = 383
370 SYS_PKEY_ALLOC = 384
371 SYS_PKEY_FREE = 385
372 SYS_PKEY_MPROTECT = 386
373 SYS_RSEQ = 387
374 SYS_IO_PGETEVENTS = 388
375 SYS_SEMTIMEDOP = 392
376 SYS_SEMGET = 393
377 SYS_SEMCTL = 394
378 SYS_SHMGET = 395
379 SYS_SHMCTL = 396
380 SYS_SHMAT = 397
381 SYS_SHMDT = 398
382 SYS_MSGGET = 399
383 SYS_MSGSND = 400
384 SYS_MSGRCV = 401
385 SYS_MSGCTL = 402
386 SYS_PIDFD_SEND_SIGNAL = 424
387 SYS_IO_URING_SETUP = 425
388 SYS_IO_URING_ENTER = 426
389 SYS_IO_URING_REGISTER = 427
390 SYS_OPEN_TREE = 428
391 SYS_MOVE_MOUNT = 429
392 SYS_FSOPEN = 430
393 SYS_FSCONFIG = 431
394 SYS_FSMOUNT = 432
395 SYS_FSPICK = 433
396 SYS_PIDFD_OPEN = 434
397 SYS_CLONE3 = 435
398 SYS_CLOSE_RANGE = 436
399 SYS_OPENAT2 = 437
400 SYS_PIDFD_GETFD = 438
401 SYS_FACCESSAT2 = 439
402 SYS_PROCESS_MADVISE = 440
403 SYS_EPOLL_PWAIT2 = 441
404 SYS_MOUNT_SETATTR = 442
405 SYS_QUOTACTL_FD = 443
406 SYS_LANDLOCK_CREATE_RULESET = 444
407 SYS_LANDLOCK_ADD_RULE = 445
408 SYS_LANDLOCK_RESTRICT_SELF = 446
409 SYS_PROCESS_MRELEASE = 448
405410 )
66 package unix
77
88 const (
9 SYS_RESTART_SYSCALL = 0
10 SYS_EXIT = 1
11 SYS_FORK = 2
12 SYS_READ = 3
13 SYS_WRITE = 4
14 SYS_OPEN = 5
15 SYS_CLOSE = 6
16 SYS_WAITPID = 7
17 SYS_CREAT = 8
18 SYS_LINK = 9
19 SYS_UNLINK = 10
20 SYS_EXECVE = 11
21 SYS_CHDIR = 12
22 SYS_TIME = 13
23 SYS_MKNOD = 14
24 SYS_CHMOD = 15
25 SYS_LCHOWN = 16
26 SYS_BREAK = 17
27 SYS_OLDSTAT = 18
28 SYS_LSEEK = 19
29 SYS_GETPID = 20
30 SYS_MOUNT = 21
31 SYS_UMOUNT = 22
32 SYS_SETUID = 23
33 SYS_GETUID = 24
34 SYS_STIME = 25
35 SYS_PTRACE = 26
36 SYS_ALARM = 27
37 SYS_OLDFSTAT = 28
38 SYS_PAUSE = 29
39 SYS_UTIME = 30
40 SYS_STTY = 31
41 SYS_GTTY = 32
42 SYS_ACCESS = 33
43 SYS_NICE = 34
44 SYS_FTIME = 35
45 SYS_SYNC = 36
46 SYS_KILL = 37
47 SYS_RENAME = 38
48 SYS_MKDIR = 39
49 SYS_RMDIR = 40
50 SYS_DUP = 41
51 SYS_PIPE = 42
52 SYS_TIMES = 43
53 SYS_PROF = 44
54 SYS_BRK = 45
55 SYS_SETGID = 46
56 SYS_GETGID = 47
57 SYS_SIGNAL = 48
58 SYS_GETEUID = 49
59 SYS_GETEGID = 50
60 SYS_ACCT = 51
61 SYS_UMOUNT2 = 52
62 SYS_LOCK = 53
63 SYS_IOCTL = 54
64 SYS_FCNTL = 55
65 SYS_MPX = 56
66 SYS_SETPGID = 57
67 SYS_ULIMIT = 58
68 SYS_OLDOLDUNAME = 59
69 SYS_UMASK = 60
70 SYS_CHROOT = 61
71 SYS_USTAT = 62
72 SYS_DUP2 = 63
73 SYS_GETPPID = 64
74 SYS_GETPGRP = 65
75 SYS_SETSID = 66
76 SYS_SIGACTION = 67
77 SYS_SGETMASK = 68
78 SYS_SSETMASK = 69
79 SYS_SETREUID = 70
80 SYS_SETREGID = 71
81 SYS_SIGSUSPEND = 72
82 SYS_SIGPENDING = 73
83 SYS_SETHOSTNAME = 74
84 SYS_SETRLIMIT = 75
85 SYS_GETRLIMIT = 76
86 SYS_GETRUSAGE = 77
87 SYS_GETTIMEOFDAY = 78
88 SYS_SETTIMEOFDAY = 79
89 SYS_GETGROUPS = 80
90 SYS_SETGROUPS = 81
91 SYS_SELECT = 82
92 SYS_SYMLINK = 83
93 SYS_OLDLSTAT = 84
94 SYS_READLINK = 85
95 SYS_USELIB = 86
96 SYS_SWAPON = 87
97 SYS_REBOOT = 88
98 SYS_READDIR = 89
99 SYS_MMAP = 90
100 SYS_MUNMAP = 91
101 SYS_TRUNCATE = 92
102 SYS_FTRUNCATE = 93
103 SYS_FCHMOD = 94
104 SYS_FCHOWN = 95
105 SYS_GETPRIORITY = 96
106 SYS_SETPRIORITY = 97
107 SYS_PROFIL = 98
108 SYS_STATFS = 99
109 SYS_FSTATFS = 100
110 SYS_IOPERM = 101
111 SYS_SOCKETCALL = 102
112 SYS_SYSLOG = 103
113 SYS_SETITIMER = 104
114 SYS_GETITIMER = 105
115 SYS_STAT = 106
116 SYS_LSTAT = 107
117 SYS_FSTAT = 108
118 SYS_OLDUNAME = 109
119 SYS_IOPL = 110
120 SYS_VHANGUP = 111
121 SYS_IDLE = 112
122 SYS_VM86 = 113
123 SYS_WAIT4 = 114
124 SYS_SWAPOFF = 115
125 SYS_SYSINFO = 116
126 SYS_IPC = 117
127 SYS_FSYNC = 118
128 SYS_SIGRETURN = 119
129 SYS_CLONE = 120
130 SYS_SETDOMAINNAME = 121
131 SYS_UNAME = 122
132 SYS_MODIFY_LDT = 123
133 SYS_ADJTIMEX = 124
134 SYS_MPROTECT = 125
135 SYS_SIGPROCMASK = 126
136 SYS_CREATE_MODULE = 127
137 SYS_INIT_MODULE = 128
138 SYS_DELETE_MODULE = 129
139 SYS_GET_KERNEL_SYMS = 130
140 SYS_QUOTACTL = 131
141 SYS_GETPGID = 132
142 SYS_FCHDIR = 133
143 SYS_BDFLUSH = 134
144 SYS_SYSFS = 135
145 SYS_PERSONALITY = 136
146 SYS_AFS_SYSCALL = 137
147 SYS_SETFSUID = 138
148 SYS_SETFSGID = 139
149 SYS__LLSEEK = 140
150 SYS_GETDENTS = 141
151 SYS__NEWSELECT = 142
152 SYS_FLOCK = 143
153 SYS_MSYNC = 144
154 SYS_READV = 145
155 SYS_WRITEV = 146
156 SYS_GETSID = 147
157 SYS_FDATASYNC = 148
158 SYS__SYSCTL = 149
159 SYS_MLOCK = 150
160 SYS_MUNLOCK = 151
161 SYS_MLOCKALL = 152
162 SYS_MUNLOCKALL = 153
163 SYS_SCHED_SETPARAM = 154
164 SYS_SCHED_GETPARAM = 155
165 SYS_SCHED_SETSCHEDULER = 156
166 SYS_SCHED_GETSCHEDULER = 157
167 SYS_SCHED_YIELD = 158
168 SYS_SCHED_GET_PRIORITY_MAX = 159
169 SYS_SCHED_GET_PRIORITY_MIN = 160
170 SYS_SCHED_RR_GET_INTERVAL = 161
171 SYS_NANOSLEEP = 162
172 SYS_MREMAP = 163
173 SYS_SETRESUID = 164
174 SYS_GETRESUID = 165
175 SYS_QUERY_MODULE = 166
176 SYS_POLL = 167
177 SYS_NFSSERVCTL = 168
178 SYS_SETRESGID = 169
179 SYS_GETRESGID = 170
180 SYS_PRCTL = 171
181 SYS_RT_SIGRETURN = 172
182 SYS_RT_SIGACTION = 173
183 SYS_RT_SIGPROCMASK = 174
184 SYS_RT_SIGPENDING = 175
185 SYS_RT_SIGTIMEDWAIT = 176
186 SYS_RT_SIGQUEUEINFO = 177
187 SYS_RT_SIGSUSPEND = 178
188 SYS_PREAD64 = 179
189 SYS_PWRITE64 = 180
190 SYS_CHOWN = 181
191 SYS_GETCWD = 182
192 SYS_CAPGET = 183
193 SYS_CAPSET = 184
194 SYS_SIGALTSTACK = 185
195 SYS_SENDFILE = 186
196 SYS_GETPMSG = 187
197 SYS_PUTPMSG = 188
198 SYS_VFORK = 189
199 SYS_UGETRLIMIT = 190
200 SYS_READAHEAD = 191
201 SYS_PCICONFIG_READ = 198
202 SYS_PCICONFIG_WRITE = 199
203 SYS_PCICONFIG_IOBASE = 200
204 SYS_MULTIPLEXER = 201
205 SYS_GETDENTS64 = 202
206 SYS_PIVOT_ROOT = 203
207 SYS_MADVISE = 205
208 SYS_MINCORE = 206
209 SYS_GETTID = 207
210 SYS_TKILL = 208
211 SYS_SETXATTR = 209
212 SYS_LSETXATTR = 210
213 SYS_FSETXATTR = 211
214 SYS_GETXATTR = 212
215 SYS_LGETXATTR = 213
216 SYS_FGETXATTR = 214
217 SYS_LISTXATTR = 215
218 SYS_LLISTXATTR = 216
219 SYS_FLISTXATTR = 217
220 SYS_REMOVEXATTR = 218
221 SYS_LREMOVEXATTR = 219
222 SYS_FREMOVEXATTR = 220
223 SYS_FUTEX = 221
224 SYS_SCHED_SETAFFINITY = 222
225 SYS_SCHED_GETAFFINITY = 223
226 SYS_TUXCALL = 225
227 SYS_IO_SETUP = 227
228 SYS_IO_DESTROY = 228
229 SYS_IO_GETEVENTS = 229
230 SYS_IO_SUBMIT = 230
231 SYS_IO_CANCEL = 231
232 SYS_SET_TID_ADDRESS = 232
233 SYS_FADVISE64 = 233
234 SYS_EXIT_GROUP = 234
235 SYS_LOOKUP_DCOOKIE = 235
236 SYS_EPOLL_CREATE = 236
237 SYS_EPOLL_CTL = 237
238 SYS_EPOLL_WAIT = 238
239 SYS_REMAP_FILE_PAGES = 239
240 SYS_TIMER_CREATE = 240
241 SYS_TIMER_SETTIME = 241
242 SYS_TIMER_GETTIME = 242
243 SYS_TIMER_GETOVERRUN = 243
244 SYS_TIMER_DELETE = 244
245 SYS_CLOCK_SETTIME = 245
246 SYS_CLOCK_GETTIME = 246
247 SYS_CLOCK_GETRES = 247
248 SYS_CLOCK_NANOSLEEP = 248
249 SYS_SWAPCONTEXT = 249
250 SYS_TGKILL = 250
251 SYS_UTIMES = 251
252 SYS_STATFS64 = 252
253 SYS_FSTATFS64 = 253
254 SYS_RTAS = 255
255 SYS_SYS_DEBUG_SETCONTEXT = 256
256 SYS_MIGRATE_PAGES = 258
257 SYS_MBIND = 259
258 SYS_GET_MEMPOLICY = 260
259 SYS_SET_MEMPOLICY = 261
260 SYS_MQ_OPEN = 262
261 SYS_MQ_UNLINK = 263
262 SYS_MQ_TIMEDSEND = 264
263 SYS_MQ_TIMEDRECEIVE = 265
264 SYS_MQ_NOTIFY = 266
265 SYS_MQ_GETSETATTR = 267
266 SYS_KEXEC_LOAD = 268
267 SYS_ADD_KEY = 269
268 SYS_REQUEST_KEY = 270
269 SYS_KEYCTL = 271
270 SYS_WAITID = 272
271 SYS_IOPRIO_SET = 273
272 SYS_IOPRIO_GET = 274
273 SYS_INOTIFY_INIT = 275
274 SYS_INOTIFY_ADD_WATCH = 276
275 SYS_INOTIFY_RM_WATCH = 277
276 SYS_SPU_RUN = 278
277 SYS_SPU_CREATE = 279
278 SYS_PSELECT6 = 280
279 SYS_PPOLL = 281
280 SYS_UNSHARE = 282
281 SYS_SPLICE = 283
282 SYS_TEE = 284
283 SYS_VMSPLICE = 285
284 SYS_OPENAT = 286
285 SYS_MKDIRAT = 287
286 SYS_MKNODAT = 288
287 SYS_FCHOWNAT = 289
288 SYS_FUTIMESAT = 290
289 SYS_NEWFSTATAT = 291
290 SYS_UNLINKAT = 292
291 SYS_RENAMEAT = 293
292 SYS_LINKAT = 294
293 SYS_SYMLINKAT = 295
294 SYS_READLINKAT = 296
295 SYS_FCHMODAT = 297
296 SYS_FACCESSAT = 298
297 SYS_GET_ROBUST_LIST = 299
298 SYS_SET_ROBUST_LIST = 300
299 SYS_MOVE_PAGES = 301
300 SYS_GETCPU = 302
301 SYS_EPOLL_PWAIT = 303
302 SYS_UTIMENSAT = 304
303 SYS_SIGNALFD = 305
304 SYS_TIMERFD_CREATE = 306
305 SYS_EVENTFD = 307
306 SYS_SYNC_FILE_RANGE2 = 308
307 SYS_FALLOCATE = 309
308 SYS_SUBPAGE_PROT = 310
309 SYS_TIMERFD_SETTIME = 311
310 SYS_TIMERFD_GETTIME = 312
311 SYS_SIGNALFD4 = 313
312 SYS_EVENTFD2 = 314
313 SYS_EPOLL_CREATE1 = 315
314 SYS_DUP3 = 316
315 SYS_PIPE2 = 317
316 SYS_INOTIFY_INIT1 = 318
317 SYS_PERF_EVENT_OPEN = 319
318 SYS_PREADV = 320
319 SYS_PWRITEV = 321
320 SYS_RT_TGSIGQUEUEINFO = 322
321 SYS_FANOTIFY_INIT = 323
322 SYS_FANOTIFY_MARK = 324
323 SYS_PRLIMIT64 = 325
324 SYS_SOCKET = 326
325 SYS_BIND = 327
326 SYS_CONNECT = 328
327 SYS_LISTEN = 329
328 SYS_ACCEPT = 330
329 SYS_GETSOCKNAME = 331
330 SYS_GETPEERNAME = 332
331 SYS_SOCKETPAIR = 333
332 SYS_SEND = 334
333 SYS_SENDTO = 335
334 SYS_RECV = 336
335 SYS_RECVFROM = 337
336 SYS_SHUTDOWN = 338
337 SYS_SETSOCKOPT = 339
338 SYS_GETSOCKOPT = 340
339 SYS_SENDMSG = 341
340 SYS_RECVMSG = 342
341 SYS_RECVMMSG = 343
342 SYS_ACCEPT4 = 344
343 SYS_NAME_TO_HANDLE_AT = 345
344 SYS_OPEN_BY_HANDLE_AT = 346
345 SYS_CLOCK_ADJTIME = 347
346 SYS_SYNCFS = 348
347 SYS_SENDMMSG = 349
348 SYS_SETNS = 350
349 SYS_PROCESS_VM_READV = 351
350 SYS_PROCESS_VM_WRITEV = 352
351 SYS_FINIT_MODULE = 353
352 SYS_KCMP = 354
353 SYS_SCHED_SETATTR = 355
354 SYS_SCHED_GETATTR = 356
355 SYS_RENAMEAT2 = 357
356 SYS_SECCOMP = 358
357 SYS_GETRANDOM = 359
358 SYS_MEMFD_CREATE = 360
359 SYS_BPF = 361
360 SYS_EXECVEAT = 362
361 SYS_SWITCH_ENDIAN = 363
362 SYS_USERFAULTFD = 364
363 SYS_MEMBARRIER = 365
364 SYS_MLOCK2 = 378
365 SYS_COPY_FILE_RANGE = 379
366 SYS_PREADV2 = 380
367 SYS_PWRITEV2 = 381
368 SYS_KEXEC_FILE_LOAD = 382
369 SYS_STATX = 383
370 SYS_PKEY_ALLOC = 384
371 SYS_PKEY_FREE = 385
372 SYS_PKEY_MPROTECT = 386
373 SYS_RSEQ = 387
374 SYS_IO_PGETEVENTS = 388
375 SYS_SEMTIMEDOP = 392
376 SYS_SEMGET = 393
377 SYS_SEMCTL = 394
378 SYS_SHMGET = 395
379 SYS_SHMCTL = 396
380 SYS_SHMAT = 397
381 SYS_SHMDT = 398
382 SYS_MSGGET = 399
383 SYS_MSGSND = 400
384 SYS_MSGRCV = 401
385 SYS_MSGCTL = 402
386 SYS_PIDFD_SEND_SIGNAL = 424
387 SYS_IO_URING_SETUP = 425
388 SYS_IO_URING_ENTER = 426
389 SYS_IO_URING_REGISTER = 427
390 SYS_OPEN_TREE = 428
391 SYS_MOVE_MOUNT = 429
392 SYS_FSOPEN = 430
393 SYS_FSCONFIG = 431
394 SYS_FSMOUNT = 432
395 SYS_FSPICK = 433
396 SYS_PIDFD_OPEN = 434
397 SYS_CLONE3 = 435
398 SYS_CLOSE_RANGE = 436
399 SYS_OPENAT2 = 437
400 SYS_PIDFD_GETFD = 438
401 SYS_FACCESSAT2 = 439
402 SYS_PROCESS_MADVISE = 440
403 SYS_EPOLL_PWAIT2 = 441
404 SYS_MOUNT_SETATTR = 442
9 SYS_RESTART_SYSCALL = 0
10 SYS_EXIT = 1
11 SYS_FORK = 2
12 SYS_READ = 3
13 SYS_WRITE = 4
14 SYS_OPEN = 5
15 SYS_CLOSE = 6
16 SYS_WAITPID = 7
17 SYS_CREAT = 8
18 SYS_LINK = 9
19 SYS_UNLINK = 10
20 SYS_EXECVE = 11
21 SYS_CHDIR = 12
22 SYS_TIME = 13
23 SYS_MKNOD = 14
24 SYS_CHMOD = 15
25 SYS_LCHOWN = 16
26 SYS_BREAK = 17
27 SYS_OLDSTAT = 18
28 SYS_LSEEK = 19
29 SYS_GETPID = 20
30 SYS_MOUNT = 21
31 SYS_UMOUNT = 22
32 SYS_SETUID = 23
33 SYS_GETUID = 24
34 SYS_STIME = 25
35 SYS_PTRACE = 26
36 SYS_ALARM = 27
37 SYS_OLDFSTAT = 28
38 SYS_PAUSE = 29
39 SYS_UTIME = 30
40 SYS_STTY = 31
41 SYS_GTTY = 32
42 SYS_ACCESS = 33
43 SYS_NICE = 34
44 SYS_FTIME = 35
45 SYS_SYNC = 36
46 SYS_KILL = 37
47 SYS_RENAME = 38
48 SYS_MKDIR = 39
49 SYS_RMDIR = 40
50 SYS_DUP = 41
51 SYS_PIPE = 42
52 SYS_TIMES = 43
53 SYS_PROF = 44
54 SYS_BRK = 45
55 SYS_SETGID = 46
56 SYS_GETGID = 47
57 SYS_SIGNAL = 48
58 SYS_GETEUID = 49
59 SYS_GETEGID = 50
60 SYS_ACCT = 51
61 SYS_UMOUNT2 = 52
62 SYS_LOCK = 53
63 SYS_IOCTL = 54
64 SYS_FCNTL = 55
65 SYS_MPX = 56
66 SYS_SETPGID = 57
67 SYS_ULIMIT = 58
68 SYS_OLDOLDUNAME = 59
69 SYS_UMASK = 60
70 SYS_CHROOT = 61
71 SYS_USTAT = 62
72 SYS_DUP2 = 63
73 SYS_GETPPID = 64
74 SYS_GETPGRP = 65
75 SYS_SETSID = 66
76 SYS_SIGACTION = 67
77 SYS_SGETMASK = 68
78 SYS_SSETMASK = 69
79 SYS_SETREUID = 70
80 SYS_SETREGID = 71
81 SYS_SIGSUSPEND = 72
82 SYS_SIGPENDING = 73
83 SYS_SETHOSTNAME = 74
84 SYS_SETRLIMIT = 75
85 SYS_GETRLIMIT = 76
86 SYS_GETRUSAGE = 77
87 SYS_GETTIMEOFDAY = 78
88 SYS_SETTIMEOFDAY = 79
89 SYS_GETGROUPS = 80
90 SYS_SETGROUPS = 81
91 SYS_SELECT = 82
92 SYS_SYMLINK = 83
93 SYS_OLDLSTAT = 84
94 SYS_READLINK = 85
95 SYS_USELIB = 86
96 SYS_SWAPON = 87
97 SYS_REBOOT = 88
98 SYS_READDIR = 89
99 SYS_MMAP = 90
100 SYS_MUNMAP = 91
101 SYS_TRUNCATE = 92
102 SYS_FTRUNCATE = 93
103 SYS_FCHMOD = 94
104 SYS_FCHOWN = 95
105 SYS_GETPRIORITY = 96
106 SYS_SETPRIORITY = 97
107 SYS_PROFIL = 98
108 SYS_STATFS = 99
109 SYS_FSTATFS = 100
110 SYS_IOPERM = 101
111 SYS_SOCKETCALL = 102
112 SYS_SYSLOG = 103
113 SYS_SETITIMER = 104
114 SYS_GETITIMER = 105
115 SYS_STAT = 106
116 SYS_LSTAT = 107
117 SYS_FSTAT = 108
118 SYS_OLDUNAME = 109
119 SYS_IOPL = 110
120 SYS_VHANGUP = 111
121 SYS_IDLE = 112
122 SYS_VM86 = 113
123 SYS_WAIT4 = 114
124 SYS_SWAPOFF = 115
125 SYS_SYSINFO = 116
126 SYS_IPC = 117
127 SYS_FSYNC = 118
128 SYS_SIGRETURN = 119
129 SYS_CLONE = 120
130 SYS_SETDOMAINNAME = 121
131 SYS_UNAME = 122
132 SYS_MODIFY_LDT = 123
133 SYS_ADJTIMEX = 124
134 SYS_MPROTECT = 125
135 SYS_SIGPROCMASK = 126
136 SYS_CREATE_MODULE = 127
137 SYS_INIT_MODULE = 128
138 SYS_DELETE_MODULE = 129
139 SYS_GET_KERNEL_SYMS = 130
140 SYS_QUOTACTL = 131
141 SYS_GETPGID = 132
142 SYS_FCHDIR = 133
143 SYS_BDFLUSH = 134
144 SYS_SYSFS = 135
145 SYS_PERSONALITY = 136
146 SYS_AFS_SYSCALL = 137
147 SYS_SETFSUID = 138
148 SYS_SETFSGID = 139
149 SYS__LLSEEK = 140
150 SYS_GETDENTS = 141
151 SYS__NEWSELECT = 142
152 SYS_FLOCK = 143
153 SYS_MSYNC = 144
154 SYS_READV = 145
155 SYS_WRITEV = 146
156 SYS_GETSID = 147
157 SYS_FDATASYNC = 148
158 SYS__SYSCTL = 149
159 SYS_MLOCK = 150
160 SYS_MUNLOCK = 151
161 SYS_MLOCKALL = 152
162 SYS_MUNLOCKALL = 153
163 SYS_SCHED_SETPARAM = 154
164 SYS_SCHED_GETPARAM = 155
165 SYS_SCHED_SETSCHEDULER = 156
166 SYS_SCHED_GETSCHEDULER = 157
167 SYS_SCHED_YIELD = 158
168 SYS_SCHED_GET_PRIORITY_MAX = 159
169 SYS_SCHED_GET_PRIORITY_MIN = 160
170 SYS_SCHED_RR_GET_INTERVAL = 161
171 SYS_NANOSLEEP = 162
172 SYS_MREMAP = 163
173 SYS_SETRESUID = 164
174 SYS_GETRESUID = 165
175 SYS_QUERY_MODULE = 166
176 SYS_POLL = 167
177 SYS_NFSSERVCTL = 168
178 SYS_SETRESGID = 169
179 SYS_GETRESGID = 170
180 SYS_PRCTL = 171
181 SYS_RT_SIGRETURN = 172
182 SYS_RT_SIGACTION = 173
183 SYS_RT_SIGPROCMASK = 174
184 SYS_RT_SIGPENDING = 175
185 SYS_RT_SIGTIMEDWAIT = 176
186 SYS_RT_SIGQUEUEINFO = 177
187 SYS_RT_SIGSUSPEND = 178
188 SYS_PREAD64 = 179
189 SYS_PWRITE64 = 180
190 SYS_CHOWN = 181
191 SYS_GETCWD = 182
192 SYS_CAPGET = 183
193 SYS_CAPSET = 184
194 SYS_SIGALTSTACK = 185
195 SYS_SENDFILE = 186
196 SYS_GETPMSG = 187
197 SYS_PUTPMSG = 188
198 SYS_VFORK = 189
199 SYS_UGETRLIMIT = 190
200 SYS_READAHEAD = 191
201 SYS_PCICONFIG_READ = 198
202 SYS_PCICONFIG_WRITE = 199
203 SYS_PCICONFIG_IOBASE = 200
204 SYS_MULTIPLEXER = 201
205 SYS_GETDENTS64 = 202
206 SYS_PIVOT_ROOT = 203
207 SYS_MADVISE = 205
208 SYS_MINCORE = 206
209 SYS_GETTID = 207
210 SYS_TKILL = 208
211 SYS_SETXATTR = 209
212 SYS_LSETXATTR = 210
213 SYS_FSETXATTR = 211
214 SYS_GETXATTR = 212
215 SYS_LGETXATTR = 213
216 SYS_FGETXATTR = 214
217 SYS_LISTXATTR = 215
218 SYS_LLISTXATTR = 216
219 SYS_FLISTXATTR = 217
220 SYS_REMOVEXATTR = 218
221 SYS_LREMOVEXATTR = 219
222 SYS_FREMOVEXATTR = 220
223 SYS_FUTEX = 221
224 SYS_SCHED_SETAFFINITY = 222
225 SYS_SCHED_GETAFFINITY = 223
226 SYS_TUXCALL = 225
227 SYS_IO_SETUP = 227
228 SYS_IO_DESTROY = 228
229 SYS_IO_GETEVENTS = 229
230 SYS_IO_SUBMIT = 230
231 SYS_IO_CANCEL = 231
232 SYS_SET_TID_ADDRESS = 232
233 SYS_FADVISE64 = 233
234 SYS_EXIT_GROUP = 234
235 SYS_LOOKUP_DCOOKIE = 235
236 SYS_EPOLL_CREATE = 236
237 SYS_EPOLL_CTL = 237
238 SYS_EPOLL_WAIT = 238
239 SYS_REMAP_FILE_PAGES = 239
240 SYS_TIMER_CREATE = 240
241 SYS_TIMER_SETTIME = 241
242 SYS_TIMER_GETTIME = 242
243 SYS_TIMER_GETOVERRUN = 243
244 SYS_TIMER_DELETE = 244
245 SYS_CLOCK_SETTIME = 245
246 SYS_CLOCK_GETTIME = 246
247 SYS_CLOCK_GETRES = 247
248 SYS_CLOCK_NANOSLEEP = 248
249 SYS_SWAPCONTEXT = 249
250 SYS_TGKILL = 250
251 SYS_UTIMES = 251
252 SYS_STATFS64 = 252
253 SYS_FSTATFS64 = 253
254 SYS_RTAS = 255
255 SYS_SYS_DEBUG_SETCONTEXT = 256
256 SYS_MIGRATE_PAGES = 258
257 SYS_MBIND = 259
258 SYS_GET_MEMPOLICY = 260
259 SYS_SET_MEMPOLICY = 261
260 SYS_MQ_OPEN = 262
261 SYS_MQ_UNLINK = 263
262 SYS_MQ_TIMEDSEND = 264
263 SYS_MQ_TIMEDRECEIVE = 265
264 SYS_MQ_NOTIFY = 266
265 SYS_MQ_GETSETATTR = 267
266 SYS_KEXEC_LOAD = 268
267 SYS_ADD_KEY = 269
268 SYS_REQUEST_KEY = 270
269 SYS_KEYCTL = 271
270 SYS_WAITID = 272
271 SYS_IOPRIO_SET = 273
272 SYS_IOPRIO_GET = 274
273 SYS_INOTIFY_INIT = 275
274 SYS_INOTIFY_ADD_WATCH = 276
275 SYS_INOTIFY_RM_WATCH = 277
276 SYS_SPU_RUN = 278
277 SYS_SPU_CREATE = 279
278 SYS_PSELECT6 = 280
279 SYS_PPOLL = 281
280 SYS_UNSHARE = 282
281 SYS_SPLICE = 283
282 SYS_TEE = 284
283 SYS_VMSPLICE = 285
284 SYS_OPENAT = 286
285 SYS_MKDIRAT = 287
286 SYS_MKNODAT = 288
287 SYS_FCHOWNAT = 289
288 SYS_FUTIMESAT = 290
289 SYS_NEWFSTATAT = 291
290 SYS_UNLINKAT = 292
291 SYS_RENAMEAT = 293
292 SYS_LINKAT = 294
293 SYS_SYMLINKAT = 295
294 SYS_READLINKAT = 296
295 SYS_FCHMODAT = 297
296 SYS_FACCESSAT = 298
297 SYS_GET_ROBUST_LIST = 299
298 SYS_SET_ROBUST_LIST = 300
299 SYS_MOVE_PAGES = 301
300 SYS_GETCPU = 302
301 SYS_EPOLL_PWAIT = 303
302 SYS_UTIMENSAT = 304
303 SYS_SIGNALFD = 305
304 SYS_TIMERFD_CREATE = 306
305 SYS_EVENTFD = 307
306 SYS_SYNC_FILE_RANGE2 = 308
307 SYS_FALLOCATE = 309
308 SYS_SUBPAGE_PROT = 310
309 SYS_TIMERFD_SETTIME = 311
310 SYS_TIMERFD_GETTIME = 312
311 SYS_SIGNALFD4 = 313
312 SYS_EVENTFD2 = 314
313 SYS_EPOLL_CREATE1 = 315
314 SYS_DUP3 = 316
315 SYS_PIPE2 = 317
316 SYS_INOTIFY_INIT1 = 318
317 SYS_PERF_EVENT_OPEN = 319
318 SYS_PREADV = 320
319 SYS_PWRITEV = 321
320 SYS_RT_TGSIGQUEUEINFO = 322
321 SYS_FANOTIFY_INIT = 323
322 SYS_FANOTIFY_MARK = 324
323 SYS_PRLIMIT64 = 325
324 SYS_SOCKET = 326
325 SYS_BIND = 327
326 SYS_CONNECT = 328
327 SYS_LISTEN = 329
328 SYS_ACCEPT = 330
329 SYS_GETSOCKNAME = 331
330 SYS_GETPEERNAME = 332
331 SYS_SOCKETPAIR = 333
332 SYS_SEND = 334
333 SYS_SENDTO = 335
334 SYS_RECV = 336
335 SYS_RECVFROM = 337
336 SYS_SHUTDOWN = 338
337 SYS_SETSOCKOPT = 339
338 SYS_GETSOCKOPT = 340
339 SYS_SENDMSG = 341
340 SYS_RECVMSG = 342
341 SYS_RECVMMSG = 343
342 SYS_ACCEPT4 = 344
343 SYS_NAME_TO_HANDLE_AT = 345
344 SYS_OPEN_BY_HANDLE_AT = 346
345 SYS_CLOCK_ADJTIME = 347
346 SYS_SYNCFS = 348
347 SYS_SENDMMSG = 349
348 SYS_SETNS = 350
349 SYS_PROCESS_VM_READV = 351
350 SYS_PROCESS_VM_WRITEV = 352
351 SYS_FINIT_MODULE = 353
352 SYS_KCMP = 354
353 SYS_SCHED_SETATTR = 355
354 SYS_SCHED_GETATTR = 356
355 SYS_RENAMEAT2 = 357
356 SYS_SECCOMP = 358
357 SYS_GETRANDOM = 359
358 SYS_MEMFD_CREATE = 360
359 SYS_BPF = 361
360 SYS_EXECVEAT = 362
361 SYS_SWITCH_ENDIAN = 363
362 SYS_USERFAULTFD = 364
363 SYS_MEMBARRIER = 365
364 SYS_MLOCK2 = 378
365 SYS_COPY_FILE_RANGE = 379
366 SYS_PREADV2 = 380
367 SYS_PWRITEV2 = 381
368 SYS_KEXEC_FILE_LOAD = 382
369 SYS_STATX = 383
370 SYS_PKEY_ALLOC = 384
371 SYS_PKEY_FREE = 385
372 SYS_PKEY_MPROTECT = 386
373 SYS_RSEQ = 387
374 SYS_IO_PGETEVENTS = 388
375 SYS_SEMTIMEDOP = 392
376 SYS_SEMGET = 393
377 SYS_SEMCTL = 394
378 SYS_SHMGET = 395
379 SYS_SHMCTL = 396
380 SYS_SHMAT = 397
381 SYS_SHMDT = 398
382 SYS_MSGGET = 399
383 SYS_MSGSND = 400
384 SYS_MSGRCV = 401
385 SYS_MSGCTL = 402
386 SYS_PIDFD_SEND_SIGNAL = 424
387 SYS_IO_URING_SETUP = 425
388 SYS_IO_URING_ENTER = 426
389 SYS_IO_URING_REGISTER = 427
390 SYS_OPEN_TREE = 428
391 SYS_MOVE_MOUNT = 429
392 SYS_FSOPEN = 430
393 SYS_FSCONFIG = 431
394 SYS_FSMOUNT = 432
395 SYS_FSPICK = 433
396 SYS_PIDFD_OPEN = 434
397 SYS_CLONE3 = 435
398 SYS_CLOSE_RANGE = 436
399 SYS_OPENAT2 = 437
400 SYS_PIDFD_GETFD = 438
401 SYS_FACCESSAT2 = 439
402 SYS_PROCESS_MADVISE = 440
403 SYS_EPOLL_PWAIT2 = 441
404 SYS_MOUNT_SETATTR = 442
405 SYS_QUOTACTL_FD = 443
406 SYS_LANDLOCK_CREATE_RULESET = 444
407 SYS_LANDLOCK_ADD_RULE = 445
408 SYS_LANDLOCK_RESTRICT_SELF = 446
409 SYS_PROCESS_MRELEASE = 448
405410 )
66 package unix
77
88 const (
9 SYS_IO_SETUP = 0
10 SYS_IO_DESTROY = 1
11 SYS_IO_SUBMIT = 2
12 SYS_IO_CANCEL = 3
13 SYS_IO_GETEVENTS = 4
14 SYS_SETXATTR = 5
15 SYS_LSETXATTR = 6
16 SYS_FSETXATTR = 7
17 SYS_GETXATTR = 8
18 SYS_LGETXATTR = 9
19 SYS_FGETXATTR = 10
20 SYS_LISTXATTR = 11
21 SYS_LLISTXATTR = 12
22 SYS_FLISTXATTR = 13
23 SYS_REMOVEXATTR = 14
24 SYS_LREMOVEXATTR = 15
25 SYS_FREMOVEXATTR = 16
26 SYS_GETCWD = 17
27 SYS_LOOKUP_DCOOKIE = 18
28 SYS_EVENTFD2 = 19
29 SYS_EPOLL_CREATE1 = 20
30 SYS_EPOLL_CTL = 21
31 SYS_EPOLL_PWAIT = 22
32 SYS_DUP = 23
33 SYS_DUP3 = 24
34 SYS_FCNTL = 25
35 SYS_INOTIFY_INIT1 = 26
36 SYS_INOTIFY_ADD_WATCH = 27
37 SYS_INOTIFY_RM_WATCH = 28
38 SYS_IOCTL = 29
39 SYS_IOPRIO_SET = 30
40 SYS_IOPRIO_GET = 31
41 SYS_FLOCK = 32
42 SYS_MKNODAT = 33
43 SYS_MKDIRAT = 34
44 SYS_UNLINKAT = 35
45 SYS_SYMLINKAT = 36
46 SYS_LINKAT = 37
47 SYS_UMOUNT2 = 39
48 SYS_MOUNT = 40
49 SYS_PIVOT_ROOT = 41
50 SYS_NFSSERVCTL = 42
51 SYS_STATFS = 43
52 SYS_FSTATFS = 44
53 SYS_TRUNCATE = 45
54 SYS_FTRUNCATE = 46
55 SYS_FALLOCATE = 47
56 SYS_FACCESSAT = 48
57 SYS_CHDIR = 49
58 SYS_FCHDIR = 50
59 SYS_CHROOT = 51
60 SYS_FCHMOD = 52
61 SYS_FCHMODAT = 53
62 SYS_FCHOWNAT = 54
63 SYS_FCHOWN = 55
64 SYS_OPENAT = 56
65 SYS_CLOSE = 57
66 SYS_VHANGUP = 58
67 SYS_PIPE2 = 59
68 SYS_QUOTACTL = 60
69 SYS_GETDENTS64 = 61
70 SYS_LSEEK = 62
71 SYS_READ = 63
72 SYS_WRITE = 64
73 SYS_READV = 65
74 SYS_WRITEV = 66
75 SYS_PREAD64 = 67
76 SYS_PWRITE64 = 68
77 SYS_PREADV = 69
78 SYS_PWRITEV = 70
79 SYS_SENDFILE = 71
80 SYS_PSELECT6 = 72
81 SYS_PPOLL = 73
82 SYS_SIGNALFD4 = 74
83 SYS_VMSPLICE = 75
84 SYS_SPLICE = 76
85 SYS_TEE = 77
86 SYS_READLINKAT = 78
87 SYS_FSTATAT = 79
88 SYS_FSTAT = 80
89 SYS_SYNC = 81
90 SYS_FSYNC = 82
91 SYS_FDATASYNC = 83
92 SYS_SYNC_FILE_RANGE = 84
93 SYS_TIMERFD_CREATE = 85
94 SYS_TIMERFD_SETTIME = 86
95 SYS_TIMERFD_GETTIME = 87
96 SYS_UTIMENSAT = 88
97 SYS_ACCT = 89
98 SYS_CAPGET = 90
99 SYS_CAPSET = 91
100 SYS_PERSONALITY = 92
101 SYS_EXIT = 93
102 SYS_EXIT_GROUP = 94
103 SYS_WAITID = 95
104 SYS_SET_TID_ADDRESS = 96
105 SYS_UNSHARE = 97
106 SYS_FUTEX = 98
107 SYS_SET_ROBUST_LIST = 99
108 SYS_GET_ROBUST_LIST = 100
109 SYS_NANOSLEEP = 101
110 SYS_GETITIMER = 102
111 SYS_SETITIMER = 103
112 SYS_KEXEC_LOAD = 104
113 SYS_INIT_MODULE = 105
114 SYS_DELETE_MODULE = 106
115 SYS_TIMER_CREATE = 107
116 SYS_TIMER_GETTIME = 108
117 SYS_TIMER_GETOVERRUN = 109
118 SYS_TIMER_SETTIME = 110
119 SYS_TIMER_DELETE = 111
120 SYS_CLOCK_SETTIME = 112
121 SYS_CLOCK_GETTIME = 113
122 SYS_CLOCK_GETRES = 114
123 SYS_CLOCK_NANOSLEEP = 115
124 SYS_SYSLOG = 116
125 SYS_PTRACE = 117
126 SYS_SCHED_SETPARAM = 118
127 SYS_SCHED_SETSCHEDULER = 119
128 SYS_SCHED_GETSCHEDULER = 120
129 SYS_SCHED_GETPARAM = 121
130 SYS_SCHED_SETAFFINITY = 122
131 SYS_SCHED_GETAFFINITY = 123
132 SYS_SCHED_YIELD = 124
133 SYS_SCHED_GET_PRIORITY_MAX = 125
134 SYS_SCHED_GET_PRIORITY_MIN = 126
135 SYS_SCHED_RR_GET_INTERVAL = 127
136 SYS_RESTART_SYSCALL = 128
137 SYS_KILL = 129
138 SYS_TKILL = 130
139 SYS_TGKILL = 131
140 SYS_SIGALTSTACK = 132
141 SYS_RT_SIGSUSPEND = 133
142 SYS_RT_SIGACTION = 134
143 SYS_RT_SIGPROCMASK = 135
144 SYS_RT_SIGPENDING = 136
145 SYS_RT_SIGTIMEDWAIT = 137
146 SYS_RT_SIGQUEUEINFO = 138
147 SYS_RT_SIGRETURN = 139
148 SYS_SETPRIORITY = 140
149 SYS_GETPRIORITY = 141
150 SYS_REBOOT = 142
151 SYS_SETREGID = 143
152 SYS_SETGID = 144
153 SYS_SETREUID = 145
154 SYS_SETUID = 146
155 SYS_SETRESUID = 147
156 SYS_GETRESUID = 148
157 SYS_SETRESGID = 149
158 SYS_GETRESGID = 150
159 SYS_SETFSUID = 151
160 SYS_SETFSGID = 152
161 SYS_TIMES = 153
162 SYS_SETPGID = 154
163 SYS_GETPGID = 155
164 SYS_GETSID = 156
165 SYS_SETSID = 157
166 SYS_GETGROUPS = 158
167 SYS_SETGROUPS = 159
168 SYS_UNAME = 160
169 SYS_SETHOSTNAME = 161
170 SYS_SETDOMAINNAME = 162
171 SYS_GETRLIMIT = 163
172 SYS_SETRLIMIT = 164
173 SYS_GETRUSAGE = 165
174 SYS_UMASK = 166
175 SYS_PRCTL = 167
176 SYS_GETCPU = 168
177 SYS_GETTIMEOFDAY = 169
178 SYS_SETTIMEOFDAY = 170
179 SYS_ADJTIMEX = 171
180 SYS_GETPID = 172
181 SYS_GETPPID = 173
182 SYS_GETUID = 174
183 SYS_GETEUID = 175
184 SYS_GETGID = 176
185 SYS_GETEGID = 177
186 SYS_GETTID = 178
187 SYS_SYSINFO = 179
188 SYS_MQ_OPEN = 180
189 SYS_MQ_UNLINK = 181
190 SYS_MQ_TIMEDSEND = 182
191 SYS_MQ_TIMEDRECEIVE = 183
192 SYS_MQ_NOTIFY = 184
193 SYS_MQ_GETSETATTR = 185
194 SYS_MSGGET = 186
195 SYS_MSGCTL = 187
196 SYS_MSGRCV = 188
197 SYS_MSGSND = 189
198 SYS_SEMGET = 190
199 SYS_SEMCTL = 191
200 SYS_SEMTIMEDOP = 192
201 SYS_SEMOP = 193
202 SYS_SHMGET = 194
203 SYS_SHMCTL = 195
204 SYS_SHMAT = 196
205 SYS_SHMDT = 197
206 SYS_SOCKET = 198
207 SYS_SOCKETPAIR = 199
208 SYS_BIND = 200
209 SYS_LISTEN = 201
210 SYS_ACCEPT = 202
211 SYS_CONNECT = 203
212 SYS_GETSOCKNAME = 204
213 SYS_GETPEERNAME = 205
214 SYS_SENDTO = 206
215 SYS_RECVFROM = 207
216 SYS_SETSOCKOPT = 208
217 SYS_GETSOCKOPT = 209
218 SYS_SHUTDOWN = 210
219 SYS_SENDMSG = 211
220 SYS_RECVMSG = 212
221 SYS_READAHEAD = 213
222 SYS_BRK = 214
223 SYS_MUNMAP = 215
224 SYS_MREMAP = 216
225 SYS_ADD_KEY = 217
226 SYS_REQUEST_KEY = 218
227 SYS_KEYCTL = 219
228 SYS_CLONE = 220
229 SYS_EXECVE = 221
230 SYS_MMAP = 222
231 SYS_FADVISE64 = 223
232 SYS_SWAPON = 224
233 SYS_SWAPOFF = 225
234 SYS_MPROTECT = 226
235 SYS_MSYNC = 227
236 SYS_MLOCK = 228
237 SYS_MUNLOCK = 229
238 SYS_MLOCKALL = 230
239 SYS_MUNLOCKALL = 231
240 SYS_MINCORE = 232
241 SYS_MADVISE = 233
242 SYS_REMAP_FILE_PAGES = 234
243 SYS_MBIND = 235
244 SYS_GET_MEMPOLICY = 236
245 SYS_SET_MEMPOLICY = 237
246 SYS_MIGRATE_PAGES = 238
247 SYS_MOVE_PAGES = 239
248 SYS_RT_TGSIGQUEUEINFO = 240
249 SYS_PERF_EVENT_OPEN = 241
250 SYS_ACCEPT4 = 242
251 SYS_RECVMMSG = 243
252 SYS_ARCH_SPECIFIC_SYSCALL = 244
253 SYS_WAIT4 = 260
254 SYS_PRLIMIT64 = 261
255 SYS_FANOTIFY_INIT = 262
256 SYS_FANOTIFY_MARK = 263
257 SYS_NAME_TO_HANDLE_AT = 264
258 SYS_OPEN_BY_HANDLE_AT = 265
259 SYS_CLOCK_ADJTIME = 266
260 SYS_SYNCFS = 267
261 SYS_SETNS = 268
262 SYS_SENDMMSG = 269
263 SYS_PROCESS_VM_READV = 270
264 SYS_PROCESS_VM_WRITEV = 271
265 SYS_KCMP = 272
266 SYS_FINIT_MODULE = 273
267 SYS_SCHED_SETATTR = 274
268 SYS_SCHED_GETATTR = 275
269 SYS_RENAMEAT2 = 276
270 SYS_SECCOMP = 277
271 SYS_GETRANDOM = 278
272 SYS_MEMFD_CREATE = 279
273 SYS_BPF = 280
274 SYS_EXECVEAT = 281
275 SYS_USERFAULTFD = 282
276 SYS_MEMBARRIER = 283
277 SYS_MLOCK2 = 284
278 SYS_COPY_FILE_RANGE = 285
279 SYS_PREADV2 = 286
280 SYS_PWRITEV2 = 287
281 SYS_PKEY_MPROTECT = 288
282 SYS_PKEY_ALLOC = 289
283 SYS_PKEY_FREE = 290
284 SYS_STATX = 291
285 SYS_IO_PGETEVENTS = 292
286 SYS_RSEQ = 293
287 SYS_KEXEC_FILE_LOAD = 294
288 SYS_PIDFD_SEND_SIGNAL = 424
289 SYS_IO_URING_SETUP = 425
290 SYS_IO_URING_ENTER = 426
291 SYS_IO_URING_REGISTER = 427
292 SYS_OPEN_TREE = 428
293 SYS_MOVE_MOUNT = 429
294 SYS_FSOPEN = 430
295 SYS_FSCONFIG = 431
296 SYS_FSMOUNT = 432
297 SYS_FSPICK = 433
298 SYS_PIDFD_OPEN = 434
299 SYS_CLONE3 = 435
300 SYS_CLOSE_RANGE = 436
301 SYS_OPENAT2 = 437
302 SYS_PIDFD_GETFD = 438
303 SYS_FACCESSAT2 = 439
304 SYS_PROCESS_MADVISE = 440
305 SYS_EPOLL_PWAIT2 = 441
306 SYS_MOUNT_SETATTR = 442
9 SYS_IO_SETUP = 0
10 SYS_IO_DESTROY = 1
11 SYS_IO_SUBMIT = 2
12 SYS_IO_CANCEL = 3
13 SYS_IO_GETEVENTS = 4
14 SYS_SETXATTR = 5
15 SYS_LSETXATTR = 6
16 SYS_FSETXATTR = 7
17 SYS_GETXATTR = 8
18 SYS_LGETXATTR = 9
19 SYS_FGETXATTR = 10
20 SYS_LISTXATTR = 11
21 SYS_LLISTXATTR = 12
22 SYS_FLISTXATTR = 13
23 SYS_REMOVEXATTR = 14
24 SYS_LREMOVEXATTR = 15
25 SYS_FREMOVEXATTR = 16
26 SYS_GETCWD = 17
27 SYS_LOOKUP_DCOOKIE = 18
28 SYS_EVENTFD2 = 19
29 SYS_EPOLL_CREATE1 = 20
30 SYS_EPOLL_CTL = 21
31 SYS_EPOLL_PWAIT = 22
32 SYS_DUP = 23
33 SYS_DUP3 = 24
34 SYS_FCNTL = 25
35 SYS_INOTIFY_INIT1 = 26
36 SYS_INOTIFY_ADD_WATCH = 27
37 SYS_INOTIFY_RM_WATCH = 28
38 SYS_IOCTL = 29
39 SYS_IOPRIO_SET = 30
40 SYS_IOPRIO_GET = 31
41 SYS_FLOCK = 32
42 SYS_MKNODAT = 33
43 SYS_MKDIRAT = 34
44 SYS_UNLINKAT = 35
45 SYS_SYMLINKAT = 36
46 SYS_LINKAT = 37
47 SYS_UMOUNT2 = 39
48 SYS_MOUNT = 40
49 SYS_PIVOT_ROOT = 41
50 SYS_NFSSERVCTL = 42
51 SYS_STATFS = 43
52 SYS_FSTATFS = 44
53 SYS_TRUNCATE = 45
54 SYS_FTRUNCATE = 46
55 SYS_FALLOCATE = 47
56 SYS_FACCESSAT = 48
57 SYS_CHDIR = 49
58 SYS_FCHDIR = 50
59 SYS_CHROOT = 51
60 SYS_FCHMOD = 52
61 SYS_FCHMODAT = 53
62 SYS_FCHOWNAT = 54
63 SYS_FCHOWN = 55
64 SYS_OPENAT = 56
65 SYS_CLOSE = 57
66 SYS_VHANGUP = 58
67 SYS_PIPE2 = 59
68 SYS_QUOTACTL = 60
69 SYS_GETDENTS64 = 61
70 SYS_LSEEK = 62
71 SYS_READ = 63
72 SYS_WRITE = 64
73 SYS_READV = 65
74 SYS_WRITEV = 66
75 SYS_PREAD64 = 67
76 SYS_PWRITE64 = 68
77 SYS_PREADV = 69
78 SYS_PWRITEV = 70
79 SYS_SENDFILE = 71
80 SYS_PSELECT6 = 72
81 SYS_PPOLL = 73
82 SYS_SIGNALFD4 = 74
83 SYS_VMSPLICE = 75
84 SYS_SPLICE = 76
85 SYS_TEE = 77
86 SYS_READLINKAT = 78
87 SYS_FSTATAT = 79
88 SYS_FSTAT = 80
89 SYS_SYNC = 81
90 SYS_FSYNC = 82
91 SYS_FDATASYNC = 83
92 SYS_SYNC_FILE_RANGE = 84
93 SYS_TIMERFD_CREATE = 85
94 SYS_TIMERFD_SETTIME = 86
95 SYS_TIMERFD_GETTIME = 87
96 SYS_UTIMENSAT = 88
97 SYS_ACCT = 89
98 SYS_CAPGET = 90
99 SYS_CAPSET = 91
100 SYS_PERSONALITY = 92
101 SYS_EXIT = 93
102 SYS_EXIT_GROUP = 94
103 SYS_WAITID = 95
104 SYS_SET_TID_ADDRESS = 96
105 SYS_UNSHARE = 97
106 SYS_FUTEX = 98
107 SYS_SET_ROBUST_LIST = 99
108 SYS_GET_ROBUST_LIST = 100
109 SYS_NANOSLEEP = 101
110 SYS_GETITIMER = 102
111 SYS_SETITIMER = 103
112 SYS_KEXEC_LOAD = 104
113 SYS_INIT_MODULE = 105
114 SYS_DELETE_MODULE = 106
115 SYS_TIMER_CREATE = 107
116 SYS_TIMER_GETTIME = 108
117 SYS_TIMER_GETOVERRUN = 109
118 SYS_TIMER_SETTIME = 110
119 SYS_TIMER_DELETE = 111
120 SYS_CLOCK_SETTIME = 112
121 SYS_CLOCK_GETTIME = 113
122 SYS_CLOCK_GETRES = 114
123 SYS_CLOCK_NANOSLEEP = 115
124 SYS_SYSLOG = 116
125 SYS_PTRACE = 117
126 SYS_SCHED_SETPARAM = 118
127 SYS_SCHED_SETSCHEDULER = 119
128 SYS_SCHED_GETSCHEDULER = 120
129 SYS_SCHED_GETPARAM = 121
130 SYS_SCHED_SETAFFINITY = 122
131 SYS_SCHED_GETAFFINITY = 123
132 SYS_SCHED_YIELD = 124
133 SYS_SCHED_GET_PRIORITY_MAX = 125
134 SYS_SCHED_GET_PRIORITY_MIN = 126
135 SYS_SCHED_RR_GET_INTERVAL = 127
136 SYS_RESTART_SYSCALL = 128
137 SYS_KILL = 129
138 SYS_TKILL = 130
139 SYS_TGKILL = 131
140 SYS_SIGALTSTACK = 132
141 SYS_RT_SIGSUSPEND = 133
142 SYS_RT_SIGACTION = 134
143 SYS_RT_SIGPROCMASK = 135
144 SYS_RT_SIGPENDING = 136
145 SYS_RT_SIGTIMEDWAIT = 137
146 SYS_RT_SIGQUEUEINFO = 138
147 SYS_RT_SIGRETURN = 139
148 SYS_SETPRIORITY = 140
149 SYS_GETPRIORITY = 141
150 SYS_REBOOT = 142
151 SYS_SETREGID = 143
152 SYS_SETGID = 144
153 SYS_SETREUID = 145
154 SYS_SETUID = 146
155 SYS_SETRESUID = 147
156 SYS_GETRESUID = 148
157 SYS_SETRESGID = 149
158 SYS_GETRESGID = 150
159 SYS_SETFSUID = 151
160 SYS_SETFSGID = 152
161 SYS_TIMES = 153
162 SYS_SETPGID = 154
163 SYS_GETPGID = 155
164 SYS_GETSID = 156
165 SYS_SETSID = 157
166 SYS_GETGROUPS = 158
167 SYS_SETGROUPS = 159
168 SYS_UNAME = 160
169 SYS_SETHOSTNAME = 161
170 SYS_SETDOMAINNAME = 162
171 SYS_GETRLIMIT = 163
172 SYS_SETRLIMIT = 164
173 SYS_GETRUSAGE = 165
174 SYS_UMASK = 166
175 SYS_PRCTL = 167
176 SYS_GETCPU = 168
177 SYS_GETTIMEOFDAY = 169
178 SYS_SETTIMEOFDAY = 170
179 SYS_ADJTIMEX = 171
180 SYS_GETPID = 172
181 SYS_GETPPID = 173
182 SYS_GETUID = 174
183 SYS_GETEUID = 175
184 SYS_GETGID = 176
185 SYS_GETEGID = 177
186 SYS_GETTID = 178
187 SYS_SYSINFO = 179
188 SYS_MQ_OPEN = 180
189 SYS_MQ_UNLINK = 181
190 SYS_MQ_TIMEDSEND = 182
191 SYS_MQ_TIMEDRECEIVE = 183
192 SYS_MQ_NOTIFY = 184
193 SYS_MQ_GETSETATTR = 185
194 SYS_MSGGET = 186
195 SYS_MSGCTL = 187
196 SYS_MSGRCV = 188
197 SYS_MSGSND = 189
198 SYS_SEMGET = 190
199 SYS_SEMCTL = 191
200 SYS_SEMTIMEDOP = 192
201 SYS_SEMOP = 193
202 SYS_SHMGET = 194
203 SYS_SHMCTL = 195
204 SYS_SHMAT = 196
205 SYS_SHMDT = 197
206 SYS_SOCKET = 198
207 SYS_SOCKETPAIR = 199
208 SYS_BIND = 200
209 SYS_LISTEN = 201
210 SYS_ACCEPT = 202
211 SYS_CONNECT = 203
212 SYS_GETSOCKNAME = 204
213 SYS_GETPEERNAME = 205
214 SYS_SENDTO = 206
215 SYS_RECVFROM = 207
216 SYS_SETSOCKOPT = 208
217 SYS_GETSOCKOPT = 209
218 SYS_SHUTDOWN = 210
219 SYS_SENDMSG = 211
220 SYS_RECVMSG = 212
221 SYS_READAHEAD = 213
222 SYS_BRK = 214
223 SYS_MUNMAP = 215
224 SYS_MREMAP = 216
225 SYS_ADD_KEY = 217
226 SYS_REQUEST_KEY = 218
227 SYS_KEYCTL = 219
228 SYS_CLONE = 220
229 SYS_EXECVE = 221
230 SYS_MMAP = 222
231 SYS_FADVISE64 = 223
232 SYS_SWAPON = 224
233 SYS_SWAPOFF = 225
234 SYS_MPROTECT = 226
235 SYS_MSYNC = 227
236 SYS_MLOCK = 228
237 SYS_MUNLOCK = 229
238 SYS_MLOCKALL = 230
239 SYS_MUNLOCKALL = 231
240 SYS_MINCORE = 232
241 SYS_MADVISE = 233
242 SYS_REMAP_FILE_PAGES = 234
243 SYS_MBIND = 235
244 SYS_GET_MEMPOLICY = 236
245 SYS_SET_MEMPOLICY = 237
246 SYS_MIGRATE_PAGES = 238
247 SYS_MOVE_PAGES = 239
248 SYS_RT_TGSIGQUEUEINFO = 240
249 SYS_PERF_EVENT_OPEN = 241
250 SYS_ACCEPT4 = 242
251 SYS_RECVMMSG = 243
252 SYS_ARCH_SPECIFIC_SYSCALL = 244
253 SYS_WAIT4 = 260
254 SYS_PRLIMIT64 = 261
255 SYS_FANOTIFY_INIT = 262
256 SYS_FANOTIFY_MARK = 263
257 SYS_NAME_TO_HANDLE_AT = 264
258 SYS_OPEN_BY_HANDLE_AT = 265
259 SYS_CLOCK_ADJTIME = 266
260 SYS_SYNCFS = 267
261 SYS_SETNS = 268
262 SYS_SENDMMSG = 269
263 SYS_PROCESS_VM_READV = 270
264 SYS_PROCESS_VM_WRITEV = 271
265 SYS_KCMP = 272
266 SYS_FINIT_MODULE = 273
267 SYS_SCHED_SETATTR = 274
268 SYS_SCHED_GETATTR = 275
269 SYS_RENAMEAT2 = 276
270 SYS_SECCOMP = 277
271 SYS_GETRANDOM = 278
272 SYS_MEMFD_CREATE = 279
273 SYS_BPF = 280
274 SYS_EXECVEAT = 281
275 SYS_USERFAULTFD = 282
276 SYS_MEMBARRIER = 283
277 SYS_MLOCK2 = 284
278 SYS_COPY_FILE_RANGE = 285
279 SYS_PREADV2 = 286
280 SYS_PWRITEV2 = 287
281 SYS_PKEY_MPROTECT = 288
282 SYS_PKEY_ALLOC = 289
283 SYS_PKEY_FREE = 290
284 SYS_STATX = 291
285 SYS_IO_PGETEVENTS = 292
286 SYS_RSEQ = 293
287 SYS_KEXEC_FILE_LOAD = 294
288 SYS_PIDFD_SEND_SIGNAL = 424
289 SYS_IO_URING_SETUP = 425
290 SYS_IO_URING_ENTER = 426
291 SYS_IO_URING_REGISTER = 427
292 SYS_OPEN_TREE = 428
293 SYS_MOVE_MOUNT = 429
294 SYS_FSOPEN = 430
295 SYS_FSCONFIG = 431
296 SYS_FSMOUNT = 432
297 SYS_FSPICK = 433
298 SYS_PIDFD_OPEN = 434
299 SYS_CLONE3 = 435
300 SYS_CLOSE_RANGE = 436
301 SYS_OPENAT2 = 437
302 SYS_PIDFD_GETFD = 438
303 SYS_FACCESSAT2 = 439
304 SYS_PROCESS_MADVISE = 440
305 SYS_EPOLL_PWAIT2 = 441
306 SYS_MOUNT_SETATTR = 442
307 SYS_QUOTACTL_FD = 443
308 SYS_LANDLOCK_CREATE_RULESET = 444
309 SYS_LANDLOCK_ADD_RULE = 445
310 SYS_LANDLOCK_RESTRICT_SELF = 446
311 SYS_PROCESS_MRELEASE = 448
307312 )
66 package unix
77
88 const (
9 SYS_EXIT = 1
10 SYS_FORK = 2
11 SYS_READ = 3
12 SYS_WRITE = 4
13 SYS_OPEN = 5
14 SYS_CLOSE = 6
15 SYS_RESTART_SYSCALL = 7
16 SYS_CREAT = 8
17 SYS_LINK = 9
18 SYS_UNLINK = 10
19 SYS_EXECVE = 11
20 SYS_CHDIR = 12
21 SYS_MKNOD = 14
22 SYS_CHMOD = 15
23 SYS_LSEEK = 19
24 SYS_GETPID = 20
25 SYS_MOUNT = 21
26 SYS_UMOUNT = 22
27 SYS_PTRACE = 26
28 SYS_ALARM = 27
29 SYS_PAUSE = 29
30 SYS_UTIME = 30
31 SYS_ACCESS = 33
32 SYS_NICE = 34
33 SYS_SYNC = 36
34 SYS_KILL = 37
35 SYS_RENAME = 38
36 SYS_MKDIR = 39
37 SYS_RMDIR = 40
38 SYS_DUP = 41
39 SYS_PIPE = 42
40 SYS_TIMES = 43
41 SYS_BRK = 45
42 SYS_SIGNAL = 48
43 SYS_ACCT = 51
44 SYS_UMOUNT2 = 52
45 SYS_IOCTL = 54
46 SYS_FCNTL = 55
47 SYS_SETPGID = 57
48 SYS_UMASK = 60
49 SYS_CHROOT = 61
50 SYS_USTAT = 62
51 SYS_DUP2 = 63
52 SYS_GETPPID = 64
53 SYS_GETPGRP = 65
54 SYS_SETSID = 66
55 SYS_SIGACTION = 67
56 SYS_SIGSUSPEND = 72
57 SYS_SIGPENDING = 73
58 SYS_SETHOSTNAME = 74
59 SYS_SETRLIMIT = 75
60 SYS_GETRUSAGE = 77
61 SYS_GETTIMEOFDAY = 78
62 SYS_SETTIMEOFDAY = 79
63 SYS_SYMLINK = 83
64 SYS_READLINK = 85
65 SYS_USELIB = 86
66 SYS_SWAPON = 87
67 SYS_REBOOT = 88
68 SYS_READDIR = 89
69 SYS_MMAP = 90
70 SYS_MUNMAP = 91
71 SYS_TRUNCATE = 92
72 SYS_FTRUNCATE = 93
73 SYS_FCHMOD = 94
74 SYS_GETPRIORITY = 96
75 SYS_SETPRIORITY = 97
76 SYS_STATFS = 99
77 SYS_FSTATFS = 100
78 SYS_SOCKETCALL = 102
79 SYS_SYSLOG = 103
80 SYS_SETITIMER = 104
81 SYS_GETITIMER = 105
82 SYS_STAT = 106
83 SYS_LSTAT = 107
84 SYS_FSTAT = 108
85 SYS_LOOKUP_DCOOKIE = 110
86 SYS_VHANGUP = 111
87 SYS_IDLE = 112
88 SYS_WAIT4 = 114
89 SYS_SWAPOFF = 115
90 SYS_SYSINFO = 116
91 SYS_IPC = 117
92 SYS_FSYNC = 118
93 SYS_SIGRETURN = 119
94 SYS_CLONE = 120
95 SYS_SETDOMAINNAME = 121
96 SYS_UNAME = 122
97 SYS_ADJTIMEX = 124
98 SYS_MPROTECT = 125
99 SYS_SIGPROCMASK = 126
100 SYS_CREATE_MODULE = 127
101 SYS_INIT_MODULE = 128
102 SYS_DELETE_MODULE = 129
103 SYS_GET_KERNEL_SYMS = 130
104 SYS_QUOTACTL = 131
105 SYS_GETPGID = 132
106 SYS_FCHDIR = 133
107 SYS_BDFLUSH = 134
108 SYS_SYSFS = 135
109 SYS_PERSONALITY = 136
110 SYS_AFS_SYSCALL = 137
111 SYS_GETDENTS = 141
112 SYS_SELECT = 142
113 SYS_FLOCK = 143
114 SYS_MSYNC = 144
115 SYS_READV = 145
116 SYS_WRITEV = 146
117 SYS_GETSID = 147
118 SYS_FDATASYNC = 148
119 SYS__SYSCTL = 149
120 SYS_MLOCK = 150
121 SYS_MUNLOCK = 151
122 SYS_MLOCKALL = 152
123 SYS_MUNLOCKALL = 153
124 SYS_SCHED_SETPARAM = 154
125 SYS_SCHED_GETPARAM = 155
126 SYS_SCHED_SETSCHEDULER = 156
127 SYS_SCHED_GETSCHEDULER = 157
128 SYS_SCHED_YIELD = 158
129 SYS_SCHED_GET_PRIORITY_MAX = 159
130 SYS_SCHED_GET_PRIORITY_MIN = 160
131 SYS_SCHED_RR_GET_INTERVAL = 161
132 SYS_NANOSLEEP = 162
133 SYS_MREMAP = 163
134 SYS_QUERY_MODULE = 167
135 SYS_POLL = 168
136 SYS_NFSSERVCTL = 169
137 SYS_PRCTL = 172
138 SYS_RT_SIGRETURN = 173
139 SYS_RT_SIGACTION = 174
140 SYS_RT_SIGPROCMASK = 175
141 SYS_RT_SIGPENDING = 176
142 SYS_RT_SIGTIMEDWAIT = 177
143 SYS_RT_SIGQUEUEINFO = 178
144 SYS_RT_SIGSUSPEND = 179
145 SYS_PREAD64 = 180
146 SYS_PWRITE64 = 181
147 SYS_GETCWD = 183
148 SYS_CAPGET = 184
149 SYS_CAPSET = 185
150 SYS_SIGALTSTACK = 186
151 SYS_SENDFILE = 187
152 SYS_GETPMSG = 188
153 SYS_PUTPMSG = 189
154 SYS_VFORK = 190
155 SYS_GETRLIMIT = 191
156 SYS_LCHOWN = 198
157 SYS_GETUID = 199
158 SYS_GETGID = 200
159 SYS_GETEUID = 201
160 SYS_GETEGID = 202
161 SYS_SETREUID = 203
162 SYS_SETREGID = 204
163 SYS_GETGROUPS = 205
164 SYS_SETGROUPS = 206
165 SYS_FCHOWN = 207
166 SYS_SETRESUID = 208
167 SYS_GETRESUID = 209
168 SYS_SETRESGID = 210
169 SYS_GETRESGID = 211
170 SYS_CHOWN = 212
171 SYS_SETUID = 213
172 SYS_SETGID = 214
173 SYS_SETFSUID = 215
174 SYS_SETFSGID = 216
175 SYS_PIVOT_ROOT = 217
176 SYS_MINCORE = 218
177 SYS_MADVISE = 219
178 SYS_GETDENTS64 = 220
179 SYS_READAHEAD = 222
180 SYS_SETXATTR = 224
181 SYS_LSETXATTR = 225
182 SYS_FSETXATTR = 226
183 SYS_GETXATTR = 227
184 SYS_LGETXATTR = 228
185 SYS_FGETXATTR = 229
186 SYS_LISTXATTR = 230
187 SYS_LLISTXATTR = 231
188 SYS_FLISTXATTR = 232
189 SYS_REMOVEXATTR = 233
190 SYS_LREMOVEXATTR = 234
191 SYS_FREMOVEXATTR = 235
192 SYS_GETTID = 236
193 SYS_TKILL = 237
194 SYS_FUTEX = 238
195 SYS_SCHED_SETAFFINITY = 239
196 SYS_SCHED_GETAFFINITY = 240
197 SYS_TGKILL = 241
198 SYS_IO_SETUP = 243
199 SYS_IO_DESTROY = 244
200 SYS_IO_GETEVENTS = 245
201 SYS_IO_SUBMIT = 246
202 SYS_IO_CANCEL = 247
203 SYS_EXIT_GROUP = 248
204 SYS_EPOLL_CREATE = 249
205 SYS_EPOLL_CTL = 250
206 SYS_EPOLL_WAIT = 251
207 SYS_SET_TID_ADDRESS = 252
208 SYS_FADVISE64 = 253
209 SYS_TIMER_CREATE = 254
210 SYS_TIMER_SETTIME = 255
211 SYS_TIMER_GETTIME = 256
212 SYS_TIMER_GETOVERRUN = 257
213 SYS_TIMER_DELETE = 258
214 SYS_CLOCK_SETTIME = 259
215 SYS_CLOCK_GETTIME = 260
216 SYS_CLOCK_GETRES = 261
217 SYS_CLOCK_NANOSLEEP = 262
218 SYS_STATFS64 = 265
219 SYS_FSTATFS64 = 266
220 SYS_REMAP_FILE_PAGES = 267
221 SYS_MBIND = 268
222 SYS_GET_MEMPOLICY = 269
223 SYS_SET_MEMPOLICY = 270
224 SYS_MQ_OPEN = 271
225 SYS_MQ_UNLINK = 272
226 SYS_MQ_TIMEDSEND = 273
227 SYS_MQ_TIMEDRECEIVE = 274
228 SYS_MQ_NOTIFY = 275
229 SYS_MQ_GETSETATTR = 276
230 SYS_KEXEC_LOAD = 277
231 SYS_ADD_KEY = 278
232 SYS_REQUEST_KEY = 279
233 SYS_KEYCTL = 280
234 SYS_WAITID = 281
235 SYS_IOPRIO_SET = 282
236 SYS_IOPRIO_GET = 283
237 SYS_INOTIFY_INIT = 284
238 SYS_INOTIFY_ADD_WATCH = 285
239 SYS_INOTIFY_RM_WATCH = 286
240 SYS_MIGRATE_PAGES = 287
241 SYS_OPENAT = 288
242 SYS_MKDIRAT = 289
243 SYS_MKNODAT = 290
244 SYS_FCHOWNAT = 291
245 SYS_FUTIMESAT = 292
246 SYS_NEWFSTATAT = 293
247 SYS_UNLINKAT = 294
248 SYS_RENAMEAT = 295
249 SYS_LINKAT = 296
250 SYS_SYMLINKAT = 297
251 SYS_READLINKAT = 298
252 SYS_FCHMODAT = 299
253 SYS_FACCESSAT = 300
254 SYS_PSELECT6 = 301
255 SYS_PPOLL = 302
256 SYS_UNSHARE = 303
257 SYS_SET_ROBUST_LIST = 304
258 SYS_GET_ROBUST_LIST = 305
259 SYS_SPLICE = 306
260 SYS_SYNC_FILE_RANGE = 307
261 SYS_TEE = 308
262 SYS_VMSPLICE = 309
263 SYS_MOVE_PAGES = 310
264 SYS_GETCPU = 311
265 SYS_EPOLL_PWAIT = 312
266 SYS_UTIMES = 313
267 SYS_FALLOCATE = 314
268 SYS_UTIMENSAT = 315
269 SYS_SIGNALFD = 316
270 SYS_TIMERFD = 317
271 SYS_EVENTFD = 318
272 SYS_TIMERFD_CREATE = 319
273 SYS_TIMERFD_SETTIME = 320
274 SYS_TIMERFD_GETTIME = 321
275 SYS_SIGNALFD4 = 322
276 SYS_EVENTFD2 = 323
277 SYS_INOTIFY_INIT1 = 324
278 SYS_PIPE2 = 325
279 SYS_DUP3 = 326
280 SYS_EPOLL_CREATE1 = 327
281 SYS_PREADV = 328
282 SYS_PWRITEV = 329
283 SYS_RT_TGSIGQUEUEINFO = 330
284 SYS_PERF_EVENT_OPEN = 331
285 SYS_FANOTIFY_INIT = 332
286 SYS_FANOTIFY_MARK = 333
287 SYS_PRLIMIT64 = 334
288 SYS_NAME_TO_HANDLE_AT = 335
289 SYS_OPEN_BY_HANDLE_AT = 336
290 SYS_CLOCK_ADJTIME = 337
291 SYS_SYNCFS = 338
292 SYS_SETNS = 339
293 SYS_PROCESS_VM_READV = 340
294 SYS_PROCESS_VM_WRITEV = 341
295 SYS_S390_RUNTIME_INSTR = 342
296 SYS_KCMP = 343
297 SYS_FINIT_MODULE = 344
298 SYS_SCHED_SETATTR = 345
299 SYS_SCHED_GETATTR = 346
300 SYS_RENAMEAT2 = 347
301 SYS_SECCOMP = 348
302 SYS_GETRANDOM = 349
303 SYS_MEMFD_CREATE = 350
304 SYS_BPF = 351
305 SYS_S390_PCI_MMIO_WRITE = 352
306 SYS_S390_PCI_MMIO_READ = 353
307 SYS_EXECVEAT = 354
308 SYS_USERFAULTFD = 355
309 SYS_MEMBARRIER = 356
310 SYS_RECVMMSG = 357
311 SYS_SENDMMSG = 358
312 SYS_SOCKET = 359
313 SYS_SOCKETPAIR = 360
314 SYS_BIND = 361
315 SYS_CONNECT = 362
316 SYS_LISTEN = 363
317 SYS_ACCEPT4 = 364
318 SYS_GETSOCKOPT = 365
319 SYS_SETSOCKOPT = 366
320 SYS_GETSOCKNAME = 367
321 SYS_GETPEERNAME = 368
322 SYS_SENDTO = 369
323 SYS_SENDMSG = 370
324 SYS_RECVFROM = 371
325 SYS_RECVMSG = 372
326 SYS_SHUTDOWN = 373
327 SYS_MLOCK2 = 374
328 SYS_COPY_FILE_RANGE = 375
329 SYS_PREADV2 = 376
330 SYS_PWRITEV2 = 377
331 SYS_S390_GUARDED_STORAGE = 378
332 SYS_STATX = 379
333 SYS_S390_STHYI = 380
334 SYS_KEXEC_FILE_LOAD = 381
335 SYS_IO_PGETEVENTS = 382
336 SYS_RSEQ = 383
337 SYS_PKEY_MPROTECT = 384
338 SYS_PKEY_ALLOC = 385
339 SYS_PKEY_FREE = 386
340 SYS_SEMTIMEDOP = 392
341 SYS_SEMGET = 393
342 SYS_SEMCTL = 394
343 SYS_SHMGET = 395
344 SYS_SHMCTL = 396
345 SYS_SHMAT = 397
346 SYS_SHMDT = 398
347 SYS_MSGGET = 399
348 SYS_MSGSND = 400
349 SYS_MSGRCV = 401
350 SYS_MSGCTL = 402
351 SYS_PIDFD_SEND_SIGNAL = 424
352 SYS_IO_URING_SETUP = 425
353 SYS_IO_URING_ENTER = 426
354 SYS_IO_URING_REGISTER = 427
355 SYS_OPEN_TREE = 428
356 SYS_MOVE_MOUNT = 429
357 SYS_FSOPEN = 430
358 SYS_FSCONFIG = 431
359 SYS_FSMOUNT = 432
360 SYS_FSPICK = 433
361 SYS_PIDFD_OPEN = 434
362 SYS_CLONE3 = 435
363 SYS_CLOSE_RANGE = 436
364 SYS_OPENAT2 = 437
365 SYS_PIDFD_GETFD = 438
366 SYS_FACCESSAT2 = 439
367 SYS_PROCESS_MADVISE = 440
368 SYS_EPOLL_PWAIT2 = 441
369 SYS_MOUNT_SETATTR = 442
9 SYS_EXIT = 1
10 SYS_FORK = 2
11 SYS_READ = 3
12 SYS_WRITE = 4
13 SYS_OPEN = 5
14 SYS_CLOSE = 6
15 SYS_RESTART_SYSCALL = 7
16 SYS_CREAT = 8
17 SYS_LINK = 9
18 SYS_UNLINK = 10
19 SYS_EXECVE = 11
20 SYS_CHDIR = 12
21 SYS_MKNOD = 14
22 SYS_CHMOD = 15
23 SYS_LSEEK = 19
24 SYS_GETPID = 20
25 SYS_MOUNT = 21
26 SYS_UMOUNT = 22
27 SYS_PTRACE = 26
28 SYS_ALARM = 27
29 SYS_PAUSE = 29
30 SYS_UTIME = 30
31 SYS_ACCESS = 33
32 SYS_NICE = 34
33 SYS_SYNC = 36
34 SYS_KILL = 37
35 SYS_RENAME = 38
36 SYS_MKDIR = 39
37 SYS_RMDIR = 40
38 SYS_DUP = 41
39 SYS_PIPE = 42
40 SYS_TIMES = 43
41 SYS_BRK = 45
42 SYS_SIGNAL = 48
43 SYS_ACCT = 51
44 SYS_UMOUNT2 = 52
45 SYS_IOCTL = 54
46 SYS_FCNTL = 55
47 SYS_SETPGID = 57
48 SYS_UMASK = 60
49 SYS_CHROOT = 61
50 SYS_USTAT = 62
51 SYS_DUP2 = 63
52 SYS_GETPPID = 64
53 SYS_GETPGRP = 65
54 SYS_SETSID = 66
55 SYS_SIGACTION = 67
56 SYS_SIGSUSPEND = 72
57 SYS_SIGPENDING = 73
58 SYS_SETHOSTNAME = 74
59 SYS_SETRLIMIT = 75
60 SYS_GETRUSAGE = 77
61 SYS_GETTIMEOFDAY = 78
62 SYS_SETTIMEOFDAY = 79
63 SYS_SYMLINK = 83
64 SYS_READLINK = 85
65 SYS_USELIB = 86
66 SYS_SWAPON = 87
67 SYS_REBOOT = 88
68 SYS_READDIR = 89
69 SYS_MMAP = 90
70 SYS_MUNMAP = 91
71 SYS_TRUNCATE = 92
72 SYS_FTRUNCATE = 93
73 SYS_FCHMOD = 94
74 SYS_GETPRIORITY = 96
75 SYS_SETPRIORITY = 97
76 SYS_STATFS = 99
77 SYS_FSTATFS = 100
78 SYS_SOCKETCALL = 102
79 SYS_SYSLOG = 103
80 SYS_SETITIMER = 104
81 SYS_GETITIMER = 105
82 SYS_STAT = 106
83 SYS_LSTAT = 107
84 SYS_FSTAT = 108
85 SYS_LOOKUP_DCOOKIE = 110
86 SYS_VHANGUP = 111
87 SYS_IDLE = 112
88 SYS_WAIT4 = 114
89 SYS_SWAPOFF = 115
90 SYS_SYSINFO = 116
91 SYS_IPC = 117
92 SYS_FSYNC = 118
93 SYS_SIGRETURN = 119
94 SYS_CLONE = 120
95 SYS_SETDOMAINNAME = 121
96 SYS_UNAME = 122
97 SYS_ADJTIMEX = 124
98 SYS_MPROTECT = 125
99 SYS_SIGPROCMASK = 126
100 SYS_CREATE_MODULE = 127
101 SYS_INIT_MODULE = 128
102 SYS_DELETE_MODULE = 129
103 SYS_GET_KERNEL_SYMS = 130
104 SYS_QUOTACTL = 131
105 SYS_GETPGID = 132
106 SYS_FCHDIR = 133
107 SYS_BDFLUSH = 134
108 SYS_SYSFS = 135
109 SYS_PERSONALITY = 136
110 SYS_AFS_SYSCALL = 137
111 SYS_GETDENTS = 141
112 SYS_SELECT = 142
113 SYS_FLOCK = 143
114 SYS_MSYNC = 144
115 SYS_READV = 145
116 SYS_WRITEV = 146
117 SYS_GETSID = 147
118 SYS_FDATASYNC = 148
119 SYS__SYSCTL = 149
120 SYS_MLOCK = 150
121 SYS_MUNLOCK = 151
122 SYS_MLOCKALL = 152
123 SYS_MUNLOCKALL = 153
124 SYS_SCHED_SETPARAM = 154
125 SYS_SCHED_GETPARAM = 155
126 SYS_SCHED_SETSCHEDULER = 156
127 SYS_SCHED_GETSCHEDULER = 157
128 SYS_SCHED_YIELD = 158
129 SYS_SCHED_GET_PRIORITY_MAX = 159
130 SYS_SCHED_GET_PRIORITY_MIN = 160
131 SYS_SCHED_RR_GET_INTERVAL = 161
132 SYS_NANOSLEEP = 162
133 SYS_MREMAP = 163
134 SYS_QUERY_MODULE = 167
135 SYS_POLL = 168
136 SYS_NFSSERVCTL = 169
137 SYS_PRCTL = 172
138 SYS_RT_SIGRETURN = 173
139 SYS_RT_SIGACTION = 174
140 SYS_RT_SIGPROCMASK = 175
141 SYS_RT_SIGPENDING = 176
142 SYS_RT_SIGTIMEDWAIT = 177
143 SYS_RT_SIGQUEUEINFO = 178
144 SYS_RT_SIGSUSPEND = 179
145 SYS_PREAD64 = 180
146 SYS_PWRITE64 = 181
147 SYS_GETCWD = 183
148 SYS_CAPGET = 184
149 SYS_CAPSET = 185
150 SYS_SIGALTSTACK = 186
151 SYS_SENDFILE = 187
152 SYS_GETPMSG = 188
153 SYS_PUTPMSG = 189
154 SYS_VFORK = 190
155 SYS_GETRLIMIT = 191
156 SYS_LCHOWN = 198
157 SYS_GETUID = 199
158 SYS_GETGID = 200
159 SYS_GETEUID = 201
160 SYS_GETEGID = 202
161 SYS_SETREUID = 203
162 SYS_SETREGID = 204
163 SYS_GETGROUPS = 205
164 SYS_SETGROUPS = 206
165 SYS_FCHOWN = 207
166 SYS_SETRESUID = 208
167 SYS_GETRESUID = 209
168 SYS_SETRESGID = 210
169 SYS_GETRESGID = 211
170 SYS_CHOWN = 212
171 SYS_SETUID = 213
172 SYS_SETGID = 214
173 SYS_SETFSUID = 215
174 SYS_SETFSGID = 216
175 SYS_PIVOT_ROOT = 217
176 SYS_MINCORE = 218
177 SYS_MADVISE = 219
178 SYS_GETDENTS64 = 220
179 SYS_READAHEAD = 222
180 SYS_SETXATTR = 224
181 SYS_LSETXATTR = 225
182 SYS_FSETXATTR = 226
183 SYS_GETXATTR = 227
184 SYS_LGETXATTR = 228
185 SYS_FGETXATTR = 229
186 SYS_LISTXATTR = 230
187 SYS_LLISTXATTR = 231
188 SYS_FLISTXATTR = 232
189 SYS_REMOVEXATTR = 233
190 SYS_LREMOVEXATTR = 234
191 SYS_FREMOVEXATTR = 235
192 SYS_GETTID = 236
193 SYS_TKILL = 237
194 SYS_FUTEX = 238
195 SYS_SCHED_SETAFFINITY = 239
196 SYS_SCHED_GETAFFINITY = 240
197 SYS_TGKILL = 241
198 SYS_IO_SETUP = 243
199 SYS_IO_DESTROY = 244
200 SYS_IO_GETEVENTS = 245
201 SYS_IO_SUBMIT = 246
202 SYS_IO_CANCEL = 247
203 SYS_EXIT_GROUP = 248
204 SYS_EPOLL_CREATE = 249
205 SYS_EPOLL_CTL = 250
206 SYS_EPOLL_WAIT = 251
207 SYS_SET_TID_ADDRESS = 252
208 SYS_FADVISE64 = 253
209 SYS_TIMER_CREATE = 254
210 SYS_TIMER_SETTIME = 255
211 SYS_TIMER_GETTIME = 256
212 SYS_TIMER_GETOVERRUN = 257
213 SYS_TIMER_DELETE = 258
214 SYS_CLOCK_SETTIME = 259
215 SYS_CLOCK_GETTIME = 260
216 SYS_CLOCK_GETRES = 261
217 SYS_CLOCK_NANOSLEEP = 262
218 SYS_STATFS64 = 265
219 SYS_FSTATFS64 = 266
220 SYS_REMAP_FILE_PAGES = 267
221 SYS_MBIND = 268
222 SYS_GET_MEMPOLICY = 269
223 SYS_SET_MEMPOLICY = 270
224 SYS_MQ_OPEN = 271
225 SYS_MQ_UNLINK = 272
226 SYS_MQ_TIMEDSEND = 273
227 SYS_MQ_TIMEDRECEIVE = 274
228 SYS_MQ_NOTIFY = 275
229 SYS_MQ_GETSETATTR = 276
230 SYS_KEXEC_LOAD = 277
231 SYS_ADD_KEY = 278
232 SYS_REQUEST_KEY = 279
233 SYS_KEYCTL = 280
234 SYS_WAITID = 281
235 SYS_IOPRIO_SET = 282
236 SYS_IOPRIO_GET = 283
237 SYS_INOTIFY_INIT = 284
238 SYS_INOTIFY_ADD_WATCH = 285
239 SYS_INOTIFY_RM_WATCH = 286
240 SYS_MIGRATE_PAGES = 287
241 SYS_OPENAT = 288
242 SYS_MKDIRAT = 289
243 SYS_MKNODAT = 290
244 SYS_FCHOWNAT = 291
245 SYS_FUTIMESAT = 292
246 SYS_NEWFSTATAT = 293
247 SYS_UNLINKAT = 294
248 SYS_RENAMEAT = 295
249 SYS_LINKAT = 296
250 SYS_SYMLINKAT = 297
251 SYS_READLINKAT = 298
252 SYS_FCHMODAT = 299
253 SYS_FACCESSAT = 300
254 SYS_PSELECT6 = 301
255 SYS_PPOLL = 302
256 SYS_UNSHARE = 303
257 SYS_SET_ROBUST_LIST = 304
258 SYS_GET_ROBUST_LIST = 305
259 SYS_SPLICE = 306
260 SYS_SYNC_FILE_RANGE = 307
261 SYS_TEE = 308
262 SYS_VMSPLICE = 309
263 SYS_MOVE_PAGES = 310
264 SYS_GETCPU = 311
265 SYS_EPOLL_PWAIT = 312
266 SYS_UTIMES = 313
267 SYS_FALLOCATE = 314
268 SYS_UTIMENSAT = 315
269 SYS_SIGNALFD = 316
270 SYS_TIMERFD = 317
271 SYS_EVENTFD = 318
272 SYS_TIMERFD_CREATE = 319
273 SYS_TIMERFD_SETTIME = 320
274 SYS_TIMERFD_GETTIME = 321
275 SYS_SIGNALFD4 = 322
276 SYS_EVENTFD2 = 323
277 SYS_INOTIFY_INIT1 = 324
278 SYS_PIPE2 = 325
279 SYS_DUP3 = 326
280 SYS_EPOLL_CREATE1 = 327
281 SYS_PREADV = 328
282 SYS_PWRITEV = 329
283 SYS_RT_TGSIGQUEUEINFO = 330
284 SYS_PERF_EVENT_OPEN = 331
285 SYS_FANOTIFY_INIT = 332
286 SYS_FANOTIFY_MARK = 333
287 SYS_PRLIMIT64 = 334
288 SYS_NAME_TO_HANDLE_AT = 335
289 SYS_OPEN_BY_HANDLE_AT = 336
290 SYS_CLOCK_ADJTIME = 337
291 SYS_SYNCFS = 338
292 SYS_SETNS = 339
293 SYS_PROCESS_VM_READV = 340
294 SYS_PROCESS_VM_WRITEV = 341
295 SYS_S390_RUNTIME_INSTR = 342
296 SYS_KCMP = 343
297 SYS_FINIT_MODULE = 344
298 SYS_SCHED_SETATTR = 345
299 SYS_SCHED_GETATTR = 346
300 SYS_RENAMEAT2 = 347
301 SYS_SECCOMP = 348
302 SYS_GETRANDOM = 349
303 SYS_MEMFD_CREATE = 350
304 SYS_BPF = 351
305 SYS_S390_PCI_MMIO_WRITE = 352
306 SYS_S390_PCI_MMIO_READ = 353
307 SYS_EXECVEAT = 354
308 SYS_USERFAULTFD = 355
309 SYS_MEMBARRIER = 356
310 SYS_RECVMMSG = 357
311 SYS_SENDMMSG = 358
312 SYS_SOCKET = 359
313 SYS_SOCKETPAIR = 360
314 SYS_BIND = 361
315 SYS_CONNECT = 362
316 SYS_LISTEN = 363
317 SYS_ACCEPT4 = 364
318 SYS_GETSOCKOPT = 365
319 SYS_SETSOCKOPT = 366
320 SYS_GETSOCKNAME = 367
321 SYS_GETPEERNAME = 368
322 SYS_SENDTO = 369
323 SYS_SENDMSG = 370
324 SYS_RECVFROM = 371
325 SYS_RECVMSG = 372
326 SYS_SHUTDOWN = 373
327 SYS_MLOCK2 = 374
328 SYS_COPY_FILE_RANGE = 375
329 SYS_PREADV2 = 376
330 SYS_PWRITEV2 = 377
331 SYS_S390_GUARDED_STORAGE = 378
332 SYS_STATX = 379
333 SYS_S390_STHYI = 380
334 SYS_KEXEC_FILE_LOAD = 381
335 SYS_IO_PGETEVENTS = 382
336 SYS_RSEQ = 383
337 SYS_PKEY_MPROTECT = 384
338 SYS_PKEY_ALLOC = 385
339 SYS_PKEY_FREE = 386
340 SYS_SEMTIMEDOP = 392
341 SYS_SEMGET = 393
342 SYS_SEMCTL = 394
343 SYS_SHMGET = 395
344 SYS_SHMCTL = 396
345 SYS_SHMAT = 397
346 SYS_SHMDT = 398
347 SYS_MSGGET = 399
348 SYS_MSGSND = 400
349 SYS_MSGRCV = 401
350 SYS_MSGCTL = 402
351 SYS_PIDFD_SEND_SIGNAL = 424
352 SYS_IO_URING_SETUP = 425
353 SYS_IO_URING_ENTER = 426
354 SYS_IO_URING_REGISTER = 427
355 SYS_OPEN_TREE = 428
356 SYS_MOVE_MOUNT = 429
357 SYS_FSOPEN = 430
358 SYS_FSCONFIG = 431
359 SYS_FSMOUNT = 432
360 SYS_FSPICK = 433
361 SYS_PIDFD_OPEN = 434
362 SYS_CLONE3 = 435
363 SYS_CLOSE_RANGE = 436
364 SYS_OPENAT2 = 437
365 SYS_PIDFD_GETFD = 438
366 SYS_FACCESSAT2 = 439
367 SYS_PROCESS_MADVISE = 440
368 SYS_EPOLL_PWAIT2 = 441
369 SYS_MOUNT_SETATTR = 442
370 SYS_QUOTACTL_FD = 443
371 SYS_LANDLOCK_CREATE_RULESET = 444
372 SYS_LANDLOCK_ADD_RULE = 445
373 SYS_LANDLOCK_RESTRICT_SELF = 446
374 SYS_PROCESS_MRELEASE = 448
370375 )
66 package unix
77
88 const (
9 SYS_RESTART_SYSCALL = 0
10 SYS_EXIT = 1
11 SYS_FORK = 2
12 SYS_READ = 3
13 SYS_WRITE = 4
14 SYS_OPEN = 5
15 SYS_CLOSE = 6
16 SYS_WAIT4 = 7
17 SYS_CREAT = 8
18 SYS_LINK = 9
19 SYS_UNLINK = 10
20 SYS_EXECV = 11
21 SYS_CHDIR = 12
22 SYS_CHOWN = 13
23 SYS_MKNOD = 14
24 SYS_CHMOD = 15
25 SYS_LCHOWN = 16
26 SYS_BRK = 17
27 SYS_PERFCTR = 18
28 SYS_LSEEK = 19
29 SYS_GETPID = 20
30 SYS_CAPGET = 21
31 SYS_CAPSET = 22
32 SYS_SETUID = 23
33 SYS_GETUID = 24
34 SYS_VMSPLICE = 25
35 SYS_PTRACE = 26
36 SYS_ALARM = 27
37 SYS_SIGALTSTACK = 28
38 SYS_PAUSE = 29
39 SYS_UTIME = 30
40 SYS_ACCESS = 33
41 SYS_NICE = 34
42 SYS_SYNC = 36
43 SYS_KILL = 37
44 SYS_STAT = 38
45 SYS_SENDFILE = 39
46 SYS_LSTAT = 40
47 SYS_DUP = 41
48 SYS_PIPE = 42
49 SYS_TIMES = 43
50 SYS_UMOUNT2 = 45
51 SYS_SETGID = 46
52 SYS_GETGID = 47
53 SYS_SIGNAL = 48
54 SYS_GETEUID = 49
55 SYS_GETEGID = 50
56 SYS_ACCT = 51
57 SYS_MEMORY_ORDERING = 52
58 SYS_IOCTL = 54
59 SYS_REBOOT = 55
60 SYS_SYMLINK = 57
61 SYS_READLINK = 58
62 SYS_EXECVE = 59
63 SYS_UMASK = 60
64 SYS_CHROOT = 61
65 SYS_FSTAT = 62
66 SYS_FSTAT64 = 63
67 SYS_GETPAGESIZE = 64
68 SYS_MSYNC = 65
69 SYS_VFORK = 66
70 SYS_PREAD64 = 67
71 SYS_PWRITE64 = 68
72 SYS_MMAP = 71
73 SYS_MUNMAP = 73
74 SYS_MPROTECT = 74
75 SYS_MADVISE = 75
76 SYS_VHANGUP = 76
77 SYS_MINCORE = 78
78 SYS_GETGROUPS = 79
79 SYS_SETGROUPS = 80
80 SYS_GETPGRP = 81
81 SYS_SETITIMER = 83
82 SYS_SWAPON = 85
83 SYS_GETITIMER = 86
84 SYS_SETHOSTNAME = 88
85 SYS_DUP2 = 90
86 SYS_FCNTL = 92
87 SYS_SELECT = 93
88 SYS_FSYNC = 95
89 SYS_SETPRIORITY = 96
90 SYS_SOCKET = 97
91 SYS_CONNECT = 98
92 SYS_ACCEPT = 99
93 SYS_GETPRIORITY = 100
94 SYS_RT_SIGRETURN = 101
95 SYS_RT_SIGACTION = 102
96 SYS_RT_SIGPROCMASK = 103
97 SYS_RT_SIGPENDING = 104
98 SYS_RT_SIGTIMEDWAIT = 105
99 SYS_RT_SIGQUEUEINFO = 106
100 SYS_RT_SIGSUSPEND = 107
101 SYS_SETRESUID = 108
102 SYS_GETRESUID = 109
103 SYS_SETRESGID = 110
104 SYS_GETRESGID = 111
105 SYS_RECVMSG = 113
106 SYS_SENDMSG = 114
107 SYS_GETTIMEOFDAY = 116
108 SYS_GETRUSAGE = 117
109 SYS_GETSOCKOPT = 118
110 SYS_GETCWD = 119
111 SYS_READV = 120
112 SYS_WRITEV = 121
113 SYS_SETTIMEOFDAY = 122
114 SYS_FCHOWN = 123
115 SYS_FCHMOD = 124
116 SYS_RECVFROM = 125
117 SYS_SETREUID = 126
118 SYS_SETREGID = 127
119 SYS_RENAME = 128
120 SYS_TRUNCATE = 129
121 SYS_FTRUNCATE = 130
122 SYS_FLOCK = 131
123 SYS_LSTAT64 = 132
124 SYS_SENDTO = 133
125 SYS_SHUTDOWN = 134
126 SYS_SOCKETPAIR = 135
127 SYS_MKDIR = 136
128 SYS_RMDIR = 137
129 SYS_UTIMES = 138
130 SYS_STAT64 = 139
131 SYS_SENDFILE64 = 140
132 SYS_GETPEERNAME = 141
133 SYS_FUTEX = 142
134 SYS_GETTID = 143
135 SYS_GETRLIMIT = 144
136 SYS_SETRLIMIT = 145
137 SYS_PIVOT_ROOT = 146
138 SYS_PRCTL = 147
139 SYS_PCICONFIG_READ = 148
140 SYS_PCICONFIG_WRITE = 149
141 SYS_GETSOCKNAME = 150
142 SYS_INOTIFY_INIT = 151
143 SYS_INOTIFY_ADD_WATCH = 152
144 SYS_POLL = 153
145 SYS_GETDENTS64 = 154
146 SYS_INOTIFY_RM_WATCH = 156
147 SYS_STATFS = 157
148 SYS_FSTATFS = 158
149 SYS_UMOUNT = 159
150 SYS_SCHED_SET_AFFINITY = 160
151 SYS_SCHED_GET_AFFINITY = 161
152 SYS_GETDOMAINNAME = 162
153 SYS_SETDOMAINNAME = 163
154 SYS_UTRAP_INSTALL = 164
155 SYS_QUOTACTL = 165
156 SYS_SET_TID_ADDRESS = 166
157 SYS_MOUNT = 167
158 SYS_USTAT = 168
159 SYS_SETXATTR = 169
160 SYS_LSETXATTR = 170
161 SYS_FSETXATTR = 171
162 SYS_GETXATTR = 172
163 SYS_LGETXATTR = 173
164 SYS_GETDENTS = 174
165 SYS_SETSID = 175
166 SYS_FCHDIR = 176
167 SYS_FGETXATTR = 177
168 SYS_LISTXATTR = 178
169 SYS_LLISTXATTR = 179
170 SYS_FLISTXATTR = 180
171 SYS_REMOVEXATTR = 181
172 SYS_LREMOVEXATTR = 182
173 SYS_SIGPENDING = 183
174 SYS_QUERY_MODULE = 184
175 SYS_SETPGID = 185
176 SYS_FREMOVEXATTR = 186
177 SYS_TKILL = 187
178 SYS_EXIT_GROUP = 188
179 SYS_UNAME = 189
180 SYS_INIT_MODULE = 190
181 SYS_PERSONALITY = 191
182 SYS_REMAP_FILE_PAGES = 192
183 SYS_EPOLL_CREATE = 193
184 SYS_EPOLL_CTL = 194
185 SYS_EPOLL_WAIT = 195
186 SYS_IOPRIO_SET = 196
187 SYS_GETPPID = 197
188 SYS_SIGACTION = 198
189 SYS_SGETMASK = 199
190 SYS_SSETMASK = 200
191 SYS_SIGSUSPEND = 201
192 SYS_OLDLSTAT = 202
193 SYS_USELIB = 203
194 SYS_READDIR = 204
195 SYS_READAHEAD = 205
196 SYS_SOCKETCALL = 206
197 SYS_SYSLOG = 207
198 SYS_LOOKUP_DCOOKIE = 208
199 SYS_FADVISE64 = 209
200 SYS_FADVISE64_64 = 210
201 SYS_TGKILL = 211
202 SYS_WAITPID = 212
203 SYS_SWAPOFF = 213
204 SYS_SYSINFO = 214
205 SYS_IPC = 215
206 SYS_SIGRETURN = 216
207 SYS_CLONE = 217
208 SYS_IOPRIO_GET = 218
209 SYS_ADJTIMEX = 219
210 SYS_SIGPROCMASK = 220
211 SYS_CREATE_MODULE = 221
212 SYS_DELETE_MODULE = 222
213 SYS_GET_KERNEL_SYMS = 223
214 SYS_GETPGID = 224
215 SYS_BDFLUSH = 225
216 SYS_SYSFS = 226
217 SYS_AFS_SYSCALL = 227
218 SYS_SETFSUID = 228
219 SYS_SETFSGID = 229
220 SYS__NEWSELECT = 230
221 SYS_SPLICE = 232
222 SYS_STIME = 233
223 SYS_STATFS64 = 234
224 SYS_FSTATFS64 = 235
225 SYS__LLSEEK = 236
226 SYS_MLOCK = 237
227 SYS_MUNLOCK = 238
228 SYS_MLOCKALL = 239
229 SYS_MUNLOCKALL = 240
230 SYS_SCHED_SETPARAM = 241
231 SYS_SCHED_GETPARAM = 242
232 SYS_SCHED_SETSCHEDULER = 243
233 SYS_SCHED_GETSCHEDULER = 244
234 SYS_SCHED_YIELD = 245
235 SYS_SCHED_GET_PRIORITY_MAX = 246
236 SYS_SCHED_GET_PRIORITY_MIN = 247
237 SYS_SCHED_RR_GET_INTERVAL = 248
238 SYS_NANOSLEEP = 249
239 SYS_MREMAP = 250
240 SYS__SYSCTL = 251
241 SYS_GETSID = 252
242 SYS_FDATASYNC = 253
243 SYS_NFSSERVCTL = 254
244 SYS_SYNC_FILE_RANGE = 255
245 SYS_CLOCK_SETTIME = 256
246 SYS_CLOCK_GETTIME = 257
247 SYS_CLOCK_GETRES = 258
248 SYS_CLOCK_NANOSLEEP = 259
249 SYS_SCHED_GETAFFINITY = 260
250 SYS_SCHED_SETAFFINITY = 261
251 SYS_TIMER_SETTIME = 262
252 SYS_TIMER_GETTIME = 263
253 SYS_TIMER_GETOVERRUN = 264
254 SYS_TIMER_DELETE = 265
255 SYS_TIMER_CREATE = 266
256 SYS_VSERVER = 267
257 SYS_IO_SETUP = 268
258 SYS_IO_DESTROY = 269
259 SYS_IO_SUBMIT = 270
260 SYS_IO_CANCEL = 271
261 SYS_IO_GETEVENTS = 272
262 SYS_MQ_OPEN = 273
263 SYS_MQ_UNLINK = 274
264 SYS_MQ_TIMEDSEND = 275
265 SYS_MQ_TIMEDRECEIVE = 276
266 SYS_MQ_NOTIFY = 277
267 SYS_MQ_GETSETATTR = 278
268 SYS_WAITID = 279
269 SYS_TEE = 280
270 SYS_ADD_KEY = 281
271 SYS_REQUEST_KEY = 282
272 SYS_KEYCTL = 283
273 SYS_OPENAT = 284
274 SYS_MKDIRAT = 285
275 SYS_MKNODAT = 286
276 SYS_FCHOWNAT = 287
277 SYS_FUTIMESAT = 288
278 SYS_FSTATAT64 = 289
279 SYS_UNLINKAT = 290
280 SYS_RENAMEAT = 291
281 SYS_LINKAT = 292
282 SYS_SYMLINKAT = 293
283 SYS_READLINKAT = 294
284 SYS_FCHMODAT = 295
285 SYS_FACCESSAT = 296
286 SYS_PSELECT6 = 297
287 SYS_PPOLL = 298
288 SYS_UNSHARE = 299
289 SYS_SET_ROBUST_LIST = 300
290 SYS_GET_ROBUST_LIST = 301
291 SYS_MIGRATE_PAGES = 302
292 SYS_MBIND = 303
293 SYS_GET_MEMPOLICY = 304
294 SYS_SET_MEMPOLICY = 305
295 SYS_KEXEC_LOAD = 306
296 SYS_MOVE_PAGES = 307
297 SYS_GETCPU = 308
298 SYS_EPOLL_PWAIT = 309
299 SYS_UTIMENSAT = 310
300 SYS_SIGNALFD = 311
301 SYS_TIMERFD_CREATE = 312
302 SYS_EVENTFD = 313
303 SYS_FALLOCATE = 314
304 SYS_TIMERFD_SETTIME = 315
305 SYS_TIMERFD_GETTIME = 316
306 SYS_SIGNALFD4 = 317
307 SYS_EVENTFD2 = 318
308 SYS_EPOLL_CREATE1 = 319
309 SYS_DUP3 = 320
310 SYS_PIPE2 = 321
311 SYS_INOTIFY_INIT1 = 322
312 SYS_ACCEPT4 = 323
313 SYS_PREADV = 324
314 SYS_PWRITEV = 325
315 SYS_RT_TGSIGQUEUEINFO = 326
316 SYS_PERF_EVENT_OPEN = 327
317 SYS_RECVMMSG = 328
318 SYS_FANOTIFY_INIT = 329
319 SYS_FANOTIFY_MARK = 330
320 SYS_PRLIMIT64 = 331
321 SYS_NAME_TO_HANDLE_AT = 332
322 SYS_OPEN_BY_HANDLE_AT = 333
323 SYS_CLOCK_ADJTIME = 334
324 SYS_SYNCFS = 335
325 SYS_SENDMMSG = 336
326 SYS_SETNS = 337
327 SYS_PROCESS_VM_READV = 338
328 SYS_PROCESS_VM_WRITEV = 339
329 SYS_KERN_FEATURES = 340
330 SYS_KCMP = 341
331 SYS_FINIT_MODULE = 342
332 SYS_SCHED_SETATTR = 343
333 SYS_SCHED_GETATTR = 344
334 SYS_RENAMEAT2 = 345
335 SYS_SECCOMP = 346
336 SYS_GETRANDOM = 347
337 SYS_MEMFD_CREATE = 348
338 SYS_BPF = 349
339 SYS_EXECVEAT = 350
340 SYS_MEMBARRIER = 351
341 SYS_USERFAULTFD = 352
342 SYS_BIND = 353
343 SYS_LISTEN = 354
344 SYS_SETSOCKOPT = 355
345 SYS_MLOCK2 = 356
346 SYS_COPY_FILE_RANGE = 357
347 SYS_PREADV2 = 358
348 SYS_PWRITEV2 = 359
349 SYS_STATX = 360
350 SYS_IO_PGETEVENTS = 361
351 SYS_PKEY_MPROTECT = 362
352 SYS_PKEY_ALLOC = 363
353 SYS_PKEY_FREE = 364
354 SYS_RSEQ = 365
355 SYS_SEMTIMEDOP = 392
356 SYS_SEMGET = 393
357 SYS_SEMCTL = 394
358 SYS_SHMGET = 395
359 SYS_SHMCTL = 396
360 SYS_SHMAT = 397
361 SYS_SHMDT = 398
362 SYS_MSGGET = 399
363 SYS_MSGSND = 400
364 SYS_MSGRCV = 401
365 SYS_MSGCTL = 402
366 SYS_PIDFD_SEND_SIGNAL = 424
367 SYS_IO_URING_SETUP = 425
368 SYS_IO_URING_ENTER = 426
369 SYS_IO_URING_REGISTER = 427
370 SYS_OPEN_TREE = 428
371 SYS_MOVE_MOUNT = 429
372 SYS_FSOPEN = 430
373 SYS_FSCONFIG = 431
374 SYS_FSMOUNT = 432
375 SYS_FSPICK = 433
376 SYS_PIDFD_OPEN = 434
377 SYS_CLOSE_RANGE = 436
378 SYS_OPENAT2 = 437
379 SYS_PIDFD_GETFD = 438
380 SYS_FACCESSAT2 = 439
381 SYS_PROCESS_MADVISE = 440
382 SYS_EPOLL_PWAIT2 = 441
383 SYS_MOUNT_SETATTR = 442
9 SYS_RESTART_SYSCALL = 0
10 SYS_EXIT = 1
11 SYS_FORK = 2
12 SYS_READ = 3
13 SYS_WRITE = 4
14 SYS_OPEN = 5
15 SYS_CLOSE = 6
16 SYS_WAIT4 = 7
17 SYS_CREAT = 8
18 SYS_LINK = 9
19 SYS_UNLINK = 10
20 SYS_EXECV = 11
21 SYS_CHDIR = 12
22 SYS_CHOWN = 13
23 SYS_MKNOD = 14
24 SYS_CHMOD = 15
25 SYS_LCHOWN = 16
26 SYS_BRK = 17
27 SYS_PERFCTR = 18
28 SYS_LSEEK = 19
29 SYS_GETPID = 20
30 SYS_CAPGET = 21
31 SYS_CAPSET = 22
32 SYS_SETUID = 23
33 SYS_GETUID = 24
34 SYS_VMSPLICE = 25
35 SYS_PTRACE = 26
36 SYS_ALARM = 27
37 SYS_SIGALTSTACK = 28
38 SYS_PAUSE = 29
39 SYS_UTIME = 30
40 SYS_ACCESS = 33
41 SYS_NICE = 34
42 SYS_SYNC = 36
43 SYS_KILL = 37
44 SYS_STAT = 38
45 SYS_SENDFILE = 39
46 SYS_LSTAT = 40
47 SYS_DUP = 41
48 SYS_PIPE = 42
49 SYS_TIMES = 43
50 SYS_UMOUNT2 = 45
51 SYS_SETGID = 46
52 SYS_GETGID = 47
53 SYS_SIGNAL = 48
54 SYS_GETEUID = 49
55 SYS_GETEGID = 50
56 SYS_ACCT = 51
57 SYS_MEMORY_ORDERING = 52
58 SYS_IOCTL = 54
59 SYS_REBOOT = 55
60 SYS_SYMLINK = 57
61 SYS_READLINK = 58
62 SYS_EXECVE = 59
63 SYS_UMASK = 60
64 SYS_CHROOT = 61
65 SYS_FSTAT = 62
66 SYS_FSTAT64 = 63
67 SYS_GETPAGESIZE = 64
68 SYS_MSYNC = 65
69 SYS_VFORK = 66
70 SYS_PREAD64 = 67
71 SYS_PWRITE64 = 68
72 SYS_MMAP = 71
73 SYS_MUNMAP = 73
74 SYS_MPROTECT = 74
75 SYS_MADVISE = 75
76 SYS_VHANGUP = 76
77 SYS_MINCORE = 78
78 SYS_GETGROUPS = 79
79 SYS_SETGROUPS = 80
80 SYS_GETPGRP = 81
81 SYS_SETITIMER = 83
82 SYS_SWAPON = 85
83 SYS_GETITIMER = 86
84 SYS_SETHOSTNAME = 88
85 SYS_DUP2 = 90
86 SYS_FCNTL = 92
87 SYS_SELECT = 93
88 SYS_FSYNC = 95
89 SYS_SETPRIORITY = 96
90 SYS_SOCKET = 97
91 SYS_CONNECT = 98
92 SYS_ACCEPT = 99
93 SYS_GETPRIORITY = 100
94 SYS_RT_SIGRETURN = 101
95 SYS_RT_SIGACTION = 102
96 SYS_RT_SIGPROCMASK = 103
97 SYS_RT_SIGPENDING = 104
98 SYS_RT_SIGTIMEDWAIT = 105
99 SYS_RT_SIGQUEUEINFO = 106
100 SYS_RT_SIGSUSPEND = 107
101 SYS_SETRESUID = 108
102 SYS_GETRESUID = 109
103 SYS_SETRESGID = 110
104 SYS_GETRESGID = 111
105 SYS_RECVMSG = 113
106 SYS_SENDMSG = 114
107 SYS_GETTIMEOFDAY = 116
108 SYS_GETRUSAGE = 117
109 SYS_GETSOCKOPT = 118
110 SYS_GETCWD = 119
111 SYS_READV = 120
112 SYS_WRITEV = 121
113 SYS_SETTIMEOFDAY = 122
114 SYS_FCHOWN = 123
115 SYS_FCHMOD = 124
116 SYS_RECVFROM = 125
117 SYS_SETREUID = 126
118 SYS_SETREGID = 127
119 SYS_RENAME = 128
120 SYS_TRUNCATE = 129
121 SYS_FTRUNCATE = 130
122 SYS_FLOCK = 131
123 SYS_LSTAT64 = 132
124 SYS_SENDTO = 133
125 SYS_SHUTDOWN = 134
126 SYS_SOCKETPAIR = 135
127 SYS_MKDIR = 136
128 SYS_RMDIR = 137
129 SYS_UTIMES = 138
130 SYS_STAT64 = 139
131 SYS_SENDFILE64 = 140
132 SYS_GETPEERNAME = 141
133 SYS_FUTEX = 142
134 SYS_GETTID = 143
135 SYS_GETRLIMIT = 144
136 SYS_SETRLIMIT = 145
137 SYS_PIVOT_ROOT = 146
138 SYS_PRCTL = 147
139 SYS_PCICONFIG_READ = 148
140 SYS_PCICONFIG_WRITE = 149
141 SYS_GETSOCKNAME = 150
142 SYS_INOTIFY_INIT = 151
143 SYS_INOTIFY_ADD_WATCH = 152
144 SYS_POLL = 153
145 SYS_GETDENTS64 = 154
146 SYS_INOTIFY_RM_WATCH = 156
147 SYS_STATFS = 157
148 SYS_FSTATFS = 158
149 SYS_UMOUNT = 159
150 SYS_SCHED_SET_AFFINITY = 160
151 SYS_SCHED_GET_AFFINITY = 161
152 SYS_GETDOMAINNAME = 162
153 SYS_SETDOMAINNAME = 163
154 SYS_UTRAP_INSTALL = 164
155 SYS_QUOTACTL = 165
156 SYS_SET_TID_ADDRESS = 166
157 SYS_MOUNT = 167
158 SYS_USTAT = 168
159 SYS_SETXATTR = 169
160 SYS_LSETXATTR = 170
161 SYS_FSETXATTR = 171
162 SYS_GETXATTR = 172
163 SYS_LGETXATTR = 173
164 SYS_GETDENTS = 174
165 SYS_SETSID = 175
166 SYS_FCHDIR = 176
167 SYS_FGETXATTR = 177
168 SYS_LISTXATTR = 178
169 SYS_LLISTXATTR = 179
170 SYS_FLISTXATTR = 180
171 SYS_REMOVEXATTR = 181
172 SYS_LREMOVEXATTR = 182
173 SYS_SIGPENDING = 183
174 SYS_QUERY_MODULE = 184
175 SYS_SETPGID = 185
176 SYS_FREMOVEXATTR = 186
177 SYS_TKILL = 187
178 SYS_EXIT_GROUP = 188
179 SYS_UNAME = 189
180 SYS_INIT_MODULE = 190
181 SYS_PERSONALITY = 191
182 SYS_REMAP_FILE_PAGES = 192
183 SYS_EPOLL_CREATE = 193
184 SYS_EPOLL_CTL = 194
185 SYS_EPOLL_WAIT = 195
186 SYS_IOPRIO_SET = 196
187 SYS_GETPPID = 197
188 SYS_SIGACTION = 198
189 SYS_SGETMASK = 199
190 SYS_SSETMASK = 200
191 SYS_SIGSUSPEND = 201
192 SYS_OLDLSTAT = 202
193 SYS_USELIB = 203
194 SYS_READDIR = 204
195 SYS_READAHEAD = 205
196 SYS_SOCKETCALL = 206
197 SYS_SYSLOG = 207
198 SYS_LOOKUP_DCOOKIE = 208
199 SYS_FADVISE64 = 209
200 SYS_FADVISE64_64 = 210
201 SYS_TGKILL = 211
202 SYS_WAITPID = 212
203 SYS_SWAPOFF = 213
204 SYS_SYSINFO = 214
205 SYS_IPC = 215
206 SYS_SIGRETURN = 216
207 SYS_CLONE = 217
208 SYS_IOPRIO_GET = 218
209 SYS_ADJTIMEX = 219
210 SYS_SIGPROCMASK = 220
211 SYS_CREATE_MODULE = 221
212 SYS_DELETE_MODULE = 222
213 SYS_GET_KERNEL_SYMS = 223
214 SYS_GETPGID = 224
215 SYS_BDFLUSH = 225
216 SYS_SYSFS = 226
217 SYS_AFS_SYSCALL = 227
218 SYS_SETFSUID = 228
219 SYS_SETFSGID = 229
220 SYS__NEWSELECT = 230
221 SYS_SPLICE = 232
222 SYS_STIME = 233
223 SYS_STATFS64 = 234
224 SYS_FSTATFS64 = 235
225 SYS__LLSEEK = 236
226 SYS_MLOCK = 237
227 SYS_MUNLOCK = 238
228 SYS_MLOCKALL = 239
229 SYS_MUNLOCKALL = 240
230 SYS_SCHED_SETPARAM = 241
231 SYS_SCHED_GETPARAM = 242
232 SYS_SCHED_SETSCHEDULER = 243
233 SYS_SCHED_GETSCHEDULER = 244
234 SYS_SCHED_YIELD = 245
235 SYS_SCHED_GET_PRIORITY_MAX = 246
236 SYS_SCHED_GET_PRIORITY_MIN = 247
237 SYS_SCHED_RR_GET_INTERVAL = 248
238 SYS_NANOSLEEP = 249
239 SYS_MREMAP = 250
240 SYS__SYSCTL = 251
241 SYS_GETSID = 252
242 SYS_FDATASYNC = 253
243 SYS_NFSSERVCTL = 254
244 SYS_SYNC_FILE_RANGE = 255
245 SYS_CLOCK_SETTIME = 256
246 SYS_CLOCK_GETTIME = 257
247 SYS_CLOCK_GETRES = 258
248 SYS_CLOCK_NANOSLEEP = 259
249 SYS_SCHED_GETAFFINITY = 260
250 SYS_SCHED_SETAFFINITY = 261
251 SYS_TIMER_SETTIME = 262
252 SYS_TIMER_GETTIME = 263
253 SYS_TIMER_GETOVERRUN = 264
254 SYS_TIMER_DELETE = 265
255 SYS_TIMER_CREATE = 266
256 SYS_VSERVER = 267
257 SYS_IO_SETUP = 268
258 SYS_IO_DESTROY = 269
259 SYS_IO_SUBMIT = 270
260 SYS_IO_CANCEL = 271
261 SYS_IO_GETEVENTS = 272
262 SYS_MQ_OPEN = 273
263 SYS_MQ_UNLINK = 274
264 SYS_MQ_TIMEDSEND = 275
265 SYS_MQ_TIMEDRECEIVE = 276
266 SYS_MQ_NOTIFY = 277
267 SYS_MQ_GETSETATTR = 278
268 SYS_WAITID = 279
269 SYS_TEE = 280
270 SYS_ADD_KEY = 281
271 SYS_REQUEST_KEY = 282
272 SYS_KEYCTL = 283
273 SYS_OPENAT = 284
274 SYS_MKDIRAT = 285
275 SYS_MKNODAT = 286
276 SYS_FCHOWNAT = 287
277 SYS_FUTIMESAT = 288
278 SYS_FSTATAT64 = 289
279 SYS_UNLINKAT = 290
280 SYS_RENAMEAT = 291
281 SYS_LINKAT = 292
282 SYS_SYMLINKAT = 293
283 SYS_READLINKAT = 294
284 SYS_FCHMODAT = 295
285 SYS_FACCESSAT = 296
286 SYS_PSELECT6 = 297
287 SYS_PPOLL = 298
288 SYS_UNSHARE = 299
289 SYS_SET_ROBUST_LIST = 300
290 SYS_GET_ROBUST_LIST = 301
291 SYS_MIGRATE_PAGES = 302
292 SYS_MBIND = 303
293 SYS_GET_MEMPOLICY = 304
294 SYS_SET_MEMPOLICY = 305
295 SYS_KEXEC_LOAD = 306
296 SYS_MOVE_PAGES = 307
297 SYS_GETCPU = 308
298 SYS_EPOLL_PWAIT = 309
299 SYS_UTIMENSAT = 310
300 SYS_SIGNALFD = 311
301 SYS_TIMERFD_CREATE = 312
302 SYS_EVENTFD = 313
303 SYS_FALLOCATE = 314
304 SYS_TIMERFD_SETTIME = 315
305 SYS_TIMERFD_GETTIME = 316
306 SYS_SIGNALFD4 = 317
307 SYS_EVENTFD2 = 318
308 SYS_EPOLL_CREATE1 = 319
309 SYS_DUP3 = 320
310 SYS_PIPE2 = 321
311 SYS_INOTIFY_INIT1 = 322
312 SYS_ACCEPT4 = 323
313 SYS_PREADV = 324
314 SYS_PWRITEV = 325
315 SYS_RT_TGSIGQUEUEINFO = 326
316 SYS_PERF_EVENT_OPEN = 327
317 SYS_RECVMMSG = 328
318 SYS_FANOTIFY_INIT = 329
319 SYS_FANOTIFY_MARK = 330
320 SYS_PRLIMIT64 = 331
321 SYS_NAME_TO_HANDLE_AT = 332
322 SYS_OPEN_BY_HANDLE_AT = 333
323 SYS_CLOCK_ADJTIME = 334
324 SYS_SYNCFS = 335
325 SYS_SENDMMSG = 336
326 SYS_SETNS = 337
327 SYS_PROCESS_VM_READV = 338
328 SYS_PROCESS_VM_WRITEV = 339
329 SYS_KERN_FEATURES = 340
330 SYS_KCMP = 341
331 SYS_FINIT_MODULE = 342
332 SYS_SCHED_SETATTR = 343
333 SYS_SCHED_GETATTR = 344
334 SYS_RENAMEAT2 = 345
335 SYS_SECCOMP = 346
336 SYS_GETRANDOM = 347
337 SYS_MEMFD_CREATE = 348
338 SYS_BPF = 349
339 SYS_EXECVEAT = 350
340 SYS_MEMBARRIER = 351
341 SYS_USERFAULTFD = 352
342 SYS_BIND = 353
343 SYS_LISTEN = 354
344 SYS_SETSOCKOPT = 355
345 SYS_MLOCK2 = 356
346 SYS_COPY_FILE_RANGE = 357
347 SYS_PREADV2 = 358
348 SYS_PWRITEV2 = 359
349 SYS_STATX = 360
350 SYS_IO_PGETEVENTS = 361
351 SYS_PKEY_MPROTECT = 362
352 SYS_PKEY_ALLOC = 363
353 SYS_PKEY_FREE = 364
354 SYS_RSEQ = 365
355 SYS_SEMTIMEDOP = 392
356 SYS_SEMGET = 393
357 SYS_SEMCTL = 394
358 SYS_SHMGET = 395
359 SYS_SHMCTL = 396
360 SYS_SHMAT = 397
361 SYS_SHMDT = 398
362 SYS_MSGGET = 399
363 SYS_MSGSND = 400
364 SYS_MSGRCV = 401
365 SYS_MSGCTL = 402
366 SYS_PIDFD_SEND_SIGNAL = 424
367 SYS_IO_URING_SETUP = 425
368 SYS_IO_URING_ENTER = 426
369 SYS_IO_URING_REGISTER = 427
370 SYS_OPEN_TREE = 428
371 SYS_MOVE_MOUNT = 429
372 SYS_FSOPEN = 430
373 SYS_FSCONFIG = 431
374 SYS_FSMOUNT = 432
375 SYS_FSPICK = 433
376 SYS_PIDFD_OPEN = 434
377 SYS_CLOSE_RANGE = 436
378 SYS_OPENAT2 = 437
379 SYS_PIDFD_GETFD = 438
380 SYS_FACCESSAT2 = 439
381 SYS_PROCESS_MADVISE = 440
382 SYS_EPOLL_PWAIT2 = 441
383 SYS_MOUNT_SETATTR = 442
384 SYS_QUOTACTL_FD = 443
385 SYS_LANDLOCK_CREATE_RULESET = 444
386 SYS_LANDLOCK_ADD_RULE = 445
387 SYS_LANDLOCK_RESTRICT_SELF = 446
388 SYS_PROCESS_MRELEASE = 448
384389 )
208208 Sc_reserved [5]uint32
209209 }
210210
211 type RawSockaddrVM struct {
212 Len uint8
213 Family uint8
214 Reserved1 uint16
215 Port uint32
216 Cid uint32
217 }
218
219 type XVSockPCB struct {
220 Xv_len uint32
221 Xv_vsockpp uint64
222 Xvp_local_cid uint32
223 Xvp_local_port uint32
224 Xvp_remote_cid uint32
225 Xvp_remote_port uint32
226 Xvp_rxcnt uint32
227 Xvp_txcnt uint32
228 Xvp_peer_rxhiwat uint32
229 Xvp_peer_rxcnt uint32
230 Xvp_last_pid int32
231 Xvp_gencnt uint64
232 Xv_socket XSocket
233 _ [4]byte
234 }
235
236 type XSocket struct {
237 Xso_len uint32
238 Xso_so uint32
239 So_type int16
240 So_options int16
241 So_linger int16
242 So_state int16
243 So_pcb uint32
244 Xso_protocol int32
245 Xso_family int32
246 So_qlen int16
247 So_incqlen int16
248 So_qlimit int16
249 So_timeo int16
250 So_error uint16
251 So_pgid int32
252 So_oobmark uint32
253 So_rcv XSockbuf
254 So_snd XSockbuf
255 So_uid uint32
256 }
257
258 type XSocket64 struct {
259 Xso_len uint32
260 _ [8]byte
261 So_type int16
262 So_options int16
263 So_linger int16
264 So_state int16
265 _ [8]byte
266 Xso_protocol int32
267 Xso_family int32
268 So_qlen int16
269 So_incqlen int16
270 So_qlimit int16
271 So_timeo int16
272 So_error uint16
273 So_pgid int32
274 So_oobmark uint32
275 So_rcv XSockbuf
276 So_snd XSockbuf
277 So_uid uint32
278 }
279
280 type XSockbuf struct {
281 Cc uint32
282 Hiwat uint32
283 Mbcnt uint32
284 Mbmax uint32
285 Lowat int32
286 Flags int16
287 Timeo int16
288 }
289
290 type XVSockPgen struct {
291 Len uint32
292 Count uint64
293 Gen uint64
294 Sogen uint64
295 }
296
211297 type _Socklen uint32
212298
213299 type Xucred struct {
286372 SizeofSockaddrUnix = 0x6a
287373 SizeofSockaddrDatalink = 0x14
288374 SizeofSockaddrCtl = 0x20
375 SizeofSockaddrVM = 0xc
376 SizeofXvsockpcb = 0xa8
377 SizeofXSocket = 0x64
378 SizeofXSockbuf = 0x18
379 SizeofXVSockPgen = 0x20
289380 SizeofXucred = 0x4c
290381 SizeofLinger = 0x8
291382 SizeofIovec = 0x10
549640 Tdev int32
550641 Tpgid int32
551642 Tsess uintptr
552 Wmesg [8]int8
643 Wmesg [8]byte
553644 Xsize int32
554645 Xrssize int16
555646 Xccount int16
556647 Xswrss int16
557648 Flag int32
558 Login [12]int8
649 Login [12]byte
559650 Spare [4]int32
560651 _ [4]byte
561652 }
596687 P_priority uint8
597688 P_usrpri uint8
598689 P_nice int8
599 P_comm [17]int8
690 P_comm [17]byte
600691 P_pgrp uintptr
601692 P_addr uintptr
602693 P_xstat uint16
638729 Ngroups int16
639730 Groups [16]uint32
640731 }
732
733 type SysvIpcPerm struct {
734 Uid uint32
735 Gid uint32
736 Cuid uint32
737 Cgid uint32
738 Mode uint16
739 _ uint16
740 _ int32
741 }
742 type SysvShmDesc struct {
743 Perm SysvIpcPerm
744 Segsz uint64
745 Lpid int32
746 Cpid int32
747 Nattch uint16
748 _ [34]byte
749 }
750
751 const (
752 IPC_CREAT = 0x200
753 IPC_EXCL = 0x400
754 IPC_NOWAIT = 0x800
755 IPC_PRIVATE = 0x0
756 )
757
758 const (
759 IPC_RMID = 0x0
760 IPC_SET = 0x1
761 IPC_STAT = 0x2
762 )
763
764 const (
765 SHM_RDONLY = 0x1000
766 SHM_RND = 0x2000
767 )
208208 Sc_reserved [5]uint32
209209 }
210210
211 type RawSockaddrVM struct {
212 Len uint8
213 Family uint8
214 Reserved1 uint16
215 Port uint32
216 Cid uint32
217 }
218
219 type XVSockPCB struct {
220 Xv_len uint32
221 Xv_vsockpp uint64
222 Xvp_local_cid uint32
223 Xvp_local_port uint32
224 Xvp_remote_cid uint32
225 Xvp_remote_port uint32
226 Xvp_rxcnt uint32
227 Xvp_txcnt uint32
228 Xvp_peer_rxhiwat uint32
229 Xvp_peer_rxcnt uint32
230 Xvp_last_pid int32
231 Xvp_gencnt uint64
232 Xv_socket XSocket
233 _ [4]byte
234 }
235
236 type XSocket struct {
237 Xso_len uint32
238 Xso_so uint32
239 So_type int16
240 So_options int16
241 So_linger int16
242 So_state int16
243 So_pcb uint32
244 Xso_protocol int32
245 Xso_family int32
246 So_qlen int16
247 So_incqlen int16
248 So_qlimit int16
249 So_timeo int16
250 So_error uint16
251 So_pgid int32
252 So_oobmark uint32
253 So_rcv XSockbuf
254 So_snd XSockbuf
255 So_uid uint32
256 }
257
258 type XSocket64 struct {
259 Xso_len uint32
260 _ [8]byte
261 So_type int16
262 So_options int16
263 So_linger int16
264 So_state int16
265 _ [8]byte
266 Xso_protocol int32
267 Xso_family int32
268 So_qlen int16
269 So_incqlen int16
270 So_qlimit int16
271 So_timeo int16
272 So_error uint16
273 So_pgid int32
274 So_oobmark uint32
275 So_rcv XSockbuf
276 So_snd XSockbuf
277 So_uid uint32
278 }
279
280 type XSockbuf struct {
281 Cc uint32
282 Hiwat uint32
283 Mbcnt uint32
284 Mbmax uint32
285 Lowat int32
286 Flags int16
287 Timeo int16
288 }
289
290 type XVSockPgen struct {
291 Len uint32
292 Count uint64
293 Gen uint64
294 Sogen uint64
295 }
296
211297 type _Socklen uint32
212298
213299 type Xucred struct {
286372 SizeofSockaddrUnix = 0x6a
287373 SizeofSockaddrDatalink = 0x14
288374 SizeofSockaddrCtl = 0x20
375 SizeofSockaddrVM = 0xc
376 SizeofXvsockpcb = 0xa8
377 SizeofXSocket = 0x64
378 SizeofXSockbuf = 0x18
379 SizeofXVSockPgen = 0x20
289380 SizeofXucred = 0x4c
290381 SizeofLinger = 0x8
291382 SizeofIovec = 0x10
549640 Tdev int32
550641 Tpgid int32
551642 Tsess uintptr
552 Wmesg [8]int8
643 Wmesg [8]byte
553644 Xsize int32
554645 Xrssize int16
555646 Xccount int16
556647 Xswrss int16
557648 Flag int32
558 Login [12]int8
649 Login [12]byte
559650 Spare [4]int32
560651 _ [4]byte
561652 }
596687 P_priority uint8
597688 P_usrpri uint8
598689 P_nice int8
599 P_comm [17]int8
690 P_comm [17]byte
600691 P_pgrp uintptr
601692 P_addr uintptr
602693 P_xstat uint16
638729 Ngroups int16
639730 Groups [16]uint32
640731 }
732
733 type SysvIpcPerm struct {
734 Uid uint32
735 Gid uint32
736 Cuid uint32
737 Cgid uint32
738 Mode uint16
739 _ uint16
740 _ int32
741 }
742 type SysvShmDesc struct {
743 Perm SysvIpcPerm
744 Segsz uint64
745 Lpid int32
746 Cpid int32
747 Nattch uint16
748 _ [34]byte
749 }
750
751 const (
752 IPC_CREAT = 0x200
753 IPC_EXCL = 0x400
754 IPC_NOWAIT = 0x800
755 IPC_PRIVATE = 0x0
756 )
757
758 const (
759 IPC_RMID = 0x0
760 IPC_SET = 0x1
761 IPC_STAT = 0x2
762 )
763
764 const (
765 SHM_RDONLY = 0x1000
766 SHM_RND = 0x2000
767 )
2929 Sec int32
3030 Usec int32
3131 }
32
33 type Time_t int32
3234
3335 type Rusage struct {
3436 Utime Timeval
2929 Sec int64
3030 Usec int64
3131 }
32
33 type Time_t int64
3234
3335 type Rusage struct {
3436 Utime Timeval
3131 Usec int32
3232 _ [4]byte
3333 }
34
35 type Time_t int32
3436
3537 type Rusage struct {
3638 Utime Timeval
2929 Sec int64
3030 Usec int64
3131 }
32
33 type Time_t int64
3234
3335 type Rusage struct {
3436 Utime Timeval
1212 I_STR = 0x5308
1313 I_POP = 0x5303
1414 I_PUSH = 0x5302
15 I_LINK = 0x530c
16 I_UNLINK = 0x530d
1517 I_PLINK = 0x5316
1618 I_PUNLINK = 0x5317
1719
0 // Code generated by mkmerge.go; DO NOT EDIT.
0 // Code generated by mkmerge; DO NOT EDIT.
11
22 //go:build linux
33 // +build linux
451451 Mask uint32
452452 }
453453
454 type TCPRepairOpt struct {
455 Code uint32
456 Val uint32
457 }
458
454459 const (
455460 SizeofSockaddrInet4 = 0x10
456461 SizeofSockaddrInet6 = 0x1c
483488 SizeofUcred = 0xc
484489 SizeofTCPInfo = 0x68
485490 SizeofCanFilter = 0x8
491 SizeofTCPRepairOpt = 0x8
486492 )
487493
488494 const (
681687 }
682688
683689 const (
690 ICMP_FILTER = 0x1
691
692 ICMPV6_FILTER = 0x1
693 ICMPV6_FILTER_BLOCK = 0x1
694 ICMPV6_FILTER_BLOCKOTHERS = 0x3
695 ICMPV6_FILTER_PASS = 0x2
696 ICMPV6_FILTER_PASSONLY = 0x4
697 )
698
699 const (
684700 SizeofSockFilter = 0x8
685701 )
686702
10001016 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
10011017 PERF_COUNT_SW_DUMMY = 0x9
10021018 PERF_COUNT_SW_BPF_OUTPUT = 0xa
1003 PERF_COUNT_SW_MAX = 0xb
1019 PERF_COUNT_SW_MAX = 0xc
10041020 PERF_SAMPLE_IP = 0x1
10051021 PERF_SAMPLE_TID = 0x2
10061022 PERF_SAMPLE_TIME = 0x4
23392355 SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
23402356 SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
23412357
2342 SOF_TIMESTAMPING_LAST = 0x4000
2343 SOF_TIMESTAMPING_MASK = 0x7fff
2358 SOF_TIMESTAMPING_LAST = 0x8000
2359 SOF_TIMESTAMPING_MASK = 0xffff
23442360
23452361 SCM_TSTAMP_SND = 0x0
23462362 SCM_TSTAMP_SCHED = 0x1
29162932 DEVLINK_CMD_TRAP_POLICER_NEW = 0x47
29172933 DEVLINK_CMD_TRAP_POLICER_DEL = 0x48
29182934 DEVLINK_CMD_HEALTH_REPORTER_TEST = 0x49
2919 DEVLINK_CMD_MAX = 0x49
2935 DEVLINK_CMD_MAX = 0x4d
29202936 DEVLINK_PORT_TYPE_NOTSET = 0x0
29212937 DEVLINK_PORT_TYPE_AUTO = 0x1
29222938 DEVLINK_PORT_TYPE_ETH = 0x2
31393155 DEVLINK_ATTR_RELOAD_ACTION_INFO = 0xa2
31403156 DEVLINK_ATTR_RELOAD_ACTION_STATS = 0xa3
31413157 DEVLINK_ATTR_PORT_PCI_SF_NUMBER = 0xa4
3142 DEVLINK_ATTR_MAX = 0xa4
3158 DEVLINK_ATTR_MAX = 0xa9
31433159 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
31443160 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
31453161 DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
32473263 LWTUNNEL_ENCAP_BPF = 0x6
32483264 LWTUNNEL_ENCAP_SEG6_LOCAL = 0x7
32493265 LWTUNNEL_ENCAP_RPL = 0x8
3250 LWTUNNEL_ENCAP_MAX = 0x8
3266 LWTUNNEL_ENCAP_IOAM6 = 0x9
3267 LWTUNNEL_ENCAP_MAX = 0x9
32513268
32523269 MPLS_IPTUNNEL_UNSPEC = 0x0
32533270 MPLS_IPTUNNEL_DST = 0x1
34353452 ETHTOOL_MSG_CABLE_TEST_ACT = 0x1a
34363453 ETHTOOL_MSG_CABLE_TEST_TDR_ACT = 0x1b
34373454 ETHTOOL_MSG_TUNNEL_INFO_GET = 0x1c
3438 ETHTOOL_MSG_USER_MAX = 0x1c
3455 ETHTOOL_MSG_USER_MAX = 0x21
34393456 ETHTOOL_MSG_KERNEL_NONE = 0x0
34403457 ETHTOOL_MSG_STRSET_GET_REPLY = 0x1
34413458 ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2
34663483 ETHTOOL_MSG_CABLE_TEST_NTF = 0x1b
34673484 ETHTOOL_MSG_CABLE_TEST_TDR_NTF = 0x1c
34683485 ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY = 0x1d
3469 ETHTOOL_MSG_KERNEL_MAX = 0x1d
3486 ETHTOOL_MSG_KERNEL_MAX = 0x22
34703487 ETHTOOL_A_HEADER_UNSPEC = 0x0
34713488 ETHTOOL_A_HEADER_DEV_INDEX = 0x1
34723489 ETHTOOL_A_HEADER_DEV_NAME = 0x2
36003617 ETHTOOL_A_COALESCE_TX_USECS_HIGH = 0x15
36013618 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH = 0x16
36023619 ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL = 0x17
3603 ETHTOOL_A_COALESCE_MAX = 0x17
3620 ETHTOOL_A_COALESCE_USE_CQE_MODE_TX = 0x18
3621 ETHTOOL_A_COALESCE_USE_CQE_MODE_RX = 0x19
3622 ETHTOOL_A_COALESCE_MAX = 0x19
36043623 ETHTOOL_A_PAUSE_UNSPEC = 0x0
36053624 ETHTOOL_A_PAUSE_HEADER = 0x1
36063625 ETHTOOL_A_PAUSE_AUTONEG = 0x2
39063925 NFC_SDP_ATTR_URI = 0x1
39073926 NFC_SDP_ATTR_SAP = 0x2
39083927 )
3928
3929 type LandlockRulesetAttr struct {
3930 Access_fs uint64
3931 }
3932
3933 type LandlockPathBeneathAttr struct {
3934 Allowed_access uint64
3935 Parent_fd int32
3936 }
3937
3938 const (
3939 LANDLOCK_RULE_PATH_BENEATH = 0x1
3940 )
3941
3942 const (
3943 IPC_CREAT = 0x200
3944 IPC_EXCL = 0x400
3945 IPC_NOWAIT = 0x800
3946 IPC_PRIVATE = 0x0
3947
3948 ipc_64 = 0x100
3949 )
3950
3951 const (
3952 IPC_RMID = 0x0
3953 IPC_SET = 0x1
3954 IPC_STAT = 0x2
3955 )
3956
3957 const (
3958 SHM_RDONLY = 0x1000
3959 SHM_RND = 0x2000
3960 )
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/linux/types.go | go run mkpost.go
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/unix/linux/types.go | go run mkpost.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 //go:build 386 && linux
167167 Len uint32
168168 Level int32
169169 Type int32
170 }
171
172 type ifreq struct {
173 Ifrn [16]byte
174 Ifru [16]byte
170175 }
171176
172177 const (
630635 PPS_FETCH = 0xc00470a4
631636 )
632637
633 type ifreq struct {
634 Ifrn [16]byte
635 Ifru [16]byte
636 }
638 const (
639 PIDFD_NONBLOCK = 0x800
640 )
641
642 type SysvIpcPerm struct {
643 Key int32
644 Uid uint32
645 Gid uint32
646 Cuid uint32
647 Cgid uint32
648 Mode uint16
649 _ [2]uint8
650 Seq uint16
651 _ uint16
652 _ uint32
653 _ uint32
654 }
655 type SysvShmDesc struct {
656 Perm SysvIpcPerm
657 Segsz uint32
658 Atime uint32
659 Atime_high uint32
660 Dtime uint32
661 Dtime_high uint32
662 Ctime uint32
663 Ctime_high uint32
664 Cpid int32
665 Lpid int32
666 Nattch uint32
667 _ uint32
668 _ uint32
669 }
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/linux/types.go | go run mkpost.go
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/unix/linux/types.go | go run mkpost.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 //go:build amd64 && linux
170170 Len uint64
171171 Level int32
172172 Type int32
173 }
174
175 type ifreq struct {
176 Ifrn [16]byte
177 Ifru [24]byte
173178 }
174179
175180 const (
648653 PPS_FETCH = 0xc00870a4
649654 )
650655
651 type ifreq struct {
652 Ifrn [16]byte
653 Ifru [24]byte
654 }
656 const (
657 PIDFD_NONBLOCK = 0x800
658 )
659
660 type SysvIpcPerm struct {
661 Key int32
662 Uid uint32
663 Gid uint32
664 Cuid uint32
665 Cgid uint32
666 Mode uint32
667 _ [0]uint8
668 Seq uint16
669 _ uint16
670 _ uint64
671 _ uint64
672 }
673 type SysvShmDesc struct {
674 Perm SysvIpcPerm
675 Segsz uint64
676 Atime int64
677 Dtime int64
678 Ctime int64
679 Cpid int32
680 Lpid int32
681 Nattch uint64
682 _ uint64
683 _ uint64
684 }
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 //go:build arm && linux
173173 Len uint32
174174 Level int32
175175 Type int32
176 }
177
178 type ifreq struct {
179 Ifrn [16]byte
180 Ifru [16]byte
176181 }
177182
178183 const (
625630 PPS_FETCH = 0xc00470a4
626631 )
627632
628 type ifreq struct {
629 Ifrn [16]byte
630 Ifru [16]byte
631 }
633 const (
634 PIDFD_NONBLOCK = 0x800
635 )
636
637 type SysvIpcPerm struct {
638 Key int32
639 Uid uint32
640 Gid uint32
641 Cuid uint32
642 Cgid uint32
643 Mode uint16
644 _ [2]uint8
645 Seq uint16
646 _ uint16
647 _ uint32
648 _ uint32
649 }
650 type SysvShmDesc struct {
651 Perm SysvIpcPerm
652 Segsz uint32
653 Atime uint32
654 Atime_high uint32
655 Dtime uint32
656 Dtime_high uint32
657 Ctime uint32
658 Ctime_high uint32
659 Cpid int32
660 Lpid int32
661 Nattch uint32
662 _ uint32
663 _ uint32
664 }
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/linux/types.go | go run mkpost.go
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/linux/types.go | go run mkpost.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 //go:build arm64 && linux
171171 Len uint64
172172 Level int32
173173 Type int32
174 }
175
176 type ifreq struct {
177 Ifrn [16]byte
178 Ifru [24]byte
174179 }
175180
176181 const (
627632 PPS_FETCH = 0xc00870a4
628633 )
629634
630 type ifreq struct {
631 Ifrn [16]byte
632 Ifru [24]byte
633 }
635 const (
636 PIDFD_NONBLOCK = 0x800
637 )
638
639 type SysvIpcPerm struct {
640 Key int32
641 Uid uint32
642 Gid uint32
643 Cuid uint32
644 Cgid uint32
645 Mode uint32
646 _ [0]uint8
647 Seq uint16
648 _ uint16
649 _ uint64
650 _ uint64
651 }
652 type SysvShmDesc struct {
653 Perm SysvIpcPerm
654 Segsz uint64
655 Atime int64
656 Dtime int64
657 Ctime int64
658 Cpid int32
659 Lpid int32
660 Nattch uint64
661 _ uint64
662 _ uint64
663 }
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 //go:build mips && linux
172172 Len uint32
173173 Level int32
174174 Type int32
175 }
176
177 type ifreq struct {
178 Ifrn [16]byte
179 Ifru [16]byte
175180 }
176181
177182 const (
631636 PPS_FETCH = 0xc00470a4
632637 )
633638
634 type ifreq struct {
635 Ifrn [16]byte
636 Ifru [16]byte
637 }
639 const (
640 PIDFD_NONBLOCK = 0x80
641 )
642
643 type SysvIpcPerm struct {
644 Key int32
645 Uid uint32
646 Gid uint32
647 Cuid uint32
648 Cgid uint32
649 Mode uint32
650 _ [0]uint8
651 Seq uint16
652 _ uint16
653 _ uint32
654 _ uint32
655 }
656 type SysvShmDesc struct {
657 Perm SysvIpcPerm
658 Segsz uint32
659 Atime uint32
660 Dtime uint32
661 Ctime uint32
662 Cpid int32
663 Lpid int32
664 Nattch uint32
665 Atime_high uint16
666 Dtime_high uint16
667 Ctime_high uint16
668 _ uint16
669 }
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 //go:build mips64 && linux
171171 Len uint64
172172 Level int32
173173 Type int32
174 }
175
176 type ifreq struct {
177 Ifrn [16]byte
178 Ifru [24]byte
174179 }
175180
176181 const (
630635 PPS_FETCH = 0xc00870a4
631636 )
632637
633 type ifreq struct {
634 Ifrn [16]byte
635 Ifru [24]byte
636 }
638 const (
639 PIDFD_NONBLOCK = 0x80
640 )
641
642 type SysvIpcPerm struct {
643 Key int32
644 Uid uint32
645 Gid uint32
646 Cuid uint32
647 Cgid uint32
648 Mode uint32
649 _ [0]uint8
650 Seq uint16
651 _ uint16
652 _ uint64
653 _ uint64
654 }
655 type SysvShmDesc struct {
656 Perm SysvIpcPerm
657 Segsz uint64
658 Atime int64
659 Dtime int64
660 Ctime int64
661 Cpid int32
662 Lpid int32
663 Nattch uint64
664 _ uint64
665 _ uint64
666 }
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 //go:build mips64le && linux
171171 Len uint64
172172 Level int32
173173 Type int32
174 }
175
176 type ifreq struct {
177 Ifrn [16]byte
178 Ifru [24]byte
174179 }
175180
176181 const (
630635 PPS_FETCH = 0xc00870a4
631636 )
632637
633 type ifreq struct {
634 Ifrn [16]byte
635 Ifru [24]byte
636 }
638 const (
639 PIDFD_NONBLOCK = 0x80
640 )
641
642 type SysvIpcPerm struct {
643 Key int32
644 Uid uint32
645 Gid uint32
646 Cuid uint32
647 Cgid uint32
648 Mode uint32
649 _ [0]uint8
650 Seq uint16
651 _ uint16
652 _ uint64
653 _ uint64
654 }
655 type SysvShmDesc struct {
656 Perm SysvIpcPerm
657 Segsz uint64
658 Atime int64
659 Dtime int64
660 Ctime int64
661 Cpid int32
662 Lpid int32
663 Nattch uint64
664 _ uint64
665 _ uint64
666 }
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 //go:build mipsle && linux
172172 Len uint32
173173 Level int32
174174 Type int32
175 }
176
177 type ifreq struct {
178 Ifrn [16]byte
179 Ifru [16]byte
175180 }
176181
177182 const (
631636 PPS_FETCH = 0xc00470a4
632637 )
633638
634 type ifreq struct {
635 Ifrn [16]byte
636 Ifru [16]byte
637 }
639 const (
640 PIDFD_NONBLOCK = 0x80
641 )
642
643 type SysvIpcPerm struct {
644 Key int32
645 Uid uint32
646 Gid uint32
647 Cuid uint32
648 Cgid uint32
649 Mode uint32
650 _ [0]uint8
651 Seq uint16
652 _ uint16
653 _ uint32
654 _ uint32
655 }
656 type SysvShmDesc struct {
657 Perm SysvIpcPerm
658 Segsz uint32
659 Atime uint32
660 Dtime uint32
661 Ctime uint32
662 Cpid int32
663 Lpid int32
664 Nattch uint32
665 Atime_high uint16
666 Dtime_high uint16
667 Ctime_high uint16
668 _ uint16
669 }
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 //go:build ppc && linux
173173 Len uint32
174174 Level int32
175175 Type int32
176 }
177
178 type ifreq struct {
179 Ifrn [16]byte
180 Ifru [16]byte
176181 }
177182
178183 const (
637642 PPS_FETCH = 0xc00470a4
638643 )
639644
640 type ifreq struct {
641 Ifrn [16]byte
642 Ifru [16]byte
643 }
645 const (
646 PIDFD_NONBLOCK = 0x800
647 )
648
649 type SysvIpcPerm struct {
650 Key int32
651 Uid uint32
652 Gid uint32
653 Cuid uint32
654 Cgid uint32
655 Mode uint32
656 Seq uint32
657 _ uint32
658 _ uint64
659 _ uint64
660 }
661 type SysvShmDesc struct {
662 Perm SysvIpcPerm
663 Atime_high uint32
664 Atime uint32
665 Dtime_high uint32
666 Dtime uint32
667 Ctime_high uint32
668 Ctime uint32
669 _ uint32
670 Segsz uint32
671 Cpid int32
672 Lpid int32
673 Nattch uint32
674 _ uint32
675 _ uint32
676 _ [4]byte
677 }
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 //go:build ppc64 && linux
172172 Len uint64
173173 Level int32
174174 Type int32
175 }
176
177 type ifreq struct {
178 Ifrn [16]byte
179 Ifru [24]byte
175180 }
176181
177182 const (
637642 PPS_FETCH = 0xc00870a4
638643 )
639644
640 type ifreq struct {
641 Ifrn [16]byte
642 Ifru [24]byte
643 }
645 const (
646 PIDFD_NONBLOCK = 0x800
647 )
648
649 type SysvIpcPerm struct {
650 Key int32
651 Uid uint32
652 Gid uint32
653 Cuid uint32
654 Cgid uint32
655 Mode uint32
656 Seq uint32
657 _ uint32
658 _ uint64
659 _ uint64
660 }
661 type SysvShmDesc struct {
662 Perm SysvIpcPerm
663 Atime int64
664 Dtime int64
665 Ctime int64
666 Segsz uint64
667 Cpid int32
668 Lpid int32
669 Nattch uint64
670 _ uint64
671 _ uint64
672 }
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 //go:build ppc64le && linux
172172 Len uint64
173173 Level int32
174174 Type int32
175 }
176
177 type ifreq struct {
178 Ifrn [16]byte
179 Ifru [24]byte
175180 }
176181
177182 const (
637642 PPS_FETCH = 0xc00870a4
638643 )
639644
640 type ifreq struct {
641 Ifrn [16]byte
642 Ifru [24]byte
643 }
645 const (
646 PIDFD_NONBLOCK = 0x800
647 )
648
649 type SysvIpcPerm struct {
650 Key int32
651 Uid uint32
652 Gid uint32
653 Cuid uint32
654 Cgid uint32
655 Mode uint32
656 Seq uint32
657 _ uint32
658 _ uint64
659 _ uint64
660 }
661 type SysvShmDesc struct {
662 Perm SysvIpcPerm
663 Atime int64
664 Dtime int64
665 Ctime int64
666 Segsz uint64
667 Cpid int32
668 Lpid int32
669 Nattch uint64
670 _ uint64
671 _ uint64
672 }
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 //go:build riscv64 && linux
171171 Len uint64
172172 Level int32
173173 Type int32
174 }
175
176 type ifreq struct {
177 Ifrn [16]byte
178 Ifru [24]byte
174179 }
175180
176181 const (
655660 PPS_FETCH = 0xc00870a4
656661 )
657662
658 type ifreq struct {
659 Ifrn [16]byte
660 Ifru [24]byte
661 }
663 const (
664 PIDFD_NONBLOCK = 0x800
665 )
666
667 type SysvIpcPerm struct {
668 Key int32
669 Uid uint32
670 Gid uint32
671 Cuid uint32
672 Cgid uint32
673 Mode uint32
674 _ [0]uint8
675 Seq uint16
676 _ uint16
677 _ uint64
678 _ uint64
679 }
680 type SysvShmDesc struct {
681 Perm SysvIpcPerm
682 Segsz uint64
683 Atime int64
684 Dtime int64
685 Ctime int64
686 Cpid int32
687 Lpid int32
688 Nattch uint64
689 _ uint64
690 _ uint64
691 }
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/linux/types.go | go run mkpost.go
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/linux/types.go | go run mkpost.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 //go:build s390x && linux
170170 Len uint64
171171 Level int32
172172 Type int32
173 }
174
175 type ifreq struct {
176 Ifrn [16]byte
177 Ifru [24]byte
173178 }
174179
175180 const (
651656 PPS_FETCH = 0xc00870a4
652657 )
653658
654 type ifreq struct {
655 Ifrn [16]byte
656 Ifru [24]byte
657 }
659 const (
660 PIDFD_NONBLOCK = 0x800
661 )
662
663 type SysvIpcPerm struct {
664 Key int32
665 Uid uint32
666 Gid uint32
667 Cuid uint32
668 Cgid uint32
669 Mode uint32
670 _ uint16
671 Seq uint16
672 _ uint64
673 _ uint64
674 }
675 type SysvShmDesc struct {
676 Perm SysvIpcPerm
677 Segsz uint64
678 Atime int64
679 Dtime int64
680 Ctime int64
681 Cpid int32
682 Lpid int32
683 Nattch uint64
684 _ uint64
685 _ uint64
686 }
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
0 // cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
11 // Code generated by the command above; see README.md. DO NOT EDIT.
22
33 //go:build sparc64 && linux
174174 Len uint64
175175 Level int32
176176 Type int32
177 }
178
179 type ifreq struct {
180 Ifrn [16]byte
181 Ifru [24]byte
177182 }
178183
179184 const (
632637 PPS_FETCH = 0xc00870a4
633638 )
634639
635 type ifreq struct {
636 Ifrn [16]byte
637 Ifru [24]byte
638 }
640 const (
641 PIDFD_NONBLOCK = 0x4000
642 )
643
644 type SysvIpcPerm struct {
645 Key int32
646 Uid uint32
647 Gid uint32
648 Cuid uint32
649 Cgid uint32
650 Mode uint32
651 _ uint16
652 Seq uint16
653 _ uint64
654 _ uint64
655 }
656 type SysvShmDesc struct {
657 Perm SysvIpcPerm
658 Atime int64
659 Dtime int64
660 Ctime int64
661 Segsz uint64
662 Cpid int32
663 Lpid int32
664 Nattch uint64
665 _ uint64
666 _ uint64
667 }
563563 Kmapent int32
564564 }
565565
566 const SizeofClockinfo = 0x14
566 const SizeofClockinfo = 0x10
567567
568568 type Clockinfo struct {
569 Hz int32
570 Tick int32
571 Tickadj int32
572 Stathz int32
573 Profhz int32
574 }
569 Hz int32
570 Tick int32
571 Stathz int32
572 Profhz int32
573 }
563563 Kmapent int32
564564 }
565565
566 const SizeofClockinfo = 0x14
566 const SizeofClockinfo = 0x10
567567
568568 type Clockinfo struct {
569 Hz int32
570 Tick int32
571 Tickadj int32
572 Stathz int32
573 Profhz int32
574 }
569 Hz int32
570 Tick int32
571 Stathz int32
572 Profhz int32
573 }
564564 Kmapent int32
565565 }
566566
567 const SizeofClockinfo = 0x14
567 const SizeofClockinfo = 0x10
568568
569569 type Clockinfo struct {
570 Hz int32
571 Tick int32
572 Tickadj int32
573 Stathz int32
574 Profhz int32
575 }
570 Hz int32
571 Tick int32
572 Stathz int32
573 Profhz int32
574 }
557557 Kmapent int32
558558 }
559559
560 const SizeofClockinfo = 0x14
560 const SizeofClockinfo = 0x10
561561
562562 type Clockinfo struct {
563 Hz int32
564 Tick int32
565 Tickadj int32
566 Stathz int32
567 Profhz int32
568 }
563 Hz int32
564 Tick int32
565 Stathz int32
566 Profhz int32
567 }
557557 Kmapent int32
558558 }
559559
560 const SizeofClockinfo = 0x14
560 const SizeofClockinfo = 0x10
561561
562562 type Clockinfo struct {
563 Hz int32
564 Tick int32
565 Tickadj int32
566 Stathz int32
567 Profhz int32
568 }
563 Hz int32
564 Tick int32
565 Stathz int32
566 Profhz int32
567 }
439439 POLLWRBAND = 0x100
440440 POLLWRNORM = 0x4
441441 )
442
443 type fileObj struct {
444 Atim Timespec
445 Mtim Timespec
446 Ctim Timespec
447 Pad [3]uint64
448 Name *int8
449 }
450
451 type portEvent struct {
452 Events int32
453 Source uint16
454 Pad uint16
455 Object uint64
456 User *byte
457 }
458
459 const (
460 PORT_SOURCE_AIO = 0x1
461 PORT_SOURCE_TIMER = 0x2
462 PORT_SOURCE_USER = 0x3
463 PORT_SOURCE_FD = 0x4
464 PORT_SOURCE_ALERT = 0x5
465 PORT_SOURCE_MQ = 0x6
466 PORT_SOURCE_FILE = 0x7
467 PORT_ALERT_SET = 0x1
468 PORT_ALERT_UPDATE = 0x2
469 PORT_ALERT_INVALID = 0x3
470 FILE_ACCESS = 0x1
471 FILE_MODIFIED = 0x2
472 FILE_ATTRIB = 0x4
473 FILE_TRUNC = 0x100000
474 FILE_NOFOLLOW = 0x10000000
475 FILE_DELETE = 0x10
476 FILE_RENAME_TO = 0x20
477 FILE_RENAME_FROM = 0x40
478 UNMOUNTED = 0x20000000
479 MOUNTEDOVER = 0x40000000
480 FILE_EXCEPTION = 0x60000070
481 )
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 // +build windows
5 // +build go1.9
4 //go:build windows && go1.9
5 // +build windows,go1.9
66
77 package windows
88
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package windows
3434 QUOTA_LIMITS_HARDWS_MAX_DISABLE = 0x00000008
3535 QUOTA_LIMITS_HARDWS_MAX_ENABLE = 0x00000004
3636 )
37
38 type MemoryBasicInformation struct {
39 BaseAddress uintptr
40 AllocationBase uintptr
41 AllocationProtect uint32
42 PartitionId uint16
43 RegionSize uintptr
44 State uint32
45 Protect uint32
46 Type uint32
47 }
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build generate
45 // +build generate
56
67 package windows
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows && race
45 // +build windows,race
56
67 package windows
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows && !race
45 // +build windows,!race
56
67 package windows
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package registry
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 // Package registry provides access to the Windows registry.
2324
2425 import (
2526 "io"
27 "runtime"
2628 "syscall"
2729 "time"
2830 )
112114 // The parameter n controls the number of returned names,
113115 // analogous to the way os.File.Readdirnames works.
114116 func (k Key) ReadSubKeyNames(n int) ([]string, error) {
117 // RegEnumKeyEx must be called repeatedly and to completion.
118 // During this time, this goroutine cannot migrate away from
119 // its current thread. See https://golang.org/issue/49320 and
120 // https://golang.org/issue/49466.
121 runtime.LockOSThread()
122 defer runtime.UnlockOSThread()
123
115124 names := make([]string, 0)
116125 // Registry key size limit is 255 bytes and described there:
117126 // https://msdn.microsoft.com/library/windows/desktop/ms724872.aspx
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build generate
45 // +build generate
56
67 package registry
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package registry_test
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package registry
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package registry
888888 //sys WTSQueryUserToken(session uint32, token *Token) (err error) = wtsapi32.WTSQueryUserToken
889889 //sys WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) = wtsapi32.WTSEnumerateSessionsW
890890 //sys WTSFreeMemory(ptr uintptr) = wtsapi32.WTSFreeMemory
891 //sys WTSGetActiveConsoleSessionId() (sessionID uint32)
891892
892893 type ACL struct {
893894 aclRevision byte
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package windows
1415 SC_MANAGER_MODIFY_BOOT_CONFIG = 32
1516 SC_MANAGER_ALL_ACCESS = 0xf003f
1617 )
17
18 //sys OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenSCManagerW
1918
2019 const (
2120 SERVICE_KERNEL_DRIVER = 1
131130 SC_EVENT_DATABASE_CHANGE = 0
132131 SC_EVENT_PROPERTY_CHANGE = 1
133132 SC_EVENT_STATUS_CHANGE = 2
133
134 SERVICE_START_REASON_DEMAND = 0x00000001
135 SERVICE_START_REASON_AUTO = 0x00000002
136 SERVICE_START_REASON_TRIGGER = 0x00000004
137 SERVICE_START_REASON_RESTART_ON_FAILURE = 0x00000008
138 SERVICE_START_REASON_DELAYEDAUTO = 0x00000010
139
140 SERVICE_DYNAMIC_INFORMATION_LEVEL_START_REASON = 1
134141 )
135142
136143 type SERVICE_STATUS struct {
215222 LockDuration uint32
216223 }
217224
225 //sys OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenSCManagerW
218226 //sys CloseServiceHandle(handle Handle) (err error) = advapi32.CloseServiceHandle
219227 //sys CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) [failretval==0] = advapi32.CreateServiceW
220228 //sys OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenServiceW
234242 //sys NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) = advapi32.NotifyServiceStatusChangeW
235243 //sys SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) = sechost.SubscribeServiceChangeNotifications?
236244 //sys UnsubscribeServiceChangeNotifications(subscription uintptr) = sechost.UnsubscribeServiceChangeNotifications?
245 //sys RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) = advapi32.RegisterServiceCtrlHandlerExW
246 //sys QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInfo unsafe.Pointer) (err error) = advapi32.QueryServiceDynamicInformation?
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package windows
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package debug
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 // Package debug provides facilities to execute svc.Handler on console.
+0
-48
windows/svc/event.go less more
0 // Copyright 2012 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build windows
5
6 package svc
7
8 import (
9 "errors"
10
11 "golang.org/x/sys/windows"
12 )
13
14 // event represents auto-reset, initially non-signaled Windows event.
15 // It is used to communicate between go and asm parts of this package.
16 type event struct {
17 h windows.Handle
18 }
19
20 func newEvent() (*event, error) {
21 h, err := windows.CreateEvent(nil, 0, 0, nil)
22 if err != nil {
23 return nil, err
24 }
25 return &event{h: h}, nil
26 }
27
28 func (e *event) Close() error {
29 return windows.CloseHandle(e.h)
30 }
31
32 func (e *event) Set() error {
33 return windows.SetEvent(e.h)
34 }
35
36 func (e *event) Wait() error {
37 s, err := windows.WaitForSingleObject(e.h, windows.INFINITE)
38 switch s {
39 case windows.WAIT_OBJECT_0:
40 break
41 case windows.WAIT_FAILED:
42 return err
43 default:
44 return errors.New("unexpected result from WaitForSingleObject")
45 }
46 return nil
47 }
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package eventlog
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 // Package eventlog implements access to Windows event log.
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package eventlog_test
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package main
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package main
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 // Example service program that beeps.
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package main
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package main
+0
-24
windows/svc/go12.c less more
0 // Copyright 2012 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build windows
5 // +build !go1.3
6
7 // copied from pkg/runtime
8 typedef unsigned int uint32;
9 typedef unsigned long long int uint64;
10 #ifdef _64BIT
11 typedef uint64 uintptr;
12 #else
13 typedef uint32 uintptr;
14 #endif
15
16 // from sys_386.s or sys_amd64.s
17 void ·servicemain(void);
18
19 void
20 ·getServiceMain(uintptr *r)
21 {
22 *r = (uintptr)·servicemain;
23 }
+0
-11
windows/svc/go12.go less more
0 // Copyright 2014 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build windows
5 // +build !go1.3
6
7 package svc
8
9 // from go12.c
10 func getServiceMain(r *uintptr)
+0
-31
windows/svc/go13.go less more
0 // Copyright 2014 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // +build windows
5 // +build go1.3
6
7 package svc
8
9 import "unsafe"
10
11 const ptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const
12
13 // Should be a built-in for unsafe.Pointer?
14 func add(p unsafe.Pointer, x uintptr) unsafe.Pointer {
15 return unsafe.Pointer(uintptr(p) + x)
16 }
17
18 // funcPC returns the entry PC of the function f.
19 // It assumes that f is a func value. Otherwise the behavior is undefined.
20 func funcPC(f interface{}) uintptr {
21 return **(**uintptr)(add(unsafe.Pointer(&f), ptrSize))
22 }
23
24 // from sys_386.s and sys_amd64.s
25 func servicectlhandler(ctl uint32) uintptr
26 func servicemain(argc uint32, argv **uint16)
27
28 func getServiceMain(r *uintptr) {
29 *r = funcPC(servicemain)
30 }
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package mgr
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 // Package mgr can be used to manage Windows service programs.
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package mgr_test
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package mgr
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package mgr
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package svc
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 // Package svc provides everything required to build Windows service.
910
1011 import (
1112 "errors"
12 "runtime"
13 "syscall"
13 "sync"
1414 "unsafe"
1515
1616 "golang.org/x/sys/internal/unsafeheader"
7979 ServiceSpecificExitCode uint32 // set if the service has exited with a service-specific exit code
8080 }
8181
82 // StartReason is the reason that the service was started.
83 type StartReason uint32
84
85 const (
86 StartReasonDemand = StartReason(windows.SERVICE_START_REASON_DEMAND)
87 StartReasonAuto = StartReason(windows.SERVICE_START_REASON_AUTO)
88 StartReasonTrigger = StartReason(windows.SERVICE_START_REASON_TRIGGER)
89 StartReasonRestartOnFailure = StartReason(windows.SERVICE_START_REASON_RESTART_ON_FAILURE)
90 StartReasonDelayedAuto = StartReason(windows.SERVICE_START_REASON_DELAYEDAUTO)
91 )
92
8293 // ChangeRequest is sent to the service Handler to request service status change.
8394 type ChangeRequest struct {
8495 Cmd Cmd
90101
91102 // Handler is the interface that must be implemented to build Windows service.
92103 type Handler interface {
93
94104 // Execute will be called by the package code at the start of
95105 // the service, and the service will exit once Execute completes.
96106 // Inside Execute you must read service change requests from r and
105115 Execute(args []string, r <-chan ChangeRequest, s chan<- Status) (svcSpecificEC bool, exitCode uint32)
106116 }
107117
108 var (
109 // These are used by asm code.
110 goWaitsH uintptr
111 cWaitsH uintptr
112 ssHandle uintptr
113 sName *uint16
114 sArgc uintptr
115 sArgv **uint16
116 ctlHandlerExProc uintptr
117 cSetEvent uintptr
118 cWaitForSingleObject uintptr
119 cRegisterServiceCtrlHandlerExW uintptr
120 )
121
122 func init() {
123 k := windows.NewLazySystemDLL("kernel32.dll")
124 cSetEvent = k.NewProc("SetEvent").Addr()
125 cWaitForSingleObject = k.NewProc("WaitForSingleObject").Addr()
126 a := windows.NewLazySystemDLL("advapi32.dll")
127 cRegisterServiceCtrlHandlerExW = a.NewProc("RegisterServiceCtrlHandlerExW").Addr()
128 }
129
130118 type ctlEvent struct {
131119 cmd Cmd
132120 eventType uint32
139127 type service struct {
140128 name string
141129 h windows.Handle
142 cWaits *event
143 goWaits *event
144130 c chan ctlEvent
145131 handler Handler
146 }
147
148 func newService(name string, handler Handler) (*service, error) {
149 var s service
150 var err error
151 s.name = name
152 s.c = make(chan ctlEvent)
153 s.handler = handler
154 s.cWaits, err = newEvent()
155 if err != nil {
156 return nil, err
157 }
158 s.goWaits, err = newEvent()
159 if err != nil {
160 s.cWaits.Close()
161 return nil, err
162 }
163 return &s, nil
164 }
165
166 func (s *service) close() error {
167 s.cWaits.Close()
168 s.goWaits.Close()
169 return nil
170132 }
171133
172134 type exitCode struct {
223185 return windows.SetServiceStatus(s.h, &t)
224186 }
225187
226 const (
227 sysErrSetServiceStatusFailed = uint32(syscall.APPLICATION_ERROR) + iota
228 sysErrNewThreadInCallback
229 )
230
231 func (s *service) run() {
232 s.goWaits.Wait()
233 s.h = windows.Handle(ssHandle)
234
235 var argv []*uint16
236 hdr := (*unsafeheader.Slice)(unsafe.Pointer(&argv))
237 hdr.Data = unsafe.Pointer(sArgv)
238 hdr.Len = int(sArgc)
239 hdr.Cap = int(sArgc)
240
241 args := make([]string, len(argv))
242 for i, a := range argv {
188 var (
189 initCallbacks sync.Once
190 ctlHandlerCallback uintptr
191 serviceMainCallback uintptr
192 )
193
194 func ctlHandler(ctl, evtype, evdata, context uintptr) uintptr {
195 s := (*service)(unsafe.Pointer(context))
196 e := ctlEvent{cmd: Cmd(ctl), eventType: uint32(evtype), eventData: evdata, context: 123456} // Set context to 123456 to test issue #25660.
197 s.c <- e
198 return 0
199 }
200
201 var theService service // This is, unfortunately, a global, which means only one service per process.
202
203 // serviceMain is the entry point called by the service manager, registered earlier by
204 // the call to StartServiceCtrlDispatcher.
205 func serviceMain(argc uint32, argv **uint16) uintptr {
206 handle, err := windows.RegisterServiceCtrlHandlerEx(windows.StringToUTF16Ptr(theService.name), ctlHandlerCallback, uintptr(unsafe.Pointer(&theService)))
207 if sysErr, ok := err.(windows.Errno); ok {
208 return uintptr(sysErr)
209 } else if err != nil {
210 return uintptr(windows.ERROR_UNKNOWN_EXCEPTION)
211 }
212 theService.h = handle
213 defer func() {
214 theService.h = 0
215 }()
216 var args16 []*uint16
217 hdr := (*unsafeheader.Slice)(unsafe.Pointer(&args16))
218 hdr.Data = unsafe.Pointer(argv)
219 hdr.Len = int(argc)
220 hdr.Cap = int(argc)
221
222 args := make([]string, len(args16))
223 for i, a := range args16 {
243224 args[i] = windows.UTF16PtrToString(a)
244225 }
245226
248229 exitFromHandler := make(chan exitCode)
249230
250231 go func() {
251 ss, errno := s.handler.Execute(args, cmdsToHandler, changesFromHandler)
232 ss, errno := theService.handler.Execute(args, cmdsToHandler, changesFromHandler)
252233 exitFromHandler <- exitCode{ss, errno}
253234 }()
254235
257238 CurrentStatus: Status{State: Stopped},
258239 }
259240 var outch chan ChangeRequest
260 inch := s.c
241 inch := theService.c
261242 loop:
262243 for {
263244 select {
273254 outcr.EventData = r.eventData
274255 outcr.Context = r.context
275256 case outch <- outcr:
276 inch = s.c
257 inch = theService.c
277258 outch = nil
278259 case c := <-changesFromHandler:
279 err := s.updateStatus(&c, &ec)
260 err := theService.updateStatus(&c, &ec)
280261 if err != nil {
281 // best suitable error number
282 ec.errno = sysErrSetServiceStatusFailed
283 if err2, ok := err.(syscall.Errno); ok {
262 ec.errno = uint32(windows.ERROR_EXCEPTION_IN_SERVICE)
263 if err2, ok := err.(windows.Errno); ok {
284264 ec.errno = uint32(err2)
285265 }
286266 break loop
291271 }
292272 }
293273
294 s.updateStatus(&Status{State: Stopped}, &ec)
295 s.cWaits.Set()
296 }
297
298 func newCallback(fn interface{}) (cb uintptr, err error) {
299 defer func() {
300 r := recover()
301 if r == nil {
302 return
303 }
304 cb = 0
305 switch v := r.(type) {
306 case string:
307 err = errors.New(v)
308 case error:
309 err = v
310 default:
311 err = errors.New("unexpected panic in syscall.NewCallback")
312 }
313 }()
314 return syscall.NewCallback(fn), nil
315 }
316
317 // BUG(brainman): There is no mechanism to run multiple services
318 // inside one single executable. Perhaps, it can be overcome by
319 // using RegisterServiceCtrlHandlerEx Windows api.
274 theService.updateStatus(&Status{State: Stopped}, &ec)
275
276 return windows.NO_ERROR
277 }
320278
321279 // Run executes service name by calling appropriate handler function.
322280 func Run(name string, handler Handler) error {
323 runtime.LockOSThread()
324
325 tid := windows.GetCurrentThreadId()
326
327 s, err := newService(name, handler)
328 if err != nil {
329 return err
330 }
331
332 ctlHandler := func(ctl, evtype, evdata, context uintptr) uintptr {
333 e := ctlEvent{cmd: Cmd(ctl), eventType: uint32(evtype), eventData: evdata, context: context}
334 // We assume that this callback function is running on
335 // the same thread as Run. Nowhere in MS documentation
336 // I could find statement to guarantee that. So putting
337 // check here to verify, otherwise things will go bad
338 // quickly, if ignored.
339 i := windows.GetCurrentThreadId()
340 if i != tid {
341 e.errno = sysErrNewThreadInCallback
342 }
343 s.c <- e
344 // Always return NO_ERROR (0) for now.
345 return windows.NO_ERROR
346 }
347
348 var svcmain uintptr
349 getServiceMain(&svcmain)
281 initCallbacks.Do(func() {
282 ctlHandlerCallback = windows.NewCallback(ctlHandler)
283 serviceMainCallback = windows.NewCallback(serviceMain)
284 })
285 theService.name = name
286 theService.handler = handler
287 theService.c = make(chan ctlEvent)
350288 t := []windows.SERVICE_TABLE_ENTRY{
351 {ServiceName: syscall.StringToUTF16Ptr(s.name), ServiceProc: svcmain},
289 {ServiceName: windows.StringToUTF16Ptr(theService.name), ServiceProc: serviceMainCallback},
352290 {ServiceName: nil, ServiceProc: 0},
353291 }
354
355 goWaitsH = uintptr(s.goWaits.h)
356 cWaitsH = uintptr(s.cWaits.h)
357 sName = t[0].ServiceName
358 ctlHandlerExProc, err = newCallback(ctlHandler)
359 if err != nil {
360 return err
361 }
362
363 go s.run()
364
365 err = windows.StartServiceCtrlDispatcher(&t[0])
366 if err != nil {
367 return err
368 }
369 return nil
292 return windows.StartServiceCtrlDispatcher(&t[0])
370293 }
371294
372295 // StatusHandle returns service status handle. It is safe to call this function
373296 // from inside the Handler.Execute because then it is guaranteed to be set.
374 // This code will have to change once multiple services are possible per process.
375297 func StatusHandle() windows.Handle {
376 return windows.Handle(ssHandle)
377 }
298 return theService.h
299 }
300
301 // DynamicStartReason returns the reason why the service was started. It is safe
302 // to call this function from inside the Handler.Execute because then it is
303 // guaranteed to be set.
304 func DynamicStartReason() (StartReason, error) {
305 var allocReason *uint32
306 err := windows.QueryServiceDynamicInformation(theService.h, windows.SERVICE_DYNAMIC_INFORMATION_LEVEL_START_REASON, unsafe.Pointer(&allocReason))
307 if err != nil {
308 return 0, err
309 }
310 reason := StartReason(*allocReason)
311 windows.LocalFree(windows.Handle(unsafe.Pointer(allocReason)))
312 return reason, nil
313 }
7676 }
7777
7878 func TestExample(t *testing.T) {
79 if testing.Short() {
79 if testing.Short() && os.Getenv("GO_BUILDER_NAME") != "" {
8080 t.Skip("skipping test in short mode - it modifies system services")
8181 }
8282
+0
-67
windows/svc/sys_windows_386.s less more
0 // Copyright 2012 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // func servicemain(argc uint32, argv **uint16)
5 TEXT ·servicemain(SB),7,$0
6 MOVL argc+0(FP), AX
7 MOVL AX, ·sArgc(SB)
8 MOVL argv+4(FP), AX
9 MOVL AX, ·sArgv(SB)
10
11 PUSHL BP
12 PUSHL BX
13 PUSHL SI
14 PUSHL DI
15
16 SUBL $12, SP
17
18 MOVL ·sName(SB), AX
19 MOVL AX, (SP)
20 MOVL $·servicectlhandler(SB), AX
21 MOVL AX, 4(SP)
22 // Set context to 123456 to test issue #25660.
23 MOVL $123456, 8(SP)
24 MOVL ·cRegisterServiceCtrlHandlerExW(SB), AX
25 MOVL SP, BP
26 CALL AX
27 MOVL BP, SP
28 CMPL AX, $0
29 JE exit
30 MOVL AX, ·ssHandle(SB)
31
32 MOVL ·goWaitsH(SB), AX
33 MOVL AX, (SP)
34 MOVL ·cSetEvent(SB), AX
35 MOVL SP, BP
36 CALL AX
37 MOVL BP, SP
38
39 MOVL ·cWaitsH(SB), AX
40 MOVL AX, (SP)
41 MOVL $-1, AX
42 MOVL AX, 4(SP)
43 MOVL ·cWaitForSingleObject(SB), AX
44 MOVL SP, BP
45 CALL AX
46 MOVL BP, SP
47
48 exit:
49 ADDL $12, SP
50
51 POPL DI
52 POPL SI
53 POPL BX
54 POPL BP
55
56 MOVL 0(SP), CX
57 ADDL $12, SP
58 JMP CX
59
60 // I do not know why, but this seems to be the only way to call
61 // ctlHandlerProc on Windows 7.
62
63 // func servicectlhandler(ctl uint32, evtype uint32, evdata uintptr, context uintptr) uintptr {
64 TEXT ·servicectlhandler(SB),7,$0
65 MOVL ·ctlHandlerExProc(SB), CX
66 JMP CX
+0
-46
windows/svc/sys_windows_amd64.s less more
0 // Copyright 2012 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 // func servicemain(argc uint32, argv **uint16)
5 TEXT ·servicemain(SB),7,$0
6 MOVQ SP, AX
7 ANDQ $~15, SP // alignment as per Windows requirement
8 SUBQ $48, SP // room for SP and 4 args as per Windows requirement
9 // plus one extra word to keep stack 16 bytes aligned
10 MOVQ AX, 32(SP)
11
12 MOVL CX, ·sArgc(SB)
13 MOVQ DX, ·sArgv(SB)
14
15 MOVQ ·sName(SB), CX
16 MOVQ $·servicectlhandler(SB), DX
17 // BUG(pastarmovj): Figure out a way to pass in context in R8.
18 // Set context to 123456 to test issue #25660.
19 MOVQ $123456, R8
20 MOVQ ·cRegisterServiceCtrlHandlerExW(SB), AX
21 CALL AX
22 CMPQ AX, $0
23 JE exit
24 MOVQ AX, ·ssHandle(SB)
25
26 MOVQ ·goWaitsH(SB), CX
27 MOVQ ·cSetEvent(SB), AX
28 CALL AX
29
30 MOVQ ·cWaitsH(SB), CX
31 MOVQ $4294967295, DX
32 MOVQ ·cWaitForSingleObject(SB), AX
33 CALL AX
34
35 exit:
36 MOVQ 32(SP), SP
37 RET
38
39 // I do not know why, but this seems to be the only way to call
40 // ctlHandlerProc on Windows 7.
41
42 // func ·servicectlhandler(ctl uint32, evtype uint32, evdata uintptr, context uintptr) uintptr {
43 TEXT ·servicectlhandler(SB),7,$0
44 MOVQ ·ctlHandlerExProc(SB), AX
45 JMP AX
+0
-36
windows/svc/sys_windows_arm.s less more
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 #include "textflag.h"
5
6 // func servicemain(argc uint32, argv **uint16)
7 TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0
8 MOVM.DB.W [R4, R14], (R13) // push {r4, lr}
9 MOVW R13, R4
10 BIC $0x7, R13 // alignment for ABI
11
12 MOVW R0, ·sArgc(SB)
13 MOVW R1, ·sArgv(SB)
14
15 MOVW ·sName(SB), R0
16 MOVW ·ctlHandlerExProc(SB), R1
17 MOVW $0, R2
18 MOVW ·cRegisterServiceCtrlHandlerExW(SB), R3
19 BL (R3)
20 CMP $0, R0
21 BEQ exit
22 MOVW R0, ·ssHandle(SB)
23
24 MOVW ·goWaitsH(SB), R0
25 MOVW ·cSetEvent(SB), R1
26 BL (R1)
27
28 MOVW ·cWaitsH(SB), R0
29 MOVW $-1, R1
30 MOVW ·cWaitForSingleObject(SB), R2
31 BL (R2)
32
33 exit:
34 MOVW R4, R13 // free extra stack space
35 MOVM.IA.W (R13), [R4, R15] // pop {r4, pc}
+0
-31
windows/svc/sys_windows_arm64.s less more
0 // Copyright 2018 The Go Authors. All rights reserved.
1 // Use of this source code is governed by a BSD-style
2 // license that can be found in the LICENSE file.
3
4 #include "textflag.h"
5
6 // func servicemain(argc uint32, argv **uint16)
7 TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0
8 MOVD R0, ·sArgc(SB)
9 MOVD R1, ·sArgv(SB)
10
11 MOVD ·sName(SB), R0
12 MOVD ·ctlHandlerExProc(SB), R1
13 MOVD $0, R2
14 MOVD ·cRegisterServiceCtrlHandlerExW(SB), R3
15 BL (R3)
16 CMP $0, R0
17 BEQ exit
18 MOVD R0, ·ssHandle(SB)
19
20 MOVD ·goWaitsH(SB), R0
21 MOVD ·cSetEvent(SB), R1
22 BL (R1)
23
24 MOVD ·cWaitsH(SB), R0
25 MOVD $-1, R1
26 MOVD ·cWaitForSingleObject(SB), R2
27 BL (R2)
28
29 exit:
30 RET
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 // Package windows contains an interface to the low-level operating system
11 // Use of this source code is governed by a BSD-style
22 // license that can be found in the LICENSE file.
33
4 //go:build windows
45 // +build windows
56
67 package windows_test
273273 //sys VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) = kernel32.VirtualAlloc
274274 //sys VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) = kernel32.VirtualFree
275275 //sys VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) = kernel32.VirtualProtect
276 //sys VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect uint32, oldProtect *uint32) (err error) = kernel32.VirtualProtectEx
277 //sys VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) = kernel32.VirtualQuery
278 //sys VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) = kernel32.VirtualQueryEx
279 //sys ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesRead *uintptr) (err error) = kernel32.ReadProcessMemory
280 //sys WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesWritten *uintptr) (err error) = kernel32.WriteProcessMemory
276281 //sys TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) = mswsock.TransmitFile
277282 //sys ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) = kernel32.ReadDirectoryChangesW
278283 //sys FindFirstChangeNotification(path string, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.FindFirstChangeNotificationW
395400 //sys LoadResource(module Handle, resInfo Handle) (resData Handle, err error) = kernel32.LoadResource
396401 //sys LockResource(resData Handle) (addr uintptr, err error) = kernel32.LockResource
397402
403 // Version APIs
404 //sys GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32, err error) = version.GetFileVersionInfoSizeW
405 //sys GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) = version.GetFileVersionInfoW
406 //sys VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) = version.VerQueryValueW
407
398408 // Process Status API (PSAPI)
399409 //sys EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
410 //sys EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) = psapi.EnumProcessModules
411 //sys EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) = psapi.EnumProcessModulesEx
412 //sys GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) = psapi.GetModuleInformation
413 //sys GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) = psapi.GetModuleFileNameExW
414 //sys GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) = psapi.GetModuleBaseNameW
400415
401416 // NT Native APIs
402417 //sys rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) = ntdll.RtlNtStatusToDosErrorNoTeb
407422 //sys RtlInitString(destinationString *NTString, sourceString *byte) = ntdll.RtlInitString
408423 //sys NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) = ntdll.NtCreateFile
409424 //sys NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) = ntdll.NtCreateNamedPipeFile
425 //sys NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) = ntdll.NtSetInformationFile
410426 //sys RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToNtPathName_U_WithStatus
411427 //sys RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToRelativeNtPathName_U_WithStatus
412428 //sys RtlDefaultNpAcl(acl **ACL) (ntstatus error) = ntdll.RtlDefaultNpAcl
413429 //sys NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQueryInformationProcess
414430 //sys NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) = ntdll.NtSetInformationProcess
431 //sys NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQuerySystemInformation
432 //sys NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) = ntdll.NtSetSystemInformation
433 //sys RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) = ntdll.RtlAddFunctionTable
434 //sys RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) = ntdll.RtlDeleteFunctionTable
415435
416436 // syscall interface implementation for other packages
417437
872892 p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
873893 p[0] = byte(sa.Port >> 8)
874894 p[1] = byte(sa.Port)
875 for i := 0; i < len(sa.Addr); i++ {
876 sa.raw.Addr[i] = sa.Addr[i]
877 }
895 sa.raw.Addr = sa.Addr
878896 return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil
879897 }
880898
894912 p[0] = byte(sa.Port >> 8)
895913 p[1] = byte(sa.Port)
896914 sa.raw.Scope_id = sa.ZoneId
897 for i := 0; i < len(sa.Addr); i++ {
898 sa.raw.Addr[i] = sa.Addr[i]
899 }
915 sa.raw.Addr = sa.Addr
900916 return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil
901917 }
902918
969985 sa := new(SockaddrInet4)
970986 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
971987 sa.Port = int(p[0])<<8 + int(p[1])
972 for i := 0; i < len(sa.Addr); i++ {
973 sa.Addr[i] = pp.Addr[i]
974 }
988 sa.Addr = pp.Addr
975989 return sa, nil
976990
977991 case AF_INET6:
980994 p := (*[2]byte)(unsafe.Pointer(&pp.Port))
981995 sa.Port = int(p[0])<<8 + int(p[1])
982996 sa.ZoneId = pp.Scope_id
983 for i := 0; i < len(sa.Addr); i++ {
984 sa.Addr[i] = pp.Addr[i]
985 }
997 sa.Addr = pp.Addr
986998 return sa, nil
987999 }
9881000 return nil, syscall.EAFNOSUPPORT
1919 "testing"
2020 "unsafe"
2121
22 "golang.org/x/sys/internal/unsafeheader"
2223 "golang.org/x/sys/windows"
2324 )
2425
700701 }
701702
702703 }
704
705 func TestProcessModules(t *testing.T) {
706 process, err := windows.GetCurrentProcess()
707 if err != nil {
708 t.Fatalf("unable to get current process: %v", err)
709 }
710 // NB: Assume that we're always the first module. This technically isn't documented anywhere (that I could find), but seems to always hold.
711 var module windows.Handle
712 var cbNeeded uint32
713 err = windows.EnumProcessModules(process, &module, uint32(unsafe.Sizeof(module)), &cbNeeded)
714 if err != nil {
715 t.Fatalf("EnumProcessModules failed: %v", err)
716 }
717
718 var moduleEx windows.Handle
719 err = windows.EnumProcessModulesEx(process, &moduleEx, uint32(unsafe.Sizeof(moduleEx)), &cbNeeded, windows.LIST_MODULES_DEFAULT)
720 if err != nil {
721 t.Fatalf("EnumProcessModulesEx failed: %v", err)
722 }
723 if module != moduleEx {
724 t.Fatalf("module from EnumProcessModules does not match EnumProcessModulesEx: %v != %v", module, moduleEx)
725 }
726
727 exePath, err := os.Executable()
728 if err != nil {
729 t.Fatalf("unable to get current executable path: %v", err)
730 }
731
732 modulePathUTF16 := make([]uint16, len(exePath)+1)
733 err = windows.GetModuleFileNameEx(process, module, &modulePathUTF16[0], uint32(len(modulePathUTF16)))
734 if err != nil {
735 t.Fatalf("GetModuleFileNameEx failed: %v", err)
736 }
737
738 modulePath := windows.UTF16ToString(modulePathUTF16)
739 if modulePath != exePath {
740 t.Fatalf("module does not match executable for GetModuleFileNameEx: %s != %s", modulePath, exePath)
741 }
742
743 err = windows.GetModuleBaseName(process, module, &modulePathUTF16[0], uint32(len(modulePathUTF16)))
744 if err != nil {
745 t.Fatalf("GetModuleBaseName failed: %v", err)
746 }
747
748 modulePath = windows.UTF16ToString(modulePathUTF16)
749 baseExePath := filepath.Base(exePath)
750 if modulePath != baseExePath {
751 t.Fatalf("module does not match executable for GetModuleBaseName: %s != %s", modulePath, baseExePath)
752 }
753
754 var moduleInfo windows.ModuleInfo
755 err = windows.GetModuleInformation(process, module, &moduleInfo, uint32(unsafe.Sizeof(moduleInfo)))
756 if err != nil {
757 t.Fatalf("GetModuleInformation failed: %v", err)
758 }
759
760 peFile, err := pe.Open(exePath)
761 if err != nil {
762 t.Fatalf("unable to open current executable: %v", err)
763 }
764 defer peFile.Close()
765
766 var peSizeOfImage uint32
767 switch runtime.GOARCH {
768 case "amd64", "arm64":
769 peSizeOfImage = peFile.OptionalHeader.(*pe.OptionalHeader64).SizeOfImage
770 case "386", "arm":
771 peSizeOfImage = peFile.OptionalHeader.(*pe.OptionalHeader32).SizeOfImage
772 default:
773 t.Fatalf("unable to test GetModuleInformation on arch %v", runtime.GOARCH)
774 }
775
776 if moduleInfo.SizeOfImage != peSizeOfImage {
777 t.Fatalf("module size does not match executable: %v != %v", moduleInfo.SizeOfImage, peSizeOfImage)
778 }
779 }
780
781 func TestReadWriteProcessMemory(t *testing.T) {
782 testBuffer := []byte{0xBA, 0xAD, 0xF0, 0x0D}
783
784 process, err := windows.GetCurrentProcess()
785 if err != nil {
786 t.Fatalf("unable to get current process: %v", err)
787 }
788
789 buffer := make([]byte, len(testBuffer))
790 err = windows.ReadProcessMemory(process, uintptr(unsafe.Pointer(&testBuffer[0])), &buffer[0], uintptr(len(buffer)), nil)
791 if err != nil {
792 t.Errorf("ReadProcessMemory failed: %v", err)
793 }
794 if !bytes.Equal(testBuffer, buffer) {
795 t.Errorf("bytes read does not match buffer: 0x%X != 0x%X", testBuffer, buffer)
796 }
797
798 buffer = []byte{0xDE, 0xAD, 0xBE, 0xEF}
799 err = windows.WriteProcessMemory(process, uintptr(unsafe.Pointer(&testBuffer[0])), &buffer[0], uintptr(len(buffer)), nil)
800 if err != nil {
801 t.Errorf("WriteProcessMemory failed: %v", err)
802 }
803 if !bytes.Equal(testBuffer, buffer) {
804 t.Errorf("bytes written does not match buffer: 0x%X != 0x%X", testBuffer, buffer)
805 }
806 }
807
808 func TestSystemModuleVersions(t *testing.T) {
809 var modules []windows.RTL_PROCESS_MODULE_INFORMATION
810 for bufferSize := uint32(128 * 1024); ; {
811 moduleBuffer := make([]byte, bufferSize)
812 err := windows.NtQuerySystemInformation(windows.SystemModuleInformation, unsafe.Pointer(&moduleBuffer[0]), bufferSize, &bufferSize)
813 switch err {
814 case windows.STATUS_INFO_LENGTH_MISMATCH:
815 continue
816 case nil:
817 break
818 default:
819 t.Error(err)
820 return
821 }
822 mods := (*windows.RTL_PROCESS_MODULES)(unsafe.Pointer(&moduleBuffer[0]))
823 hdr := (*unsafeheader.Slice)(unsafe.Pointer(&modules))
824 hdr.Data = unsafe.Pointer(&mods.Modules[0])
825 hdr.Len = int(mods.NumberOfModules)
826 hdr.Cap = int(mods.NumberOfModules)
827 break
828 }
829 for i := range modules {
830 moduleName := windows.ByteSliceToString(modules[i].FullPathName[modules[i].OffsetToFileName:])
831 driverPath := `\\?\GLOBALROOT` + windows.ByteSliceToString(modules[i].FullPathName[:])
832 var zero windows.Handle
833 infoSize, err := windows.GetFileVersionInfoSize(driverPath, &zero)
834 if err != nil {
835 if err != windows.ERROR_FILE_NOT_FOUND {
836 t.Error(err)
837 }
838 continue
839 }
840 versionInfo := make([]byte, infoSize)
841 err = windows.GetFileVersionInfo(driverPath, 0, infoSize, unsafe.Pointer(&versionInfo[0]))
842 if err != nil && err != windows.ERROR_FILE_NOT_FOUND {
843 t.Error(err)
844 continue
845 }
846 var fixedInfo *windows.VS_FIXEDFILEINFO
847 fixedInfoLen := uint32(unsafe.Sizeof(*fixedInfo))
848 err = windows.VerQueryValue(unsafe.Pointer(&versionInfo[0]), `\`, (unsafe.Pointer)(&fixedInfo), &fixedInfoLen)
849 if err != nil {
850 t.Error(err)
851 continue
852 }
853 t.Logf("%s: v%d.%d.%d.%d", moduleName,
854 (fixedInfo.FileVersionMS>>16)&0xff,
855 (fixedInfo.FileVersionMS>>0)&0xff,
856 (fixedInfo.FileVersionLS>>16)&0xff,
857 (fixedInfo.FileVersionLS>>0)&0xff)
858 }
859 }
860
861 type fileRenameInformation struct {
862 ReplaceIfExists uint32
863 RootDirectory windows.Handle
864 FileNameLength uint32
865 FileName [1]uint16
866 }
867
868 func TestNtCreateFileAndNtSetInformationFile(t *testing.T) {
869 var iosb windows.IO_STATUS_BLOCK
870 var allocSize int64 = 0
871 // Open test directory with NtCreateFile.
872 testDirPath := t.TempDir()
873 objectName, err := windows.NewNTUnicodeString("\\??\\" + testDirPath)
874 if err != nil {
875 t.Fatal(err)
876 }
877 oa := &windows.OBJECT_ATTRIBUTES{
878 ObjectName: objectName,
879 }
880 oa.Length = uint32(unsafe.Sizeof(*oa))
881 var testDirHandle windows.Handle
882 err = windows.NtCreateFile(&testDirHandle, windows.FILE_GENERIC_READ|windows.FILE_GENERIC_WRITE, oa, &iosb,
883 &allocSize, 0, windows.FILE_SHARE_READ|windows.FILE_SHARE_WRITE|windows.FILE_SHARE_DELETE, windows.FILE_OPEN,
884 windows.FILE_DIRECTORY_FILE, 0, 0)
885 if err != nil {
886 t.Fatalf("NtCreateFile(%v) failed: %v", testDirPath, err)
887 }
888 defer windows.CloseHandle(testDirHandle)
889 // Create a file in test directory with NtCreateFile.
890 fileName := "filename"
891 filePath := filepath.Join(testDirPath, fileName)
892 objectName, err = windows.NewNTUnicodeString(fileName)
893 if err != nil {
894 t.Fatal(err)
895 }
896 oa.RootDirectory = testDirHandle
897 oa.ObjectName = objectName
898 var fileHandle windows.Handle
899 err = windows.NtCreateFile(&fileHandle, windows.FILE_GENERIC_READ|windows.FILE_GENERIC_WRITE|windows.DELETE, oa, &iosb,
900 &allocSize, 0, windows.FILE_SHARE_READ|windows.FILE_SHARE_WRITE|windows.FILE_SHARE_DELETE, windows.FILE_CREATE,
901 0, 0, 0)
902 if err != nil {
903 t.Fatalf("NtCreateFile(%v) failed: %v", filePath, err)
904 }
905 defer windows.CloseHandle(fileHandle)
906 _, err = os.Stat(filePath)
907 if err != nil {
908 t.Fatalf("cannot stat file created with NtCreatefile: %v", err)
909 }
910 // Rename file with NtSetInformationFile.
911 newName := "newname"
912 newPath := filepath.Join(testDirPath, newName)
913 newNameUTF16, err := windows.UTF16FromString(newName)
914 if err != nil {
915 t.Fatal(err)
916 }
917 fileNameLen := len(newNameUTF16)*2 - 2
918 var dummyFileRenameInfo fileRenameInformation
919 bufferSize := int(unsafe.Offsetof(dummyFileRenameInfo.FileName)) + fileNameLen
920 buffer := make([]byte, bufferSize)
921 typedBufferPtr := (*fileRenameInformation)(unsafe.Pointer(&buffer[0]))
922 typedBufferPtr.ReplaceIfExists = windows.FILE_RENAME_REPLACE_IF_EXISTS | windows.FILE_RENAME_POSIX_SEMANTICS
923 typedBufferPtr.FileNameLength = uint32(fileNameLen)
924 copy((*[windows.MAX_LONG_PATH]uint16)(unsafe.Pointer(&typedBufferPtr.FileName[0]))[:fileNameLen/2:fileNameLen/2], newNameUTF16)
925 err = windows.NtSetInformationFile(fileHandle, &iosb, &buffer[0], uint32(bufferSize), windows.FileRenameInformation)
926 if err != nil {
927 t.Fatalf("NtSetInformationFile(%v) failed: %v", newPath, err)
928 }
929 _, err = os.Stat(newPath)
930 if err != nil {
931 t.Fatalf("cannot stat rename target %v: %v", newPath, err)
932 }
933 }
6565 }
6666
6767 const (
68 FILE_LIST_DIRECTORY = 0x00000001
68 FILE_READ_DATA = 0x00000001
69 FILE_READ_ATTRIBUTES = 0x00000080
70 FILE_READ_EA = 0x00000008
71 FILE_WRITE_DATA = 0x00000002
72 FILE_WRITE_ATTRIBUTES = 0x00000100
73 FILE_WRITE_EA = 0x00000010
6974 FILE_APPEND_DATA = 0x00000004
70 FILE_WRITE_ATTRIBUTES = 0x00000100
75 FILE_EXECUTE = 0x00000020
76
77 FILE_GENERIC_READ = STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE
78 FILE_GENERIC_WRITE = STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE
79 FILE_GENERIC_EXECUTE = STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE
80
81 FILE_LIST_DIRECTORY = 0x00000001
82 FILE_TRAVERSE = 0x00000020
7183
7284 FILE_SHARE_READ = 0x00000001
7385 FILE_SHARE_WRITE = 0x00000002
239251 TH32CS_SNAPMODULE32 = 0x10
240252 TH32CS_SNAPALL = TH32CS_SNAPHEAPLIST | TH32CS_SNAPMODULE | TH32CS_SNAPPROCESS | TH32CS_SNAPTHREAD
241253 TH32CS_INHERIT = 0x80000000
254 )
255
256 const (
257 // flags for EnumProcessModulesEx
258 LIST_MODULES_32BIT = 0x01
259 LIST_MODULES_64BIT = 0x02
260 LIST_MODULES_ALL = 0x03
261 LIST_MODULES_DEFAULT = 0x00
242262 )
243263
244264 const (
17801800 }
17811801
17821802 const (
1783 FSCTL_GET_REPARSE_POINT = 0x900A8
1803 FSCTL_CREATE_OR_GET_OBJECT_ID = 0x0900C0
1804 FSCTL_DELETE_OBJECT_ID = 0x0900A0
1805 FSCTL_DELETE_REPARSE_POINT = 0x0900AC
1806 FSCTL_DUPLICATE_EXTENTS_TO_FILE = 0x098344
1807 FSCTL_DUPLICATE_EXTENTS_TO_FILE_EX = 0x0983E8
1808 FSCTL_FILESYSTEM_GET_STATISTICS = 0x090060
1809 FSCTL_FILE_LEVEL_TRIM = 0x098208
1810 FSCTL_FIND_FILES_BY_SID = 0x09008F
1811 FSCTL_GET_COMPRESSION = 0x09003C
1812 FSCTL_GET_INTEGRITY_INFORMATION = 0x09027C
1813 FSCTL_GET_NTFS_VOLUME_DATA = 0x090064
1814 FSCTL_GET_REFS_VOLUME_DATA = 0x0902D8
1815 FSCTL_GET_OBJECT_ID = 0x09009C
1816 FSCTL_GET_REPARSE_POINT = 0x0900A8
1817 FSCTL_GET_RETRIEVAL_POINTER_COUNT = 0x09042B
1818 FSCTL_GET_RETRIEVAL_POINTERS = 0x090073
1819 FSCTL_GET_RETRIEVAL_POINTERS_AND_REFCOUNT = 0x0903D3
1820 FSCTL_IS_PATHNAME_VALID = 0x09002C
1821 FSCTL_LMR_SET_LINK_TRACKING_INFORMATION = 0x1400EC
1822 FSCTL_MARK_HANDLE = 0x0900FC
1823 FSCTL_OFFLOAD_READ = 0x094264
1824 FSCTL_OFFLOAD_WRITE = 0x098268
1825 FSCTL_PIPE_PEEK = 0x11400C
1826 FSCTL_PIPE_TRANSCEIVE = 0x11C017
1827 FSCTL_PIPE_WAIT = 0x110018
1828 FSCTL_QUERY_ALLOCATED_RANGES = 0x0940CF
1829 FSCTL_QUERY_FAT_BPB = 0x090058
1830 FSCTL_QUERY_FILE_REGIONS = 0x090284
1831 FSCTL_QUERY_ON_DISK_VOLUME_INFO = 0x09013C
1832 FSCTL_QUERY_SPARING_INFO = 0x090138
1833 FSCTL_READ_FILE_USN_DATA = 0x0900EB
1834 FSCTL_RECALL_FILE = 0x090117
1835 FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT = 0x090440
1836 FSCTL_SET_COMPRESSION = 0x09C040
1837 FSCTL_SET_DEFECT_MANAGEMENT = 0x098134
1838 FSCTL_SET_ENCRYPTION = 0x0900D7
1839 FSCTL_SET_INTEGRITY_INFORMATION = 0x09C280
1840 FSCTL_SET_INTEGRITY_INFORMATION_EX = 0x090380
1841 FSCTL_SET_OBJECT_ID = 0x090098
1842 FSCTL_SET_OBJECT_ID_EXTENDED = 0x0900BC
1843 FSCTL_SET_REPARSE_POINT = 0x0900A4
1844 FSCTL_SET_SPARSE = 0x0900C4
1845 FSCTL_SET_ZERO_DATA = 0x0980C8
1846 FSCTL_SET_ZERO_ON_DEALLOCATION = 0x090194
1847 FSCTL_SIS_COPYFILE = 0x090100
1848 FSCTL_WRITE_USN_CLOSE_RECORD = 0x0900EF
1849
17841850 MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16 * 1024
17851851 IO_REPARSE_TAG_MOUNT_POINT = 0xA0000003
17861852 IO_REPARSE_TAG_SYMLINK = 0xA000000C
22992365 Blink *LIST_ENTRY
23002366 }
23012367
2368 type RUNTIME_FUNCTION struct {
2369 BeginAddress uint32
2370 EndAddress uint32
2371 UnwindData uint32
2372 }
2373
23022374 type LDR_DATA_TABLE_ENTRY struct {
23032375 reserved1 [2]uintptr
23042376 InMemoryOrderLinks LIST_ENTRY
24872559
24882560 FILE_PIPE_CLIENT_END = 0x00000000
24892561 FILE_PIPE_SERVER_END = 0x00000001
2562 )
2563
2564 const (
2565 // FileInformationClass for NtSetInformationFile
2566 FileBasicInformation = 4
2567 FileRenameInformation = 10
2568 FileDispositionInformation = 13
2569 FilePositionInformation = 14
2570 FileEndOfFileInformation = 20
2571 FileValidDataLengthInformation = 39
2572 FileShortNameInformation = 40
2573 FileIoPriorityHintInformation = 43
2574 FileReplaceCompletionInformation = 61
2575 FileDispositionInformationEx = 64
2576 FileCaseSensitiveInformation = 71
2577 FileLinkInformation = 72
2578 FileCaseSensitiveInformationForceAccessCheck = 75
2579 FileKnownFolderInformation = 76
2580
2581 // Flags for FILE_RENAME_INFORMATION
2582 FILE_RENAME_REPLACE_IF_EXISTS = 0x00000001
2583 FILE_RENAME_POSIX_SEMANTICS = 0x00000002
2584 FILE_RENAME_SUPPRESS_PIN_STATE_INHERITANCE = 0x00000004
2585 FILE_RENAME_SUPPRESS_STORAGE_RESERVE_INHERITANCE = 0x00000008
2586 FILE_RENAME_NO_INCREASE_AVAILABLE_SPACE = 0x00000010
2587 FILE_RENAME_NO_DECREASE_AVAILABLE_SPACE = 0x00000020
2588 FILE_RENAME_PRESERVE_AVAILABLE_SPACE = 0x00000030
2589 FILE_RENAME_IGNORE_READONLY_ATTRIBUTE = 0x00000040
2590 FILE_RENAME_FORCE_RESIZE_TARGET_SR = 0x00000080
2591 FILE_RENAME_FORCE_RESIZE_SOURCE_SR = 0x00000100
2592 FILE_RENAME_FORCE_RESIZE_SR = 0x00000180
2593
2594 // Flags for FILE_DISPOSITION_INFORMATION_EX
2595 FILE_DISPOSITION_DO_NOT_DELETE = 0x00000000
2596 FILE_DISPOSITION_DELETE = 0x00000001
2597 FILE_DISPOSITION_POSIX_SEMANTICS = 0x00000002
2598 FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK = 0x00000004
2599 FILE_DISPOSITION_ON_CLOSE = 0x00000008
2600 FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE = 0x00000010
2601
2602 // Flags for FILE_CASE_SENSITIVE_INFORMATION
2603 FILE_CS_FLAG_CASE_SENSITIVE_DIR = 0x00000001
2604
2605 // Flags for FILE_LINK_INFORMATION
2606 FILE_LINK_REPLACE_IF_EXISTS = 0x00000001
2607 FILE_LINK_POSIX_SEMANTICS = 0x00000002
2608 FILE_LINK_SUPPRESS_STORAGE_RESERVE_INHERITANCE = 0x00000008
2609 FILE_LINK_NO_INCREASE_AVAILABLE_SPACE = 0x00000010
2610 FILE_LINK_NO_DECREASE_AVAILABLE_SPACE = 0x00000020
2611 FILE_LINK_PRESERVE_AVAILABLE_SPACE = 0x00000030
2612 FILE_LINK_IGNORE_READONLY_ATTRIBUTE = 0x00000040
2613 FILE_LINK_FORCE_RESIZE_TARGET_SR = 0x00000080
2614 FILE_LINK_FORCE_RESIZE_SOURCE_SR = 0x00000100
2615 FILE_LINK_FORCE_RESIZE_SR = 0x00000180
24902616 )
24912617
24922618 // ProcessInformationClasses for NtQueryInformationProcess and NtSetInformationProcess.
26052731 InheritedFromUniqueProcessId uintptr
26062732 }
26072733
2734 // SystemInformationClasses for NtQuerySystemInformation and NtSetSystemInformation
2735 const (
2736 SystemBasicInformation = iota
2737 SystemProcessorInformation
2738 SystemPerformanceInformation
2739 SystemTimeOfDayInformation
2740 SystemPathInformation
2741 SystemProcessInformation
2742 SystemCallCountInformation
2743 SystemDeviceInformation
2744 SystemProcessorPerformanceInformation
2745 SystemFlagsInformation
2746 SystemCallTimeInformation
2747 SystemModuleInformation
2748 SystemLocksInformation
2749 SystemStackTraceInformation
2750 SystemPagedPoolInformation
2751 SystemNonPagedPoolInformation
2752 SystemHandleInformation
2753 SystemObjectInformation
2754 SystemPageFileInformation
2755 SystemVdmInstemulInformation
2756 SystemVdmBopInformation
2757 SystemFileCacheInformation
2758 SystemPoolTagInformation
2759 SystemInterruptInformation
2760 SystemDpcBehaviorInformation
2761 SystemFullMemoryInformation
2762 SystemLoadGdiDriverInformation
2763 SystemUnloadGdiDriverInformation
2764 SystemTimeAdjustmentInformation
2765 SystemSummaryMemoryInformation
2766 SystemMirrorMemoryInformation
2767 SystemPerformanceTraceInformation
2768 systemObsolete0
2769 SystemExceptionInformation
2770 SystemCrashDumpStateInformation
2771 SystemKernelDebuggerInformation
2772 SystemContextSwitchInformation
2773 SystemRegistryQuotaInformation
2774 SystemExtendServiceTableInformation
2775 SystemPrioritySeperation
2776 SystemVerifierAddDriverInformation
2777 SystemVerifierRemoveDriverInformation
2778 SystemProcessorIdleInformation
2779 SystemLegacyDriverInformation
2780 SystemCurrentTimeZoneInformation
2781 SystemLookasideInformation
2782 SystemTimeSlipNotification
2783 SystemSessionCreate
2784 SystemSessionDetach
2785 SystemSessionInformation
2786 SystemRangeStartInformation
2787 SystemVerifierInformation
2788 SystemVerifierThunkExtend
2789 SystemSessionProcessInformation
2790 SystemLoadGdiDriverInSystemSpace
2791 SystemNumaProcessorMap
2792 SystemPrefetcherInformation
2793 SystemExtendedProcessInformation
2794 SystemRecommendedSharedDataAlignment
2795 SystemComPlusPackage
2796 SystemNumaAvailableMemory
2797 SystemProcessorPowerInformation
2798 SystemEmulationBasicInformation
2799 SystemEmulationProcessorInformation
2800 SystemExtendedHandleInformation
2801 SystemLostDelayedWriteInformation
2802 SystemBigPoolInformation
2803 SystemSessionPoolTagInformation
2804 SystemSessionMappedViewInformation
2805 SystemHotpatchInformation
2806 SystemObjectSecurityMode
2807 SystemWatchdogTimerHandler
2808 SystemWatchdogTimerInformation
2809 SystemLogicalProcessorInformation
2810 SystemWow64SharedInformationObsolete
2811 SystemRegisterFirmwareTableInformationHandler
2812 SystemFirmwareTableInformation
2813 SystemModuleInformationEx
2814 SystemVerifierTriageInformation
2815 SystemSuperfetchInformation
2816 SystemMemoryListInformation
2817 SystemFileCacheInformationEx
2818 SystemThreadPriorityClientIdInformation
2819 SystemProcessorIdleCycleTimeInformation
2820 SystemVerifierCancellationInformation
2821 SystemProcessorPowerInformationEx
2822 SystemRefTraceInformation
2823 SystemSpecialPoolInformation
2824 SystemProcessIdInformation
2825 SystemErrorPortInformation
2826 SystemBootEnvironmentInformation
2827 SystemHypervisorInformation
2828 SystemVerifierInformationEx
2829 SystemTimeZoneInformation
2830 SystemImageFileExecutionOptionsInformation
2831 SystemCoverageInformation
2832 SystemPrefetchPatchInformation
2833 SystemVerifierFaultsInformation
2834 SystemSystemPartitionInformation
2835 SystemSystemDiskInformation
2836 SystemProcessorPerformanceDistribution
2837 SystemNumaProximityNodeInformation
2838 SystemDynamicTimeZoneInformation
2839 SystemCodeIntegrityInformation
2840 SystemProcessorMicrocodeUpdateInformation
2841 SystemProcessorBrandString
2842 SystemVirtualAddressInformation
2843 SystemLogicalProcessorAndGroupInformation
2844 SystemProcessorCycleTimeInformation
2845 SystemStoreInformation
2846 SystemRegistryAppendString
2847 SystemAitSamplingValue
2848 SystemVhdBootInformation
2849 SystemCpuQuotaInformation
2850 SystemNativeBasicInformation
2851 systemSpare1
2852 SystemLowPriorityIoInformation
2853 SystemTpmBootEntropyInformation
2854 SystemVerifierCountersInformation
2855 SystemPagedPoolInformationEx
2856 SystemSystemPtesInformationEx
2857 SystemNodeDistanceInformation
2858 SystemAcpiAuditInformation
2859 SystemBasicPerformanceInformation
2860 SystemQueryPerformanceCounterInformation
2861 SystemSessionBigPoolInformation
2862 SystemBootGraphicsInformation
2863 SystemScrubPhysicalMemoryInformation
2864 SystemBadPageInformation
2865 SystemProcessorProfileControlArea
2866 SystemCombinePhysicalMemoryInformation
2867 SystemEntropyInterruptTimingCallback
2868 SystemConsoleInformation
2869 SystemPlatformBinaryInformation
2870 SystemThrottleNotificationInformation
2871 SystemHypervisorProcessorCountInformation
2872 SystemDeviceDataInformation
2873 SystemDeviceDataEnumerationInformation
2874 SystemMemoryTopologyInformation
2875 SystemMemoryChannelInformation
2876 SystemBootLogoInformation
2877 SystemProcessorPerformanceInformationEx
2878 systemSpare0
2879 SystemSecureBootPolicyInformation
2880 SystemPageFileInformationEx
2881 SystemSecureBootInformation
2882 SystemEntropyInterruptTimingRawInformation
2883 SystemPortableWorkspaceEfiLauncherInformation
2884 SystemFullProcessInformation
2885 SystemKernelDebuggerInformationEx
2886 SystemBootMetadataInformation
2887 SystemSoftRebootInformation
2888 SystemElamCertificateInformation
2889 SystemOfflineDumpConfigInformation
2890 SystemProcessorFeaturesInformation
2891 SystemRegistryReconciliationInformation
2892 SystemEdidInformation
2893 SystemManufacturingInformation
2894 SystemEnergyEstimationConfigInformation
2895 SystemHypervisorDetailInformation
2896 SystemProcessorCycleStatsInformation
2897 SystemVmGenerationCountInformation
2898 SystemTrustedPlatformModuleInformation
2899 SystemKernelDebuggerFlags
2900 SystemCodeIntegrityPolicyInformation
2901 SystemIsolatedUserModeInformation
2902 SystemHardwareSecurityTestInterfaceResultsInformation
2903 SystemSingleModuleInformation
2904 SystemAllowedCpuSetsInformation
2905 SystemDmaProtectionInformation
2906 SystemInterruptCpuSetsInformation
2907 SystemSecureBootPolicyFullInformation
2908 SystemCodeIntegrityPolicyFullInformation
2909 SystemAffinitizedInterruptProcessorInformation
2910 SystemRootSiloInformation
2911 )
2912
2913 type RTL_PROCESS_MODULE_INFORMATION struct {
2914 Section Handle
2915 MappedBase uintptr
2916 ImageBase uintptr
2917 ImageSize uint32
2918 Flags uint32
2919 LoadOrderIndex uint16
2920 InitOrderIndex uint16
2921 LoadCount uint16
2922 OffsetToFileName uint16
2923 FullPathName [256]byte
2924 }
2925
2926 type RTL_PROCESS_MODULES struct {
2927 NumberOfModules uint32
2928 Modules [1]RTL_PROCESS_MODULE_INFORMATION
2929 }
2930
26082931 // Constants for LocalAlloc flags.
26092932 const (
26102933 LMEM_FIXED = 0x0
26983021 RT_HTML ResourceID = 23
26993022 RT_MANIFEST ResourceID = 24
27003023 )
3024
3025 type VS_FIXEDFILEINFO struct {
3026 Signature uint32
3027 StrucVersion uint32
3028 FileVersionMS uint32
3029 FileVersionLS uint32
3030 ProductVersionMS uint32
3031 ProductVersionLS uint32
3032 FileFlagsMask uint32
3033 FileFlags uint32
3034 FileOS uint32
3035 FileType uint32
3036 FileSubtype uint32
3037 FileDateMS uint32
3038 FileDateLS uint32
3039 }
27013040
27023041 type COAUTHIDENTITY struct {
27033042 User *uint16
27723111
27733112 // Flag for QueryFullProcessImageName.
27743113 const PROCESS_NAME_NATIVE = 1
3114
3115 type ModuleInfo struct {
3116 BaseOfDll uintptr
3117 SizeOfImage uint32
3118 EntryPoint uintptr
3119 }
5050 modshell32 = NewLazySystemDLL("shell32.dll")
5151 moduser32 = NewLazySystemDLL("user32.dll")
5252 moduserenv = NewLazySystemDLL("userenv.dll")
53 modversion = NewLazySystemDLL("version.dll")
5354 modwintrust = NewLazySystemDLL("wintrust.dll")
5455 modws2_32 = NewLazySystemDLL("ws2_32.dll")
5556 modwtsapi32 = NewLazySystemDLL("wtsapi32.dll")
113114 procOpenThreadToken = modadvapi32.NewProc("OpenThreadToken")
114115 procQueryServiceConfig2W = modadvapi32.NewProc("QueryServiceConfig2W")
115116 procQueryServiceConfigW = modadvapi32.NewProc("QueryServiceConfigW")
117 procQueryServiceDynamicInformation = modadvapi32.NewProc("QueryServiceDynamicInformation")
116118 procQueryServiceLockStatusW = modadvapi32.NewProc("QueryServiceLockStatusW")
117119 procQueryServiceStatus = modadvapi32.NewProc("QueryServiceStatus")
118120 procQueryServiceStatusEx = modadvapi32.NewProc("QueryServiceStatusEx")
123125 procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfoKeyW")
124126 procRegQueryValueExW = modadvapi32.NewProc("RegQueryValueExW")
125127 procRegisterEventSourceW = modadvapi32.NewProc("RegisterEventSourceW")
128 procRegisterServiceCtrlHandlerExW = modadvapi32.NewProc("RegisterServiceCtrlHandlerExW")
126129 procReportEventW = modadvapi32.NewProc("ReportEventW")
127130 procRevertToSelf = modadvapi32.NewProc("RevertToSelf")
128131 procSetEntriesInAclW = modadvapi32.NewProc("SetEntriesInAclW")
302305 procReadConsoleW = modkernel32.NewProc("ReadConsoleW")
303306 procReadDirectoryChangesW = modkernel32.NewProc("ReadDirectoryChangesW")
304307 procReadFile = modkernel32.NewProc("ReadFile")
308 procReadProcessMemory = modkernel32.NewProc("ReadProcessMemory")
305309 procReleaseMutex = modkernel32.NewProc("ReleaseMutex")
306310 procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW")
307311 procResetEvent = modkernel32.NewProc("ResetEvent")
344348 procVirtualFree = modkernel32.NewProc("VirtualFree")
345349 procVirtualLock = modkernel32.NewProc("VirtualLock")
346350 procVirtualProtect = modkernel32.NewProc("VirtualProtect")
351 procVirtualProtectEx = modkernel32.NewProc("VirtualProtectEx")
352 procVirtualQuery = modkernel32.NewProc("VirtualQuery")
353 procVirtualQueryEx = modkernel32.NewProc("VirtualQueryEx")
347354 procVirtualUnlock = modkernel32.NewProc("VirtualUnlock")
355 procWTSGetActiveConsoleSessionId = modkernel32.NewProc("WTSGetActiveConsoleSessionId")
348356 procWaitForMultipleObjects = modkernel32.NewProc("WaitForMultipleObjects")
349357 procWaitForSingleObject = modkernel32.NewProc("WaitForSingleObject")
350358 procWriteConsoleW = modkernel32.NewProc("WriteConsoleW")
351359 procWriteFile = modkernel32.NewProc("WriteFile")
360 procWriteProcessMemory = modkernel32.NewProc("WriteProcessMemory")
352361 procAcceptEx = modmswsock.NewProc("AcceptEx")
353362 procGetAcceptExSockaddrs = modmswsock.NewProc("GetAcceptExSockaddrs")
354363 procTransmitFile = modmswsock.NewProc("TransmitFile")
358367 procNtCreateFile = modntdll.NewProc("NtCreateFile")
359368 procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile")
360369 procNtQueryInformationProcess = modntdll.NewProc("NtQueryInformationProcess")
370 procNtQuerySystemInformation = modntdll.NewProc("NtQuerySystemInformation")
371 procNtSetInformationFile = modntdll.NewProc("NtSetInformationFile")
361372 procNtSetInformationProcess = modntdll.NewProc("NtSetInformationProcess")
373 procNtSetSystemInformation = modntdll.NewProc("NtSetSystemInformation")
374 procRtlAddFunctionTable = modntdll.NewProc("RtlAddFunctionTable")
362375 procRtlDefaultNpAcl = modntdll.NewProc("RtlDefaultNpAcl")
376 procRtlDeleteFunctionTable = modntdll.NewProc("RtlDeleteFunctionTable")
363377 procRtlDosPathNameToNtPathName_U_WithStatus = modntdll.NewProc("RtlDosPathNameToNtPathName_U_WithStatus")
364378 procRtlDosPathNameToRelativeNtPathName_U_WithStatus = modntdll.NewProc("RtlDosPathNameToRelativeNtPathName_U_WithStatus")
365379 procRtlGetCurrentPeb = modntdll.NewProc("RtlGetCurrentPeb")
375389 procCoTaskMemFree = modole32.NewProc("CoTaskMemFree")
376390 procCoUninitialize = modole32.NewProc("CoUninitialize")
377391 procStringFromGUID2 = modole32.NewProc("StringFromGUID2")
392 procEnumProcessModules = modpsapi.NewProc("EnumProcessModules")
393 procEnumProcessModulesEx = modpsapi.NewProc("EnumProcessModulesEx")
378394 procEnumProcesses = modpsapi.NewProc("EnumProcesses")
395 procGetModuleBaseNameW = modpsapi.NewProc("GetModuleBaseNameW")
396 procGetModuleFileNameExW = modpsapi.NewProc("GetModuleFileNameExW")
397 procGetModuleInformation = modpsapi.NewProc("GetModuleInformation")
379398 procSubscribeServiceChangeNotifications = modsechost.NewProc("SubscribeServiceChangeNotifications")
380399 procUnsubscribeServiceChangeNotifications = modsechost.NewProc("UnsubscribeServiceChangeNotifications")
381400 procGetUserNameExW = modsecur32.NewProc("GetUserNameExW")
390409 procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock")
391410 procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock")
392411 procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW")
412 procGetFileVersionInfoSizeW = modversion.NewProc("GetFileVersionInfoSizeW")
413 procGetFileVersionInfoW = modversion.NewProc("GetFileVersionInfoW")
414 procVerQueryValueW = modversion.NewProc("VerQueryValueW")
393415 procWinVerifyTrustEx = modwintrust.NewProc("WinVerifyTrustEx")
394416 procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW")
395417 procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW")
954976 return
955977 }
956978
979 func QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInfo unsafe.Pointer) (err error) {
980 err = procQueryServiceDynamicInformation.Find()
981 if err != nil {
982 return
983 }
984 r1, _, e1 := syscall.Syscall(procQueryServiceDynamicInformation.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(dynamicInfo))
985 if r1 == 0 {
986 err = errnoErr(e1)
987 }
988 return
989 }
990
957991 func QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, bufSize uint32, bytesNeeded *uint32) (err error) {
958992 r1, _, e1 := syscall.Syscall6(procQueryServiceLockStatusW.Addr(), 4, uintptr(mgr), uintptr(unsafe.Pointer(lockStatus)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0)
959993 if r1 == 0 {
10361070
10371071 func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) {
10381072 r0, _, e1 := syscall.Syscall(procRegisterEventSourceW.Addr(), 2, uintptr(unsafe.Pointer(uncServerName)), uintptr(unsafe.Pointer(sourceName)), 0)
1073 handle = Handle(r0)
1074 if handle == 0 {
1075 err = errnoErr(e1)
1076 }
1077 return
1078 }
1079
1080 func RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) {
1081 r0, _, e1 := syscall.Syscall(procRegisterServiceCtrlHandlerExW.Addr(), 3, uintptr(unsafe.Pointer(serviceName)), uintptr(handlerProc), uintptr(context))
10391082 handle = Handle(r0)
10401083 if handle == 0 {
10411084 err = errnoErr(e1)
26292672 return
26302673 }
26312674
2675 func ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesRead *uintptr) (err error) {
2676 r1, _, e1 := syscall.Syscall6(procReadProcessMemory.Addr(), 5, uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesRead)), 0)
2677 if r1 == 0 {
2678 err = errnoErr(e1)
2679 }
2680 return
2681 }
2682
26322683 func ReleaseMutex(mutex Handle) (err error) {
26332684 r1, _, e1 := syscall.Syscall(procReleaseMutex.Addr(), 1, uintptr(mutex), 0, 0)
26342685 if r1 == 0 {
29833034 return
29843035 }
29853036
3037 func VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect uint32, oldProtect *uint32) (err error) {
3038 r1, _, e1 := syscall.Syscall6(procVirtualProtectEx.Addr(), 5, uintptr(process), uintptr(address), uintptr(size), uintptr(newProtect), uintptr(unsafe.Pointer(oldProtect)), 0)
3039 if r1 == 0 {
3040 err = errnoErr(e1)
3041 }
3042 return
3043 }
3044
3045 func VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) {
3046 r1, _, e1 := syscall.Syscall(procVirtualQuery.Addr(), 3, uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length))
3047 if r1 == 0 {
3048 err = errnoErr(e1)
3049 }
3050 return
3051 }
3052
3053 func VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) {
3054 r1, _, e1 := syscall.Syscall6(procVirtualQueryEx.Addr(), 4, uintptr(process), uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length), 0, 0)
3055 if r1 == 0 {
3056 err = errnoErr(e1)
3057 }
3058 return
3059 }
3060
29863061 func VirtualUnlock(addr uintptr, length uintptr) (err error) {
29873062 r1, _, e1 := syscall.Syscall(procVirtualUnlock.Addr(), 2, uintptr(addr), uintptr(length), 0)
29883063 if r1 == 0 {
29893064 err = errnoErr(e1)
29903065 }
3066 return
3067 }
3068
3069 func WTSGetActiveConsoleSessionId() (sessionID uint32) {
3070 r0, _, _ := syscall.Syscall(procWTSGetActiveConsoleSessionId.Addr(), 0, 0, 0, 0)
3071 sessionID = uint32(r0)
29913072 return
29923073 }
29933074
30333114 return
30343115 }
30353116
3117 func WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesWritten *uintptr) (err error) {
3118 r1, _, e1 := syscall.Syscall6(procWriteProcessMemory.Addr(), 5, uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesWritten)), 0)
3119 if r1 == 0 {
3120 err = errnoErr(e1)
3121 }
3122 return
3123 }
3124
30363125 func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) {
30373126 r1, _, e1 := syscall.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)
30383127 if r1 == 0 {
31023191 return
31033192 }
31043193
3194 func NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) {
3195 r0, _, _ := syscall.Syscall6(procNtQuerySystemInformation.Addr(), 4, uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen), uintptr(unsafe.Pointer(retLen)), 0, 0)
3196 if r0 != 0 {
3197 ntstatus = NTStatus(r0)
3198 }
3199 return
3200 }
3201
3202 func NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) {
3203 r0, _, _ := syscall.Syscall6(procNtSetInformationFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), uintptr(class), 0)
3204 if r0 != 0 {
3205 ntstatus = NTStatus(r0)
3206 }
3207 return
3208 }
3209
31053210 func NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) {
31063211 r0, _, _ := syscall.Syscall6(procNtSetInformationProcess.Addr(), 4, uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), 0, 0)
31073212 if r0 != 0 {
31103215 return
31113216 }
31123217
3218 func NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) {
3219 r0, _, _ := syscall.Syscall(procNtSetSystemInformation.Addr(), 3, uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen))
3220 if r0 != 0 {
3221 ntstatus = NTStatus(r0)
3222 }
3223 return
3224 }
3225
3226 func RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) {
3227 r0, _, _ := syscall.Syscall(procRtlAddFunctionTable.Addr(), 3, uintptr(unsafe.Pointer(functionTable)), uintptr(entryCount), uintptr(baseAddress))
3228 ret = r0 != 0
3229 return
3230 }
3231
31133232 func RtlDefaultNpAcl(acl **ACL) (ntstatus error) {
31143233 r0, _, _ := syscall.Syscall(procRtlDefaultNpAcl.Addr(), 1, uintptr(unsafe.Pointer(acl)), 0, 0)
31153234 if r0 != 0 {
31163235 ntstatus = NTStatus(r0)
31173236 }
3237 return
3238 }
3239
3240 func RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) {
3241 r0, _, _ := syscall.Syscall(procRtlDeleteFunctionTable.Addr(), 1, uintptr(unsafe.Pointer(functionTable)), 0, 0)
3242 ret = r0 != 0
31183243 return
31193244 }
31203245
32143339 func stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) {
32153340 r0, _, _ := syscall.Syscall(procStringFromGUID2.Addr(), 3, uintptr(unsafe.Pointer(rguid)), uintptr(unsafe.Pointer(lpsz)), uintptr(cchMax))
32163341 chars = int32(r0)
3342 return
3343 }
3344
3345 func EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) {
3346 r1, _, e1 := syscall.Syscall6(procEnumProcessModules.Addr(), 4, uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), 0, 0)
3347 if r1 == 0 {
3348 err = errnoErr(e1)
3349 }
3350 return
3351 }
3352
3353 func EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) {
3354 r1, _, e1 := syscall.Syscall6(procEnumProcessModulesEx.Addr(), 5, uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), uintptr(filterFlag), 0)
3355 if r1 == 0 {
3356 err = errnoErr(e1)
3357 }
32173358 return
32183359 }
32193360
32293370 return
32303371 }
32313372
3373 func GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) {
3374 r1, _, e1 := syscall.Syscall6(procGetModuleBaseNameW.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(baseName)), uintptr(size), 0, 0)
3375 if r1 == 0 {
3376 err = errnoErr(e1)
3377 }
3378 return
3379 }
3380
3381 func GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) {
3382 r1, _, e1 := syscall.Syscall6(procGetModuleFileNameExW.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size), 0, 0)
3383 if r1 == 0 {
3384 err = errnoErr(e1)
3385 }
3386 return
3387 }
3388
3389 func GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) {
3390 r1, _, e1 := syscall.Syscall6(procGetModuleInformation.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(modinfo)), uintptr(cb), 0, 0)
3391 if r1 == 0 {
3392 err = errnoErr(e1)
3393 }
3394 return
3395 }
3396
32323397 func SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) {
32333398 ret = procSubscribeServiceChangeNotifications.Find()
32343399 if ret != nil {
33453510
33463511 func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {
33473512 r1, _, e1 := syscall.Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen)))
3513 if r1 == 0 {
3514 err = errnoErr(e1)
3515 }
3516 return
3517 }
3518
3519 func GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32, err error) {
3520 var _p0 *uint16
3521 _p0, err = syscall.UTF16PtrFromString(filename)
3522 if err != nil {
3523 return
3524 }
3525 return _GetFileVersionInfoSize(_p0, zeroHandle)
3526 }
3527
3528 func _GetFileVersionInfoSize(filename *uint16, zeroHandle *Handle) (bufSize uint32, err error) {
3529 r0, _, e1 := syscall.Syscall(procGetFileVersionInfoSizeW.Addr(), 2, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(zeroHandle)), 0)
3530 bufSize = uint32(r0)
3531 if bufSize == 0 {
3532 err = errnoErr(e1)
3533 }
3534 return
3535 }
3536
3537 func GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) {
3538 var _p0 *uint16
3539 _p0, err = syscall.UTF16PtrFromString(filename)
3540 if err != nil {
3541 return
3542 }
3543 return _GetFileVersionInfo(_p0, handle, bufSize, buffer)
3544 }
3545
3546 func _GetFileVersionInfo(filename *uint16, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) {
3547 r1, _, e1 := syscall.Syscall6(procGetFileVersionInfoW.Addr(), 4, uintptr(unsafe.Pointer(filename)), uintptr(handle), uintptr(bufSize), uintptr(buffer), 0, 0)
3548 if r1 == 0 {
3549 err = errnoErr(e1)
3550 }
3551 return
3552 }
3553
3554 func VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) {
3555 var _p0 *uint16
3556 _p0, err = syscall.UTF16PtrFromString(subBlock)
3557 if err != nil {
3558 return
3559 }
3560 return _VerQueryValue(block, _p0, pointerToBufferPointer, bufSize)
3561 }
3562
3563 func _VerQueryValue(block unsafe.Pointer, subBlock *uint16, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) {
3564 r1, _, e1 := syscall.Syscall6(procVerQueryValueW.Addr(), 4, uintptr(block), uintptr(unsafe.Pointer(subBlock)), uintptr(pointerToBufferPointer), uintptr(unsafe.Pointer(bufSize)), 0, 0)
33483565 if r1 == 0 {
33493566 err = errnoErr(e1)
33503567 }