sys: add union type

This commit is contained in:
Dmitry Vyukov 2015-12-29 15:00:57 +01:00
parent d40104b8a3
commit e6529b30ec
18 changed files with 203 additions and 84 deletions

View File

@ -369,13 +369,13 @@ call_t syscalls[] = {
{"setsockopt$udp_int", 54},
{"getsockopt$ip_int", 55},
{"setsockopt$ip_int", 54},
{"getsockopt$ip_buf", 55},
{"getsockopt$ip_mreq", 55},
{"setsockopt$ip_mreq", 54},
{"getsockopt$ip_mreqn", 55},
{"setsockopt$ip_mreqn", 54},
{"getsockopt$ip_mreqsrc", 55},
{"setsockopt$ip_mreqsrc", 54},
{"getsockopt$ip_msfilter", 55},
{"setsockopt$ip_msfilter", 54},
{"getsockopt$ip_mtu", 55},
{"setsockopt$ip_mtu", 54},
@ -1032,13 +1032,13 @@ call_t syscalls[] = {
{"setsockopt$udp_int", 208},
{"getsockopt$ip_int", 209},
{"setsockopt$ip_int", 208},
{"getsockopt$ip_buf", 209},
{"getsockopt$ip_mreq", 209},
{"setsockopt$ip_mreq", 208},
{"getsockopt$ip_mreqn", 209},
{"setsockopt$ip_mreqn", 208},
{"getsockopt$ip_mreqsrc", 209},
{"setsockopt$ip_mreqsrc", 208},
{"getsockopt$ip_msfilter", 209},
{"setsockopt$ip_msfilter", 208},
{"getsockopt$ip_mtu", 209},
{"setsockopt$ip_mtu", 208},

View File

@ -7,10 +7,10 @@ import (
"bytes"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"sync"
"testing"
"path/filepath"
)
func TestProcessTempDir(t *testing.T) {

View File

@ -129,6 +129,9 @@ func foreachArgArray(args *[]*Arg, ret *Arg, f func(arg, base *Arg, parent *[]*A
if arg.Kind == ArgPointer && arg.Res != nil {
rec(arg.Res, arg, parent)
}
if arg.Kind == ArgUnion {
rec(arg.Option, base, parent)
}
}
for _, arg := range *args {
rec(arg, nil, args)
@ -143,15 +146,14 @@ func foreachArg(c *Call, f func(arg, base *Arg, parent *[]*Arg)) {
}
func referencedArgs(args []*Arg, ret *Arg) (res []*Arg) {
f := func(arg, _ *Arg, _ *[]*Arg) {
foreachArgArray(&args, ret, func(arg, _ *Arg, _ *[]*Arg) {
for arg1 := range arg.Uses {
if arg1.Kind != ArgResult {
panic("use references not ArgResult")
}
res = append(res, arg1)
}
}
foreachArgArray(&args, ret, f)
})
return
}
@ -170,10 +172,6 @@ func assignTypeAndDir(c *Call) error {
case ArgPointer:
arg.Dir = DirIn
switch typ1 := typ.(type) {
case sys.FilenameType:
if err := rec(arg.Res, typ, dir); err != nil {
return err
}
case sys.PtrType:
if arg.Res != nil {
if err := rec(arg.Res, typ1.Type, ArgDir(typ1.Dir)); err != nil {
@ -200,6 +198,11 @@ func assignTypeAndDir(c *Call) error {
}
}
}
case ArgUnion:
arg.Dir = dir
if err := rec(arg.Option, arg.OptionType, dir); err != nil {
return err
}
default:
arg.Dir = dir
}

View File

@ -31,6 +31,8 @@ func (arg *Arg) clone(c *Call, newargs map[*Arg]*Arg) *Arg {
if arg.Res != nil {
arg1.Res = arg.Res.clone(c, newargs)
}
case ArgUnion:
arg1.Option = arg.Option.clone(c, newargs)
case ArgResult:
r := newargs[arg.Res]
arg1.Res = r

View File

@ -109,6 +109,9 @@ func (a *Arg) serialize(buf io.Writer, vars map[*Arg]int, varSeq *int) {
a1.serialize(buf, vars, varSeq)
}
buf.Write([]byte{delims[1]})
case ArgUnion:
fmt.Fprintf(buf, "@%v=", a.OptionType.Name())
a.Option.serialize(buf, vars, varSeq)
default:
panic("unknown arg kind")
}
@ -306,6 +309,29 @@ func parseArg(typ sys.Type, p *parser, vars map[string]*Arg) (*Arg, error) {
}
p.Parse(']')
arg = groupArg(inner)
case '@':
t1, ok := typ.(sys.UnionType)
if !ok {
return nil, fmt.Errorf("'@' arg is not a union: %#v", typ)
}
p.Parse('@')
name := p.Ident()
p.Parse('=')
var optType sys.Type
for _, t2 := range t1.Options {
if name == t2.Name() {
optType = t2
break
}
}
if optType == nil {
return nil, fmt.Errorf("union arg %v has unknown option: %v", typ.Name(), name)
}
opt, err := parseArg(optType, p, vars)
if err != nil {
return nil, err
}
arg = unionArg(opt, optType)
case 'n':
p.Parse('n')
p.Parse('i')

View File

@ -59,6 +59,10 @@ func (p *Prog) SerializeForExec() []byte {
}
return
}
if arg1.Kind == ArgUnion {
rec(arg1.Option)
return
}
if sys.IsPad(arg1.Type) {
return
}
@ -172,11 +176,6 @@ func (w *execContext) writeArg(arg *Arg) {
}
w.write(v)
}
case ArgGroup:
// Squash groups.
for _, arg1 := range arg.Inner {
w.writeArg(arg1)
}
default:
panic("unknown arg type")
}

View File

@ -154,6 +154,8 @@ func (p *Prog) Mutate(rs rand.Source, ncalls int, ct *ChoiceTable) {
replaceArg(p, arg.Inner[i], f, calls1)
calls1 = nil
}
case sys.UnionType:
//!!! implement me
case sys.LenType:
panic("bad arg returned by mutationArgs: LenType")
case sys.ConstType, sys.StrConstType:
@ -362,13 +364,11 @@ func mutationArgs(c *Call) (args, bases []*Arg, parents []*[]*Arg) {
foreachArg(c, func(arg, base *Arg, parent *[]*Arg) {
switch arg.Type.(type) {
case sys.StructType:
switch arg.Type.Name() {
default:
if isSpecialStruct(arg.Type) == nil {
// For structs only individual fields are updated.
return
case "timespec", "timeval":
// These special structs are mutated as a whole.
}
// These special structs are mutated as a whole.
case sys.LenType:
// Size is updated when the size-of arg change.
return
@ -380,7 +380,7 @@ func mutationArgs(c *Call) (args, bases []*Arg, parents []*[]*Arg) {
return
}
if base != nil {
if _, ok := base.Type.(sys.StructType); ok && (base.Type.Name() == "timespec" || base.Type.Name() == "timeval") {
if _, ok := base.Type.(sys.StructType); ok && isSpecialStruct(base.Type) != nil {
// These special structs are mutated as a whole.
return
}

View File

@ -80,6 +80,12 @@ func calcStaticPriorities() [][]float32 {
if _, ok := a.Type.(sys.StructType); ok {
noteUsage(1.0, "ptrto-%v", a.Type.Name())
}
if _, ok := a.Type.(sys.UnionType); ok {
noteUsage(1.0, "ptrto-%v", a.Type.Name())
}
if arr, ok := a.Type.(sys.ArrayType); ok {
noteUsage(1.0, "ptrto-%v", arr.Type.Name())
}
case sys.BufferType:
switch a.Kind {
case sys.BufferBlob, sys.BufferFilesystem, sys.BufferAlgType, sys.BufferAlgName:
@ -207,6 +213,10 @@ func foreachArgType(meta *sys.Call, f func(sys.Type, ArgDir)) {
for _, f := range a.Fields {
rec(f, d)
}
case sys.UnionType:
for _, opt := range a.Options {
rec(opt, d)
}
case sys.ResourceType, sys.FileoffType, sys.BufferType,
sys.VmaType, sys.LenType, sys.FlagsType, sys.ConstType,
sys.StrConstType, sys.IntType, sys.FilenameType:

View File

@ -31,6 +31,10 @@ type Arg struct {
Uses map[*Arg]bool // this arg is used by those ArgResult args
OpDiv uintptr // divide result for ArgResult (executed before OpAdd)
OpAdd uintptr // add to result for ArgResult
// ArgUnion/UnionType
Option *Arg
OptionType sys.Type
}
type ArgKind int
@ -41,7 +45,8 @@ const (
ArgPointer // even if these are always constant (for reproducibility), we use a separate type because they are represented in an abstract (base+page+offset) form
ArgPageSize // same as ArgPointer but base is not added, so it represents "lengths" in pages
ArgData
ArgGroup // logical group of args (struct or array)
ArgGroup // logical group of args (struct or array)
ArgUnion
ArgReturn // fake value denoting syscall return value
)
@ -68,6 +73,8 @@ func (a *Arg) Size(typ sys.Type) uintptr {
size += a.Inner[i].Size(f)
}
return size
case sys.UnionType:
return a.Option.Size(a.OptionType)
case sys.ArrayType:
var size uintptr
for _, in := range a.Inner {
@ -111,6 +118,10 @@ func groupArg(inner []*Arg) *Arg {
return &Arg{Kind: ArgGroup, Inner: inner}
}
func unionArg(opt *Arg, typ sys.Type) *Arg {
return &Arg{Kind: ArgUnion, Option: opt, OptionType: typ}
}
func returnArg() *Arg {
return &Arg{Kind: ArgReturn, Dir: DirOut}
}

View File

@ -732,6 +732,10 @@ func (r *randGen) generateArg(s *state, typ sys.Type, dir ArgDir, sizes map[stri
}
args, calls := r.generateArgs(s, a.Fields, dir)
return groupArg(args), nil, calls
case sys.UnionType:
optType := a.Options[r.Intn(len(a.Options))]
opt, size, calls := r.generateArg(s, optType, dir, sizes)
return unionArg(opt, optType), size, calls
case sys.PtrType:
inner, size, calls := r.generateArg(s, a.Type, ArgDir(a.Dir), sizes)
if ArgDir(a.Dir) == DirOut && inner == nil {

View File

@ -123,7 +123,7 @@ func (c *Call) validate(ctx *validCtx) error {
switch typ1 := typ.(type) {
case sys.StructType:
if len(arg.Inner) != len(typ1.Fields) {
return fmt.Errorf("syscall %v: struct arg '%v' has wrong number of fields, want %v, got %v", c.Meta.Name, typ.Name(), len(typ1.Fields), len(arg.Inner))
return fmt.Errorf("syscall %v: struct arg '%v' has wrong number of fields: want %v, got %v", c.Meta.Name, typ.Name(), len(typ1.Fields), len(arg.Inner))
}
for i, arg1 := range arg.Inner {
if err := checkArg(arg1, typ1.Fields[i]); err != nil {
@ -139,6 +139,24 @@ func (c *Call) validate(ctx *validCtx) error {
default:
return fmt.Errorf("syscall %v: group arg '%v' has bad underlying type %+v", c.Meta.Name, typ.Name(), typ)
}
case ArgUnion:
typ1, ok := typ.(sys.UnionType)
if !ok {
return fmt.Errorf("syscall %v: union arg '%v' has bad type", c.Meta.Name, typ.Name())
}
found := false
for _, typ2 := range typ1.Options {
if arg.OptionType.Name() == typ2.Name() {
found = true
break
}
}
if !found {
return fmt.Errorf("syscall %v: union arg '%v' has bad option", c.Meta.Name, typ.Name())
}
if err := checkArg(arg.Option, arg.OptionType); err != nil {
return err
}
case ArgReturn:
default:
return fmt.Errorf("syscall %v: unknown arg '%v' kind", c.Meta.Name, typ.Name())

View File

@ -438,6 +438,25 @@ func (t StructType) Align() uintptr {
return align
}
type UnionType struct {
TypeCommon
Options []Type
}
func (t UnionType) Size() uintptr {
panic("union size is not statically known")
}
func (t UnionType) Align() uintptr {
var align uintptr
for _, opt := range t.Options {
if a1 := opt.Align(); align < a1 {
align = a1
}
}
return align
}
type Dir int
const (
@ -483,6 +502,12 @@ func ResourceCtors(kind ResourceKind, sk ResourceSubkind, precise bool) []*Call
return true
}
}
case UnionType:
for _, opt := range typ1.Options {
if checkArg(opt, dir) {
return true
}
}
case PtrType:
if checkArg(typ1.Type, typ1.Dir) {
return true
@ -525,6 +550,10 @@ func (c *Call) InputResources() []ResourceType {
for _, fld := range typ1.Fields {
checkArg(fld, dir)
}
case UnionType:
for _, opt := range typ1.Options {
checkArg(opt, dir)
}
}
}
for _, arg := range c.Args {
@ -597,6 +626,15 @@ func init() {
t1.Fields[i] = rec(f)
}
t = addAlignment(t1)
case UnionType:
opts := make(map[string]bool)
for i, opt := range t1.Options {
if opts[opt.Name()] {
panic("duplicate option in union")
}
opts[opt.Name()] = true
t1.Options[i] = rec(opt)
}
}
return t
}

View File

@ -38,6 +38,7 @@ getsockopt$SO_TIMESTAMPING(fd fd[sock], level const[SOL_SOCKET], optname const[S
setsockopt$SO_ATTACH_FILTER(fd fd[sock], level const[SOL_SOCKET], optname const[SO_ATTACH_FILTER], optval ptr[in, sock_fprog], optlen len[optval])
getsockopt$sock_buf(fd fd[sock], level const[SOL_SOCKET], optname flags[sockopt_opt_sock_buf], optval buffer[out], optlen ptr[inout, len[optval, int32]])
# IPPROTO_TCP
getsockopt$tcp_int(fd fd[sock], level const[IPPROTO_TCP], optname flags[sockopt_opt_tcp_int], optval ptr[out, int32], optlen ptr[inout, len[optval, int32]])
setsockopt$tcp_int(fd fd[sock], level const[IPPROTO_TCP], optname flags[sockopt_opt_tcp_int], optval ptr[in, int32], optlen len[optval])
getsockopt$tcp_buf(fd fd[sock], level const[IPPROTO_TCP], optname const[TCP_INFO], optval buffer[out], optlen ptr[inout, len[optval, int32]])
@ -46,13 +47,13 @@ getsockopt$udp_int(fd fd[sock], level const[IPPROTO_UDP], optname const[UDP_CORK
setsockopt$udp_int(fd fd[sock], level const[IPPROTO_UDP], optname const[UDP_CORK], optval ptr[in, int32], optlen len[optval])
getsockopt$ip_int(fd fd[sock], level const[IPPROTO_IP], optname flags[sockopt_opt_ip_int], optval ptr[out, int32], optlen ptr[inout, len[optval, int32]])
setsockopt$ip_int(fd fd[sock], level const[IPPROTO_IP], optname flags[sockopt_opt_ip_int], optval ptr[in, int32], optlen len[optval])
getsockopt$ip_buf(fd fd[sock], level const[IPPROTO_IP], optname flags[sockopt_opt_ip_buf], optval buffer[out], optlen ptr[inout, len[optval, int32]])
getsockopt$ip_mreq(fd fd[sock], level const[IPPROTO_IP], optname flags[sockopt_opt_ip_mreq], optval ptr[out, ip_mreq], optlen ptr[inout, len[optval, int32]])
setsockopt$ip_mreq(fd fd[sock], level const[IPPROTO_IP], optname flags[sockopt_opt_ip_mreq], optval ptr[in, ip_mreq], optlen len[optval])
getsockopt$ip_mreqn(fd fd[sock], level const[IPPROTO_IP], optname flags[sockopt_opt_ip_mreq], optval ptr[out, ip_mreqn], optlen ptr[inout, len[optval, int32]])
setsockopt$ip_mreqn(fd fd[sock], level const[IPPROTO_IP], optname flags[sockopt_opt_ip_mreq], optval ptr[in, ip_mreqn], optlen len[optval])
getsockopt$ip_mreqsrc(fd fd[sock], level const[IPPROTO_IP], optname flags[sockopt_opt_ip_mreqsrc], optval ptr[out, ip_mreq_source], optlen ptr[inout, len[optval, int32]])
setsockopt$ip_mreqsrc(fd fd[sock], level const[IPPROTO_IP], optname flags[sockopt_opt_ip_mreqsrc], optval ptr[in, ip_mreq_source], optlen len[optval])
getsockopt$ip_msfilter(fd fd[sock], level const[IPPROTO_IP], optname const[IP_MSFILTER], optval ptr[out, ip_msfilter], optlen ptr[inout, len[optval, int32]])
setsockopt$ip_msfilter(fd fd[sock], level const[IPPROTO_IP], optname const[IP_MSFILTER], optval ptr[in, ip_msfilter], optlen len[optval])
getsockopt$ip_mtu(fd fd[sock], level const[IPPROTO_IP], optname const[IP_MTU_DISCOVER], optval ptr[out, flags[ip_mtu_discover, int32]], optlen ptr[inout, len[optval, int32]])
setsockopt$ip_mtu(fd fd[sock], level const[IPPROTO_IP], optname const[IP_MTU_DISCOVER], optval ptr[in, flags[ip_mtu_discover, int32]], optlen len[optval])
@ -62,6 +63,8 @@ getsockopt$ip_pktinfo(fd fd[sock], level const[IPPROTO_IP], optname const[IP_PKT
setsockopt$ip_pktinfo(fd fd[sock], level const[IPPROTO_IP], optname const[IP_PKTINFO], optval ptr[in, in_pktinfo], optlen len[optval])
getsockopt$ip_ipsec(fd fd[sock], level const[IPPROTO_IP], optname const[IP_IPSEC_POLICY], optval ptr[out, xfrm_filer], optlen ptr[inout, len[optval, int32]])
setsockopt$ip_ipsec(fd fd[sock], level const[IPPROTO_IP], optname const[IP_IPSEC_POLICY], optval ptr[in, xfrm_filer], optlen len[optval])
# IPPROTO_IPV6
getsockopt$ipv6_int(fd fd[sock], level const[IPPROTO_IPV6], optname flags[sockopt_opt_ipv6_int], optval ptr[out, int32], optlen ptr[inout, len[optval, int32]])
setsockopt$ipv6_int(fd fd[sock], level const[IPPROTO_IPV6], optname flags[sockopt_opt_ipv6_int], optval ptr[in, int32], optlen len[optval])
getsockopt$ipv6_mreq(fd fd[sock], level const[IPPROTO_IPV6], optname flags[sockopt_opt_ipv6_mreq], optval ptr[out, ipv6_mreq], optlen ptr[inout, len[optval, int32]])
@ -84,11 +87,11 @@ sockopt_opt_sock_buf = SO_BINDTODEVICE, SO_PEERCRED, SO_PEERNAME, SO_PEERSEC, SO
sockopt_so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE, SOF_TIMESTAMPING_TX_SOFTWARE, SOF_TIMESTAMPING_RX_HARDWARE, SOF_TIMESTAMPING_RX_SOFTWARE, SOF_TIMESTAMPING_SOFTWARE, SOF_TIMESTAMPING_SYS_HARDWARE, SOF_TIMESTAMPING_RAW_HARDWARE, SOF_TIMESTAMPING_OPT_ID, SOF_TIMESTAMPING_TX_SCHED, SOF_TIMESTAMPING_TX_ACK, SOF_TIMESTAMPING_OPT_CMSG, SOF_TIMESTAMPING_OPT_TSONLY
sockopt_opt_tcp_int = TCP_CORK, TCP_DEFER_ACCEPT, TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL, TCP_LINGER2, TCP_MAXSEG, TCP_NODELAY, TCP_QUICKACK, TCP_SYNCNT, TCP_WINDOW_CLAMP
sockopt_opt_ip_int = IP_FREEBIND, IP_HDRINCL, IP_MTU, IP_MULTICAST_ALL, IP_MULTICAST_LOOP, IP_MULTICAST_TTL, IP_NODEFRAG, IP_RECVOPTS, IP_RECVORIGDSTADDR, IP_RECVTOS, IP_RECVTTL, IP_RETOPTS, IP_ROUTER_ALERT, IP_TOS, IP_TRANSPARENT, IP_TTL, IP_RECVERR, IP_PASSSEC, IP_MINTTL, IP_CHECKSUM, IP_BIND_ADDRESS_NO_PORT
sockopt_opt_ip_buf = IP_MSFILTER
sockopt_opt_ip_mreq = IP_ADD_MEMBERSHIP, IP_DROP_MEMBERSHIP, IP_MULTICAST_IF
sockopt_opt_ip_mreqsrc = IP_ADD_SOURCE_MEMBERSHIP, IP_BLOCK_SOURCE, IP_DROP_SOURCE_MEMBERSHIP, IP_UNBLOCK_SOURCE
sockopt_opt_ip_opts = IP_OPTIONS, IP_PKTOPTIONS
ip_msfilter_mode = MCAST_INCLUDE, MCAST_EXCLUDE
ip_msfilter_numsrc = 1
ip_mtu_discover = IP_PMTUDISC_DONT, IP_PMTUDISC_WANT, IP_PMTUDISC_DO, IP_PMTUDISC_PROBE, IP_PMTUDISC_INTERFACE, IP_PMTUDISC_OMIT
sockopt_opt_ipv6_int = IPV6_ADDRFORM, IPV6_MTU, IPV6_MULTICAST_HOPS, IPV6_MULTICAST_IF, IPV6_MULTICAST_LOOP, IPV6_RECVPKTINFO, IPV6_RECVERR, IPV6_ROUTER_ALERT, IPV6_UNICAST_HOPS, IPV6_V6ONLY, IPV6_RTHDR, IPV6_AUTHHDR, IPV6_DSTOPTS, IPV6_HOPOPTS, IPV6_FLOWINFO, IPV6_HOPLIMIT, IPV6_CHECKSUM, IPV6_2292PKTINFO, IPV6_2292HOPOPTS, IPV6_2292DSTOPTS, IPV6_2292RTHDR, IPV6_2292HOPLIMIT
sockopt_opt_ipv6_mreq = IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP, IPV6_JOIN_ANYCAST, IPV6_LEAVE_ANYCAST
@ -161,17 +164,33 @@ unix_pair {
fd1 fd[unix]
}
sockaddr_un {
sockaddr_un [
file sockaddr_un_file
abs sockaddr_un_abstract
]
sockaddr_un_file {
family flags[unix_socket_family, int16]
# TODO: this must be an embeded file name (currently filename implies indirection).
path array[int8]
}
sockaddr_un_abstract {
family flags[unix_socket_family, int16]
ind const[0, int8]
# To ensure isolation.
# This does not work: prog tries to use output sockaddr_un to create pid's.
# But since it is in a union, the call does not always creates the resource.
# pid pid
id int32
}
send_msghdr_un {
addr ptr[in, sockaddr_un]
addrlen len[addr, int32]
vec ptr[in, array[iovec_in]]
vlen len[vec, intptr]
ctrl ptr[in, cmsghdr_un]
ctrl ptr[in, array[cmsghdr_un], opt]
ctrllen len[ctrl, intptr]
f flags[send_flags, int32]
}
@ -186,11 +205,10 @@ recv_msghdr_un {
f int32
}
# TODO: this should be something along the lines of array[union[cmsghdr_rights, cmsghdr_cred]]
cmsghdr_un {
cmsghdr_un [
rights cmsghdr_rights
cred cmsghdr_rights
}
]
cmsghdr_rights {
len len[parent, intptr]
@ -236,7 +254,7 @@ alg_send_msghdr {
addrlen const[0, int32]
vec ptr[in, array[iovec_in]]
vlen len[vec, intptr]
ctrl ptr[in, alg_cmsghdr, opt]
ctrl ptr[in, array[alg_cmsghdr], opt]
ctrllen len[ctrl, intptr]
f flags[send_flags, int32]
}
@ -251,11 +269,11 @@ alg_recv_msghdr {
f int32
}
alg_cmsghdr {
alg_cmsghdr [
iv alg_cmsghdr_iv
op alg_cmsghdr_op
assoc alg_cmsghdr_assoc
}
]
alg_cmsghdr_iv {
len len[parent, intptr]

View File

@ -245,7 +245,7 @@ func initCalls() {
Calls = append(Calls, &Call{ID: 79, Name: "ioctl$int_out", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, FlagsType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Vals: []uintptr{21600, 2}}, PtrType{TypeCommon: TypeCommon{TypeName: "v", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 8}, Dir: DirOut}}})
}()
func() {
Calls = append(Calls, &Call{ID: 80, Name: "ioctl$fiemap", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(3223348747)}, PtrType{TypeCommon: TypeCommon{TypeName: "v", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "fiemap", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "start", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 4, Vals: []uintptr{1, 2, 4}}, IntType{TypeCommon: TypeCommon{TypeName: "mapped", IsOptional: false}, TypeSize: 4}, IntType{TypeCommon: TypeCommon{TypeName: "count", IsOptional: false}, TypeSize: 4}, StructType{TypeCommon: TypeCommon{TypeName: "fiemap_extent", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "logical", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "phys", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 4, Vals: []uintptr{1, 2, 4, 8, 128, 256, 512, 1024, 2048, 4096, 8192}}, ConstType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 4, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 4, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 4, Val: uintptr(0)}}}, StructType{TypeCommon: TypeCommon{TypeName: "fiemap_extent", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "logical", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "phys", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 4, Vals: []uintptr{1, 2, 4, 8, 128, 256, 512, 1024, 2048, 4096, 8192}}, ConstType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 4, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 4, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 4, Val: uintptr(0)}}}}}, Dir: DirIn}}})
Calls = append(Calls, &Call{ID: 80, Name: "ioctl$fiemap", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(3223348747)}, PtrType{TypeCommon: TypeCommon{TypeName: "v", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "fiemap", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "start", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 4, Vals: []uintptr{1, 2, 4}}, IntType{TypeCommon: TypeCommon{TypeName: "mapped", IsOptional: false}, TypeSize: 4}, LenType{TypeCommon: TypeCommon{TypeName: "count", IsOptional: false}, Buf: "extent", TypeSize: 4}, ArrayType{TypeCommon: TypeCommon{TypeName: "extent", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "fiemap_extent", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "logical", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "phys", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 4, Vals: []uintptr{1, 2, 4, 8, 128, 256, 512, 1024, 2048, 4096, 8192}}, ConstType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 4, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 4, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 4, Val: uintptr(0)}}}, Len: 0}}}, Dir: DirIn}}})
}()
func() {
Calls = append(Calls, &Call{ID: 81, Name: "fcntl$dupfd", CallName: "fcntl", Ret: ResourceType{TypeCommon: TypeCommon{TypeName: "ret", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, FlagsType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Vals: []uintptr{0, 1030}}, ResourceType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Kind: ResFD, Subkind: ResAny}}})
@ -645,10 +645,10 @@ func initCalls() {
Calls = append(Calls, &Call{ID: 213, Name: "getdents64", CallName: "getdents64", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdDir}, PtrType{TypeCommon: TypeCommon{TypeName: "ent", IsOptional: false}, Dir: DirOut, Type: BufferType{TypeCommon: TypeCommon{TypeName: "ent", IsOptional: false}, Kind: BufferBlob}}, LenType{TypeCommon: TypeCommon{TypeName: "count", IsOptional: false}, Buf: "ent", TypeSize: 0}}})
}()
func() {
Calls = append(Calls, &Call{ID: 214, Name: "name_to_handle_at", CallName: "name_to_handle_at", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdDir}, PtrType{TypeCommon: TypeCommon{TypeName: "file", IsOptional: false}, Dir: DirIn, Type: FilenameType{TypeCommon: TypeCommon{TypeName: "file", IsOptional: false}}}, PtrType{TypeCommon: TypeCommon{TypeName: "handle", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "file_handle", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "bytes", IsOptional: false}, TypeSize: 4}, IntType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 4}, IntType{TypeCommon: TypeCommon{TypeName: "handl0", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl1", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl2", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl3", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl4", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl5", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl6", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl7", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl8", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl9", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl10", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl11", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl12", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl13", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl14", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl15", IsOptional: false}, TypeSize: 8}}}, Dir: DirIn}, PtrType{TypeCommon: TypeCommon{TypeName: "mnt", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 4}, Dir: DirOut}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 0, Vals: []uintptr{4096, 1024}}}})
Calls = append(Calls, &Call{ID: 214, Name: "name_to_handle_at", CallName: "name_to_handle_at", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdDir}, PtrType{TypeCommon: TypeCommon{TypeName: "file", IsOptional: false}, Dir: DirIn, Type: FilenameType{TypeCommon: TypeCommon{TypeName: "file", IsOptional: false}}}, PtrType{TypeCommon: TypeCommon{TypeName: "handle", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "file_handle", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "bytes", IsOptional: false}, Buf: "parent", TypeSize: 4}, IntType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 4}, ArrayType{TypeCommon: TypeCommon{TypeName: "handle", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, Dir: DirIn}, PtrType{TypeCommon: TypeCommon{TypeName: "mnt", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 4}, Dir: DirOut}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 0, Vals: []uintptr{4096, 1024}}}})
}()
func() {
Calls = append(Calls, &Call{ID: 215, Name: "open_by_handle_at", CallName: "open_by_handle_at", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "mountdirfd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, PtrType{TypeCommon: TypeCommon{TypeName: "handle", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "file_handle", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "bytes", IsOptional: false}, TypeSize: 4}, IntType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 4}, IntType{TypeCommon: TypeCommon{TypeName: "handl0", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl1", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl2", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl3", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl4", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl5", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl6", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl7", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl8", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl9", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl10", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl11", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl12", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl13", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl14", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "handl15", IsOptional: false}, TypeSize: 8}}}, Dir: DirIn}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 0, Vals: []uintptr{0, 1, 2, 1024, 8192, 524288, 64, 16384, 65536, 128, 0, 262144, 256, 131072, 2048, 2097152, 1052672, 512}}}})
Calls = append(Calls, &Call{ID: 215, Name: "open_by_handle_at", CallName: "open_by_handle_at", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "mountdirfd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, PtrType{TypeCommon: TypeCommon{TypeName: "handle", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "file_handle", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "bytes", IsOptional: false}, Buf: "parent", TypeSize: 4}, IntType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 4}, ArrayType{TypeCommon: TypeCommon{TypeName: "handle", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, Dir: DirIn}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 0, Vals: []uintptr{0, 1, 2, 1024, 8192, 524288, 64, 16384, 65536, 128, 0, 262144, 256, 131072, 2048, 2097152, 1052672, 512}}}})
}()
func() {
Calls = append(Calls, &Call{ID: 216, Name: "mount", CallName: "mount", Args: []Type{PtrType{TypeCommon: TypeCommon{TypeName: "src", IsOptional: false}, Dir: DirIn, Type: FilenameType{TypeCommon: TypeCommon{TypeName: "src", IsOptional: false}}}, PtrType{TypeCommon: TypeCommon{TypeName: "dst", IsOptional: false}, Dir: DirIn, Type: FilenameType{TypeCommon: TypeCommon{TypeName: "dst", IsOptional: false}}}, PtrType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, Dir: DirIn, Type: BufferType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, Kind: BufferFilesystem}}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 0, Vals: []uintptr{4096, 128, 64, 8192, 1024, 4, 2048, 8, 2, 1, 2097152, 32, 32768, 16777216, 16}}, PtrType{TypeCommon: TypeCommon{TypeName: "data", IsOptional: false}, Dir: DirIn, Type: BufferType{TypeCommon: TypeCommon{TypeName: "data", IsOptional: false}, Kind: BufferBlob}}}})
@ -1066,28 +1066,28 @@ func initCalls() {
Calls = append(Calls, &Call{ID: 354, Name: "setsockopt$ip_int", CallName: "setsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Vals: []uintptr{15, 3, 14, 49, 34, 33, 22, 6, 20, 13, 12, 7, 5, 1, 19, 2, 11, 18, 21, 23, 24}}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 4}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Buf: "optval", TypeSize: 0}}})
}()
func() {
Calls = append(Calls, &Call{ID: 355, Name: "getsockopt$ip_mreq", CallName: "getsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Vals: []uintptr{35, 36, 32}}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "ip_mreq", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "multi", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "optval", TypeSize: 4}, Dir: DirInOut}}})
Calls = append(Calls, &Call{ID: 355, Name: "getsockopt$ip_buf", CallName: "getsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Vals: []uintptr{41}}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Dir: DirOut, Type: BufferType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Kind: BufferBlob}}, PtrType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "optval", TypeSize: 4}, Dir: DirInOut}}})
}()
func() {
Calls = append(Calls, &Call{ID: 356, Name: "setsockopt$ip_mreq", CallName: "setsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Vals: []uintptr{35, 36, 32}}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "ip_mreq", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "multi", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Buf: "optval", TypeSize: 0}}})
Calls = append(Calls, &Call{ID: 356, Name: "getsockopt$ip_mreq", CallName: "getsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Vals: []uintptr{35, 36, 32}}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "ip_mreq", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "multi", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "optval", TypeSize: 4}, Dir: DirInOut}}})
}()
func() {
Calls = append(Calls, &Call{ID: 357, Name: "getsockopt$ip_mreqn", CallName: "getsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Vals: []uintptr{35, 36, 32}}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "ip_mreqn", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "multi", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "ifindex", IsOptional: false}, TypeSize: 4}}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "optval", TypeSize: 4}, Dir: DirInOut}}})
Calls = append(Calls, &Call{ID: 357, Name: "setsockopt$ip_mreq", CallName: "setsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Vals: []uintptr{35, 36, 32}}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "ip_mreq", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "multi", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Buf: "optval", TypeSize: 0}}})
}()
func() {
Calls = append(Calls, &Call{ID: 358, Name: "setsockopt$ip_mreqn", CallName: "setsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Vals: []uintptr{35, 36, 32}}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "ip_mreqn", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "multi", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "ifindex", IsOptional: false}, TypeSize: 4}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Buf: "optval", TypeSize: 0}}})
Calls = append(Calls, &Call{ID: 358, Name: "getsockopt$ip_mreqn", CallName: "getsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Vals: []uintptr{35, 36, 32}}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "ip_mreqn", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "multi", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "ifindex", IsOptional: false}, TypeSize: 4}}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "optval", TypeSize: 4}, Dir: DirInOut}}})
}()
func() {
Calls = append(Calls, &Call{ID: 359, Name: "getsockopt$ip_mreqsrc", CallName: "getsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Vals: []uintptr{39, 38, 40, 37}}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "ip_mreq_source", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "multi", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "iface", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "source", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "optval", TypeSize: 4}, Dir: DirInOut}}})
Calls = append(Calls, &Call{ID: 359, Name: "setsockopt$ip_mreqn", CallName: "setsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Vals: []uintptr{35, 36, 32}}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "ip_mreqn", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "multi", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "ifindex", IsOptional: false}, TypeSize: 4}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Buf: "optval", TypeSize: 0}}})
}()
func() {
Calls = append(Calls, &Call{ID: 360, Name: "setsockopt$ip_mreqsrc", CallName: "setsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Vals: []uintptr{39, 38, 40, 37}}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "ip_mreq_source", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "multi", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "iface", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "source", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Buf: "optval", TypeSize: 0}}})
Calls = append(Calls, &Call{ID: 360, Name: "getsockopt$ip_mreqsrc", CallName: "getsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Vals: []uintptr{39, 38, 40, 37}}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "ip_mreq_source", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "multi", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "iface", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "source", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "optval", TypeSize: 4}, Dir: DirInOut}}})
}()
func() {
Calls = append(Calls, &Call{ID: 361, Name: "getsockopt$ip_msfilter", CallName: "getsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Val: uintptr(41)}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "ip_msfilter", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "multi", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "iface", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, FlagsType{TypeCommon: TypeCommon{TypeName: "fmode", IsOptional: false}, TypeSize: 4, Vals: []uintptr{1, 0}}, FlagsType{TypeCommon: TypeCommon{TypeName: "numsrc", IsOptional: false}, TypeSize: 4, Vals: []uintptr{1}}, IntType{TypeCommon: TypeCommon{TypeName: "slist", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "optval", TypeSize: 4}, Dir: DirInOut}}})
Calls = append(Calls, &Call{ID: 361, Name: "setsockopt$ip_mreqsrc", CallName: "setsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Vals: []uintptr{39, 38, 40, 37}}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "ip_mreq_source", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "multi", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "iface", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "source", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Buf: "optval", TypeSize: 0}}})
}()
func() {
Calls = append(Calls, &Call{ID: 362, Name: "setsockopt$ip_msfilter", CallName: "setsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Val: uintptr(41)}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "ip_msfilter", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "multi", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "iface", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, FlagsType{TypeCommon: TypeCommon{TypeName: "fmode", IsOptional: false}, TypeSize: 4, Vals: []uintptr{1, 0}}, FlagsType{TypeCommon: TypeCommon{TypeName: "numsrc", IsOptional: false}, TypeSize: 4, Vals: []uintptr{1}}, IntType{TypeCommon: TypeCommon{TypeName: "slist", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Buf: "optval", TypeSize: 0}}})
Calls = append(Calls, &Call{ID: 362, Name: "setsockopt$ip_msfilter", CallName: "setsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Val: uintptr(41)}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "ip_msfilter", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "multi", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, IntType{TypeCommon: TypeCommon{TypeName: "iface", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, FlagsType{TypeCommon: TypeCommon{TypeName: "fmode", IsOptional: false}, TypeSize: 4, Vals: []uintptr{1, 0}}, LenType{TypeCommon: TypeCommon{TypeName: "numsrc", IsOptional: false}, Buf: "slist", TypeSize: 4}, ArrayType{TypeCommon: TypeCommon{TypeName: "slist", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 4, Kind: IntInaddr}, Len: 0}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Buf: "optval", TypeSize: 0}}})
}()
func() {
Calls = append(Calls, &Call{ID: 363, Name: "getsockopt$ip_mtu", CallName: "getsockopt", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdSock}, ConstType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "optname", IsOptional: false}, TypeSize: 0, Val: uintptr(10)}, PtrType{TypeCommon: TypeCommon{TypeName: "optval", IsOptional: false}, Type: FlagsType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 4, Vals: []uintptr{0, 1, 2, 3, 4, 5}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "optlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "optval", TypeSize: 4}, Dir: DirInOut}}})
@ -1144,16 +1144,16 @@ func initCalls() {
Calls = append(Calls, &Call{ID: 380, Name: "socketpair$unix", CallName: "socketpair", Args: []Type{ConstType{TypeCommon: TypeCommon{TypeName: "domain", IsOptional: false}, TypeSize: 0, Val: uintptr(1)}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 0, Vals: []uintptr{1, 2, 5}}, ConstType{TypeCommon: TypeCommon{TypeName: "proto", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}, PtrType{TypeCommon: TypeCommon{TypeName: "fds", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "unix_pair", IsOptional: false}, Fields: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd0", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, ResourceType{TypeCommon: TypeCommon{TypeName: "fd1", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}}}, Dir: DirOut}}})
}()
func() {
Calls = append(Calls, &Call{ID: 381, Name: "bind$unix", CallName: "bind", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "addrlen", IsOptional: false}, Buf: "addr", TypeSize: 0}}})
Calls = append(Calls, &Call{ID: 381, Name: "bind$unix", CallName: "bind", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Type: UnionType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Options: []Type{StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_file", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_abstract", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ConstType{TypeCommon: TypeCommon{TypeName: "ind", IsOptional: false}, TypeSize: 1, Val: uintptr(0)}, IntType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 4}}}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "addrlen", IsOptional: false}, Buf: "addr", TypeSize: 0}}})
}()
func() {
Calls = append(Calls, &Call{ID: 382, Name: "connect$unix", CallName: "connect", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "addrlen", IsOptional: false}, Buf: "addr", TypeSize: 0}}})
Calls = append(Calls, &Call{ID: 382, Name: "connect$unix", CallName: "connect", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Type: UnionType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Options: []Type{StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_file", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_abstract", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ConstType{TypeCommon: TypeCommon{TypeName: "ind", IsOptional: false}, TypeSize: 1, Val: uintptr(0)}, IntType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 4}}}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "addrlen", IsOptional: false}, Buf: "addr", TypeSize: 0}}})
}()
func() {
Calls = append(Calls, &Call{ID: 383, Name: "accept$unix", CallName: "accept", Ret: ResourceType{TypeCommon: TypeCommon{TypeName: "ret", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "peer", IsOptional: true}, Type: StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "peerlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "peer", TypeSize: 4}, Dir: DirInOut}}})
Calls = append(Calls, &Call{ID: 383, Name: "accept$unix", CallName: "accept", Ret: ResourceType{TypeCommon: TypeCommon{TypeName: "ret", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "peer", IsOptional: true}, Type: UnionType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Options: []Type{StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_file", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_abstract", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ConstType{TypeCommon: TypeCommon{TypeName: "ind", IsOptional: false}, TypeSize: 1, Val: uintptr(0)}, IntType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 4}}}}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "peerlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "peer", TypeSize: 4}, Dir: DirInOut}}})
}()
func() {
Calls = append(Calls, &Call{ID: 384, Name: "accept4$unix", CallName: "accept4", Ret: ResourceType{TypeCommon: TypeCommon{TypeName: "ret", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "peer", IsOptional: true}, Type: StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "peerlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "peer", TypeSize: 4}, Dir: DirInOut}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 0, Vals: []uintptr{2048, 524288}}}})
Calls = append(Calls, &Call{ID: 384, Name: "accept4$unix", CallName: "accept4", Ret: ResourceType{TypeCommon: TypeCommon{TypeName: "ret", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "peer", IsOptional: true}, Type: UnionType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Options: []Type{StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_file", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_abstract", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ConstType{TypeCommon: TypeCommon{TypeName: "ind", IsOptional: false}, TypeSize: 1, Val: uintptr(0)}, IntType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 4}}}}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "peerlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "peer", TypeSize: 4}, Dir: DirInOut}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 0, Vals: []uintptr{2048, 524288}}}})
}()
func() {
Calls = append(Calls, &Call{ID: 385, Name: "ioctl$SIOCOUTQ", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(21521)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 4}, Dir: DirOut}}})
@ -1162,7 +1162,7 @@ func initCalls() {
Calls = append(Calls, &Call{ID: 386, Name: "ioctl$SIOCINQ", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(21531)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 4}, Dir: DirOut}}})
}()
func() {
Calls = append(Calls, &Call{ID: 387, Name: "sendto$unix", CallName: "sendto", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "buf", IsOptional: false}, Dir: DirIn, Type: BufferType{TypeCommon: TypeCommon{TypeName: "buf", IsOptional: false}, Kind: BufferBlob}}, LenType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, Buf: "buf", TypeSize: 0}, FlagsType{TypeCommon: TypeCommon{TypeName: "f", IsOptional: false}, TypeSize: 0, Vals: []uintptr{2048, 4, 64, 128, 32768, 16384, 1}}, PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: true}, Type: StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "addrlen", IsOptional: false}, Buf: "addr", TypeSize: 0}}})
Calls = append(Calls, &Call{ID: 387, Name: "sendto$unix", CallName: "sendto", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "buf", IsOptional: false}, Dir: DirIn, Type: BufferType{TypeCommon: TypeCommon{TypeName: "buf", IsOptional: false}, Kind: BufferBlob}}, LenType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, Buf: "buf", TypeSize: 0}, FlagsType{TypeCommon: TypeCommon{TypeName: "f", IsOptional: false}, TypeSize: 0, Vals: []uintptr{2048, 4, 64, 128, 32768, 16384, 1}}, PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: true}, Type: UnionType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Options: []Type{StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_file", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_abstract", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ConstType{TypeCommon: TypeCommon{TypeName: "ind", IsOptional: false}, TypeSize: 1, Val: uintptr(0)}, IntType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 4}}}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "addrlen", IsOptional: false}, Buf: "addr", TypeSize: 0}}})
}()
func() {
Calls = append(Calls, &Call{ID: 388, Name: "sendmsg$unix", CallName: "sendmsg", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "msg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "send_msghdr", IsOptional: false}, Fields: []Type{PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Type: BufferType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Kind: BufferSockaddr}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "addrlen", IsOptional: false}, Buf: "addr", TypeSize: 4}, PtrType{TypeCommon: TypeCommon{TypeName: "vec", IsOptional: false}, Type: ArrayType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "iovec_in", IsOptional: false}, Fields: []Type{PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Dir: DirIn, Type: BufferType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Kind: BufferBlob}}, LenType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, Buf: "addr", TypeSize: 8}}}, Len: 0}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "vlen", IsOptional: false}, Buf: "vec", TypeSize: 8}, PtrType{TypeCommon: TypeCommon{TypeName: "ctrl", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "cmsghdr", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 4}, IntType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 4}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "ctrllen", IsOptional: false}, Buf: "ctrl", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "f", IsOptional: false}, TypeSize: 4, Vals: []uintptr{2048, 4, 64, 128, 32768, 16384, 1}}, IntType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, TypeSize: 4}}}, Dir: DirIn}, FlagsType{TypeCommon: TypeCommon{TypeName: "f", IsOptional: false}, TypeSize: 0, Vals: []uintptr{2048, 4, 64, 128, 32768, 16384, 1}}}})
@ -1171,7 +1171,7 @@ func initCalls() {
Calls = append(Calls, &Call{ID: 389, Name: "sendmmsg$unix", CallName: "sendmmsg", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "mmsg", IsOptional: false}, Type: ArrayType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "send_msghdr", IsOptional: false}, Fields: []Type{PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Type: BufferType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Kind: BufferSockaddr}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "addrlen", IsOptional: false}, Buf: "addr", TypeSize: 4}, PtrType{TypeCommon: TypeCommon{TypeName: "vec", IsOptional: false}, Type: ArrayType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "iovec_in", IsOptional: false}, Fields: []Type{PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Dir: DirIn, Type: BufferType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Kind: BufferBlob}}, LenType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, Buf: "addr", TypeSize: 8}}}, Len: 0}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "vlen", IsOptional: false}, Buf: "vec", TypeSize: 8}, PtrType{TypeCommon: TypeCommon{TypeName: "ctrl", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "cmsghdr", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "level", IsOptional: false}, TypeSize: 4}, IntType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 4}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "ctrllen", IsOptional: false}, Buf: "ctrl", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "f", IsOptional: false}, TypeSize: 4, Vals: []uintptr{2048, 4, 64, 128, 32768, 16384, 1}}, IntType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, TypeSize: 4}}}, Len: 0}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "vlen", IsOptional: false}, Buf: "mmsg", TypeSize: 0}, FlagsType{TypeCommon: TypeCommon{TypeName: "f", IsOptional: false}, TypeSize: 0, Vals: []uintptr{2048, 4, 64, 128, 32768, 16384, 1}}}})
}()
func() {
Calls = append(Calls, &Call{ID: 390, Name: "recvfrom$unix", CallName: "recvfrom", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "buf", IsOptional: false}, Dir: DirOut, Type: BufferType{TypeCommon: TypeCommon{TypeName: "buf", IsOptional: false}, Kind: BufferBlob}}, LenType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, Buf: "buf", TypeSize: 0}, FlagsType{TypeCommon: TypeCommon{TypeName: "f", IsOptional: false}, TypeSize: 0, Vals: []uintptr{1073741824, 64, 8192, 1, 2, 32, 256, 65536}}, PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: true}, Type: StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "addrlen", IsOptional: false}, Buf: "addr", TypeSize: 0}}})
Calls = append(Calls, &Call{ID: 390, Name: "recvfrom$unix", CallName: "recvfrom", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "buf", IsOptional: false}, Dir: DirOut, Type: BufferType{TypeCommon: TypeCommon{TypeName: "buf", IsOptional: false}, Kind: BufferBlob}}, LenType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, Buf: "buf", TypeSize: 0}, FlagsType{TypeCommon: TypeCommon{TypeName: "f", IsOptional: false}, TypeSize: 0, Vals: []uintptr{1073741824, 64, 8192, 1, 2, 32, 256, 65536}}, PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: true}, Type: UnionType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Options: []Type{StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_file", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_abstract", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ConstType{TypeCommon: TypeCommon{TypeName: "ind", IsOptional: false}, TypeSize: 1, Val: uintptr(0)}, IntType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 4}}}}}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "addrlen", IsOptional: false}, Buf: "addr", TypeSize: 0}}})
}()
func() {
Calls = append(Calls, &Call{ID: 391, Name: "recvmsg$unix", CallName: "recvmsg", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "msg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "recv_msghdr", IsOptional: false}, Fields: []Type{PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Type: BufferType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Kind: BufferSockaddr}, Dir: DirOut}, LenType{TypeCommon: TypeCommon{TypeName: "addrlen", IsOptional: false}, Buf: "addr", TypeSize: 4}, PtrType{TypeCommon: TypeCommon{TypeName: "vec", IsOptional: false}, Type: ArrayType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "iovec_out", IsOptional: false}, Fields: []Type{PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Dir: DirOut, Type: BufferType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Kind: BufferBlob}}, LenType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, Buf: "addr", TypeSize: 8}}}, Len: 0}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "vlen", IsOptional: false}, Buf: "vec", TypeSize: 8}, PtrType{TypeCommon: TypeCommon{TypeName: "ctrl", IsOptional: false}, Dir: DirOut, Type: BufferType{TypeCommon: TypeCommon{TypeName: "ctrl", IsOptional: false}, Kind: BufferBlob}}, LenType{TypeCommon: TypeCommon{TypeName: "ctrllen", IsOptional: false}, Buf: "ctrl", TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "f", IsOptional: false}, TypeSize: 4}, IntType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, TypeSize: 4}}}, Dir: DirIn}, FlagsType{TypeCommon: TypeCommon{TypeName: "f", IsOptional: false}, TypeSize: 0, Vals: []uintptr{1073741824, 64, 8192, 1, 2, 32, 256, 65536}}}})
@ -1180,10 +1180,10 @@ func initCalls() {
Calls = append(Calls, &Call{ID: 392, Name: "recvmmsg$unix", CallName: "recvmmsg", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "mmsg", IsOptional: false}, Type: ArrayType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "recv_msghdr", IsOptional: false}, Fields: []Type{PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Type: BufferType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Kind: BufferSockaddr}, Dir: DirOut}, LenType{TypeCommon: TypeCommon{TypeName: "addrlen", IsOptional: false}, Buf: "addr", TypeSize: 4}, PtrType{TypeCommon: TypeCommon{TypeName: "vec", IsOptional: false}, Type: ArrayType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "iovec_out", IsOptional: false}, Fields: []Type{PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Dir: DirOut, Type: BufferType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Kind: BufferBlob}}, LenType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, Buf: "addr", TypeSize: 8}}}, Len: 0}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "vlen", IsOptional: false}, Buf: "vec", TypeSize: 8}, PtrType{TypeCommon: TypeCommon{TypeName: "ctrl", IsOptional: false}, Dir: DirOut, Type: BufferType{TypeCommon: TypeCommon{TypeName: "ctrl", IsOptional: false}, Kind: BufferBlob}}, LenType{TypeCommon: TypeCommon{TypeName: "ctrllen", IsOptional: false}, Buf: "ctrl", TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "f", IsOptional: false}, TypeSize: 4}, IntType{TypeCommon: TypeCommon{TypeName: "len", IsOptional: false}, TypeSize: 4}}}, Len: 0}, Dir: DirIn}, LenType{TypeCommon: TypeCommon{TypeName: "vlen", IsOptional: false}, Buf: "mmsg", TypeSize: 0}, FlagsType{TypeCommon: TypeCommon{TypeName: "f", IsOptional: false}, TypeSize: 0, Vals: []uintptr{1073741824, 64, 8192, 1, 2, 32, 256, 65536}}}})
}()
func() {
Calls = append(Calls, &Call{ID: 393, Name: "getsockname$unix", CallName: "getsockname", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "addrlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "addr", TypeSize: 4}, Dir: DirInOut}}})
Calls = append(Calls, &Call{ID: 393, Name: "getsockname$unix", CallName: "getsockname", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Type: UnionType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Options: []Type{StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_file", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_abstract", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ConstType{TypeCommon: TypeCommon{TypeName: "ind", IsOptional: false}, TypeSize: 1, Val: uintptr(0)}, IntType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 4}}}}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "addrlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "addr", TypeSize: 4}, Dir: DirInOut}}})
}()
func() {
Calls = append(Calls, &Call{ID: 394, Name: "getpeername$unix", CallName: "getpeername", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "peer", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "peerlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "peer", TypeSize: 4}, Dir: DirInOut}}})
Calls = append(Calls, &Call{ID: 394, Name: "getpeername$unix", CallName: "getpeername", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: FdUnix}, PtrType{TypeCommon: TypeCommon{TypeName: "peer", IsOptional: false}, Type: UnionType{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsOptional: false}, Options: []Type{StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_file", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ArrayType{TypeCommon: TypeCommon{TypeName: "path", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 1}, Len: 0}}}, StructType{TypeCommon: TypeCommon{TypeName: "sockaddr_un_abstract", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "family", IsOptional: false}, TypeSize: 2, Vals: []uintptr{1, 0}}, ConstType{TypeCommon: TypeCommon{TypeName: "ind", IsOptional: false}, TypeSize: 1, Val: uintptr(0)}, IntType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 4}}}}}, Dir: DirOut}, PtrType{TypeCommon: TypeCommon{TypeName: "peerlen", IsOptional: false}, Type: LenType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, Buf: "peer", TypeSize: 4}, Dir: DirInOut}}})
}()
func() {
Calls = append(Calls, &Call{ID: 395, Name: "socket$alg", CallName: "socket", Ret: ResourceType{TypeCommon: TypeCommon{TypeName: "ret", IsOptional: false}, Kind: ResFD, Subkind: FdAlg}, Args: []Type{ConstType{TypeCommon: TypeCommon{TypeName: "domain", IsOptional: false}, TypeSize: 0, Val: uintptr(38)}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 0, Val: uintptr(5)}, ConstType{TypeCommon: TypeCommon{TypeName: "proto", IsOptional: false}, TypeSize: 0, Val: uintptr(0)}}})

View File

@ -707,25 +707,9 @@ sock_filter {
}
file_handle {
bytes int32
bytes len[parent, int32]
type int32
# TODO: again embed array of variable length (bytes is the length)
handl0 int64
handl1 int64
handl2 int64
handl3 int64
handl4 int64
handl5 int64
handl6 int64
handl7 int64
handl8 int64
handl9 int64
handl10 int64
handl11 int64
handl12 int64
handl13 int64
handl14 int64
handl15 int64
handle array[int8]
}
mq_attr {
@ -902,9 +886,8 @@ ip_msfilter {
multi in_addr
iface in_addr
fmode flags[ip_msfilter_mode, int32]
numsrc flags[ip_msfilter_numsrc, int32]
# TODO: this is variable-length array and numsrc it its length
slist in_addr
numsrc len[slist, int32]
slist array[in_addr]
}
in_pktinfo {
@ -1011,11 +994,8 @@ fiemap {
len int64
flags flags[fiemap_flags, int32]
mapped int32
# TODO: count is number of elements in extents array below
count int32
# TODO: this is variable-length array
extent0 fiemap_extent
extent1 fiemap_extent
count len[extent, int32]
extent array[fiemap_extent]
}
fiemap_extent {

View File

@ -2,4 +2,4 @@
package sys
// Maps internal syscall ID onto kernel syscall number.
var numbers = []int{2, 2, 257, 85, 3, 0, 17, 19, 295, 1, 18, 20, 296, 8, 32, 33, 292, 22, 293, 276, 275, 278, 40, 4, 6, 5, 7, 271, 23, 270, 213, 291, 233, 232, 281, 282, 289, 284, 290, 283, 286, 287, 323, 16, 16, 16, 16, 16, 16, 9, 11, 25, 216, 10, 26, 28, 221, 187, 237, 279, 256, 238, 239, 27, 149, 325, 150, 151, 152, 319, 272, 312, 202, 273, 274, 219, 16, 16, 16, 16, 16, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 206, 207, 208, 209, 210, 125, 126, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, 317, 240, 242, 243, 244, 245, 241, 68, 69, 70, 71, 64, 65, 220, 66, 29, 30, 31, 67, 133, 259, 90, 91, 268, 92, 94, 93, 260, 285, 269, 132, 235, 261, 280, 104, 108, 105, 106, 102, 107, 109, 121, 111, 39, 186, 113, 114, 117, 119, 118, 120, 122, 123, 115, 116, 135, 253, 294, 254, 255, 300, 301, 86, 265, 266, 88, 87, 263, 89, 267, 82, 264, 316, 83, 258, 84, 76, 77, 73, 74, 75, 162, 306, 277, 212, 78, 217, 303, 304, 165, 165, 166, 155, 139, 139, 139, 137, 138, 134, 175, 313, 176, 246, 177, 103, 63, 99, 136, 163, 98, 97, 160, 302, 172, 173, 252, 252, 251, 251, 308, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 201, 228, 227, 305, 229, 230, 222, 224, 225, 223, 226, 13, 14, 15, 127, 128, 130, 129, 297, 131, 234, 200, 34, 37, 35, 36, 38, 60, 231, 247, 61, 100, 205, 211, 154, 154, 154, 154, 310, 311, 218, 140, 141, 145, 144, 148, 143, 142, 204, 203, 315, 314, 24, 318, 324, 41, 53, 43, 288, 49, 50, 42, 48, 44, 46, 307, 45, 47, 299, 51, 52, 55, 54, 54, 55, 54, 54, 55, 54, 55, 54, 55, 54, 54, 54, 55, 54, 55, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 41, 53, 49, 42, 43, 288, 16, 16, 44, 46, 307, 45, 47, 299, 51, 52, 41, 49, 54, 54, 43, 46, 307, 47, 299, 41, 49, 42, 43, 54, 54, 55, 46, 307, 41, 42, 41, 49, 16, 54, 54, 54, 55, 41, 49, 42, 55, 55, 41, 49, 42, 54, 55, 54, 55, 54, 55, 41, 49, 42, 54, 55, 55, 41, 16, 16, 16, 16, 41, 16, 16, 16, 16, 41, 16, 16, 16, 16, 16, 16, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 2, 1000001, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 298, 16, 16, 16, 16, 16, 16, 16, 16, 16, 248, 249, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 1000003, 1000004, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1000002, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16}
var numbers = []int{2, 2, 257, 85, 3, 0, 17, 19, 295, 1, 18, 20, 296, 8, 32, 33, 292, 22, 293, 276, 275, 278, 40, 4, 6, 5, 7, 271, 23, 270, 213, 291, 233, 232, 281, 282, 289, 284, 290, 283, 286, 287, 323, 16, 16, 16, 16, 16, 16, 9, 11, 25, 216, 10, 26, 28, 221, 187, 237, 279, 256, 238, 239, 27, 149, 325, 150, 151, 152, 319, 272, 312, 202, 273, 274, 219, 16, 16, 16, 16, 16, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 206, 207, 208, 209, 210, 125, 126, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, 317, 240, 242, 243, 244, 245, 241, 68, 69, 70, 71, 64, 65, 220, 66, 29, 30, 31, 67, 133, 259, 90, 91, 268, 92, 94, 93, 260, 285, 269, 132, 235, 261, 280, 104, 108, 105, 106, 102, 107, 109, 121, 111, 39, 186, 113, 114, 117, 119, 118, 120, 122, 123, 115, 116, 135, 253, 294, 254, 255, 300, 301, 86, 265, 266, 88, 87, 263, 89, 267, 82, 264, 316, 83, 258, 84, 76, 77, 73, 74, 75, 162, 306, 277, 212, 78, 217, 303, 304, 165, 165, 166, 155, 139, 139, 139, 137, 138, 134, 175, 313, 176, 246, 177, 103, 63, 99, 136, 163, 98, 97, 160, 302, 172, 173, 252, 252, 251, 251, 308, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 201, 228, 227, 305, 229, 230, 222, 224, 225, 223, 226, 13, 14, 15, 127, 128, 130, 129, 297, 131, 234, 200, 34, 37, 35, 36, 38, 60, 231, 247, 61, 100, 205, 211, 154, 154, 154, 154, 310, 311, 218, 140, 141, 145, 144, 148, 143, 142, 204, 203, 315, 314, 24, 318, 324, 41, 53, 43, 288, 49, 50, 42, 48, 44, 46, 307, 45, 47, 299, 51, 52, 55, 54, 54, 55, 54, 54, 55, 54, 55, 54, 55, 54, 54, 54, 55, 54, 55, 55, 54, 55, 54, 55, 54, 55, 54, 55, 55, 54, 55, 54, 55, 54, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 41, 53, 49, 42, 43, 288, 16, 16, 44, 46, 307, 45, 47, 299, 51, 52, 41, 49, 54, 54, 43, 46, 307, 47, 299, 41, 49, 42, 43, 54, 54, 55, 46, 307, 41, 42, 41, 49, 16, 54, 54, 54, 55, 41, 49, 42, 55, 55, 41, 49, 42, 54, 55, 54, 55, 54, 55, 41, 49, 42, 54, 55, 55, 41, 16, 16, 16, 16, 41, 16, 16, 16, 16, 41, 16, 16, 16, 16, 16, 16, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 54, 55, 2, 1000001, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 298, 16, 16, 16, 16, 16, 16, 16, 16, 16, 248, 249, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 1000003, 1000004, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1000002, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16}

View File

@ -2,4 +2,4 @@
package sys
// Maps internal syscall ID onto kernel syscall number.
var numbers = []int{-1, -1, 56, -1, 57, 63, 67, 65, 69, 64, 68, 66, 70, 62, 23, -1, 24, -1, 59, 77, 76, 75, 71, -1, -1, 80, -1, 73, -1, 72, -1, 20, 21, -1, 22, -1, 74, -1, 19, 85, 86, 87, -1, 29, 29, 29, 29, 29, 29, 222, 215, 216, 234, 226, 227, 233, 223, 213, 235, 239, 238, 237, 236, 232, 228, -1, 229, 230, 231, -1, 97, 272, 98, 99, 100, 128, 29, 29, 29, 29, 29, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 0, 1, 4, 2, 3, 90, 91, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, -1, 277, 180, 182, 183, 184, 185, 181, 186, 189, 188, 187, 190, 193, 192, 191, 194, 196, 195, 197, -1, 33, -1, 52, 53, -1, -1, 55, 54, 47, 48, -1, -1, -1, 88, 176, 177, 146, 144, 174, 175, 154, 155, -1, 172, 178, 145, 143, 147, 149, 148, 150, 151, 152, 158, 159, 92, -1, 26, 27, 28, 262, 263, -1, 37, 36, -1, -1, 35, -1, 78, -1, 38, 276, -1, 34, -1, 45, 46, 32, 82, 83, 81, 267, 84, 18, -1, 61, 264, 265, 40, 40, 39, 41, -1, -1, -1, 43, 44, -1, 105, 273, 106, 104, -1, 116, 160, 179, -1, 89, 165, 163, 164, 261, -1, -1, 31, 31, 30, 30, 268, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, 113, 112, 266, 114, 115, 107, 108, 109, 110, 111, 134, 135, 139, 136, 137, 133, 138, 240, 132, 131, 130, -1, -1, 101, 102, 103, 93, 94, 95, 260, 153, -1, -1, -1, -1, -1, -1, 270, 271, 96, 141, 140, 120, 119, 127, 121, 118, 123, 122, 275, 274, 124, -1, -1, 198, 199, 202, 242, 200, 201, 203, 210, 206, 211, 269, 207, 212, 243, 204, 205, 209, 208, 208, 209, 208, 208, 209, 208, 209, 208, 209, 208, 208, 208, 209, 208, 209, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 198, 199, 200, 203, 202, 242, 29, 29, 206, 211, 269, 207, 212, 243, 204, 205, 198, 200, 208, 208, 202, 211, 269, 212, 243, 198, 200, 203, 202, 208, 208, 209, 211, 269, 198, 203, 198, 200, 29, 208, 208, 208, 209, 198, 200, 203, 209, 209, 198, 200, 203, 208, 209, 208, 209, 208, 209, 198, 200, 203, 208, 209, 209, 198, 29, 29, 29, 29, 198, 29, 29, 29, 29, 198, 29, 29, 29, 29, 29, 29, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, -1, 1000001, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 241, 29, 29, 29, 29, 29, 29, 29, 29, 29, 217, 218, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1000003, 1000004, 29, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 1000002, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -1, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29}
var numbers = []int{-1, -1, 56, -1, 57, 63, 67, 65, 69, 64, 68, 66, 70, 62, 23, -1, 24, -1, 59, 77, 76, 75, 71, -1, -1, 80, -1, 73, -1, 72, -1, 20, 21, -1, 22, -1, 74, -1, 19, 85, 86, 87, -1, 29, 29, 29, 29, 29, 29, 222, 215, 216, 234, 226, 227, 233, 223, 213, 235, 239, 238, 237, 236, 232, 228, -1, 229, 230, 231, -1, 97, 272, 98, 99, 100, 128, 29, 29, 29, 29, 29, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 0, 1, 4, 2, 3, 90, 91, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, -1, 277, 180, 182, 183, 184, 185, 181, 186, 189, 188, 187, 190, 193, 192, 191, 194, 196, 195, 197, -1, 33, -1, 52, 53, -1, -1, 55, 54, 47, 48, -1, -1, -1, 88, 176, 177, 146, 144, 174, 175, 154, 155, -1, 172, 178, 145, 143, 147, 149, 148, 150, 151, 152, 158, 159, 92, -1, 26, 27, 28, 262, 263, -1, 37, 36, -1, -1, 35, -1, 78, -1, 38, 276, -1, 34, -1, 45, 46, 32, 82, 83, 81, 267, 84, 18, -1, 61, 264, 265, 40, 40, 39, 41, -1, -1, -1, 43, 44, -1, 105, 273, 106, 104, -1, 116, 160, 179, -1, 89, 165, 163, 164, 261, -1, -1, 31, 31, 30, 30, 268, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, 113, 112, 266, 114, 115, 107, 108, 109, 110, 111, 134, 135, 139, 136, 137, 133, 138, 240, 132, 131, 130, -1, -1, 101, 102, 103, 93, 94, 95, 260, 153, -1, -1, -1, -1, -1, -1, 270, 271, 96, 141, 140, 120, 119, 127, 121, 118, 123, 122, 275, 274, 124, -1, -1, 198, 199, 202, 242, 200, 201, 203, 210, 206, 211, 269, 207, 212, 243, 204, 205, 209, 208, 208, 209, 208, 208, 209, 208, 209, 208, 209, 208, 208, 208, 209, 208, 209, 209, 208, 209, 208, 209, 208, 209, 208, 209, 209, 208, 209, 208, 209, 208, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 198, 199, 200, 203, 202, 242, 29, 29, 206, 211, 269, 207, 212, 243, 204, 205, 198, 200, 208, 208, 202, 211, 269, 212, 243, 198, 200, 203, 202, 208, 208, 209, 211, 269, 198, 203, 198, 200, 29, 208, 208, 208, 209, 198, 200, 203, 209, 209, 198, 200, 203, 208, 209, 208, 209, 208, 209, 198, 200, 203, 208, 209, 209, 198, 29, 29, 29, 29, 198, 29, 29, 29, 29, 198, 29, 29, 29, 29, 29, 29, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, 208, 209, -1, 1000001, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 241, 29, 29, 29, 29, 29, 29, 29, 29, 29, 217, 218, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1000003, 1000004, 29, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 1000002, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -1, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29}

View File

@ -65,8 +65,9 @@ type Syscall struct {
}
type Struct struct {
Name string
Flds [][]string
Name string
Flds [][]string
IsUnion bool
}
func generate(syscalls []Syscall, structs map[string]Struct, unnamed map[string][]string, flags map[string][]string, flagVals map[string]string, out io.Writer) {
@ -311,7 +312,13 @@ func generateArg(name, typ string, a []string, structs map[string]Struct, unname
failf("unknown unnamed type '%v'", typ)
}
if str, ok := structs[typ]; ok {
fmt.Fprintf(out, "StructType{TypeCommon: TypeCommon{TypeName: \"%v\", IsOptional: %v}, Fields: []Type{", str.Name, false)
typ := "StructType"
fields := "Fields"
if str.IsUnion {
typ = "UnionType"
fields = "Options"
}
fmt.Fprintf(out, "%v{TypeCommon: TypeCommon{TypeName: \"%v\", IsOptional: %v}, %v: []Type{", typ, str.Name, false, fields)
for i, a := range str.Flds {
if i != 0 {
fmt.Fprintf(out, ", ")
@ -538,8 +545,8 @@ func parse(in io.Reader) (includes []string, defines map[string]string, syscalls
}
if str != nil {
// Parsing a struct.
if p.Char() == '}' {
p.Parse('}')
if p.Char() == '}' || p.Char() == ']' {
p.Parse(p.Char())
if _, ok := structs[str.Name]; ok {
failf("%v struct is defined multiple times", str.Name)
}
@ -614,6 +621,9 @@ func parse(in io.Reader) (includes []string, defines map[string]string, syscalls
case '{':
p.Parse('{')
str = &Struct{Name: name}
case '[':
p.Parse('[')
str = &Struct{Name: name, IsUnion: true}
default:
failf("bad line (%v)", p.Str())
}