diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-10-07 16:43:45 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-10-07 16:43:45 -0400 |
commit | 1ec22eac4bf20424624fe2ef2151ff57687912de (patch) | |
tree | 6612e36f5a3c437278535e5f54a753d8d1b6a765 /src/or/hibernate.h | |
parent | 8b0ee60fe7752f4894fff8334eff786e80941302 (diff) | |
parent | 9bdde8902716bf923a78d8c287acadb0c4d2ffcd (diff) | |
download | tor-1ec22eac4bf20424624fe2ef2151ff57687912de.tar.gz tor-1ec22eac4bf20424624fe2ef2151ff57687912de.zip |
Merge remote-tracking branch 'public/bug2003_nm'
Diffstat (limited to 'src/or/hibernate.h')
-rw-r--r-- | src/or/hibernate.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/or/hibernate.h b/src/or/hibernate.h index b5826bced4..78e7bb75e9 100644 --- a/src/or/hibernate.h +++ b/src/or/hibernate.h @@ -25,5 +25,27 @@ int getinfo_helper_accounting(control_connection_t *conn, const char *question, char **answer, const char **errmsg); +#ifdef HIBERNATE_PRIVATE +/** Possible values of hibernate_state */ +typedef enum { + /** We are running normally. */ + HIBERNATE_STATE_LIVE=1, + /** We're trying to shut down cleanly, and we'll kill all active connections + * at shutdown_time. */ + HIBERNATE_STATE_EXITING=2, + /** We're running low on allocated bandwidth for this period, so we won't + * accept any new connections. */ + HIBERNATE_STATE_LOWBANDWIDTH=3, + /** We are hibernating, and we won't wake up till there's more bandwidth to + * use. */ + HIBERNATE_STATE_DORMANT=4, + /** We start out in state default, which means we havent decided which state + * we're in. */ + HIBERNATE_STATE_INITIAL=5 +} hibernate_state_t; + +void hibernate_set_state_for_testing_(hibernate_state_t newstate); +#endif + #endif |