Expand description
Channel padding
Tor spec padding-spec.txt
section 2.
§Overview of channel padding control arrangements
-
tor_chanmgr::mgr::map
collates information about dormancy, netdir, and overall client configuration, to maintain aChannelPaddingInstructions
which is to be used for all relevant1 channels. This is distributed to channel frontends (Channel
s) by callingChannel::reparameterize
. -
Circuit and channel
get_or_launch
methods all take aChannelUsage
. This is plumbed through the layers toAbstractChanMgr::get_or_launch
, which passes it to the channel frontend viaChannel::note_usage
. -
The
Channel
collates this information, and maintains an idea of whether padding is relevant for this channel (PaddingControlState
). For channels where it is relevant, it sendsCtrlMsg::ConfigUpdate
to the reactor. -
The reactor handles
CtrlMsg::ConfigUpdate
by reconfiguring is padding timer; and by sending PADDING_NEGOTIATE cell(s).
A “relevant” channel is one which is not excluded by the rules about padding in padding-spec 2.2. Arti does not currently support acting as a relay, so all our channels are client-to-guard or client-to-directory. ↩
Structs§
- Padding
Timer 🔒Proj - Parameters
- Timing parameters, as described in
padding-spec.txt
- Parameters
Builder - Builder for
Parameters
. - Prepared
Parameters 🔒 - Timing parameters, “compiled” into a form which can be sampled more efficiently
- Timer 🔒
- Timer that organises wakeups when channel padding should be sent
Enums§
- Parameters
Error - An error that occurred whil e constructing padding parameters.
- Sleep
Instructions 🔒 - Return value from
prepare_to_sleep
: instructions for what caller ought to do