diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-07-29 21:54:46 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-07-29 21:54:46 -0400 |
commit | 4727adf591c4f8df115a639f67882578314eea8b (patch) | |
tree | d466d87c8d8f5ca8a7c3c60a1f7828f5030f562c /src/or/microdesc.h | |
parent | a7b12978cee02f1fbd38887350fa8de5c59040bd (diff) | |
parent | da49a7267fee4e36cd1983158cbce7c1aa10e58a (diff) | |
download | tor-4727adf591c4f8df115a639f67882578314eea8b.tar tor-4727adf591c4f8df115a639f67882578314eea8b.tar.gz |
Merge commit 'linus/headers'
Diffstat (limited to 'src/or/microdesc.h')
-rw-r--r-- | src/or/microdesc.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/or/microdesc.h b/src/or/microdesc.h new file mode 100644 index 000000000..2d1a60ad0 --- /dev/null +++ b/src/or/microdesc.h @@ -0,0 +1,37 @@ +/* Copyright (c) 2001 Matej Pfajfar. + * Copyright (c) 2001-2004, Roger Dingledine. + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2010, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +/** + * \file microdesc.h + * \brief Header file for microdesc.c. + **/ + +#ifndef _TOR_MICRODESC_H +#define _TOR_MICRODESC_H + +microdesc_cache_t *get_microdesc_cache(void); + +smartlist_t *microdescs_add_to_cache(microdesc_cache_t *cache, + const char *s, const char *eos, saved_location_t where, + int no_save); +smartlist_t *microdescs_add_list_to_cache(microdesc_cache_t *cache, + smartlist_t *descriptors, saved_location_t where, + int no_save); + +int microdesc_cache_rebuild(microdesc_cache_t *cache); +int microdesc_cache_reload(microdesc_cache_t *cache); +void microdesc_cache_clear(microdesc_cache_t *cache); + +microdesc_t *microdesc_cache_lookup_by_digest256(microdesc_cache_t *cache, + const char *d); + +size_t microdesc_average_size(microdesc_cache_t *cache); + +void microdesc_free(microdesc_t *md); +void microdesc_free_all(void); + +#endif + |