2021-03-12 17:39:23 +01:00
|
|
|
/* Copyright (c) 2018-2021, The Tor Project, Inc. */
|
2018-05-02 19:42:24 +02:00
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
|
|
|
/**
|
2018-09-25 21:39:24 +02:00
|
|
|
* \file authmode.h
|
|
|
|
* \brief Header file for directory authority mode.
|
2018-05-02 19:42:24 +02:00
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef TOR_DIRAUTH_MODE_H
|
|
|
|
#define TOR_DIRAUTH_MODE_H
|
|
|
|
|
2018-09-25 21:39:24 +02:00
|
|
|
#include "feature/relay/router.h"
|
|
|
|
|
2018-05-02 19:42:24 +02:00
|
|
|
#ifdef HAVE_MODULE_DIRAUTH
|
|
|
|
|
2018-09-25 21:39:24 +02:00
|
|
|
int authdir_mode(const or_options_t *options);
|
2019-12-16 19:20:31 +01:00
|
|
|
int authdir_mode_v3(const or_options_t *options);
|
2018-09-25 21:39:24 +02:00
|
|
|
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);
|
2018-05-02 19:42:24 +02:00
|
|
|
|
2019-10-20 10:01:52 +02:00
|
|
|
/* Is the dirauth module enabled? */
|
2019-05-09 17:26:13 +02:00
|
|
|
#define have_module_dirauth() (1)
|
|
|
|
|
2019-09-30 14:57:37 +02:00
|
|
|
#else /* !defined(HAVE_MODULE_DIRAUTH) */
|
2018-05-02 19:42:24 +02:00
|
|
|
|
2018-09-25 21:39:24 +02:00
|
|
|
#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)
|
2018-05-02 19:42:24 +02:00
|
|
|
|
2019-05-09 17:26:13 +02:00
|
|
|
#define have_module_dirauth() (0)
|
|
|
|
|
2019-06-05 15:33:35 +02:00
|
|
|
#endif /* defined(HAVE_MODULE_DIRAUTH) */
|
2018-05-02 19:42:24 +02:00
|
|
|
|
2019-06-05 15:33:35 +02:00
|
|
|
#endif /* !defined(TOR_DIRAUTH_MODE_H) */
|