tor
master
|
Header file for rendclient.c. More...
#include "rendcache.h"
Go to the source code of this file.
Header file for rendclient.c.
int rend_client_any_intro_points_usable | ( | const rend_cache_entry_t * | entry | ) |
Return true iff any introduction points still listed in entry are usable.
void rend_client_cancel_descriptor_fetches | ( | void | ) |
Cancel all rendezvous descriptor fetches currently in progress.
void rend_client_desc_trynow | ( | const char * | query | ) |
Find all the apconns in state AP_CONN_STATE_RENDDESC_WAIT that are waiting on query. If there's a working cache entry here with at least one intro point, move them to the next state.
int rend_client_fetch_v2_desc | ( | rend_data_t * | query, |
smartlist_t * | hsdirs | ||
) |
Fetch a v2 descriptor using the given query. If any hsdir are specified, use them for the fetch.
On success, 1 is returned. If no hidden service is left to ask, return 0. On error, -1 is returned.
extend_info_t* rend_client_get_random_intro | ( | const rend_data_t * | rend_query | ) |
Return a newly allocated extend_info_t* for a randomly chosen introduction point for the named hidden service. Return NULL if all introduction points have been tried and failed.
void rend_client_introcirc_has_opened | ( | origin_circuit_t * | circ | ) |
Called when we've established a circuit to an introduction point: send the introduction request.
int rend_client_introduction_acked | ( | origin_circuit_t * | circ, |
const uint8_t * | request, | ||
size_t | request_len | ||
) |
Called when get an ACK or a NAK for a REND_INTRODUCE1 cell.
rend_service_authorization_t* rend_client_lookup_service_authorization | ( | const char * | onion_address | ) |
Look up the client-side authorization for the hidden service with onion_address. Return NULL if no authorization is available for that address.
void rend_client_note_connection_attempt_ended | ( | const rend_data_t * | rend_data | ) |
Clear temporary state used only during an attempt to connect to the hidden service with rend_data. Called when a connection attempt has ended; it is possible for this to be called multiple times while handling an ended connection attempt, and any future changes to this function must ensure it remains idempotent.
void rend_client_purge_state | ( | void | ) |
Purge all potentially remotely-detectable state held in the hidden service client code. Called on SIGNAL NEWNYM.
int rend_client_receive_rendezvous | ( | origin_circuit_t * | circ, |
const uint8_t * | request, | ||
size_t | request_len | ||
) |
The service sent us a rendezvous cell; join the circuits.
void rend_client_refetch_v2_renddesc | ( | rend_data_t * | rend_query | ) |
Unless we already have a descriptor for rend_query with at least one (possibly) working introduction point in it, start a connection to a hidden service directory to fetch a v2 rendezvous service descriptor.
void rend_client_rendcirc_has_opened | ( | origin_circuit_t * | circ | ) |
Called when a rendezvous circuit is open; sends a establish rendezvous circuit as appropriate.
int rend_client_report_intro_point_failure | ( | extend_info_t * | failed_intro, |
rend_data_t * | rend_data, | ||
unsigned int | failure_type | ||
) |
Mark failed_intro as a failed introduction point for the hidden service specified by rend_query. If the HS now has no usable intro points, or we do not have an HS descriptor for it, then launch a new renddesc fetch.
If failure_type is INTRO_POINT_FAILURE_GENERIC, remove the intro point from (our parsed copy of) the HS descriptor.
If failure_type is INTRO_POINT_FAILURE_TIMEOUT, mark the intro point as 'timed out'; it will not be retried until the current hidden service connection attempt has ended or it has appeared in a newly fetched rendezvous descriptor.
If failure_type is INTRO_POINT_FAILURE_UNREACHABLE, increment the intro point's reachability-failure count; if it has now failed MAX_INTRO_POINT_REACHABILITY_FAILURES or more times, remove the intro point from (our parsed copy of) the HS descriptor.
Return -1 if error, 0 if no usable intro points remain or service unrecognized, 1 if recognized and some intro points remain.
int rend_client_send_introduction | ( | origin_circuit_t * | introcirc, |
origin_circuit_t * | rendcirc | ||
) |
Called when we're trying to connect an ap conn; sends an INTRODUCE1 cell down introcirc if possible.
int rend_parse_service_authorization | ( | const or_options_t * | options, |
int | validate_only | ||
) |
Parse config_line as a client-side authorization for a hidden service and add it to the local map of hidden service authorizations. Return 0 for success and -1 for failure.
void rend_service_authorization_free_all | ( | void | ) |
Release all the storage held in auth_hid_servs.