diff options
author | teor <teor@torproject.org> | 2019-10-29 14:00:55 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-10-31 12:34:19 +1000 |
commit | 0722b4fdb92337c58a96ed3538d922f394572ee0 (patch) | |
tree | 73f1cef35db1bf98fdf173198ce6a88ec21225c5 /src/feature/relay/relay_config.h | |
parent | f70633d72db303376423ab427160ddca912e0a6b (diff) | |
download | tor-0722b4fdb92337c58a96ed3538d922f394572ee0.tar.gz tor-0722b4fdb92337c58a96ed3538d922f394572ee0.zip |
config: Move relay port parsing into the relay module
This commit:
* creates feature/relay/relay_config.[ch],
* moves relay port parsing into them,
* 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.
Part of 32213.
Diffstat (limited to 'src/feature/relay/relay_config.h')
-rw-r--r-- | src/feature/relay/relay_config.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/feature/relay/relay_config.h b/src/feature/relay/relay_config.h new file mode 100644 index 0000000000..1b46e825ad --- /dev/null +++ b/src/feature/relay/relay_config.h @@ -0,0 +1,25 @@ +/* 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 relay_config.h + * @brief Header for feature/relay/relay_config.c + **/ + +#ifndef TOR_FEATURE_RELAY_RELAY_CONFIG_H +#define TOR_FEATURE_RELAY_RELAY_CONFIG_H + +typedef struct or_options_t or_options_t; +typedef struct smartlist_t smartlist_t; + +int parse_ports_relay(or_options_t *options, + char **msg, + smartlist_t *ports_out, + int *have_low_ports_out); +void update_port_set_relay(or_options_t *options, + const smartlist_t *ports); + +#endif /* !defined(TOR_FEATURE_RELAY_RELAY_CONFIG_H) */ |