Tor  0.4.7.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]
 
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
 

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

◆ 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 64 of file or_circuit_st.h.

◆ crypto

Cryptographic state used for encrypting and authenticating relay cells to and from this hop.

Definition at line 46 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 92 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 83 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 87 of file or_circuit_st.h.

◆ n_streams

edge_connection_t* n_streams

Linked list of Exit streams associated with this circuit.

Definition at line 39 of file or_circuit_st.h.

Referenced by circuit_expire_old_circuits_serverside(), and set_streams_blocked_on_circ().

◆ 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 74 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 57 of file or_circuit_st.h.

◆ rend_circ_nonce

char rend_circ_nonce[DIGEST_LEN]

Stores KH for the handshake.

Definition at line 53 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 50 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.

Definition at line 42 of file or_circuit_st.h.

Referenced by circuit_expire_old_circuits_serverside(), and circuit_free_all().

◆ 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 79 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 70 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: