tor  master
Functions
rendclient.h File Reference

Header file for rendclient.c. More...

#include "rendcache.h"
Include dependency graph for rendclient.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void rend_client_purge_state (void)
 
void rend_client_introcirc_has_opened (origin_circuit_t *circ)
 
void rend_client_rendcirc_has_opened (origin_circuit_t *circ)
 
int rend_client_introduction_acked (origin_circuit_t *circ, const uint8_t *request, size_t request_len)
 
void rend_client_refetch_v2_renddesc (rend_data_t *rend_query)
 
int rend_client_fetch_v2_desc (rend_data_t *query, smartlist_t *hsdirs)
 
void rend_client_cancel_descriptor_fetches (void)
 
int rend_client_report_intro_point_failure (extend_info_t *failed_intro, rend_data_t *rend_data, unsigned int failure_type)
 
int rend_client_receive_rendezvous (origin_circuit_t *circ, const uint8_t *request, size_t request_len)
 
void rend_client_desc_trynow (const char *query)
 
void rend_client_note_connection_attempt_ended (const rend_data_t *rend_data)
 
extend_info_trend_client_get_random_intro (const rend_data_t *rend_query)
 
int rend_client_any_intro_points_usable (const rend_cache_entry_t *entry)
 
int rend_client_send_introduction (origin_circuit_t *introcirc, origin_circuit_t *rendcirc)
 
int rend_parse_service_authorization (const or_options_t *options, int validate_only)
 
rend_service_authorization_trend_client_lookup_service_authorization (const char *onion_address)
 
void rend_service_authorization_free_all (void)
 
int rend_client_allow_non_anonymous_connection (const or_options_t *options)
 
int rend_client_non_anonymous_mode_enabled (const or_options_t *options)
 

Detailed Description

Header file for rendclient.c.

Function Documentation

◆ rend_client_any_intro_points_usable()

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.

◆ rend_client_cancel_descriptor_fetches()

void rend_client_cancel_descriptor_fetches ( void  )

Cancel all rendezvous descriptor fetches currently in progress.

Here is the caller graph for this function:

◆ rend_client_desc_trynow()

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.

◆ rend_client_fetch_v2_desc()

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.

◆ rend_client_get_random_intro()

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.

◆ rend_client_introcirc_has_opened()

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.

◆ rend_client_introduction_acked()

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_client_lookup_service_authorization()

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.

◆ rend_client_note_connection_attempt_ended()

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.

Here is the caller graph for this function:

◆ rend_client_purge_state()

void rend_client_purge_state ( void  )

Purge all potentially remotely-detectable state held in the hidden service client code. Called on SIGNAL NEWNYM.

Here is the call graph for this function:

◆ rend_client_receive_rendezvous()

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.

◆ rend_client_refetch_v2_renddesc()

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.

◆ rend_client_rendcirc_has_opened()

void rend_client_rendcirc_has_opened ( origin_circuit_t circ)

Called when a rendezvous circuit is open; sends a establish rendezvous circuit as appropriate.

◆ rend_client_report_intro_point_failure()

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.

◆ rend_client_send_introduction()

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.

Here is the call graph for this function:

◆ rend_parse_service_authorization()

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.

Here is the call graph for this function:

◆ rend_service_authorization_free_all()

void rend_service_authorization_free_all ( void  )

Release all the storage held in auth_hid_servs.