Tor 0.4.9.3-alpha-dev
Loading...
Searching...
No Matches
Data Fields
entry_connection_t Struct Reference

#include <entry_connection_st.h>

Data Fields

struct edge_connection_t edge_
 
char * chosen_exit_name
 
socks_request_tsocks_request
 
entry_port_cfg_t entry_cfg
 
unsigned nym_epoch
 
char * original_dest_address
 
uint8_t num_socks_retries
 
struct buf_t * pending_optimistic_data
 
struct buf_t * sending_optimistic_data
 
struct evdns_server_request * dns_server_request
 
uint16_t marked_pending_circ_line
 
const char * marked_pending_circ_file
 
unsigned int num_circuits_launched:4
 
unsigned int want_onehop:1
 
unsigned int use_begindir:1
 
unsigned int chosen_exit_optional:1
 
unsigned int chosen_exit_retries:3
 
unsigned int is_transparent_ap:1
 
unsigned int may_use_optimistic_data: 1
 
unsigned int hs_with_pow_conn: 1
 

Detailed Description

Subtype of edge_connection_t for an "entry connection" – that is, a SOCKS connection, a DNS request, a TransPort connection or a NATD connection

Definition at line 19 of file entry_connection_st.h.

Field Documentation

◆ chosen_exit_name

char* chosen_exit_name

◆ chosen_exit_optional

unsigned int chosen_exit_optional

◆ chosen_exit_retries

unsigned int 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.

Definition at line 88 of file entry_connection_st.h.

Referenced by assert_connection_ok(), circuit_discard_optional_exit_enclaves(), connection_ap_handshake_rewrite_and_attach(), and connection_ap_process_end_not_open().

◆ dns_server_request

struct evdns_server_request* dns_server_request

If this is a DNSPort connection, this field holds the pending DNS request that we're going to try to answer.

Definition at line 58 of file entry_connection_st.h.

Referenced by connection_ap_about_to_close(), connection_ap_handshake_socks_resolved(), dnsserv_reject_request(), dnsserv_resolved(), and evdns_server_callback().

◆ edge_

struct edge_connection_t edge_

Definition at line 20 of file entry_connection_st.h.

◆ entry_cfg

entry_port_cfg_t entry_cfg

Definition at line 31 of file entry_connection_st.h.

◆ hs_with_pow_conn

unsigned int hs_with_pow_conn

True iff this is a connection to a HS that has PoW defenses enabled, so we know not to apply the usual SOCKS timeout.

Definition at line 102 of file entry_connection_st.h.

Referenced by connection_ap_expire_beginning(), connection_ap_handle_onion(), and connection_ap_handshake_attach_circuit().

◆ is_transparent_ap

unsigned int is_transparent_ap

True iff this is an AP connection that came from a transparent or NATd connection

Definition at line 92 of file entry_connection_st.h.

Referenced by connection_ap_handshake_rewrite_and_attach(), and connection_init_accepted_conn().

◆ marked_pending_circ_file

const char* marked_pending_circ_file

Definition at line 64 of file entry_connection_st.h.

◆ marked_pending_circ_line

uint16_t marked_pending_circ_line

Definition at line 63 of file entry_connection_st.h.

◆ may_use_optimistic_data

unsigned int may_use_optimistic_data

For AP connections only: Set if this connection's target exit node allows optimistic data (that is, data sent on this stream before the exit has sent a CONNECTED cell) and we have chosen to use it.

Definition at line 98 of file entry_connection_st.h.

Referenced by circuit_detach_stream(), connection_ap_supports_optimistic_data(), and link_apconn_to_circ().

◆ num_circuits_launched

unsigned int num_circuits_launched

Number of times we've launched a circuit to handle this stream. If it gets too high, that could indicate an inconsistency between our "launch a circuit to handle this stream" logic and our "attach our stream to one of the available circuits" logic.

Definition at line 72 of file entry_connection_st.h.

Referenced by circuit_get_open_circ_or_launch().

◆ num_socks_retries

uint8_t num_socks_retries

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.

Definition at line 45 of file entry_connection_st.h.

Referenced by compute_retry_timeout(), and connection_ap_expire_beginning().

◆ nym_epoch

unsigned nym_epoch

◆ original_dest_address

char* original_dest_address

AP only: The original requested address before we rewrote it.

Definition at line 36 of file entry_connection_st.h.

Referenced by connection_ap_make_link(), connection_edge_compatible_with_circuit(), connection_edge_update_circuit_isolation(), connection_free_minimal(), and dnsserv_launch_request().

◆ pending_optimistic_data

struct buf_t* pending_optimistic_data

For AP connections only: buffer for data that we have sent optimistically, which we might need to re-send if we have to retry this connection.

Definition at line 50 of file entry_connection_st.h.

Referenced by connection_ap_detach_retriable(), connection_edge_package_raw_inbuf(), connection_edge_process_relay_cell_not_open(), and connection_free_minimal().

◆ sending_optimistic_data

struct buf_t* sending_optimistic_data

Definition at line 54 of file entry_connection_st.h.

◆ socks_request

socks_request_t* socks_request

SOCKS structure describing request (AP only.)

Definition at line 27 of file entry_connection_st.h.

Referenced by adjust_exit_policy_from_exitpolicy_failure(), assert_connection_ok(), circuit_discard_optional_exit_enclaves(), circuit_get_open_circ_or_launch(), circuit_is_acceptable(), circuit_stream_is_being_handled(), client_desc_missing_bad_client_auth(), client_dir_fetch_404(), connection_ap_about_to_close(), connection_ap_can_use_exit(), connection_ap_expire_beginning(), connection_ap_fail_onehop(), connection_ap_get_begincell_flags(), 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_got_resolved_cell(), connection_ap_handshake_socks_reply(), connection_ap_handshake_socks_resolved(), connection_ap_make_link(), connection_ap_process_end_not_open(), connection_ap_process_http_connect(), connection_ap_process_natd(), connection_ap_process_transparent(), connection_ap_socks_iso_keepalive_enabled(), connection_edge_compatible_with_circuit(), connection_edge_process_relay_cell_not_open(), connection_edge_process_resolved_cell(), connection_edge_reached_eof(), connection_edge_update_circuit_isolation(), connection_free_minimal(), connection_handle_read_impl(), connection_handle_write_impl(), connection_init_accepted_conn(), connection_mark_unattached_ap_(), consider_recording_trackhost(), control_event_stream_status(), directory_all_unreachable_cb(), dnsserv_launch_request(), dnsserv_resolved(), entry_connection_describe_status_for_controller(), entry_connection_new(), evdns_server_callback(), getinfo_helper_events(), handle_control_redirectstream(), handle_relay_msg(), link_apconn_to_circ(), remap_event_helper(), socks_mark_introduction_failed(), socks_mark_rend_circuit_timed_out(), tell_controller_about_resolved_result(), and write_stream_target_to_buf().

◆ use_begindir

unsigned int use_begindir

◆ want_onehop

unsigned int want_onehop

True iff this stream must attach to a one-hop circuit (e.g. for begin_dir).

Definition at line 76 of file entry_connection_st.h.

Referenced by ap_stream_wants_exit_attention(), circuit_get_open_circ_or_launch(), circuit_is_acceptable(), connection_ap_fail_onehop(), connection_ap_handshake_attach_circuit(), and connection_ap_make_link().


The documentation for this struct was generated from the following file: