aboutsummaryrefslogtreecommitdiff
path: root/src/lib/subsys
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-10-30 09:28:34 -0400
committerNick Mathewson <nickm@torproject.org>2019-11-07 07:28:43 -0500
commit7ac4f9d5ec1b31a0d4b76ab62c1afc039c8fe627 (patch)
tree865fb327567676c3c84cc25c7b2ab119f0ec837e /src/lib/subsys
parenta7cfddc8d18c39be8fb212ee2a96da2d1905d9c8 (diff)
downloadtor-7ac4f9d5ec1b31a0d4b76ab62c1afc039c8fe627.tar.gz
tor-7ac4f9d5ec1b31a0d4b76ab62c1afc039c8fe627.zip
Give subsystems optional config formats and state formats.
The formats, when provided, are now added to the global config_mgr_t objects.
Diffstat (limited to 'src/lib/subsys')
-rw-r--r--src/lib/subsys/subsys.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/subsys/subsys.h b/src/lib/subsys/subsys.h
index 91abdb7d74..1cb3fe94a5 100644
--- a/src/lib/subsys/subsys.h
+++ b/src/lib/subsys/subsys.h
@@ -14,6 +14,7 @@
#include <stdbool.h>
struct pubsub_connector_t;
+struct config_format_t;
/**
* A subsystem is a part of Tor that is initialized, shut down, configured,
@@ -88,6 +89,18 @@ typedef struct subsys_fns_t {
**/
void (*shutdown)(void);
+ /**
+ * A config_format_t describing all of the torrc fields owned by this
+ * subsystem.
+ **/
+ const struct config_format_t *options_format;
+
+ /**
+ * A config_format_t describing all of the DataDir/state fields owned by
+ * this subsystem.
+ **/
+ const struct config_format_t *state_format;
+
} subsys_fns_t;
/**