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

Functions to answer questions about how we'd like to behave as a directory client. More...

Go to the source code of this file.

Functions

int dirclient_must_use_begindir (const or_options_t *options)
 
int dirclient_fetches_from_authorities (const or_options_t *options)
 
int dirclient_fetches_dir_info_early (const or_options_t *options)
 
int dirclient_fetches_dir_info_later (const or_options_t *options)
 
int dirclient_too_idle_to_fetch_descriptors (const or_options_t *options, time_t now)
 

Detailed Description

Functions to answer questions about how we'd like to behave as a directory client.

Definition in file dirclient_modes.c.

Function Documentation

◆ dirclient_fetches_dir_info_early()

int dirclient_fetches_dir_info_early ( const or_options_t * options)

Return 1 if we should fetch new networkstatuses, descriptors, etc on the "mirror" schedule rather than the "client" schedule.

Definition at line 64 of file dirclient_modes.c.

Referenced by launch_descriptor_downloads(), options_act(), and update_consensus_networkstatus_fetch_time_impl().

◆ dirclient_fetches_dir_info_later()

int dirclient_fetches_dir_info_later ( const or_options_t * options)

Return 1 if we should fetch new networkstatuses, descriptors, etc on a very passive schedule – waiting long enough for ordinary clients to probably have the info we want. These would include bridge users, and maybe others in the future e.g. if a Tor client uses another Tor client as a directory guard.

Definition at line 76 of file dirclient_modes.c.

Referenced by options_act(), and update_consensus_networkstatus_fetch_time_impl().

◆ dirclient_fetches_from_authorities()

int dirclient_fetches_from_authorities ( const or_options_t * options)

◆ dirclient_must_use_begindir()

int dirclient_must_use_begindir ( const or_options_t * options)

Definition at line 30 of file dirclient_modes.c.

◆ dirclient_too_idle_to_fetch_descriptors()

int dirclient_too_idle_to_fetch_descriptors ( const or_options_t * options,
time_t now )

Return 1 if we have no need to fetch new descriptors. This generally happens when we're not a dir cache and we haven't built any circuits lately.

Definition at line 86 of file dirclient_modes.c.

Referenced by directory_info_has_arrived(), update_consensus_router_descriptor_downloads(), update_microdesc_downloads(), and update_router_have_minimum_dir_info().