diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-11-17 09:59:26 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-11-17 09:59:26 -0500 |
commit | fcdec00685608c85161116bdb7408f33094ea3fa (patch) | |
tree | 195124df1f483681f556630f58811bc67645cd7a /src/or/directory.h | |
parent | 94dce246ee97884a546113827404a45d0f16c648 (diff) | |
parent | 9c17a6d28b4acf044f408a0c7211e051e238c797 (diff) | |
download | tor-fcdec00685608c85161116bdb7408f33094ea3fa.tar.gz tor-fcdec00685608c85161116bdb7408f33094ea3fa.zip |
Merge branch 'maint-0.3.2'
Diffstat (limited to 'src/or/directory.h')
-rw-r--r-- | src/or/directory.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/or/directory.h b/src/or/directory.h index 904bdfae46..3aef600716 100644 --- a/src/or/directory.h +++ b/src/or/directory.h @@ -183,6 +183,48 @@ typedef struct response_handler_args_t { const char *headers; } response_handler_args_t; +struct directory_request_t { + /** + * These fields specify which directory we're contacting. Routerstatus, + * if present, overrides the other fields. + * + * @{ */ + tor_addr_port_t or_addr_port; + tor_addr_port_t dir_addr_port; + char digest[DIGEST_LEN]; + + const routerstatus_t *routerstatus; + /** @} */ + /** One of DIR_PURPOSE_* other than DIR_PURPOSE_SERVER. Describes what + * kind of operation we'll be doing (upload/download), and of what kind + * of document. */ + uint8_t dir_purpose; + /** One of ROUTER_PURPOSE_*; used for uploads and downloads of routerinfo + * and extrainfo docs. */ + uint8_t router_purpose; + /** Enum: determines whether to anonymize, and whether to use dirport or + * orport. */ + dir_indirection_t indirection; + /** Alias to the variable part of the URL for this request */ + const char *resource; + /** Alias to the payload to upload (if any) */ + const char *payload; + /** Number of bytes to upload from payload</b> */ + size_t payload_len; + /** Value to send in an if-modified-since header, or 0 for none. */ + time_t if_modified_since; + /** Hidden-service-specific information v2. */ + const rend_data_t *rend_query; + /** Extra headers to append to the request */ + config_line_t *additional_headers; + /** Hidden-service-specific information for v3+. */ + const hs_ident_dir_conn_t *hs_ident; + /** Used internally to directory.c: gets informed when the attempt to + * connect to the directory succeeds or fails, if that attempt bears on the + * directory's usability as a directory guard. */ + struct circuit_guard_state_t *guard_state; +}; + struct get_handler_args_t; STATIC int handle_get_hs_descriptor_v3(dir_connection_t *conn, const struct get_handler_args_t *args); @@ -193,6 +235,8 @@ STATIC void warn_disallowed_anonymous_compression_method(compress_method_t); STATIC int handle_response_fetch_hsdesc_v3(dir_connection_t *conn, const response_handler_args_t *args); +STATIC int handle_response_fetch_microdesc(dir_connection_t *conn, + const response_handler_args_t *args); STATIC int handle_response_fetch_consensus(dir_connection_t *conn, const response_handler_args_t *args); |