summaryrefslogtreecommitdiff
path: root/src/or/connection.h
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2013-05-31 15:51:25 +0200
committerKarsten Loesing <karsten.loesing@gmx.net>2013-05-31 16:12:28 +0200
commite39292f21dd363bd7601b63b4f43a95705c3332b (patch)
treea54ba8d1b8a066f556113968fdcde05b7f22df2b /src/or/connection.h
parentb33b366a7f8bcab1c9b4859788e3b2c7d3dcf180 (diff)
downloadtor-e39292f21dd363bd7601b63b4f43a95705c3332b.tar.gz
tor-e39292f21dd363bd7601b63b4f43a95705c3332b.zip
Test functions used for TB_EMPTY and CELL_STATS events.
Diffstat (limited to 'src/or/connection.h')
-rw-r--r--src/or/connection.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/or/connection.h b/src/or/connection.h
index 3e656ec06e..c0894cd095 100644
--- a/src/or/connection.h
+++ b/src/or/connection.h
@@ -214,5 +214,16 @@ void connection_enable_rate_limiting(connection_t *conn);
#define connection_type_uses_bufferevent(c) (0)
#endif
+#ifdef CONNECTION_PRIVATE
+/* Used only by connection.c and test*.c */
+uint32_t bucket_millis_empty(int tokens_before, uint32_t last_empty_time,
+ int tokens_after, int milliseconds_elapsed,
+ struct timeval tvnow);
+void connection_buckets_note_empty_ts(uint32_t *timestamp_var,
+ int tokens_before,
+ size_t tokens_removed,
+ struct timeval tvnow);
+#endif
+
#endif