diff options
author | teor <teor@torproject.org> | 2019-10-29 17:54:18 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-10-31 12:34:20 +1000 |
commit | d5ca56e2543fb988de34b10d1d868c2c2e96cd51 (patch) | |
tree | 7a78bbe0aae9e3b269ddf6a3e1310157ff8ea88e /src/feature/relay/relay_config.h | |
parent | 11f283f56139e823d77942276d6229d6c39abd9f (diff) | |
download | tor-d5ca56e2543fb988de34b10d1d868c2c2e96cd51.tar.gz tor-d5ca56e2543fb988de34b10d1d868c2c2e96cd51.zip |
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.
Diffstat (limited to 'src/feature/relay/relay_config.h')
-rw-r--r-- | src/feature/relay/relay_config.h | 10 |
1 files changed, 10 insertions, 0 deletions
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); |