#include <or.h>
Data Fields | |
connection_t | _base |
struct edge_connection_t * | next_stream |
struct crypt_path_t * | cpath_layer |
int | package_window |
int | deliver_window |
char * | chosen_exit_name |
socks_request_t * | socks_request |
struct circuit_t * | on_circuit |
uint32_t | address_ttl |
streamid_t | stream_id |
uint16_t | end_reason |
uint32_t | n_read |
uint32_t | n_written |
rend_data_t * | rend_data |
uint8_t | num_socks_retries |
unsigned int | is_dns_request:1 |
unsigned int | want_onehop:1 |
unsigned int | use_begindir:1 |
unsigned int | edge_has_sent_end:1 |
unsigned int | edge_blocked_on_circ:1 |
unsigned int | chosen_exit_optional:1 |
unsigned int | chosen_exit_retries:3 |
struct evdns_server_request * | dns_server_request |
struct edge_connection_t* edge_connection_t::next_stream [read] |
Points to the next stream at this edge, if any
Referenced by _circuit_mark_for_close(), assert_circuit_ok(), circuit_consider_stop_edge_reading(), circuit_detach_stream(), circuit_dump_by_conn(), circuit_free_all(), circuit_resume_edge_reading_helper(), circuit_truncated(), connection_exit_begin_conn(), connection_exit_connect_dir(), dns_found_answer(), dns_resolve(), get_unique_stream_id_by_circ(), link_apconn_to_circ(), relay_lookup_conn(), and set_streams_blocked_on_circ().
struct crypt_path_t* edge_connection_t::cpath_layer [read] |
A pointer to which node in the circ this conn exits at.
Referenced by assert_connection_ok(), circuit_consider_stop_edge_reading(), circuit_detach_stream(), circuit_resume_edge_reading_helper(), connection_ap_expire_beginning(), connection_ap_handshake_attach_circuit(), connection_edge_consider_sending_sendme(), connection_edge_destroy(), connection_edge_package_raw_inbuf(), connection_edge_send_command(), connection_exit_begin_conn(), link_apconn_to_circ(), and relay_lookup_conn().
How many more relay cells can I send into the circuit?
Referenced by circuit_resume_edge_reading_helper(), connection_ap_handshake_send_begin(), connection_edge_finished_connecting(), connection_edge_package_raw_inbuf(), connection_edge_process_relay_cell(), and connection_exit_begin_conn().
How many more relay cells can end at me?
Referenced by connection_ap_handshake_send_begin(), connection_edge_consider_sending_sendme(), connection_edge_process_relay_cell(), and connection_exit_begin_conn().
Nickname of planned exit node -- used with .exit support.
Referenced by _connection_free(), assert_connection_ok(), circuit_discard_optional_exit_enclaves(), circuit_get_open_circ_or_launch(), circuit_is_acceptable(), connection_ap_can_use_exit(), connection_ap_fail_onehop(), connection_ap_handshake_attach_circuit(), connection_ap_handshake_socks_resolved(), connection_ap_make_link(), connection_ap_process_end_not_open(), connection_edge_process_relay_cell_not_open(), handle_control_attachstream(), and write_stream_target_to_buf().
SOCKS structure describing request (AP only.)
Referenced by _connection_free(), _connection_mark_unattached_ap(), assert_connection_ok(), circuit_discard_optional_exit_enclaves(), circuit_get_open_circ_or_launch(), circuit_is_acceptable(), circuit_stream_is_being_handled(), connection_about_to_close_connection(), connection_ap_can_use_exit(), connection_ap_expire_beginning(), connection_ap_fail_onehop(), connection_ap_handshake_attach_chosen_circuit(), connection_ap_handshake_attach_circuit(), connection_ap_handshake_process_socks(), connection_ap_handshake_rewrite_and_attach(), connection_ap_handshake_send_begin(), connection_ap_handshake_send_resolve(), connection_ap_handshake_socks_reply(), connection_ap_handshake_socks_resolved(), connection_ap_make_link(), connection_ap_process_end_not_open(), connection_ap_process_natd(), connection_ap_process_transparent(), connection_edge_process_relay_cell(), connection_edge_process_relay_cell_not_open(), connection_edge_reached_eof(), connection_handle_read_impl(), consider_recording_trackhost(), control_event_stream_status(), directory_all_unreachable(), dnsserv_launch_request(), dnsserv_resolved(), edge_connection_new(), evdns_server_callback(), getinfo_helper_events(), handle_control_redirectstream(), remap_event_helper(), tell_controller_about_resolved_result(), and write_stream_target_to_buf().
struct circuit_t* edge_connection_t::on_circuit [read] |
The circuit (if any) that this edge connection is using.
Referenced by _circuit_mark_for_close(), circuit_detach_stream(), circuit_get_by_edge_conn(), connection_ap_handshake_send_begin(), connection_ap_handshake_send_resolve(), connection_edge_destroy(), connection_edge_send_command(), connection_exit_begin_conn(), connection_exit_begin_resolve(), connection_exit_connect_dir(), dns_found_answer(), dns_resolve(), and link_apconn_to_circ().
uint32_t edge_connection_t::address_ttl |
TTL for address-to-addr mapping on exit connection. Exit connections only.
Referenced by connection_edge_end(), connection_edge_finished_connecting(), connection_exit_connect(), dns_found_answer(), dns_resolve_impl(), send_resolved_cell(), and send_resolved_hostname_cell().
The stream ID used for this edge connection on its circuit
Referenced by connection_ap_handshake_send_begin(), connection_ap_handshake_send_resolve(), connection_edge_process_relay_cell(), connection_edge_send_command(), connection_exit_begin_conn(), connection_exit_begin_resolve(), get_unique_stream_id_by_circ(), and relay_lookup_conn().
uint16_t edge_connection_t::end_reason |
The reason why this connection is closing; passed to the controller.
Referenced by _circuit_mark_for_close(), _connection_mark_unattached_ap(), conn_write_callback(), connection_about_to_close_connection(), connection_ap_expire_beginning(), connection_edge_destroy(), connection_edge_end(), connection_edge_package_raw_inbuf(), connection_edge_process_relay_cell(), connection_edge_process_relay_cell_not_open(), connection_edge_send_command(), and handle_control_attachstream().
uint32_t edge_connection_t::n_read |
Bytes read since last call to control_event_stream_bandwidth_used()
Referenced by connection_read_to_buf(), control_event_stream_bandwidth(), and control_event_stream_bandwidth_used().
uint32_t edge_connection_t::n_written |
Bytes written since last call to control_event_stream_bandwidth_used()
Referenced by connection_handle_write_impl(), control_event_stream_bandwidth(), and control_event_stream_bandwidth_used().
What rendezvous service are we querying for? (AP only)
Referenced by _connection_free(), circuit_get_open_circ_or_launch(), circuit_is_acceptable(), connection_ap_handshake_attach_circuit(), connection_edge_is_rendezvous_stream(), connection_exit_begin_conn(), and rend_client_desc_trynow().
Number of times we've reassigned this application connection to a new circuit. We keep track because the timeout is longer if we've already retried several times.
Referenced by compute_retry_timeout(), and connection_ap_expire_beginning().
unsigned int edge_connection_t::is_dns_request |
True iff this connection is for a DNS request only.
Referenced by connection_ap_handshake_socks_resolved(), control_event_stream_status(), dnsserv_launch_request(), and evdns_server_callback().
unsigned int edge_connection_t::want_onehop |
True iff this stream must attach to a one-hop circuit (e.g. for begin_dir).
Referenced by circuit_get_open_circ_or_launch(), circuit_is_acceptable(), connection_ap_fail_onehop(), connection_ap_handshake_attach_circuit(), and connection_ap_make_link().
unsigned int edge_connection_t::use_begindir |
True iff this stream should use a BEGIN_DIR relay command to establish itself rather than BEGIN (either via onehop or via a whole circuit).
Referenced by circuit_get_open_circ_or_launch(), connection_ap_can_use_exit(), connection_ap_detach_retriable(), connection_ap_handshake_attach_chosen_circuit(), connection_ap_handshake_send_begin(), connection_ap_make_link(), and control_event_stream_status().
unsigned int edge_connection_t::edge_has_sent_end |
For debugging; only used on edge connections. Set once we've set the stream end, and check in connection_about_to_close_connection().
Referenced by _circuit_mark_for_close(), _connection_mark_unattached_ap(), conn_write_callback(), connection_about_to_close_connection(), connection_ap_expire_beginning(), connection_edge_destroy(), connection_edge_end(), connection_edge_process_relay_cell(), connection_edge_process_relay_cell_not_open(), connection_edge_send_command(), and handle_control_attachstream().
unsigned int edge_connection_t::edge_blocked_on_circ |
True iff we've blocked reading until the circuit has fewer queued cells.
Referenced by set_streams_blocked_on_circ().
unsigned int edge_connection_t::chosen_exit_optional |
For AP connections only. If 1, and we fail to reach the chosen exit, stop requiring it.
Referenced by assert_connection_ok(), circuit_discard_optional_exit_enclaves(), circuit_get_open_circ_or_launch(), connection_ap_handshake_attach_circuit(), and connection_ap_process_end_not_open().
unsigned int edge_connection_t::chosen_exit_retries |
For AP connections only. If non-zero, this exit node was picked as a result of the TrackHostExit, and the value decrements every time we fail to complete a circuit to our chosen exit -- if it reaches zero, abandon the associated mapaddress.
Referenced by assert_connection_ok(), circuit_discard_optional_exit_enclaves(), and connection_ap_process_end_not_open().
struct evdns_server_request* edge_connection_t::dns_server_request [read] |
If this is a DNSPort connection, this field holds the pending DNS request that we're going to try to answer.
Referenced by connection_about_to_close_connection(), connection_ap_handshake_socks_resolved(), dnsserv_reject_request(), dnsserv_resolved(), and evdns_server_callback().