Tor 0.4.9.8
Loading...
Searching...
No Matches
reachability.c File Reference

Router reachability testing; run by authorities to tell who is running. More...

Go to the source code of this file.

Functions

void dirserv_orconn_tls_done (const tor_addr_t *addr, uint16_t or_port, const char *digest_rcvd, const ed25519_public_key_t *ed_id_rcvd)
 
int dirserv_should_launch_reachability_test (const routerinfo_t *ri, const routerinfo_t *ri_old)
 
void dirserv_single_reachability_test (time_t now, routerinfo_t *router)
 
void dirserv_test_reachability (time_t now)
 

Detailed Description

Router reachability testing; run by authorities to tell who is running.

Definition in file reachability.c.

Function Documentation

◆ dirserv_orconn_tls_done()

void dirserv_orconn_tls_done ( const tor_addr_t * addr,
uint16_t or_port,
const char * digest_rcvd,
const ed25519_public_key_t * ed_id_rcvd )

Called when a TLS handshake has completed successfully with a router listening at address:or_port, and has yielded a certificate with digest digest_rcvd.

Inform the reachability checker that we could get to this relay.

Definition at line 40 of file reachability.c.

◆ dirserv_should_launch_reachability_test()

int dirserv_should_launch_reachability_test ( const routerinfo_t * ri,
const routerinfo_t * ri_old )

Called when we, as an authority, receive a new router descriptor either as an upload or a download. Used to decide whether to relaunch reachability testing for the server.

Definition at line 103 of file reachability.c.

◆ dirserv_single_reachability_test()

void dirserv_single_reachability_test ( time_t now,
routerinfo_t * router )

Helper function for dirserv_test_reachability(). Start a TLS connection to router, and annotate it with when we started the test.

Definition at line 134 of file reachability.c.

◆ dirserv_test_reachability()

void dirserv_test_reachability ( time_t now)

Auth dir server only: load balance such that we only try a few connections per call.

The load balancing is such that if we get called once every ten seconds, we will cycle through all the tests in REACHABILITY_TEST_CYCLE_PERIOD seconds (a bit over 20 minutes).

Definition at line 186 of file reachability.c.