Expand description
Implementation for parsing and encoding relay cells
ModulesΒ§
- conflux
- Encoding and decoding for relay messages related to conflux.
- extend
- Types and encodings used during circuit extension.
- extlist π
- Helpers to manage lists of extensions within relay messages.
- flow_
ctrl - Cells for flow control (excluding βsendmeβ cells).
- hs
- Encoding and decoding for relay messages related to onion services.
- msg
- Encoding and decoding for relay messages
- udp
- Encoding and decoding for relay messages
StructsΒ§
- Body
Wrapper π - Wrap a BoxedCellBody and implement AsMut<u8>, so we can use it with
SliceWriter. - Incomplete
Relay MsgInfo - Information about a relay message for which we donβt yet have the complete body.
- Relay
Cell Decoder - Decodes a stream of relay cell bodies into
UnparsedRelayMsgs. - Relay
Cell Decoder Result - Result of calling
RelayCellDecoder::decode. - Relay
Cmd - A command that identifies the type of a relay cell
- Relay
MsgOuter - A decoded and parsed relay message, along with an optional Stream ID.
- Stream
Id - Identify a single stream on a circuit.
- Unparsed
Relay Msg - An enveloped relay message that has not yet been fully parsed, but where we have access to the command, stream ID, and payload data length for dispatching and congestion control purposes.
EnumsΒ§
- Relay
Cell πDecoder Internal - Internal decoder state.
- Relay
Cell Format - Specifies which encoding version of RelayCell to use.
- Stream
IdReq π - Possible requirements on stream IDs for a relay command.
- Unparsed
Relay πMsgInternal - Internal representation of an
UnparsedRelayMsg.
ConstantsΒ§
- BODY_
MAX_ πLEN_ V0 - The maximum length of a V0 cell message body.
- BODY_
MAX_ πLEN_ V1 - The maximum length of a V1 cell message body.
- LENGTH_
OFFSET_ πV0 - Position of the payload data length within the V0 cell body.
- LENGTH_
OFFSET_ πV1 - Position of the payload data length within the V1 cell body.
- PAYLOAD_
MAX_ SIZE_ ALL - The maximum amount of payload data that can fit within all cell body types.
- PAYLOAD_
MAX_ SIZE_ ANY - The maximum amount of payload data that can fit within any cell body type.
- PAYLOAD_
MAX_ πSIZE_ V0 - Max amount of payload data that can be stored in a V0 cell body.
- PAYLOAD_
MAX_ πSIZE_ V1_ WITHOUT_ STREAM_ ID - Max amount of payload data that can be stored in a V1 cell body, when not including a stream ID.
- PAYLOAD_
MAX_ πSIZE_ V1_ WITH_ STREAM_ ID - Max amount of payload data that can be stored in a V1 cell body, when including a stream ID.
- PAYLOAD_
OFFSET_ πV0 - Position of the payload data within the V0 cell body.
- PAYLOAD_
OFFSET_ πV1_ WITHOUT_ STREAM_ ID - Position of the payload data within the V1 cell body, when not including a stream ID.
- PAYLOAD_
OFFSET_ πV1_ WITH_ STREAM_ ID - Position of the payload data within the V1 cell body, when including a stream ID.
- STREAM_
ID_ πOFFSET_ V0 - Position of the stream ID within the V0 cell body.
- STREAM_
ID_ πOFFSET_ V1 - Position of the stream ID within the V1 cell body, if it is present.
TraitsΒ§
- Relay
Msg - Trait implemented by anything that can serve as a relay message.
FunctionsΒ§
- max π
- Const helper to find the max between three u16 values.
- min π
- Const helper to find the min between three u16 values.
Type AliasesΒ§
- AnyRelay
Cell Deprecated - A deprecated name for AnyRelayMsgOuter.
- AnyRelay
MsgOuter - A decoded and parsed relay message of unrestricted type, with an accompanying optional Stream ID.
- Relay
Cell Deprecated - A deprecated name for RelayMsgOuter.