plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

version.9p (2583B)


      1 .TH VERSION 9P 
      2 .SH NAME
      3 version \- negotiate protocol version
      4 .SH SYNOPSIS
      5 .ta \w'\fLTversion 'u
      6 .IR size [4]
      7 .B Tversion
      8 .IR tag [2]
      9 .IR msize [4]
     10 .IR version [ s ]
     11 .br
     12 .IR size [4]
     13 .B Rversion
     14 .IR tag [2]
     15 .IR msize [4]
     16 .IR version [ s ]
     17 .SH DESCRIPTION
     18 The 
     19 .B version
     20 request negotiates the protocol version and message size
     21 to be used on the connection and initializes the connection for I/O.
     22 .B Tversion
     23 must be the first message sent on the 9P connection,
     24 and the client cannot issue any further requests until it has received the
     25 .B Rversion
     26 reply.
     27 The
     28 .I tag
     29 should be
     30 .B NOTAG
     31 (value
     32 .BR (ushort)~0 )
     33 for a
     34 .B version
     35 message.
     36 .PP
     37 The client suggests a maximum message size,
     38 .BR msize ,
     39 that is the maximum length, in bytes,
     40 it will ever generate or expect to receive in a single 9P message.
     41 This count includes all 9P protocol data, starting from the
     42 .B size
     43 field and extending through the message,
     44 but excludes enveloping transport protocols.
     45 The server responds with its own maximum,
     46 .BR msize ,
     47 which must be less than or equal to the client's value.
     48 Thenceforth, both sides of the connection must honor this limit.
     49 .PP
     50 The
     51 .B version
     52 string identifies the level of the protocol.
     53 The string must always begin with the two characters
     54 .RB `` 9P ''.
     55 If the server does not understand the client's version string,
     56 it should respond with an
     57 .B Rversion
     58 message (not
     59 .BR Rerror )
     60 with the
     61 .B version
     62 string the 7 characters
     63 .RB `` unknown ''.
     64 .PP
     65 The server may respond with the client's version string,
     66 or a version string identifying
     67 an earlier defined protocol version.
     68 Currently, the only defined version is the 6 characters
     69 .RB `` 9P2000 ''.
     70 Version strings are defined such that, if the client string contains
     71 one or more period characters, the initial substring up to but not including
     72 any single period in the version string defines a version of the protocol.
     73 After stripping any such period-separated suffix, the server is allowed to respond
     74 with a string of the form
     75 .BI 9P nnnn\f1,
     76 where
     77 .I nnnn
     78 is less than or equal to the digits sent by the client.
     79 .PP
     80 The client and server will use the protocol version defined by the
     81 server's response for all subsequent communication on the connection.
     82 .PP
     83 A successful
     84 .B version
     85 request initializes the connection.
     86 All outstanding I/O on the connection is aborted; all active fids are freed (`clunked') automatically.
     87 The set of messages between
     88 .B version
     89 requests is called a
     90 .IR session .
     91 .SH ENTRY POINTS
     92 .I Fsversion
     93 (see
     94 .MR 9pclient (3) )
     95 generates
     96 .B version
     97 messages;
     98 it is called automatically by
     99 .IR fsmount .