Send control port events for timeouts.
[tor.git] / src / or / microdesc.h
blob2d1a60ad0a5cf1d508ee2c3d9001d97f14615f1e
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 */
7 /**
8 * \file microdesc.h
9 * \brief Header file for microdesc.c.
10 **/
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,
19 int no_save);
20 smartlist_t *microdescs_add_list_to_cache(microdesc_cache_t *cache,
21 smartlist_t *descriptors, saved_location_t where,
22 int no_save);
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,
29 const char *d);
31 size_t microdesc_average_size(microdesc_cache_t *cache);
33 void microdesc_free(microdesc_t *md);
34 void microdesc_free_all(void);
36 #endif