Tor
0.4.7.0-alpha-dev
|
Compute information about our voting schedule as a directory authority. More...
#include "feature/dirauth/voting_schedule.h"
#include "core/or/or.h"
#include "app/config/config.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/networkstatus_st.h"
Go to the source code of this file.
Macros | |
#define | voting_schedule_free(s) FREE_AND_NULL(voting_schedule_t, voting_schedule_free_, (s)) |
Functions | |
static voting_schedule_t * | create_voting_schedule (const or_options_t *options, time_t now, int severity) |
static void | voting_schedule_free_ (voting_schedule_t *voting_schedule_to_free) |
static const voting_schedule_t * | dirauth_get_voting_schedule (void) |
time_t | dirauth_sched_get_next_valid_after_time (void) |
time_t | dirauth_sched_get_cur_valid_after_time (void) |
int | dirauth_sched_get_configured_interval (void) |
void | dirauth_sched_recalculate_timing (const or_options_t *options, time_t now) |
Variables | |
voting_schedule_t | voting_schedule |
Compute information about our voting schedule as a directory authority.
Definition in file voting_schedule.c.
|
static |
Return the current voting schedule, recreating it if necessary.
Dirauth only.
Definition at line 104 of file voting_schedule.c.
Referenced by dirauth_sched_get_cur_valid_after_time(), and dirauth_sched_get_next_valid_after_time().
int dirauth_sched_get_configured_interval | ( | void | ) |
Return the voting interval that we are configured to use.
Dirauth only.
Definition at line 168 of file voting_schedule.c.
time_t dirauth_sched_get_cur_valid_after_time | ( | void | ) |
Return our best idea of what the valid-after time for the current consensus, whether we have one or not.
Dirauth only.
Definition at line 153 of file voting_schedule.c.
time_t dirauth_sched_get_next_valid_after_time | ( | void | ) |
Return the next voting valid-after time.
Dirauth only.
Definition at line 141 of file voting_schedule.c.
Referenced by sr_state_init().
void dirauth_sched_recalculate_timing | ( | const or_options_t * | options, |
time_t | now | ||
) |
Set voting_schedule to hold the timing for the next vote we should be doing. All type of tor do that because HS subsystem needs the timing as well to function properly.
Definition at line 177 of file voting_schedule.c.
Referenced by options_act_dirauth().
|
static |
Frees a voting_schedule_t. This should be used instead of the generic tor_free.
Definition at line 89 of file voting_schedule.c.