tor  0.4.1.0-alpha-dev
Functions
selftest.h File Reference

Go to the source code of this file.

Functions

int check_whether_orport_reachable (const struct or_options_t *options)
 
int check_whether_dirport_reachable (const struct or_options_t *options)
 
void router_do_reachability_checks (int test_or, int test_dir)
 
void router_orport_found_reachable (void)
 
void router_dirport_found_reachable (void)
 
void router_perform_bandwidth_test (int num_circs, time_t now)
 

Detailed Description

Header file for selftest.c.

Definition in file selftest.h.

Function Documentation

◆ router_dirport_found_reachable()

void router_dirport_found_reachable ( void  )

Annotate that we found our DirPort reachable.

Definition at line 246 of file selftest.c.

References routerinfo_t::addr, can_reach_dir_port, and tor_dup_ip().

◆ router_do_reachability_checks()

void router_do_reachability_checks ( int  test_or,
int  test_dir 
)

Some time has passed, or we just got new directory information. See if we currently believe our ORPort or DirPort to be unreachable. If so, launch a new test for it.

For ORPort, we simply try making a circuit that ends at ourselves. Success is noticed in onionskin_answer().

For DirPort, we make a connection via Tor to our DirPort and ask for our own server descriptor. Success is noticed in connection_dir_client_reached_eof().

Definition at line 171 of file selftest.c.

References check_whether_orport_reachable(), circuit_enough_testing_circs(), extend_info_from_router(), and router_should_check_reachability().

Referenced by check_for_reachability_bw_callback(), and directory_info_has_arrived().

◆ router_orport_found_reachable()

void router_orport_found_reachable ( void  )

Annotate that we found our ORPort reachable.

Definition at line 219 of file selftest.c.

References routerinfo_t::addr, can_reach_or_port, and tor_dup_ip().

◆ router_perform_bandwidth_test()

void router_perform_bandwidth_test ( int  num_circs,
time_t  now 
)

We have enough testing circuits open. Send a bunch of "drop" cells down each of them, to exercise our bandwidth.

Definition at line 276 of file selftest.c.

References CELL_MAX_NETWORK_SIZE, and CIRCWINDOW_START.