tor  0.4.2.0-alpha-dev
hs_dos.h
Go to the documentation of this file.
1 /* Copyright (c) 2019, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
3 
10 #ifndef TOR_HS_DOS_H
11 #define TOR_HS_DOS_H
12 
13 #include "core/or/or_circuit_st.h"
14 
15 #include "feature/nodelist/networkstatus_st.h"
16 
17 /* Init */
18 void hs_dos_init(void);
19 
20 /* Consensus. */
21 void hs_dos_consensus_has_changed(const networkstatus_t *ns);
22 
23 /* Introduction Point. */
24 bool hs_dos_can_send_intro2(or_circuit_t *s_intro_circ);
25 void hs_dos_setup_default_intro2_defenses(or_circuit_t *circ);
26 
27 #ifdef HS_DOS_PRIVATE
28 
29 #ifdef TOR_UNIT_TESTS
30 
31 STATIC uint32_t get_intro2_enable_consensus_param(const networkstatus_t *ns);
32 STATIC uint32_t get_intro2_rate_consensus_param(const networkstatus_t *ns);
33 STATIC uint32_t get_intro2_burst_consensus_param(const networkstatus_t *ns);
34 
35 #endif /* define(TOR_UNIT_TESTS) */
36 
37 #endif /* defined(HS_DOS_PRIVATE) */
38 
39 #endif /* !defined(TOR_HS_DOS_H) */