summaryrefslogtreecommitdiff
path: root/src/or/config.h
diff options
context:
space:
mode:
authorOla Bini <ola@olabini.se>2015-09-15 18:12:14 +0200
committerOla Bini <ola@olabini.se>2015-09-15 18:12:14 +0200
commit3b535869a4a85358df1fa774bc6a36625e453f22 (patch)
treea25d8533626bc9f8f1942335d805770ccff828d0 /src/or/config.h
parenta444b11323799536b4cd7902e29f711b0806293a (diff)
downloadtor-3b535869a4a85358df1fa774bc6a36625e453f22.tar.gz
tor-3b535869a4a85358df1fa774bc6a36625e453f22.zip
Add tests for parse_port_config
Diffstat (limited to 'src/or/config.h')
-rw-r--r--src/or/config.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/or/config.h b/src/or/config.h
index 0ee1e1a3c4..28d0cb409b 100644
--- a/src/or/config.h
+++ b/src/or/config.h
@@ -14,9 +14,9 @@
#include "testsupport.h"
-const char *get_dirportfrontpage(void);
-MOCK_DECL(const or_options_t *,get_options,(void));
-or_options_t *get_options_mutable(void);
+MOCK_DECL(const char*, get_dirportfrontpage, (void));
+MOCK_DECL(const or_options_t *, get_options, (void));
+MOCK_DECL(or_options_t *, get_options_mutable, (void));
int set_options(or_options_t *new_val, char **msg);
void config_free_all(void);
const char *safe_str_client(const char *address);
@@ -138,6 +138,7 @@ smartlist_t *get_options_for_server_transport(const char *transport);
#ifdef CONFIG_PRIVATE
#ifdef TOR_UNIT_TESTS
extern struct config_format_t options_format;
+STATIC int options_act(const or_options_t *old_options);
#endif
STATIC void or_options_free(or_options_t *options);
@@ -154,7 +155,15 @@ MOCK_DECL(STATIC void, add_default_fallback_dir_servers, (void));
STATIC int
parse_dir_fallback_line(const char *line,
int validate_only);
+STATIC int
+parse_port_config(smartlist_t *out,
+ const config_line_t *ports,
+ const config_line_t *listenaddrs,
+ const char *portname,
+ int listener_type,
+ const char *defaultaddr,
+ int defaultport,
+ const unsigned flags);
#endif
#endif
-