diff options
Diffstat (limited to 'src/or/directory.h')
-rw-r--r-- | src/or/directory.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/or/directory.h b/src/or/directory.h index 1458ad2cc7..51e6ed384d 100644 --- a/src/or/directory.h +++ b/src/or/directory.h @@ -16,9 +16,10 @@ int directories_have_accepted_server_descriptor(void); void directory_post_to_dirservers(uint8_t dir_purpose, uint8_t router_purpose, dirinfo_type_t type, const char *payload, size_t payload_len, size_t extrainfo_len); -void directory_get_from_dirserver(uint8_t dir_purpose, uint8_t router_purpose, - const char *resource, - int pds_flags); +MOCK_DECL(void, directory_get_from_dirserver, (uint8_t dir_purpose, + uint8_t router_purpose, + const char *resource, + int pds_flags)); void directory_get_from_all_authorities(uint8_t dir_purpose, uint8_t router_purpose, const char *resource); @@ -120,7 +121,11 @@ int download_status_get_n_failures(const download_status_t *dls); #ifdef TOR_UNIT_TESTS /* Used only by directory.c and test_dir.c */ + STATIC int parse_http_url(const char *headers, char **url); +STATIC int purpose_needs_anonymity(uint8_t dir_purpose, uint8_t router_purpose); +STATIC dirinfo_type_t dir_fetch_type(int dir_purpose, int router_purpose, + const char *resource); #endif #endif |