Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mike Perry
Tor
Commits
41f0b61a
Commit
41f0b61a
authored
Sep 14, 2021
by
Nick Mathewson
🎨
Committed by
Mike Perry
Nov 02, 2021
Browse files
Add stub argument for constructing congestion_control_t
parent
86aa77a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/core/or/congestion_control_common.c
View file @
41f0b61a
...
...
@@ -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
);
...
...
src/core/or/congestion_control_common.h
View file @
41f0b61a
...
...
@@ -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
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment