diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-10-26 11:02:57 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-10-26 11:02:57 -0400 |
commit | a5f07a6c2a2b937f58548680f9b87b1e75b3c8f8 (patch) | |
tree | aaa54fc517996ec8251044d60b97420b112286d7 /src/or/networkstatus.c | |
parent | 04b8af9dc0389e8a3d1779e883b999240dec3a2b (diff) | |
download | tor-a5f07a6c2a2b937f58548680f9b87b1e75b3c8f8.tar.gz tor-a5f07a6c2a2b937f58548680f9b87b1e75b3c8f8.zip |
More module-level documentation.
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r-- | src/or/networkstatus.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index f30fe1607c..85a73c8e63 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -6,8 +6,34 @@ /** * \file networkstatus.c - * \brief Functions and structures for handling network status documents as a - * client or cache. + * \brief Functions and structures for handling networkstatus documents as a + * client or as a directory cache. + * + * A consensus networkstatus object is created by the directory + * authorities. It authenticates a set of network parameters--most + * importantly, the list of all the relays in the network. This list + * of relays is represented as an array of routerstatus_t objects. + * + * There are currently two flavors of consensus. With the older "NS" + * flavor, each relay is associated with a digest of its router + * descriptor. Tor instances that use this consensus keep the list of + * router descriptors as routerinfo_t objects stored and managed in + * routerlist.c. With the newer "microdesc" flavor, each relay is + * associated with a digest of the microdescriptor that the authorities + * made for it. These are stored and managed in microdesc.c. Information + * about the router is divided between the the networkstatus and the + * microdescriptor according to the general rule that microdescriptors + * should hold information that changes much less frequently than the + * information in the networkstatus. + * + * Modern clients use microdescriptor networkstatuses. Directory caches + * need to keep both kinds of networkstatus document, so they can serve them. + * + * This module manages fetching, holding, storing, updating, and + * validating networkstatus objects. The download-and-validate process + * is slightly complicated by the fact that the keys you need to + * validate a consensus are stored in the authority certificates, which + * you might not have yet when you download the consensus. */ #define NETWORKSTATUS_PRIVATE |