Blame


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