Expand description
Different kinds of messages that can be encoded in channel cells.
Macros§
- fixed_
len_ 🔒handshake - helper – declare a fixed-width cell for handshake commands, in which a fixed number of bytes matter and the rest are ignored
- msg_
impl_ 🔒chanmsg - Helper: declare a ChanMsg implementation for a message type that has a fixed command.
- msg_
into_ 🔒cell - Helper: declare a From<> implementation from message types for cells that don’t take a circid.
Structs§
- Auth
Challenge - An AuthChallenge message is part of negotiation, sent by responders to initiators.
- Authenticate
- Part of negotiation: sent by initiators to responders.
- Authorize
- The Authorize message type is not yet used.
- Certs
- A Certs message is used as part of the channel handshake to send additional certificates.
- Create
- A Create message creates a circuit, using the TAP handshake.
- Create2
- A Create2 message create a circuit on the current channel.
- Create
Fast - A CreateFast message creates a circuit using no public-key crypto.
- Created
- A Created message responds to a Created message, using the TAP handshake.
- Created2
- A Created2 message completes a circuit-creation handshake.
- Created
Fast - A CreatedFast message responds to a CreateFast message
- Destroy
- The Destroy message tears down a circuit.
- Destroy
Reason - Declared reason for ending a circuit.
- Handshake
Type - Handshake type, corresponding to
HTYPE
in tor-spec. - Netinfo
- The netinfo message ends channel negotiation.
- Padding
- A Padding message is a fixed-length message on a channel that is ignored.
- Padding
Negotiate - A PaddingNegotiate message is used to negotiate channel padding.
- Padding
Negotiate Cmd - A ChanCmd is the type of a channel cell. The value of the ChanCmd indicates the meaning of the cell, and (possibly) its length.
- Relay
- A Relay cell - that is, one transmitted over a circuit.
- Relay
Early - A Relay cell that is allowed to contain a CREATE message.
- TorCert 🔒
- A single certificate in a Certs cell.
- Unrecognized
- Holds any message whose command we don’t recognize.
- Versions
- A Versions message begins channel negotiation.
- Vpadding
- A VPadding message is a variable-length padding message.
Enums§
- AnyChan
Msg - Decoded message from a channel.
Constants§
- CHALLENGE_
LEN 🔒 - Length of the body for an authentication challenge
- FAST_
C_ 🔒HANDSHAKE_ LEN - Number of bytes used for a CREATE_FAST handshake by the initiator
- FAST_
S_ 🔒HANDSHAKE_ LEN - Number of bytes used for a CREATE_FAST handshake response
- TAP_
C_ 🔒HANDSHAKE_ LEN - Number of bytes used for a TAP handshake by the initiator.
- TAP_
S_ 🔒HANDSHAKE_ LEN - Number of bytes used for a TAP handshake response
Traits§
- Body
- Trait for the ‘bodies’ of channel messages.
Functions§
- enc_
one_ 🔒netinfo_ addr - helper: encode a single address in the form that netinfo messages expect
- enc_
one_ 🔒tor_ cert - encode a single TorCert
c
onto a Writerw
. - take_
one_ 🔒netinfo_ addr - helper: take an address as encoded in a netinfo message
- take_
one_ 🔒tor_ cert - Try to extract a TorCert from the reader
r
.