mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
100 lines
4.9 KiB
HTML
100 lines
4.9 KiB
HTML
<head>
|
|
<title>version(9P) - Plan 9 from User Space</title>
|
|
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
|
|
</head>
|
|
<body bgcolor=#ffffff>
|
|
<table border=0 cellpadding=0 cellspacing=0 width=100%>
|
|
<tr height=10><td>
|
|
<tr><td width=20><td>
|
|
<tr><td width=20><td><b>VERSION(9P)</b><td align=right><b>VERSION(9P)</b>
|
|
<tr><td width=20><td colspan=2>
|
|
<br>
|
|
<p><font size=+1><b>NAME </b></font><br>
|
|
|
|
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
|
|
|
|
version – negotiate protocol version<br>
|
|
|
|
</table>
|
|
<p><font size=+1><b>SYNOPSIS </b></font><br>
|
|
|
|
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
|
|
|
|
<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>
|
|
<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>
|
|
|
|
</table>
|
|
<p><font size=+1><b>DESCRIPTION </b></font><br>
|
|
|
|
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
|
|
|
|
The <tt><font size=+1>version</font></tt> request negotiates the protocol version and message
|
|
size to be used on the connection and initializes the connection
|
|
for I/O. <tt><font size=+1>Tversion</font></tt> must be the first message sent on the 9P connection,
|
|
and the client cannot issue any further requests until it has
|
|
received the <tt><font size=+1>Rversion</font></tt> reply. The <i>tag</i> should be
|
|
<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.
|
|
<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
|
|
|
|
The client suggests a maximum message size, <tt><font size=+1>msize</font></tt>, that is the
|
|
maximum length, in bytes, it will ever generate or expect to receive
|
|
in a single 9P message. This count includes all 9P protocol data,
|
|
starting from the <tt><font size=+1>size</font></tt> field and extending through the message,
|
|
but excludes enveloping transport protocols. The
|
|
server responds with its own maximum, <tt><font size=+1>msize</font></tt>, which must be less
|
|
than or equal to the client’s value. Thenceforth, both sides of
|
|
the connection must honor this limit.
|
|
<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
|
|
|
|
The <tt><font size=+1>version</font></tt> string identifies the level of the protocol. The string
|
|
must always begin with the two characters “<tt><font size=+1>9P</font></tt>”. If the server
|
|
does not understand the client’s version string, it should respond
|
|
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
|
|
the 7 characters “<tt><font size=+1>unknown</font></tt>”.
|
|
<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
|
|
|
|
The server may respond with the client’s version string, or a
|
|
version string identifying an earlier defined protocol version.
|
|
Currently, the only defined version is the 6 characters “<tt><font size=+1>9P2000</font></tt>”.
|
|
Version strings are defined such that, if the client string contains
|
|
one or more period characters, the initial substring up to but
|
|
not including any single period in the version string defines
|
|
a version of the protocol. After stripping any such period-separated
|
|
suffix, the server is allowed to respond with a string of the
|
|
form <tt><font size=+1>9P</font></tt><i>nnnn</i>, where <i>nnnn</i> is less than or equal to the digits sent
|
|
by the client.
|
|
<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
|
|
|
|
The client and server will use the protocol version defined by
|
|
the server’s response for all subsequent communication on the
|
|
connection.
|
|
<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
|
|
|
|
A successful <tt><font size=+1>version</font></tt> request initializes the connection. All outstanding
|
|
I/O on the connection is aborted; all active fids are freed (‘clunked’)
|
|
automatically. The set of messages between <tt><font size=+1>version</font></tt> requests is
|
|
called a <i>session</i>.<br>
|
|
|
|
</table>
|
|
<p><font size=+1><b>ENTRY POINTS </b></font><br>
|
|
|
|
<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
|
|
|
|
<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
|
|
called automatically by <i>fsmount</i>.<br>
|
|
|
|
</table>
|
|
|
|
<td width=20>
|
|
<tr height=20><td>
|
|
</table>
|
|
<!-- TRAILER -->
|
|
<table border=0 cellpadding=0 cellspacing=0 width=100%>
|
|
<tr height=15><td width=10><td><td width=10>
|
|
<tr><td><td>
|
|
<center>
|
|
<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
|
|
</center>
|
|
</table>
|
|
<!-- TRAILER -->
|
|
</body></html>
|