aboutsummaryrefslogtreecommitdiff
path: root/src/feature/stats/rephist.h
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2021-11-05 20:50:39 +0000
committerMike Perry <mikeperry-git@torproject.org>2022-02-22 19:28:34 +0000
commita0eeadfba2c1d7d33214286ef7697971120cbe16 (patch)
tree8f3e6a782aa6daacd49683dc7731fc297c421add /src/feature/stats/rephist.h
parent812590f8aa6637cd2b3f869dc4e30fd6550beac3 (diff)
downloadtor-a0eeadfba2c1d7d33214286ef7697971120cbe16.tar.gz
tor-a0eeadfba2c1d7d33214286ef7697971120cbe16.zip
Handle other places that use onion handshake type values
We want ntor and ntorv3 to use the same queues and stats.
Diffstat (limited to 'src/feature/stats/rephist.h')
-rw-r--r--src/feature/stats/rephist.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/feature/stats/rephist.h b/src/feature/stats/rephist.h
index 7f414de4c8..2fb24a10a7 100644
--- a/src/feature/stats/rephist.h
+++ b/src/feature/stats/rephist.h
@@ -89,11 +89,15 @@ 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);
+/** We combine ntor and ntorv3 stats, so 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
-extern int onion_handshakes_requested[MAX_ONION_HANDSHAKE_TYPE+1];
-extern int onion_handshakes_assigned[MAX_ONION_HANDSHAKE_TYPE+1];
+extern int onion_handshakes_requested[MAX_ONION_STAT_TYPE+1];
+extern int onion_handshakes_assigned[MAX_ONION_STAT_TYPE+1];
#endif
#ifdef REPHIST_PRIVATE