Skip to main content

Module state

Module state 

Source
Expand description

Simple implementation for the internal map state of a ChanMgr.

Re-exportsΒ§

use std::time::Duration; πŸ”’
use super::AbstractChannelFactory; πŸ”’
use super::AbstractChannel; πŸ”’
use super::Pending; πŸ”’
use super::Sending; πŸ”’
use super::select; πŸ”’
use crate::ChannelConfig; πŸ”’
use crate::Dormancy; πŸ”’
use crate::Error; πŸ”’
use crate::Result; πŸ”’
use futures::FutureExt; πŸ”’
use std::result::Result as StdResult; πŸ”’
use std::sync::Arc; πŸ”’
use std::sync::atomic::AtomicU64; πŸ”’
use std::sync::atomic::Ordering; πŸ”’
use tor_async_utils::oneshot; πŸ”’
use tor_basic_utils::RngExt as _; πŸ”’
use tor_cell::chancell::msg::PaddingNegotiate; πŸ”’
use tor_config::PaddingLevel; πŸ”’
use tor_error::error_report; πŸ”’
use tor_error::internal; πŸ”’
use tor_error::into_internal; πŸ”’
use tor_linkspec::HasRelayIds; πŸ”’
use tor_linkspec::ListByRelayIds; πŸ”’
use tor_linkspec::RelayIds; πŸ”’
use tor_netdir::params::CHANNEL_PADDING_TIMEOUT_UPPER_BOUND; πŸ”’
use tor_netdir::params::NetParameters; πŸ”’
use tor_proto::ChannelPaddingInstructions; πŸ”’
use tor_proto::channel::ChannelPaddingInstructionsUpdates; πŸ”’
use tor_proto::channel::kist::KistMode; πŸ”’
use tor_proto::channel::kist::KistParams; πŸ”’
use tor_proto::channel::padding::Parameters as PaddingParameters; πŸ”’
use tor_proto::channel::padding::ParametersBuilder as PaddingParametersBuilder; πŸ”’
use tor_units::BoundedInt32; πŸ”’
use tor_units::IntegerMilliseconds; πŸ”’
use tracing::info; πŸ”’
use tracing::instrument; πŸ”’
use tracing::instrument; πŸ”’
use void::ResultVoidExt as _; πŸ”’
use void::Void; πŸ”’

StructsΒ§

ChannelParams πŸ”’
Parameters for channels that we create, and that all existing channels are using
Inner πŸ”’
A map from channel id to channel state, plus necessary auxiliary state - inside lock
MgrState πŸ”’
All mutable state held by an AbstractChannelMgr.
NetParamsExtract πŸ”’
Extract from a NetParameters which we need, conveniently organized for our processing
OpenEntry πŸ”’
An open channel entry.
PendingChannelHandle πŸ”’
A handle for a pending channel.
PendingEntry πŸ”’
An entry for a not-yet-build channel
UniqPendingChanId πŸ”’
A unique ID for a pending (PendingEntry) channel.

EnumsΒ§

ChannelForTarget πŸ”’
A channel for a given target relay.
ChannelState πŸ”’
The state of a channel (or channel build attempt) within a map.

FunctionsΒ§

kist_mode_from_net_parameter πŸ”’
Build a KistMode from NetParameters.
padding_parameters πŸ”’
Given a NetDirExtract and whether we’re reducing padding, return a PaddingParameters
padding_parameters_builder πŸ”’
Given a NetDirExtract and whether we’re reducing padding, return a PaddingParametersBuilder
parameterize πŸ”’
Converts config, dormancy, and netdir, into parameter updates
remove_pending πŸ”’
Helper: remove the pending channel identified by handle from channel_map.
setup_launch πŸ”’
Helper: return the objects used to inform pending tasks about a newly open or failed channel.

Type AliasesΒ§

NfIto πŸ”’
Type of the nf_ito_* netdir parameters, convenience alias