Extrainfo Descriptor
********************

Parsing for Tor extra-info descriptors. These are published by relays
whenever their server descriptor is published and have a similar
format. However, unlike server descriptors these don’t contain
information that Tor clients require to function and as such aren’t
fetched by default.

Defined in section 2.1.2 of the dir-spec, extra-info descriptors
contain interesting but non-vital information such as usage
statistics. Tor clients cannot request these documents for bridges.

Extra-info descriptors are available from a few sources…

* If you have ‘DownloadExtraInfo 1’ in your torrc…

   * control port via ‘GETINFO extra-info/digest/*’ queries

   * the ‘cached-extrainfo’ file in tor’s data directory

* Archived descriptors provided by CollecTor.

* Directory authorities and mirrors via their DirPort.

**Module Overview:**

   ExtraInfoDescriptor - Tor extra-info descriptor.
     |- RelayExtraInfoDescriptor - Extra-info descriptor for a relay.
     |- BridgeExtraInfoDescriptor - Extra-info descriptor for a bridge.
     |
     +- digest - calculates the upper-case hex digest value for our content

stem.descriptor.extrainfo_descriptor.DirResponse(enum)

   Enumeration for known statuses for ExtraInfoDescriptor’s
   dir_*_responses.

   +---------------------+--------------------------------------------------------+
   | DirResponse         | Description                                            |
   |=====================|========================================================|
   | **OK**              | network status requests that were answered             |
   +---------------------+--------------------------------------------------------+
   | **NOT_ENOUGH_SIGS** | network status wasn’t signed by enough authorities     |
   +---------------------+--------------------------------------------------------+
   | **UNAVAILABLE**     | requested network status was unavailable               |
   +---------------------+--------------------------------------------------------+
   | **NOT_FOUND**       | requested network status was not found                 |
   +---------------------+--------------------------------------------------------+
   | **NOT_MODIFIED**    | network status unmodified since If-Modified-Since time |
   +---------------------+--------------------------------------------------------+
   | **BUSY**            | directory was busy                                     |
   +---------------------+--------------------------------------------------------+

stem.descriptor.extrainfo_descriptor.DirStat(enum)

   Enumeration for known stats for ExtraInfoDescriptor’s
   dir_*_direct_dl and dir_*_tunneled_dl.

   +-----------------------+---------------------------------------------------------------+
   | DirStat               | Description                                                   |
   |=======================|===============================================================|
   | **COMPLETE**          | requests that completed successfully                          |
   +-----------------------+---------------------------------------------------------------+
   | **TIMEOUT**           | requests that didn’t complete within a ten minute timeout     |
   +-----------------------+---------------------------------------------------------------+
   | **RUNNING**           | requests still in process when measurement’s taken            |
   +-----------------------+---------------------------------------------------------------+
   | **MIN**               | smallest rate at which a descriptor was downloaded in B/s     |
   +-----------------------+---------------------------------------------------------------+
   | **MAX**               | largest rate at which a descriptor was downloaded in B/s      |
   +-----------------------+---------------------------------------------------------------+
   | **D1-4** and **D6-9** | rate of the slowest x/10 download rates in B/s                |
   +-----------------------+---------------------------------------------------------------+
   | **Q1** and **Q3**     | rate of the slowest and fastest quarter download rates in B/s |
   +-----------------------+---------------------------------------------------------------+
   | **MD**                | median download rate in B/s                                   |
   +-----------------------+---------------------------------------------------------------+
