tor  0.4.0.0-alpha-dev
Functions
routermode.h File Reference

Go to the source code of this file.

Functions

int dir_server_mode (const or_options_t *options)
 
 MOCK_DECL (int, server_mode,(const or_options_t *options))
 
 MOCK_DECL (int, public_server_mode,(const or_options_t *options))
 
 MOCK_DECL (int, advertised_server_mode,(void))
 
int proxy_mode (const or_options_t *options)
 
void set_server_advertised (int s)
 

Detailed Description

Header file for routermode.c.

Definition in file routermode.h.

Function Documentation

◆ dir_server_mode()

int dir_server_mode ( const or_options_t options)

Return 1 if we are configured to accept either relay or directory requests from clients and we aren't at risk of exceeding our bandwidth limits, thus we should be a directory server. If not, return 0.

Definition at line 20 of file routermode.c.

References or_options_t::DirCache, and router_has_bandwidth_to_be_dirserver().

Referenced by directory_caches_dir_info(), directory_caches_unknown_auth_certs(), directory_fetches_from_authorities(), and directory_permits_begindir_requests().

◆ proxy_mode()

int proxy_mode ( const or_options_t options)

Return true iff we are trying to proxy client connections.

Definition at line 30 of file routermode.c.

References CONN_TYPE_AP_DNS_LISTENER, CONN_TYPE_AP_LISTENER, CONN_TYPE_AP_NATD_LISTENER, CONN_TYPE_AP_TRANS_LISTENER, and SMARTLIST_FOREACH_BEGIN.

Referenced by circuit_expire_old_circs_as_needed(), and signewnym_impl().

◆ set_server_advertised()

void set_server_advertised ( int  s)

Called with a boolean: set whether we have recently published our descriptor.

Definition at line 77 of file routermode.c.

Referenced by consider_publishable_server().