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.