1 /* Copyright (c) 2018-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
6 * \brief Header file for directory authority mode.
9 #ifndef TOR_DIRAUTH_MODE_H
10 #define TOR_DIRAUTH_MODE_H
12 #include "feature/relay/router.h"
14 #ifdef HAVE_MODULE_DIRAUTH
16 int authdir_mode(const or_options_t
*options
);
17 int authdir_mode_v3(const or_options_t
*options
);
18 int authdir_mode_handles_descs(const or_options_t
*options
, int purpose
);
19 int authdir_mode_publishes_statuses(const or_options_t
*options
);
20 int authdir_mode_tests_reachability(const or_options_t
*options
);
21 int authdir_mode_bridge(const or_options_t
*options
);
23 /* Is the dirauth module enabled? */
24 #define have_module_dirauth() (1)
26 #else /* !defined(HAVE_MODULE_DIRAUTH) */
28 #define authdir_mode(options) (((void)(options)),0)
29 #define authdir_mode_handles_descs(options,purpose) \
30 (((void)(options)),((void)(purpose)),0)
31 #define authdir_mode_publishes_statuses(options) (((void)(options)),0)
32 #define authdir_mode_tests_reachability(options) (((void)(options)),0)
33 #define authdir_mode_bridge(options) (((void)(options)),0)
34 #define authdir_mode_v3(options) (((void)(options)),0)
36 #define have_module_dirauth() (0)
38 #endif /* defined(HAVE_MODULE_DIRAUTH) */
40 #endif /* !defined(TOR_DIRAUTH_MODE_H) */