Skip to main content

Module sendme

Module sendme 

Source
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Β§

CircParams πŸ”’
Parameters used for SENDME windows on circuits: limit at 1000 cells, and each SENDME adjusts by 100.
RecvWindow πŸ”’
Structure to track when we need to send SENDME cells for incoming data.
SendWindow πŸ”’
Tracks how many cells we can safely send on a circuit or stream.
SendmeValidator πŸ”’
Object used to validate SENDMEs as in managing the authenticated tag and verifying it.
StreamParams πŸ”’
Parameters used for SENDME windows on streams: limit at 500 cells, and each SENDME adjusts by 50.

TraitsΒ§

WindowParams πŸ”’
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Β§

CircRecvWindow πŸ”’
A circuit’s receive window.
CircSendWindow πŸ”’
A circuit’s send window.
StreamRecvWindow πŸ”’
A stream’s receive window.
StreamSendWindow πŸ”’
A stream’s send window.