tor
master
|
This file contains functions that are from the shared random subsystem but used by many part of tor. The full feature is built as part of the dirauth module. More...
#include "shared_random_client.h"
#include "config.h"
#include "voting_schedule.h"
#include "networkstatus.h"
#include "util.h"
#include "util_format.h"
Functions | |
int | get_voting_interval (void) |
time_t | get_start_time_of_current_round (void) |
void | sr_srv_encode (char *dst, size_t dst_len, const sr_srv_t *srv) |
char * | sr_get_current_for_control (void) |
char * | sr_get_previous_for_control (void) |
const sr_srv_t * | sr_get_current (const networkstatus_t *ns) |
const sr_srv_t * | sr_get_previous (const networkstatus_t *ns) |
sr_srv_t * | sr_parse_srv (const smartlist_t *args) |
time_t | sr_state_get_start_time_of_current_protocol_run (time_t now) |
unsigned int | sr_state_get_phase_duration (void) |
unsigned int | sr_state_get_protocol_run_duration (void) |
This file contains functions that are from the shared random subsystem but used by many part of tor. The full feature is built as part of the dirauth module.
unsigned int sr_state_get_phase_duration | ( | void | ) |
Return the time (in seconds) it takes to complete a full SR protocol phase (e.g. the commit phase).
unsigned int sr_state_get_protocol_run_duration | ( | void | ) |
Return the time (in seconds) it takes to complete a full SR protocol run
time_t sr_state_get_start_time_of_current_protocol_run | ( | time_t | now | ) |
Return the start time of the current SR protocol run. For example, if the time is 23/06/2017 23:47:08 and a full SR protocol run is 24 hours, this function should return 23/06/2017 00:00:00.