diff options
author | Nick Mathewson <nickm@torproject.org> | 2021-09-14 17:13:05 -0400 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2022-02-22 19:28:33 +0000 |
commit | 662b9c1c0d3a279359703487d97b155dcb89151a (patch) | |
tree | e11169fe7f22efe383966c1940d83749676b9a87 /src | |
parent | a511718a30796e9441cdd066bdce1ad00aaec046 (diff) | |
download | tor-662b9c1c0d3a279359703487d97b155dcb89151a.tar.gz tor-662b9c1c0d3a279359703487d97b155dcb89151a.zip |
Add stub argument for constructing congestion_control_t
Diffstat (limited to 'src')
-rw-r--r-- | src/core/or/congestion_control_common.c | 6 | ||||
-rw-r--r-- | src/core/or/congestion_control_common.h | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/core/or/congestion_control_common.c b/src/core/or/congestion_control_common.c index 0919f037db..f2becb9b20 100644 --- a/src/core/or/congestion_control_common.c +++ b/src/core/or/congestion_control_common.c @@ -10,6 +10,7 @@ #include "core/or/or.h" +#include "core/crypto/onion_crypto.h" #include "core/or/circuitlist.h" #include "core/or/crypt_path.h" #include "core/or/or_circuit_st.h" @@ -272,10 +273,13 @@ congestion_control_init(congestion_control_t *cc, cc_alg_t cc_alg, /** Allocate and initialize a new congestion control object */ congestion_control_t * -congestion_control_new(void) +congestion_control_new(const circuit_params_t *params) { congestion_control_t *cc = tor_malloc_zero(sizeof(congestion_control_t)); + /* TODO: Use `params` to pick the algorithm and the window. */ + (void) params; + // XXX: the alg and the sendme_inc need to be negotiated during // circuit handshake congestion_control_init(cc, CC_ALG_VEGAS, SENDME_INC_DFLT); diff --git a/src/core/or/congestion_control_common.h b/src/core/or/congestion_control_common.h index 01dbc1ceb4..1c44e6b0ef 100644 --- a/src/core/or/congestion_control_common.h +++ b/src/core/or/congestion_control_common.h @@ -20,7 +20,10 @@ typedef struct congestion_control_t congestion_control_t; void congestion_control_free_(congestion_control_t *cc); -congestion_control_t *congestion_control_new(void); +/* TODO: Whisky Tango Foxtot‽ Nothing calls this function anywhere! */ +struct circuit_params_t; +congestion_control_t *congestion_control_new( + const struct circuit_params_t *params); int congestion_control_dispatch_cc_alg(congestion_control_t *cc, const circuit_t *circ, |