diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-07-20 12:55:42 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-07-21 11:15:25 -0400 |
commit | 569fe936b8349082d6f9dcd4e55f7d5758d236be (patch) | |
tree | ec9ea9960da15b0f20dd2805f6fea5fa040ed536 /src/or/connection_edge.h | |
parent | 33e6a3d75054d9dbb945434d9fe5c3f6be162adb (diff) | |
download | tor-569fe936b8349082d6f9dcd4e55f7d5758d236be.tar.gz tor-569fe936b8349082d6f9dcd4e55f7d5758d236be.zip |
Move entry-only fields from edge_connection_t to entry_connection_t
Also, refactor the code accordingly.
Diffstat (limited to 'src/or/connection_edge.h')
-rw-r--r-- | src/or/connection_edge.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/or/connection_edge.h b/src/or/connection_edge.h index 85293a0913..cf60cf4698 100644 --- a/src/or/connection_edge.h +++ b/src/or/connection_edge.h @@ -15,7 +15,7 @@ #define connection_mark_unattached_ap(conn, endreason) \ _connection_mark_unattached_ap((conn), (endreason), __LINE__, _SHORT_FILE_) -void _connection_mark_unattached_ap(edge_connection_t *conn, int endreason, +void _connection_mark_unattached_ap(entry_connection_t *conn, int endreason, int line, const char *file); int connection_edge_reached_eof(edge_connection_t *conn); int connection_edge_process_inbuf(edge_connection_t *conn, @@ -27,22 +27,22 @@ int connection_edge_flushed_some(edge_connection_t *conn); int connection_edge_finished_flushing(edge_connection_t *conn); int connection_edge_finished_connecting(edge_connection_t *conn); -void connection_ap_about_to_close(edge_connection_t *edge_conn); +void connection_ap_about_to_close(entry_connection_t *edge_conn); void connection_exit_about_to_close(edge_connection_t *edge_conn); -int connection_ap_handshake_send_begin(edge_connection_t *ap_conn); -int connection_ap_handshake_send_resolve(edge_connection_t *ap_conn); +int connection_ap_handshake_send_begin(entry_connection_t *ap_conn); +int connection_ap_handshake_send_resolve(entry_connection_t *ap_conn); -edge_connection_t *connection_ap_make_link(connection_t *partner, +entry_connection_t *connection_ap_make_link(connection_t *partner, char *address, uint16_t port, const char *digest, int session_group, int isolation_flags, int use_begindir, int want_onehop); -void connection_ap_handshake_socks_reply(edge_connection_t *conn, char *reply, +void connection_ap_handshake_socks_reply(entry_connection_t *conn, char *reply, size_t replylen, int endreason); -void connection_ap_handshake_socks_resolved(edge_connection_t *conn, +void connection_ap_handshake_socks_resolved(entry_connection_t *conn, int answer_type, size_t answer_len, const uint8_t *answer, @@ -53,17 +53,17 @@ int connection_exit_begin_conn(cell_t *cell, circuit_t *circ); int connection_exit_begin_resolve(cell_t *cell, or_circuit_t *circ); void connection_exit_connect(edge_connection_t *conn); int connection_edge_is_rendezvous_stream(edge_connection_t *conn); -int connection_ap_can_use_exit(const edge_connection_t *conn, +int connection_ap_can_use_exit(const entry_connection_t *conn, const node_t *exit); void connection_ap_expire_beginning(void); void connection_ap_attach_pending(void); void connection_ap_fail_onehop(const char *failed_digest, cpath_build_state_t *build_state); void circuit_discard_optional_exit_enclaves(extend_info_t *info); -int connection_ap_detach_retriable(edge_connection_t *conn, +int connection_ap_detach_retriable(entry_connection_t *conn, origin_circuit_t *circ, int reason); -int connection_ap_process_transparent(edge_connection_t *conn); +int connection_ap_process_transparent(entry_connection_t *conn); int address_is_invalid_destination(const char *address, int client); @@ -88,10 +88,10 @@ void client_dns_set_addressmap(const char *address, uint32_t val, const char *addressmap_register_virtual_address(int type, char *new_address); void addressmap_get_mappings(smartlist_t *sl, time_t min_expires, time_t max_expires, int want_expiry); -int connection_ap_rewrite_and_attach_if_allowed(edge_connection_t *conn, +int connection_ap_rewrite_and_attach_if_allowed(entry_connection_t *conn, origin_circuit_t *circ, crypt_path_t *cpath); -int connection_ap_handshake_rewrite_and_attach(edge_connection_t *conn, +int connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn, origin_circuit_t *circ, crypt_path_t *cpath); @@ -105,11 +105,11 @@ hostname_type_t parse_extended_hostname(char *address, int allowdotexit); int get_pf_socket(void); #endif -int connection_edge_streams_are_compatible(const edge_connection_t *a, - const edge_connection_t *b); -int connection_edge_compatible_with_circuit(const edge_connection_t *conn, +int connection_edge_streams_are_compatible(const entry_connection_t *a, + const entry_connection_t *b); +int connection_edge_compatible_with_circuit(const entry_connection_t *conn, const origin_circuit_t *circ); -int connection_edge_update_circuit_isolation(const edge_connection_t *conn, +int connection_edge_update_circuit_isolation(const entry_connection_t *conn, origin_circuit_t *circ, int dry_run); void circuit_clear_isolation(origin_circuit_t *circ); |