- Notifications
You must be signed in to change notification settings - Fork2
iru-/9p4
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
9p4 is an implementation of the 9P protocol in gforth [1]. It provides routinesfor encoding and decoding 9P [2] [3] messages, along with auxiliary routines forimplementing 9P clients and servers.
The remainder of this document assumes familiarity with 9P and its messages.
The fields in a 9p4 data structure are namedprefix-field
, whereprefix
isthe 9P data structure/concept name.
qid-type ( 'qid -> 'qid-type )
qid-version ( 'qid -> 'qid-version )
qid-path ( 'qid -> 'qid-path )
qid% ( -> qid-alignment #qid )
: for use with gforth struct allocation routines/qid ( -> #qid )
: size ofqid
structure
stat-size ( 'stat -> 'stat-size )
stat-type ( 'stat -> 'stat-type )
stat-dev ( 'stat -> 'stat-dev )
stat-qid ( 'stat -> 'stat-qid )
stat-mode ( 'stat -> 'stat-mode )
stat-atime ( 'stat -> 'stat-atime )
stat-mtime ( 'stat -> 'stat-mtime )
stat-length ( 'stat -> 'stat-length )
stat-name ( 'stat -> 'stat-name )
stat-uid ( 'stat -> 'stat-uid )
stat-gid ( 'stat -> 'stat-gid )
stat-muid ( 'stat -> 'stat-muid )
stat-base% ( -> stat-alignment #stat )
: size of the constant-sized part ofstat
; for use with gforth struct allocation routines/stat-base ( -> #stat )
: size of the constant-sized part ofstat
Routines encoding T- messages always return a buffer and length containing theencoded message on the top of stack, i.e. their stack diagram has the form( ... -> ... buf #buf )
. On the other hand, all routines decoding R- messagesexpect the message length on the top of stack, i.e.( #msg -> ... )
.
A routine's name and stack diagram reflect its name and parameters as describedin [2]. Whenever there are less items in the stack diagram than in theprotocol documentation, 9p4 chooses sensible values for the missing parameters.
Tversion ( -> buf #buf )
Rversion ( #msg -> version #version msize )
Tattach ( uname #uname aname #aname -> rootfid buf #buf )
Rattach ( #msg -> 'qid )
Twalk ( name #name ... #names fid -> newfid buf #buf )
clonefid ( fid -> newfid buf #buf )
: same as0 fid Twalk
Rwalk ( #msg -> 'qids #qids )
Topen ( fid mode -> buf #buf )
Ropen ( #msg -> 'qid iounit )
Tcreate ( fid name #name perm mode -> buf #buf )
Rcreate ( #msg -> 'qid iounit )
Tread ( fid offset count -> buf #buf )
Rread ( #msg -> data count )
Twrite ( fid offset data count -> buf #buf )
Rwrite ( #msg -> count )
Tclunk ( fid -> buf #buf )
Rclunk ( #msg -> )
Tremove ( fid -> buf #buf )
Rremove ( fid -> buf #buf )
Tstat ( fid -> buf #buf )
Rstat ( #msg -> 'stat len )
Twstat ( 'stat fid -> len )
Rwstat ( #msg -> )
[1]gforth
About
An implementation of the 9P protocol in Forth
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.