10 #define TOR_HS_CACHE_H 14 #include "crypto_ed25519.h" 22 #define HS_CACHE_CLIENT_INTRO_STATE_MAX_AGE (2 * 60) 30 unsigned int error : 1;
33 unsigned int timed_out : 1;
36 uint32_t unreachable_count;
42 digest256map_t *intro_points;
67 void hs_cache_init(
void);
68 void hs_cache_free_all(
void);
69 void hs_cache_clean_as_dir(time_t now);
70 size_t hs_cache_handle_oom(time_t now,
size_t min_remove_bytes);
72 unsigned int hs_cache_get_max_descriptor_size(
void);
77 int hs_cache_store_as_dir(
const char *desc);
78 int hs_cache_lookup_as_dir(uint32_t version,
const char *query,
79 const char **desc_out);
87 void hs_cache_clean_as_client(time_t now);
88 void hs_cache_purge_as_client(
void);
93 rend_intro_point_failure_t failure);
97 void hs_cache_client_intro_state_clean(time_t now);
98 void hs_cache_client_intro_state_purge(
void);
100 #ifdef HS_CACHE_PRIVATE 103 typedef struct hs_cache_client_descriptor_t {
110 time_t expiration_ts;
118 } hs_cache_client_descriptor_t;
120 STATIC
size_t cache_clean_v3_as_dir(time_t now, time_t global_cutoff);
122 STATIC hs_cache_client_descriptor_t *
123 lookup_v3_desc_as_client(
const uint8_t *key);
Header file for rendcommon.c.
Definition: hs_descriptor.h:152
const char * hs_cache_lookup_encoded_as_client(const ed25519_public_key_t *key)
Definition: hs_cache.c:724
Header file containing common data for the whole HS subsytem.
Definition: crypto_ed25519.h:23
Definition: hs_descriptor.h:185
Definition: hs_cache.h:47
Definition: hs_cache.h:25
Header file for hs_descriptor.c.
Definition: hs_cache.h:39
const hs_descriptor_t * hs_cache_lookup_as_client(const ed25519_public_key_t *key)
Definition: hs_cache.c:742
int hs_cache_store_as_client(const char *desc_str, const ed25519_public_key_t *identity_pk)
Definition: hs_cache.c:760