diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-25 22:08:34 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-25 22:08:34 +0900 |
commit | 227017efad24f685c47c42d0d098e3316e983862 (patch) | |
tree | cea0cec2f686866c6ddd92920111e8ef636cce7b | |
parent | 2572074e9b4f875e79a8fe070afc375e02e272bb (diff) |
Introduce a message header component
-rw-r--r-- | draft-schanzen-r5n.xml | 76 |
1 files changed, 40 insertions, 36 deletions
diff --git a/draft-schanzen-r5n.xml b/draft-schanzen-r5n.xml index 037adc5..60c5967 100644 --- a/draft-schanzen-r5n.xml +++ b/draft-schanzen-r5n.xml @@ -893,7 +893,34 @@ BEGIN This section describes some data structures and fields shared by various message types. </t> - <section anchor="route_flags"> + <section anchor="msg_hdr"> + <name>Header</name> + <t> + A message header that identifies the message length and type is shared across + all messages used in the R<sup>5</sup>N protocol. + </t> + <figure anchor="figure_msghdr" title="The common message header."> + <artwork name="" type="" align="left" alt=""><![CDATA[ +0 8 16 24 ++-----+-----+-----+-----+ +| MSIZE | MTYPE | ++-----+-----+-----+-----+ +]]></artwork> + </figure> + <t>where:</t> + <dl> + <dt>MSIZE</dt> + <dd> + denotes the size of this message in network byte order. + </dd> + <dt>MTYPE</dt> + <dd> + is the 16-bit message type. Message types are registered in + the GANA "GNUnet Message Type" registry <xref target="gana_message_type"/>. + </dd> + </dl> + </section> + <section anchor="route_flags"> <name>Flags</name> <t> Flags is a 16-bit vector representing binary options. @@ -1217,7 +1244,7 @@ BEGIN <artwork name="" type="" align="left" alt=""><![CDATA[ 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ -| MSIZE | MTYPE | RESERVED | URL_CTR | +| HEADER | RESERVED | URL_CTR | +-----+-----+-----+-----+-----+-----+-----+-----+ | SIGNATURE / / (64 byte) | @@ -1230,13 +1257,9 @@ BEGIN </figure> <t>where:</t> <dl> - <dt>MSIZE</dt> - <dd> - denotes the size of this message in network byte order. - </dd> - <dt>MTYPE</dt> + <dt>HEADER</dt> <dd> - is the 16-bit message type. It must be set to + the common message header. Its <tt>MTYPE</tt> field must be set to the value 157 in network byte order. </dd> <dt>RESERVED</dt> @@ -1325,7 +1348,7 @@ BEGIN <artwork name="" type="" align="left" alt=""><![CDATA[ 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ -| MSIZE | MTYPE | BTYPE | +| HEADER | BTYPE | +-----+-----+-----+-----+-----+-----+-----+-----+ | FLAGS | HOPCOUNT | REPL_LVL | PATH_LEN | +-----+-----+-----+-----+-----+-----+-----+-----+ @@ -1349,15 +1372,9 @@ BEGIN </figure> <t>where:</t> <dl> - <dt>MSIZE</dt> - <dd> - denotes the size of this message in network byte order. - Set by the initiator. - Modified by processing peers when message contents such as the path lengths change. - </dd> - <dt>MTYPE</dt> + <dt>HEADER</dt> <dd> - is the 16-bit message type. It is set by the initiator to + is the common message header. Its <tt>MTYPE</tt> field is set by the initiator to the value 146 in network byte order. Read-only. </dd> <dt>BTYPE</dt> @@ -1571,7 +1588,7 @@ BEGIN <artwork name="" type="" align="left" alt=""><![CDATA[ 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ -| MSIZE | MTYPE | BTYPE | +| HEADER | BTYPE | +-----+-----+-----+-----+-----+-----+-----+-----+ | FLAGS | HOPCOUNT | REPL_LVL | RF_SIZE | +-----+-----+-----+-----+-----+-----+-----+-----+ @@ -1590,16 +1607,9 @@ BEGIN </figure> <t>where:</t> <dl> - <dt>MSIZE</dt> + <dt>HEADER</dt> <dd> - denotes the size of this message in network byte order. - Set by the initiator. - <!-- FIXME: Is this not fixed-length once set by initiator?--> - Modified by processing peers when message contents change. - </dd> - <dt>MTYPE</dt> - <dd> - is the 16-bit message type. It is set by the initiator to + is the common message header. Its <tt>MTYPE</tt> field is set by the initiator to the value 147 in network byte order. Read-only. </dd> <dt>BTYPE</dt> @@ -1793,7 +1803,7 @@ BEGIN <artwork name="" type="" align="left" alt=""><![CDATA[ 0 8 16 24 32 40 48 56 +-----+-----+-----+-----+-----+-----+-----+-----+ -| MSIZE | MTYPE | BTYPE | +| HEADER | BTYPE | +-----+-----+-----+-----+-----+-----+-----+-----+ | RESERVED | FLAGS | PUTPATH_L | GETPATH_L | +-----+-----+-----+-----+-----+-----+-----+-----+ @@ -1819,15 +1829,9 @@ BEGIN </figure> <t>where:</t> <dl> - <dt>MSIZE</dt> - <dd> - denotes the size of this message in network byte order. - Set by the initiator. - Updated by processing peers. - </dd> - <dt>MTYPE</dt> + <dt>HEADER</dt> <dd> - is the 16-bit message type. It must be set to + is the common message header. Its <tt>MTYPE</tt> field must be set to the value 148 in network byte order. Set by the initiator. Read-only. </dd> |