summaryrefslogtreecommitdiff
path: root/lib9p/idl
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/idl')
-rw-r--r--lib9p/idl/0000-README.md (renamed from lib9p/idl/00-README.md)0
-rw-r--r--lib9p/idl/1992-9P0.9p.wip53
-rw-r--r--lib9p/idl/1995-9P1.9p.wip52
-rw-r--r--lib9p/idl/1996-Styx.9p.wip15
-rw-r--r--lib9p/idl/2002-9P2000.9p (renamed from lib9p/idl/01-9P2000.9p)4
-rw-r--r--lib9p/idl/2005-9P2000.u.9p (renamed from lib9p/idl/02-9P2000.u.9p)4
-rw-r--r--lib9p/idl/2010-9P2000.L.9p.wip (renamed from lib9p/idl/03-9P2000.L.9p.wip)6
-rw-r--r--lib9p/idl/2012-9P2000.e.9p (renamed from lib9p/idl/02-9P2000.e.9p)4
8 files changed, 129 insertions, 9 deletions
diff --git a/lib9p/idl/00-README.md b/lib9p/idl/0000-README.md
index f53acf9..f53acf9 100644
--- a/lib9p/idl/00-README.md
+++ b/lib9p/idl/0000-README.md
diff --git a/lib9p/idl/1992-9P0.9p.wip b/lib9p/idl/1992-9P0.9p.wip
new file mode 100644
index 0000000..c8db485
--- /dev/null
+++ b/lib9p/idl/1992-9P0.9p.wip
@@ -0,0 +1,53 @@
+# 1992-9P0.9p - Definitions of 9P0 (Plan 9 1st ed) messages
+#
+# Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com>
+# SPDX-Licence-Identifier: AGPL-3.0-or-later
+
+# https://man.cat-v.org/plan_9_1st_ed/5/
+version "9P0"
+
+# tag - identify a request/response pair
+num tag = 2
+
+# file identifier - like a UNIX file-descriptor
+num fid = 2
+
+# uni"Q"ue "ID"entification
+struct qid = "path[4] version[4]"
+
+# a nul-padded string
+struct name = 28*(txt[1])
+
+msg Tnop = "typ[1,val=TODO] tag[tag,val=0xFFFF]"
+msg Rnop = "typ[1,val=TODO] tag[tag,val=0xFFFF]"
+msg Tsession = "typ[1,val=TODO] tag[tag,val=0xFFFF]"
+msg Rsession = "typ[1,val=TODO] tag[tag,val=0xFFFF]"
+msg Rerror = "typ[1,val=TODO] tag[tag] ename[64]"
+msg Tflush = "typ[1,val=TODO] tag[tag] oldtag[tag]"
+msg Rflush = "typ[1,val=TODO] tag[tag]"
+msg Tauth = "typ[1,val=TODO] tag[tag] fid[fid] uid[28] chal[36]"
+msg Rauth = "typ[1,val=TODO] tag[tag] fid[fid] chal[30]"
+msg Tattach = "typ[1,val=TODO] tag[tag] fid[fid] uid[28] aname[28] auth[28]"
+msg Rattach = "typ[1,val=TODO] tag[tag] fid[fid] qid[8]"
+msg Tclone = "typ[1,val=TODO] tag[tag] fid[fid] newfid[fid]"
+msg Rclone = "typ[1,val=TODO] tag[tag] fid[fid]"
+msg Tclwalk = "typ[1,val=TODO] tag[tag] fid[fid] newfid[fid] name[28]"
+msg Rclwalk = "typ[1,val=TODO] tag[tag] fid[fid] qid[8]"
+msg Twalk = "typ[1,val=TODO] tag[tag] fid[fid] name[28]"
+msg Rwalk = "typ[1,val=TODO] tag[tag] fid[fid] qid[8]"
+msg Topen = "typ[1,val=TODO] tag[tag] fid[fid] mode[1]"
+msg Ropen = "typ[1,val=TODO] tag[tag] fid[fid] qid[8]"
+msg Tcreate = "typ[1,val=TODO] tag[tag] fid[fid] name[28] perm[4] mode[1]"
+msg Rcreate = "typ[1,val=TODO] tag[tag] fid[fid] qid[8]"
+msg Tread = "typ[1,val=TODO] tag[tag] fid[fid] offset[8] count[2,max=8192]"
+msg Rread = "typ[1,val=TODO] tag[tag] fid[fid] count[2,max=8192] pad[1] count*(data[1])"
+msg Twrite = "typ[1,val=TODO] tag[tag] fid[fid] offset[8] count[2,max=8192] pad[1] count*(data[1])"
+msg Rwrite = "typ[1,val=TODO] tag[tag] fid[fid] count[2,max=8192]"
+msg Tclunk = "typ[1,val=TODO] tag[tag] fid[fid]"
+msg Rclunk = "typ[1,val=TODO] tag[tag] fid[fid]"
+msg Tremove = "typ[1,val=TODO] tag[tag] fid[fid]"
+msg Rremove = "typ[1,val=TODO] tag[tag] fid[fid]"
+msg Tstat = "typ[1,val=TODO] tag[tag] fid[fid]"
+msg Rstat = "typ[1,val=TODO] tag[tag] fid[fid] stat[116]"
+msg Twstat = "typ[1,val=TODO] tag[tag] fid[fid] stat[116]"
+msg Rwstat = "typ[1,val=TODO] tag[tag] fid[fid]"
diff --git a/lib9p/idl/1995-9P1.9p.wip b/lib9p/idl/1995-9P1.9p.wip
new file mode 100644
index 0000000..2f4ed93
--- /dev/null
+++ b/lib9p/idl/1995-9P1.9p.wip
@@ -0,0 +1,52 @@
+# 1995-9P1.9p - Definitions of 9P1 (Plan 9 2nd ed and 3rd ed) messages
+#
+# Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com>
+# SPDX-Licence-Identifier: AGPL-3.0-or-later
+
+# https://man.cat-v.org/plan_9_2nd_ed/5/
+# https://man.cat-v.org/plan_9_3rd_ed/5/
+version "9P1"
+
+# tag - identify a request/response pair
+num tag = 2
+
+# file identifier - like a UNIX file-descriptor
+num fid = 2
+
+# uni"Q"ue "ID"entification
+struct qid = "path[4] version[4]"
+
+# a nul-padded string
+struct name = 28*(txt[1])
+
+msg Tnop = "typ[1,val=TODO] tag[tag,val=0xFFFF]"
+msg Rnop = "typ[1,val=TODO] tag[tag,val=0xFFFF]"
+msg Tsession = "typ[1,val=TODO] tag[tag,val=0xFFFF] chal[8]"
+msg Rsession = "typ[1,val=TODO] tag[tag,val=0xFFFF] chal[8] authid[28] authdom[48]"
+msg Rerror = "typ[1,val=TODO] tag[tag] ename[64]"
+msg Tflush = "typ[1,val=TODO] tag[tag] oldtag[tag]"
+msg Rflush = "typ[1,val=TODO] tag[tag]"
+msg Tattach = "typ[1,val=TODO] tag[tag] fid[fid] uid[28] aname[28] ticket[72] auth[13]"
+msg Rattach = "typ[1,val=TODO] tag[tag] fid[fid] qid[8] rauth[13]"
+msg Tclone = "typ[1,val=TODO] tag[tag] fid[fid] newfid[fid]"
+msg Rclone = "typ[1,val=TODO] tag[tag] fid[fid]"
+msg Tclwalk = "typ[1,val=TODO] tag[tag] fid[fid] newfid[fid] name[28]"
+msg Rclwalk = "typ[1,val=TODO] tag[tag] fid[fid] qid[8]"
+msg Twalk = "typ[1,val=TODO] tag[tag] fid[fid] name[28]"
+msg Rwalk = "typ[1,val=TODO] tag[tag] fid[fid] qid[8]"
+msg Topen = "typ[1,val=TODO] tag[tag] fid[fid] mode[1]"
+msg Ropen = "typ[1,val=TODO] tag[tag] fid[fid] qid[8]"
+msg Tcreate = "typ[1,val=TODO] tag[tag] fid[fid] name[28] perm[4] mode[1]"
+msg Rcreate = "typ[1,val=TODO] tag[tag] fid[fid] qid[8]"
+msg Tread = "typ[1,val=TODO] tag[tag] fid[fid] offset[8] count[2,max=8192]"
+msg Rread = "typ[1,val=TODO] tag[tag] fid[fid] count[2,max=8192] pad[1] count*(data[1])"
+msg Twrite = "typ[1,val=TODO] tag[tag] fid[fid] offset[8] count[2,max=8192] pad[1] count*(data[1])"
+msg Rwrite = "typ[1,val=TODO] tag[tag] fid[fid] count[2,max=8192]"
+msg Tclunk = "typ[1,val=TODO] tag[tag] fid[fid]"
+msg Rclunk = "typ[1,val=TODO] tag[tag] fid[fid]"
+msg Tremove = "typ[1,val=TODO] tag[tag] fid[fid]"
+msg Rremove = "typ[1,val=TODO] tag[tag] fid[fid]"
+msg Tstat = "typ[1,val=TODO] tag[tag] fid[fid]"
+msg Rstat = "typ[1,val=TODO] tag[tag] fid[fid] stat[116]"
+msg Twstat = "typ[1,val=TODO] tag[tag] fid[fid] stat[116]"
+msg Rwstat = "typ[1,val=TODO] tag[tag] fid[fid]"
diff --git a/lib9p/idl/1996-Styx.9p.wip b/lib9p/idl/1996-Styx.9p.wip
new file mode 100644
index 0000000..599abc8
--- /dev/null
+++ b/lib9p/idl/1996-Styx.9p.wip
@@ -0,0 +1,15 @@
+# 1996-Styx.9p - Definitions of Styx messages
+#
+# Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com>
+# SPDX-Licence-Identifier: AGPL-3.0-or-later
+
+# Styx was a variant of the 9P protocol used by the Inferno operating
+# system. Message framing looks like 9P1 (1995), but semantics look
+# more like 9P2000 (2002). I am not sure whether there are Styx
+# protocol differences between Inferno 1e, 2e, or 3e (4e adopted
+# 9P2000).
+#
+# - 1996 beta
+# - 1997 1.0
+# - 1999 2nd ed
+# - 2001 3rd ed
diff --git a/lib9p/idl/01-9P2000.9p b/lib9p/idl/2002-9P2000.9p
index 426a8c6..ba1382e 100644
--- a/lib9p/idl/01-9P2000.9p
+++ b/lib9p/idl/2002-9P2000.9p
@@ -1,4 +1,4 @@
-# 01-9P2000.9p - Definitions of 9P2000 messages
+# 2002-9P2000.9p - Definitions of 9P2000 messages
#
# Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com>
# SPDX-Licence-Identifier: AGPL-3.0-or-later
@@ -19,7 +19,7 @@ version "9P2000"
# tag - identify a request/response pair
num tag = 2
-# file identifier
+# file identifier - like a UNIX file-descriptor
num fid = 4
# data - u32le `n`, then `n` bytes of data
diff --git a/lib9p/idl/02-9P2000.u.9p b/lib9p/idl/2005-9P2000.u.9p
index d3ca6f0..a47e9db 100644
--- a/lib9p/idl/02-9P2000.u.9p
+++ b/lib9p/idl/2005-9P2000.u.9p
@@ -1,4 +1,4 @@
-# 02-9P2000.u.9p - Definitions of 9P2000.u messages
+# 2005-9P2000.u.9p - Definitions of 9P2000.u messages
#
# Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com>
# SPDX-Licence-Identifier: AGPL-3.0-or-later
@@ -8,7 +8,7 @@
# https://github.com/ericvh/9p-rfc/blob/master/9p2000.u.xml
version "9P2000.u"
-from ./01-9P2000.9p import *
+from ./2002-9P2000.9p import *
struct stat += "file_extension[s]"
"file_owner_n_uid[4]"
diff --git a/lib9p/idl/03-9P2000.L.9p.wip b/lib9p/idl/2010-9P2000.L.9p.wip
index 62186f9..a0de883 100644
--- a/lib9p/idl/03-9P2000.L.9p.wip
+++ b/lib9p/idl/2010-9P2000.L.9p.wip
@@ -1,4 +1,4 @@
-# 9P2000.L.txt - Definitions of 9P2000.L messages
+# 2010-9P2000.L.9p - Definitions of 9P2000.L messages
#
# Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com>
# SPDX-Licence-Identifier: AGPL-3.0-or-later
@@ -7,8 +7,8 @@
# https://github.com/chaos/diod/blob/master/protocol.md
version "9P2000.L"
-from ./01-9P2000.9p import *
-from ./02-9P2000.u.9p import Tauth, Tattach
+from ./2002-9P2000.9p import *
+from ./2005-9P2000.u.9p import Tauth, Tattach
#msg Tlerror = "size[4,val=end-&size] typ[1,val=6] tag[tag] illegal" # analogous to 106/Terror
msg Rlerror = "size[4,val=end-&size] typ[1,val=7] tag[tag] ecode[4]" # analogous to 107/Rerror
diff --git a/lib9p/idl/02-9P2000.e.9p b/lib9p/idl/2012-9P2000.e.9p
index b91b2c5..2f88a60 100644
--- a/lib9p/idl/02-9P2000.e.9p
+++ b/lib9p/idl/2012-9P2000.e.9p
@@ -1,4 +1,4 @@
-# 02-9P2000e.e.9p - Definitions of 9P2000.e messages
+# 2012-9P2000.e.9p - Definitions of 9P2000.e messages
#
# Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com>
# SPDX-Licence-Identifier: AGPL-3.0-or-later
@@ -8,7 +8,7 @@
# https://github.com/cloudozer/ling/blob/master/doc/9p2000e.md
version "9P2000.e"
-from ./01-9P2000.9p import *
+from ./2002-9P2000.9p import *
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]"