1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
/* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2020, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* @file dircache_stub.c
* @brief Stub declarations for use when dircache module is disabled.
**/
#include "core/or/or.h"
#include "feature/dircache/consdiffmgr.h"
#include "feature/dircache/dircache.h"
#include "feature/dircache/dirserv.h"
#include "feature/dircommon/dir_connection_st.h"
int
directory_handle_command(dir_connection_t *conn)
{
(void) conn;
tor_assert_nonfatal_unreached_once();
return -1;
}
int
connection_dirserv_flushed_some(dir_connection_t *conn)
{
(void) conn;
tor_assert_nonfatal_unreached_once();
return -1;
}
int
directory_fetches_from_authorities(const or_options_t *options)
{
(void) options;
return 0;
}
int
directory_fetches_dir_info_early(const or_options_t *options)
{
(void) options;
return 0;
}
int
directory_fetches_dir_info_later(const or_options_t *options)
{
(void) options;
return 0;
}
int
directory_caches_unknown_auth_certs(const or_options_t *options)
{
(void) options;
return 0;
}
int
directory_caches_dir_info(const or_options_t *options)
{
(void) options;
return 0;
}
int
directory_permits_begindir_requests(const or_options_t *options)
{
(void) options;
return 0;
}
int
directory_too_idle_to_fetch_descriptors(const or_options_t *options,
time_t now)
{
(void)options;
(void)now;
return 0;
}
cached_dir_t *
dirserv_get_consensus(const char *flavor_name)
{
(void) flavor_name;
return NULL;
}
void
dir_conn_clear_spool(dir_connection_t *conn)
{
if (!conn)
return;
tor_assert_nonfatal_once(conn->spool == NULL);
}
void
consdiffmgr_enable_background_compression(void)
{
}
void
dirserv_set_cached_consensus_networkstatus(const char *networkstatus,
size_t networkstatus_len,
const char *flavor_name,
const common_digests_t *digests,
const uint8_t *sha3_as_signed,
time_t published)
{
(void)networkstatus;
(void)networkstatus_len;
(void)flavor_name;
(void)digests;
(void)sha3_as_signed;
(void)published;
}
int
consdiffmgr_add_consensus(const char *consensus,
size_t consensus_len,
const networkstatus_t *as_parsed)
{
(void)consensus;
(void)consensus_len;
(void)as_parsed;
return 0;
}
int
consdiffmgr_register_with_sandbox(struct sandbox_cfg_elem_t **cfg)
{
(void)cfg;
return 0;
}
int
consdiffmgr_cleanup(void)
{
return 0;
}
void
consdiffmgr_free_all(void)
{
}
void
dirserv_free_all(void)
{
}
|