diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2010-07-23 20:04:12 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2010-07-27 07:58:16 +0200 |
commit | 86d6bfe448ec945957b23555f14e79f64896aca9 (patch) | |
tree | 0afd6f7843947ac25df6739d50f5026fef469845 /src/or/microdesc.h | |
parent | 0f1548ab18c09efda944def3597bafc2cd9552c8 (diff) | |
download | tor-86d6bfe448ec945957b23555f14e79f64896aca9.tar.gz tor-86d6bfe448ec945957b23555f14e79f64896aca9.zip |
Create microdesc.h
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 0000000000..2d1a60ad0a --- /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 + |