Tor
0.4.7.0-alpha-dev
|
Peridoic events for directory authorities. More...
#include "core/or/or.h"
#include "app/config/or_options_st.h"
#include "core/mainloop/netstatus.h"
#include "feature/dirauth/reachability.h"
#include "feature/stats/rephist.h"
#include "feature/dirauth/bridgeauth.h"
#include "feature/dirauth/dirvote.h"
#include "feature/dirauth/dirauth_periodic.h"
#include "feature/dirauth/authmode.h"
#include "core/mainloop/periodic.h"
Go to the source code of this file.
Macros | |
#define | DECLARE_EVENT(name, roles, flags) |
#define | FL(name) (PERIODIC_EVENT_FLAG_##name) |
#define | CHECK_V3_CERTIFICATE_INTERVAL (5*60) |
#define | SAVE_STABILITY_INTERVAL (30*60) |
#define | BRIDGE_STATUSFILE_INTERVAL (30*60) |
Functions | |
static int | check_authority_cert_callback (time_t now, const or_options_t *options) |
DECLARE_EVENT (check_authority_cert, DIRAUTH, 0) | |
static int | dirvote_callback (time_t now, const or_options_t *options) |
DECLARE_EVENT (dirvote, DIRAUTH, FL(NEED_NET)) | |
void | reschedule_dirvote (const or_options_t *options) |
static int | save_stability_callback (time_t now, const or_options_t *options) |
DECLARE_EVENT (save_stability, AUTHORITIES, 0) | |
static int | launch_reachability_tests_callback (time_t now, const or_options_t *options) |
DECLARE_EVENT (launch_reachability_tests, AUTHORITIES, FL(NEED_NET)) | |
static int | downrate_stability_callback (time_t now, const or_options_t *options) |
DECLARE_EVENT (downrate_stability, AUTHORITIES, 0) | |
static int | write_bridge_ns_callback (time_t now, const or_options_t *options) |
DECLARE_EVENT (write_bridge_ns, BRIDGEAUTH, 0) | |
void | dirauth_register_periodic_events (void) |
Peridoic events for directory authorities.
Definition in file dirauth_periodic.c.
#define DECLARE_EVENT | ( | name, | |
roles, | |||
flags | |||
) |
Definition at line 27 of file dirauth_periodic.c.
|
static |
Periodic callback: if we're an authority, check on our authority certificate (the one that authenticates our authority signing key).
Definition at line 41 of file dirauth_periodic.c.
|
static |
Scheduled callback: Run directory-authority voting functionality.
The schedule is a bit complicated here, so dirvote_act() manages the schedule itself.
Definition at line 61 of file dirauth_periodic.c.
|
static |
Periodic callback: if we're an authority, discount the stability information (and other rephist information) that's older.
Definition at line 130 of file dirauth_periodic.c.
|
static |
Periodic callback: if we're an authority, make sure we test the routers on the network for reachability.
Definition at line 113 of file dirauth_periodic.c.
void reschedule_dirvote | ( | const or_options_t * | options | ) |
Reschedule the directory-authority voting event. Run this whenever the schedule has changed.
Definition at line 83 of file dirauth_periodic.c.
Referenced by options_act_dirauth().
|
static |
Periodic callback: if we're an authority, record our measured stability information from rephist in an mtbf file.
Definition at line 95 of file dirauth_periodic.c.
|
static |
Periodic callback: if we're the bridge authority, write a networkstatus file to disk.
Definition at line 147 of file dirauth_periodic.c.