tor  master
Macros | Functions
shared_random_client.h File Reference

Header file for shared_random_client.c. More...

#include "dirauth/shared_random.h"
Include dependency graph for shared_random_client.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SHARED_RANDOM_N_ROUNDS   12
 
#define SHARED_RANDOM_N_PHASES   2
 

Functions

void sr_srv_encode (char *dst, size_t dst_len, const sr_srv_t *srv)
 
int get_voting_interval (void)
 
char * sr_get_current_for_control (void)
 
char * sr_get_previous_for_control (void)
 
const sr_srv_tsr_get_current (const networkstatus_t *ns)
 
const sr_srv_tsr_get_previous (const networkstatus_t *ns)
 
sr_srv_tsr_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)
 
time_t get_start_time_of_current_round (void)
 

Detailed Description

Header file for shared_random_client.c.

Function Documentation

◆ sr_state_get_phase_duration()

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).

Here is the caller graph for this function:

◆ sr_state_get_protocol_run_duration()

unsigned int sr_state_get_protocol_run_duration ( void  )

Return the time (in seconds) it takes to complete a full SR protocol run

Here is the caller graph for this function:

◆ sr_state_get_start_time_of_current_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.