states. See Section 4.1.10 for explanations. (Only a few of the
status events are available as getinfo's currently. Let us know if
you want more exposed.)
+ "status/version/recommended" -- List of currently recommended versions
+ "status/version/current" -- Status of the current version. One of:
+ new, old, unrecommended, recommended, new in series, obsolete.
+ "status/version/num-versioning" -- Number of versioning authorities
+ "status/version/num-concurring" -- Number of versioning authorities
+ agreeing on the status of the current version
Examples:
C: GETINFO version desc/name/moria1
/** Look at address, and rewrite it until it doesn't want any
* more rewrites; but don't get into an infinite loop.
* Don't write more than maxlen chars into address. Return true if the
- * address changed; false otherwise.
- * DOCDOC expires_out
+ * address changed; false otherwise. Set *<b>expires_out</b> to the
+ * expiry time of the result, or to <b>time_max</b> if the result does
+ * not expire.
*/
int
addressmap_rewrite(char *address, size_t maxlen, time_t *expires_out)
/** If we have a cached reverse DNS entry for the address stored in the
* <b>maxlen</b>-byte buffer <b>address</b> (typically, a dotted quad) then
- * rewrite to the cached value and return 1. Otherwise return 0.
- * DOCDOC expires_out */
+ * rewrite to the cached value and return 1. Otherwise return 0. Set
+ * *<b>expires_out</b> to the expiry time of the result, or to <b>time_max</b>
+ * if the result does not expire. */
static int
addressmap_rewrite_reverse(char *address, size_t maxlen, time_t *expires_out)
{
DOC("status/enough-dir-info",
"Whether we have enough up-to-date directory information to build "
"circuits."),
- /* DOCDOC specify status/version/ */
DOC("status/version/recommended", "List of currently recommended versions."),
DOC("status/version/current", "Status of the current version."),
DOC("status/version/num-versioning", "Number of versioning authorities."),
* about. This list is kept sorted by published_on. */
static smartlist_t *networkstatus_list = NULL;
-/** DOCDOC */
+/** Most recently received v3 consensus network status. */
static networkstatus_vote_t *current_consensus = NULL;
/** Global list of local_routerstatus_t for each router, known or unknown.
trusted_dir_servers_certs_changed = 0;
}
-/** DOCDOC */
+/** Remove all v3 authority certificates that have been superseded for more
+ * than 48 hours. (If the most recent cert was published more than 48 hours
+ * ago, then we aren't going to get any consensuses signed with older
+ * keys.) */
static void
trusted_dirs_remove_old_certs(void)
{
- /* Any certificate that has been superseded for more than 48 hours is
- * irrelevant. */
#define OLD_CERT_LIFETIME (48*60*60)
SMARTLIST_FOREACH(trusted_dir_servers, trusted_dir_server_t *, ds,
{
trusted_dirs_flush_certs_to_disk();
}
-/** DOCDOC */
+/** Return the v3 authority certificate with signing key matching
+ * <b>sk_digest</b>, for the authority with identity digest <b>id_digest</b>.
+ * Return NULL if no such authority is known. */
authority_cert_t *
authority_cert_get_by_digests(const char *id_digest,
const char *sk_digest)
return NULL;
}
-/** DOCDOC */
+/** Return the most recent consensus that we have downloaded, or NULL if we
+ * don't have one. */
networkstatus_vote_t *
networkstatus_get_latest_consensus(void)
{
return current_consensus;
}
-/** DOCDOC */
+/** Return the most recent consensus that we have downloaded, or NULL if it is
+ * no longer live. */
networkstatus_vote_t *
networkstatus_get_live_consensus(time_t now)
{
return ns;
}
-/** DOCDOC */
+/** Parse a v3 networkstatus vote (if <b>is_vote</b> is true) or a v3
+ * networkstatus consensus (if <b>is_vote</b> is false) from <b>s</b>, and
+ * return the result. Return NULL on failure. */
networkstatus_vote_t *
networkstatus_parse_vote_from_string(const char *s, int is_vote)
{
return ns;
}
-/** DOCDOC */
+/** Parse a detached v3 networkstatus signature document between <b>s</b> and
+ * <b>eos</b> and return the result. Return -1 on failure. */
ns_detached_signatures_t *
networkstatus_parse_detached_signatures(const char *s, const char *eos)
{