diff options
Diffstat (limited to 'spec/tor-spec/cell-packet-format.md')
-rw-r--r-- | spec/tor-spec/cell-packet-format.md | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/spec/tor-spec/cell-packet-format.md b/spec/tor-spec/cell-packet-format.md index 8f2174d..cfc7f36 100644 --- a/spec/tor-spec/cell-packet-format.md +++ b/spec/tor-spec/cell-packet-format.md @@ -27,7 +27,7 @@ since no version has yet been negotiated. |-----------|-------------------|-------| | `CircID` | [`CIRCID_LEN(v)`] | | | `Command` | 1 | | -| `Payload` | [`PAYLOAD_LEN`] | Padded to fit | +| `Body` | [`CELL_BODY_LEN`] | Padded to fit | The value of `CIRCID_LEN` depends on the negotiated link protocol. @@ -41,10 +41,10 @@ A variable-length cell has this format: | `CircID` | `CIRCID_LEN(v)` | | | `Command` | 1 | | | `Length` | 2 | A big-endian integer | -| `Payload` | `Length` | | +| `Body` | `Length` | | [`CIRCID_LEN(v)`]: ./preliminaries.md#msg-len -[`PAYLOAD_LEN`]: ./preliminaries.md#msg-len +[`CELL_BODY_LEN`]: ./preliminaries.md#msg-len [`VERSIONS` cells]: ./negotiating-channels.md#VERSIONS-cells Fixed-length and variable-length cells are distinguished @@ -159,34 +159,38 @@ and MAY terminate the channel with an error. > under the assumption that the command was sent > by a more up-to-date version of Tor. -## Interpreting the fields: Payload {#payload} +## Interpreting the fields: Cell Body {#body} -The interpretation of Payload depends on the cell's command. +<!-- deprecated target --><a id="payload"></a> + +The interpretation of a cell's Body depends on the cell's command. see the links in the command descriptions above for more information on each command. -## Padding fixed-length cell payloads {#payload-padding} +## Padding fixed-length cell bodies {#body-padding} + +<!-- deprecated target --><a id="payload-padding"></a> Often, the amount of information to be sent in a fixed-length cell -is less than [`PAYLOAD_LEN`] bytes. +is less than [`CELL_BODY_LEN`] bytes. When this happens, -the sender MUST fill the unused part of the payload +the sender MUST fill the unused part of the cell's body with zero-valued bytes. Recipients MUST ignore padding bytes. -> [RELAY] and [RELAY_EARLY] cell payloads +> [RELAY] and [RELAY_EARLY] cells' bodies > contain encrypted data, > and are always full > from the point of the view of the channel layer. > > The _plaintext_ of these cells' contents may be padded; > this uses a [different mechanism](./relay-cells.md#relay-cell-padding) -> and does not interact with channel payload padding. +> and does not interact with cell body padding. Variable-length cells never have extra space, -so there is no need to pad their payloads. +so there is no need to pad their bodies. Unless otherwise specified, variable-length cells have no padding. |