diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2013-05-31 15:51:25 +0200 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2013-05-31 16:12:28 +0200 |
commit | e39292f21dd363bd7601b63b4f43a95705c3332b (patch) | |
tree | a54ba8d1b8a066f556113968fdcde05b7f22df2b /src/or/connection.h | |
parent | b33b366a7f8bcab1c9b4859788e3b2c7d3dcf180 (diff) | |
download | tor-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.h | 11 |
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 |