Settings
Help

Module congestion

Module congestion 

Source
Expand description

Congestion control subsystem.

This object is attached to a circuit hop (CircHop) and controls the logic for the congestion control support of the Tor Network. It also manages the circuit level SENDME logic which is part of congestion control.

ยงImplementation

The basics of this subsystem is that it is notified when a DATA cell is received or sent. This in turn updates the congestion control state so that the very important can_send function be accurate to decide if a DATA cell can be sent or not.

Any part of the arti code that wants to send a DATA cell on the wire needs to call can_send before else weโ€™ll risk leaving the circuit in a protocol violation state.

Furthermore, as we receive and emit SENDMEs, it also has entry point for those two events in order to update the state.

Modulesยง

fixed ๐Ÿ”’
Implementation of the Fixed Window congestion control algorithm.
params
Define the congestion control parameters needed for the algorithms.
rtt ๐Ÿ”’
Round Trip Time measurement (ยง 2.1)
sendme ๐Ÿ”’
Management for flow control windows.
test_utils ๐Ÿ”’ testing
Test helpers.
vegas ๐Ÿ”’
Implementation of the Tor Vegas congestion control algorithm.

Structsยง

CongestionControl ๐Ÿ”’
Congestion control state of a hop on a circuit.
CongestionSignals ๐Ÿ”’
These are congestion signals used by a congestion control algorithm to make decisions. These signals are various states of our internals. This is not an exhaustive list.
CongestionWindow ๐Ÿ”’
A congestion window. This is generic for all algorithms but their parametersโ€™ value will differ depending on the selected algorithm.

Enumsยง

State ๐Ÿ”’
Congestion control state.

Traitsยง

CongestionControlAlgorithm ๐Ÿ”’
This trait defines what a congestion control algorithm must implement in order to interface with the circuit reactor.