Tor 0.4.9.0-alpha-dev
congestion_control_flow.h
Go to the documentation of this file.
1/* Copyright (c) 2019-2021, The Tor Project, Inc. */
2/* See LICENSE for licensing information */
3
4/**
5 * \file congestion_control_flow.h
6 * \brief APIs for stream flow control on congestion controlled circuits.
7 **/
8
9#ifndef TOR_CONGESTION_CONTROL_FLOW_H
10#define TOR_CONGESTION_CONTROL_FLOW_H
11
13#include "core/or/circuit_st.h"
15
17
19 const crypt_path_t *layer_hint,
20 const cell_t *cell);
22 const crypt_path_t *layer_hint,
23 const cell_t *cell);
24
26void flow_control_decide_xon(edge_connection_t *stream, size_t n_written);
27
28void flow_control_note_sent_data(edge_connection_t *stream, size_t len);
29
31
33
34/** Metricsport externs */
35extern uint64_t cc_stats_flow_num_xoff_sent;
36extern uint64_t cc_stats_flow_num_xon_sent;
37extern double cc_stats_flow_xoff_outbuf_ma;
38extern double cc_stats_flow_xon_outbuf_ma;
39
40/* Private section starts. */
41#ifdef TOR_CONGESTION_CONTROL_FLOW_PRIVATE
42
43/*
44 * Unit tests declaractions.
45 */
46#ifdef TOR_UNIT_TESTS
47
48#endif /* defined(TOR_UNIT_TESTS) */
49
50#endif /* defined(TOR_CONGESTION_CONTROL_FLOW_PRIVATE) */
51
52#endif /* !defined(TOR_CONGESTION_CONTROL_FLOW_H) */
Base circuit structure.
void flow_control_new_consensus_params(const networkstatus_t *ns)
bool circuit_process_stream_xoff(edge_connection_t *conn, const crypt_path_t *layer_hint, const cell_t *cell)
int flow_control_decide_xoff(edge_connection_t *stream)
void flow_control_note_sent_data(edge_connection_t *stream, size_t len)
bool edge_uses_flow_control(const edge_connection_t *stream)
uint64_t cc_stats_flow_num_xoff_sent
bool conn_uses_flow_control(connection_t *stream)
bool circuit_process_stream_xon(edge_connection_t *conn, const crypt_path_t *layer_hint, const cell_t *cell)
void flow_control_decide_xon(edge_connection_t *stream, size_t n_written)
Path structures for origin circuits.
Edge-connection structure.
Definition: cell_st.h:17