aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2005-12-23 23:56:42 +0000
committerPeter Palfrader <peter@palfrader.org>2005-12-23 23:56:42 +0000
commit4bd65f0f98b8f1d1a0aea7c7f20bc4978647f531 (patch)
tree3abb9a405eeb527534b570d9044bd246e2778b98 /src/or/or.h
parentf7e82babcb450fb5c9d9aea6c7b6b897318cbaf1 (diff)
downloadtor-4bd65f0f98b8f1d1a0aea7c7f20bc4978647f531.tar
tor-4bd65f0f98b8f1d1a0aea7c7f20bc4978647f531.tar.gz
Keep bandwidth history accross restarts/crashes
svn:r5637
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h
index ec248a3ce..d51c9fec9 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1369,6 +1369,13 @@ typedef struct {
uint64_t AccountingExpectedUsage;
config_line_t *HelperNodes;
+
+ time_t BWHistoryReadEnds;
+ int BWHistoryReadInterval;
+ smartlist_t *BWHistoryReadValues;
+ time_t BWHistoryWriteEnds;
+ int BWHistoryWriteInterval;
+ smartlist_t *BWHistoryWriteValues;
} or_state_t;
#define MAX_SOCKS_REPLY_LEN 1024
@@ -2024,6 +2031,9 @@ void rep_hist_note_used_internal(time_t now, int need_uptime,
int rep_hist_get_predicted_internal(time_t now, int *need_uptime,
int *need_capacity);
+int rep_hist_update_state(or_state_t *state);
+int rep_hist_load_state(or_state_t *state, const char **err);
+
void rep_hist_free_all(void);
/********************************* rendclient.c ***************************/