aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorUtkarsh Anand <uanand009@gmail.com>2017-10-29 16:49:33 +0530
committerDmitry Vyukov <dvyukov@google.com>2017-10-30 18:57:38 +0100
commit4b567b4940a81232672cd3aef81aafa6e5571548 (patch)
tree874062331f0ff3aa02d93da669761b0e792addb3 /sys
parent9b42a968df89105bd61612e6f2768c75caa4e305 (diff)
Added a few more syscall descriptions, consts
and other related files.
Diffstat (limited to 'sys')
-rw-r--r--sys/netbsd/amd64.go1335
-rw-r--r--sys/netbsd/fs.txt4
-rw-r--r--sys/netbsd/ipc.txt8
-rw-r--r--sys/netbsd/socket.txt117
-rw-r--r--sys/netbsd/socket_amd64.const95
-rw-r--r--sys/netbsd/socket_inet.txt64
-rw-r--r--sys/netbsd/socket_inet6.txt93
-rw-r--r--sys/netbsd/socket_inet6_amd64.const18
-rw-r--r--sys/netbsd/socket_inet_amd64.const15
-rw-r--r--sys/netbsd/socket_unix.txt78
-rw-r--r--sys/netbsd/socket_unix_amd64.const23
-rw-r--r--sys/netbsd/sys.txt404
-rw-r--r--sys/netbsd/sys_amd64.const186
-rw-r--r--sys/syz-extract/netbsd.go8
14 files changed, 2389 insertions, 59 deletions
diff --git a/sys/netbsd/amd64.go b/sys/netbsd/amd64.go
index 22b4ffca4..b2ddf62d1 100644
--- a/sys/netbsd/amd64.go
+++ b/sys/netbsd/amd64.go
@@ -10,14 +10,65 @@ func init() {
var resources_amd64 = []*ResourceDesc{
{Name: "fd", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "fd_dir", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_dir"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
+ {Name: "gid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"gid"}, Values: []uint64{0, 18446744073709551615}},
{Name: "ipc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"ipc"}, Values: []uint64{0, 18446744073709551615}},
{Name: "ipc_msq", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"ipc", "ipc_msq"}, Values: []uint64{0, 18446744073709551615}},
{Name: "ipc_sem", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"ipc", "ipc_sem"}, Values: []uint64{0, 18446744073709551615}},
{Name: "ipc_shm", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"ipc", "ipc_shm"}, Values: []uint64{0, 18446744073709551615}},
+ {Name: "pid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"pid"}, Values: []uint64{0, 18446744073709551615}},
{Name: "shmaddr", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", TypeSize: 8}}}, Kind: []string{"shmaddr"}, Values: []uint64{0}},
+ {Name: "sock", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "sock"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
+ {Name: "sock_in", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "sock", "sock_in"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
+ {Name: "sock_in6", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "sock", "sock_in6"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
+ {Name: "sock_unix", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "sock", "sock_unix"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
+ {Name: "uid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"uid"}, Values: []uint64{0, 18446744073709551615}},
}
var structDescs_amd64 = []*KeyedStruct{
+ {Key: StructKey{Name: "cmsghdr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "cmsghdr"}, Fields: []Type{
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "cmsg_len", TypeSize: 8}}, Buf: "parent"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "cmsg_levels", FldName: "cmsg_level", TypeSize: 4}}, Vals: []uint64{65535, 1, 0, 6, 17, 41, 256, 257}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "cmsg_type", TypeSize: 4}}},
+ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data"}},
+ }, AlignAttr: 8}},
+ {Key: StructKey{Name: "cmsghdr_un"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "cmsghdr_un"}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "cmsghdr_un_rights"}, FldName: "rights"},
+ &StructType{Key: StructKey{Name: "cmsghdr_un_cred"}, FldName: "cred"},
+ }}},
+ {Key: StructKey{Name: "cmsghdr_un_cred"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "cmsghdr_un_cred", TypeSize: 32}, Fields: []Type{
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "parent"},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 4}}, Val: 65535},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 4}}, Val: 2},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ }, AlignAttr: 8}},
+ {Key: StructKey{Name: "cmsghdr_un_rights"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "cmsghdr_un_rights"}, Fields: []Type{
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "parent"},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 4}}, Val: 65535},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 4}}, Val: 1},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "fds"}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", TypeSize: 4}}},
+ }, AlignAttr: 8}},
+ {Key: StructKey{Name: "fd_set", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "fd_set", TypeSize: 64, ArgDir: 2}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask0", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask1", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask2", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask3", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask4", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask5", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask6", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask7", TypeSize: 8, ArgDir: 2}}},
+ }}},
+ {Key: StructKey{Name: "flock"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "flock", TypeSize: 32}, Fields: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "flock_type", FldName: "type", TypeSize: 2}}, Vals: []uint64{1, 3, 2}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "seek_whence", FldName: "whence", TypeSize: 2}}, Vals: []uint64{0, 1, 2}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "start", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "len", TypeSize: 8}}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ }}},
{Key: StructKey{Name: "iovec_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "iovec_in", TypeSize: 16}, Fields: []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "addr", TypeSize: 8}, Type: &BufferType{}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "addr"},
@@ -26,8 +77,12 @@ var structDescs_amd64 = []*KeyedStruct{
&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "addr", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "addr"},
}}},
- {Key: StructKey{Name: "ipc_perm"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipc_perm", TypeSize: 32}, Fields: []Type{
+ {Key: StructKey{Name: "ipc_perm"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipc_perm", TypeSize: 48}, Fields: []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "key", TypeSize: 4}}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "cuid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "cgid", TypeSize: 4}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 4}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "seq", TypeSize: 2}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad0", TypeSize: 2}}},
@@ -35,6 +90,37 @@ var structDescs_amd64 = []*KeyedStruct{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad1", TypeSize: 8}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad2", TypeSize: 8}}},
}}},
+ {Key: StructKey{Name: "itimerval"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "itimerval", TypeSize: 32}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "timeval"}, FldName: "interv"},
+ &StructType{Key: StructKey{Name: "timeval"}, FldName: "value"},
+ }}},
+ {Key: StructKey{Name: "itimerval", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "itimerval", TypeSize: 32, ArgDir: 1}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "timeval", Dir: 1}, FldName: "interv"},
+ &StructType{Key: StructKey{Name: "timeval", Dir: 1}, FldName: "value"},
+ }}},
+ {Key: StructKey{Name: "linger"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "linger", TypeSize: 8}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "onoff", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "linger", TypeSize: 4}}},
+ }}},
+ {Key: StructKey{Name: "linger", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "linger", TypeSize: 8, ArgDir: 1}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "onoff", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "linger", TypeSize: 4, ArgDir: 1}}},
+ }}},
+ {Key: StructKey{Name: "mf6cctl"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mf6cctl", TypeSize: 60}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "sockaddr_in6"}, FldName: "mf6cc_origin"},
+ &StructType{Key: StructKey{Name: "sockaddr_in6"}, FldName: "mf6cc_mcastgrp"},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "mf6cc_parent", TypeSize: 2}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mf6cc_ifset", TypeSize: 32}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: 1, RangeBegin: 8, RangeEnd: 8},
+ }}},
+ {Key: StructKey{Name: "mif6ctl"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mif6ctl", TypeSize: 12}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "mif6c_mifi", TypeSize: 2}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mif6c_flags", FldName: "mif6c_flags", TypeSize: 1}}, Vals: []uint64{1}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "vifc_threshold", TypeSize: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "mif6c_pifi", TypeSize: 2}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "vifc_rate_limit", TypeSize: 4}}},
+ }}},
{Key: StructKey{Name: "msgbuf"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "msgbuf"}, Fields: []Type{
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "msgbuf_type", FldName: "typ", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3}},
&BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data"}},
@@ -43,10 +129,23 @@ var structDescs_amd64 = []*KeyedStruct{
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "msgbuf_type", FldName: "typ", TypeSize: 8, ArgDir: 1}}, Vals: []uint64{0, 1, 2, 3}},
&BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", ArgDir: 1}},
}}},
- {Key: StructKey{Name: "msqid_ds"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "msqid_ds", TypeSize: 96}, Fields: []Type{
+ {Key: StructKey{Name: "msghdr_un"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "msghdr_un", TypeSize: 56}, Fields: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 4}}, Buf: "addr"},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "vec", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &StructType{Key: StructKey{Name: "iovec_in"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "vlen", TypeSize: 8}}, Buf: "vec"},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "ctrl", TypeSize: 8, IsOptional: true}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &UnionType{Key: StructKey{Name: "cmsghdr_un"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "ctrllen", TypeSize: 8}}, Buf: "ctrl"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "f", TypeSize: 4}}, Vals: []uint64{1, 2, 4, 8, 1024}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ }}},
+ {Key: StructKey{Name: "msqid_ds"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "msqid_ds", TypeSize: 120}, Fields: []Type{
&StructType{Key: StructKey{Name: "ipc_perm"}, FldName: "perm"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "qnum", TypeSize: 8}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "qbytes", TypeSize: 8}}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "lspid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "lrpid", TypeSize: 4}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "stime", TypeSize: 8}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "rtime", TypeSize: 8}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "ctime", TypeSize: 8}}},
@@ -58,12 +157,54 @@ var structDescs_amd64 = []*KeyedStruct{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "rfd", TypeSize: 4, ArgDir: 1}},
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "wfd", TypeSize: 4, ArgDir: 1}},
}}},
+ {Key: StructKey{Name: "pollfd"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "pollfd", TypeSize: 8}, Fields: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pollfd_events", FldName: "events", TypeSize: 2}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 64, 128, 4, 256}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "revents", TypeSize: 2}}},
+ }}},
+ {Key: StructKey{Name: "recv_msghdr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "recv_msghdr", TypeSize: 56}, Fields: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg_name", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage", Dir: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "msg_namelen", TypeSize: 4}}, Buf: "msg_name"},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg_iov", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &StructType{Key: StructKey{Name: "iovec_out"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "msg_iovlen", TypeSize: 8}}, Buf: "msg_iov"},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "msg_control", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "msg_controllen", TypeSize: 8}}, Buf: "msg_control"},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "msg_flags", TypeSize: 4}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ }}},
+ {Key: StructKey{Name: "rlimit"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "rlimit", TypeSize: 16}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "soft", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "hard", TypeSize: 8}}},
+ }}},
+ {Key: StructKey{Name: "rlimit", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "rlimit", TypeSize: 16, ArgDir: 1}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "soft", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "hard", TypeSize: 8, ArgDir: 1}}},
+ }}},
+ {Key: StructKey{Name: "rusage", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "rusage", TypeSize: 144, ArgDir: 1}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "timeval", Dir: 1}, FldName: "utime"},
+ &StructType{Key: StructKey{Name: "timeval", Dir: 1}, FldName: "stime"},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "maxrss", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "ixrss", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "idrss", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "isrss", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "minflt", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "majflt", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "nswap", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "inblock", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "oublock", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "msgsnd", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "msgrcv", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "signals", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "nvcsw", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "nivcsw", TypeSize: 8, ArgDir: 1}}},
+ }}},
{Key: StructKey{Name: "sembuf"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sembuf", TypeSize: 6}, Fields: []Type{
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "num", TypeSize: 2}}, Vals: []uint64{0, 1, 2, 3, 4}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "op", TypeSize: 2}}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "semop_flags", FldName: "flg", TypeSize: 2}}, Vals: []uint64{2048, 4096}},
}}},
- {Key: StructKey{Name: "semid_ds"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "semid_ds", TypeSize: 72}, Fields: []Type{
+ {Key: StructKey{Name: "semid_ds"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "semid_ds", TypeSize: 88}, Fields: []Type{
&StructType{Key: StructKey{Name: "ipc_perm"}, FldName: "perm"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "otime", TypeSize: 8}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "ctime", TypeSize: 8}}},
@@ -71,11 +212,24 @@ var structDescs_amd64 = []*KeyedStruct{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad0", TypeSize: 8}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad1", TypeSize: 8}}},
}}},
- {Key: StructKey{Name: "shmid_ds"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "shmid_ds", TypeSize: 88}, Fields: []Type{
+ {Key: StructKey{Name: "send_msghdr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "send_msghdr", TypeSize: 56}, Fields: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg_name", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "msg_namelen", TypeSize: 4}}, Buf: "msg_name"},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg_iov", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &StructType{Key: StructKey{Name: "iovec_in"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "msg_iovlen", TypeSize: 8}}, Buf: "msg_iov"},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg_control", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &StructType{Key: StructKey{Name: "cmsghdr"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "msg_controllen", TypeSize: 8}}, Buf: "msg_control"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "msg_flags", TypeSize: 4}}, Vals: []uint64{1, 2, 4, 8, 1024}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ }}},
+ {Key: StructKey{Name: "shmid_ds"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "shmid_ds", TypeSize: 112}, Fields: []Type{
&StructType{Key: StructKey{Name: "ipc_perm"}, FldName: "perm"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "segsz", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "nattch", TypeSize: 2}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "cpid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "lpid", TypeSize: 4}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "atime", TypeSize: 8}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "dtime", TypeSize: 8}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "ctime", TypeSize: 8}}},
@@ -84,37 +238,512 @@ var structDescs_amd64 = []*KeyedStruct{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "unused1", TypeSize: 8}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "unused2", TypeSize: 8}}},
}}},
+ {Key: StructKey{Name: "sock_in6_pair", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sock_in6_pair", TypeSize: 8, ArgDir: 1}, Fields: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "f0", TypeSize: 4, ArgDir: 1}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "f1", TypeSize: 4, ArgDir: 1}},
+ }}},
+ {Key: StructKey{Name: "sock_in_pair", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sock_in_pair", TypeSize: 8, ArgDir: 1}, Fields: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "f0", TypeSize: 4, ArgDir: 1}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "f1", TypeSize: 4, ArgDir: 1}},
+ }}},
+ {Key: StructKey{Name: "sockaddr_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in", TypeSize: 12}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2}}, Val: 2},
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "port", TypeSize: 2}, BigEndian: true}, ValuesStart: 20000, ValuesPerProc: 4},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "pad", TypeSize: 8}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 1}}}, Kind: 1, RangeBegin: 8, RangeEnd: 8},
+ }}},
+ {Key: StructKey{Name: "sockaddr_in", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in", TypeSize: 12, ArgDir: 1}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2, ArgDir: 1}}, Val: 2},
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "port", TypeSize: 2, ArgDir: 1}, BigEndian: true}, ValuesStart: 20000, ValuesPerProc: 4},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "pad", TypeSize: 8, ArgDir: 1}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 1, ArgDir: 1}}}, Kind: 1, RangeBegin: 8, RangeEnd: 8},
+ }}},
+ {Key: StructKey{Name: "sockaddr_in6"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 12}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2}}, Val: 24},
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "port", TypeSize: 2}, BigEndian: true}, ValuesStart: 20000, ValuesPerProc: 4},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4}}},
+ }}},
+ {Key: StructKey{Name: "sockaddr_in6", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 12, ArgDir: 1}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2, ArgDir: 1}}, Val: 24},
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "port", TypeSize: 2, ArgDir: 1}, BigEndian: true}, ValuesStart: 20000, ValuesPerProc: 4},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4, ArgDir: 1}}},
+ }}},
+ {Key: StructKey{Name: "sockaddr_storage"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_storage"}, Fields: []Type{
+ &UnionType{Key: StructKey{Name: "sockaddr_un"}, FldName: "un"},
+ &StructType{Key: StructKey{Name: "sockaddr_in"}, FldName: "in"},
+ &StructType{Key: StructKey{Name: "sockaddr_in6"}, FldName: "in6"},
+ }}},
+ {Key: StructKey{Name: "sockaddr_storage", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_storage", ArgDir: 1}, Fields: []Type{
+ &UnionType{Key: StructKey{Name: "sockaddr_un", Dir: 1}, FldName: "un"},
+ &StructType{Key: StructKey{Name: "sockaddr_in", Dir: 1}, FldName: "in"},
+ &StructType{Key: StructKey{Name: "sockaddr_in6", Dir: 1}, FldName: "in6"},
+ }}},
+ {Key: StructKey{Name: "sockaddr_un"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_un"}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "sockaddr_un_file"}, FldName: "file"},
+ &StructType{Key: StructKey{Name: "sockaddr_un_abstract"}, FldName: "abs"},
+ }}},
+ {Key: StructKey{Name: "sockaddr_un", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_un", ArgDir: 1}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "sockaddr_un_file", Dir: 1}, FldName: "file"},
+ &StructType{Key: StructKey{Name: "sockaddr_un_abstract", Dir: 1}, FldName: "abs"},
+ }}},
+ {Key: StructKey{Name: "sockaddr_un_abstract"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_un_abstract", TypeSize: 8}, Fields: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "unix_socket_family", FldName: "family", TypeSize: 2}}, Vals: []uint64{1, 0}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "ind", TypeSize: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true},
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "id", TypeSize: 4}}, ValuesStart: 20000, ValuesPerProc: 4},
+ }}},
+ {Key: StructKey{Name: "sockaddr_un_abstract", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_un_abstract", TypeSize: 8, ArgDir: 1}, Fields: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "unix_socket_family", FldName: "family", TypeSize: 2, ArgDir: 1}}, Vals: []uint64{1, 0}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "ind", TypeSize: 1, ArgDir: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true},
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "id", TypeSize: 4, ArgDir: 1}}, ValuesStart: 20000, ValuesPerProc: 4},
+ }}},
+ {Key: StructKey{Name: "sockaddr_un_file"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_un_file"}, Fields: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "unix_socket_family", FldName: "family", TypeSize: 2}}, Vals: []uint64{1, 0}},
+ &BufferType{TypeCommon: TypeCommon{TypeName: "filename", FldName: "path"}, Kind: 3},
+ }}},
+ {Key: StructKey{Name: "sockaddr_un_file", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_un_file", ArgDir: 1}, Fields: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "unix_socket_family", FldName: "family", TypeSize: 2, ArgDir: 1}}, Vals: []uint64{1, 0}},
+ &BufferType{TypeCommon: TypeCommon{TypeName: "filename", FldName: "path", ArgDir: 1}, Kind: 3},
+ }}},
+ {Key: StructKey{Name: "stat", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "stat", TypeSize: 60, ArgDir: 1}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "dev", TypeSize: 2, ArgDir: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "ino", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "mode", TypeSize: 2, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "nlink", TypeSize: 2, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "rdev", TypeSize: 2, ArgDir: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "size", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "blksize", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "blocks", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "atime", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "ansec", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "mtime", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "mnsec", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "ctime", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "cnsec", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "pad1", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "pad2", TypeSize: 4, ArgDir: 1}}},
+ }}},
+ {Key: StructKey{Name: "timespec"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "timespec", TypeSize: 16}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "sec", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "nsec", TypeSize: 8}}},
+ }}},
+ {Key: StructKey{Name: "timespec", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "timespec", TypeSize: 16, ArgDir: 1}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "sec", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "nsec", TypeSize: 8, ArgDir: 1}}},
+ }}},
+ {Key: StructKey{Name: "timeval"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "timeval", TypeSize: 16}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "sec", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "usec", TypeSize: 8}}},
+ }}},
+ {Key: StructKey{Name: "timeval", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "timeval", TypeSize: 16, ArgDir: 1}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "sec", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "usec", TypeSize: 8, ArgDir: 1}}},
+ }}},
+ {Key: StructKey{Name: "timeval", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "timeval", TypeSize: 16, ArgDir: 2}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "sec", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "usec", TypeSize: 8, ArgDir: 2}}},
+ }}},
+ {Key: StructKey{Name: "ucred"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ucred", TypeSize: 12}, Fields: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ }}},
+ {Key: StructKey{Name: "ucred", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ucred", TypeSize: 12, ArgDir: 1}, Fields: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4, ArgDir: 1}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4, ArgDir: 1}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4, ArgDir: 1}},
+ }}},
+ {Key: StructKey{Name: "unix_pair", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "unix_pair", TypeSize: 8, ArgDir: 1}, Fields: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd0", TypeSize: 4, ArgDir: 1}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd1", TypeSize: 4, ArgDir: 1}},
+ }}},
}
var syscalls_amd64 = []*Syscall{
- {NR: 6, Name: "close", CallName: "close", Args: []Type{
+ {NR: 30, Name: "accept", CallName: "accept", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 1, NR: 30, Name: "accept$inet", CallName: "accept", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "sockaddr_in", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 2, NR: 30, Name: "accept$inet6", CallName: "accept", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "sockaddr_in6", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 3, NR: 30, Name: "accept$unix", CallName: "accept", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 4, NR: 104, Name: "bind", CallName: "bind", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 5, NR: 104, Name: "bind$inet", CallName: "bind", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 6, NR: 104, Name: "bind$inet6", CallName: "bind", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in6"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 7, NR: 104, Name: "bind$unix", CallName: "bind", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 8, NR: 12, Name: "chdir", CallName: "chdir", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dir", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ }},
+ {ID: 9, NR: 15, Name: "chmod", CallName: "chmod", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}},
+ }},
+ {ID: 10, NR: 16, Name: "chown", CallName: "chown", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ }},
+ {ID: 11, NR: 61, Name: "chroot", CallName: "chroot", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dir", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ }},
+ {ID: 12, NR: 429, Name: "clock_getres", CallName: "clock_getres", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "clock_id", FldName: "id", TypeSize: 8}}, Vals: []uint64{0, 3, 1073741824, 536870912, 1, 2}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "tp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timespec", Dir: 1}}},
+ }},
+ {ID: 13, NR: 427, Name: "clock_gettime", CallName: "clock_gettime", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "clock_id", FldName: "id", TypeSize: 8}}, Vals: []uint64{0, 3, 1073741824, 536870912, 1, 2}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "tp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timespec", Dir: 1}}},
+ }},
+ {ID: 14, NR: 477, Name: "clock_nanosleep", CallName: "clock_nanosleep", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "clock_id", FldName: "id", TypeSize: 8}}, Vals: []uint64{0, 3, 1073741824, 536870912, 1, 2}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "timer_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "rqtp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timespec"}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "rmtp", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "timespec", Dir: 1}}},
+ }},
+ {ID: 15, NR: 428, Name: "clock_settime", CallName: "clock_settime", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "clock_id", FldName: "id", TypeSize: 8}}, Vals: []uint64{0, 3, 1073741824, 536870912, 1, 2}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "tp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timespec"}}},
+ }},
+ {ID: 16, NR: 6, Name: "close", CallName: "close", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
}},
- {ID: 1, NR: 41, Name: "dup", CallName: "dup", Args: []Type{
+ {ID: 17, NR: 98, Name: "connect", CallName: "connect", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 18, NR: 98, Name: "connect$inet", CallName: "connect", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 19, NR: 98, Name: "connect$inet6", CallName: "connect", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in6"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 20, NR: 98, Name: "connect$unix", CallName: "connect", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 21, NR: 41, Name: "dup", CallName: "dup", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "oldfd", TypeSize: 4}},
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
- {ID: 2, NR: 90, Name: "dup2", CallName: "dup2", Args: []Type{
+ {ID: 22, NR: 90, Name: "dup2", CallName: "dup2", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "oldfd", TypeSize: 4}},
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "newfd", TypeSize: 4}},
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
- {ID: 3, NR: 199, Name: "lseek", CallName: "lseek", Args: []Type{
+ {ID: 23, NR: 59, Name: "execve", CallName: "execve", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "argv", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string"}, Kind: 2}}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "envp", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string"}, Kind: 2}}}},
+ }},
+ {ID: 24, NR: 462, Name: "faccessat", CallName: "faccessat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "dirfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "pathname", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "faccessat_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{256, 512}},
+ }},
+ {ID: 25, NR: 13, Name: "fchdir", CallName: "fchdir", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ }},
+ {ID: 26, NR: 124, Name: "fchmod", CallName: "fchmod", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}},
+ }},
+ {ID: 27, NR: 463, Name: "fchmodat", CallName: "fchmodat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "dirfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "at_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{512, 1024}},
+ }},
+ {ID: 28, NR: 123, Name: "fchown", CallName: "fchown", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ }},
+ {ID: 29, NR: 464, Name: "fchownat", CallName: "fchownat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "dirfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "at_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{512, 1024}},
+ }},
+ {ID: 30, NR: 297, Name: "fchroot", CallName: "fchroot", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ }},
+ {ID: 31, NR: 92, Name: "fcntl$dupfd", CallName: "fcntl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fcntl_dupfd", FldName: "cmd", TypeSize: 8}}, Vals: []uint64{0, 12}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "arg", TypeSize: 4}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 32, NR: 92, Name: "fcntl$getflags", CallName: "fcntl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fcntl_getflags", FldName: "cmd", TypeSize: 8}}, Vals: []uint64{1, 3}},
+ }},
+ {ID: 33, NR: 92, Name: "fcntl$getown", CallName: "fcntl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 5},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 34, NR: 92, Name: "fcntl$lock", CallName: "fcntl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fcntl_lock", FldName: "cmd", TypeSize: 8}}, Vals: []uint64{8, 9, 7}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "lock", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "flock"}}},
+ }},
+ {ID: 35, NR: 92, Name: "fcntl$setflags", CallName: "fcntl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fcntl_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1}},
+ }},
+ {ID: 36, NR: 92, Name: "fcntl$setown", CallName: "fcntl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 6},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}},
+ }},
+ {ID: 37, NR: 92, Name: "fcntl$setstatus", CallName: "fcntl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 4},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fcntl_status", FldName: "flags", TypeSize: 8}}, Vals: []uint64{8, 64, 4, 65536, 131072, 262144, 524288, 16777216}},
+ }},
+ {ID: 38, NR: 241, Name: "fdatasync", CallName: "fdatasync", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ }},
+ {ID: 39, NR: 131, Name: "flock", CallName: "flock", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "flock_op", FldName: "op", TypeSize: 8}}, Vals: []uint64{1, 2, 8, 4}},
+ }},
+ {ID: 40, NR: 95, Name: "fsync", CallName: "fsync", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ }},
+ {ID: 41, NR: 201, Name: "ftruncate", CallName: "ftruncate", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "len", TypeSize: 8}}},
+ }},
+ {ID: 42, NR: 390, Name: "getdents", CallName: "getdents", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "ent", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "count", TypeSize: 8}}, Buf: "ent"},
+ }},
+ {ID: 43, NR: 43, Name: "getegid", CallName: "getegid", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 44, NR: 25, Name: "geteuid", CallName: "geteuid", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 45, NR: 47, Name: "getgid", CallName: "getgid", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 46, NR: 79, Name: "getgroups", CallName: "getgroups", Args: []Type{
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Buf: "list"},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "list", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 2}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", TypeSize: 4, ArgDir: 2}}}},
+ }},
+ {ID: 47, NR: 426, Name: "getitimer", CallName: "getitimer", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "getitimer_which", FldName: "which", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "cur", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "itimerval", Dir: 1}}},
+ }},
+ {ID: 48, NR: 31, Name: "getpeername", CallName: "getpeername", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }},
+ {ID: 49, NR: 31, Name: "getpeername$inet", CallName: "getpeername", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }},
+ {ID: 50, NR: 31, Name: "getpeername$inet6", CallName: "getpeername", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in6", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }},
+ {ID: 51, NR: 31, Name: "getpeername$unix", CallName: "getpeername", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }},
+ {ID: 52, NR: 207, Name: "getpgid", CallName: "getpgid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 53, NR: 81, Name: "getpgrp", CallName: "getpgrp", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 54, NR: 20, Name: "getpid", CallName: "getpid", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 55, NR: 39, Name: "getppid", CallName: "getppid", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 56, NR: 194, Name: "getrlimit", CallName: "getrlimit", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "rlimit_type", FldName: "res", TypeSize: 8}}, Vals: []uint64{10, 4, 0, 2, 1, 6, 8, 7, 5, 3, 11, 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "rlim", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "rlimit", Dir: 1}}},
+ }},
+ {ID: 57, NR: 445, Name: "getrusage", CallName: "getrusage", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "rusage_who", FldName: "who", TypeSize: 8}}, Vals: []uint64{0, 18446744073709551615}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "usage", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "rusage", Dir: 1}}},
+ }},
+ {ID: 58, NR: 32, Name: "getsockname", CallName: "getsockname", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addrlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "addr"}},
+ }},
+ {ID: 59, NR: 32, Name: "getsockname$inet", CallName: "getsockname", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addrlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "addr"}},
+ }},
+ {ID: 60, NR: 32, Name: "getsockname$inet6", CallName: "getsockname", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in6", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addrlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "addr"}},
+ }},
+ {ID: 61, NR: 32, Name: "getsockname$unix", CallName: "getsockname", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addrlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "addr"}},
+ }},
+ {ID: 62, NR: 118, Name: "getsockopt", CallName: "getsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "level", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "optname", TypeSize: 4}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "optval", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}},
+ }},
+ {ID: 63, NR: 118, Name: "getsockopt$SO_PEERCRED", CallName: "getsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 17},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ucred", Dir: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {ID: 64, NR: 118, Name: "getsockopt$inet_opts", CallName: "getsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sockopt_opt_ip_opts", FldName: "optname", TypeSize: 8}}, Vals: []uint64{1}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "optval", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}},
+ }},
+ {ID: 65, NR: 118, Name: "getsockopt$sock_cred", CallName: "getsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 17},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ucred", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}},
+ }},
+ {ID: 66, NR: 118, Name: "getsockopt$sock_int", CallName: "getsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sockopt_opt_sock_int", FldName: "optname", TypeSize: 8}}, Vals: []uint64{1, 4, 512, 8, 16, 128, 32, 256, 4097, 4098, 4099, 4100, 8192, 4096, 2048, 4104, 4103}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4, ArgDir: 1}}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}},
+ }},
+ {ID: 67, NR: 118, Name: "getsockopt$sock_linger", CallName: "getsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 128},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "linger", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}},
+ }},
+ {ID: 68, NR: 118, Name: "getsockopt$sock_timeval", CallName: "getsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sockopt_opt_sock_timeval", FldName: "optname", TypeSize: 8}}, Vals: []uint64{4108, 4107}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timeval", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}},
+ }},
+ {ID: 69, NR: 24, Name: "getuid", CallName: "getuid", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 70, NR: 275, Name: "lchown", CallName: "lchown", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ }},
+ {ID: 71, NR: 9, Name: "link", CallName: "link", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "old", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ }},
+ {ID: 72, NR: 457, Name: "linkat", CallName: "linkat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "oldfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "old", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "newfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "linkat_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1024}},
+ }},
+ {ID: 73, NR: 106, Name: "listen", CallName: "listen", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "backlog", TypeSize: 4}}},
+ }},
+ {ID: 74, NR: 199, Name: "lseek", CallName: "lseek", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fileoff", FldName: "offset", TypeSize: 8}}, Kind: 1},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "seek_whence", FldName: "whence", TypeSize: 8}}, Vals: []uint64{0, 1, 2}},
}},
- {ID: 4, NR: 75, Name: "madvise", CallName: "madvise", Args: []Type{
+ {ID: 75, NR: 441, Name: "lstat", CallName: "lstat", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "statbuf", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "stat", Dir: 1}}},
+ }},
+ {ID: 76, NR: 75, Name: "madvise", CallName: "madvise", Args: []Type{
&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "addr"},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "madvise_flags", FldName: "advice", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4, 6}},
}},
- {ID: 5, NR: 203, Name: "mlock", CallName: "mlock", Args: []Type{
+ {ID: 77, NR: 78, Name: "mincore", CallName: "mincore", Args: []Type{
+ &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Buf: "addr"},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "vec", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
+ }},
+ {ID: 78, NR: 136, Name: "mkdir", CallName: "mkdir", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}},
+ }},
+ {ID: 79, NR: 461, Name: "mkdirat", CallName: "mkdirat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}},
+ }},
+ {ID: 80, NR: 450, Name: "mknod", CallName: "mknod", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mknod_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{32768, 8192, 24576, 4096, 49152, 256, 128, 64, 32, 16, 8, 4, 2, 1}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "dev", TypeSize: 4}}},
+ }},
+ {ID: 81, NR: 450, Name: "mknod$loop", CallName: "mknod", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mknod_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{32768, 8192, 24576, 4096, 49152, 256, 128, 64, 32, 16, 8, 4, 2, 1}},
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "dev", TypeSize: 8}}, ValuesStart: 1792, ValuesPerProc: 2},
+ }},
+ {ID: 82, NR: 460, Name: "mknodat", CallName: "mknodat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "dirfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mknod_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{32768, 8192, 24576, 4096, 49152, 256, 128, 64, 32, 16, 8, 4, 2, 1}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "dev", TypeSize: 4}}},
+ }},
+ {ID: 83, NR: 203, Name: "mlock", CallName: "mlock", Args: []Type{
&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Buf: "addr"},
}},
- {ID: 6, NR: 242, Name: "mlockall", CallName: "mlockall", Args: []Type{
+ {ID: 84, NR: 242, Name: "mlockall", CallName: "mlockall", Args: []Type{
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mlockall_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1, 2}},
}},
- {ID: 7, NR: 197, Name: "mmap", CallName: "mmap", Args: []Type{
+ {ID: 85, NR: 197, Name: "mmap", CallName: "mmap", Args: []Type{
&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "addr"},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mmap_prot", FldName: "prot", TypeSize: 8}}, Vals: []uint64{4, 1, 2, 0}},
@@ -123,219 +752,537 @@ var syscalls_amd64 = []*Syscall{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad", TypeSize: 8}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fileoff", FldName: "offset", TypeSize: 8}}, Kind: 1},
}, Ret: &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "ret", TypeSize: 8, ArgDir: 1}}},
- {ID: 8, NR: 74, Name: "mprotect", CallName: "mprotect", Args: []Type{
+ {ID: 86, NR: 74, Name: "mprotect", CallName: "mprotect", Args: []Type{
&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "addr"},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mmap_prot", FldName: "prot", TypeSize: 8}}, Vals: []uint64{4, 1, 2, 0}},
}},
- {ID: 9, NR: 444, Name: "msgctl$IPC_RMID", CallName: "msgctl", Args: []Type{
+ {ID: 87, NR: 444, Name: "msgctl$IPC_RMID", CallName: "msgctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_msq", FldName: "msqid", TypeSize: 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}},
}},
- {ID: 10, NR: 444, Name: "msgctl$IPC_SET", CallName: "msgctl", Args: []Type{
+ {ID: 88, NR: 444, Name: "msgctl$IPC_SET", CallName: "msgctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_msq", FldName: "msqid", TypeSize: 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "buf", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "msqid_ds"}}},
}},
- {ID: 11, NR: 444, Name: "msgctl$IPC_STAT", CallName: "msgctl", Args: []Type{
+ {ID: 89, NR: 444, Name: "msgctl$IPC_STAT", CallName: "msgctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_msq", FldName: "msqid", TypeSize: 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2},
&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
}},
- {ID: 12, NR: 225, Name: "msgget", CallName: "msgget", Args: []Type{
+ {ID: 90, NR: 225, Name: "msgget", CallName: "msgget", Args: []Type{
&ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "key", TypeSize: 8}}, ValuesStart: 2039379027, ValuesPerProc: 4},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "msgget_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{512, 1024, 256, 128, 64, 32, 16, 8, 4, 2, 1}},
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_msq", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
- {ID: 13, NR: 225, Name: "msgget$private", CallName: "msgget", Args: []Type{
+ {ID: 91, NR: 225, Name: "msgget$private", CallName: "msgget", Args: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "key", TypeSize: 8}}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "msgget_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{512, 1024, 256, 128, 64, 32, 16, 8, 4, 2, 1}},
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_msq", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
- {ID: 14, NR: 227, Name: "msgrcv", CallName: "msgrcv", Args: []Type{
+ {ID: 92, NR: 227, Name: "msgrcv", CallName: "msgrcv", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_msq", FldName: "msqid", TypeSize: 4}},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msgp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "msgbuf", Dir: 1}}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "sz", TypeSize: 8}}, Buf: "msgp"},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "msgbuf_type", FldName: "typ", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "msgrcv_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{2048, 4096}},
}},
- {ID: 15, NR: 226, Name: "msgsnd", CallName: "msgsnd", Args: []Type{
+ {ID: 93, NR: 226, Name: "msgsnd", CallName: "msgsnd", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_msq", FldName: "msqid", TypeSize: 4}},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msgp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "msgbuf"}}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "sz", TypeSize: 8}}, Buf: "msgp"},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "msgsnd_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{2048}},
}},
- {ID: 16, NR: 204, Name: "munlock", CallName: "munlock", Args: []Type{
+ {ID: 94, NR: 204, Name: "munlock", CallName: "munlock", Args: []Type{
&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Buf: "addr"},
}},
- {ID: 17, NR: 243, Name: "munlockall", CallName: "munlockall"},
- {ID: 18, NR: 73, Name: "munmap", CallName: "munmap", Args: []Type{
+ {ID: 95, NR: 243, Name: "munlockall", CallName: "munlockall"},
+ {ID: 96, NR: 73, Name: "munmap", CallName: "munmap", Args: []Type{
&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "addr"},
}},
- {ID: 19, NR: 5, Name: "open", CallName: "open", Args: []Type{
+ {ID: 97, NR: 430, Name: "nanosleep", CallName: "nanosleep", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "req", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timespec"}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "rem", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "timespec", Dir: 1}}},
+ }},
+ {ID: 98, NR: 5, Name: "open", CallName: "open", Args: []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 8, 512, 1024, 2048, 16, 32, 256, 4194304, 16777216, 65536, 128, 131072, 262144, 32768, 524288, 2097152, 64}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}},
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
- {ID: 20, NR: 5, Name: "open$dir", CallName: "open", Args: []Type{
+ {ID: 99, NR: 5, Name: "open$dir", CallName: "open", Args: []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 8, 512, 1024, 2048, 16, 32, 256, 4194304, 16777216, 65536, 128, 131072, 262144, 32768, 524288, 2097152, 64}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}},
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
- {ID: 21, NR: 468, Name: "openat", CallName: "openat", Args: []Type{
+ {ID: 100, NR: 468, Name: "openat", CallName: "openat", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "fd", TypeSize: 4}},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 8, 512, 1024, 2048, 16, 32, 256, 4194304, 16777216, 65536, 128, 131072, 262144, 32768, 524288, 2097152, 64}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}},
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
- {ID: 22, NR: 453, Name: "pipe2", CallName: "pipe2", Args: []Type{
+ {ID: 101, NR: 456, Name: "paccept", CallName: "paccept", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "accept_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{536870912, 268435456, 1073741824}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 102, NR: 42, Name: "pipe", CallName: "pipe", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "pipefd", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pipefd", Dir: 1}}},
+ }},
+ {ID: 103, NR: 453, Name: "pipe2", CallName: "pipe2", Args: []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "pipefd", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pipefd", Dir: 1}}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pipe_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{4, 4194304, 16777216}},
}},
- {ID: 23, NR: 289, Name: "preadv", CallName: "preadv", Args: []Type{
+ {ID: 104, NR: 209, Name: "poll", CallName: "poll", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "fds", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &StructType{Key: StructKey{Name: "pollfd"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "nfds", TypeSize: 8}}, Buf: "fds"},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "timeout", TypeSize: 4}}},
+ }},
+ {ID: 105, NR: 289, Name: "preadv", CallName: "preadv", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "vec", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &StructType{Key: StructKey{Name: "iovec_out"}}}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "vlen", TypeSize: 8}}, Buf: "vec"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fileoff", FldName: "off", TypeSize: 8}}, Kind: 1},
}},
- {ID: 24, NR: 290, Name: "pwritev", CallName: "pwritev", Args: []Type{
+ {ID: 106, NR: 290, Name: "pwritev", CallName: "pwritev", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "vec", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &StructType{Key: StructKey{Name: "iovec_in"}}}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "vlen", TypeSize: 8}}, Buf: "vec"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fileoff", FldName: "off", TypeSize: 8}}, Kind: 1},
}},
- {ID: 25, NR: 3, Name: "read", CallName: "read", Args: []Type{
+ {ID: 107, NR: 3, Name: "read", CallName: "read", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "count", TypeSize: 8}}, Buf: "buf"},
}},
- {ID: 26, NR: 120, Name: "readv", CallName: "readv", Args: []Type{
+ {ID: 108, NR: 58, Name: "readlink", CallName: "readlink", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "siz", TypeSize: 8}}, Buf: "buf"},
+ }},
+ {ID: 109, NR: 469, Name: "readlinkat", CallName: "readlinkat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "siz", TypeSize: 8}}, Buf: "buf"},
+ }},
+ {ID: 110, NR: 120, Name: "readv", CallName: "readv", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "vec", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &StructType{Key: StructKey{Name: "iovec_out"}}}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "vlen", TypeSize: 8}}, Buf: "vec"},
}},
- {ID: 27, NR: 442, Name: "semctl$GETALL", CallName: "semctl", Args: []Type{
+ {ID: 111, NR: 29, Name: "recvfrom", CallName: "recvfrom", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "recv_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{2048, 1, 2, 64}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 112, NR: 29, Name: "recvfrom$inet", CallName: "recvfrom", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "recv_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{2048, 1, 2, 64}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "sockaddr_in"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 113, NR: 29, Name: "recvfrom$inet6", CallName: "recvfrom", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "recv_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{2048, 1, 2, 64}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "sockaddr_in6"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 114, NR: 29, Name: "recvfrom$unix", CallName: "recvfrom", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "recv_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{2048, 1, 2, 64}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 115, NR: 27, Name: "recvmsg", CallName: "recvmsg", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "recv_msghdr"}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "recv_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{2048, 1, 2, 64}},
+ }},
+ {ID: 116, NR: 128, Name: "rename", CallName: "rename", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "old", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ }},
+ {ID: 117, NR: 458, Name: "renameat", CallName: "renameat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "oldfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "old", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "newfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ }},
+ {ID: 118, NR: 137, Name: "rmdir", CallName: "rmdir", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ }},
+ {ID: 119, NR: 417, Name: "select", CallName: "select", Args: []Type{
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "n", TypeSize: 8}}, Buf: "inp"},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "inp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "fd_set", Dir: 2}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "outp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "fd_set", Dir: 2}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "exp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "fd_set", Dir: 2}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "tvp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timeval", Dir: 2}}},
+ }},
+ {ID: 120, NR: 442, Name: "semctl$GETALL", CallName: "semctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "semnum", TypeSize: 8}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 6},
&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
}},
- {ID: 28, NR: 442, Name: "semctl$GETNCNT", CallName: "semctl", Args: []Type{
+ {ID: 121, NR: 442, Name: "semctl$GETNCNT", CallName: "semctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "semnum", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3},
&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
}},
- {ID: 29, NR: 442, Name: "semctl$GETPID", CallName: "semctl", Args: []Type{
+ {ID: 122, NR: 442, Name: "semctl$GETPID", CallName: "semctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "semnum", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 4},
&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
}},
- {ID: 30, NR: 442, Name: "semctl$GETVAL", CallName: "semctl", Args: []Type{
+ {ID: 123, NR: 442, Name: "semctl$GETVAL", CallName: "semctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "semnum", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 5},
&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
}},
- {ID: 31, NR: 442, Name: "semctl$GETZCNT", CallName: "semctl", Args: []Type{
+ {ID: 124, NR: 442, Name: "semctl$GETZCNT", CallName: "semctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "semnum", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 7},
&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
}},
- {ID: 32, NR: 442, Name: "semctl$IPC_RMID", CallName: "semctl", Args: []Type{
+ {ID: 125, NR: 442, Name: "semctl$IPC_RMID", CallName: "semctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "semnum", TypeSize: 8}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}},
}},
- {ID: 33, NR: 442, Name: "semctl$IPC_SET", CallName: "semctl", Args: []Type{
+ {ID: 126, NR: 442, Name: "semctl$IPC_SET", CallName: "semctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "semnum", TypeSize: 8}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "semid_ds"}}},
}},
- {ID: 34, NR: 442, Name: "semctl$IPC_STAT", CallName: "semctl", Args: []Type{
+ {ID: 127, NR: 442, Name: "semctl$IPC_STAT", CallName: "semctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "semnum", TypeSize: 8}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2},
&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
}},
- {ID: 35, NR: 442, Name: "semctl$SETALL", CallName: "semctl", Args: []Type{
+ {ID: 128, NR: 442, Name: "semctl$SETALL", CallName: "semctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "semnum", TypeSize: 8}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 9},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", TypeSize: 2}}}}},
}},
- {ID: 36, NR: 442, Name: "semctl$SETVAL", CallName: "semctl", Args: []Type{
+ {ID: 129, NR: 442, Name: "semctl$SETVAL", CallName: "semctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "semnum", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 8},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}},
}},
- {ID: 37, NR: 221, Name: "semget", CallName: "semget", Args: []Type{
+ {ID: 130, NR: 221, Name: "semget", CallName: "semget", Args: []Type{
&ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "key", TypeSize: 8}}, ValuesStart: 2039359027, ValuesPerProc: 4},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "nsems", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "semget_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{512, 1024, 256, 128, 64, 32, 16, 8, 4, 2, 1}},
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
- {ID: 38, NR: 221, Name: "semget$private", CallName: "semget", Args: []Type{
+ {ID: 131, NR: 221, Name: "semget$private", CallName: "semget", Args: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "key", TypeSize: 8}}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "nsems", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "semget_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{512, 1024, 256, 128, 64, 32, 16, 8, 4, 2, 1}},
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
- {ID: 39, NR: 222, Name: "semop", CallName: "semop", Args: []Type{
+ {ID: 132, NR: 222, Name: "semop", CallName: "semop", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "ops", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &StructType{Key: StructKey{Name: "sembuf"}}}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "nops", TypeSize: 8}}, Buf: "ops"},
}},
- {ID: 40, NR: 228, Name: "shmat", CallName: "shmat", Args: []Type{
+ {ID: 133, NR: 28, Name: "sendmsg", CallName: "sendmsg", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "send_msghdr"}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{1, 2, 4, 8, 1024}},
+ }},
+ {ID: 134, NR: 28, Name: "sendmsg$unix", CallName: "sendmsg", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "msghdr_un"}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{1, 2, 4, 8, 1024}},
+ }},
+ {ID: 135, NR: 133, Name: "sendto", CallName: "sendto", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{1, 2, 4, 8, 1024}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 136, NR: 133, Name: "sendto$inet", CallName: "sendto", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{1, 2, 4, 8, 1024}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "sockaddr_in"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 137, NR: 133, Name: "sendto$inet6", CallName: "sendto", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{1, 2, 4, 8, 1024}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "sockaddr_in6"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 138, NR: 133, Name: "sendto$unix", CallName: "sendto", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{1, 2, 4, 8, 1024}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {ID: 139, NR: 182, Name: "setegid", CallName: "setegid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "egid", TypeSize: 4}},
+ }},
+ {ID: 140, NR: 183, Name: "seteuid", CallName: "seteuid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "euid", TypeSize: 4}},
+ }},
+ {ID: 141, NR: 181, Name: "setgid", CallName: "setgid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ }},
+ {ID: 142, NR: 80, Name: "setgroups", CallName: "setgroups", Args: []Type{
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Buf: "list"},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "list", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", TypeSize: 4}}}},
+ }},
+ {ID: 143, NR: 425, Name: "setitimer", CallName: "setitimer", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "getitimer_which", FldName: "which", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "itimerval"}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "old", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "itimerval", Dir: 1}}},
+ }},
+ {ID: 144, NR: 82, Name: "setpgid", CallName: "setpgid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pgid", TypeSize: 4}},
+ }},
+ {ID: 145, NR: 127, Name: "setregid", CallName: "setregid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "rgid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "egid", TypeSize: 4}},
+ }},
+ {ID: 146, NR: 126, Name: "setreuid", CallName: "setreuid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "ruid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "euid", TypeSize: 4}},
+ }},
+ {ID: 147, NR: 195, Name: "setrlimit", CallName: "setrlimit", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "rlimit_type", FldName: "res", TypeSize: 8}}, Vals: []uint64{10, 4, 0, 2, 1, 6, 8, 7, 5, 3, 11, 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "rlim", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "rlimit"}}},
+ }},
+ {ID: 148, NR: 105, Name: "setsockopt", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "level", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "optname", TypeSize: 4}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "optval", TypeSize: 8}, Type: &BufferType{}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {ID: 149, NR: 105, Name: "setsockopt$inet6_MRT6_ADD_MFC", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 41},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 104},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "mf6cctl"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {ID: 150, NR: 105, Name: "setsockopt$inet6_MRT6_ADD_MIF", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 41},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 102},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "mif6ctl"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {ID: 151, NR: 105, Name: "setsockopt$inet6_MRT6_DEL_MFC", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 41},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 105},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "mf6cctl"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {ID: 152, NR: 105, Name: "setsockopt$inet_opts", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sockopt_opt_ip_opts", FldName: "optname", TypeSize: 8}}, Vals: []uint64{1}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "optval", TypeSize: 8}, Type: &BufferType{}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {ID: 153, NR: 105, Name: "setsockopt$sock_cred", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 17},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ucred"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {ID: 154, NR: 105, Name: "setsockopt$sock_int", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sockopt_opt_sock_int", FldName: "optname", TypeSize: 8}}, Vals: []uint64{1, 4, 512, 8, 16, 128, 32, 256, 4097, 4098, 4099, 4100, 8192, 4096, 2048, 4104, 4103}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {ID: 155, NR: 105, Name: "setsockopt$sock_linger", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 128},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "linger"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {ID: 156, NR: 105, Name: "setsockopt$sock_timeval", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sockopt_opt_sock_timeval", FldName: "optname", TypeSize: 8}}, Vals: []uint64{4108, 4107}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timeval"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {ID: 157, NR: 23, Name: "setuid", CallName: "setuid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ }},
+ {ID: 158, NR: 228, Name: "shmat", CallName: "shmat", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "shmid", TypeSize: 4}},
&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "shmat_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{8192, 4096}},
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "shmaddr", FldName: "ret", TypeSize: 8, ArgDir: 1}}},
- {ID: 41, NR: 443, Name: "shmctl$IPC_RMID", CallName: "shmctl", Args: []Type{
+ {ID: 159, NR: 443, Name: "shmctl$IPC_RMID", CallName: "shmctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "shmid", TypeSize: 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}},
}},
- {ID: 42, NR: 443, Name: "shmctl$IPC_SET", CallName: "shmctl", Args: []Type{
+ {ID: 160, NR: 443, Name: "shmctl$IPC_SET", CallName: "shmctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "shmid", TypeSize: 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "buf", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "shmid_ds"}}},
}},
- {ID: 43, NR: 443, Name: "shmctl$IPC_STAT", CallName: "shmctl", Args: []Type{
+ {ID: 161, NR: 443, Name: "shmctl$IPC_STAT", CallName: "shmctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "shmid", TypeSize: 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2},
&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1}}},
}},
- {ID: 44, NR: 443, Name: "shmctl$SHM_LOCK", CallName: "shmctl", Args: []Type{
+ {ID: 162, NR: 443, Name: "shmctl$SHM_LOCK", CallName: "shmctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "shmid", TypeSize: 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3},
}},
- {ID: 45, NR: 443, Name: "shmctl$SHM_UNLOCK", CallName: "shmctl", Args: []Type{
+ {ID: 163, NR: 443, Name: "shmctl$SHM_UNLOCK", CallName: "shmctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "shmid", TypeSize: 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 4},
}},
- {ID: 46, NR: 230, Name: "shmdt", CallName: "shmdt", Args: []Type{
+ {ID: 164, NR: 230, Name: "shmdt", CallName: "shmdt", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "shmaddr", FldName: "addr", TypeSize: 8}},
}},
- {ID: 47, NR: 231, Name: "shmget", CallName: "shmget", Args: []Type{
+ {ID: 165, NR: 231, Name: "shmget", CallName: "shmget", Args: []Type{
&ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "key", TypeSize: 8}}, ValuesStart: 2039339027, ValuesPerProc: 4},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Buf: "unused"},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "shmget_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{512, 1024, 256, 128, 64, 32, 16, 8, 4, 2, 1}},
&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "unused", TypeSize: 8}},
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
- {ID: 48, NR: 231, Name: "shmget$private", CallName: "shmget", Args: []Type{
+ {ID: 166, NR: 231, Name: "shmget$private", CallName: "shmget", Args: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "key", TypeSize: 8}}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Buf: "unused"},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "shmget_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{512, 1024, 256, 128, 64, 32, 16, 8, 4, 2, 1}},
&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "unused", TypeSize: 8}},
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
- {ID: 49, NR: 4, Name: "write", CallName: "write", Args: []Type{
+ {ID: 167, NR: 134, Name: "shutdown", CallName: "shutdown", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "shutdown_flags", FldName: "how", TypeSize: 8}}, Vals: []uint64{0, 1, 2}},
+ }},
+ {ID: 168, NR: 394, Name: "socket", CallName: "socket", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_domain", FldName: "domain", TypeSize: 8}}, Vals: []uint64{1, 2, 24, 6, 31, 16}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 3, 4, 5, 536870912, 268435456, 1073741824}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "proto", TypeSize: 1}}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 169, NR: 394, Name: "socket$inet", CallName: "socket", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 2},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 3, 4, 5, 536870912, 268435456, 1073741824}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "proto", TypeSize: 1}}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 170, NR: 394, Name: "socket$inet6", CallName: "socket", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 24},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 3, 4, 5, 536870912, 268435456, 1073741824}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "proto", TypeSize: 1}}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 171, NR: 394, Name: "socket$unix", CallName: "socket", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 1},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "unix_socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 5}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "proto", TypeSize: 8}}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {ID: 172, NR: 135, Name: "socketpair", CallName: "socketpair", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_domain", FldName: "domain", TypeSize: 8}}, Vals: []uint64{1, 2, 24, 6, 31, 16}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 3, 4, 5, 536870912, 268435456, 1073741824}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "proto", TypeSize: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "fds", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pipefd", Dir: 1}}},
+ }},
+ {ID: 173, NR: 135, Name: "socketpair$inet", CallName: "socketpair", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 2},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 3, 4, 5, 536870912, 268435456, 1073741824}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "proto", TypeSize: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "fds", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sock_in_pair", Dir: 1}}},
+ }},
+ {ID: 174, NR: 135, Name: "socketpair$inet6", CallName: "socketpair", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 24},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 3, 4, 5, 536870912, 268435456, 1073741824}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "proto", TypeSize: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "fds", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sock_in6_pair", Dir: 1}}},
+ }},
+ {ID: 175, NR: 135, Name: "socketpair$unix", CallName: "socketpair", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 1},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "unix_socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 5}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "proto", TypeSize: 8}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "fds", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "unix_pair", Dir: 1}}},
+ }},
+ {ID: 176, NR: 439, Name: "stat", CallName: "stat", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "statbuf", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "stat", Dir: 1}}},
+ }},
+ {ID: 177, NR: 57, Name: "symlink", CallName: "symlink", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "old", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ }},
+ {ID: 178, NR: 470, Name: "symlinkat", CallName: "symlinkat", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "old", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "newfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ }},
+ {ID: 179, NR: 36, Name: "sync", CallName: "sync"},
+ {ID: 180, NR: 200, Name: "truncate", CallName: "truncate", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "len", TypeSize: 8}}},
+ }},
+ {ID: 181, NR: 10, Name: "unlink", CallName: "unlink", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ }},
+ {ID: 182, NR: 471, Name: "unlinkat", CallName: "unlinkat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "unlinkat_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 2048}},
+ }},
+ {ID: 183, NR: 467, Name: "utimensat", CallName: "utimensat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "dir", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "pathname", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "times", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "itimerval"}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "utimensat_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 512}},
+ }},
+ {ID: 184, NR: 420, Name: "utimes", CallName: "utimes", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "filename", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename"}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "times", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "itimerval"}}},
+ }},
+ {ID: 185, NR: 449, Name: "wait4", CallName: "wait4", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "status", TypeSize: 8, IsOptional: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4, ArgDir: 1}}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "wait_options", FldName: "options", TypeSize: 8}}, Vals: []uint64{8, 4, 16, 32, 1, 131072, 2, 64, 2}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "ru", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "rusage", Dir: 1}}},
+ }},
+ {ID: 186, NR: 4, Name: "write", CallName: "write", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "count", TypeSize: 8}}, Buf: "buf"},
}},
- {ID: 50, NR: 121, Name: "writev", CallName: "writev", Args: []Type{
+ {ID: 187, NR: 121, Name: "writev", CallName: "writev", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "vec", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array"}, Type: &StructType{Key: StructKey{Name: "iovec_in"}}}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "vlen", TypeSize: 8}}, Buf: "vec"},
@@ -343,7 +1290,40 @@ var syscalls_amd64 = []*Syscall{
}
var consts_amd64 = []ConstValue{
+ {Name: "AF_APPLETALK", Value: 16},
+ {Name: "AF_BLUETOOTH", Value: 31},
+ {Name: "AF_INET", Value: 2},
+ {Name: "AF_INET6", Value: 24},
+ {Name: "AF_LOCAL", Value: 1},
+ {Name: "AF_NS", Value: 6},
+ {Name: "AF_UNIX", Value: 1},
+ {Name: "AF_UNSPEC"},
+ {Name: "AT_EACCESS", Value: 256},
{Name: "AT_FDCWD", Value: 18446744073709551516},
+ {Name: "AT_REMOVEDIR", Value: 2048},
+ {Name: "AT_SYMLINK_FOLLOW", Value: 1024},
+ {Name: "AT_SYMLINK_NOFOLLOW", Value: 512},
+ {Name: "CLOCK_MONOTONIC", Value: 3},
+ {Name: "CLOCK_PROCESS_CPUTIME_ID", Value: 1073741824},
+ {Name: "CLOCK_PROF", Value: 2},
+ {Name: "CLOCK_REALTIME"},
+ {Name: "CLOCK_THREAD_CPUTIME_ID", Value: 536870912},
+ {Name: "CLOCK_VIRTUAL", Value: 1},
+ {Name: "FD_CLOEXEC", Value: 1},
+ {Name: "F_DUPFD"},
+ {Name: "F_DUPFD_CLOEXEC", Value: 12},
+ {Name: "F_GETFD", Value: 1},
+ {Name: "F_GETFL", Value: 3},
+ {Name: "F_GETLK", Value: 7},
+ {Name: "F_GETOWN", Value: 5},
+ {Name: "F_RDLCK", Value: 1},
+ {Name: "F_SETFD", Value: 2},
+ {Name: "F_SETFL", Value: 4},
+ {Name: "F_SETLK", Value: 8},
+ {Name: "F_SETLKW", Value: 9},
+ {Name: "F_SETOWN", Value: 6},
+ {Name: "F_UNLCK", Value: 2},
+ {Name: "F_WRLCK", Value: 3},
{Name: "GETALL", Value: 6},
{Name: "GETNCNT", Value: 3},
{Name: "GETPID", Value: 4},
@@ -356,6 +1336,54 @@ var consts_amd64 = []ConstValue{
{Name: "IPC_RMID"},
{Name: "IPC_SET", Value: 1},
{Name: "IPC_STAT", Value: 2},
+ {Name: "IPPROTO_ICMP", Value: 1},
+ {Name: "IPPROTO_IP"},
+ {Name: "IPPROTO_IPV6", Value: 41},
+ {Name: "IP_OPTIONS", Value: 1},
+ {Name: "ITIMER_MONOTONIC", Value: 3},
+ {Name: "ITIMER_PROF", Value: 2},
+ {Name: "ITIMER_REAL"},
+ {Name: "ITIMER_VIRTUAL", Value: 1},
+ {Name: "LINUX_AF_APPLETALK", Value: 5},
+ {Name: "LINUX_AF_INET", Value: 2},
+ {Name: "LINUX_AF_INET6", Value: 10},
+ {Name: "LINUX_AF_UNIX", Value: 1},
+ {Name: "LINUX_AF_UNSPEC"},
+ {Name: "LINUX_MSG_DONTROUTE", Value: 4},
+ {Name: "LINUX_MSG_EOR", Value: 128},
+ {Name: "LINUX_MSG_NOSIGNAL", Value: 16384},
+ {Name: "LINUX_MSG_OOB", Value: 1},
+ {Name: "LINUX_MSG_PEEK", Value: 2},
+ {Name: "LINUX_MSG_WAITALL", Value: 256},
+ {Name: "LINUX_SCM_CREDENTIALS", Value: 2},
+ {Name: "LINUX_SCM_RIGHTS", Value: 1},
+ {Name: "LINUX_SOL_AX25", Value: 257},
+ {Name: "LINUX_SOL_IP"},
+ {Name: "LINUX_SOL_IPV6", Value: 41},
+ {Name: "LINUX_SOL_IPX", Value: 256},
+ {Name: "LINUX_SOL_SOCKET", Value: 1},
+ {Name: "LINUX_SOL_TCP", Value: 6},
+ {Name: "LINUX_SOL_UDP", Value: 17},
+ {Name: "LINUX_SO_BROADCAST", Value: 6},
+ {Name: "LINUX_SO_DEBUG", Value: 1},
+ {Name: "LINUX_SO_DONTROUTE", Value: 5},
+ {Name: "LINUX_SO_ERROR", Value: 4},
+ {Name: "LINUX_SO_KEEPALIVE", Value: 9},
+ {Name: "LINUX_SO_LINGER", Value: 13},
+ {Name: "LINUX_SO_OOBINLINE", Value: 10},
+ {Name: "LINUX_SO_RCVBUF", Value: 8},
+ {Name: "LINUX_SO_RCVLOWAT", Value: 18},
+ {Name: "LINUX_SO_RCVTIMEO", Value: 20},
+ {Name: "LINUX_SO_REUSEADDR", Value: 2},
+ {Name: "LINUX_SO_SNDBUF", Value: 7},
+ {Name: "LINUX_SO_SNDLOWAT", Value: 19},
+ {Name: "LINUX_SO_SNDTIMEO", Value: 21},
+ {Name: "LINUX_SO_TIMESTAMP", Value: 29},
+ {Name: "LINUX_SO_TYPE", Value: 3},
+ {Name: "LOCK_EX", Value: 2},
+ {Name: "LOCK_NB", Value: 4},
+ {Name: "LOCK_SH", Value: 1},
+ {Name: "LOCK_UN", Value: 8},
{Name: "MADV_DONTNEED", Value: 4},
{Name: "MADV_FREE", Value: 6},
{Name: "MADV_NORMAL"},
@@ -373,7 +1401,18 @@ var consts_amd64 = []ConstValue{
{Name: "MAP_WIRED", Value: 2048},
{Name: "MCL_CURRENT", Value: 1},
{Name: "MCL_FUTURE", Value: 2},
+ {Name: "MIFF_REGISTER", Value: 1},
+ {Name: "MRT6_ADD_MFC", Value: 104},
+ {Name: "MRT6_ADD_MIF", Value: 102},
+ {Name: "MRT6_DEL_MFC", Value: 105},
+ {Name: "MSG_CMSG_CLOEXEC", Value: 2048},
+ {Name: "MSG_DONTROUTE", Value: 4},
+ {Name: "MSG_EOR", Value: 8},
{Name: "MSG_NOERROR", Value: 4096},
+ {Name: "MSG_NOSIGNAL", Value: 1024},
+ {Name: "MSG_OOB", Value: 1},
+ {Name: "MSG_PEEK", Value: 2},
+ {Name: "MSG_WAITALL", Value: 64},
{Name: "O_ALT_IO", Value: 262144},
{Name: "O_APPEND", Value: 8},
{Name: "O_ASYNC", Value: 64},
@@ -395,10 +1434,53 @@ var consts_amd64 = []ConstValue{
{Name: "O_SYNC", Value: 128},
{Name: "O_TRUNC", Value: 1024},
{Name: "O_WRONLY", Value: 1},
+ {Name: "POLLERR", Value: 8},
+ {Name: "POLLHUP", Value: 16},
+ {Name: "POLLIN", Value: 1},
+ {Name: "POLLNVAL", Value: 32},
+ {Name: "POLLOUT", Value: 4},
+ {Name: "POLLPRI", Value: 2},
+ {Name: "POLLRDBAND", Value: 128},
+ {Name: "POLLRDNORM", Value: 64},
+ {Name: "POLLWRBAND", Value: 256},
+ {Name: "POLLWRNORM", Value: 4},
+ {Name: "POSIX_FADV_DONTNEED", Value: 4},
+ {Name: "POSIX_FADV_NOREUSE", Value: 5},
+ {Name: "POSIX_FADV_NORMAL"},
+ {Name: "POSIX_FADV_RANDOM", Value: 1},
+ {Name: "POSIX_FADV_SEQUENTIAL", Value: 2},
+ {Name: "POSIX_FADV_WILLNEED", Value: 3},
+ {Name: "PRIO_PGRP", Value: 1},
+ {Name: "PRIO_PROCESS"},
+ {Name: "PRIO_USER", Value: 2},
{Name: "PROT_EXEC", Value: 4},
{Name: "PROT_NONE"},
{Name: "PROT_READ", Value: 1},
{Name: "PROT_WRITE", Value: 2},
+ {Name: "P_ALL"},
+ {Name: "P_PGID", Value: 4},
+ {Name: "P_PID", Value: 1},
+ {Name: "RLIMIT_AS", Value: 10},
+ {Name: "RLIMIT_CORE", Value: 4},
+ {Name: "RLIMIT_CPU"},
+ {Name: "RLIMIT_DATA", Value: 2},
+ {Name: "RLIMIT_FSIZE", Value: 1},
+ {Name: "RLIMIT_MEMLOCK", Value: 6},
+ {Name: "RLIMIT_NOFILE", Value: 8},
+ {Name: "RLIMIT_NPROC", Value: 7},
+ {Name: "RLIMIT_NTHR", Value: 11},
+ {Name: "RLIMIT_RSS", Value: 5},
+ {Name: "RLIMIT_STACK", Value: 3},
+ {Name: "RUSAGE_CHILDREN", Value: 18446744073709551615},
+ {Name: "RUSAGE_SELF"},
+ {Name: "SA_NOCLDSTOP", Value: 8},
+ {Name: "SA_NOCLDWAIT", Value: 32},
+ {Name: "SA_NODEFER", Value: 16},
+ {Name: "SA_ONSTACK", Value: 1},
+ {Name: "SA_RESETHAND", Value: 4},
+ {Name: "SA_RESTART", Value: 2},
+ {Name: "SA_SIGINFO", Value: 64},
+ {Name: "SCM_RIGHTS", Value: 1},
{Name: "SEEK_CUR", Value: 1},
{Name: "SEEK_END", Value: 2},
{Name: "SEEK_SET"},
@@ -409,11 +1491,99 @@ var consts_amd64 = []ConstValue{
{Name: "SHM_RDONLY", Value: 4096},
{Name: "SHM_RND", Value: 8192},
{Name: "SHM_UNLOCK", Value: 4},
+ {Name: "SHUT_RD"},
+ {Name: "SHUT_RDWR", Value: 2},
+ {Name: "SHUT_WR", Value: 1},
+ {Name: "SIGEV_NONE"},
+ {Name: "SIGEV_SIGNAL", Value: 1},
+ {Name: "SIGEV_THREAD", Value: 2},
+ {Name: "SIG_BLOCK", Value: 1},
+ {Name: "SIG_SETMASK", Value: 3},
+ {Name: "SIG_UNBLOCK", Value: 2},
+ {Name: "SOCK_CLOEXEC", Value: 268435456},
+ {Name: "SOCK_DGRAM", Value: 2},
+ {Name: "SOCK_NONBLOCK", Value: 536870912},
+ {Name: "SOCK_NOSIGPIPE", Value: 1073741824},
+ {Name: "SOCK_RAW", Value: 3},
+ {Name: "SOCK_RDM", Value: 4},
+ {Name: "SOCK_SEQPACKET", Value: 5},
+ {Name: "SOCK_STREAM", Value: 1},
+ {Name: "SOL_SOCKET", Value: 65535},
+ {Name: "SO_ACCEPTFILTER", Value: 4096},
+ {Name: "SO_BROADCAST", Value: 32},
+ {Name: "SO_DEBUG", Value: 1},
+ {Name: "SO_DONTROUTE", Value: 16},
+ {Name: "SO_ERROR", Value: 4103},
+ {Name: "SO_KEEPALIVE", Value: 8},
+ {Name: "SO_LINGER", Value: 128},
+ {Name: "SO_NOSIGPIPE", Value: 2048},
+ {Name: "SO_OOBINLINE", Value: 256},
+ {Name: "SO_PEERCRED", Value: 17},
+ {Name: "SO_RCVBUF", Value: 4098},
+ {Name: "SO_RCVLOWAT", Value: 4100},
+ {Name: "SO_RCVTIMEO", Value: 4108},
+ {Name: "SO_REUSEADDR", Value: 4},
+ {Name: "SO_REUSEPORT", Value: 512},
+ {Name: "SO_SNDBUF", Value: 4097},
+ {Name: "SO_SNDLOWAT", Value: 4099},
+ {Name: "SO_SNDTIMEO", Value: 4107},
+ {Name: "SO_TIMESTAMP", Value: 8192},
+ {Name: "SO_TYPE", Value: 4104},
+ {Name: "SYS_accept", Value: 30},
+ {Name: "SYS_bind", Value: 104},
+ {Name: "SYS_chdir", Value: 12},
+ {Name: "SYS_chmod", Value: 15},
+ {Name: "SYS_chown", Value: 16},
+ {Name: "SYS_chroot", Value: 61},
+ {Name: "SYS_clock_getres", Value: 429},
+ {Name: "SYS_clock_gettime", Value: 427},
+ {Name: "SYS_clock_nanosleep", Value: 477},
+ {Name: "SYS_clock_settime", Value: 428},
{Name: "SYS_close", Value: 6},
+ {Name: "SYS_connect", Value: 98},
{Name: "SYS_dup", Value: 41},
{Name: "SYS_dup2", Value: 90},
+ {Name: "SYS_execve", Value: 59},
+ {Name: "SYS_faccessat", Value: 462},
+ {Name: "SYS_fchdir", Value: 13},
+ {Name: "SYS_fchmod", Value: 124},
+ {Name: "SYS_fchmodat", Value: 463},
+ {Name: "SYS_fchown", Value: 123},
+ {Name: "SYS_fchownat", Value: 464},
+ {Name: "SYS_fchroot", Value: 297},
+ {Name: "SYS_fcntl", Value: 92},
+ {Name: "SYS_fdatasync", Value: 241},
+ {Name: "SYS_flock", Value: 131},
+ {Name: "SYS_fsync", Value: 95},
+ {Name: "SYS_ftruncate", Value: 201},
+ {Name: "SYS_getdents", Value: 390},
+ {Name: "SYS_getegid", Value: 43},
+ {Name: "SYS_geteuid", Value: 25},
+ {Name: "SYS_getgid", Value: 47},
+ {Name: "SYS_getgroups", Value: 79},
+ {Name: "SYS_getitimer", Value: 426},
+ {Name: "SYS_getpeername", Value: 31},
+ {Name: "SYS_getpgid", Value: 207},
+ {Name: "SYS_getpgrp", Value: 81},
+ {Name: "SYS_getpid", Value: 20},
+ {Name: "SYS_getppid", Value: 39},
+ {Name: "SYS_getrlimit", Value: 194},
+ {Name: "SYS_getrusage", Value: 445},
+ {Name: "SYS_getsockname", Value: 32},
+ {Name: "SYS_getsockopt", Value: 118},
+ {Name: "SYS_getuid", Value: 24},
+ {Name: "SYS_lchown", Value: 275},
+ {Name: "SYS_link", Value: 9},
+ {Name: "SYS_linkat", Value: 457},
+ {Name: "SYS_listen", Value: 106},
{Name: "SYS_lseek", Value: 199},
+ {Name: "SYS_lstat", Value: 441},
{Name: "SYS_madvise", Value: 75},
+ {Name: "SYS_mincore", Value: 78},
+ {Name: "SYS_mkdir", Value: 136},
+ {Name: "SYS_mkdirat", Value: 461},
+ {Name: "SYS_mknod", Value: 450},
+ {Name: "SYS_mknodat", Value: 460},
{Name: "SYS_mlock", Value: 203},
{Name: "SYS_mlockall", Value: 242},
{Name: "SYS_mmap", Value: 197},
@@ -425,22 +1595,65 @@ var consts_amd64 = []ConstValue{
{Name: "SYS_munlock", Value: 204},
{Name: "SYS_munlockall", Value: 243},
{Name: "SYS_munmap", Value: 73},
+ {Name: "SYS_nanosleep", Value: 430},
{Name: "SYS_open", Value: 5},
{Name: "SYS_openat", Value: 468},
+ {Name: "SYS_paccept", Value: 456},
+ {Name: "SYS_pipe", Value: 42},
{Name: "SYS_pipe2", Value: 453},
+ {Name: "SYS_poll", Value: 209},
{Name: "SYS_preadv", Value: 289},
{Name: "SYS_pwritev", Value: 290},
{Name: "SYS_read", Value: 3},
+ {Name: "SYS_readlink", Value: 58},
+ {Name: "SYS_readlinkat", Value: 469},
{Name: "SYS_readv", Value: 120},
+ {Name: "SYS_recvfrom", Value: 29},
+ {Name: "SYS_recvmsg", Value: 27},
+ {Name: "SYS_rename", Value: 128},
+ {Name: "SYS_renameat", Value: 458},
+ {Name: "SYS_rmdir", Value: 137},
+ {Name: "SYS_select", Value: 417},
{Name: "SYS_semctl", Value: 442},
{Name: "SYS_semget", Value: 221},
{Name: "SYS_semop", Value: 222},
+ {Name: "SYS_sendmsg", Value: 28},
+ {Name: "SYS_sendto", Value: 133},
+ {Name: "SYS_setegid", Value: 182},
+ {Name: "SYS_seteuid", Value: 183},
+ {Name: "SYS_setgid", Value: 181},
+ {Name: "SYS_setgroups", Value: 80},
+ {Name: "SYS_setitimer", Value: 425},
+ {Name: "SYS_setpgid", Value: 82},
+ {Name: "SYS_setregid", Value: 127},
+ {Name: "SYS_setreuid", Value: 126},
+ {Name: "SYS_setrlimit", Value: 195},
+ {Name: "SYS_setsockopt", Value: 105},
+ {Name: "SYS_setuid", Value: 23},
{Name: "SYS_shmat", Value: 228},
{Name: "SYS_shmctl", Value: 443},
{Name: "SYS_shmdt", Value: 230},
{Name: "SYS_shmget", Value: 231},
+ {Name: "SYS_shutdown", Value: 134},
+ {Name: "SYS_socket", Value: 394},
+ {Name: "SYS_socketpair", Value: 135},
+ {Name: "SYS_stat", Value: 439},
+ {Name: "SYS_symlink", Value: 57},
+ {Name: "SYS_symlinkat", Value: 470},
+ {Name: "SYS_sync", Value: 36},
+ {Name: "SYS_truncate", Value: 200},
+ {Name: "SYS_unlink", Value: 10},
+ {Name: "SYS_unlinkat", Value: 471},
+ {Name: "SYS_utimensat", Value: 467},
+ {Name: "SYS_utimes", Value: 420},
+ {Name: "SYS_wait4", Value: 449},
{Name: "SYS_write", Value: 4},
{Name: "SYS_writev", Value: 121},
+ {Name: "S_IFBLK", Value: 24576},
+ {Name: "S_IFCHR", Value: 8192},
+ {Name: "S_IFIFO", Value: 4096},
+ {Name: "S_IFREG", Value: 32768},
+ {Name: "S_IFSOCK", Value: 49152},
{Name: "S_IRGRP", Value: 32},
{Name: "S_IROTH", Value: 4},
{Name: "S_IRUSR", Value: 256},
@@ -450,6 +1663,16 @@ var consts_amd64 = []ConstValue{
{Name: "S_IXGRP", Value: 8},
{Name: "S_IXOTH", Value: 1},
{Name: "S_IXUSR", Value: 64},
+ {Name: "TIMER_ABSTIME", Value: 1},
+ {Name: "WALLSIG", Value: 8},
+ {Name: "WALTSIG", Value: 4},
+ {Name: "WCONTINUED", Value: 16},
+ {Name: "WEXITED", Value: 32},
+ {Name: "WNOHANG", Value: 1},
+ {Name: "WNOZOMBIE", Value: 131072},
+ {Name: "WSTOPPED", Value: 2},
+ {Name: "WTRAPPED", Value: 64},
+ {Name: "WUNTRACED", Value: 2},
}
-const revision_amd64 = "604a77c538a0eb3ca09ec1ccdbcd056632216f56"
+const revision_amd64 = "0bd253c590edd5bab97c9303498e5e6ca82b973e"
diff --git a/sys/netbsd/fs.txt b/sys/netbsd/fs.txt
index 80aef67fd..ccde7deae 100644
--- a/sys/netbsd/fs.txt
+++ b/sys/netbsd/fs.txt
@@ -9,6 +9,10 @@ include <unistd.h>
resource fd[int32]: 0xffffffffffffffff, AT_FDCWD
resource fd_dir[fd]
+resource pid[int32]: 0, 0xffffffffffffffff
+resource uid[int32]: 0, 0xffffffffffffffff
+resource gid[int32]: 0, 0xffffffffffffffff
+
open(file ptr[in, filename], flags flags[open_flags], mode flags[open_mode]) fd
# Just so that we have something that creates fd_dir resources.
open$dir(file ptr[in, filename], flags flags[open_flags], mode flags[open_mode]) fd_dir
diff --git a/sys/netbsd/ipc.txt b/sys/netbsd/ipc.txt
index 1b36bb2c7..4ab221e34 100644
--- a/sys/netbsd/ipc.txt
+++ b/sys/netbsd/ipc.txt
@@ -65,6 +65,10 @@ shmat_flags = SHM_RND, SHM_RDONLY
ipc_perm {
key int32
+ uid uid
+ gid gid
+ cuid uid
+ cgid gid
mode flags[open_mode, int32]
seq int16
pad0 const[0, int16]
@@ -76,6 +80,8 @@ msqid_ds {
perm ipc_perm
qnum intptr
qbytes intptr
+ lspid pid
+ lrpid pid
stime intptr
rtime intptr
ctime intptr
@@ -88,6 +94,8 @@ shmid_ds {
perm ipc_perm
segsz int32
nattch int16
+ cpid pid
+ lpid pid
atime intptr
dtime intptr
ctime intptr
diff --git a/sys/netbsd/socket.txt b/sys/netbsd/socket.txt
new file mode 100644
index 000000000..466b8ee10
--- /dev/null
+++ b/sys/netbsd/socket.txt
@@ -0,0 +1,117 @@
+# Copyright 2017 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+# TODO: due to autobind a socket can bind to port 0, that will result in a random port which is not reproducible
+
+include <sys/types.h>
+include <sys/socket.h>
+include <netinet/in.h>
+include <compat/linux/common/linux_socket.h>
+
+resource sock[fd]
+
+# TODO: describe socketcall syscall
+
+socket(domain flags[socket_domain], type flags[socket_type], proto int8) sock
+socketpair(domain flags[socket_domain], type flags[socket_type], proto int8, fds ptr[out, pipefd])
+bind(fd sock, addr ptr[in, sockaddr_storage], addrlen len[addr])
+connect(fd sock, addr ptr[in, sockaddr_storage], addrlen len[addr])
+accept(fd sock, peer ptr[out, sockaddr_storage, opt], peerlen ptr[inout, len[peer, int32]]) sock
+paccept(fd sock, peer ptr[out, sockaddr_storage, opt], peerlen ptr[inout, len[peer, int32]], flags flags[accept_flags]) sock
+sendto(fd sock, buf buffer[in], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_storage, opt], addrlen len[addr])
+recvfrom(fd sock, buf buffer[out], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_storage, opt], addrlen len[addr])
+getsockname(fd sock, addr ptr[out, sockaddr_storage], addrlen ptr[inout, len[addr, int32]])
+getpeername(fd sock, peer ptr[out, sockaddr_storage], peerlen ptr[inout, len[peer, int32]])
+
+sendmsg(fd sock, msg ptr[in, send_msghdr], f flags[send_flags])
+recvmsg(fd sock, msg ptr[in, recv_msghdr], f flags[recv_flags])
+
+listen(fd sock, backlog int32)
+shutdown(fd sock, how flags[shutdown_flags])
+
+getsockopt(fd sock, level int32, optname int32, optval buffer[out], optlen ptr[inout, len[optval, int32]])
+setsockopt(fd sock, level int32, optname int32, optval buffer[in], optlen len[optval])
+
+socket_domain = AF_LOCAL, AF_INET, AF_INET6, AF_NS, AF_BLUETOOTH, AF_APPLETALK
+socket_type = SOCK_STREAM, SOCK_DGRAM, SOCK_RAW, SOCK_RDM, SOCK_SEQPACKET, SOCK_NONBLOCK, SOCK_CLOEXEC, SOCK_NOSIGPIPE
+accept_flags = SOCK_NONBLOCK, SOCK_CLOEXEC, SOCK_NOSIGPIPE
+shutdown_flags = SHUT_RD, SHUT_WR, SHUT_RDWR
+send_flags = MSG_OOB, MSG_PEEK, MSG_DONTROUTE, MSG_EOR, MSG_NOSIGNAL
+recv_flags = MSG_CMSG_CLOEXEC, MSG_OOB, MSG_PEEK, MSG_WAITALL
+cmsg_levels = SOL_SOCKET, IPPROTO_ICMP, LINUX_SOL_IP, LINUX_SOL_TCP, LINUX_SOL_UDP, LINUX_SOL_IPV6, LINUX_SOL_IPX, LINUX_SOL_AX25
+
+# This sockaddr type corresponds to the struct sockaddr and is 16 bytes or less.
+sockaddr [
+# AF_UNIX sockaddr in bigger than 16 bytes
+ in sockaddr_in
+ random array[int32, 4]
+]
+
+# This sockaddr type corresponds to the sockaddr_storage type and is 128 bytes size.
+sockaddr_storage [
+ un sockaddr_un
+ in sockaddr_in
+ in6 sockaddr_in6
+] [varlen]
+
+sockaddr_generic {
+ sa_family flags[socket_domain, int16]
+ sa_data array[int8, 14]
+}
+
+sockaddr_storage_generic {
+ sa_family flags[socket_domain, int16]
+ sa_data array[int8, 126]
+}
+
+send_msghdr {
+ msg_name ptr[in, sockaddr_storage, opt]
+ msg_namelen len[msg_name, int32]
+ msg_iov ptr[in, array[iovec_in]]
+ msg_iovlen len[msg_iov, intptr]
+ msg_control ptr[in, array[cmsghdr]]
+ msg_controllen len[msg_control, intptr]
+ msg_flags flags[send_flags, int32]
+}
+
+send_mmsghdr {
+ msg_hdr send_msghdr
+ msg_len int32
+}
+
+recv_msghdr {
+ msg_name ptr[out, sockaddr_storage, opt]
+ msg_namelen len[msg_name, int32]
+ msg_iov ptr[in, array[iovec_out]]
+ msg_iovlen len[msg_iov, intptr]
+ msg_control buffer[out]
+ msg_controllen len[msg_control, intptr]
+ msg_flags int32
+}
+
+recv_mmsghdr {
+ msg_hdr recv_msghdr
+ msg_len int32
+}
+
+cmsghdr {
+ cmsg_len len[parent, intptr]
+ cmsg_level flags[cmsg_levels, int32]
+ cmsg_type int32
+ data array[int8]
+} [align_ptr]
+
+# Socket options
+
+getsockopt$sock_int(fd sock, level const[SOL_SOCKET], optname flags[sockopt_opt_sock_int], optval ptr[out, int32], optlen ptr[inout, len[optval, int32]])
+setsockopt$sock_int(fd sock, level const[SOL_SOCKET], optname flags[sockopt_opt_sock_int], optval ptr[in, int32], optlen len[optval])
+getsockopt$sock_linger(fd sock, level const[SOL_SOCKET], optname const[SO_LINGER], optval ptr[out, linger], optlen ptr[inout, len[optval, int32]])
+setsockopt$sock_linger(fd sock, level const[SOL_SOCKET], optname const[SO_LINGER], optval ptr[in, linger], optlen len[optval])
+getsockopt$sock_cred(fd sock, level const[SOL_SOCKET], optname const[SO_PEERCRED], optval ptr[out, ucred], optlen ptr[inout, len[optval, int32]])
+setsockopt$sock_cred(fd sock, level const[SOL_SOCKET], optname const[SO_PEERCRED], optval ptr[in, ucred], optlen len[optval])
+getsockopt$sock_timeval(fd sock, level const[SOL_SOCKET], optname flags[sockopt_opt_sock_timeval], optval ptr[out, timeval], optlen ptr[inout, len[optval, int32]])
+setsockopt$sock_timeval(fd sock, level const[SOL_SOCKET], optname flags[sockopt_opt_sock_timeval], optval ptr[in, timeval], optlen len[optval])
+getsockopt$SO_PEERCRED(fd sock, level const[SOL_SOCKET], optname const[SO_PEERCRED], optval ptr[out, ucred], optlen len[optval])
+
+sockopt_opt_sock_int = SO_DEBUG, SO_REUSEADDR, SO_REUSEPORT, SO_KEEPALIVE, SO_DONTROUTE, SO_LINGER, SO_BROADCAST, SO_OOBINLINE, SO_SNDBUF, SO_RCVBUF, SO_SNDLOWAT, SO_RCVLOWAT, SO_TIMESTAMP, SO_ACCEPTFILTER, SO_NOSIGPIPE, SO_TYPE, SO_ERROR
+sockopt_opt_sock_timeval = SO_RCVTIMEO, SO_SNDTIMEO
diff --git a/sys/netbsd/socket_amd64.const b/sys/netbsd/socket_amd64.const
new file mode 100644
index 000000000..d565dc5f9
--- /dev/null
+++ b/sys/netbsd/socket_amd64.const
@@ -0,0 +1,95 @@
+# AUTOGENERATED FILE
+AF_APPLETALK = 16
+AF_BLUETOOTH = 31
+AF_INET = 2
+AF_INET6 = 24
+AF_LOCAL = 1
+AF_NS = 6
+IPPROTO_ICMP = 1
+LINUX_AF_APPLETALK = 5
+LINUX_AF_INET = 2
+LINUX_AF_INET6 = 10
+LINUX_MSG_DONTROUTE = 4
+LINUX_MSG_EOR = 128
+LINUX_MSG_NOSIGNAL = 16384
+LINUX_MSG_OOB = 1
+LINUX_MSG_PEEK = 2
+LINUX_MSG_WAITALL = 256
+LINUX_SOL_AX25 = 257
+LINUX_SOL_IP = 0
+LINUX_SOL_IPV6 = 41
+LINUX_SOL_IPX = 256
+LINUX_SOL_SOCKET = 1
+LINUX_SOL_TCP = 6
+LINUX_SOL_UDP = 17
+LINUX_SO_BROADCAST = 6
+LINUX_SO_DEBUG = 1
+LINUX_SO_DONTROUTE = 5
+LINUX_SO_ERROR = 4
+LINUX_SO_KEEPALIVE = 9
+LINUX_SO_LINGER = 13
+LINUX_SO_OOBINLINE = 10
+LINUX_SO_RCVBUF = 8
+LINUX_SO_RCVLOWAT = 18
+LINUX_SO_RCVTIMEO = 20
+LINUX_SO_REUSEADDR = 2
+LINUX_SO_SNDBUF = 7
+LINUX_SO_SNDLOWAT = 19
+LINUX_SO_SNDTIMEO = 21
+LINUX_SO_TIMESTAMP = 29
+LINUX_SO_TYPE = 3
+MSG_CMSG_CLOEXEC = 2048
+MSG_DONTROUTE = 4
+MSG_EOR = 8
+MSG_NOSIGNAL = 1024
+MSG_OOB = 1
+MSG_PEEK = 2
+MSG_WAITALL = 64
+SHUT_RD = 0
+SHUT_RDWR = 2
+SHUT_WR = 1
+SOCK_CLOEXEC = 268435456
+SOCK_DGRAM = 2
+SOCK_NONBLOCK = 536870912
+SOCK_NOSIGPIPE = 1073741824
+SOCK_RAW = 3
+SOCK_RDM = 4
+SOCK_SEQPACKET = 5
+SOCK_STREAM = 1
+SOL_SOCKET = 65535
+SO_ACCEPTFILTER = 4096
+SO_BROADCAST = 32
+SO_DEBUG = 1
+SO_DONTROUTE = 16
+SO_ERROR = 4103
+SO_KEEPALIVE = 8
+SO_LINGER = 128
+SO_NOSIGPIPE = 2048
+SO_OOBINLINE = 256
+SO_PEERCRED = 17
+SO_RCVBUF = 4098
+SO_RCVLOWAT = 4100
+SO_RCVTIMEO = 4108
+SO_REUSEADDR = 4
+SO_REUSEPORT = 512
+SO_SNDBUF = 4097
+SO_SNDLOWAT = 4099
+SO_SNDTIMEO = 4107
+SO_TIMESTAMP = 8192
+SO_TYPE = 4104
+SYS_accept = 30
+SYS_bind = 104
+SYS_connect = 98
+SYS_getpeername = 31
+SYS_getsockname = 32
+SYS_getsockopt = 118
+SYS_listen = 106
+SYS_paccept = 456
+SYS_recvfrom = 29
+SYS_recvmsg = 27
+SYS_sendmsg = 28
+SYS_sendto = 133
+SYS_setsockopt = 105
+SYS_shutdown = 134
+SYS_socket = 394
+SYS_socketpair = 135
diff --git a/sys/netbsd/socket_inet.txt b/sys/netbsd/socket_inet.txt
new file mode 100644
index 000000000..f1a1bedb9
--- /dev/null
+++ b/sys/netbsd/socket_inet.txt
@@ -0,0 +1,64 @@
+# Copyright 2017 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+include <sys/types.h>
+include <sys/socket.h>
+include <sys/sockio.h>
+include <netinet/in.h>
+
+# IP sockets
+
+resource sock_in[sock]
+
+sock_in_pair {
+ f0 sock_in
+ f1 sock_in
+}
+
+sockaddr_in {
+ family const[AF_INET, int16]
+ port proc[20000, 4, int16be]
+ pad array[const[0, int8], 8]
+}
+
+sockaddr_storage_in {
+ addr sockaddr_in
+ pad array[const[0, int64], 15]
+}
+
+socket$inet(domain const[AF_INET], type flags[socket_type], proto int8) sock_in
+socketpair$inet(domain const[AF_INET], type flags[socket_type], proto int8, fds ptr[out, sock_in_pair])
+accept$inet(fd sock_in, peer ptr[out, sockaddr_in, opt], peerlen ptr[inout, len[peer, int32]]) sock_in
+bind$inet(fd sock_in, addr ptr[in, sockaddr_in], addrlen len[addr])
+connect$inet(fd sock_in, addr ptr[in, sockaddr_in], addrlen len[addr])
+sendto$inet(fd sock_in, buf buffer[in], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_in, opt], addrlen len[addr])
+recvfrom$inet(fd sock_in, buf buffer[out], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_in, opt], addrlen len[addr])
+getsockname$inet(fd sock_in, addr ptr[out, sockaddr_in], addrlen ptr[inout, len[addr, int32]])
+getpeername$inet(fd sock_in, peer ptr[out, sockaddr_in], peerlen ptr[inout, len[peer, int32]])
+
+# Generic IP options
+
+# Specific IP options
+
+sockopt_opt_ip_opts = IP_OPTIONS
+
+getsockopt$inet_opts(fd sock_in, level const[IPPROTO_IP], optname flags[sockopt_opt_ip_opts], optval buffer[out], optlen ptr[inout, len[optval, int32]])
+setsockopt$inet_opts(fd sock_in, level const[IPPROTO_IP], optname flags[sockopt_opt_ip_opts], optval buffer[in], optlen len[optval])
+
+group_req_in {
+ gr_interface int32
+ gr_group sockaddr_storage_in
+}
+
+group_source_req_in {
+ gsr_interface int32
+ gsr_group sockaddr_storage_in
+ gsr_source sockaddr_storage_in
+}
+
+group_filter_in {
+ gf_interface int32
+ gf_group sockaddr_storage_in
+ gf_numsrc len[gf_slist, int32]
+ gf_slist array[sockaddr_storage_in]
+}
diff --git a/sys/netbsd/socket_inet6.txt b/sys/netbsd/socket_inet6.txt
new file mode 100644
index 000000000..f341dae78
--- /dev/null
+++ b/sys/netbsd/socket_inet6.txt
@@ -0,0 +1,93 @@
+# Copyright 2017 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+include <sys/types.h>
+include <sys/param.h>
+include <sys/socket.h>
+include <netinet/in.h>
+include <net/route.h>
+include <netinet6/ip6_mroute.h>
+include <compat/linux/common/linux_socket.h>
+include <sys/sockio.h>
+
+# IPv6 sockets
+
+resource sock_in6[sock]
+
+sock_in6_pair {
+ f0 sock_in6
+ f1 sock_in6
+}
+
+sockaddr_in6 {
+ family const[AF_INET6, int16]
+ port proc[20000, 4, int16be]
+ flow int32
+ scope int32
+}
+
+sockaddr_storage_in6 {
+ addr sockaddr_in6
+ pad array[const[0, int64], 12]
+}
+
+socket$inet6(domain const[AF_INET6], type flags[socket_type], proto int8) sock_in6
+socketpair$inet6(domain const[AF_INET6], type flags[socket_type], proto int8, fds ptr[out, sock_in6_pair])
+accept$inet6(fd sock_in6, peer ptr[out, sockaddr_in6, opt], peerlen ptr[inout, len[peer, int32]]) sock_in6
+bind$inet6(fd sock_in6, addr ptr[in, sockaddr_in6], addrlen len[addr])
+connect$inet6(fd sock_in6, addr ptr[in, sockaddr_in6], addrlen len[addr])
+sendto$inet6(fd sock_in6, buf buffer[in], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_in6, opt], addrlen len[addr])
+recvfrom$inet6(fd sock_in6, buf buffer[out], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_in6, opt], addrlen len[addr])
+getsockname$inet6(fd sock_in6, addr ptr[out, sockaddr_in6], addrlen ptr[inout, len[addr, int32]])
+getpeername$inet6(fd sock_in6, peer ptr[out, sockaddr_in6], peerlen ptr[inout, len[peer, int32]])
+
+# Generic IPv6 options
+
+# Specific IPv6 options
+
+# TODO: IPV6_HOPOPTS, IPV6_RTHDRDSTOPTS, IPV6_RTHDR, IPV6_DSTOPTS
+# TODO: IPV6_PATHMTU
+# TODO: IP6T_SO_GET_REVISION_MATCH, IP6T_SO_GET_REVISION_TARGET
+
+setsockopt$inet6_MRT6_ADD_MIF(fd sock_in6, level const[IPPROTO_IPV6], optname const[MRT6_ADD_MIF], optval ptr[in, mif6ctl], optlen len[optval])
+setsockopt$inet6_MRT6_ADD_MFC(fd sock_in6, level const[IPPROTO_IPV6], optname const[MRT6_ADD_MFC], optval ptr[in, mf6cctl], optlen len[optval])
+setsockopt$inet6_MRT6_DEL_MFC(fd sock_in6, level const[IPPROTO_IPV6], optname const[MRT6_DEL_MFC], optval ptr[in, mf6cctl], optlen len[optval])
+
+mif6ctl {
+ mif6c_mifi int16
+ mif6c_flags flags[mif6c_flags, int8]
+ vifc_threshold int8
+ mif6c_pifi int16
+ vifc_rate_limit int32
+}
+
+mif6c_flags = MIFF_REGISTER
+
+mf6cctl {
+ mf6cc_origin sockaddr_in6
+ mf6cc_mcastgrp sockaddr_in6
+ mf6cc_parent int16
+ mf6cc_ifset array[int32, 8]
+}
+
+group_req_in6 {
+ gr_interface int32
+ gr_group sockaddr_storage_in6
+}
+
+group_source_req_in6 {
+ gsr_interface int32
+ gsr_group sockaddr_storage_in6
+ gsr_source sockaddr_storage_in6
+}
+
+group_filter_in6 {
+ gf_interface int32
+ gf_group sockaddr_storage_in6
+ gf_numsrc len[gf_slist, int32]
+ gf_slist array[sockaddr_storage_in6]
+}
+
+in6_ifreq {
+ ifr6_prefixlen int32
+}
diff --git a/sys/netbsd/socket_inet6_amd64.const b/sys/netbsd/socket_inet6_amd64.const
new file mode 100644
index 000000000..1bb0f1444
--- /dev/null
+++ b/sys/netbsd/socket_inet6_amd64.const
@@ -0,0 +1,18 @@
+# AUTOGENERATED FILE
+AF_INET6 = 24
+IPPROTO_IPV6 = 41
+LINUX_AF_INET6 = 10
+MIFF_REGISTER = 1
+MRT6_ADD_MFC = 104
+MRT6_ADD_MIF = 102
+MRT6_DEL_MFC = 105
+SYS_accept = 30
+SYS_bind = 104
+SYS_connect = 98
+SYS_getpeername = 31
+SYS_getsockname = 32
+SYS_recvfrom = 29
+SYS_sendto = 133
+SYS_setsockopt = 105
+SYS_socket = 394
+SYS_socketpair = 135
diff --git a/sys/netbsd/socket_inet_amd64.const b/sys/netbsd/socket_inet_amd64.const
new file mode 100644
index 000000000..676915b18
--- /dev/null
+++ b/sys/netbsd/socket_inet_amd64.const
@@ -0,0 +1,15 @@
+# AUTOGENERATED FILE
+AF_INET = 2
+IPPROTO_IP = 0
+IP_OPTIONS = 1
+SYS_accept = 30
+SYS_bind = 104
+SYS_connect = 98
+SYS_getpeername = 31
+SYS_getsockname = 32
+SYS_getsockopt = 118
+SYS_recvfrom = 29
+SYS_sendto = 133
+SYS_setsockopt = 105
+SYS_socket = 394
+SYS_socketpair = 135
diff --git a/sys/netbsd/socket_unix.txt b/sys/netbsd/socket_unix.txt
new file mode 100644
index 000000000..c0be688b0
--- /dev/null
+++ b/sys/netbsd/socket_unix.txt
@@ -0,0 +1,78 @@
+# Copyright 2017 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+# AF_UNIX support.
+
+include <sys/types.h>
+include <sys/socket.h>
+include <netinet/in.h>
+include <compat/linux/common/linux_socket.h>
+
+resource sock_unix[sock]
+
+socket$unix(domain const[AF_UNIX], type flags[unix_socket_type], proto const[0]) sock_unix
+socketpair$unix(domain const[AF_UNIX], type flags[unix_socket_type], proto const[0], fds ptr[out, unix_pair])
+bind$unix(fd sock_unix, addr ptr[in, sockaddr_un], addrlen len[addr])
+connect$unix(fd sock_unix, addr ptr[in, sockaddr_un], addrlen len[addr])
+accept$unix(fd sock_unix, peer ptr[out, sockaddr_un, opt], peerlen ptr[inout, len[peer, int32]]) sock_unix
+
+sendto$unix(fd sock_unix, buf buffer[in], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_un, opt], addrlen len[addr])
+sendmsg$unix(fd sock_unix, msg ptr[in, msghdr_un], f flags[send_flags])
+recvfrom$unix(fd sock_unix, buf buffer[out], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_un, opt], addrlen len[addr])
+getsockname$unix(fd sock_unix, addr ptr[out, sockaddr_un], addrlen ptr[inout, len[addr, int32]])
+getpeername$unix(fd sock_unix, peer ptr[out, sockaddr_un], peerlen ptr[inout, len[peer, int32]])
+
+unix_socket_type = SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET
+unix_socket_family = AF_UNIX, AF_UNSPEC
+
+unix_pair {
+ fd0 sock_unix
+ fd1 sock_unix
+}
+
+sockaddr_un [
+ file sockaddr_un_file
+ abs sockaddr_un_abstract
+] [varlen]
+
+sockaddr_un_file {
+ family flags[unix_socket_family, int16]
+ path filename
+} [packed]
+
+sockaddr_un_abstract {
+ family flags[unix_socket_family, int16]
+ ind const[0, int8]
+ id proc[20000, 4, int32]
+}
+
+msghdr_un {
+ addr ptr[in, sockaddr_un]
+ addrlen len[addr, int32]
+ vec ptr[in, array[iovec_in]]
+ vlen len[vec, intptr]
+ ctrl ptr[in, array[cmsghdr_un], opt]
+ ctrllen len[ctrl, intptr]
+ f flags[send_flags, int32]
+}
+
+cmsghdr_un [
+ rights cmsghdr_un_rights
+ cred cmsghdr_un_cred
+] [varlen]
+
+cmsghdr_un_rights {
+ len len[parent, intptr]
+ level const[SOL_SOCKET, int32]
+ type const[SCM_RIGHTS, int32]
+ fds array[fd]
+} [align_ptr]
+
+cmsghdr_un_cred {
+ len len[parent, intptr]
+ level const[SOL_SOCKET, int32]
+ type const[LINUX_SCM_CREDENTIALS, int32]
+ pid pid
+ uid uid
+ gid gid
+} [align_ptr]
diff --git a/sys/netbsd/socket_unix_amd64.const b/sys/netbsd/socket_unix_amd64.const
new file mode 100644
index 000000000..2f32c5a0b
--- /dev/null
+++ b/sys/netbsd/socket_unix_amd64.const
@@ -0,0 +1,23 @@
+# AUTOGENERATED FILE
+AF_UNIX = 1
+AF_UNSPEC = 0
+LINUX_AF_UNIX = 1
+LINUX_AF_UNSPEC = 0
+LINUX_SCM_CREDENTIALS = 2
+LINUX_SCM_RIGHTS = 1
+LINUX_SOL_SOCKET = 1
+SCM_RIGHTS = 1
+SOCK_DGRAM = 2
+SOCK_SEQPACKET = 5
+SOCK_STREAM = 1
+SOL_SOCKET = 65535
+SYS_accept = 30
+SYS_bind = 104
+SYS_connect = 98
+SYS_getpeername = 31
+SYS_getsockname = 32
+SYS_recvfrom = 29
+SYS_sendmsg = 28
+SYS_sendto = 133
+SYS_socket = 394
+SYS_socketpair = 135
diff --git a/sys/netbsd/sys.txt b/sys/netbsd/sys.txt
new file mode 100644
index 000000000..9a1796a9c
--- /dev/null
+++ b/sys/netbsd/sys.txt
@@ -0,0 +1,404 @@
+# Copyright 2017 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+include <sys/types.h>
+include <sys/mman.h>
+include <sys/stat.h>
+include <fcntl.h>
+include <unistd.h>
+include <sys/time.h>
+include <dirent.h>
+include <poll.h>
+include <sys/select.h>
+include <sys/param.h>
+include <sys/resource.h>
+include <time.h>
+include <signal.h>
+include <sys/wait.h>
+
+pipe(pipefd ptr[out, pipefd])
+
+stat(file ptr[in, filename], statbuf ptr[out, stat])
+lstat(file ptr[in, filename], statbuf ptr[out, stat])
+
+poll(fds ptr[in, array[pollfd]], nfds len[fds], timeout int32)
+select(n len[inp], inp ptr[inout, fd_set], outp ptr[inout, fd_set], exp ptr[inout, fd_set], tvp ptr[inout, timeval])
+
+mincore(addr vma, size len[addr], vec buffer[out])
+
+fcntl$dupfd(fd fd, cmd flags[fcntl_dupfd], arg fd) fd
+fcntl$getflags(fd fd, cmd flags[fcntl_getflags])
+fcntl$setflags(fd fd, cmd const[F_SETFD], flags flags[fcntl_flags])
+fcntl$setstatus(fd fd, cmd const[F_SETFL], flags flags[fcntl_status])
+fcntl$lock(fd fd, cmd flags[fcntl_lock], lock ptr[in, flock])
+fcntl$getown(fd fd, cmd const[F_GETOWN]) pid
+fcntl$setown(fd fd, cmd const[F_SETOWN], pid pid)
+
+mknod(file ptr[in, filename], mode flags[mknod_mode], dev int32)
+mknod$loop(file ptr[in, filename], mode flags[mknod_mode], dev proc[1792, 2])
+mknodat(dirfd fd_dir, file ptr[in, filename], mode flags[mknod_mode], dev int32)
+chmod(file ptr[in, filename], mode flags[open_mode])
+fchmod(fd fd, mode flags[open_mode])
+fchmodat(dirfd fd_dir, file ptr[in, filename], mode flags[open_mode], flags flags[at_flags])
+chown(file ptr[in, filename], uid uid, gid gid)
+lchown(file ptr[in, filename], uid uid, gid gid)
+fchown(fd fd, uid uid, gid gid)
+fchownat(dirfd fd_dir, file ptr[in, filename], uid uid, gid gid, flags flags[at_flags])
+faccessat(dirfd fd_dir, pathname ptr[in, filename], mode flags[open_mode], flags flags[faccessat_flags])
+utimes(filename ptr[in, filename], times ptr[in, itimerval])
+utimensat(dir fd_dir, pathname ptr[in, filename], times ptr[in, itimerval], flags flags[utimensat_flags])
+
+execve(file ptr[in, filename], argv ptr[in, array[ptr[in, string]]], envp ptr[in, array[ptr[in, string]]])
+
+getgid() gid
+getegid() gid
+setuid(uid uid)
+setgid(gid gid)
+seteuid(euid uid)
+setegid(egid gid)
+getuid() uid
+geteuid() uid
+setpgid(pid pid, pgid pid)
+getpgid(pid pid) pid
+getpgrp() pid
+getpid() pid
+getppid() pid
+setreuid(ruid uid, euid uid)
+setregid(rgid gid, egid gid)
+getgroups(size len[list], list ptr[inout, array[gid]])
+setgroups(size len[list], list ptr[in, array[gid]])
+
+link(old ptr[in, filename], new ptr[in, filename])
+linkat(oldfd fd_dir, old ptr[in, filename], newfd fd_dir, new ptr[in, filename], flags flags[linkat_flags])
+symlinkat(old ptr[in, filename], newfd fd_dir, new ptr[in, filename])
+symlink(old ptr[in, filename], new ptr[in, filename])
+unlink(path ptr[in, filename])
+unlinkat(fd fd_dir, path ptr[in, filename], flags flags[unlinkat_flags])
+readlink(path ptr[in, filename], buf buffer[out], siz len[buf])
+readlinkat(fd fd_dir, path ptr[in, filename], buf buffer[out], siz len[buf])
+rename(old ptr[in, filename], new ptr[in, filename])
+renameat(oldfd fd_dir, old ptr[in, filename], newfd fd_dir, new ptr[in, filename])
+mkdir(path ptr[in, filename], mode flags[open_mode])
+mkdirat(fd fd_dir, path ptr[in, filename], mode flags[open_mode])
+rmdir(path ptr[in, filename])
+truncate(file ptr[in, filename], len intptr)
+ftruncate(fd fd, len intptr)
+flock(fd fd, op flags[flock_op])
+fsync(fd fd)
+fdatasync(fd fd)
+sync()
+getdents(fd fd_dir, ent buffer[out], count len[ent])
+chroot(dir ptr[in, filename])
+fchroot(fd fd)
+chdir(dir ptr[in, filename])
+fchdir(fd fd)
+
+getrusage(who flags[rusage_who], usage ptr[out, rusage])
+getrlimit(res flags[rlimit_type], rlim ptr[out, rlimit])
+setrlimit(res flags[rlimit_type], rlim ptr[in, rlimit])
+
+clock_gettime(id flags[clock_id], tp ptr[out, timespec])
+clock_settime(id flags[clock_id], tp ptr[in, timespec])
+clock_getres(id flags[clock_id], tp ptr[out, timespec])
+clock_nanosleep(id flags[clock_id], flags flags[timer_flags], rqtp ptr[in, timespec], rmtp ptr[out, timespec, opt])
+nanosleep(req ptr[in, timespec], rem ptr[out, timespec, opt])
+getitimer(which flags[getitimer_which], cur ptr[out, itimerval])
+setitimer(which flags[getitimer_which], new ptr[in, itimerval], old ptr[out, itimerval, opt])
+wait4(pid pid, status ptr[out, int32, opt], options flags[wait_options], ru ptr[out, rusage, opt])
+
+pollfd {
+ fd fd
+ events flags[pollfd_events, int16]
+ revents const[0, int16]
+}
+
+sigset {
+ mask int64
+}
+
+sigset_size {
+ ss ptr[inout, sigset]
+ len len[ss, intptr]
+}
+
+resource time_sec[intptr]
+resource time_nsec[intptr]
+resource time_usec[intptr]
+
+# prog knowns about this struct type
+timespec {
+ sec intptr
+ nsec intptr
+}
+
+# prog knowns about this struct type
+timeval {
+ sec intptr
+ usec intptr
+}
+
+statx_timestamp {
+ sec int64
+ nsec int32
+ __reserved int32
+}
+
+itimerspec {
+ interv timespec
+ value timespec
+}
+
+itimerval {
+ interv timeval
+ value timeval
+}
+
+utimbuf {
+ actime intptr
+ modtime intptr
+}
+
+io_event {
+ data int64
+ obj int64
+ res int64
+ res2 int32
+}
+
+sigevent {
+ val const[0, intptr]
+ signo signalno
+ notify flags[sigev_notify, int32]
+ u sigevent_u
+ pad array[const[0, int64], 8]
+}
+
+sigevent_u [
+ tid pid
+ thr sigevent_thread
+]
+
+sigevent_thread {
+# TODO: this is function pointer and pthread_attr_t (?)
+ func buffer[in]
+ attr buffer[in]
+}
+
+cap_header {
+ var flags[cap_version, int32]
+ pid pid
+}
+
+cap_data {
+ eff0 int32
+ perm0 int32
+ inher0 int32
+ eff1 int32
+ perm1 int32
+ inher1 int32
+}
+
+# TODO: fd_set needs to be a separate type
+fd_set {
+ mask0 int64
+ mask1 int64
+ mask2 int64
+ mask3 int64
+ mask4 int64
+ mask5 int64
+ mask6 int64
+ mask7 int64
+}
+
+sock_fprog {
+ len len[filter, int16]
+ filter ptr[in, array[sock_filter]]
+}
+
+sock_filter {
+ code int16
+ jt int8
+ jf int8
+ k int32
+}
+
+file_handle {
+ bytes len[parent, int32]
+ type int32
+ handle array[int8]
+}
+
+mq_attr {
+ flags intptr
+ maxmsg intptr
+ msgsize intptr
+ curmsg intptr
+ res0 intptr
+ res1 intptr
+ res2 intptr
+ res3 intptr
+}
+
+kexec_segment {
+ buf buffer[in]
+ sz len[buf, intptr]
+# TODO: this is address in kernel
+ mem intptr
+ memsz intptr
+}
+
+robust_list {
+ next vma
+ off intptr
+ pend vma
+}
+
+rusage {
+ utime timeval
+ stime timeval
+ maxrss intptr
+ ixrss intptr
+ idrss intptr
+ isrss intptr
+ minflt intptr
+ majflt intptr
+ nswap intptr
+ inblock intptr
+ oublock intptr
+ msgsnd intptr
+ msgrcv intptr
+ signals intptr
+ nvcsw intptr
+ nivcsw intptr
+}
+
+rlimit {
+ soft intptr
+ hard intptr
+}
+
+sigaction {
+# TODO: function pointers need special support
+ handler intptr
+ mask sigset
+ flags flags[sigaction_flags, intptr]
+ restor intptr
+}
+
+tms {
+ utime intptr
+ stime intptr
+ cutime intptr
+ cstime intptr
+}
+
+siginfo {
+ signo signalno
+ errno int32
+ code int32
+ pad3 int32
+# actual size is 128 bytes
+}
+
+timex {
+ stuff0 intptr
+ stuff1 intptr
+ stuff2 intptr
+ stuff3 intptr
+ stuff4 intptr
+ stuff5 intptr
+ stuff6 intptr
+ stuff7 intptr
+ stuff8 intptr
+ stuff9 intptr
+ stuff10 intptr
+ stuff11 intptr
+ stuff12 intptr
+ stuff13 intptr
+ stuff14 intptr
+ stuff15 intptr
+ stuff16 intptr
+ stuff17 intptr
+ stuff18 intptr
+ stuff19 intptr
+ stuff20 intptr
+ stuff21 intptr
+ stuff22 intptr
+ stuff23 intptr
+ stuff24 intptr
+ stuff25 intptr
+}
+
+ustat {
+ free int32
+ inode intptr
+ nampac0 int32
+ nampac1 int32
+ nampac2 int32
+}
+
+user_desc {
+ entry_number int32
+# Base should be vma and limit should be len[base]
+# But these fields are int32, so we can't use vma.
+ base_addr flags[user_desc_bases, int32]
+ limit flags[user_desc_limits, int32]
+ seg_32bit int32:1
+ contents int32:2
+ read_exec_only int32:1
+ limit_in_pages int32:1
+ seg_not_present int32:1
+ useable int32:1
+ lm int32:1
+}
+
+user_desc_bases = 0, 4096, 1048576, 536870912, 536872960, 536875008, 0xffffffff
+user_desc_limits = 0, 1024, 4096, 8192, 16384, 0xffffffff
+
+flock {
+ type flags[flock_type, int16]
+ whence flags[seek_whence, int16]
+ start intptr
+ len intptr
+ pid pid
+}
+
+linger {
+ onoff int32
+ linger int32
+}
+
+ucred {
+ pid pid
+ uid uid
+ gid gid
+}
+
+fadvise_flags = POSIX_FADV_NORMAL, POSIX_FADV_SEQUENTIAL, POSIX_FADV_RANDOM, POSIX_FADV_NOREUSE, POSIX_FADV_WILLNEED, POSIX_FADV_DONTNEED
+clock_type = CLOCK_REALTIME, CLOCK_MONOTONIC, CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID
+sigev_notify = SIGEV_NONE, SIGEV_SIGNAL, SIGEV_THREAD
+cap_version = 0x19980330, 0x20071026, 0x20080522
+pollfd_events = POLLIN, POLLPRI, POLLOUT, POLLERR, POLLHUP, POLLNVAL, POLLRDNORM, POLLRDBAND, POLLWRNORM, POLLWRBAND
+mknod_mode = S_IFREG, S_IFCHR, S_IFBLK, S_IFIFO, S_IFSOCK, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH
+at_flags = AT_SYMLINK_NOFOLLOW, AT_SYMLINK_FOLLOW
+linkat_flags = AT_SYMLINK_FOLLOW
+unlinkat_flags = 0, AT_REMOVEDIR
+flock_op = LOCK_SH, LOCK_EX, LOCK_UN, LOCK_NB
+faccessat_flags = AT_EACCESS, AT_SYMLINK_NOFOLLOW
+rusage_who = RUSAGE_SELF, RUSAGE_CHILDREN
+rlimit_type = RLIMIT_AS, RLIMIT_CORE, RLIMIT_CPU, RLIMIT_DATA, RLIMIT_FSIZE, RLIMIT_MEMLOCK, RLIMIT_NOFILE, RLIMIT_NPROC, RLIMIT_RSS, RLIMIT_STACK, RLIMIT_NTHR, RLIMIT_STACK
+clock_id = CLOCK_REALTIME, CLOCK_MONOTONIC, CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID, CLOCK_VIRTUAL, CLOCK_PROF
+sigprocmask_how = SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK
+getitimer_which = ITIMER_REAL, ITIMER_VIRTUAL, ITIMER_PROF, ITIMER_MONOTONIC
+wait_options = WALLSIG, WALTSIG, WCONTINUED, WEXITED, WNOHANG, WNOZOMBIE, WSTOPPED, WTRAPPED, WUNTRACED
+waitid_which = P_PID, P_PGID, P_ALL
+sigaction_flags = SA_NOCLDSTOP, SA_NOCLDWAIT, SA_NODEFER, SA_ONSTACK, SA_RESETHAND, SA_RESTART, SA_SIGINFO
+timer_flags = 0, TIMER_ABSTIME
+utimensat_flags = 0, AT_SYMLINK_NOFOLLOW
+priority_which = PRIO_PROCESS, PRIO_PGRP, PRIO_USER
+fcntl_dupfd = F_DUPFD, F_DUPFD_CLOEXEC
+fcntl_getflags = F_GETFD, F_GETFL
+fcntl_lock = F_SETLK, F_SETLKW, F_GETLK
+fcntl_flags = FD_CLOEXEC
+fcntl_status = O_APPEND, O_ASYNC, O_NONBLOCK, O_DSYNC, O_RSYNC, O_ALT_IO, O_DIRECT, O_NOSIGPIPE
+flock_type = F_RDLCK, F_WRLCK, F_UNLCK
diff --git a/sys/netbsd/sys_amd64.const b/sys/netbsd/sys_amd64.const
new file mode 100644
index 000000000..4931e5592
--- /dev/null
+++ b/sys/netbsd/sys_amd64.const
@@ -0,0 +1,186 @@
+# AUTOGENERATED FILE
+AT_EACCESS = 256
+AT_REMOVEDIR = 2048
+AT_SYMLINK_FOLLOW = 1024
+AT_SYMLINK_NOFOLLOW = 512
+CLOCK_MONOTONIC = 3
+CLOCK_PROCESS_CPUTIME_ID = 1073741824
+CLOCK_PROF = 2
+CLOCK_REALTIME = 0
+CLOCK_THREAD_CPUTIME_ID = 536870912
+CLOCK_VIRTUAL = 1
+FD_CLOEXEC = 1
+F_DUPFD = 0
+F_DUPFD_CLOEXEC = 12
+F_GETFD = 1
+F_GETFL = 3
+F_GETLK = 7
+F_GETOWN = 5
+F_RDLCK = 1
+F_SETFD = 2
+F_SETFL = 4
+F_SETLK = 8
+F_SETLKW = 9
+F_SETOWN = 6
+F_UNLCK = 2
+F_WRLCK = 3
+ITIMER_MONOTONIC = 3
+ITIMER_PROF = 2
+ITIMER_REAL = 0
+ITIMER_VIRTUAL = 1
+LOCK_EX = 2
+LOCK_NB = 4
+LOCK_SH = 1
+LOCK_UN = 8
+O_ALT_IO = 262144
+O_APPEND = 8
+O_ASYNC = 64
+O_DIRECT = 524288
+O_DSYNC = 65536
+O_NONBLOCK = 4
+O_NOSIGPIPE = 16777216
+O_RSYNC = 131072
+POLLERR = 8
+POLLHUP = 16
+POLLIN = 1
+POLLNVAL = 32
+POLLOUT = 4
+POLLPRI = 2
+POLLRDBAND = 128
+POLLRDNORM = 64
+POLLWRBAND = 256
+POLLWRNORM = 4
+POSIX_FADV_DONTNEED = 4
+POSIX_FADV_NOREUSE = 5
+POSIX_FADV_NORMAL = 0
+POSIX_FADV_RANDOM = 1
+POSIX_FADV_SEQUENTIAL = 2
+POSIX_FADV_WILLNEED = 3
+PRIO_PGRP = 1
+PRIO_PROCESS = 0
+PRIO_USER = 2
+P_ALL = 0
+P_PGID = 4
+P_PID = 1
+RLIMIT_AS = 10
+RLIMIT_CORE = 4
+RLIMIT_CPU = 0
+RLIMIT_DATA = 2
+RLIMIT_FSIZE = 1
+RLIMIT_MEMLOCK = 6
+RLIMIT_NOFILE = 8
+RLIMIT_NPROC = 7
+RLIMIT_NTHR = 11
+RLIMIT_RSS = 5
+RLIMIT_STACK = 3
+RUSAGE_CHILDREN = 18446744073709551615
+RUSAGE_SELF = 0
+SA_NOCLDSTOP = 8
+SA_NOCLDWAIT = 32
+SA_NODEFER = 16
+SA_ONSTACK = 1
+SA_RESETHAND = 4
+SA_RESTART = 2
+SA_SIGINFO = 64
+SIGEV_NONE = 0
+SIGEV_SIGNAL = 1
+SIGEV_THREAD = 2
+SIG_BLOCK = 1
+SIG_SETMASK = 3
+SIG_UNBLOCK = 2
+SYS_chdir = 12
+SYS_chmod = 15
+SYS_chown = 16
+SYS_chroot = 61
+SYS_clock_getres = 429
+SYS_clock_gettime = 427
+SYS_clock_nanosleep = 477
+SYS_clock_settime = 428
+SYS_execve = 59
+SYS_faccessat = 462
+SYS_fchdir = 13
+SYS_fchmod = 124
+SYS_fchmodat = 463
+SYS_fchown = 123
+SYS_fchownat = 464
+SYS_fchroot = 297
+SYS_fcntl = 92
+SYS_fdatasync = 241
+SYS_flock = 131
+SYS_fsync = 95
+SYS_ftruncate = 201
+SYS_getdents = 390
+SYS_getegid = 43
+SYS_geteuid = 25
+SYS_getgid = 47
+SYS_getgroups = 79
+SYS_getitimer = 426
+SYS_getpgid = 207
+SYS_getpgrp = 81
+SYS_getpid = 20
+SYS_getppid = 39
+SYS_getrlimit = 194
+SYS_getrusage = 445
+SYS_getuid = 24
+SYS_lchown = 275
+SYS_link = 9
+SYS_linkat = 457
+SYS_lstat = 441
+SYS_mincore = 78
+SYS_mkdir = 136
+SYS_mkdirat = 461
+SYS_mknod = 450
+SYS_mknodat = 460
+SYS_nanosleep = 430
+SYS_pipe = 42
+SYS_poll = 209
+SYS_readlink = 58
+SYS_readlinkat = 469
+SYS_rename = 128
+SYS_renameat = 458
+SYS_rmdir = 137
+SYS_select = 417
+SYS_setegid = 182
+SYS_seteuid = 183
+SYS_setgid = 181
+SYS_setgroups = 80
+SYS_setitimer = 425
+SYS_setpgid = 82
+SYS_setregid = 127
+SYS_setreuid = 126
+SYS_setrlimit = 195
+SYS_setuid = 23
+SYS_stat = 439
+SYS_symlink = 57
+SYS_symlinkat = 470
+SYS_sync = 36
+SYS_truncate = 200
+SYS_unlink = 10
+SYS_unlinkat = 471
+SYS_utimensat = 467
+SYS_utimes = 420
+SYS_wait4 = 449
+S_IFBLK = 24576
+S_IFCHR = 8192
+S_IFIFO = 4096
+S_IFREG = 32768
+S_IFSOCK = 49152
+S_IRGRP = 32
+S_IROTH = 4
+S_IRUSR = 256
+S_IWGRP = 16
+S_IWOTH = 2
+S_IWUSR = 128
+S_IXGRP = 8
+S_IXOTH = 1
+S_IXUSR = 64
+TIMER_ABSTIME = 1
+WALLSIG = 8
+WALTSIG = 4
+WCONTINUED = 16
+WEXITED = 32
+WNOHANG = 1
+WNOZOMBIE = 131072
+WSTOPPED = 2
+WTRAPPED = 64
+WUNTRACED = 2
diff --git a/sys/syz-extract/netbsd.go b/sys/syz-extract/netbsd.go
index f0af0ba72..04785d8b4 100644
--- a/sys/syz-extract/netbsd.go
+++ b/sys/syz-extract/netbsd.go
@@ -59,9 +59,11 @@ func (*netbsd) processFile(arch *Arch, info *compiler.ConstInfo) (map[string]uin
const SYS = "SYS_"
if strings.HasPrefix(val, SYS) {
for _, prefix := range []string{"_", "__", "___"} {
- compat := SYS + prefix + val[len(SYS):] + "50"
- compatNames[val] = append(compatNames[val], compat)
- info.Consts = append(info.Consts, compat)
+ for _, suffix := range []string{"30", "50"} {
+ compat := SYS + prefix + val[len(SYS):] + suffix
+ compatNames[val] = append(compatNames[val], compat)
+ info.Consts = append(info.Consts, compat)
+ }
}
} else {
compat := "LINUX_" + val