summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-07-30 17:46:14 +0000
committerNick Mathewson <nickm@torproject.org>2007-07-30 17:46:14 +0000
commit34a3a5e2f4a1eb0c3256cccd22e1efae8584e946 (patch)
tree848f32355f754698583663e31ce4b22561cd6923
parent23a345b3c2e7877d3cc4821ec1764f885fa01b2f (diff)
downloadtor-34a3a5e2f4a1eb0c3256cccd22e1efae8584e946.tar.gz
tor-34a3a5e2f4a1eb0c3256cccd22e1efae8584e946.zip
r14016@catbus: nickm | 2007-07-30 13:45:55 -0400
More documentation svn:r10992
-rw-r--r--doc/spec/control-spec.txt6
-rw-r--r--src/or/connection_edge.c10
-rw-r--r--src/or/control.c1
-rw-r--r--src/or/routerlist.c19
-rw-r--r--src/or/routerparse.c7
5 files changed, 29 insertions, 14 deletions
diff --git a/doc/spec/control-spec.txt b/doc/spec/control-spec.txt
index 433fd1006f..5aa5d791e1 100644
--- a/doc/spec/control-spec.txt
+++ b/doc/spec/control-spec.txt
@@ -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
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index efea1464bf..8e90d55b4a 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -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)
{
diff --git a/src/or/control.c b/src/or/control.c
index 61f642df05..94fd90fd77 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -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."),
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index f25be67935..0cff1709fd 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -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)
{
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index db0c7d72b9..0f510289dc 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -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)
{