aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/directory.h')
-rw-r--r--src/or/directory.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/or/directory.h b/src/or/directory.h
index 61c29baf06..2630705fdb 100644
--- a/src/or/directory.h
+++ b/src/or/directory.h
@@ -39,14 +39,16 @@ typedef enum {
DIRIND_ANON_DIRPORT,
} dir_indirection_t;
-void directory_initiate_command_routerstatus(const routerstatus_t *status,
- uint8_t dir_purpose,
- uint8_t router_purpose,
- dir_indirection_t indirection,
- const char *resource,
- const char *payload,
- size_t payload_len,
- time_t if_modified_since);
+MOCK_DECL(void, directory_initiate_command_routerstatus,
+ (const routerstatus_t *status,
+ uint8_t dir_purpose,
+ uint8_t router_purpose,
+ dir_indirection_t indirection,
+ const char *resource,
+ const char *payload,
+ size_t payload_len,
+ time_t if_modified_since));
+
void directory_initiate_command_routerstatus_rend(const routerstatus_t *status,
uint8_t dir_purpose,
uint8_t router_purpose,
@@ -101,7 +103,8 @@ time_t download_status_increment_attempt(download_status_t *dls,
* the optional status code <b>sc</b>. */
#define download_status_failed(dls, sc) \
download_status_increment_failure((dls), (sc), NULL, \
- get_options()->DirPort_set, time(NULL))
+ dir_server_mode(get_options()), \
+ time(NULL))
void download_status_reset(download_status_t *dls);
static int download_status_is_ready(download_status_t *dls, time_t now,
@@ -146,6 +149,13 @@ STATIC int connection_dir_would_close_consensus_conn_helper(void);
STATIC int download_status_schedule_get_delay(download_status_t *dls,
const smartlist_t *schedule,
time_t now);
+
+STATIC char* authdir_type_to_string(dirinfo_type_t auth);
+STATIC const char * dir_conn_purpose_to_string(int purpose);
+STATIC int should_use_directory_guards(const or_options_t *options);
+STATIC zlib_compression_level_t choose_compression_level(ssize_t n_bytes);
+STATIC const smartlist_t *find_dl_schedule(download_status_t *dls,
+ const or_options_t *options);
#endif
#endif