12 #ifndef TOR_DIRCLIENT_H
13 #define TOR_DIRCLIENT_H
22 size_t payload_len,
size_t extrainfo_len);
25 uint8_t router_purpose,
30 uint8_t router_purpose,
31 const char *resource);
55 #define directory_request_free(req) \
56 FREE_AND_NULL(directory_request_t, directory_request_free_, (req))
63 struct circuit_guard_state_t;
65 struct circuit_guard_state_t *state);
67 uint8_t router_purpose);
71 const char *resource);
76 time_t if_modified_since);
95 #ifdef DIRCLIENT_PRIVATE
114 uint8_t router_purpose;
119 const char *resource;
125 time_t if_modified_since;
133 struct circuit_guard_state_t *guard_state;
138 typedef struct response_handler_args_t {
144 } response_handler_args_t;
157 const response_handler_args_t *args);
159 const response_handler_args_t *args);
162 const response_handler_args_t *args);
165 const char *resource);
STATIC void warn_disallowed_anonymous_compression_method(compress_method_t method)
STATIC int handle_response_fetch_consensus(dir_connection_t *conn, const response_handler_args_t *args)
STATIC int should_use_directory_guards(const or_options_t *options)
STATIC int allowed_anonymous_connection_compression_method(compress_method_t method)
STATIC char * accept_encoding_header(void)
STATIC const char * dir_conn_purpose_to_string(int purpose)
STATIC int handle_response_fetch_hsdesc_v3(dir_connection_t *conn, const response_handler_args_t *args)
STATIC dirinfo_type_t dir_fetch_type(int dir_purpose, int router_purpose, const char *resource)
STATIC int handle_response_fetch_microdesc(dir_connection_t *conn, const response_handler_args_t *args)
void directory_request_set_resource(directory_request_t *req, const char *resource)
void directory_request_set_or_addr_port(directory_request_t *req, const tor_addr_port_t *p)
void directory_get_from_all_authorities(uint8_t dir_purpose, uint8_t router_purpose, const char *resource)
void directory_request_set_if_modified_since(directory_request_t *req, time_t if_modified_since)
void connection_dir_client_request_failed(dir_connection_t *conn)
void directory_request_set_guard_state(directory_request_t *req, struct circuit_guard_state_t *state)
void directory_request_set_dir_addr_port(directory_request_t *req, const tor_addr_port_t *p)
void directory_request_set_routerstatus(directory_request_t *req, const routerstatus_t *rs)
void connection_dir_client_refetch_hsdesc_if_needed(dir_connection_t *dir_conn)
void dirclient_dump_total_dls(void)
void directory_request_set_indirection(directory_request_t *req, dir_indirection_t indirection)
void directory_request_free_(directory_request_t *req)
struct directory_request_t directory_request_t
directory_request_t * directory_request_new(uint8_t dir_purpose)
void directory_request_set_router_purpose(directory_request_t *req, uint8_t router_purpose)
void directory_get_from_dirserver(uint8_t dir_purpose, uint8_t router_purpose, const char *resource, int pds_flags, download_want_authority_t want_authority)
void directory_request_set_directory_id_digest(directory_request_t *req, const char *digest)
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_initiate_request(directory_request_t *request)
void directory_request_set_payload(directory_request_t *req, const char *payload, size_t payload_len)
void directory_request_fetch_set_hs_ident(directory_request_t *req, const hs_ident_dir_conn_t *ident)
int router_supports_extrainfo(const char *identity_digest, int is_authority)
int directories_have_accepted_server_descriptor(void)
void directory_request_add_header(directory_request_t *req, const char *key, const char *val)
void directory_request_upload_set_hs_ident(directory_request_t *req, const hs_ident_dir_conn_t *ident)
Header file containing circuit and connection identifier data for the whole HS subsystem.
download_want_authority_t
#define MOCK_DECL(rv, funcname, arglist)