Expand description
Management for flow control windows.
Tor maintains a separate windows on circuits and on streams. These are controlled by SENDME cells, which (confusingly) are applied either at the circuit or the stream level depending on whether they have a stream ID set.
Circuit sendmes are authenticated: they include a cryptographic tag generated by the cryptography layer. This tag proves that the other side of the circuit really has read all of the data that itβs acknowledging.
Re-exportsΒ§
use std::collections::VecDeque;πuse tor_cell::relaycell::RelayCmd;πuse tor_cell::relaycell::UnparsedRelayMsg;πuse tor_error::internal;πuse crate::Error;πuse crate::Result;π
StructsΒ§
- Circ
Params π - Parameters used for SENDME windows on circuits: limit at 1000 cells, and each SENDME adjusts by 100.
- Recv
Window π - Structure to track when we need to send SENDME cells for incoming data.
- Send
Window π - Tracks how many cells we can safely send on a circuit or stream.
- Sendme
Validator π - Object used to validate SENDMEs as in managing the authenticated tag and verifying it.
- Stream
Params π - Parameters used for SENDME windows on streams: limit at 500 cells, and each SENDME adjusts by 50.
TraitsΒ§
- Window
Params π - Helper: parametrizes a window to determine its maximum and its increment.
FunctionsΒ§
- cell_
counts_ πtowards_ windows - Return true if this message is counted by flow-control windows.
- cmd_
counts_ πtowards_ windows - Return true if this message type is counted by flow-control windows.
Type AliasesΒ§
- Circ
Recv πWindow - A circuitβs receive window.
- Circ
Send πWindow - A circuitβs send window.
- Stream
Recv πWindow - A streamβs receive window.
- Stream
Send πWindow - A streamβs send window.