21 DIR_SPOOL_SERVER_BY_DIGEST=1, DIR_SPOOL_SERVER_BY_FP,
22 DIR_SPOOL_EXTRA_BY_DIGEST, DIR_SPOOL_EXTRA_BY_FP,
24 DIR_SPOOL_NETWORKSTATUS,
25 DIR_SPOOL_CONSENSUS_CACHE_ENTRY,
27 #define dir_spool_source_bitfield_t ENUM_BF(dir_spool_source_t)
66 const uint8_t *cce_body;
83 #ifdef HAVE_MODULE_DIRCACHE
85 #define have_module_dircache() (1)
92 const char *flavor_name,
94 const uint8_t *sha3_as_signed,
97 #define have_module_dircache() (0)
98 #define directory_caches_unknown_auth_certs(opt) \
100 #define directory_caches_dir_info(opt) \
102 #define directory_permits_begindir_requests(opt) \
104 #define dirserv_get_consensus(flav) \
106 #define dirserv_set_cached_consensus_networkstatus(a,b,c,d,e,f) \
117 void dirserv_clear_old_networkstatuses(time_t cutoff);
120 int conn_is_encrypted,
121 const char **msg_out);
128 const uint8_t *digest,
133 #define spooled_resource_free(sp) \
134 FREE_AND_NULL(spooled_resource_t, spooled_resource_free_, (sp))
cached_dir_t * dirserv_get_consensus(const char *flavor_name)
int directory_caches_dir_info(const or_options_t *options)
int directory_caches_unknown_auth_certs(const or_options_t *options)
int directory_permits_begindir_requests(const or_options_t *options)
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 cached_dir_decref(cached_dir_t *d)
void dirserv_spool_sort(dir_connection_t *conn)
cached_dir_t * new_cached_dir(char *s, time_t published)
int dirserv_get_routerdesc_spool(smartlist_t *spools_out, const char *key, dir_spool_source_t source, int conn_is_encrypted, const char **msg_out)
void dirserv_spool_remove_missing_and_guess_size(dir_connection_t *conn, time_t cutoff, int compression, size_t *size_out, int *n_expired_out)
void spooled_resource_free_(spooled_resource_t *spooled)
spooled_resource_t * spooled_resource_new_from_cache_entry(struct consensus_cache_entry_t *entry)
void dir_conn_clear_spool(dir_connection_t *conn)
void dirserv_free_all(void)
int connection_dirserv_flushed_some(dir_connection_t *conn)
int dir_split_resource_into_spoolable(const char *resource, enum dir_spool_source_t source, smartlist_t *spool_out, int *compressed_out, int flags)
dir_spool_source_bitfield_t spool_source
uint8_t digest[DIGEST256_LEN]
struct consensus_cache_entry_t * consensus_cache_entry
struct cached_dir_t * cached_dir_ref
Macros to implement mocking and selective exposure for the test code.
#define MOCK_DECL(rv, funcname, arglist)