summaryrefslogtreecommitdiff
path: root/src/feature/relay/relay_config.h
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-10-30 15:30:11 +1000
committerteor <teor@torproject.org>2019-10-31 12:34:20 +1000
commitfc5da4ad048af372b7765aa0d10acba05bc6d2dc (patch)
tree9672286b62eccab898e29ec9cff063d69d70e341 /src/feature/relay/relay_config.h
parent6d03c0566568f4a56efb4aea2f32bcd86c090a22 (diff)
downloadtor-fc5da4ad048af372b7765aa0d10acba05bc6d2dc.tar.gz
tor-fc5da4ad048af372b7765aa0d10acba05bc6d2dc.zip
config: Move relay config actions into the relay module
This commit: * moves relay config actions into relay_config, * moves get_dirportfrontpage() into relay_config, * adds thin wrappers to make the moved code compile. No functional changes: the moved code is still enabled, even if the relay module is disabled. (Some of the checks are re-ordered, so the order of some warnings may change.) Part of 32213.
Diffstat (limited to 'src/feature/relay/relay_config.h')
-rw-r--r--src/feature/relay/relay_config.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/feature/relay/relay_config.h b/src/feature/relay/relay_config.h
index 83ff3a2a81..3a9ea418ba 100644
--- a/src/feature/relay/relay_config.h
+++ b/src/feature/relay/relay_config.h
@@ -18,6 +18,12 @@
typedef struct or_options_t or_options_t;
typedef struct smartlist_t smartlist_t;
+MOCK_DECL(const char*, get_dirportfrontpage, (void));
+void relay_config_free_all(void);
+
+uint32_t get_effective_bwrate(const or_options_t *options);
+uint32_t get_effective_bwburst(const or_options_t *options);
+
int parse_ports_relay(or_options_t *options,
char **msg,
smartlist_t *ports_out,
@@ -44,8 +50,6 @@ int options_validate_relay_padding(const or_options_t *old_options,
int options_validate_relay_bandwidth(const or_options_t *old_options,
or_options_t *options,
char **msg);
-uint32_t get_effective_bwrate(const or_options_t *options);
-uint32_t get_effective_bwburst(const or_options_t *options);
int options_validate_relay_accounting(const or_options_t *old_options,
or_options_t *options,
@@ -59,6 +63,18 @@ int options_validate_relay_testing(const or_options_t *old_options,
or_options_t *options,
char **msg);
+int options_act_relay(const or_options_t *old_options);
+int options_act_relay_accounting(const or_options_t *old_options);
+int options_act_relay_bandwidth(const or_options_t *old_options);
+int options_act_bridge_stats(const or_options_t *old_options);
+int options_act_relay_stats(const or_options_t *old_options,
+ bool *print_notice_out);
+void options_act_relay_stats_msg(void);
+
+int options_act_relay_desc(const or_options_t *old_options);
+int options_act_relay_dos(const or_options_t *old_options);
+int options_act_relay_dir(const or_options_t *old_options);
+
#ifdef RELAY_CONFIG_PRIVATE
STATIC int check_bridge_distribution_setting(const char *bd);