vote_routerstatus_st.h 1.8 KB

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