[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Nbd] [PATCH] doc: Swap sections for client and transmission flags



The document is easier to read if the three sets of flags
(global, client, and transmission) are described in the same
order in which they are encountered during handshake.

Signed-off-by: Eric Blake <eblake@...696...>
---
 doc/proto.md | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/doc/proto.md b/doc/proto.md
index e63eeb6..7dfa640 100644
--- a/doc/proto.md
+++ b/doc/proto.md
@@ -636,6 +636,23 @@ The server MUST NOT set any other flags, and SHOULD NOT change behaviour
 unless the client responds with a corresponding flag.  The server MUST
 NOT set any of these flags during oldstyle negotiation.

+##### Client flags
+
+This field of 32 bits is sent after initial connection and after
+receiving the handshake flags from the server.
+
+- bit 0, `NBD_FLAG_C_FIXED_NEWSTYLE`; SHOULD be set by clients that
+  support the fixed newstyle protocol. Servers MAY choose to honour
+  fixed newstyle from clients that didn't set this bit, but relying on
+  this isn't recommended.
+- bit 1, `NBD_FLAG_C_NO_ZEROES`; MUST NOT be set if the server did not
+  set `NBD_FLAG_NO_ZEROES`. If set, the server MUST NOT send the 124
+  bytes of zeroes at the end of the negotiation.
+
+Clients MUST NOT set any other flags; the server MUST drop the TCP
+connection if the client sets an unknown flag, or a flag that does
+not match something advertised by the server.
+
 ##### Transmission flags

 This field of 16 bits is sent by the server after option haggling, or
@@ -672,23 +689,6 @@ The field has the following format:

 Clients SHOULD ignore unknown flags.

-##### Client flags
-
-This field of 32 bits is sent after initial connection and after
-receiving the handshake flags from the server.
-
-- bit 0, `NBD_FLAG_C_FIXED_NEWSTYLE`; SHOULD be set by clients that
-  support the fixed newstyle protocol. Servers MAY choose to honour
-  fixed newstyle from clients that didn't set this bit, but relying on
-  this isn't recommended.
-- bit 1, `NBD_FLAG_C_NO_ZEROES`; MUST NOT be set if the server did not
-  set `NBD_FLAG_NO_ZEROES`. If set, the server MUST NOT send the 124
-  bytes of zeroes at the end of the negotiation.
-
-Clients MUST NOT set any other flags; the server MUST drop the TCP
-connection if the client sets an unknown flag, or a flag that does
-not match something advertised by the server.
-
 #### Option types

 These values are used in the "option" field during the option haggling
-- 
2.5.5




Reply to: