aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendcache.h
diff options
context:
space:
mode:
authorOla Bini <ola@olabini.se>2015-09-15 16:21:50 +0200
committerOla Bini <ola@olabini.se>2015-09-15 16:21:50 +0200
commitade5005853c17b3ae5923c194680442e0f86db4d (patch)
tree5f49844c3e2062b99468fb2d2d0a4bf5224d6b58 /src/or/rendcache.h
parenta444b11323799536b4cd7902e29f711b0806293a (diff)
downloadtor-ade5005853c17b3ae5923c194680442e0f86db4d.tar.gz
tor-ade5005853c17b3ae5923c194680442e0f86db4d.zip
Add tests for the rend cache
Diffstat (limited to 'src/or/rendcache.h')
-rw-r--r--src/or/rendcache.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/or/rendcache.h b/src/or/rendcache.h
index 0512058054..8ba1f6ffde 100644
--- a/src/or/rendcache.h
+++ b/src/or/rendcache.h
@@ -76,5 +76,20 @@ void rend_cache_intro_failure_note(rend_intro_point_failure_t failure,
const char *service_id);
void rend_cache_failure_purge(void);
-#endif /* TOR_RENDCACHE_H */
+#ifdef RENDCACHE_PRIVATE
+STATIC size_t rend_cache_entry_allocation(const rend_cache_entry_t *e);
+STATIC void rend_cache_entry_free(rend_cache_entry_t *e);
+STATIC void rend_cache_failure_intro_entry_free(rend_cache_failure_intro_t *entry);
+STATIC void rend_cache_failure_entry_free(rend_cache_failure_t *entry);
+STATIC int cache_failure_intro_lookup(const uint8_t *identity, const char *service_id, rend_cache_failure_intro_t **intro_entry);
+STATIC void rend_cache_decrement_allocation(size_t n);
+STATIC void rend_cache_increment_allocation(size_t n);
+STATIC rend_cache_failure_intro_t *rend_cache_failure_intro_entry_new(rend_intro_point_failure_t failure);
+STATIC rend_cache_failure_t *rend_cache_failure_entry_new(void);
+STATIC void rend_cache_failure_remove(rend_service_descriptor_t *desc);
+STATIC void cache_failure_intro_add(const uint8_t *identity, const char *service_id, rend_intro_point_failure_t failure);
+STATIC void validate_intro_point_failure(const rend_service_descriptor_t *desc, const char *service_id);
+#endif
+
+#endif /* TOR_RENDCACHE_H */