diff options
author | Chelsea H. Komlo <chelsea.komlo@gmail.com> | 2016-10-14 07:00:35 -0500 |
---|---|---|
committer | Chelsea H. Komlo <chelsea.komlo@gmail.com> | 2016-11-24 08:12:30 -0500 |
commit | afb6ae7b0fb87550c12e09e5eb7c2a09e675909d (patch) | |
tree | 528b13859fd421257f3d94800f31ca71def17134 /src/or/circuituse.h | |
parent | b95998ef0c31c78a9952621eb1f7365ceb1d2c84 (diff) | |
download | tor-afb6ae7b0fb87550c12e09e5eb7c2a09e675909d.tar.gz tor-afb6ae7b0fb87550c12e09e5eb7c2a09e675909d.zip |
Refactor circuit_predict_and_launch_new
Diffstat (limited to 'src/or/circuituse.h')
-rw-r--r-- | src/or/circuituse.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/or/circuituse.h b/src/or/circuituse.h index 5973978c45..d484be1986 100644 --- a/src/or/circuituse.h +++ b/src/or/circuituse.h @@ -59,5 +59,25 @@ int hostname_in_track_host_exits(const or_options_t *options, const char *address); void mark_circuit_unusable_for_new_conns(origin_circuit_t *circ); +#ifdef TOR_UNIT_TESTS +/* Used only by circuituse.c and test_circuituse.c */ + +STATIC int circuit_is_available_for_use(const circuit_t *circ); + +STATIC int needs_exit_circuits(time_t now, + int *port_needs_uptime, + int *port_needs_capacity); +STATIC int needs_hs_server_circuits(int num_uptime_internal); + +STATIC int needs_hs_client_circuits(time_t now, + int *needs_uptime, + int *needs_capacity, + int num_internal, + int num_uptime_internal); + +STATIC int needs_circuits_for_build(int num); + +#endif + #endif |