Skip to main content

Module circhop

Module circhop 

Source
Expand description

Module exposing structures relating to a reactor’s view of a circuit hop.

Re-exportsΒ§

use crate::client::circuit::handshake::RelayCryptLayerProtocol; πŸ”’
use crate::ccparams::CongestionControlParams; πŸ”’
use crate::circuit::CircParameters; πŸ”’
use crate::congestion::CongestionControl; πŸ”’
use crate::congestion::sendme; πŸ”’
use crate::memquota::SpecificAccount; πŸ”’
use crate::memquota::StreamAccount; πŸ”’
use crate::stream::CloseStreamBehavior; πŸ”’
use crate::stream::SEND_WINDOW_INIT; πŸ”’
use crate::stream::StreamMpscSender; πŸ”’
use crate::stream::cmdcheck::AnyCmdChecker; πŸ”’
use crate::stream::cmdcheck::StreamStatus; πŸ”’
use crate::stream::flow_ctrl::params::FlowCtrlParameters; πŸ”’
use crate::stream::flow_ctrl::state::FlowCtrlHooks; πŸ”’
use crate::stream::flow_ctrl::state::StreamFlowCtrl; πŸ”’
use crate::stream::flow_ctrl::state::StreamRateLimit; πŸ”’
use crate::stream::flow_ctrl::state::WithSidechannelMitigations; πŸ”’
use crate::stream::flow_ctrl::xon_xoff::reader::DrainRateRequest; πŸ”’
use crate::stream::queue::StreamQueueReceiver; πŸ”’
use crate::stream::queue::stream_queue; πŸ”’
use crate::streammap; πŸ”’
use crate::streammap::EndSentStreamEnt; πŸ”’
use crate::streammap::OpenStreamEnt; πŸ”’
use crate::streammap::ShouldSendEnd; πŸ”’
use crate::streammap::StreamEntMut; πŸ”’
use crate::streammap::StreamMap; πŸ”’
use crate::util::notify::NotifyReceiver; πŸ”’
use crate::util::notify::NotifySender; πŸ”’
use crate::Error; πŸ”’
use crate::HopNum; πŸ”’
use crate::Result; πŸ”’
use derive_deftly::Deftly; πŸ”’
use postage::watch; πŸ”’
use safelog::sensitive as sv; πŸ”’
use tracing::debug; πŸ”’
use tracing::trace; πŸ”’
use tor_cell::chancell::BoxedCellBody; πŸ”’
use tor_cell::chancell::CircId; πŸ”’
use tor_cell::relaycell::extend::CcRequest; πŸ”’
use tor_cell::relaycell::extend::CircRequestExt; πŸ”’
use tor_cell::relaycell::flow_ctrl::Xoff; πŸ”’
use tor_cell::relaycell::flow_ctrl::Xon; πŸ”’
use tor_cell::relaycell::flow_ctrl::XonKBpsEwma; πŸ”’
use tor_cell::relaycell::msg::AnyRelayMsg; πŸ”’
use tor_cell::relaycell::AnyRelayMsgOuter; πŸ”’
use tor_cell::relaycell::RelayCellDecoder; πŸ”’
use tor_cell::relaycell::RelayCellDecoderResult; πŸ”’
use tor_cell::relaycell::RelayCellFormat; πŸ”’
use tor_cell::relaycell::RelayCmd; πŸ”’
use tor_cell::relaycell::StreamId; πŸ”’
use tor_cell::relaycell::UnparsedRelayMsg; πŸ”’
use tor_error::Bug; πŸ”’
use tor_error::ErrorKind; πŸ”’
use tor_error::HasKind; πŸ”’
use tor_error::internal; πŸ”’
use tor_error::into_internal; πŸ”’
use tor_memquota::derive_deftly_template_HasMemoryCost; πŸ”’
use tor_memquota::mq_queue::ChannelSpec as _; πŸ”’
use tor_memquota::mq_queue::MpscSpec; πŸ”’
use tor_protover::named; πŸ”’
use tor_rtcompat::DynTimeProvider; πŸ”’
use std::num::NonZeroU32; πŸ”’
use std::pin::Pin; πŸ”’
use std::result::Result as StdResult; πŸ”’
use std::sync::Arc; πŸ”’
use std::sync::Mutex; πŸ”’
use web_time_compat::Instant; πŸ”’
use crate::ccparams::Algorithm; πŸ”’
use crate::ccparams::AlgorithmDiscriminants; πŸ”’
use crate::circuit::HandshakeSubprotocols; πŸ”’
use crate::relay::CircNetParameters; πŸ”’
use crate::relay::CongestionControlNetParams; πŸ”’
use cfg_if::cfg_if; πŸ”’

StructsΒ§

CircHopInbound πŸ”’
The inbound state of a hop.
CircHopOutbound πŸ”’
The outbound state of a hop.
HopSettings πŸ”’
The settings we use for single hop of a circuit.
ReactorStreamComponents πŸ”’
A collection of components that can be used to interact with the reactor’s view of a Tor stream.
SendRelayCell πŸ”’
Instructions for sending a RELAY cell.

EnumsΒ§

HandshakeParamsError πŸ”’
An error that can occur when building a HopSettings using parameters requested during a circuit handshake.
HopNegotiationType πŸ”’
Type of negotiation that we’ll be performing as we establish a hop.

ConstantsΒ§

CIRCUIT_BUFFER_SIZE πŸ”’
The size of the stream’s outbound RELAY message queue.

FunctionsΒ§

cvt πŸ”’
Convert a limit from the form used in a HopSettings to that used here. (The format we use here is more compact.)
try_decrement_cell_limit πŸ”’
If val is Some(1), return Err(()); otherwise decrement it (if it is Some) and return Ok(()).