Skip to main content

Module relaycell

Module relaycell 

Source
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Β§

BodyWrapper πŸ”’
Wrap a BoxedCellBody and implement AsMut<u8>, so we can use it with SliceWriter.
IncompleteRelayMsgInfo
Information about a relay message for which we don’t yet have the complete body.
RelayCellDecoder
Decodes a stream of relay cell bodies into UnparsedRelayMsgs.
RelayCellDecoderResult
Result of calling RelayCellDecoder::decode.
RelayCmd
A command that identifies the type of a relay cell
RelayMsgOuter
A decoded and parsed relay message, along with an optional Stream ID.
StreamId
Identify a single stream on a circuit.
UnparsedRelayMsg
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Β§

RelayCellDecoderInternal πŸ”’
Internal decoder state.
RelayCellFormat
Specifies which encoding version of RelayCell to use.
StreamIdReq πŸ”’
Possible requirements on stream IDs for a relay command.
UnparsedRelayMsgInternal πŸ”’
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Β§

RelayMsg
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Β§

AnyRelayCellDeprecated
A deprecated name for AnyRelayMsgOuter.
AnyRelayMsgOuter
A decoded and parsed relay message of unrestricted type, with an accompanying optional Stream ID.
RelayCellDeprecated
A deprecated name for RelayMsgOuter.