aboutsummaryrefslogtreecommitdiff
path: root/src/or/microdesc.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-05-11 17:20:33 -0400
committerNick Mathewson <nickm@torproject.org>2010-09-27 18:04:44 -0400
commit3a492d31d5c50ef3b766881ae1d765c296d55797 (patch)
treec4ae30aa130eb1ed56c38cae719d15dc4f09e7b2 /src/or/microdesc.h
parente34d0d3365f5263d2888d63a4d58dc479f191565 (diff)
downloadtor-3a492d31d5c50ef3b766881ae1d765c296d55797.tar
tor-3a492d31d5c50ef3b766881ae1d765c296d55797.tar.gz
Download microdescriptors if you're a cache
This commit adds some functions to see what microdescriptors we're missing, and adds fetch-microdesc/store-microdesc logic to the directory code.
Diffstat (limited to 'src/or/microdesc.h')
-rw-r--r--src/or/microdesc.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/or/microdesc.h b/src/or/microdesc.h
index 2d1a60ad0..7cba3a385 100644
--- a/src/or/microdesc.h
+++ b/src/or/microdesc.h
@@ -16,7 +16,8 @@ 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);
+ int no_save, time_t listed_at,
+ smartlist_t *requested_digests256);
smartlist_t *microdescs_add_list_to_cache(microdesc_cache_t *cache,
smartlist_t *descriptors, saved_location_t where,
int no_save);
@@ -30,8 +31,16 @@ microdesc_t *microdesc_cache_lookup_by_digest256(microdesc_cache_t *cache,
size_t microdesc_average_size(microdesc_cache_t *cache);
+smartlist_t *microdesc_list_missing_digest256(networkstatus_t *ns,
+ microdesc_cache_t *cache,
+ int downloadable_only,
+ digestmap_t *skip);
+
void microdesc_free(microdesc_t *md);
void microdesc_free_all(void);
+void update_microdesc_downloads(time_t now);
+
+
#endif