Tor 0.4.9.1-alpha-dev
|
#include <origin_circuit_st.h>
An origin_circuit_t holds data necessary to build and use a circuit.
Definition at line 79 of file origin_circuit_st.h.
unsigned int any_hop_from_controller |
If true, this circuit's path has been chosen, in full or in part, by the controller API, and it's okay to ignore checks that we'd usually do on the path as whole.
Definition at line 193 of file origin_circuit_st.h.
uint64_t associated_isolated_stream_global_id |
Global identifier for the first stream attached here; used by ISO_STREAM.
Definition at line 300 of file origin_circuit_st.h.
circuit_t base_ |
Definition at line 80 of file origin_circuit_st.h.
cpath_build_state_t* build_state |
Build state for this circuit. It includes the intended path length, the chosen exit router, rendezvous information, etc.
Definition at line 130 of file origin_circuit_st.h.
Referenced by can_relaunch_service_rendezvous_point(), circuit_append_new_exit(), circuit_build_failed(), circuit_can_be_cannibalized_for_v3_rp(), circuit_describe_status_for_controller(), circuit_list_path_impl(), circuit_timeout_want_to_count_circ(), client_rendezvous_circ_has_opened(), hs_circ_send_introduce1(), hs_client_setup_intro_circ_auth_key(), onion_extend_cpath(), onion_populate_cpath(), origin_circuit_init(), retry_service_rendezvous_point(), and warn_if_last_router_excluded().
int circuit_idle_timeout |
How long do we wait before closing this circuit if it remains completely idle after it was built, in seconds? This value is randomized on a per-circuit basis from CircuitsAvailableTimoeut to 2*CircuitsAvailableTimoeut.
Definition at line 311 of file origin_circuit_st.h.
Referenced by circuit_expire_old_circuits_clientside(), and conflux_sync_circ_fields().
tor_addr_t client_addr |
Definition at line 288 of file origin_circuit_st.h.
uint8_t client_proto_socksver |
Definition at line 286 of file origin_circuit_st.h.
uint8_t client_proto_type |
Definition at line 285 of file origin_circuit_st.h.
crypt_path_t* cpath |
The doubly-linked list of crypt_path_t entries, one per hop, for this circuit. This includes ciphers for each hop, integrity-checking digests for each hop, and package/delivery windows for each hop.
Definition at line 136 of file origin_circuit_st.h.
Referenced by circuit_clear_cpath(), circuit_cpath_supports_ntor(), circuit_get_cpath_hop(), circuit_get_cpath_len(), circuit_get_cpath_opened_len(), circuit_handle_first_hop(), circuit_list_path_impl(), circuit_send_next_onion_skin(), congestion_control_get_control_port_fields(), connection_exit_begin_conn(), cpath_is_on_circuit(), pathbias_count_circs_in_states(), pathbias_count_collapse(), pathbias_count_successful_close(), pathbias_count_timeout(), pathbias_count_use_failed(), pathbias_is_new_circ_attempt(), pathbias_send_usable_probe(), relay_crypt_from_last_hop(), relay_decrypt_cell(), send_establish_intro(), service_rendezvous_circ_has_opened(), and should_use_create_fast_for_circuit().
char* dest_address |
Definition at line 289 of file origin_circuit_st.h.
uint16_t dest_port |
Definition at line 287 of file origin_circuit_st.h.
unsigned first_hop_from_controller |
If this flag is set, then a controller chose the first hop of this circuit's path, and it's okay to ignore checks that we'd usually do on this circuit's first hop.
This flag is distinct from the CIRCUIT_PURPOSE_CONTROLLER purpose: the purpose indicates what tor can use the circuit for. Controller-created circuits can still have the CIRCUIT_PURPOSE_GENERAL purpose if Tor is allowed to attach streams to them.
Definition at line 187 of file origin_circuit_st.h.
uint32_t global_identifier |
Quasi-global identifier for this circuit; used for control.c
Definition at line 252 of file origin_circuit_st.h.
Referenced by circpad_send_command_to_hop(), circpad_send_padding_cell_for_callback(), and format_cell_stats().
int global_origin_circuit_list_idx |
Index into global_origin_circuit_list for this circuit. -1 if not present.
Definition at line 149 of file origin_circuit_st.h.
Referenced by circuit_add_to_origin_circuit_list(), and circuit_remove_from_origin_circuit_list().
struct circuit_guard_state_t* guard_state |
Holds the data that the entry guard system uses to track the status of the guard this circuit is using, and thereby to determine whether this circuit can be used.
Definition at line 145 of file origin_circuit_st.h.
Referenced by circuit_build_no_more_hops(), circuit_expire_waiting_for_better_guard(), entry_guard_chan_failed(), and origin_circuit_get_guard_state().
smartlist_t* half_streams |
Smartlist of half-closed streams (half_edge_t*) that still have pending activity.
Any updates to this pointer must be followed with conflux_update_half_streams().
Definition at line 95 of file origin_circuit_st.h.
Referenced by circuit_free_(), connection_half_edge_add(), connection_half_edges_waiting(), and linked_nullify_streams().
unsigned int has_opened |
Set if this circuit has already been opened. Used to detect cannibalized circuits.
Definition at line 160 of file origin_circuit_st.h.
Referenced by circuit_timeout_want_to_count_circ().
unsigned int hs_currently_solving_pow |
Set iff this intro circ required a pow, and it has already queued the pow with the cpuworker and is awaiting a reply.
Definition at line 227 of file origin_circuit_st.h.
struct hs_ident_circuit_t* hs_ident |
Holds hidden service identifier on either client or service side. This is for both introduction and rendezvous circuit.
Definition at line 140 of file origin_circuit_st.h.
Referenced by circuit_matches_with_rend_stream(), close_or_reextend_intro_circ(), close_service_rp_circuits(), count_service_rp_circuits_pending(), handle_rendezvous2(), hs_circ_is_rend_sent_in_intro1(), hs_circ_retry_service_rendezvous_point(), hs_circ_service_rp_has_opened(), hs_client_circuit_has_opened(), hs_client_close_intro_circuits_from_desc(), hs_client_reextend_intro_circuit(), hs_client_setup_intro_circ_auth_key(), hs_dec_rdv_stream_counter(), hs_inc_rdv_stream_counter(), hs_service_circuit_has_opened(), hs_service_set_conn_addr_port(), pow_worker_replyfn(), send_introduce1(), service_handle_intro_established(), service_handle_introduce2(), service_rendezvous_circ_has_opened(), and setup_rendezvous_circ_congestion_control().
uint32_t hs_pow_effort |
This is nonzero iff hs_with_pow_circ is set and there was a valid proof of work solution associated with this circuit.
Definition at line 217 of file origin_circuit_st.h.
unsigned int hs_with_pow_circ |
Set iff this is a hidden-service circuit for a HS with PoW defenses enabled, so that we know to be more lenient with timing out the circuit-build to allow the service time to work through the queue of requests.
Definition at line 223 of file origin_circuit_st.h.
crypto_pk_t* intro_key |
Definition at line 248 of file origin_circuit_st.h.
unsigned int is_ancient |
Set if this circuit is insanely old and we already informed the user
Definition at line 156 of file origin_circuit_st.h.
unsigned int isolation_any_streams_attached |
True iff any stream has ever been attached to this circuit.
In a better world we could use timestamp_dirty for this, but timestamp_dirty is far too overloaded at the moment.
Definition at line 265 of file origin_circuit_st.h.
Referenced by circuit_clear_isolation(), and circuit_try_clearing_isolation_state().
uint8_t isolation_flags_mixed |
A bitfield of ISO_* flags for every isolation field such that this circuit has had streams with more than one value for that field attached to it.
Definition at line 270 of file origin_circuit_st.h.
Referenced by connection_edge_compatible_with_circuit().
unsigned int isolation_values_set |
True if we have associated one stream to this circuit, thereby setting the isolation parameters for this circuit. Note that this doesn't necessarily mean that we've attached any streams to the circuit: we may only have marked up this circuit during the launch process.
Definition at line 259 of file origin_circuit_st.h.
Referenced by circuit_try_clearing_isolation_state(), and connection_edge_compatible_with_circuit().
uint32_t n_delivered_read_circ_bw |
Total known-valid relay cell bytes since last call to control_event_circ_bandwidth_used(). Only used if we're configured to emit CIRC_BW events.
Definition at line 110 of file origin_circuit_st.h.
Referenced by clear_circ_bw_fields().
uint32_t n_delivered_written_circ_bw |
Total written relay cell bytes since last call to control_event_circ_bandwidth_used(). Only used if we're configured to emit CIRC_BW events.
Definition at line 115 of file origin_circuit_st.h.
Referenced by clear_circ_bw_fields().
uint32_t n_overhead_read_circ_bw |
Total overhead data in all known-valid relay data cells since last call to control_event_circ_bandwidth_used(). Only used if we're configured to emit CIRC_BW events.
Definition at line 120 of file origin_circuit_st.h.
Referenced by clear_circ_bw_fields().
uint32_t n_overhead_written_circ_bw |
Total written overhead data in all relay data cells since last call to control_event_circ_bandwidth_used(). Only used if we're configured to emit CIRC_BW events.
Definition at line 125 of file origin_circuit_st.h.
Referenced by clear_circ_bw_fields().
uint32_t n_read_circ_bw |
Bytes read on this circuit since last call to control_event_circ_bandwidth_used(). Only used if we're configured to emit CIRC_BW events.
Definition at line 100 of file origin_circuit_st.h.
Referenced by clear_circ_bw_fields().
uint32_t n_written_circ_bw |
Bytes written to on this circuit since last call to control_event_circ_bandwidth_used(). Only used if we're configured to emit CIRC_BW events.
Definition at line 105 of file origin_circuit_st.h.
Referenced by clear_circ_bw_fields().
streamid_t next_stream_id |
The next stream_id that will be tried when we're attempting to construct a new AP stream originating at this circuit.
Definition at line 243 of file origin_circuit_st.h.
Referenced by conflux_sync_circ_fields(), and get_unique_stream_id_by_circ().
unsigned nym_epoch |
Definition at line 291 of file origin_circuit_st.h.
edge_connection_t* p_streams |
Linked list of AP streams (or EXIT streams if hidden service) associated with this circuit.
Any updates to this pointer must be followed with conflux_update_p_streams().
Definition at line 87 of file origin_circuit_st.h.
Referenced by append_cell_to_circuit_queue(), circpad_circuit_state(), circuit_detach_stream(), linked_nullify_streams(), set_circuit_blocked_on_chan(), and socks_mark_rend_circuit_timed_out().
unsigned padding_negotiation_failed |
Definition at line 175 of file origin_circuit_st.h.
path_state_bitfield_t path_state |
Path bias state machine. Used to ensure integrity of our circuit building and usage accounting. See path_state_t for more details.
Definition at line 167 of file origin_circuit_st.h.
Referenced by pathbias_check_close(), pathbias_count_circs_in_states(), pathbias_count_timeout(), pathbias_count_use_attempt(), pathbias_count_use_success(), pathbias_mark_use_rollback(), and pathbias_mark_use_success().
streamid_t pathbias_probe_id |
For path probing. Store the temporary probe stream ID for response comparison
Definition at line 209 of file origin_circuit_st.h.
uint32_t pathbias_probe_nonce |
For path probing. Store the temporary probe address nonce (in host byte order) for response comparison.
Definition at line 213 of file origin_circuit_st.h.
uint8_t pathbias_shouldcount |
Tristate variable to guard against pathbias miscounting due to circuit purpose transitions changing the decision of pathbias_should_count(). This variable is informational only. The current results of pathbias_should_count() are the official decision for pathbias accounting.
Definition at line 202 of file origin_circuit_st.h.
smartlist_t* prepend_policy |
A list of addr_policy_t for this circuit in particular. Used by adjust_exit_policy_from_exitpolicy_failure.
Definition at line 305 of file origin_circuit_st.h.
unsigned int relaxed_timeout |
Set iff this circuit has been given a relaxed timeout because no circuits have opened. Used to prevent spamming logs.
Definition at line 231 of file origin_circuit_st.h.
Referenced by circuit_is_better().
int relay_early_cells_sent |
How many RELAY_EARLY cells have been sent over this circuit? This is for debugging task 878, too.
Definition at line 239 of file origin_circuit_st.h.
uint8_t relay_early_commands[MAX_RELAY_EARLY_CELLS_PER_CIRCUIT] |
What commands were sent over this circuit that decremented the RELAY_EARLY counter? This is for debugging task 878.
Definition at line 235 of file origin_circuit_st.h.
unsigned int remaining_relay_early_cells |
How many more relay_early cells can we send on this circuit, according to the specification?
Definition at line 153 of file origin_circuit_st.h.
int session_group |
Definition at line 290 of file origin_circuit_st.h.
char* socks_password |
Definition at line 297 of file origin_circuit_st.h.
uint8_t socks_password_len |
Definition at line 293 of file origin_circuit_st.h.
char* socks_username |
Definition at line 296 of file origin_circuit_st.h.
size_t socks_username_len |
Definition at line 292 of file origin_circuit_st.h.
unsigned int unusable_for_new_conns |
Definition at line 171 of file origin_circuit_st.h.