aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirauth/dirauth_config.h
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-10-28 23:47:44 +1000
committerteor <teor@torproject.org>2019-10-31 12:34:19 +1000
commit5950566f1de8f9b542e2ef862cc2ae94b04917f0 (patch)
tree0768a09d8314b141f7d81c2952b4700b7d04944b /src/feature/dirauth/dirauth_config.h
parent40e75bc3e172a38ab0a3b7747b11c8838e22a268 (diff)
downloadtor-5950566f1de8f9b542e2ef862cc2ae94b04917f0.tar.gz
tor-5950566f1de8f9b542e2ef862cc2ae94b04917f0.zip
config: Move dirauth config into the dirauth module
This commit: * creates feature/dirauth/dirauth_config.[ch], * moves the dirauth config code into them, * copies some macros from src/app/config.c (we'll refactor them later in 29211), and * adds thin wrappers to make the moved code compile. No functional changes: the moved code is still enabled, even if the dirauth module is disabled. Part of 32213.
Diffstat (limited to 'src/feature/dirauth/dirauth_config.h')
-rw-r--r--src/feature/dirauth/dirauth_config.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/feature/dirauth/dirauth_config.h b/src/feature/dirauth/dirauth_config.h
new file mode 100644
index 0000000000..21437ba248
--- /dev/null
+++ b/src/feature/dirauth/dirauth_config.h
@@ -0,0 +1,35 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2019, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * @file dirauth_config.h
+ * @brief Header for feature/dirauth/dirauth_config.c
+ **/
+
+#ifndef TOR_FEATURE_DIRAUTH_DIRAUTH_CONFIG_H
+#define TOR_FEATURE_DIRAUTH_DIRAUTH_CONFIG_H
+
+typedef struct or_options_t or_options_t;
+
+int options_validate_dirauth_mode(const or_options_t *old_options,
+ or_options_t *options,
+ char **msg);
+
+int options_validate_dirauth_schedule(const or_options_t *old_options,
+ or_options_t *options,
+ char **msg);
+
+int options_validate_dirauth_testing(const or_options_t *old_options,
+ or_options_t *options,
+ char **msg);
+
+int options_transition_affects_dirauth_timing(
+ const or_options_t *old_options,
+ const or_options_t *new_options);
+
+int options_act_dirauth(const or_options_t *old_options);
+
+#endif /* !defined(TOR_FEATURE_DIRAUTH_DIRAUTH_CONFIG_H) */