summaryrefslogtreecommitdiff
path: root/lib9p/idl
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/idl')
-rw-r--r--lib9p/idl/2002-9P2000.9p9
-rw-r--r--lib9p/idl/2010-9P2000.L.9p4
-rw-r--r--lib9p/idl/2012-9P2000.e.9p7
3 files changed, 10 insertions, 10 deletions
diff --git a/lib9p/idl/2002-9P2000.9p b/lib9p/idl/2002-9P2000.9p
index c1cd74b..f0df7d1 100644
--- a/lib9p/idl/2002-9P2000.9p
+++ b/lib9p/idl/2002-9P2000.9p
@@ -27,8 +27,11 @@ num tag = 2
num fid = 4
"NOFID = ~0"
+# data - u32le `n`, then `n` bytes of data
+struct d = "len[4] len*(dat[1])"
+
# data - s32le `n`, then `n` bytes of data
-struct d = "len[4,max=s32_max] len*(dat[1])"
+struct d_signed = "len[4,max=s32_max] len*(dat[1])"
# string - u16le `n`, then `n` bytes of UTF-8, without any nul-bytes
struct s = "len[2] len*(utf8[1])"
@@ -142,8 +145,8 @@ msg Ropen = "size[4,val=end-&size] typ[1,val=113] tag[tag] qid[qid] iounit[4]
msg Tcreate = "size[4,val=end-&size] typ[1,val=114] tag[tag] fid[fid] name[s] perm[dm] mode[o]"
msg Rcreate = "size[4,val=end-&size] typ[1,val=115] tag[tag] qid[qid] iounit[4]"
msg Tread = "size[4,val=end-&size] typ[1,val=116] tag[tag] fid[fid] offset[8,max=s64_max] count[4,max=s32_max]"
-msg Rread = "size[4,val=end-&size] typ[1,val=117] tag[tag] data[d]" # for directories `data` is the sequence "cnt*(entries[stat])"
-msg Twrite = "size[4,val=end-&size] typ[1,val=118] tag[tag] fid[fid] offset[8,max=s64_max] data[d]"
+msg Rread = "size[4,val=end-&size] typ[1,val=117] tag[tag] data[d_signed]" # for directories `data` is the sequence "cnt*(entries[stat])"
+msg Twrite = "size[4,val=end-&size] typ[1,val=118] tag[tag] fid[fid] offset[8,max=s64_max] data[d_signed]"
msg Rwrite = "size[4,val=end-&size] typ[1,val=119] tag[tag] count[4]"
msg Tclunk = "size[4,val=end-&size] typ[1,val=120] tag[tag] fid[fid]"
msg Rclunk = "size[4,val=end-&size] typ[1,val=121] tag[tag]"
diff --git a/lib9p/idl/2010-9P2000.L.9p b/lib9p/idl/2010-9P2000.L.9p
index 8edf18d..3e5db69 100644
--- a/lib9p/idl/2010-9P2000.L.9p
+++ b/lib9p/idl/2010-9P2000.L.9p
@@ -7,7 +7,7 @@
# https://github.com/chaos/diod/blob/master/protocol.md
version "9P2000.L"
-from ./2002-9P2000.9p import tag, fid, s, d, qt, qid
+from ./2002-9P2000.9p import tag, fid, s, d, d_signed, qt, qid
from ./2002-9P2000.9p import Rerror
from ./2002-9P2000.9p import Tversion, Rversion, Tflush, Rflush, Twalk, Rwalk, Tread, Rread, Twrite, Rwrite, Tclunk, Rclunk, Tremove, Rremove
from ./2005-9P2000.u.9p import nuid, Tauth, Rauth, Tattach, Rattach
@@ -89,7 +89,7 @@ msg Txattrcreate = "size[4,val=end-&size] typ[1,val=32] tag[tag] fid[fid] name[s
msg Rxattrcreate = "size[4,val=end-&size] typ[1,val=33] tag[tag]"
#...
msg Treaddir = "size[4,val=end-&size] typ[1,val=40] tag[tag] fid[fid] offset[8] count[4]"
-msg Rreaddir = "size[4,val=end-&size] typ[1,val=41] tag[tag] count[4] count*(data[1])" # data is "qid[qid] offset[8] type[1] name[s]"
+msg Rreaddir = "size[4,val=end-&size] typ[1,val=41] tag[tag] data[d]" # data is "qid[qid] offset[8] type[1] name[s]"
#...
msg Tfsync = "size[4,val=end-&size] typ[1,val=50] tag[tag] fid[fid] datasync[4]"
msg Rfsync = "size[4,val=end-&size] typ[1,val=51] tag[tag]"
diff --git a/lib9p/idl/2012-9P2000.e.9p b/lib9p/idl/2012-9P2000.e.9p
index aba4e66..ef80796 100644
--- a/lib9p/idl/2012-9P2000.e.9p
+++ b/lib9p/idl/2012-9P2000.e.9p
@@ -10,12 +10,9 @@ version "9P2000.e"
from ./2002-9P2000.9p import *
-# like 9P2000 `d`, but without the s32_max limit
-struct d_e = "len[4] len*(dat[1])"
-
msg Tsession = "size[4,val=end-&size] typ[1,val=150] tag[tag] key[8]"
msg Rsession = "size[4,val=end-&size] typ[1,val=151] tag[tag]"
msg Tsread = "size[4,val=end-&size] typ[1,val=152] tag[tag] fid[4] nwname[2] nwname*(wname[s])"
-msg Rsread = "size[4,val=end-&size] typ[1,val=153] tag[tag] data[d_e]"
-msg Tswrite = "size[4,val=end-&size] typ[1,val=154] tag[tag] fid[4] nwname[2] nwname*(wname[s]) data[d_e]"
+msg Rsread = "size[4,val=end-&size] typ[1,val=153] tag[tag] data[d]"
+msg Tswrite = "size[4,val=end-&size] typ[1,val=154] tag[tag] fid[4] nwname[2] nwname*(wname[s]) data[d]"
msg Rswrite = "size[4,val=end-&size] typ[1,val=155] tag[tag] count[4]"