Tor
0.4.7.0-alpha-dev
|
Header file for dirvote.c. More...
Go to the source code of this file.
Macros | |
#define | MIN_VOTE_SECONDS 2 |
#define | MIN_VOTE_SECONDS_TESTING 2 |
#define | MIN_DIST_SECONDS 2 |
#define | MIN_DIST_SECONDS_TESTING 2 |
#define | MIN_VOTE_INTERVAL 300 |
#define | MIN_VOTE_INTERVAL_TESTING (((MIN_VOTE_SECONDS_TESTING)+(MIN_DIST_SECONDS_TESTING)+1)*2) |
#define | MIN_VOTE_INTERVAL_TESTING_INITIAL ((MIN_VOTE_SECONDS_TESTING)+(MIN_DIST_SECONDS_TESTING)+1) |
#define | MIN_SUPPORTED_CONSENSUS_METHOD 28 |
#define | MAX_SUPPORTED_CONSENSUS_METHOD 31 |
#define | MIN_METHOD_FOR_CANONICAL_FAMILIES_IN_MICRODESCS 29 |
#define | MIN_METHOD_FOR_UNPADDED_NTOR_KEY 30 |
#define | MIN_METHOD_FOR_CORRECT_BWWEIGHTSCALE 31 |
#define | DEFAULT_MAX_UNMEASURED_BW_KB 20 |
#define | DGV_BY_ID 1 |
#define | DGV_INCLUDE_PENDING 2 |
#define | DGV_INCLUDE_PREVIOUS 4 |
#define | MAX_BW_FILE_HEADERS_LINE_LEN 1024 |
Functions | |
static time_t | dirvote_act (const or_options_t *options, time_t now) |
static void | dirvote_free_all (void) |
static void | dirvote_parse_sr_commits (networkstatus_t *ns, const smartlist_t *tokens) |
static void | dirvote_clear_commits (networkstatus_t *ns) |
static void | dirvote_dirreq_get_status_vote (const char *url, smartlist_t *items, smartlist_t *dir_items) |
static struct pending_vote_t * | dirvote_add_vote (const char *vote_body, time_t time_posted, const char *where_from, const char **msg_out, int *status_out) |
static int | dirvote_add_signatures (const char *detached_signatures_body, const char *source, const char **msg_out) |
const char * | dirvote_get_pending_consensus (consensus_flavor_t flav) |
uint32_t | dirserv_get_bandwidth_for_router_kb (const routerinfo_t *ri) |
const char * | dirvote_get_pending_detached_signatures (void) |
const cached_dir_t * | dirvote_get_vote (const char *fp, int flags) |
networkstatus_t * | dirserv_generate_networkstatus_vote_obj (crypto_pk_t *private_key, authority_cert_t *cert) |
vote_microdesc_hash_t * | dirvote_format_all_microdesc_vote_lines (const routerinfo_t *ri, time_t now, smartlist_t *microdescriptors_out) |
Variables | |
const char | DIRVOTE_UNIVERSAL_FLAGS [] |
const char | DIRVOTE_OPTIONAL_FLAGS [] |
#define DEFAULT_MAX_UNMEASURED_BW_KB 20 |
#define MAX_BW_FILE_HEADERS_LINE_LEN 1024 |
#define MAX_SUPPORTED_CONSENSUS_METHOD 31 |
#define MIN_DIST_SECONDS 2 |
#define MIN_DIST_SECONDS_TESTING 2 |
#define MIN_METHOD_FOR_CANONICAL_FAMILIES_IN_MICRODESCS 29 |
#define MIN_METHOD_FOR_CORRECT_BWWEIGHTSCALE 31 |
#define MIN_METHOD_FOR_UNPADDED_NTOR_KEY 30 |
#define MIN_SUPPORTED_CONSENSUS_METHOD 28 |
#define MIN_VOTE_INTERVAL 300 |
#define MIN_VOTE_INTERVAL_TESTING (((MIN_VOTE_SECONDS_TESTING)+(MIN_DIST_SECONDS_TESTING)+1)*2) |
Lowest allowable voting interval when TestingTorNetwork is 1: Voting Interval can be: 10, 12, 15, 18, 20, 24, 25, 30, 36, 40, 45, 50, 60, ... Testing Initial Voting Interval can be: 5, 6, 8, 9, or any of the possible values for Voting Interval, as they both need to evenly divide 30 minutes. If clock desynchronisation is an issue, use an interval of at least: 18 * drift in seconds, to allow for a clock slop factor
#define MIN_VOTE_SECONDS 2 |
#define MIN_VOTE_SECONDS_TESTING 2 |
networkstatus_t* dirserv_generate_networkstatus_vote_obj | ( | crypto_pk_t * | private_key, |
authority_cert_t * | cert | ||
) |
uint32_t dirserv_get_bandwidth_for_router_kb | ( | const routerinfo_t * | ri | ) |
vote_microdesc_hash_t* dirvote_format_all_microdesc_vote_lines | ( | const routerinfo_t * | ri, |
time_t | now, | ||
smartlist_t * | microdescriptors_out | ||
) |
const char* dirvote_get_pending_consensus | ( | consensus_flavor_t | flav | ) |
const char* dirvote_get_pending_detached_signatures | ( | void | ) |
const cached_dir_t* dirvote_get_vote | ( | const char * | fp, |
int | flags | ||
) |
Return a given vote specified by fp. If by_id, return the vote for the authority with the v3 authority identity key digest fp; if by_id is false, return the vote whose digest is fp. If fp is NULL, return our own vote. If include_previous is false, do not consider any votes for a consensus that's already been built. If include_pending is false, do not consider any votes for the consensus that's in progress. May return NULL if we have no vote for the authority in question.
|
extern |