diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-25 16:00:50 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-25 16:00:50 -0400 |
commit | fcd0f76134c2e1e420b1379906955d41e8a6df66 (patch) | |
tree | fbd6c587332809a461f50271bd4c8bdd12bdfeef /src/feature/relay/routermode.h | |
parent | 70539e3d5e357521616a083a69712605b7b98c23 (diff) | |
download | tor-fcd0f76134c2e1e420b1379906955d41e8a6df66.tar.gz tor-fcd0f76134c2e1e420b1379906955d41e8a6df66.zip |
Extract all the "am I a server" functions from router.c
Diffstat (limited to 'src/feature/relay/routermode.h')
-rw-r--r-- | src/feature/relay/routermode.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/feature/relay/routermode.h b/src/feature/relay/routermode.h new file mode 100644 index 0000000000..1442d706dd --- /dev/null +++ b/src/feature/relay/routermode.h @@ -0,0 +1,24 @@ +/* Copyright (c) 2001 Matej Pfajfar. + * Copyright (c) 2001-2004, Roger Dingledine. + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2018, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +/** + * \file routermode.h + * \brief Header file for routermode.c. + **/ + +#ifndef TOR_ROUTERMODE_H +#define TOR_ROUTERMODE_H + +int dir_server_mode(const or_options_t *options); + +MOCK_DECL(int, server_mode, (const or_options_t *options)); +MOCK_DECL(int, public_server_mode, (const or_options_t *options)); +MOCK_DECL(int, advertised_server_mode, (void)); +int proxy_mode(const or_options_t *options); + +void set_server_advertised(int s); + +#endif /* !defined(TOR_ROUTERMODE_H) */ |