aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-12-07 18:57:37 +0000
committerNick Mathewson <nickm@torproject.org>2006-12-07 18:57:37 +0000
commit6c8075d8a05b75496b236118e78de771721c9ae4 (patch)
treeebf0df749b32627bc40e6096373a466c49ffc9d5 /src/or/or.h
parent63e4cfbeb609f88bdcc622b63cc74558a6e0e235 (diff)
downloadtor-6c8075d8a05b75496b236118e78de771721c9ae4.tar
tor-6c8075d8a05b75496b236118e78de771721c9ae4.tar.gz
r11462@Kushana: nickm | 2006-12-07 13:42:21 -0500
Make bandwidth accounting information get stored to the state file as well as bw_accounting. Read from the state file if it is more recent than bw_accounting, or if bw_accounting is not there. svn:r9044
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 59d3e005a..9f25dfd59 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1655,9 +1655,10 @@ typedef struct {
/** Persistent state for an onion router, as saved to disk. */
typedef struct {
uint32_t _magic;
+ /** True iff this state has been changed since it was last read/written
+ * to the disk. */
int dirty;
- /* XXXX These options aren't actually attached to anything yet. */
time_t LastWritten;
time_t AccountingIntervalStart;
uint64_t AccountingBytesReadInInterval;
@@ -2261,7 +2262,7 @@ int accounting_is_enabled(or_options_t *options);
void configure_accounting(time_t now);
void accounting_run_housekeeping(time_t now);
void accounting_add_bytes(size_t n_read, size_t n_written, int seconds);
-int accounting_record_bandwidth_usage(time_t now);
+int accounting_record_bandwidth_usage(time_t now, or_state_t *state);
void hibernate_begin_shutdown(void);
int we_are_hibernating(void);
void consider_hibernation(time_t now);