1 /* Copyright (c) 2001 Matej Pfajfar.
2 * Copyright (c) 2001-2004, Roger Dingledine.
3 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4 * Copyright (c) 2007-2010, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
9 * \brief Header file for microdesc.c.
12 #ifndef _TOR_MICRODESC_H
13 #define _TOR_MICRODESC_H
15 microdesc_cache_t
*get_microdesc_cache(void);
17 smartlist_t
*microdescs_add_to_cache(microdesc_cache_t
*cache
,
18 const char *s
, const char *eos
, saved_location_t where
,
20 smartlist_t
*microdescs_add_list_to_cache(microdesc_cache_t
*cache
,
21 smartlist_t
*descriptors
, saved_location_t where
,
24 int microdesc_cache_rebuild(microdesc_cache_t
*cache
);
25 int microdesc_cache_reload(microdesc_cache_t
*cache
);
26 void microdesc_cache_clear(microdesc_cache_t
*cache
);
28 microdesc_t
*microdesc_cache_lookup_by_digest256(microdesc_cache_t
*cache
,
31 size_t microdesc_average_size(microdesc_cache_t
*cache
);
33 void microdesc_free(microdesc_t
*md
);
34 void microdesc_free_all(void);