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