Tor 0.4.9.0-alpha-dev
Data Fields
or_circuit_t Struct Reference

#include <or_circuit_st.h>

Data Fields

circuit_t base_
 
struct onion_queue_tonionqueue_entry
 
struct workqueue_entry_tworkqueue_entry
 
circid_t p_circ_id
 
cell_queue_t p_chan_cells
 
channel_tp_chan
 
edge_connection_tn_streams
 
edge_connection_tresolving_streams
 
relay_crypto_t crypto
 
struct or_circuit_trend_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
 

Detailed Description

An or_circuit_t holds information needed to implement a circuit at an OR.

Definition at line 21 of file or_circuit_st.h.

Field Documentation

◆ already_received_introduce1

unsigned int already_received_introduce1

Definition at line 72 of file or_circuit_st.h.

◆ base_

circuit_t base_

Definition at line 22 of file or_circuit_st.h.

◆ circuit_carries_hs_traffic_stats

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.

◆ 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 relay_encrypt_cell_inbound().

◆ introduce2_bucket

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.

◆ introduce2_dos_defense_enabled

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 hs_dos_can_send_intro2(), hs_dos_setup_default_intro2_defenses(), and update_intro_circuits().

◆ introduce2_dos_defense_explicit

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.

◆ n_cells_discarded_at_end

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.

◆ n_streams

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 circuit_expire_old_circuits_serverside(), conflux_update_n_streams(), linked_nullify_streams(), and set_circuit_blocked_on_chan().

◆ onionqueue_entry

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_pending_remove().

◆ p_chan

channel_t* p_chan

◆ p_chan_cells

cell_queue_t p_chan_cells

◆ p_circ_id

circid_t p_circ_id

◆ processed_cells

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 rep_hist_buffer_stats_add_circ().

◆ remaining_relay_early_cells

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.

◆ rend_circ_nonce

char rend_circ_nonce[DIGEST_LEN]

Stores KH for the handshake.

Definition at line 61 of file or_circuit_st.h.

◆ rend_splice

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 circuit_expire_old_circuits_serverside().

◆ resolving_streams

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 circuit_expire_old_circuits_serverside(), circuit_free_all(), conflux_update_resolving_streams(), and linked_nullify_streams().

◆ stream_limiter

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.

◆ total_cell_waiting_time

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 rep_hist_buffer_stats_add_circ().

◆ used_legacy_circuit_handshake

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.

◆ workqueue_entry

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 cpuworker_cancel_circ_handshake().


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