aboutsummaryrefslogtreecommitdiff
path: root/src/core/mainloop/mainloop_state.inc
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-11-05 11:58:31 -0500
committerNick Mathewson <nickm@torproject.org>2019-11-07 07:28:43 -0500
commit280a9a476031db7c5c5923b0ad9b23e475abeae9 (patch)
tree25f761afa02a8ae26b590fbc60f825a6e41f6e69 /src/core/mainloop/mainloop_state.inc
parent3afbb29bee060b191e10aaec134a819047c3cf5e (diff)
downloadtor-280a9a476031db7c5c5923b0ad9b23e475abeae9.tar.gz
tor-280a9a476031db7c5c5923b0ad9b23e475abeae9.zip
Move netstatus (mainloop) state fields into mainloop's state.
Diffstat (limited to 'src/core/mainloop/mainloop_state.inc')
-rw-r--r--src/core/mainloop/mainloop_state.inc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/core/mainloop/mainloop_state.inc b/src/core/mainloop/mainloop_state.inc
new file mode 100644
index 0000000000..34a37caaa2
--- /dev/null
+++ b/src/core/mainloop/mainloop_state.inc
@@ -0,0 +1,19 @@
+
+/**
+ * @file mainloop_state.inc
+ * @brief Declare configuration options for the crypto_ops module.
+ **/
+
+/** Holds state for the mainloop, corresponding to part of the state
+ * file in Tor's DataDirectory. */
+BEGIN_CONF_STRUCT(mainloop_state_t)
+
+/** Number of minutes since the last user-initiated request (as defined by
+ * the dormant net-status system.) Set to zero if we are dormant. */
+CONF_VAR(MinutesSinceUserActivity, POSINT, 0, NULL)
+
+/** True if we were dormant when we last wrote the file; false if we
+ * weren't. "auto" on initial startup. */
+CONF_VAR(Dormant, AUTOBOOL, 0, "auto")
+
+END_CONF_STRUCT(mainloop_state_t)