Macros | Functions
reachability.h File Reference

Go to the source code of this file.




void dirserv_orconn_tls_done (const tor_addr_t *addr, uint16_t or_port, const char *digest_rcvd, const struct 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

Header file for reachability.c.

Definition in file reachability.h.

Macro Definition Documentation



What fraction (1 over this number) of the relay ID space do we (as a directory authority) launch connections to at each reachability test?

Definition at line 18 of file reachability.h.



How many seconds apart are the reachability tests for a given relay?

Definition at line 24 of file reachability.h.



How often (in seconds) do we launch reachability tests?

Definition at line 21 of file reachability.h.

Function Documentation

◆ 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 101 of file reachability.c.

References authdir_mode_handles_descs(), routerinfo_t::is_hibernating, routerinfo_t::purpose, and routers_have_same_or_addrs().

◆ dirserv_single_reachability_test()

void dirserv_single_reachability_test ( time_t  now,
routerinfo_t router 

◆ 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 179 of file reachability.c.

References authdir_mode_bridge(), dirserv_single_reachability_test(), REACHABILITY_MODULO_PER_TEST, router_get_routerlist(), router_is_me(), routerlist_t::routers, and SMARTLIST_FOREACH_BEGIN.