tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

vote_routerstatus_st.h (2070B)


      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 
     14 #include "feature/nodelist/routerstatus_st.h"
     15 #include "lib/defs/x25519_sizes.h"
     16 
     17 /** The claim about a single router, made in a vote. */
     18 struct vote_routerstatus_t {
     19  routerstatus_t status; /**< Underlying 'status' object for this router.
     20                          * Flags are redundant. */
     21  time_t published_on; /**< When was this router published? */
     22  /** How many known-flags are allowed in a vote? This is the width of
     23   * the flags field of vote_routerstatus_t */
     24 #define MAX_KNOWN_FLAGS_IN_VOTE 64
     25  uint64_t flags; /**< Bit-field for all recognized flags; index into
     26                   * networkstatus_t.known_flags. */
     27  char *version; /**< The version that the authority says this router is
     28                  * running. */
     29  char *protocols; /**< The protocols that this authority says this router
     30                    * provides. */
     31  unsigned int has_measured_bw:1; /**< The vote had a measured bw */
     32  /** True iff the vote included an entry for ed25519 ID, or included
     33   * "id ed25519 none" to indicate that there was no ed25519 ID. */
     34  unsigned int has_ed25519_listing:1;
     35  /** True if the Ed25519 listing here is the consensus-opinion for the
     36   * Ed25519 listing; false if there was no consensus on Ed25519 key status,
     37   * or if this VRS doesn't reflect it. */
     38  unsigned int ed25519_reflects_consensus:1;
     39  uint32_t measured_bw_kb; /**< Measured bandwidth (capacity) of the router */
     40  /** The hash or hashes that the authority claims this microdesc has. */
     41  vote_microdesc_hash_t *microdesc;
     42  /** Ed25519 identity for this router, or zero if it has none. */
     43  uint8_t ed25519_id[ED25519_PUBKEY_LEN];
     44 };
     45 
     46 #endif /* !defined(VOTE_ROUTERSTATUS_ST_H) */