27 #define DECLARE_EVENT(name, roles, flags) \
28 static periodic_event_item_t name ## _event = \
29 PERIODIC_EVENT(name, \
30 PERIODIC_EVENT_ROLE_##roles, \
34 #define FL(name) (PERIODIC_EVENT_FLAG_##name)
48 #define CHECK_V3_CERTIFICATE_INTERVAL (5*60)
49 return CHECK_V3_CERTIFICATE_INTERVAL;
52 DECLARE_EVENT(check_authority_cert, DIRAUTH, 0);
63 if (!authdir_mode_v3(options)) {
69 if (BUG(next == TIME_MAX)) {
78 DECLARE_EVENT(dirvote, DIRAUTH, FL(NEED_NET));
85 if (authdir_mode_v3(options)) {
99 log_warn(
LD_GENERAL,
"Couldn't store mtbf data.");
102 #define SAVE_STABILITY_INTERVAL (30*60)
103 return SAVE_STABILITY_INTERVAL;
106 DECLARE_EVENT(save_stability, AUTHORITIES, 0);
123 DECLARE_EVENT(launch_reachability_tests, AUTHORITIES, FL(NEED_NET));
140 DECLARE_EVENT(downrate_stability, AUTHORITIES, 0);
151 #define BRIDGE_STATUSFILE_INTERVAL (30*60)
152 return BRIDGE_STATUSFILE_INTERVAL;
154 return PERIODIC_EVENT_NO_UPDATE;
157 DECLARE_EVENT(write_bridge_ns, BRIDGEAUTH, 0);
160 dirauth_register_periodic_events(
void)
int authdir_mode_tests_reachability(const or_options_t *options)
Header file for directory authority mode.
void bridgeauth_dump_bridge_status_to_file(time_t now)
static int check_authority_cert_callback(time_t now, const or_options_t *options)
static int launch_reachability_tests_callback(time_t now, const or_options_t *options)
static int save_stability_callback(time_t now, const or_options_t *options)
static int dirvote_callback(time_t now, const or_options_t *options)
void reschedule_dirvote(const or_options_t *options)
static int downrate_stability_callback(time_t now, const or_options_t *options)
static int write_bridge_ns_callback(time_t now, const or_options_t *options)
Header for dirauth_periodic.c.
time_t dirvote_act(const or_options_t *options, time_t now)
Header file for dirvote.c.
int net_is_disabled(void)
Master header file for Tor-specific functionality.
The or_options_t structure, which represents Tor's configuration.
void periodic_events_register(periodic_event_item_t *item)
int safe_timer_diff(time_t now, time_t next)
void periodic_event_reschedule(periodic_event_item_t *event)
void dirserv_test_reachability(time_t now)
Header file for reachability.c.
#define REACHABILITY_TEST_INTERVAL
time_t rep_hist_downrate_old_runs(time_t now)
int rep_hist_record_mtbf_data(time_t now, int missing_means_down)
Header file for rephist.c.
void v3_authority_check_key_expiry(void)
int BridgeAuthoritativeDir
#define tor_assert_nonfatal_unreached()