aboutsummaryrefslogtreecommitdiff
path: root/src/feature/stats/connstats.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-07-10 09:07:23 -0400
committerNick Mathewson <nickm@torproject.org>2020-07-10 09:27:42 -0400
commit50bf2520b33eb9f477c1b8989264667c5b587a01 (patch)
tree6ddfc743deacfdcab56caeafbf76f515cc925939 /src/feature/stats/connstats.h
parent1a4e475d5d86b0325914000889d5fd0dde42c2ad (diff)
downloadtor-50bf2520b33eb9f477c1b8989264667c5b587a01.tar.gz
tor-50bf2520b33eb9f477c1b8989264667c5b587a01.zip
Split bidi connection-stats code into a new C file.
Diffstat (limited to 'src/feature/stats/connstats.h')
-rw-r--r--src/feature/stats/connstats.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/feature/stats/connstats.h b/src/feature/stats/connstats.h
new file mode 100644
index 0000000000..2abe8d7362
--- /dev/null
+++ b/src/feature/stats/connstats.h
@@ -0,0 +1,24 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2020, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * @file connstats.h
+ * @brief Header for feature/stats/connstats.c
+ **/
+
+#ifndef TOR_FEATURE_STATS_CONNSTATS_H
+#define TOR_FEATURE_STATS_CONNSTATS_H
+
+void rep_hist_conn_stats_init(time_t now);
+void rep_hist_note_or_conn_bytes(uint64_t conn_id, size_t num_read,
+ size_t num_written, time_t when);
+void rep_hist_reset_conn_stats(time_t now);
+char *rep_hist_format_conn_stats(time_t now);
+time_t rep_hist_conn_stats_write(time_t now);
+void rep_hist_conn_stats_term(void);
+void bidi_map_free_all(void);
+
+#endif /* !defined(TOR_FEATURE_STATS_CONNSTATS_H) */