Tor 0.4.9.0-alpha-dev
|
Header file for circuitbuild.c. More...
Go to the source code of this file.
Functions | |
void | mark_bridge_list (void) |
void | sweep_bridge_list (void) |
const smartlist_t * | bridge_list_get (void) |
const uint8_t * | bridge_get_rsa_id_digest (const bridge_info_t *bridge) |
const tor_addr_port_t * | bridge_get_addr_port (const bridge_info_t *bridge) |
const char * | bridget_get_transport_name (const bridge_info_t *bridge) |
bool | bridge_has_invalid_transport (const bridge_info_t *bridge) |
bridge_info_t * | get_configured_bridge_by_addr_port_digest (const tor_addr_t *addr, uint16_t port, const char *digest) |
bridge_info_t * | get_configured_bridge_by_exact_addr_port_digest (const tor_addr_t *addr, uint16_t port, const char *digest) |
int | addr_is_a_configured_bridge (const tor_addr_t *addr, uint16_t port, const char *digest) |
int | extend_info_is_a_configured_bridge (const extend_info_t *ei) |
int | routerinfo_is_a_configured_bridge (const routerinfo_t *ri) |
int | node_is_a_configured_bridge (const node_t *node) |
void | learned_router_identity (const tor_addr_t *addr, uint16_t port, const char *digest, const struct ed25519_public_key_t *ed_id) |
void | bridge_add_from_config (struct bridge_line_t *bridge_line) |
void | retry_bridge_descriptor_fetch_directly (const char *digest) |
void | fetch_bridge_descriptors (const or_options_t *options, time_t now) |
void | learned_bridge_descriptor (routerinfo_t *ri, int from_cache, int desc_is_new) |
const smartlist_t * | get_socks_args_by_bridge_addrport (const tor_addr_t *addr, uint16_t port) |
int | any_bridges_dont_support_microdescriptors (void) |
const char * | find_transport_name_by_bridge_addrport (const tor_addr_t *addr, uint16_t port) |
int | get_transport_by_bridge_addrport (const tor_addr_t *addr, uint16_t port, const struct transport_t **transport) |
int | transport_is_needed (const char *transport_name) |
int | validate_pluggable_transports_config (void) |
smartlist_t * | list_bridge_identities (void) |
download_status_t * | get_bridge_dl_status_by_id (const char *digest) |
void | bridges_free_all (void) |
bool | conflux_can_exclude_used_bridges (void) |
Header file for circuitbuild.c.
Definition in file bridges.h.
int addr_is_a_configured_bridge | ( | const tor_addr_t * | addr, |
uint16_t | port, | ||
const char * | digest | ||
) |
If we have a bridge configured whose digest matches digest, or a bridge with no known digest whose address matches addr:port, return 1. Else return 0. If digest is NULL, check for address/port matches only.
Definition at line 308 of file bridges.c.
Referenced by extend_info_is_a_configured_bridge().
void bridge_add_from_config | ( | bridge_line_t * | bridge_line | ) |
const tor_addr_port_t * bridge_get_addr_port | ( | const bridge_info_t * | bridge | ) |
Given a bridge, return a pointer to its configured addr:port combination.
Definition at line 196 of file bridges.c.
Referenced by bridge_passes_guard_filter(), entry_guard_add_bridge_to_sample(), get_sampled_guard_for_bridge(), and routerset_contains_bridge().
const uint8_t * bridge_get_rsa_id_digest | ( | const bridge_info_t * | bridge | ) |
Given a bridge, return a pointer to its RSA identity digest, or NULL if we don't know one for it.
Definition at line 182 of file bridges.c.
Referenced by entry_guard_add_bridge_to_sample(), get_sampled_guard_for_bridge(), and routerset_contains_bridge().
bool bridge_has_invalid_transport | ( | const bridge_info_t * | bridge | ) |
Return true if bridge has a transport name for which we don't actually know a transport.
Definition at line 218 of file bridges.c.
Referenced by launch_direct_bridge_descriptor_fetch().
const smartlist_t * bridge_list_get | ( | void | ) |
Return a list of all the configured bridges, as bridge_info_t pointers.
Definition at line 135 of file bridges.c.
Referenced by get_eligible_guards().
void bridges_free_all | ( | void | ) |
const char * bridget_get_transport_name | ( | const bridge_info_t * | bridge | ) |
Given a bridge, return the transport name. If none were configured, NULL is returned.
Definition at line 207 of file bridges.c.
Referenced by bridge_has_invalid_transport().
bool conflux_can_exclude_used_bridges | ( | void | ) |
int extend_info_is_a_configured_bridge | ( | const extend_info_t * | ei | ) |
If we have a bridge configured whose digest matches ei->identity_digest, or a bridge with no known digest whose address matches ei->addr:ei->port, return 1. Else return 0. If ei has no onion key configured, check for address/port matches only.
Note that if the extend_info_t contains multiple addresses, we return true only if every address is a bridge.
Definition at line 326 of file bridges.c.
Referenced by circuit_handle_first_hop().
void fetch_bridge_descriptors | ( | const or_options_t * | options, |
time_t | now | ||
) |
For each bridge in our list for which we don't currently have a descriptor, fetch a new copy of its descriptor – either directly from the bridge or via a bridge authority.
Definition at line 774 of file bridges.c.
Referenced by second_elapsed_callback().
const char * find_transport_name_by_bridge_addrport | ( | const tor_addr_t * | addr, |
uint16_t | port | ||
) |
Given the addr and port of a bridge, if that bridge supports a pluggable transport, return its name. Otherwise, return NULL.
Definition at line 634 of file bridges.c.
Referenced by learned_router_identity().
download_status_t * get_bridge_dl_status_by_id | ( | const char * | digest | ) |
Get the download status for a bridge descriptor given its identity
Definition at line 1067 of file bridges.c.
Referenced by getinfo_helper_downloads_bridge().
bridge_info_t * get_configured_bridge_by_addr_port_digest | ( | const tor_addr_t * | addr, |
uint16_t | port, | ||
const char * | digest | ||
) |
If we have a bridge configured whose digest matches digest, or a bridge with no known digest whose address matches addr:port, return that bridge. Else return NULL. If digest is NULL, check for address/port matches only.
Definition at line 257 of file bridges.c.
Referenced by addr_is_a_configured_bridge(), and get_socks_args_by_bridge_addrport().
bridge_info_t * get_configured_bridge_by_exact_addr_port_digest | ( | const tor_addr_t * | addr, |
uint16_t | port, | ||
const char * | digest | ||
) |
As get_configured_bridge_by_addr_port, but require that the address match addr:port, and that the ID digest match digest. (The other function will ignore the address if the digest matches.)
Definition at line 283 of file bridges.c.
Referenced by learned_router_identity().
const smartlist_t * get_socks_args_by_bridge_addrport | ( | const tor_addr_t * | addr, |
uint16_t | port | ||
) |
Return a smartlist containing all the SOCKS arguments that we should pass to the SOCKS proxy.
Definition at line 687 of file bridges.c.
Referenced by pt_get_socks_args_for_proxy_addrport().
void learned_bridge_descriptor | ( | routerinfo_t * | ri, |
int | from_cache, | ||
int | desc_is_new | ||
) |
We just learned a descriptor for a bridge. See if that digest is in our entry guard list, and add it if not. Schedule the next fetch for a long time from now, and initiate any follow-up activities like continuing to bootstrap.
from_cache * tells us whether we fetched it from disk (else the network)
desc_is_new tells us if we preferred it to the old version we had, if any.
Definition at line 993 of file bridges.c.
Referenced by routerlist_descriptors_added().
smartlist_t * list_bridge_identities | ( | void | ) |
Return a smartlist containing all bridge identity digests
Definition at line 1047 of file bridges.c.
Referenced by getinfo_helper_downloads_bridge().
void mark_bridge_list | ( | void | ) |
int node_is_a_configured_bridge | ( | const node_t * | node | ) |
Return 1 if node is one of our configured bridges, else 0. More specifically, return 1 iff: a bridge_info_t object exists in bridge_list such that: 1) It's identity is equal to node identity OR 2) It's identity digest is zero, but it matches address and port of any ORPort in the node.
Definition at line 391 of file bridges.c.
Referenced by node_has_preferred_descriptor().
void retry_bridge_descriptor_fetch_directly | ( | const char * | digest | ) |
int routerinfo_is_a_configured_bridge | ( | const routerinfo_t * | ri | ) |
void sweep_bridge_list | ( | void | ) |