Module routerdesc

Source
Available on crate feature routerdesc only.
Expand description

A “router descriptor” is a signed statement that a relay makes about itself, explaining its keys, its capabilities, its location, and its status.

Relays upload their router descriptors to authorities, which use them to build consensus documents. Old clients and relays used to fetch and use router descriptors for all the relays, but nowadays they use microdescriptors instead.

Clients still use router descriptors when communicating with bridges: since bridges are not passed through an authority, clients accept their descriptors directly.

For full information about the router descriptor format, see dir-spec.txt.

§Limitations

TODO: This needs to get tested much more!

TODO: This implementation can be memory-inefficient. In practice, it gets really expensive storing policy entries, family descriptions, parsed keys, and things like that. We will probably want to de-duplicate those.

TODO: There should be accessor functions for some or all of the fields in RouterDesc. I’m deferring those until I know what they should be.

§Availability

Most of this module is only available when this crate is built with the routerdesc feature enabled.

Structs§

AnnotatedRouterDesc
A router descriptor, with possible annotations.
RouterAnnotation
Annotations about a router descriptor, as stored on disc.
RouterDesc
Information about a relay, parsed from a router descriptor.
RouterReader
An iterator that parses one or more (possibly annotated router descriptors from a string.

Enums§

RelayPlatform
Description of the software a relay is running.

Type Aliases§

RdDigest
The digest of a RouterDesc document, as reported in a NS consensus.
UncheckedRouterDesc
A parsed router descriptor whose signatures and/or validity times may or may not be invalid.