aboutsummaryrefslogtreecommitdiff
path: root/src/feature/relay/relay_config.h
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-10-29 14:00:55 +1000
committerteor <teor@torproject.org>2019-10-31 12:34:19 +1000
commit0722b4fdb92337c58a96ed3538d922f394572ee0 (patch)
tree73f1cef35db1bf98fdf173198ce6a88ec21225c5 /src/feature/relay/relay_config.h
parentf70633d72db303376423ab427160ddca912e0a6b (diff)
downloadtor-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.h25
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) */