r14016@catbus: nickm | 2007-07-30 13:45:55 -0400

More documentation


svn:r10992
This commit is contained in:
Nick Mathewson
2007-07-30 17:46:14 +00:00
parent 23a345b3c2
commit 34a3a5e2f4
5 changed files with 29 additions and 14 deletions
+6
View File
@@ -505,6 +505,12 @@ $Id$
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
+6 -4
View File
@@ -654,8 +654,9 @@ addressmap_free_all(void)
/** 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)
@@ -693,8 +694,9 @@ 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)
{
-1
View File
@@ -1613,7 +1613,6 @@ static const getinfo_item_t getinfo_items[] = {
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."),
+12 -7
View File
@@ -65,7 +65,7 @@ static routerlist_t *routerlist = NULL;
* 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.
@@ -284,12 +284,13 @@ trusted_dirs_flush_certs_to_disk(void)
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,
{
@@ -313,7 +314,9 @@ trusted_dirs_remove_old_certs(void)
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)
@@ -3816,14 +3819,16 @@ networkstatus_get_by_digest(const char *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)
{
+5 -2
View File
@@ -1787,7 +1787,9 @@ networkstatus_parse_from_string(const char *s)
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)
{
@@ -2103,7 +2105,8 @@ 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)
{