Expand description
Parsing implementation for networkstatus documents.
In Tor, a networkstatus documents describes a complete view of the relays in the network: how many there are, how to contact them, and so forth.
A networkstatus document can either be a “votes” – an authority’s view of the network, used as input to the voting process – or a “consensus” – a combined view of the network based on multiple authorities’ votes, and signed by multiple authorities.
A consensus document can itself come in two different flavors: a “ns”-flavored consensus has references to router descriptors, and a “microdesc”-flavored consensus has references to microdescriptors.
To keep an up-to-date view of the network, clients download microdescriptor-flavored consensuses periodically, and then download whatever microdescriptors the consensus lists that the client doesn’t already have.
For full information about the network status format, see dir-spec.txt.
§Limitations
NOTE: The consensus format has changes time, using a “consensus-method” mechanism. This module is does not yet handle all all historical consensus-methods.
NOTE: This module does parse some fields that are not in current use, like relay nicknames, and the “published” times on microdescriptors. We should probably decide whether we actually want to do this.
TODO: This module doesn’t implement vote parsing at all yet.
TODO: This module doesn’t implement ns-flavored consensuses.
TODO: More testing is needed!
TODO: There should be accessor functions for most of the fields here. As with the other tor-netdoc types, I’m deferring those till I know what they should be.
Structs§
- Common
Header - Parts of the networkstatus header that are present in every networkstatus.
- Consensus
- A single microdescriptor consensus netstatus
- Consensus
Builder build_docs
- A builder object used to construct a consensus.
- Consensus
Header - The header of a consensus networkstatus.
- Consensus
Voter Info - All information about a single authority, as represented in a consensus
- DirSource
- Description of an authority’s identity and address.
- Footer
- The signed footer of a consensus netstatus.
- Lifetime
- The lifetime of a networkstatus document.
- MdConsensus
Router Status - A single relay’s status, as represented in a microdesc consensus.
- NetParams
- A set of named network parameters.
- NsConsensus
Router Status ns_consensus
- A single relay’s status, as represented in a “ns” consensus.
- Proto
Status - A list of subprotocol versions that implementors should/must provide.
- Proto
Statuses - A set of recommended and required protocols when running in various scenarios.
- Relay
Flags - A set of recognized directory flags on a single relay.
- Router
Status Builder build_docs
- A Builder object for creating a RouterStatus and adding it to a consensus.
- Shared
Rand Status - A shared-random value produced by the directory authorities, along with meta-information about that value.
- Shared
Rand Val - A shared random value produced by the directory authorities.
- Signature
- The signature of a single directory authority on a networkstatus document.
- Signature
Group - A collection of signatures that can be checked on a networkstatus document
- Unvalidated
Consensus - A Microdesc consensus whose signatures have not yet been checked.
Enums§
- Consensus
Flavor - A recognized ‘flavor’ of consensus document.
- Netstatus
Kwd - Keywords that can be used in votes and consensuses.
- Protocol
Support Error - A subprotocol that is recommended or required in the consensus was not present.
- Relay
Weight - Recognized weight fields on a single relay in a consensus
Traits§
- Parse
Router Status - Trait to parse a single relay as listed in a consensus document.
- Router
Status - Represents a single relay as listed in a consensus document.
Type Aliases§
- MdConsensus
- A consensus document that lists relays along with their microdescriptor documents.
- NsConsensus
ns_consensus
- A consensus document that lists relays along with their router descriptor documents.
- Unchecked
Consensus - A Consensus object that has been parsed, but not checked for signatures and timeliness.
- Unchecked
MdConsensus - An MdConsensus that has been parsed but not checked for signatures and timeliness.
- Unchecked
NsConsensus ns_consensus
- An NsConsensus that has been parsed but not checked for signatures and timeliness.
- Unvalidated
MdConsensus - An MdConsensus that has been parsed and checked for timeliness, but not for signatures.
- Unvalidated
NsConsensus ns_consensus
- An NsConsensus that has been parsed and checked for timeliness, but not for signatures.