Tor
0.4.7.0-alpha-dev
|
Header file for circuitlist.c. More...
#include "lib/container/handles.h"
#include "lib/testsupport/testsupport.h"
#include "feature/hs/hs_ident.h"
#include "core/or/ocirc_event.h"
Go to the source code of this file.
Header file for circuitlist.c.
Definition in file circuitlist.h.
#define CIRCUIT_IS_ORCIRC | ( | c | ) | (((circuit_t *)(c))->magic == OR_CIRCUIT_MAGIC) |
True iff the circuit_t c is actually an or_circuit_t
Definition at line 154 of file circuitlist.h.
#define CIRCUIT_IS_ORIGIN | ( | c | ) | (CIRCUIT_PURPOSE_IS_ORIGIN((c)->purpose)) |
True iff the circuit_t c is actually an origin_circuit_t.
Definition at line 147 of file circuitlist.h.
#define CIRCUIT_PURPOSE_C_CIRCUIT_PADDING 15 |
This circuit is being held open by circuit padding
Definition at line 95 of file circuitlist.h.
#define CIRCUIT_PURPOSE_C_ESTABLISH_REND 9 |
Client-side circuit purpose: at the client, waiting for ack.
Definition at line 81 of file circuitlist.h.
#define CIRCUIT_PURPOSE_C_GENERAL 5 |
Client-side circuit purpose: Normal circuit, with cpath.
Definition at line 70 of file circuitlist.h.
#define CIRCUIT_PURPOSE_C_HSDIR_GET 13 |
This circuit is used for getting hsdirs
Definition at line 90 of file circuitlist.h.
#define CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT 7 |
Client-side circuit purpose: at the client, sent INTRODUCE1 to intro point, waiting for ACK/NAK.
Definition at line 76 of file circuitlist.h.
#define CIRCUIT_PURPOSE_C_INTRODUCE_ACKED 8 |
Client-side circuit purpose: at the client, introduced and acked, closing.
Definition at line 79 of file circuitlist.h.
#define CIRCUIT_PURPOSE_C_INTRODUCING 6 |
Client-side circuit purpose: at the client, connecting to intro point.
Definition at line 73 of file circuitlist.h.
#define CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT 14 |
This circuit is used for build time measurement only
Definition at line 93 of file circuitlist.h.
#define CIRCUIT_PURPOSE_C_REND_JOINED 12 |
Client-side circuit purpose: at the client, rendezvous established.
Definition at line 88 of file circuitlist.h.
#define CIRCUIT_PURPOSE_C_REND_READY 10 |
Client-side circuit purpose: at the client, waiting for the service.
Definition at line 83 of file circuitlist.h.
#define CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED 11 |
Client-side circuit purpose: at the client, waiting for the service, INTRODUCE has been acknowledged.
Definition at line 86 of file circuitlist.h.
#define CIRCUIT_PURPOSE_CONTROLLER 22 |
A controller made this circuit and Tor should not cannibalize it or attach streams to it without explicitly being told.
Definition at line 121 of file circuitlist.h.
#define CIRCUIT_PURPOSE_COUNTS_TOWARDS_MAXPENDING | ( | p | ) |
True iff this circuit purpose should count towards the global pending rate limit (set by MaxClientCircuitsPending). We count all general purpose circuits, as well as the first step of client onion service connections (HSDir gets).
Definition at line 160 of file circuitlist.h.
#define CIRCUIT_PURPOSE_HS_VANGUARDS 24 |
This circuit is used for vanguards/restricted paths.
This type of circuit is only created preemptively and never on-demand. When an HS operation needs to take place (e.g. connect to an intro point), these circuits are then cannibalized and repurposed to the actual needed HS purpose.
Definition at line 131 of file circuitlist.h.
#define CIRCUIT_PURPOSE_INTRO_POINT 2 |
OR-side circuit purpose: At OR, from the service, waiting for intro from clients.
Definition at line 42 of file circuitlist.h.
#define CIRCUIT_PURPOSE_IS_CLIENT | ( | p | ) |
True iff the circuit purpose p is for a circuit that originated here to serve as a client. (Hidden services don't count here.)
Definition at line 143 of file circuitlist.h.
#define CIRCUIT_PURPOSE_IS_ESTABLISHED_REND | ( | p | ) |
True iff the circuit purpose p is for an established rendezvous circuit.
Definition at line 150 of file circuitlist.h.
#define CIRCUIT_PURPOSE_IS_ORIGIN | ( | p | ) | ((p)>CIRCUIT_PURPOSE_OR_MAX_) |
True iff the circuit purpose p is for a circuit that originated at this node.
Definition at line 140 of file circuitlist.h.
#define CIRCUIT_PURPOSE_OR 1 |
OR-side circuit purpose: normal circuit, at OR.
Definition at line 39 of file circuitlist.h.
#define CIRCUIT_PURPOSE_PATH_BIAS_TESTING 23 |
This circuit is used for path bias probing only
Definition at line 123 of file circuitlist.h.
#define CIRCUIT_PURPOSE_REND_ESTABLISHED 4 |
OR-side circuit purpose: At OR, both circuits have this purpose.
Definition at line 47 of file circuitlist.h.
#define CIRCUIT_PURPOSE_REND_POINT_WAITING 3 |
OR-side circuit purpose: At OR, from the client, waiting for the service.
Definition at line 45 of file circuitlist.h.
#define CIRCUIT_PURPOSE_S_CONNECT_REND 18 |
Hidden-service-side circuit purpose: at the service, connecting to rend point.
Definition at line 107 of file circuitlist.h.
#define CIRCUIT_PURPOSE_S_ESTABLISH_INTRO 16 |
Hidden-service-side circuit purpose: at the service, waiting for introductions.
Definition at line 101 of file circuitlist.h.
#define CIRCUIT_PURPOSE_S_HSDIR_POST 20 |
This circuit is used for uploading hsdirs
Definition at line 112 of file circuitlist.h.
#define CIRCUIT_PURPOSE_S_INTRO 17 |
Hidden-service-side circuit purpose: at the service, successfully established intro.
Definition at line 104 of file circuitlist.h.
#define CIRCUIT_PURPOSE_S_REND_JOINED 19 |
Hidden-service-side circuit purpose: at the service, rendezvous established.
Definition at line 110 of file circuitlist.h.
#define CIRCUIT_PURPOSE_TESTING 21 |
A testing circuit; not meant to be used for actual traffic. It is used for bandwidth measurement, reachability test and address discovery from an authority using the NETINFO cell.
Definition at line 118 of file circuitlist.h.
#define CIRCUIT_PURPOSE_UNKNOWN 255 |
A catch-all for unrecognized purposes. Currently we don't expect to make or see any circuits with this purpose.
Definition at line 136 of file circuitlist.h.
#define CIRCUIT_STATE_BUILDING 0 |
Circuit state: I'm the origin, still haven't done all my handshakes.
Definition at line 21 of file circuitlist.h.
#define CIRCUIT_STATE_CHAN_WAIT 2 |
Circuit state: I'd like to deliver a create, but my n_chan is still connecting.
Definition at line 26 of file circuitlist.h.
#define CIRCUIT_STATE_GUARD_WAIT 3 |
Circuit state: the circuit is open but we don't want to actually use it until we find out if a better guard will be available.
Definition at line 30 of file circuitlist.h.
#define CIRCUIT_STATE_ONIONSKIN_PENDING 1 |
Circuit state: Waiting to process the onionskin.
Definition at line 23 of file circuitlist.h.
#define CIRCUIT_STATE_OPEN 4 |
Circuit state: onionskin(s) processed, ready to send/receive cells.
Definition at line 32 of file circuitlist.h.
void assert_circuit_ok | ( | const circuit_t * | c | ) |
Verify that circuit c has all of its invariants correct. Trigger an assert if anything is invalid.
Definition at line 2716 of file circuitlist.c.
Referenced by circuit_mark_for_close_(), connection_exit_begin_conn(), connection_exit_begin_resolve(), and handle_hs_exit_conn().
Mark that circuit id id shouldn't be used on channel chan, even if there is no circuit on the channel. We use this to keep the circuit id from getting re-used while we have queued but not yet sent a destroy cell.
Definition at line 353 of file circuitlist.c.
Referenced by channel_note_destroy_pending(), circuit_set_n_circid_chan(), and circuit_set_p_circid_chan().
Mark that a circuit id id can be used again on chan. We use this to re-enable the circuit ID after we've sent a destroy cell.
Definition at line 386 of file circuitlist.c.
Referenced by channel_note_destroy_not_pending(), and circuitmux_mark_destroyed_circids_usable().
Called to indicate that a DESTROY is no longer pending on chan with circuit ID id – typically, because it has been sent.
Definition at line 429 of file circuitlist.c.
Called to indicate that a DESTROY is pending on chan with circuit ID id, but hasn't been sent yet.
Definition at line 409 of file circuitlist.c.
int circuit_any_opened_circuits | ( | void | ) |
Return true if we have any opened general-purpose 3 hop origin circuits.
The result from this function is cached for use by circuit_any_opened_circuits_cached().
Definition at line 718 of file circuitlist.c.
Referenced by circuit_expire_building().
int circuit_any_opened_circuits_cached | ( | void | ) |
Return true if there were any opened circuits since the last call to circuit_any_opened_circuits(), or since circuit_expire_building() last ran (it runs roughly once per second).
Definition at line 755 of file circuitlist.c.
Referenced by circuit_build_times_handle_completed_hop().
void circuit_cache_opened_circuit_state | ( | int | circuits_are_opened | ) |
Cache the "any circuits opened" state, as specified in param circuits_are_opened. This is a helper function to update the circuit opened status whenever we happen to look at the circuit list.
Definition at line 744 of file circuitlist.c.
Referenced by circuit_any_opened_circuits().
void circuit_clear_cpath | ( | origin_circuit_t * | circ | ) |
Deallocate the linked list circ->cpath, and remove the cpath from circ.
Definition at line 1278 of file circuitlist.c.
void circuit_clear_testing_cell_stats | ( | circuit_t * | circ | ) |
Free all storage held in circ->testing_cell_stats
Definition at line 1113 of file circuitlist.c.
Referenced by circuit_free_().
void circuit_close_all_marked | ( | void | ) |
Detach from the global circuit list, and deallocate, all circuits that have been marked for close.
Definition at line 662 of file circuitlist.c.
Referenced by postloop_cleanup_cb().
int circuit_count_pending_on_channel | ( | channel_t * | chan | ) |
Return the number of circuits in state CHAN_WAIT, waiting for the given channel.
Definition at line 609 of file circuitlist.c.
void circuit_dump_by_conn | ( | connection_t * | conn, |
int | severity | ||
) |
Log, at severity severity, information about each circuit that is connected to conn.
Definition at line 1377 of file circuitlist.c.
int circuit_event_status | ( | origin_circuit_t * | circ, |
circuit_status_event_t | tp, | ||
int | reason_code | ||
) |
Helper function to publish a message about events on an origin circuit
Publishes a message to subscribers of origin circuit events, and sends the control event.
Definition at line 499 of file circuitlist.c.
Referenced by circuit_about_to_free(), and circuit_build_times_mark_circ_as_measurement_only().
smartlist_t* circuit_find_circuits_to_upgrade_from_guard_wait | ( | void | ) |
Check whether any of the origin circuits that are waiting to see if their guard is good enough to use can be upgraded to "ready". If so, return a new smartlist containing them. Otherwise return NULL.
Definition at line 1965 of file circuitlist.c.
Referenced by circuit_upgrade_circuits_from_guard_wait().
origin_circuit_t* circuit_find_to_cannibalize | ( | uint8_t | purpose_to_produce, |
extend_info_t * | info, | ||
int | flags | ||
) |
Return a circuit that is open, is CIRCUIT_PURPOSE_C_GENERAL, has a timestamp_dirty value of 0, has flags matching the CIRCLAUNCH_* flags in flags, and if info is defined, does not already use info as any of its hops; or NULL if no circuit fits this description.
The purpose argument refers to the purpose of the circuit we want to create, not the purpose of the circuit we want to cannibalize.
If !CIRCLAUNCH_NEED_UPTIME, prefer returning non-uptime circuits.
To "cannibalize" a circuit means to extend it an extra hop, and use it for some other purpose than we had originally intended. We do this when we want to perform some low-bandwidth task at a specific relay, and we would like the circuit to complete as soon as possible. (If we were going to use a lot of bandwidth, we wouldn't want a circuit with an extra hop. If we didn't care about circuit completion latency, we would just build a new circuit.)
Definition at line 1855 of file circuitlist.c.
void circuit_free_all | ( | void | ) |
Release all storage held by circuits.
Definition at line 1302 of file circuitlist.c.
void circuit_get_all_pending_on_channel | ( | smartlist_t * | out, |
channel_t * | chan | ||
) |
Append to out all circuits in state CHAN_WAIT waiting for the given connection.
Definition at line 578 of file circuitlist.c.
Referenced by circuit_count_pending_on_channel(), and entry_guard_chan_failed().
Return a circ such that:
Definition at line 1510 of file circuitlist.c.
Referenced by command_process_created_cell(), command_process_destroy_cell(), and command_process_relay_cell().
Return a circ such that:
Definition at line 1525 of file circuitlist.c.
Referenced by channel_note_destroy_not_pending(), channel_note_destroy_pending(), and circuitmux_set_policy().
circuit_t* circuit_get_by_edge_conn | ( | edge_connection_t * | conn | ) |
Return the circuit that a given edge connection is using.
Definition at line 1571 of file circuitlist.c.
Referenced by connection_exit_about_to_close().
origin_circuit_t* circuit_get_by_global_id | ( | uint32_t | id | ) |
Return the circuit whose global ID is id, or NULL if no such circuit exists.
Definition at line 1418 of file circuitlist.c.
Referenced by get_circ().
crypt_path_t* circuit_get_cpath_hop | ( | origin_circuit_t * | circ, |
int | hopnum | ||
) |
Return the hopnumth hop in circ->cpath, or NULL if there aren't that many hops in the list. hopnum starts at 1. Returns NULL if hopnum is 0 or negative.
Definition at line 2029 of file circuitlist.c.
Referenced by circpad_padding_is_from_expected_hop(), circpad_send_command_to_hop(), and circuit_get_nth_node().
int circuit_get_cpath_len | ( | origin_circuit_t * | circ | ) |
Return the number of hops in circuit's path. If circ has no entries, or is NULL, returns 0.
Definition at line 1993 of file circuitlist.c.
Referenced by circpad_send_command_to_hop(), circuit_build_failed(), circuit_build_no_more_hops(), and onion_extend_cpath().
int circuit_get_cpath_opened_len | ( | const origin_circuit_t * | circ | ) |
Return the number of opened hops in circuit's path. If circ has no entries, or is NULL, returns 0.
Definition at line 2009 of file circuitlist.c.
Referenced by circuit_timeout_want_to_count_circ().
smartlist_t* circuit_get_global_list | ( | void | ) |
Return a pointer to the global list of circuits.
Definition at line 694 of file circuitlist.c.
Referenced by circuit_close_all_marked(), circuit_dump_by_conn(), circuit_enough_testing_circs(), circuit_expire_old_circuits_clientside(), circuit_expire_old_circuits_serverside(), circuit_free_all(), circuit_get_best(), circuit_get_by_global_id(), circuit_get_next_by_purpose(), circuit_get_next_intro_circ(), circuit_get_next_service_rp_circ(), circuit_log_ancient_one_hop_circuits(), circuit_mark_all_dirty_circs_as_unusable(), circuit_mark_all_unused_circs(), circuit_predict_and_launch_new(), circuit_stream_is_being_handled(), circuit_unlink_all_from_channel(), clear_circ_bw_fields(), control_event_circ_bandwidth_used(), count_pending_general_client_circuits(), dump_cell_pool_usage(), init_circuit_base(), and pathbias_count_circs_in_states().
smartlist_t* circuit_get_global_origin_circuit_list | ( | void | ) |
Return a pointer to the global list of origin circuits.
Definition at line 703 of file circuitlist.c.
Referenced by circuit_add_to_origin_circuit_list(), circuit_any_opened_circuits(), and circuit_expire_waiting_for_better_guard().
origin_circuit_t* circuit_get_next_by_purpose | ( | origin_circuit_t * | start, |
uint8_t | purpose | ||
) |
Return the first circuit originating here in global_circuitlist after start whose purpose is purpose. Return NULL if no circuit is found. If start is NULL, begin at the start of the list.
Definition at line 1769 of file circuitlist.c.
origin_circuit_t* circuit_get_next_intro_circ | ( | const origin_circuit_t * | start, |
bool | want_client_circ | ||
) |
Return the first introduction circuit originating from the global circuit list after start or at the start of the list if start is NULL. Return NULL if no circuit is found.
If want_client_circ is true, then we are looking for client-side introduction circuits: A client introduction point circuit has a purpose of either CIRCUIT_PURPOSE_C_INTRODUCING, CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT or CIRCUIT_PURPOSE_C_INTRODUCE_ACKED. This does not return a circuit marked for close, but it returns circuits regardless of their circuit state.
If want_client_circ is false, then we are looking for service-side introduction circuits: A service introduction point circuit has a purpose of either CIRCUIT_PURPOSE_S_ESTABLISH_INTRO or CIRCUIT_PURPOSE_S_INTRO. This does not return circuits marked for close, or in any state other than open.
Definition at line 1686 of file circuitlist.c.
Referenced by hs_client_close_intro_circuits_from_desc().
origin_circuit_t* circuit_get_next_service_rp_circ | ( | origin_circuit_t * | start | ) |
Return the first service rendezvous circuit originating from the global circuit list after start or at the start of the list if start is NULL. Return NULL if no circuit is found.
A service rendezvous point circuit has a purpose of either CIRCUIT_PURPOSE_S_CONNECT_REND or CIRCUIT_PURPOSE_S_REND_JOINED. This does not return a circuit marked for close and its state must be open.
Definition at line 1738 of file circuitlist.c.
Referenced by close_service_rp_circuits().
Return true iff the circuit ID circ_id is currently used by a circuit, marked or not, on chan, or if the circ ID is reserved until a queued destroy cell can be sent.
(Return 1 if the circuit is present, marked or not; Return 2 if the circuit ID is pending a destroy.)
Definition at line 1539 of file circuitlist.c.
Helper for debugging 12184. Returns the time since which 'circ_id' has been marked unusable on 'chan'.
Definition at line 1552 of file circuitlist.c.
int32_t circuit_initial_package_window | ( | void | ) |
Pick a reasonable package_window to start out for our circuits. Originally this was hard-coded at 1000, but now the consensus votes on the answer. See proposal 168.
Definition at line 975 of file circuitlist.c.
Referenced by init_circuit_base().
void circuit_mark_all_dirty_circs_as_unusable | ( | void | ) |
Go through the circuitlist; for each circuit that starts at us and is dirty, frob its timestamp_dirty so we won't use it for any new streams.
This is useful for letting the user change pseudonyms, so new streams will not be linkable to old streams.
Definition at line 2064 of file circuitlist.c.
Referenced by circuit_note_clock_jumped(), and directory_info_has_arrived().
void circuit_mark_all_unused_circs | ( | void | ) |
Go through the circuitlist; mark-for-close each circuit that starts at us but has not yet been used.
Definition at line 2045 of file circuitlist.c.
Referenced by circuit_note_clock_jumped(), and directory_info_has_arrived().
void circuit_mark_for_close_ | ( | circuit_t * | circ, |
int | reason, | ||
int | line, | ||
const char * | file | ||
) |
Mark circ to be closed next time we call circuit_close_all_marked(). Do any cleanup needed:
Definition at line 2155 of file circuitlist.c.
const char* circuit_purpose_to_controller_hs_state_string | ( | uint8_t | purpose | ) |
Return a string specifying the state of the hidden-service circuit purpose purpose, or NULL if purpose is not a hidden-service-related circuit purpose.
Definition at line 843 of file circuitlist.c.
const char* circuit_purpose_to_controller_string | ( | uint8_t | purpose | ) |
Map a circuit purpose to a string suitable to be displayed to a controller.
Definition at line 782 of file circuitlist.c.
const char* circuit_purpose_to_string | ( | uint8_t | purpose | ) |
Return a human-readable string for the circuit purpose purpose.
Definition at line 903 of file circuitlist.c.
Referenced by circuit_change_purpose().
Set the n_conn field of a circuit circ, along with the corresponding circuit ID, and add the circuit as appropriate to the (chan,id)->circuit map.
Definition at line 474 of file circuitlist.c.
Referenced by circuit_about_to_free_atexit().
void circuit_set_p_circid_chan | ( | or_circuit_t * | or_circ, |
circid_t | id, | ||
channel_t * | chan | ||
) |
Set the p_conn field of a circuit circ, along with the corresponding circuit ID, and add the circuit as appropriate to the (chan,id)->circuit map.
Definition at line 451 of file circuitlist.c.
Referenced by circuit_about_to_free_atexit().
void circuit_set_state | ( | circuit_t * | circ, |
uint8_t | state | ||
) |
Change the state of circ to state, adding it to or removing it from lists as appropriate.
Definition at line 543 of file circuitlist.c.
Referenced by circuit_extend_to_new_exit(), and origin_circuit_init().
const char* circuit_state_to_string | ( | int | state | ) |
Function to make circ->state human-readable
Definition at line 762 of file circuitlist.c.
void circuit_synchronize_written_or_bandwidth | ( | const circuit_t * | c, |
circuit_channel_direction_t | dir | ||
) |
Report any queued cells on or_circuits as written in our bandwidth totals, for the specified channel direction.
When we close a circuit or clear its cell queues, we've read data and recorded those bytes in our read statistics, but we're not going to write it. This discrepancy can be used by an adversary to infer information from our public relay statistics and perform attacks such as guard discovery.
This function is in the critical path of circuit_mark_for_close(). It must be (and is) O(1)!
See https://bugs.torproject.org/tpo/core/tor/23512
Definition at line 2092 of file circuitlist.c.
void circuit_unlink_all_from_channel | ( | channel_t * | chan, |
int | reason | ||
) |
For each circuit that has chan as n_chan or p_chan, unlink the circuit from the chan,circid map, and mark it for close if it hasn't been marked already.
Definition at line 1588 of file circuitlist.c.
size_t circuits_handle_oom | ( | size_t | current_allocation | ) |
We're out of memory for cells, having allocated current_allocation bytes' worth. Kill the 'worst' circuits until we're under FRACTION_OF_DATA_TO_RETAIN_ON_OOM of our maximum usage.
Return the number of bytes removed.
Definition at line 2593 of file circuitlist.c.
or_circuit_t* or_circuit_new | ( | circid_t | p_circ_id, |
channel_t * | p_chan | ||
) |
Allocate a new or_circuit_t, connected to p_chan as p_circ_id. If p_chan is NULL, the circuit is unattached.
Definition at line 1091 of file circuitlist.c.
origin_circuit_t* origin_circuit_new | ( | void | ) |
Allocate space for a new circuit, initializing with p_circ_id and p_conn. Add it to the global circuit list.
Definition at line 1018 of file circuitlist.c.
Referenced by origin_circuit_init().
or_circuit_t* TO_OR_CIRCUIT | ( | circuit_t * | x | ) |
Convert a circuit_t* to a pointer to the enclosing or_circuit_t. Assert if the cast is impossible.
Definition at line 154 of file circuitlist.c.
Referenced by append_cell_to_circuit_queue(), 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_dump_by_conn(), circuit_expire_old_circuits_serverside(), circuit_free_all(), circuit_resume_edge_reading_helper(), circuit_unlink_all_from_channel(), circuitmux_attach_circuit(), circuitmux_detach_circuit(), circuitmux_find_map_entry(), connection_exit_begin_conn(), connection_exit_connect_dir(), dns_resolve(), dump_cell_pool_usage(), format_cell_stats(), marked_circuit_free_stream_bytes(), n_cells_in_circ_queues(), rep_hist_buffer_stats_add_circ(), set_streams_blocked_on_circ(), update_circuit_on_cmux_(), and update_intro_circuits().
origin_circuit_t* TO_ORIGIN_CIRCUIT | ( | circuit_t * | x | ) |
Convert a circuit_t* to a pointer to the enclosing origin_circuit_t. Assert if the cast is impossible.
Definition at line 166 of file circuitlist.c.
Referenced by circpad_circuit_machineinfo_free_idx(), circpad_machine_spec_transitioned_to_end(), circpad_padding_is_from_expected_hop(), circpad_send_padding_cell_for_callback(), circuit_about_to_free(), circuit_detach_stream(), circuit_dump_by_conn(), circuit_expire_old_circuits_clientside(), circuit_free_(), circuit_get_best(), circuit_get_by_global_id(), circuit_mark_all_dirty_circs_as_unusable(), circuit_stream_is_being_handled(), clear_circ_bw_fields(), connection_ap_handshake_send_begin(), connection_ap_handshake_send_resolve(), connection_exit_begin_conn(), control_event_circ_bandwidth_used(), entry_guard_chan_failed(), format_cell_stats(), marked_circuit_free_stream_bytes(), pathbias_check_probe_response(), pathbias_count_circs_in_states(), pathbias_count_valid_cells(), pathbias_send_usable_probe(), relay_decrypt_cell(), relay_lookup_conn(), rend_process_relay_cell(), and set_streams_blocked_on_circ().