diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-25 15:39:24 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-25 15:39:24 -0400 |
commit | 70539e3d5e357521616a083a69712605b7b98c23 (patch) | |
tree | 86de66335cd30e0e29111c65286eccd74a7cac76 /src/feature/dirauth/authmode.h | |
parent | 9385b7ec5f6effce97ae26aa6cda08df5b90309b (diff) | |
download | tor-70539e3d5e357521616a083a69712605b7b98c23.tar.gz tor-70539e3d5e357521616a083a69712605b7b98c23.zip |
Move all authdir_mode_*() functions into authmode.h
Diffstat (limited to 'src/feature/dirauth/authmode.h')
-rw-r--r-- | src/feature/dirauth/authmode.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/feature/dirauth/authmode.h b/src/feature/dirauth/authmode.h index 8bb961dffb..3ca127b829 100644 --- a/src/feature/dirauth/authmode.h +++ b/src/feature/dirauth/authmode.h @@ -2,16 +2,22 @@ /* See LICENSE for licensing information */ /** - * \file mode.h - * \brief Standalone header file for directory authority mode. + * \file authmode.h + * \brief Header file for directory authority mode. **/ #ifndef TOR_DIRAUTH_MODE_H #define TOR_DIRAUTH_MODE_H +#include "feature/relay/router.h" + #ifdef HAVE_MODULE_DIRAUTH -#include "feature/relay/router.h" +int authdir_mode(const or_options_t *options); +int authdir_mode_handles_descs(const or_options_t *options, int purpose); +int authdir_mode_publishes_statuses(const or_options_t *options); +int authdir_mode_tests_reachability(const or_options_t *options); +int authdir_mode_bridge(const or_options_t *options); /* Return true iff we believe ourselves to be a v3 authoritative directory * server. */ @@ -23,16 +29,14 @@ authdir_mode_v3(const or_options_t *options) #else /* HAVE_MODULE_DIRAUTH */ -/* Without the dirauth module, we can't be a v3 directory authority, ever. */ - -static inline int -authdir_mode_v3(const or_options_t *options) -{ - (void) options; - return 0; -} +#define authdir_mode(options) (((void)(options)),0) +#define authdir_mode_handles_descs(options,purpose) \ + (((void)(options)),((void)(purpose)),0) +#define authdir_mode_publishes_statuses(options) (((void)(options)),0) +#define authdir_mode_tests_reachability(options) (((void)(options)),0) +#define authdir_mode_bridge(options) (((void)(options)),0) +#define authdir_mode_v3(options) (((void)(options)),0) #endif /* HAVE_MODULE_DIRAUTH */ #endif /* TOR_MODE_H */ - |