Blob


1 <head>
2 <title>version(9P) - Plan 9 from User Space</title>
3 <meta content="text/html; charset=utf-8" http-equiv=Content-Type>
4 </head>
5 <body bgcolor=#ffffff>
6 <table border=0 cellpadding=0 cellspacing=0 width=100%>
7 <tr height=10><td>
8 <tr><td width=20><td>
9 <tr><td width=20><td><b>VERSION(9P)</b><td align=right><b>VERSION(9P)</b>
10 <tr><td width=20><td colspan=2>
11 <br>
12 <p><font size=+1><b>NAME </b></font><br>
14 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
16 version &ndash; negotiate protocol version<br>
18 </table>
19 <p><font size=+1><b>SYNOPSIS </b></font><br>
21 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
23 <i>size</i>[4] <tt><font size=+1>Tversion</font></tt> <i>tag</i>[2] <i>msize</i>[4] <i>version</i>[<i>s</i>]<br>
24 <i>size</i>[4] <tt><font size=+1>Rversion</font></tt> <i>tag</i>[2] <i>msize</i>[4] <i>version</i>[<i>s</i>]<br>
26 </table>
27 <p><font size=+1><b>DESCRIPTION </b></font><br>
29 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
31 The <tt><font size=+1>version</font></tt> request negotiates the protocol version and message
32 size to be used on the connection and initializes the connection
33 for I/O. <tt><font size=+1>Tversion</font></tt> must be the first message sent on the 9P connection,
34 and the client cannot issue any further requests until it has
35 received the <tt><font size=+1>Rversion</font></tt> reply. The <i>tag</i> should be
36 <tt><font size=+1>NOTAG</font></tt> (value <tt><font size=+1>(ushort)~0</font></tt>) for a <tt><font size=+1>version</font></tt> message.
37 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
39 The client suggests a maximum message size, <tt><font size=+1>msize</font></tt>, that is the
40 maximum length, in bytes, it will ever generate or expect to receive
41 in a single 9P message. This count includes all 9P protocol data,
42 starting from the <tt><font size=+1>size</font></tt> field and extending through the message,
43 but excludes enveloping transport protocols. The
44 server responds with its own maximum, <tt><font size=+1>msize</font></tt>, which must be less
45 than or equal to the client&#8217;s value. Thenceforth, both sides of
46 the connection must honor this limit.
47 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
49 The <tt><font size=+1>version</font></tt> string identifies the level of the protocol. The string
50 must always begin with the two characters &#8220;<tt><font size=+1>9P</font></tt>&#8221;. If the server
51 does not understand the client&#8217;s version string, it should respond
52 with an <tt><font size=+1>Rversion</font></tt> message (not <tt><font size=+1>Rerror</font></tt>) with the <tt><font size=+1>version</font></tt> string
53 the 7 characters &#8220;<tt><font size=+1>unknown</font></tt>&#8221;.
54 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
56 The server may respond with the client&#8217;s version string, or a
57 version string identifying an earlier defined protocol version.
58 Currently, the only defined version is the 6 characters &#8220;<tt><font size=+1>9P2000</font></tt>&#8221;.
59 Version strings are defined such that, if the client string contains
60 one or more period characters, the initial substring up to but
61 not including any single period in the version string defines
62 a version of the protocol. After stripping any such period-separated
63 suffix, the server is allowed to respond with a string of the
64 form <tt><font size=+1>9P</font></tt><i>nnnn</i>, where <i>nnnn</i> is less than or equal to the digits sent
65 by the client.
66 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
68 The client and server will use the protocol version defined by
69 the server&#8217;s response for all subsequent communication on the
70 connection.
71 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
73 A successful <tt><font size=+1>version</font></tt> request initializes the connection. All outstanding
74 I/O on the connection is aborted; all active fids are freed (&#8216;clunked&#8217;)
75 automatically. The set of messages between <tt><font size=+1>version</font></tt> requests is
76 called a <i>session</i>.<br>
78 </table>
79 <p><font size=+1><b>ENTRY POINTS </b></font><br>
81 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
83 <i>Fsversion</i> (see <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a>) generates <tt><font size=+1>version</font></tt> messages; it is
84 called automatically by <i>fsmount</i>.<br>
86 </table>
88 <td width=20>
89 <tr height=20><td>
90 </table>
91 <!-- TRAILER -->
92 <table border=0 cellpadding=0 cellspacing=0 width=100%>
93 <tr height=15><td width=10><td><td width=10>
94 <tr><td><td>
95 <center>
96 <a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
97 </center>
98 </table>
99 <!-- TRAILER -->
100 </body></html>