diff options
author | teor <teor@torproject.org> | 2019-10-29 16:25:08 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-10-31 12:34:20 +1000 |
commit | 11f283f56139e823d77942276d6229d6c39abd9f (patch) | |
tree | a297d945b76c4d34303cd1ac959c5f917fd059bf /src/feature/relay/transport_config.h | |
parent | 093a127c82a06546029e42cf0030edf43fb5f87b (diff) | |
download | tor-11f283f56139e823d77942276d6229d6c39abd9f.tar.gz tor-11f283f56139e823d77942276d6229d6c39abd9f.zip |
config: Move server transport config into the relay module
This commit:
* creates feature/relay/transport_config.[ch],
* moves server transport config checks 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. (Some of the checks
are re-ordered, so the order of some warnings may change.)
Part of 32213.
Diffstat (limited to 'src/feature/relay/transport_config.h')
-rw-r--r-- | src/feature/relay/transport_config.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/feature/relay/transport_config.h b/src/feature/relay/transport_config.h new file mode 100644 index 0000000000..6ef1bc4020 --- /dev/null +++ b/src/feature/relay/transport_config.h @@ -0,0 +1,27 @@ +/* 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 transport_config.h + * @brief Header for feature/relay/transport_config.c + **/ + +#ifndef TOR_FEATURE_RELAY_TRANSPORT_CONFIG_H +#define TOR_FEATURE_RELAY_TRANSPORT_CONFIG_H + +typedef struct or_options_t or_options_t; +typedef struct smartlist_t smartlist_t; + +char *get_transport_bindaddr_from_config(const char *transport); +smartlist_t *get_options_from_transport_options_line(const char *line, + const char *transport); +smartlist_t *get_options_for_server_transport(const char *transport); + +int options_validate_server_transport(const or_options_t *old_options, + or_options_t *options, + char **msg); + +#endif /* !defined(TOR_FEATURE_RELAY_TRANSPORT_CONFIG_H) */ |