Expand description
Code to handle incoming cells on a channel.
The role of this code is to run in a separate asynchronous task, and routes cells to the right circuits.
TODO: I have zero confidence in the close-and-cleanup behavior here, or in the error handling behavior.
Re-exportsยง
use super::circmap::CircEnt;๐use super::circmap::CircMap;๐use crate::circuit::CircuitRxSender;๐use crate::client::circuit::halfcirc::HalfCirc;๐use crate::client::circuit::padding::PaddingController;๐use crate::client::circuit::padding::PaddingEvent;๐use crate::client::circuit::padding::PaddingEventStream;๐use crate::client::circuit::padding::SendPadding;๐use crate::client::circuit::padding::StartBlocking;๐use crate::util::err::ReactorError;๐use crate::Error;๐use crate::HopNum;๐use crate::Result;๐use tor_async_utils::SinkPrepareExt as _;๐use tor_async_utils::oneshot_broadcast;๐use tor_cell::chancell::ChanMsg;๐use tor_cell::chancell::msg::Destroy;๐use tor_cell::chancell::msg::DestroyReason;๐use tor_cell::chancell::msg::Padding;๐use tor_cell::chancell::msg::PaddingNegotiate;๐use tor_cell::chancell::AnyChanCell;๐use tor_cell::chancell::CircId;๐use tor_cell::chancell::msg::AnyChanMsg;๐use tor_error::debug_report;๐use tor_rtcompat::DynTimeProvider;๐use tor_rtcompat::Runtime;๐use tor_error::error_report;๐use tor_rtcompat::StreamOps;๐use futures::channel::mpsc;๐use oneshot_fused_workaround as oneshot;๐use futures::Sink;๐use futures::StreamExt as _;๐use futures::sink::SinkExt;๐use futures::stream::Stream;๐use futures::select;๐use futures::select_biased;๐use tor_error::internal;๐use std::fmt;๐use std::pin::Pin;๐use std::sync::Arc;๐use crate::channel::ChannelDetails;๐use crate::channel::CloseInfo;๐use crate::channel::kist::KistParams;๐use crate::channel::padding;๐use crate::channel::unique_id;๐use crate::circuit::celltypes::CreateResponse;๐use tracing::debug;๐use tracing::instrument;๐use tracing::instrument;๐use tracing::trace;๐use crate::channel::Channel;๐use crate::circuit::celltypes::CreateRequest;๐use crate::relay::channel::create_handler::CreateRequestHandler;๐use crate::relay::channel::create_handler::RelayCircComponents;๐use std::sync::Weak;๐use tor_llcrypto::pk::ed25519::Ed25519Identity;๐use tor_llcrypto::pk::rsa::RsaIdentity;๐use crate::util::sink_blocker::SinkBlocker;๐use crate::util::sink_blocker::CountingPolicy;๐use crate::channel::params::*;๐
Structsยง
- Create
Request ๐Handler AndData - If the channel is configured to handle CREATE* requests, this contains anything that is needed solely for this purpose.
- Reactor
- Object to handle incoming cells and background tasks on a channel.
- Special
Outgoing ๐ - Outgoing cells introduced at the channel reactor
Enumsยง
- CtrlMsg
- A message telling the channel reactor to do something.
Type Aliasesยง
- Boxed
Channel ๐Sink - A boxed trait object that can sink
ChanCells. - Boxed
Channel ๐Stream - A boxed trait object that can provide
ChanCells. - Boxed
Channel ๐Stream Ops - A boxed trait object that can provide additional
StreamOpson aBoxedChannelStream. - Channel
Output ๐Sink - Type used by a channel reactor to send cells to the network.
- Reactor
Result ๐Channel - The type of a oneshot channel used to inform reactor users of the result of an operation.