Tor  0.4.7.0-alpha-dev
vote_routerstatus_st.h
Go to the documentation of this file.
1 /* Copyright (c) 2001 Matej Pfajfar.
2  * Copyright (c) 2001-2004, Roger Dingledine.
3  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4  * Copyright (c) 2007-2021, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 /**
8  * @file vote_routerstatus_st.h
9  * @brief Routerstatus (vote entry) structure
10  **/
11 #ifndef VOTE_ROUTERSTATUS_ST_H
12 #define VOTE_ROUTERSTATUS_ST_H
13 
15 #include "lib/defs/x25519_sizes.h"
16 
17 /** The claim about a single router, made in a vote. */
19  routerstatus_t status; /**< Underlying 'status' object for this router.
20  * Flags are redundant. */
21  /** How many known-flags are allowed in a vote? This is the width of
22  * the flags field of vote_routerstatus_t */
23 #define MAX_KNOWN_FLAGS_IN_VOTE 64
24  uint64_t flags; /**< Bit-field for all recognized flags; index into
25  * networkstatus_t.known_flags. */
26  char *version; /**< The version that the authority says this router is
27  * running. */
28  char *protocols; /**< The protocols that this authority says this router
29  * provides. */
30  unsigned int has_measured_bw:1; /**< The vote had a measured bw */
31  /** True iff the vote included an entry for ed25519 ID, or included
32  * "id ed25519 none" to indicate that there was no ed25519 ID. */
33  unsigned int has_ed25519_listing:1;
34  /** True if the Ed25519 listing here is the consensus-opinion for the
35  * Ed25519 listing; false if there was no consensus on Ed25519 key status,
36  * or if this VRS doesn't reflect it. */
38  uint32_t measured_bw_kb; /**< Measured bandwidth (capacity) of the router */
39  /** The hash or hashes that the authority claims this microdesc has. */
41  /** Ed25519 identity for this router, or zero if it has none. */
43 };
44 
45 #endif /* !defined(VOTE_ROUTERSTATUS_ST_H) */
Routerstatus (consensus entry) structure.
uint8_t ed25519_id[ED25519_PUBKEY_LEN]
unsigned int has_ed25519_listing
vote_microdesc_hash_t * microdesc
unsigned int ed25519_reflects_consensus
Definitions for sizes of x25519 keys and elements.
#define ED25519_PUBKEY_LEN
Definition: x25519_sizes.h:27