sizeof_1_ = 8; aggr _1_ { 'D' 0 lo; 'D' 4 hi; }; defn _1_(addr) { complex _1_ addr; print(" lo ", addr.lo, "\n"); print(" hi ", addr.hi, "\n"); }; sizeofFPdbleword = 8; aggr FPdbleword { 'F' 0 x; { 'D' 0 lo; 'D' 4 hi; }; }; defn FPdbleword(addr) { complex FPdbleword addr; print(" x ", addr.x, "\n"); print("_1_ {\n"); _1_(addr+0); print("}\n"); }; UTFmax = 3; Runesync = 128; Runeself = 128; Runeerror = 128; sizeofFconv = 24; aggr Fconv { 'X' 0 out; 'X' 4 eout; 'D' 8 f1; 'D' 12 f2; 'D' 16 f3; 'D' 20 chr; }; defn Fconv(addr) { complex Fconv addr; print(" out ", addr.out\X, "\n"); print(" eout ", addr.eout\X, "\n"); print(" f1 ", addr.f1, "\n"); print(" f2 ", addr.f2, "\n"); print(" f3 ", addr.f3, "\n"); print(" chr ", addr.chr, "\n"); }; sizeofTm = 40; aggr Tm { 'D' 0 sec; 'D' 4 min; 'D' 8 hour; 'D' 12 mday; 'D' 16 mon; 'D' 20 year; 'D' 24 wday; 'D' 28 yday; 'a' 32 zone; 'D' 36 tzoff; }; defn Tm(addr) { complex Tm addr; print(" sec ", addr.sec, "\n"); print(" min ", addr.min, "\n"); print(" hour ", addr.hour, "\n"); print(" mday ", addr.mday, "\n"); print(" mon ", addr.mon, "\n"); print(" year ", addr.year, "\n"); print(" wday ", addr.wday, "\n"); print(" yday ", addr.yday, "\n"); print(" zone ", addr.zone, "\n"); print(" tzoff ", addr.tzoff, "\n"); }; PNPROC = 1; PNGROUP = 2; sizeofLock = 4; aggr Lock { 'D' 0 val; }; defn Lock(addr) { complex Lock addr; print(" val ", addr.val, "\n"); }; sizeofQLp = 12; aggr QLp { 'D' 0 inuse; 'A' QLp 4 next; 'C' 8 state; }; defn QLp(addr) { complex QLp addr; print(" inuse ", addr.inuse, "\n"); print(" next ", addr.next\X, "\n"); print(" state ", addr.state, "\n"); }; sizeofQLock = 16; aggr QLock { Lock 0 lock; 'D' 4 locked; 'A' QLp 8 $head; 'A' QLp 12 $tail; }; defn QLock(addr) { complex QLock addr; print("Lock lock {\n"); Lock(addr.lock); print("}\n"); print(" locked ", addr.locked, "\n"); print(" $head ", addr.$head\X, "\n"); print(" $tail ", addr.$tail\X, "\n"); }; sizeofRWLock = 20; aggr RWLock { Lock 0 lock; 'D' 4 readers; 'D' 8 writer; 'A' QLp 12 $head; 'A' QLp 16 $tail; }; defn RWLock(addr) { complex RWLock addr; print("Lock lock {\n"); Lock(addr.lock); print("}\n"); print(" readers ", addr.readers, "\n"); print(" writer ", addr.writer, "\n"); print(" $head ", addr.$head\X, "\n"); print(" $tail ", addr.$tail\X, "\n"); }; RFNAMEG = 1; RFENVG = 2; RFFDG = 4; RFNOTEG = 8; RFPROC = 16; RFMEM = 32; RFNOWAIT = 64; RFCNAMEG = 1024; RFCENVG = 2048; RFCFDG = 4096; RFREND = 8192; RFNOMNT = 16384; sizeofQid = 16; aggr Qid { 'W' 0 path; 'U' 8 vers; 'b' 12 type; }; defn Qid(addr) { complex Qid addr; print(" path ", addr.path, "\n"); print(" vers ", addr.vers, "\n"); print(" type ", addr.type, "\n"); }; sizeofDir = 60; aggr Dir { 'u' 0 type; 'U' 4 dev; Qid 8 qid; 'U' 24 mode; 'U' 28 atime; 'U' 32 mtime; 'V' 36 length; 'X' 44 name; 'X' 48 uid; 'X' 52 gid; 'X' 56 muid; }; defn Dir(addr) { complex Dir addr; print(" type ", addr.type, "\n"); print(" dev ", addr.dev, "\n"); print("Qid qid {\n"); Qid(addr.qid); print("}\n"); print(" mode ", addr.mode, "\n"); print(" atime ", addr.atime, "\n"); print(" mtime ", addr.mtime, "\n"); print(" length ", addr.length, "\n"); print(" name ", addr.name\X, "\n"); print(" uid ", addr.uid\X, "\n"); print(" gid ", addr.gid\X, "\n"); print(" muid ", addr.muid\X, "\n"); }; sizeofWaitmsg = 20; aggr Waitmsg { 'D' 0 pid; 'a' 4 time; 'X' 16 msg; }; defn Waitmsg(addr) { complex Waitmsg addr; print(" pid ", addr.pid, "\n"); print(" time ", addr.time, "\n"); print(" msg ", addr.msg\X, "\n"); }; sizeofIOchunk = 8; aggr IOchunk { 'X' 0 addr; 'U' 4 len; }; defn IOchunk(addr) { complex IOchunk addr; print(" addr ", addr.addr\X, "\n"); print(" len ", addr.len, "\n"); }; MAXCHLEN = 256; MAXNAMELEN = 256; MD5LEN = 16; ARok = 0; ARdone = 1; ARerror = 2; ARneedkey = 3; ARbadkey = 4; ARwritenext = 5; ARtoosmall = 6; ARtoobig = 7; ARrpcfailure = 8; ARphase = 9; AuthRpcMax = 4096; sizeofAuthRpc = 8208; aggr AuthRpc { 'D' 0 afd; 'X' 4 verb; 'a' 8 ibuf; 'a' 4104 obuf; 'X' 8200 arg; 'U' 8204 narg; }; defn AuthRpc(addr) { complex AuthRpc addr; print(" afd ", addr.afd, "\n"); print(" verb ", addr.verb\X, "\n"); print(" ibuf ", addr.ibuf, "\n"); print(" obuf ", addr.obuf, "\n"); print(" arg ", addr.arg\X, "\n"); print(" narg ", addr.narg, "\n"); }; sizeofAuthInfo = 20; aggr AuthInfo { 'X' 0 cuid; 'X' 4 suid; 'X' 8 cap; 'D' 12 nsecret; 'X' 16 secret; }; defn AuthInfo(addr) { complex AuthInfo addr; print(" cuid ", addr.cuid\X, "\n"); print(" suid ", addr.suid\X, "\n"); print(" cap ", addr.cap\X, "\n"); print(" nsecret ", addr.nsecret, "\n"); print(" secret ", addr.secret\X, "\n"); }; sizeofChalstate = 540; aggr Chalstate { 'X' 0 user; 'a' 4 chal; 'D' 260 nchal; 'X' 264 resp; 'D' 268 nresp; 'D' 272 afd; 'A' AuthRpc 276 rpc; 'a' 280 userbuf; 'D' 536 userinchal; }; defn Chalstate(addr) { complex Chalstate addr; print(" user ", addr.user\X, "\n"); print(" chal ", addr.chal, "\n"); print(" nchal ", addr.nchal, "\n"); print(" resp ", addr.resp\X, "\n"); print(" nresp ", addr.nresp, "\n"); print(" afd ", addr.afd, "\n"); print(" rpc ", addr.rpc\X, "\n"); print(" userbuf ", addr.userbuf, "\n"); print(" userinchal ", addr.userinchal, "\n"); }; sizeofChapreply = 20; aggr Chapreply { 'b' 0 id; 'a' 1 resp; }; defn Chapreply(addr) { complex Chapreply addr; print(" id ", addr.id, "\n"); print(" resp ", addr.resp, "\n"); }; sizeofMSchapreply = 48; aggr MSchapreply { 'a' 0 LMresp; 'a' 24 NTresp; }; defn MSchapreply(addr) { complex MSchapreply addr; print(" LMresp ", addr.LMresp, "\n"); print(" NTresp ", addr.NTresp, "\n"); }; sizeofUserPasswd = 8; aggr UserPasswd { 'X' 0 user; 'X' 4 passwd; }; defn UserPasswd(addr) { complex UserPasswd addr; print(" user ", addr.user\X, "\n"); print(" passwd ", addr.passwd\X, "\n"); }; ANAMELEN = 28; AERRLEN = 64; DOMLEN = 48; DESKEYLEN = 7; CHALLEN = 8; NETCHLEN = 16; CONFIGLEN = 14; SECRETLEN = 32; KEYDBOFF = 8; OKEYDBLEN = 41; KEYDBLEN = 73; OMD5LEN = 16; AuthTreq = 1; AuthChal = 2; AuthPass = 3; AuthOK = 4; AuthErr = 5; AuthMod = 6; AuthApop = 7; AuthOKvar = 9; AuthChap = 10; AuthMSchap = 11; AuthCram = 12; AuthHttp = 13; AuthVNC = 14; AuthTs = 64; AuthTc = 65; AuthAs = 66; AuthAc = 67; AuthTp = 68; AuthHr = 69; sizeofTicketreq = 144; aggr Ticketreq { 'C' 0 type; 'a' 1 authid; 'a' 29 authdom; 'a' 77 chal; 'a' 85 hostid; 'a' 113 uid; }; defn Ticketreq(addr) { complex Ticketreq addr; print(" type ", addr.type, "\n"); print(" authid ", addr.authid, "\n"); print(" authdom ", addr.authdom, "\n"); print(" chal ", addr.chal, "\n"); print(" hostid ", addr.hostid, "\n"); print(" uid ", addr.uid, "\n"); }; sizeofTicket = 72; aggr Ticket { 'C' 0 num; 'a' 1 chal; 'a' 9 cuid; 'a' 37 suid; 'a' 65 key; }; defn Ticket(addr) { complex Ticket addr; print(" num ", addr.num, "\n"); print(" chal ", addr.chal, "\n"); print(" cuid ", addr.cuid, "\n"); print(" suid ", addr.suid, "\n"); print(" key ", addr.key, "\n"); }; sizeofAuthenticator = 16; aggr Authenticator { 'C' 0 num; 'a' 1 chal; 'U' 12 id; }; defn Authenticator(addr) { complex Authenticator addr; print(" num ", addr.num, "\n"); print(" chal ", addr.chal, "\n"); print(" id ", addr.id, "\n"); }; sizeofPasswordreq = 92; aggr Passwordreq { 'C' 0 num; 'a' 1 old; 'a' 29 new; 'C' 57 changesecret; 'a' 58 secret; }; defn Passwordreq(addr) { complex Passwordreq addr; print(" num ", addr.num, "\n"); print(" old ", addr.old, "\n"); print(" new ", addr.new, "\n"); print(" changesecret ", addr.changesecret, "\n"); print(" secret ", addr.secret, "\n"); }; sizeofOChapreply = 48; aggr OChapreply { 'b' 0 id; 'a' 1 uid; 'a' 29 resp; }; defn OChapreply(addr) { complex OChapreply addr; print(" id ", addr.id, "\n"); print(" uid ", addr.uid, "\n"); print(" resp ", addr.resp, "\n"); }; sizeofOMSchapreply = 76; aggr OMSchapreply { 'a' 0 uid; 'a' 28 LMresp; 'a' 52 NTresp; }; defn OMSchapreply(addr) { complex OMSchapreply addr; print(" uid ", addr.uid, "\n"); print(" LMresp ", addr.LMresp, "\n"); print(" NTresp ", addr.NTresp, "\n"); }; NVwrite = 1; NVwriteonerr = 2; sizeofNvrsafe = 112; aggr Nvrsafe { 'a' 0 machkey; 'b' 7 machsum; 'a' 8 authkey; 'b' 15 authsum; 'a' 16 config; 'b' 30 configsum; 'a' 31 authid; 'b' 59 authidsum; 'a' 60 authdom; 'b' 108 authdomsum; }; defn Nvrsafe(addr) { complex Nvrsafe addr; print(" machkey ", addr.machkey, "\n"); print(" machsum ", addr.machsum, "\n"); print(" authkey ", addr.authkey, "\n"); print(" authsum ", addr.authsum, "\n"); print(" config ", addr.config, "\n"); print(" configsum ", addr.configsum, "\n"); print(" authid ", addr.authid, "\n"); print(" authidsum ", addr.authidsum, "\n"); print(" authdom ", addr.authdom, "\n"); print(" authdomsum ", addr.authdomsum, "\n"); }; AESbsize = 16; AESmaxkey = 32; AESmaxrounds = 14; sizeofAESstate = 540; aggr AESstate { 'U' 0 setup; 'D' 4 rounds; 'D' 8 keybytes; 'a' 12 key; 'a' 44 ekey; 'a' 284 dkey; 'a' 524 ivec; }; defn AESstate(addr) { complex AESstate addr; print(" setup ", addr.setup, "\n"); print(" rounds ", addr.rounds, "\n"); print(" keybytes ", addr.keybytes, "\n"); print(" key ", addr.key, "\n"); print(" ekey ", addr.ekey, "\n"); print(" dkey ", addr.dkey, "\n"); print(" ivec ", addr.ivec, "\n"); }; BFbsize = 8; BFrounds = 16; sizeofBFstate = 4236; aggr BFstate { 'U' 0 setup; 'a' 4 key; 'a' 60 ivec; 'a' 68 pbox; 'a' 140 sbox; }; defn BFstate(addr) { complex BFstate addr; print(" setup ", addr.setup, "\n"); print(" key ", addr.key, "\n"); print(" ivec ", addr.ivec, "\n"); print(" pbox ", addr.pbox, "\n"); print(" sbox ", addr.sbox, "\n"); }; DESbsize = 8; sizeofDESstate = 148; aggr DESstate { 'U' 0 setup; 'a' 4 key; 'a' 12 expanded; 'a' 140 ivec; }; defn DESstate(addr) { complex DESstate addr; print(" setup ", addr.setup, "\n"); print(" key ", addr.key, "\n"); print(" expanded ", addr.expanded, "\n"); print(" ivec ", addr.ivec, "\n"); }; DES3E = 0; DES3D = 1; DES3EEE = 0; DES3EDE = 2; DES3DED = 5; DES3DDD = 7; sizeofDES3state = 420; aggr DES3state { 'U' 0 setup; 'a' 4 key; 'a' 28 expanded; 'a' 412 ivec; }; defn DES3state(addr) { complex DES3state addr; print(" setup ", addr.setup, "\n"); print(" key ", addr.key, "\n"); print(" expanded ", addr.expanded, "\n"); print(" ivec ", addr.ivec, "\n"); }; SHA1dlen = 20; MD4dlen = 16; MD5dlen = 16; sizeofDigestState = 160; aggr DigestState { 'U' 0 len; 'a' 4 state; 'a' 24 buf; 'D' 152 blen; 'C' 156 malloced; 'C' 157 seeded; }; defn DigestState(addr) { complex DigestState addr; print(" len ", addr.len, "\n"); print(" state ", addr.state, "\n"); print(" buf ", addr.buf, "\n"); print(" blen ", addr.blen, "\n"); print(" malloced ", addr.malloced, "\n"); print(" seeded ", addr.seeded, "\n"); }; sizeofRC4state = 260; aggr RC4state { 'a' 0 state; 'b' 256 x; 'b' 257 y; }; defn RC4state(addr) { complex RC4state addr; print(" state ", addr.state, "\n"); print(" x ", addr.x, "\n"); print(" y ", addr.y, "\n"); }; sizeofRSApub = 8; aggr RSApub { 'X' 0 n; 'X' 4 ek; }; defn RSApub(addr) { complex RSApub addr; print(" n ", addr.n\X, "\n"); print(" ek ", addr.ek\X, "\n"); }; sizeofRSApriv = 32; aggr RSApriv { RSApub 0 pub; 'X' 8 dk; 'X' 12 p; 'X' 16 q; 'X' 20 kp; 'X' 24 kq; 'X' 28 c2; }; defn RSApriv(addr) { complex RSApriv addr; print("RSApub pub {\n"); RSApub(addr.pub); print("}\n"); print(" dk ", addr.dk\X, "\n"); print(" p ", addr.p\X, "\n"); print(" q ", addr.q\X, "\n"); print(" kp ", addr.kp\X, "\n"); print(" kq ", addr.kq\X, "\n"); print(" c2 ", addr.c2\X, "\n"); }; sizeofEGpub = 12; aggr EGpub { 'X' 0 p; 'X' 4 alpha; 'X' 8 key; }; defn EGpub(addr) { complex EGpub addr; print(" p ", addr.p\X, "\n"); print(" alpha ", addr.alpha\X, "\n"); print(" key ", addr.key\X, "\n"); }; sizeofEGpriv = 16; aggr EGpriv { EGpub 0 pub; 'X' 12 secret; }; defn EGpriv(addr) { complex EGpriv addr; print("EGpub pub {\n"); EGpub(addr.pub); print("}\n"); print(" secret ", addr.secret\X, "\n"); }; sizeofEGsig = 8; aggr EGsig { 'X' 0 r; 'X' 4 s; }; defn EGsig(addr) { complex EGsig addr; print(" r ", addr.r\X, "\n"); print(" s ", addr.s\X, "\n"); }; sizeofString = 20; aggr String { { 'D' 0 val; }; 'X' 4 base; 'X' 8 end; 'X' 12 ptr; 'd' 16 ref; 'b' 18 fixed; }; defn String(addr) { complex String addr; print("Lock {\n"); Lock(addr+0); print("}\n"); print(" base ", addr.base\X, "\n"); print(" end ", addr.end\X, "\n"); print(" ptr ", addr.ptr\X, "\n"); print(" ref ", addr.ref, "\n"); print(" fixed ", addr.fixed, "\n"); }; sizeofChannel = 156; aggr Channel { 'D' 0 s; 'U' 4 f; 'U' 8 n; 'D' 12 e; 'D' 16 freed; 'U' 20 qused; 'a' 24 qentry; 'a' 152 v; }; defn Channel(addr) { complex Channel addr; print(" s ", addr.s, "\n"); print(" f ", addr.f, "\n"); print(" n ", addr.n, "\n"); print(" e ", addr.e, "\n"); print(" freed ", addr.freed, "\n"); print(" qused ", addr.qused, "\n"); print(" qentry ", addr.qentry, "\n"); print(" v ", addr.v, "\n"); }; sizeofAlt = 20; aggr Alt { 'A' Channel 0 c; 'X' 4 v; 'D' 8 op; 'A' Channel 12 tag; 'U' 16 q; }; defn Alt(addr) { complex Alt addr; print(" c ", addr.c\X, "\n"); print(" v ", addr.v\X, "\n"); print(" op ", addr.op, "\n"); print(" tag ", addr.tag\X, "\n"); print(" q ", addr.q, "\n"); }; sizeofRef = 4; aggr Ref { 'D' 0 ref; }; defn Ref(addr) { complex Ref addr; print(" ref ", addr.ref, "\n"); }; sizeof_2_ = 8; aggr _2_ { 'U' 0 msize; 'X' 4 version; }; defn _2_(addr) { complex _2_ addr; print(" msize ", addr.msize, "\n"); print(" version ", addr.version\X, "\n"); }; sizeof_3_ = 4; aggr _3_ { 'u' 0 oldtag; }; defn _3_(addr) { complex _3_ addr; print(" oldtag ", addr.oldtag, "\n"); }; sizeof_4_ = 4; aggr _4_ { 'X' 0 ename; }; defn _4_(addr) { complex _4_ addr; print(" ename ", addr.ename\X, "\n"); }; sizeof_5_ = 20; aggr _5_ { Qid 0 qid; 'U' 16 iounit; }; defn _5_(addr) { complex _5_ addr; print("Qid qid {\n"); Qid(addr.qid); print("}\n"); print(" iounit ", addr.iounit, "\n"); }; sizeof_6_ = 16; aggr _6_ { Qid 0 aqid; }; defn _6_(addr) { complex _6_ addr; print("Qid aqid {\n"); Qid(addr.aqid); print("}\n"); }; sizeof_7_ = 12; aggr _7_ { 'U' 0 afid; 'X' 4 uname; 'X' 8 aname; }; defn _7_(addr) { complex _7_ addr; print(" afid ", addr.afid, "\n"); print(" uname ", addr.uname\X, "\n"); print(" aname ", addr.aname\X, "\n"); }; sizeof_8_ = 12; aggr _8_ { 'U' 0 perm; 'X' 4 name; 'b' 8 mode; }; defn _8_(addr) { complex _8_ addr; print(" perm ", addr.perm, "\n"); print(" name ", addr.name\X, "\n"); print(" mode ", addr.mode, "\n"); }; sizeof_9_ = 72; aggr _9_ { 'U' 0 newfid; 'u' 4 nwname; 'a' 8 wname; }; defn _9_(addr) { complex _9_ addr; print(" newfid ", addr.newfid, "\n"); print(" nwname ", addr.nwname, "\n"); print(" wname ", addr.wname, "\n"); }; sizeof_10_ = 260; aggr _10_ { 'u' 0 nwqid; 'a' 4 wqid; }; defn _10_(addr) { complex _10_ addr; print(" nwqid ", addr.nwqid, "\n"); print(" wqid ", addr.wqid, "\n"); }; sizeof_11_ = 16; aggr _11_ { 'V' 0 offset; 'U' 8 count; 'X' 12 data; }; defn _11_(addr) { complex _11_ addr; print(" offset ", addr.offset, "\n"); print(" count ", addr.count, "\n"); print(" data ", addr.data\X, "\n"); }; sizeof_12_ = 8; aggr _12_ { 'u' 0 nstat; 'X' 4 stat; }; defn _12_(addr) { complex _12_ addr; print(" nstat ", addr.nstat, "\n"); print(" stat ", addr.stat\X, "\n"); }; sizeof_13_ = 260; aggr _13_ { { 'U' 0 msize; 'X' 4 version; }; { 'u' 0 oldtag; }; { 'X' 0 ename; }; { Qid 0 qid; 'U' 16 iounit; }; { Qid 0 aqid; }; { 'U' 0 afid; 'X' 4 uname; 'X' 8 aname; }; { 'U' 0 perm; 'X' 4 name; 'b' 8 mode; }; { 'U' 0 newfid; 'u' 4 nwname; 'a' 8 wname; }; { 'u' 0 nwqid; 'a' 4 wqid; }; { 'V' 0 offset; 'U' 8 count; 'X' 12 data; }; { 'u' 0 nstat; 'X' 4 stat; }; }; defn _13_(addr) { complex _13_ addr; print("_2_ {\n"); _2_(addr+0); print("}\n"); print("_3_ {\n"); _3_(addr+0); print("}\n"); print("_4_ {\n"); _4_(addr+0); print("}\n"); print("_5_ {\n"); _5_(addr+0); print("}\n"); print("_6_ {\n"); _6_(addr+0); print("}\n"); print("_7_ {\n"); _7_(addr+0); print("}\n"); print("_8_ {\n"); _8_(addr+0); print("}\n"); print("_9_ {\n"); _9_(addr+0); print("}\n"); print("_10_ {\n"); _10_(addr+0); print("}\n"); print("_11_ {\n"); _11_(addr+0); print("}\n"); print("_12_ {\n"); _12_(addr+0); print("}\n"); }; sizeofFcall = 272; aggr Fcall { 'b' 0 type; 'U' 4 fid; 'u' 8 tag; { { 'U' 12 msize; 'X' 16 version; }; { 'u' 12 oldtag; }; { 'X' 12 ename; }; { Qid 12 qid; 'U' 28 iounit; }; { Qid 12 aqid; }; { 'U' 12 afid; 'X' 16 uname; 'X' 20 aname; }; { 'U' 12 perm; 'X' 16 name; 'b' 20 mode; }; { 'U' 12 newfid; 'u' 16 nwname; 'a' 20 wname; }; { 'u' 12 nwqid; 'a' 16 wqid; }; { 'V' 12 offset; 'U' 20 count; 'X' 24 data; }; { 'u' 12 nstat; 'X' 16 stat; }; }; }; defn Fcall(addr) { complex Fcall addr; print(" type ", addr.type, "\n"); print(" fid ", addr.fid, "\n"); print(" tag ", addr.tag, "\n"); print("_13_ {\n"); _13_(addr+12); print("}\n"); }; Tversion = 100; Rversion = 101; Tauth = 102; Rauth = 103; Tattach = 104; Rattach = 105; Terror = 106; Rerror = 107; Tflush = 108; Rflush = 109; Twalk = 110; Rwalk = 111; Topen = 112; Ropen = 113; Tcreate = 114; Rcreate = 115; Tread = 116; Rread = 117; Twrite = 118; Rwrite = 119; Tclunk = 120; Rclunk = 121; Tremove = 122; Rremove = 123; Tstat = 124; Rstat = 125; Twstat = 126; Rwstat = 127; Tmax = 128; sizeofFid = 60; aggr Fid { 'U' 0 fid; 'C' 4 omode; 'X' 8 file; 'X' 12 uid; Qid 16 qid; 'X' 32 aux; 'X' 36 rdir; Ref 40 ref; 'X' 44 pool; 'V' 48 diroffset; 'D' 56 dirindex; }; defn Fid(addr) { complex Fid addr; print(" fid ", addr.fid, "\n"); print(" omode ", addr.omode, "\n"); print(" file ", addr.file\X, "\n"); print(" uid ", addr.uid\X, "\n"); print("Qid qid {\n"); Qid(addr.qid); print("}\n"); print(" aux ", addr.aux\X, "\n"); print(" rdir ", addr.rdir\X, "\n"); print("Ref ref {\n"); Ref(addr.ref); print("}\n"); print(" pool ", addr.pool\X, "\n"); print(" diroffset ", addr.diroffset, "\n"); print(" dirindex ", addr.dirindex, "\n"); }; sizeofReq = 656; aggr Req { 'U' 0 tag; 'X' 4 aux; Fcall 8 ifcall; Fcall 280 ofcall; Dir 552 d; 'A' Req 612 oldreq; 'A' Fid 616 fid; 'A' Fid 620 afid; 'A' Fid 624 newfid; 'X' 628 srv; Ref 632 ref; 'X' 636 pool; 'X' 640 buf; 'b' 644 type; 'b' 645 responded; 'X' 648 error; 'X' 652 rbuf; }; defn Req(addr) { complex Req addr; print(" tag ", addr.tag, "\n"); print(" aux ", addr.aux\X, "\n"); print("Fcall ifcall {\n"); Fcall(addr.ifcall); print("}\n"); print("Fcall ofcall {\n"); Fcall(addr.ofcall); print("}\n"); print("Dir d {\n"); Dir(addr.d); print("}\n"); print(" oldreq ", addr.oldreq\X, "\n"); print(" fid ", addr.fid\X, "\n"); print(" afid ", addr.afid\X, "\n"); print(" newfid ", addr.newfid\X, "\n"); print(" srv ", addr.srv\X, "\n"); print("Ref ref {\n"); Ref(addr.ref); print("}\n"); print(" pool ", addr.pool\X, "\n"); print(" buf ", addr.buf\X, "\n"); print(" type ", addr.type, "\n"); print(" responded ", addr.responded, "\n"); print(" error ", addr.error\X, "\n"); print(" rbuf ", addr.rbuf\X, "\n"); }; sizeofFidpool = 12; aggr Fidpool { 'X' 0 map; 'X' 4 destroy; 'X' 8 srv; }; defn Fidpool(addr) { complex Fidpool addr; print(" map ", addr.map\X, "\n"); print(" destroy ", addr.destroy\X, "\n"); print(" srv ", addr.srv\X, "\n"); }; sizeofReqpool = 12; aggr Reqpool { 'X' 0 map; 'X' 4 destroy; 'X' 8 srv; }; defn Reqpool(addr) { complex Reqpool addr; print(" map ", addr.map\X, "\n"); print(" destroy ", addr.destroy\X, "\n"); print(" srv ", addr.srv\X, "\n"); }; sizeofFile = 108; aggr File { { 'D' 0 ref; }; { 'u' 4 type; 'U' 8 dev; Qid 12 qid; 'U' 28 mode; 'U' 32 atime; 'U' 36 mtime; 'V' 40 length; 'X' 48 name; 'X' 52 uid; 'X' 56 gid; 'X' 60 muid; }; 'A' File 64 parent; 'X' 68 aux; { Lock 72 lock; 'D' 76 readers; 'D' 80 writer; 'A' QLp 84 $head; 'A' QLp 88 $tail; }; 'X' 92 filelist; 'X' 96 tree; 'D' 100 nchild; 'D' 104 allocd; }; defn File(addr) { complex File addr; print("Ref {\n"); Ref(addr+0); print("}\n"); print("Dir {\n"); Dir(addr+4); print("}\n"); print(" parent ", addr.parent\X, "\n"); print(" aux ", addr.aux\X, "\n"); print("RWLock {\n"); RWLock(addr+72); print("}\n"); print(" filelist ", addr.filelist\X, "\n"); print(" tree ", addr.tree\X, "\n"); print(" nchild ", addr.nchild, "\n"); print(" allocd ", addr.allocd, "\n"); }; sizeofTree = 20; aggr Tree { 'A' File 0 root; 'X' 4 destroy; Lock 8 genlock; 'U' 12 qidgen; 'U' 16 dirqidgen; }; defn Tree(addr) { complex Tree addr; print(" root ", addr.root\X, "\n"); print(" destroy ", addr.destroy\X, "\n"); print("Lock genlock {\n"); Lock(addr.genlock); print("}\n"); print(" qidgen ", addr.qidgen, "\n"); print(" dirqidgen ", addr.dirqidgen, "\n"); }; sizeofSrv = 136; aggr Srv { 'A' Tree 0 tree; 'X' 4 destroyfid; 'X' 8 destroyreq; 'X' 12 end; 'X' 16 aux; 'X' 20 attach; 'X' 24 auth; 'X' 28 open; 'X' 32 create; 'X' 36 read; 'X' 40 write; 'X' 44 remove; 'X' 48 flush; 'X' 52 stat; 'X' 56 wstat; 'X' 60 walk; 'X' 64 clone; 'X' 68 walk1; 'D' 72 infd; 'D' 76 outfd; 'D' 80 nopipe; 'A' Fidpool 84 fpool; 'A' Reqpool 88 rpool; 'U' 92 msize; 'X' 96 rbuf; QLock 100 rlock; 'X' 116 wbuf; QLock 120 wlock; }; defn Srv(addr) { complex Srv addr; print(" tree ", addr.tree\X, "\n"); print(" destroyfid ", addr.destroyfid\X, "\n"); print(" destroyreq ", addr.destroyreq\X, "\n"); print(" end ", addr.end\X, "\n"); print(" aux ", addr.aux\X, "\n"); print(" attach ", addr.attach\X, "\n"); print(" auth ", addr.auth\X, "\n"); print(" open ", addr.open\X, "\n"); print(" create ", addr.create\X, "\n"); print(" read ", addr.read\X, "\n"); print(" write ", addr.write\X, "\n"); print(" remove ", addr.remove\X, "\n"); print(" flush ", addr.flush\X, "\n"); print(" stat ", addr.stat\X, "\n"); print(" wstat ", addr.wstat\X, "\n"); print(" walk ", addr.walk\X, "\n"); print(" clone ", addr.clone\X, "\n"); print(" walk1 ", addr.walk1\X, "\n"); print(" infd ", addr.infd, "\n"); print(" outfd ", addr.outfd, "\n"); print(" nopipe ", addr.nopipe, "\n"); print(" fpool ", addr.fpool\X, "\n"); print(" rpool ", addr.rpool\X, "\n"); print(" msize ", addr.msize, "\n"); print(" rbuf ", addr.rbuf\X, "\n"); print("QLock rlock {\n"); QLock(addr.rlock); print("}\n"); print(" wbuf ", addr.wbuf\X, "\n"); print("QLock wlock {\n"); QLock(addr.wlock); print("}\n"); }; OMASK = 3; Maxname = 128; Maxrpc = 4096; Notstarted = -3; Broken = -2; Established = -1; RpcFailure = 0; RpcNeedkey = 1; RpcOk = 2; RpcErrstr = 3; RpcToosmall = 4; RpcPhase = 5; sizeofAttr = 12; aggr Attr { 'A' Attr 0 next; 'A' String 4 name; 'A' String 8 val; }; defn Attr(addr) { complex Attr addr; print(" next ", addr.next\X, "\n"); print(" name ", addr.name\X, "\n"); print(" val ", addr.val\X, "\n"); }; sizeof_14_ = 4120; aggr _14_ { 'X' 0 arg; 'a' 4 buf; 'X' 4100 verb; 'D' 4104 iverb; 'D' 4108 narg; 'D' 4112 nbuf; 'D' 4116 nwant; }; defn _14_(addr) { complex _14_ addr; print(" arg ", addr.arg\X, "\n"); print(" buf ", addr.buf, "\n"); print(" verb ", addr.verb\X, "\n"); print(" iverb ", addr.iverb, "\n"); print(" narg ", addr.narg, "\n"); print(" nbuf ", addr.nbuf, "\n"); print(" nwant ", addr.nwant, "\n"); }; sizeofFsstate = 4700; aggr Fsstate { 'X' 0 sysuser; 'D' 4 listoff; _14_ 8 rpc; 'a' 4128 err; 'a' 4256 keyinfo; 'X' 4640 phasename; 'D' 4644 isclient; 'D' 4648 haveai; 'D' 4652 maxphase; 'D' 4656 phase; 'D' 4660 started; 'A' Attr 4664 attr; AuthInfo 4668 ai; 'X' 4688 proto; 'X' 4692 ps; 'X' 4696 ring; }; defn Fsstate(addr) { complex Fsstate addr; print(" sysuser ", addr.sysuser\X, "\n"); print(" listoff ", addr.listoff, "\n"); print("_14_ rpc {\n"); _14_(addr.rpc); print("}\n"); print(" err ", addr.err, "\n"); print(" keyinfo ", addr.keyinfo, "\n"); print(" phasename ", addr.phasename\X, "\n"); print(" isclient ", addr.isclient, "\n"); print(" haveai ", addr.haveai, "\n"); print(" maxphase ", addr.maxphase, "\n"); print(" phase ", addr.phase, "\n"); print(" started ", addr.started, "\n"); print(" attr ", addr.attr\X, "\n"); print("AuthInfo ai {\n"); AuthInfo(addr.ai); print("}\n"); print(" proto ", addr.proto\X, "\n"); print(" ps ", addr.ps\X, "\n"); print(" ring ", addr.ring\X, "\n"); }; sizeofKey = 20; aggr Key { 'D' 0 ref; 'A' Attr 4 attr; 'A' Attr 8 privattr; 'X' 12 proto; 'X' 16 priv; }; defn Key(addr) { complex Key addr; print(" ref ", addr.ref, "\n"); print(" attr ", addr.attr\X, "\n"); print(" privattr ", addr.privattr\X, "\n"); print(" proto ", addr.proto\X, "\n"); print(" priv ", addr.priv\X, "\n"); }; sizeofKeyring = 8; aggr Keyring { 'A' Key 0 key; 'D' 4 nkey; }; defn Keyring(addr) { complex Keyring addr; print(" key ", addr.key\X, "\n"); print(" nkey ", addr.nkey, "\n"); }; sizeofLogbuf = 520; aggr Logbuf { 'D' 0 rp; 'D' 4 wp; 'a' 8 msg; }; defn Logbuf(addr) { complex Logbuf addr; print(" rp ", addr.rp, "\n"); print(" wp ", addr.wp, "\n"); print(" msg ", addr.msg, "\n"); }; sizeofProto = 28; aggr Proto { 'X' 0 name; 'X' 4 init; 'X' 8 addkey; 'X' 12 closekey; 'X' 16 write; 'X' 20 read; 'X' 24 close; }; defn Proto(addr) { complex Proto addr; print(" name ", addr.name\X, "\n"); print(" init ", addr.init\X, "\n"); print(" addkey ", addr.addkey\X, "\n"); print(" closekey ", addr.closekey\X, "\n"); print(" write ", addr.write\X, "\n"); print(" read ", addr.read\X, "\n"); print(" close ", addr.close\X, "\n"); }; complex Keyring ring; complex Logbuf logbuf; complex Proto apop; complex Proto cram; complex Proto p9any; complex Proto p9sk1; complex Proto p9sk2; complex Keyring ring; complex Srv fs; complex Proto main:p; Qroot = 0; Qfactotum = 1; Qrpc = 2; Qkeylist = 3; Qprotolist = 4; Qconfirm = 5; Qlog = 6; Qctl = 7; complex Qid mkqid:q; complex Req fsattach:r; sizeof_15_ = 12; aggr _15_ { 'X' 0 name; 'D' 4 qidpath; 'U' 8 perm; }; defn _15_(addr) { complex _15_ addr; print(" name ", addr.name\X, "\n"); print(" qidpath ", addr.qidpath, "\n"); print(" perm ", addr.perm, "\n"); }; complex Dir fillstat:dir; complex Dir fsdirgen:dir; complex Fid fswalk1:fid; complex Qid fswalk1:qid; complex Req fsstat:r; complex Req fsopen:r; complex Fsstate fsopen:fss; complex Fid fsdestroyfid:fid; complex Req readlist:r; complex Key keylist:k; complex Req fsread:r; complex Fsstate fsread:s; complex Req fswrite:r; complex Srv fs;