|
Tor 0.4.9.3-alpha-dev
|
#include <or_circuit_st.h>
Data Fields | |
| circuit_t | base_ |
| struct onion_queue_t * | onionqueue_entry |
| struct workqueue_entry_t * | workqueue_entry |
| circid_t | p_circ_id |
| cell_queue_t | p_chan_cells |
| channel_t * | p_chan |
| edge_connection_t * | n_streams |
| edge_connection_t * | resolving_streams |
| relay_crypto_t | crypto |
| struct or_circuit_t * | rend_splice |
| char | rend_circ_nonce [DIGEST_LEN] |
| uint32_t | n_cells_discarded_at_end |
| unsigned int | remaining_relay_early_cells: 4 |
| unsigned int | already_received_introduce1: 1 |
| unsigned int | circuit_carries_hs_traffic_stats: 1 |
| bool | used_legacy_circuit_handshake |
| uint32_t | processed_cells |
| uint64_t | total_cell_waiting_time |
| unsigned int | introduce2_dos_defense_enabled: 1 |
| unsigned int | introduce2_dos_defense_explicit: 1 |
| token_bucket_ctr_t | introduce2_bucket |
| token_bucket_ctr_t | stream_limiter |
| relay_cell_fmt_t | relay_cell_format |
An or_circuit_t holds information needed to implement a circuit at an OR.
Definition at line 21 of file or_circuit_st.h.
| unsigned int already_received_introduce1 |
Definition at line 72 of file or_circuit_st.h.
| circuit_t base_ |
Definition at line 22 of file or_circuit_st.h.
| unsigned int circuit_carries_hs_traffic_stats |
If set, this circuit carries HS traffic. Consider it in any HS statistics.
Definition at line 76 of file or_circuit_st.h.
Referenced by rend_mid_rendezvous().
| relay_crypto_t crypto |
Cryptographic state used for encrypting and authenticating relay cells to and from this hop.
Definition at line 54 of file or_circuit_st.h.
Referenced by assert_circuit_ok(), circuit_free_(), onionskin_answer(), relay_decrypt_cell(), and relay_encrypt_cell_inbound().
| token_bucket_ctr_t introduce2_bucket |
INTRODUCE2 cell bucket controlling how much can go on this circuit. Only used if this is a service introduction circuit at the intro point (purpose = CIRCUIT_PURPOSE_INTRO_POINT).
Definition at line 104 of file or_circuit_st.h.
Referenced by handle_establish_intro_cell_dos_extension(), hs_dos_can_send_intro2(), and hs_dos_setup_default_intro2_defenses().
| unsigned int introduce2_dos_defense_enabled |
If set, the DoS defenses are enabled on this circuit meaning that the introduce2_bucket is initialized and used.
Definition at line 95 of file or_circuit_st.h.
Referenced by handle_establish_intro_cell_dos_extension(), hs_dos_can_send_intro2(), hs_dos_setup_default_intro2_defenses(), and update_intro_circuits().
| unsigned int introduce2_dos_defense_explicit |
If set, the DoS defenses were explicitly enabled through the ESTABLISH_INTRO cell extension. If unset, the consensus is used to learn if the defenses can be enabled or not.
Definition at line 99 of file or_circuit_st.h.
Referenced by handle_establish_intro_cell_dos_extension().
| uint32_t n_cells_discarded_at_end |
Number of cells which we have discarded because of having no next hop, despite not recognizing the cell.
Definition at line 65 of file or_circuit_st.h.
Referenced by circuit_about_to_free(), and circuit_receive_relay_cell().
| edge_connection_t* n_streams |
Linked list of Exit streams associated with this circuit.
Note that any updates to this pointer must be followed with conflux_update_n_streams() to keep the other legs n_streams in sync.
Definition at line 43 of file or_circuit_st.h.
Referenced by append_cell_to_circuit_queue(), assert_circuit_ok(), cfx_add_leg(), circuit_about_to_free(), circuit_consider_stop_edge_reading(), circuit_detach_stream(), circuit_expire_old_circuits_serverside(), conflux_update_n_streams(), conflux_validate_stream_lists(), connection_exit_connect_dir(), dns_resolve(), inform_pending_connections(), linked_nullify_streams(), linked_update_stream_backpointers(), set_circuit_blocked_on_chan(), and validate_circ_has_no_streams().
| struct onion_queue_t* onionqueue_entry |
Pointer to an entry on the onion queue, if this circuit is waiting for a chance to give an onionskin to a cpuworker. Used only in onion.c
Definition at line 26 of file or_circuit_st.h.
Referenced by onion_next_task(), onion_pending_add(), and onion_pending_remove().
| channel_t* p_chan |
The channel that is previous in this circuit.
Definition at line 37 of file or_circuit_st.h.
Referenced by assert_circuit_ok(), assign_onionskin_to_cpuworker(), channel_flush_from_first_active_circuit(), channel_note_destroy_not_pending(), channel_note_destroy_pending(), circuit_about_to_free(), circuit_about_to_free_atexit(), circuit_clear_cell_queue(), circuit_expire_old_circuits_serverside(), circuit_is_suitable_for_introduce1(), circuit_package_relay_cell(), circuit_receive_relay_cell(), circuit_set_p_circid_chan(), circuit_synchronize_written_or_bandwidth(), circuit_unlink_all_from_channel(), circuit_update_channel_usage(), circuitmux_attach_circuit(), circuitmux_detach_circuit(), circuitmux_find_map_entry(), connection_exit_begin_conn(), format_cell_stats(), handle_relay_msg(), onion_pending_add(), onionskin_answer(), rend_mid_establish_rendezvous(), and update_circuit_on_cmux_().
| cell_queue_t p_chan_cells |
Queue of cells waiting to be transmitted on p_conn.
Definition at line 35 of file or_circuit_st.h.
Referenced by append_cell_to_circuit_queue(), channel_flush_from_first_active_circuit(), circuit_clear_cell_queue(), circuit_free_(), circuit_is_queue_full(), circuit_max_queued_cell_age(), circuit_resume_edge_reading_helper(), circuit_synchronize_written_or_bandwidth(), circuitmux_attach_circuit(), congestion_control_update_circuit_bdp(), dump_cell_pool_usage(), marked_circuit_free_cells(), n_cells_in_circ_queues(), or_circuit_new(), and update_circuit_on_cmux_().
| circid_t p_circ_id |
The circuit_id used in the previous (backward) hop of this circuit.
Definition at line 33 of file or_circuit_st.h.
Referenced by assert_circuit_ok(), channel_note_destroy_not_pending(), channel_note_destroy_pending(), circuit_about_to_free(), circuit_dump_by_conn(), circuit_expire_old_circuits_serverside(), circuit_receive_relay_cell(), circuit_set_p_circid_chan(), circuitmux_attach_circuit(), circuitmux_detach_circuit(), circuitmux_find_map_entry(), format_cell_stats(), handle_establish_intro(), handle_establish_intro_cell_dos_extension(), handle_introduce1(), onionskin_answer(), relay_send_command_from_edge_(), rend_mid_establish_rendezvous(), and rend_mid_rendezvous().
| uint32_t processed_cells |
Number of cells that were removed from circuit queue; reset every time when writing buffer stats to disk.
Definition at line 86 of file or_circuit_st.h.
Referenced by channel_flush_from_first_active_circuit(), and rep_hist_buffer_stats_add_circ().
| relay_cell_fmt_t relay_cell_format |
Format to use when exchanging relay cells with the client who built this circuit.
Definition at line 112 of file or_circuit_st.h.
Referenced by circuit_get_relay_format(), and cpuworker_onion_handshake_replyfn().
| 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 69 of file or_circuit_st.h.
Referenced by command_process_relay_cell(), and or_circuit_new().
| char rend_circ_nonce[DIGEST_LEN] |
Stores KH for the handshake.
Definition at line 61 of file or_circuit_st.h.
Referenced by handle_establish_intro(), and onionskin_answer().
| struct or_circuit_t* rend_splice |
Points to spliced circuit if purpose is REND_ESTABLISHED, and circuit is not marked for close.
Definition at line 58 of file or_circuit_st.h.
Referenced by assert_circuit_ok(), circuit_expire_old_circuits_serverside(), circuit_free_(), circuit_mark_for_close_(), circuit_receive_relay_cell(), command_process_relay_cell(), and rend_mid_rendezvous().
| edge_connection_t* resolving_streams |
Linked list of Exit streams associated with this circuit that are still being resolved.
Just like with n_streams, any updates to this pointer must be followed with conflux_update_resolving_streams().
Definition at line 50 of file or_circuit_st.h.
Referenced by cfx_add_leg(), circuit_about_to_free(), circuit_detach_stream(), circuit_expire_old_circuits_serverside(), circuit_free_all(), conflux_update_resolving_streams(), conflux_validate_stream_lists(), dns_resolve(), linked_nullify_streams(), linked_update_stream_backpointers(), and validate_circ_has_no_streams().
| token_bucket_ctr_t stream_limiter |
RELAY_BEGIN and RELAY_RESOLVE cell bucket controlling how much can go on this circuit. Only used if this is the end of a circuit on an exit node.
Definition at line 108 of file or_circuit_st.h.
| uint64_t total_cell_waiting_time |
Total time in milliseconds that cells spent in both app-ward and exit-ward queues of this circuit; reset every time when writing buffer stats to disk.
Definition at line 91 of file or_circuit_st.h.
Referenced by channel_flush_from_first_active_circuit(), and rep_hist_buffer_stats_add_circ().
| bool used_legacy_circuit_handshake |
True iff this circuit was made with a CREATE_FAST cell, or a CREATE[2] cell with a TAP handshake. If this is the case and this is a rend circuit, this is a v2 circuit, otherwise if this is a rend circuit it's a v3 circuit.
Definition at line 82 of file or_circuit_st.h.
Referenced by command_process_create_cell(), and command_process_relay_cell().
| struct workqueue_entry_t* workqueue_entry |
Pointer to a workqueue entry, if this circuit has given an onionskin to a cpuworker and is waiting for a response. Used to decide whether it is safe to free a circuit or if it is still in use by a cpuworker.
Definition at line 30 of file or_circuit_st.h.
Referenced by assign_onionskin_to_cpuworker(), circuit_free_(), cpuworker_cancel_circ_handshake(), and cpuworker_onion_handshake_replyfn().