diff options
author | David Goulet <dgoulet@torproject.org> | 2022-03-02 13:20:07 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2022-03-29 10:30:28 -0400 |
commit | 7ce3edaee0eaf93f2f8fa60b859cf49118b9523b (patch) | |
tree | e316ac4587a46fd860f74b07090b91ef7f2635c2 /src/feature/stats/rephist.h | |
parent | d14af825ce9b2dbacdc11aa73340458bfef5b190 (diff) | |
download | tor-7ce3edaee0eaf93f2f8fa60b859cf49118b9523b.tar.gz tor-7ce3edaee0eaf93f2f8fa60b859cf49118b9523b.zip |
rephist: Introduce a fraction and period for overload onionskin
This code was heavily reused from the previous DNS timeout work done in
ticket #40491 that was removed afterall from our code.
Closes #40560
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/stats/rephist.h')
-rw-r--r-- | src/feature/stats/rephist.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/feature/stats/rephist.h b/src/feature/stats/rephist.h index 749b4996a8..891827c8e6 100644 --- a/src/feature/stats/rephist.h +++ b/src/feature/stats/rephist.h @@ -58,6 +58,7 @@ time_t rep_hist_desc_stats_write(time_t now); void rep_hist_note_circuit_handshake_requested(uint16_t type); void rep_hist_note_circuit_handshake_assigned(uint16_t type); +void rep_hist_note_circuit_handshake_dropped(uint16_t type); void rep_hist_log_circuit_handshake_stats(time_t now); MOCK_DECL(int, rep_hist_get_circuit_handshake_requested, (uint16_t type)); @@ -79,8 +80,17 @@ void rep_hist_free_all(void); void rep_hist_note_negotiated_link_proto(unsigned link_proto, int started_here); void rep_hist_log_link_protocol_counts(void); + +uint64_t rep_hist_get_n_dns_error(int type, uint8_t error); +uint64_t rep_hist_get_n_dns_request(int type); +void rep_hist_note_dns_request(int type); +void rep_hist_note_dns_error(int type, uint8_t error); + void rep_hist_consensus_has_changed(const networkstatus_t *ns); +/** We have 3 stat types: tap, fast, and ntor. The max type is ntor (2) */ +#define MAX_ONION_STAT_TYPE ONION_HANDSHAKE_TYPE_NTOR + extern uint64_t rephist_total_alloc; extern uint32_t rephist_total_num; #ifdef TOR_UNIT_TESTS |