9 #ifndef TOR_CONSCACHE_H
10 #define TOR_CONSCACHE_H
20 #define consensus_cache_entry_handle_free(h) \
21 FREE_AND_NULL(consensus_cache_entry_handle_t, \
22 consensus_cache_entry_handle_free_, (h))
26 #define consensus_cache_free(cache) \
27 FREE_AND_NULL(consensus_cache_t, consensus_cache_free_, (cache))
28 struct sandbox_cfg_elem_t;
31 struct sandbox_cfg_elem_t **cfg);
66 const uint8_t **body_out,
consensus_cache_entry_t * consensus_cache_add(consensus_cache_t *cache, const config_line_t *labels, const uint8_t *data, size_t datalen)
void consensus_cache_entry_incref(consensus_cache_entry_t *ent)
void consensus_cache_find_all(smartlist_t *out, consensus_cache_t *cache, const char *key, const char *value)
void consensus_cache_delete_pending(consensus_cache_t *cache, int force)
void consensus_cache_entry_mark_for_aggressive_release(consensus_cache_entry_t *ent)
int consensus_cache_get_n_filenames_available(consensus_cache_t *cache)
const char * consensus_cache_entry_get_value(const consensus_cache_entry_t *ent, const char *key)
consensus_cache_entry_t * consensus_cache_find_first(consensus_cache_t *cache, const char *key, const char *value)
int consensus_cache_may_overallocate(consensus_cache_t *cache)
void consensus_cache_free_(consensus_cache_t *cache)
int consensus_cache_register_with_sandbox(consensus_cache_t *cache, struct sandbox_cfg_elem_t **cfg)
void consensus_cache_filter_list(smartlist_t *lst, const char *key, const char *value)
const struct config_line_t * consensus_cache_entry_get_labels(const consensus_cache_entry_t *ent)
void consensus_cache_entry_mark_for_removal(consensus_cache_entry_t *ent)
void consensus_cache_unmap_lazy(consensus_cache_t *cache, time_t cutoff)
void consensus_cache_entry_decref(consensus_cache_entry_t *ent)
int consensus_cache_entry_get_body(const consensus_cache_entry_t *ent, const uint8_t **body_out, size_t *sz_out)
consensus_cache_t * consensus_cache_open(const char *subdir, int max_entries)
Macros for C weak-handle implementation.