diff options
author | Donncha O'Cearbhaill <donncha@donncha.is> | 2015-07-29 14:40:29 +0200 |
---|---|---|
committer | Donncha O'Cearbhaill <donncha@donncha.is> | 2015-08-25 16:44:31 +0200 |
commit | 1a75e6da007ddd3207726dc2b1293e22453c81af (patch) | |
tree | dea1d013a4a278c4134d2418fcd55f40be1131e7 /src/or/rendcache.h | |
parent | 5eff39c846a62c1dbe4c0b9988f58e93e1229b98 (diff) | |
download | tor-1a75e6da007ddd3207726dc2b1293e22453c81af.tar.gz tor-1a75e6da007ddd3207726dc2b1293e22453c81af.zip |
Create a service-side descriptor cache
Adds a service descriptor cache which is indexed by service ID. This
descriptor cache is used to store service descriptors generated by a
local rendevous service.
The service-side cach can be queried by calling rend_cache_lookup_entry()
with the 'service' argument set to 1.
Diffstat (limited to 'src/or/rendcache.h')
-rw-r--r-- | src/or/rendcache.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/rendcache.h b/src/or/rendcache.h index 0512058054..02eab4ba70 100644 --- a/src/or/rendcache.h +++ b/src/or/rendcache.h @@ -55,7 +55,8 @@ void rend_cache_clean_v2_descs_as_dir(time_t now, size_t min_to_remove); 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); + rend_cache_entry_t **entry_out, + int service); 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 { @@ -65,6 +66,8 @@ typedef enum { } rend_cache_store_status_t; rend_cache_store_status_t rend_cache_store_v2_desc_as_dir(const char *desc); +rend_cache_store_status_t rend_cache_store_v2_desc_as_service( + const char *desc); rend_cache_store_status_t rend_cache_store_v2_desc_as_client(const char *desc, const char *desc_id_base32, const rend_data_t *rend_query, |