tor
master
tor
src
or
dirauth
mode.h
Go to the documentation of this file.
1
/* Copyright (c) 2018, The Tor Project, Inc. */
2
/* See LICENSE for licensing information */
3
9
#ifndef TOR_DIRAUTH_MODE_H
10
#define TOR_DIRAUTH_MODE_H
11
12
#ifdef HAVE_MODULE_DIRAUTH
13
14
#include "
router.h
"
15
16
/* Return true iff we believe ourselves to be a v3 authoritative directory
17
* server. */
18
static
inline
int
19
authdir_mode_v3(
const
or_options_t
*options)
20
{
21
return
authdir_mode
(options) && options->
V3AuthoritativeDir
!= 0;
22
}
23
24
#else
/* HAVE_MODULE_DIRAUTH */
25
26
/* Without the dirauth module, we can't be a v3 directory authority, ever. */
27
28
static
inline
int
29
authdir_mode_v3(
const
or_options_t
*options)
30
{
31
(void) options;
32
return
0;
33
}
34
35
#endif
/* HAVE_MODULE_DIRAUTH */
36
37
#endif
/* TOR_MODE_H */
38
or_options_t
Definition:
or.h:3657
authdir_mode
int authdir_mode(const or_options_t *options)
Definition:
router.c:1675
router.h
Header file for router.c.
or_options_t::V3AuthoritativeDir
int V3AuthoritativeDir
Definition:
or.h:3820
Generated by
1.8.13