summaryrefslogtreecommitdiff
path: root/src/or/rendcache.h
diff options
context:
space:
mode:
authorDonncha O'Cearbhaill <donncha@donncha.is>2015-08-03 17:33:28 +0200
committerDonncha O'Cearbhaill <donncha@donncha.is>2015-09-08 12:34:05 +0200
commit5dc2cbafefa9c15fd5c96707b1e5bde0c59b6132 (patch)
tree680628ca9dfc49d8afd88931503b21ad13a8025a /src/or/rendcache.h
parent580673cf9487389a55c9c0efea54b818ec272d9c (diff)
downloadtor-5dc2cbafefa9c15fd5c96707b1e5bde0c59b6132.tar.gz
tor-5dc2cbafefa9c15fd5c96707b1e5bde0c59b6132.zip
Specify descriptor cache type in rend_cache_lookup_entry()
Adds an Enum which represents the different types of rendezvous descriptor caches. This argument is passed in each call to rend_cache_lookup_entry() to specify lookup in the client-side or service-side descriptor caches.
Diffstat (limited to 'src/or/rendcache.h')
-rw-r--r--src/or/rendcache.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/rendcache.h b/src/or/rendcache.h
index 02eab4ba70..e13c9b4d1d 100644
--- a/src/or/rendcache.h
+++ b/src/or/rendcache.h
@@ -48,6 +48,11 @@ typedef struct rend_cache_failure_t {
digestmap_t *intro_failures;
} rend_cache_failure_t;
+typedef enum {
+ REND_CACHE_TYPE_CLIENT = 1,
+ REND_CACHE_TYPE_SERVICE = 2,
+} rend_cache_type_t;
+
void rend_cache_init(void);
void rend_cache_clean(time_t now);
void rend_cache_failure_clean(time_t now);
@@ -56,7 +61,7 @@ void rend_cache_purge(void);
void rend_cache_free_all(void);
int rend_cache_lookup_entry(const char *query, int version,
rend_cache_entry_t **entry_out,
- int service);
+ rend_cache_type_t cache);
int rend_cache_lookup_v2_desc_as_dir(const char *query, const char **desc);
/** Return value from rend_cache_store_v2_desc_as_{dir,client}. */
typedef enum {