src/fs/p9wire.bend checks
raw source on the hub · import 0x2324e729258ea5021b37b97947af4c3f/src/fs/p9wire.bend as P9wire
3 imports
import Base import ../lib/u64.bend as U import ../lib/bytes.bend as B
Types
type Qid source · line 42 · raw
Data
Qid@kind:U32 -> @version:U32 -> @path:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> Qid
type P9Req source · line 45 · raw
Data
Tstatfs@fid:U32 -> P9Req
Tlopen@fid:U32 -> @flags:U32 -> P9Req
Tlcreate@fid:U32 -> @name:List<&2, U32> -> @flags:U32 -> @mode:U32 -> @gid:U32 -> P9Req
Tsymlink@fid:U32 -> @name:List<&2, U32> -> @target:List<&2, U32> -> @gid:U32 -> P9Req
Treadlink@fid:U32 -> P9Req
Tgetattr@fid:U32 -> @mask:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> P9Req
Tsetattr@fid:U32 -> @valid:U32 -> @mode:U32 -> @uid:U32 -> @gid:U32 -> @size:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> P9Req
Txattrwalk@fid:U32 -> @newfid:U32 -> @name:List<&2, U32> -> P9Req
Treaddir@fid:U32 -> @offset:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> @count:U32 -> P9Req
Tfsync@fid:U32 -> P9Req
Tmkdir@dfid:U32 -> @name:List<&2, U32> -> @mode:U32 -> @gid:U32 -> P9Req
Trenameat@olddir:U32 -> @oldname:List<&2, U32> -> @newdir:U32 -> @newname:List<&2, U32> -> P9Req
Tunlinkat@dir:U32 -> @name:List<&2, U32> -> @flags:U32 -> P9Req
Tversion@msize:U32 -> @version:List<&2, U32> -> P9Req
Tattach@fid:U32 -> @afid:U32 -> @uname:List<&2, U32> -> @aname:List<&2, U32> -> @n_uname:U32 -> P9Req
Tflush@oldtag:U32 -> P9Req
Twalk@fid:U32 -> @newfid:U32 -> @names:List<&2, List<&2, U32>> -> P9Req
Tread@fid:U32 -> @offset:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> @count:U32 -> P9Req
Twrite@fid:U32 -> @offset:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> @data:List<&2, U32> -> P9Req
Tclunk@fid:U32 -> P9Req
Tunknown@kind:U32 -> P9Req
A message type this server does not know.
type P9Stat source · line 72 · raw
Data
Rgetattr carries the full stat; the fields not listed (rdev, the nsec parts, btime, gen, data_version) are written as zero, valid as 2047 (P9_GETATTR_BASIC), blksize as 4096.
P9Stat@qid:Qid -> @mode:U32 -> @uid:U32 -> @gid:U32 -> @nlink:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> @size:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> @blocks:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> @atime:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> @mtime:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> @ctime:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> P9Stat
type P9Dirent source · line 77 · raw
Data
A directory entry in an Rreaddir: qid, the offset of the next entry, the type (DT_* value), the name.
P9Dirent@qid:Qid -> @next:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> @kind:U32 -> @name:List<&2, U32> -> P9Dirent
type P9Resp source · line 80 · raw
Data
Rlerror@ecode:U32 -> P9Resp
Rstatfs@bsize:U32 -> @blocks:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> @bfree:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> @bavail:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> @files:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> @ffree:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> P9Resp
Rlopen@qid:Qid -> @iounit:U32 -> P9Resp
Rlcreate@qid:Qid -> @iounit:U32 -> P9Resp
Rsymlink@qid:Qid -> P9Resp
Rreadlink@target:List<&2, U32> -> P9Resp
Rgetattr@stat:P9Stat -> P9Resp
RgetattrX@stat:P9Stat -> @rdev:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> @mnsec:U32 -> P9Resp
Rgetattr with a device's number (Linux's new_encode_dev) and mtime's nanoseconds (src/fs/meta.bend: a share marked meta).
Rxattrwalk@size:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> P9Resp
Txattrwalk's answer: the attribute's size (its value is read on newfid).
RsetattrP9Resp
Rreaddir@entries:List<&2, P9Dirent> -> P9Resp
RfsyncP9Resp
Rmkdir@qid:Qid -> P9Resp
RrenameatP9Resp
RunlinkatP9Resp
Rversion@msize:U32 -> @version:List<&2, U32> -> P9Resp
Rattach@qid:Qid -> P9Resp
RflushP9Resp
Rwalk@qids:List<&2, Qid> -> P9Resp
Rread@data:List<&2, U32> -> P9Resp
Rwrite@count:U32 -> P9Resp
RclunkP9Resp
type P9Msg source · line 110 · raw
Data
A request: its tag and the decoded message. None when the bytes are not a whole message (short, size field disagreeing, or fields running past it). Rstatfs writes type 0x01021997 (V9FS_MAGIC), fsid 0 and namelen 255.
P9Msg@tag:U32 -> @req:P9Req -> P9Msg
type P9Got source · line 145 · raw
Data
A decoded request and the offset where its fields end.
P9Got@req:P9Req -> @end:Nat -> P9Got
type P9Names source · line 149 · raw
Data
The names of a Twalk and the offset where they end.
P9Names@names:List<&2, List<&2, U32>> -> @end:Nat -> P9Names
type P9Out source · line 346 · raw
Data
A response's type and the bytes after its tag.
P9Out@kind:U32 -> @body:List<&2, U32> -> P9Out
Definitions
def P9.le source · line 120 · raw
@n:Nat -> @b:List<&2, U32> -> @off:Nat -> U32
The little-endian field of n bytes (n <= 4) at off.
def P9.u16 source · line 123 · raw
@b:List<&2, U32> -> @off:Nat -> U32
def P9.u32 source · line 126 · raw
@b:List<&2, U32> -> @off:Nat -> U32
def P9.u64 source · line 129 · raw
@b:List<&2, U32> -> @off:Nat -> 0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64
def P9.slen source · line 133 · raw
@b:List<&2, U32> -> @off:Nat -> Nat
The length of the string at off.
def P9.str source · line 137 · raw
@+b:List<&2, U32> -> @+off:Nat -> List<&2, U32>
The bytes of the string at off.
def P9.after source · line 141 · raw
@+b:List<&2, U32> -> @+off:Nat -> Nat
The offset just past the string at off.
def P9.names.cons source · line 152 · raw
@name:List<&2, U32> -> @rest:P9Names -> P9Names
def P9.names source · line 158 · raw
@n:Nat -> @+b:List<&2, U32> -> @+off:Nat -> P9Names
n strings from off on.
def P9.walk.got source · line 165 · raw
@fid:U32 -> @newfid:U32 -> @ns:P9Names -> P9Got
def P9.walk source · line 172 · raw
@ok:Bool -> @+b:List<&2, U32> -> @+n:Nat -> P9Got
A Twalk names at most 16 elements (MAXWELEM); more is refused by an end past any body.
def P9.fields source · line 180 · raw
@k:U32 -> @+b:List<&2, U32> -> P9Got
The fields of a message of type k, read from its body b.
def P9.when source · line 236 · raw
@ok:Bool -> @m:P9Msg -> Maybe<&2, P9Msg>
def P9.check source · line 244 · raw
@tag:U32 -> @+len:Nat -> @g:P9Got -> Maybe<&2, P9Msg>
Some message when its fields end inside the body.
def P9.decode source · line 249 · raw
@ok:Bool -> @+bs:List<&2, U32> -> @+len:Nat -> Maybe<&2, P9Msg>
def P9.parse source · line 257 · raw
@bs:List<&2, U32> -> Maybe<&2, P9Msg>
def P9.cat source · line 265 · raw
@a:List<&2, U32> -> @b:List<&2, U32> -> List<&2, U32>
def P9.byte source · line 268 · raw
@x:U32 -> List<&2, U32>
def P9.bstr source · line 272 · raw
@+s:List<&2, U32> -> List<&2, U32>
A string: len[2] then its bytes.
def P9.bqid source · line 275 · raw
@q:Qid -> List<&2, U32>
def P9.bqids source · line 280 · raw
@qs:List<&2, Qid> -> List<&2, U32>
def P9.bdirent source · line 287 · raw
@d:P9Dirent -> List<&2, U32>
def P9.bdirents.seq source · line 292 · raw
@ds:List<&2, P9Dirent> -> List<&2, U32>
def P9.leaf source · line 300 · raw
Nat
Lists up to this many entries are encoded sequentially.
def P9.small source · line 303 · raw
@+n:Nat -> Bool
def P9.bdirents source · line 308 · raw
@d:Nat -> @small:Bool -> @+n:Nat -> @+ds:List<&2, P9Dirent> -> List<&2, U32>
The entries of an Rreaddir (n of them), encoded as two halves in parallel when the list is long; d bounds the depth.
def P9.zero64 source · line 324 · raw
List<&2, U32>
def P9.bstat source · line 327 · raw
@st:P9Stat -> List<&2, U32>
def P9.bstat.x source · line 336 · raw
@st:P9Stat -> @+rdev:0x2324e729258ea5021b37b97947af4c3f/src/lib/u64.U64 -> @+mnsec:U32 -> List<&2, U32>
def P9.out source · line 349 · raw
@r:P9Resp -> P9Out
def P9.frame source · line 404 · raw
@tag:U32 -> @o:P9Out -> List<&2, U32>
def P9.build source · line 410 · raw
@tag:U32 -> @r:P9Resp -> List<&2, U32>