summaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_dos.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-08-20 08:52:34 -0400
committerGeorge Kadianakis <desnacked@riseup.net>2019-08-26 15:53:46 +0300
commit94a22217082f99bb7d5409e22af69d45def52889 (patch)
tree7602be4f6818a56e20b5a1f70b9c2288d0f04710 /src/feature/hs/hs_dos.h
parent184c76e339fdf25ea5f61ed052810cd5f356852e (diff)
downloadtor-94a22217082f99bb7d5409e22af69d45def52889.tar.gz
tor-94a22217082f99bb7d5409e22af69d45def52889.zip
hs-v3: Privatize access to HS DoS consensus param
Remove the public functions returning the HS DoS consensus param or default values as it is exclusively used internally now. Rename the param_* variables to consensus_param_* for better code semantic. Finally, make some private functions available to unit tests. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/hs/hs_dos.h')
-rw-r--r--src/feature/hs/hs_dos.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/feature/hs/hs_dos.h b/src/feature/hs/hs_dos.h
index 1d2dd67d0f..6647b24be0 100644
--- a/src/feature/hs/hs_dos.h
+++ b/src/feature/hs/hs_dos.h
@@ -24,14 +24,14 @@ void hs_dos_consensus_has_changed(const networkstatus_t *ns);
bool hs_dos_can_send_intro2(or_circuit_t *s_intro_circ);
void hs_dos_setup_default_intro2_defenses(or_circuit_t *circ);
-unsigned int hs_dos_get_intro2_enabled_param(void);
-uint32_t hs_dos_get_intro2_rate_param(void);
-uint32_t hs_dos_get_intro2_burst_param(void);
-
#ifdef HS_DOS_PRIVATE
#ifdef TOR_UNIT_TESTS
+STATIC uint32_t get_intro2_enable_consensus_param(const networkstatus_t *ns);
+STATIC uint32_t get_intro2_rate_consensus_param(const networkstatus_t *ns);
+STATIC uint32_t get_intro2_burst_consensus_param(const networkstatus_t *ns);
+
#endif /* define(TOR_UNIT_TESTS) */
#endif /* defined(HS_DOS_PRIVATE) */