From d5ca56e2543fb988de34b10d1d868c2c2e96cd51 Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 29 Oct 2019 17:54:18 +1000 Subject: config: Move accounting/bandwidth config into the relay module This commit: * moves accounting and bandwidth checks into relay_config, * moves testing options checks into relay_config, * moves some other minor checks into relay_config, * exposes some code from src/app/config.c (we'll refactor it 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 relay module is disabled. (Some of the checks are re-ordered, so the order of some warnings may change.) Part of 32213. --- src/feature/relay/relay_config.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/feature/relay/relay_config.h') diff --git a/src/feature/relay/relay_config.h b/src/feature/relay/relay_config.h index 93fcd4acb3..83ff3a2a81 100644 --- a/src/feature/relay/relay_config.h +++ b/src/feature/relay/relay_config.h @@ -44,11 +44,21 @@ 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, + char **msg); int options_validate_relay_mode(const or_options_t *old_options, or_options_t *options, char **msg); +int options_validate_relay_testing(const or_options_t *old_options, + or_options_t *options, + char **msg); + #ifdef RELAY_CONFIG_PRIVATE STATIC int check_bridge_distribution_setting(const char *bd); -- cgit v1.2.3-54-g00ecf