By default, destination is the name of a file, typically one end of a named pipe. The -n option causes destination to be interpreted as a network address, as accepted by dial(2) (or listen with -s). If destination is not provided, styxchat reads and writes 9P messages on its standard input, using /dev/cons where it would usually use its standard input and output.
Each line of standard input has the form:
The input is interpreted as space-separated fields using the quoting conventions of sh(1), allowing fields to contain spaces. Empty lines and lines beginning with # are ignored. The first field on each line is normally the name of a T-message. Subsequent fields provide parameter values for the corresponding message. Integers are given in the format accepted for integers by the Limbo compiler (e.g. 16rffff): a tag is 16 bits, offset and length are 64 bits, and all others are 32-bit integers. If the an integer parameter field contains ~0, it is taken to be the `all ones' value of appropriate size for that parameter; this is particularly useful with Twstat, where that value represents `no change'. In the ``mode'' field of a qid, letters can be given, representing mode bits: d for QTDIR, l for QTEXCL, a for QTAPPEND, and u for QTAUTH. In an Rstat message, the qid mode bits are copied into the Rstat mode field in the appropriate place.
Following the sh(1) quoting rules, an empty string is represented by a field containing ''. The data field is sent as its UTF-8 representation as an array of bytes. The value for fid can be nofid (or NOFID) to represent the `no fid' value in the protocol. The tag for each message is automatically supplied by styxchat, starting from 1, and incremented with each successful message transmission. The nexttag command will cause subsequent tags to start from tag; if none is given, it will print the next tag value. The tag may be notag to represent the `no tag' value (16rFFFF).
The dump command has the same effect as a -v option, allowing data display to be enabled later.
By default, styxchat sends a 9P client's T-messages and prints a server's R-messages. The -s option causes it to present a server's view: it prints the T-messages from 9P clients, and sends R-messages as it reads a textual representation of them from standard input:
The input conventions are as above, except that tags are required. A qid is a single field of the form path.vers[.type], where the three values are decimal integers.
STYXCHAT(8 ) | Rev: Tue Mar 31 02:42:38 GMT 2015 |