or_connection_t Struct Reference

#include <or.h>


Data Fields

connection_t _base
char identity_digest [DIGEST_LEN]
char * nickname
tor_tls_ttls
int tls_error
time_t client_used
tor_addr_t real_addr
circ_id_type_t circ_id_type:2
unsigned int is_canonical:1
unsigned int is_bad_for_new_circs:1
uint8_t link_proto
circid_t next_circ_id
or_handshake_state_thandshake_state
time_t timestamp_lastempty
time_t timestamp_last_added_nonpadding
int bandwidthrate
int bandwidthburst
int read_bucket
int write_bucket
int n_circuits
struct circuit_tactive_circuits
smartlist_tactive_circuit_pqueue
unsigned active_circuit_pqueue_last_recalibrated
struct or_connection_tnext_with_same_id


Detailed Description

Subtype of connection_t for an "OR connection" -- that is, one that speaks cells over TLS.

Field Documentation

Last tor_tls error code.

Referenced by connection_about_to_close_connection(), and connection_read_to_buf().

When we last used this conn for any client traffic. If not recent, we can rate limit it further.

Referenced by circuit_deliver_create_cell(), command_process_relay_cell(), and relay_send_command_from_edge().

The actual address that this connection came from or went to. The addr field is prone to getting overridden by the address from the router descriptor matching identity_digest.

Referenced by command_process_netinfo_cell(), connection_exit_begin_conn(), connection_or_get_for_extend(), connection_or_group_set_badness(), and connection_or_init_conn_from_address().

When we send CREATE cells along this connection, which half of the space should we use?

Referenced by command_process_create_cell(), connection_or_check_valid_tls_handshake(), and get_unique_circ_id_by_conn().

Should this connection be used for extending circuits to the server matching the identity_digest field? Set to true if we're pretty sure we aren't getting MITMed, either because we're connected to an address listed in a server descriptor, or because an authenticated NETINFO cell listed the address we're connected to as recognized.

Referenced by command_process_netinfo_cell(), connection_or_get_for_extend(), connection_or_group_set_badness(), connection_or_init_conn_from_address(), and connection_or_is_better().

True iff this connection shouldn't get any new circs attached to it, because the connection is too old, or because there's a better one, etc.

Referenced by circuit_build_failed(), connection_or_get_for_extend(), connection_or_group_set_badness(), and run_connection_housekeeping().

Which circ_id do we try to use next on this connection? This is always in the range 0..1<<15-1.

Referenced by get_unique_circ_id_by_conn(), and or_connection_new().

When was the outbuf last completely empty?

Referenced by run_connection_housekeeping().

When did we last add a non-padding cell to the outbuf? Bytes/s added to the bucket. (OPEN ORs only.)

Referenced by connection_bucket_refill(), and connection_or_init_conn_from_address().

Max bucket size for this conn. (OPEN ORs only.)

Referenced by connection_bucket_refill(), connection_bucket_should_increase(), and connection_or_init_conn_from_address().

When this hits 0, stop receiving. Every second we add 'bandwidthrate' to this, capping it at bandwidthburst. (OPEN ORs only)

Referenced by connection_bucket_read_limit(), connection_bucket_refill(), connection_buckets_decrement(), and connection_or_init_conn_from_address().

How many circuits use this connection as p_conn or n_conn ?

Referenced by connection_or_is_better(), control_event_or_conn_status(), HT_HEAD(), and run_connection_housekeeping().

Double-linked ring of circuits with queued cells waiting for room to free up on this connection's outbuf. Every time we pull cells from a circuit, we advance this pointer to the next circuit in the ring.

Referenced by assert_active_circuits_ok(), connection_or_flush_from_first_active_circuit(), connection_or_flushed_some(), connection_or_unlink_all_active_circs(), make_circuit_active_on_conn(), and make_circuit_inactive_on_conn().

Priority queue of cell_ewma_t for circuits with queued cells waiting for room to free up on this connection's outbuf. Kept in heap order according to EWMA.

This is redundant with active_circuits; if we ever decide only to use the cell_ewma algorithm for choosing circuits, we can remove active_circuits.

Referenced by _connection_free(), add_cell_ewma_to_conn(), assert_active_circuits_ok(), connection_or_flush_from_first_active_circuit(), connection_or_unlink_all_active_circs(), or_connection_new(), pop_first_cell_ewma_from_conn(), remove_cell_ewma_from_conn(), and scale_active_circuits().

The tick on which the cell_ewma_ts in active_circuit_pqueue last had their ewma values rescaled.

Referenced by add_cell_ewma_to_conn(), connection_or_flush_from_first_active_circuit(), or_connection_new(), and scale_active_circuits().


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

Generated on Tue May 25 00:31:16 2010 for tor by  doxygen 1.5.6