[or-cvs] r9477: Removing the last DOCDOC comment hurt so much that I had to (in tor/trunk: . src/common src/or)

nickm at seul.org nickm at seul.org
Fri Feb 2 20:06:47 UTC 2007


Author: nickm
Date: 2007-02-02 15:06:43 -0500 (Fri, 02 Feb 2007)
New Revision: 9477

Modified:
   tor/trunk/
   tor/trunk/src/common/compat.c
   tor/trunk/src/common/container.c
   tor/trunk/src/common/container.h
   tor/trunk/src/common/crypto.c
   tor/trunk/src/common/crypto.h
   tor/trunk/src/common/log.h
   tor/trunk/src/common/torgzip.c
   tor/trunk/src/common/torgzip.h
   tor/trunk/src/common/tortls.c
   tor/trunk/src/common/tortls.h
   tor/trunk/src/common/util.c
   tor/trunk/src/common/util.h
   tor/trunk/src/or/buffers.c
   tor/trunk/src/or/circuitbuild.c
   tor/trunk/src/or/circuitlist.c
   tor/trunk/src/or/circuituse.c
   tor/trunk/src/or/config.c
   tor/trunk/src/or/connection_edge.c
   tor/trunk/src/or/connection_or.c
   tor/trunk/src/or/control.c
   tor/trunk/src/or/directory.c
   tor/trunk/src/or/dirserv.c
   tor/trunk/src/or/dns.c
   tor/trunk/src/or/hibernate.c
   tor/trunk/src/or/main.c
   tor/trunk/src/or/onion.c
   tor/trunk/src/or/or.h
   tor/trunk/src/or/policies.c
   tor/trunk/src/or/rephist.c
   tor/trunk/src/or/router.c
   tor/trunk/src/or/routerlist.c
   tor/trunk/src/or/routerparse.c
Log:
 r11629 at catbus:  nickm | 2007-02-02 15:06:17 -0500
 Removing the last DOCDOC comment hurt so much that I had to use Doxygen to identify undocumented macros and comments, and add 150 more DOCDOCs to point out where they were.  Oops.  Hey, kids!  Fixing some of these could be your first Tor patch!



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r11629] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/common/compat.c
===================================================================
--- tor/trunk/src/common/compat.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/common/compat.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -107,17 +107,20 @@
 #include "strlcat.c"
 #endif
 
-/* used by inet_addr, not defined on solaris anywhere!? */
 #ifndef INADDR_NONE
+/* This is used by inet_addr, but apparently Solaris doesn't define it
+ * anyplace. */
 #define INADDR_NONE ((unsigned long) -1)
 #endif
 
 #ifdef HAVE_SYS_MMAN_H
+/** DOCDOC */
 typedef struct tor_mmap_impl_t {
   tor_mmap_t base;
   size_t mapping_size; /**< Size of the actual mapping. (This is this file
                         * size, rounded up to the nearest page.) */
 } tor_mmap_impl_t;
+/** DOCDOC */
 tor_mmap_t *
 tor_mmap_file(const char *filename)
 {
@@ -165,6 +168,7 @@
 
   return &(res->base);
 }
+/** DOCDOC */
 void
 tor_munmap_file(tor_mmap_t *handle)
 {
@@ -174,6 +178,7 @@
   tor_free(h);
 }
 #elif defined(MS_WINDOWS)
+/** DOCDOC */
 typedef struct win_mmap_t {
   tor_mmap_t base;
   HANDLE file_handle;
@@ -966,6 +971,7 @@
   void (*func)(void *);
   void *data;
 } tor_pthread_data_t;
+/** DOCDOC */
 static void *
 tor_pthread_helper_fn(void *_data)
 {
@@ -1092,6 +1098,8 @@
 }
 
 #if defined(TOR_IS_MULTITHREADED) && !defined(MS_WINDOWS)
+/** Defined iff we need to add locks when defining fake versions of reentrant
+ * versions of time-related functions. */
 #define TIME_FNS_NEED_LOCKS
 #endif
 
@@ -1206,6 +1214,7 @@
 struct tor_mutex_t {
   pthread_mutex_t mutex;
 };
+/** DOCDOC */
 tor_mutex_t *
 tor_mutex_new(void)
 {
@@ -1213,18 +1222,21 @@
   pthread_mutex_init(&mutex->mutex, NULL);
   return mutex;
 }
+/** DOCDOC */
 void
 tor_mutex_acquire(tor_mutex_t *m)
 {
   tor_assert(m);
   pthread_mutex_lock(&m->mutex);
 }
+/** DOCDOC */
 void
 tor_mutex_release(tor_mutex_t *m)
 {
   tor_assert(m);
   pthread_mutex_unlock(&m->mutex);
 }
+/** DOCDOC */
 void
 tor_mutex_free(tor_mutex_t *m)
 {
@@ -1232,6 +1244,7 @@
   pthread_mutex_destroy(&m->mutex);
   tor_free(m);
 }
+/** DOCDOC */
 unsigned long
 tor_get_thread_id(void)
 {

Modified: tor/trunk/src/common/container.c
===================================================================
--- tor/trunk/src/common/container.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/common/container.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -28,8 +28,7 @@
 
 #include "ht.h"
 
-/* All newly allocated smartlists have this capacity.
- */
+/** All newly allocated smartlists have this capacity. */
 #define SMARTLIST_DEFAULT_CAPACITY 32
 
 /** Allocate and return an empty smartlist.

Modified: tor/trunk/src/common/container.h
===================================================================
--- tor/trunk/src/common/container.h	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/common/container.h	2007-02-02 20:06:43 UTC (rev 9477)
@@ -11,7 +11,12 @@
 #include "compat.h"
 #include "util.h"
 
-/** A resizeable list of pointers, with associated helpful functionality. */
+/** A resizeable list of pointers, with associated helpful functionality.
+ *
+ * The members of this struct are exposed only so that macros and inlines can
+ * use them; all access to smartlist internals should go throuch the functions
+ * and macros defined here.
+ **/
 typedef struct smartlist_t {
   /** <b>list</b> has enough capacity to store exactly <b>capacity</b> elements
    * before it needs to be resized.  Only the first <b>num_used</b> (\<=

Modified: tor/trunk/src/common/crypto.c
===================================================================
--- tor/trunk/src/common/crypto.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/common/crypto.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -550,7 +550,7 @@
   return 0;
 }
 
-/* Write the private key from 'env' into the file named by 'fname',
+/** Write the private key from 'env' into the file named by 'fname',
  * PEM-encoded.  Return 0 on success, -1 on failure.
  */
 int

Modified: tor/trunk/src/common/crypto.h
===================================================================
--- tor/trunk/src/common/crypto.h	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/common/crypto.h	2007-02-02 20:06:43 UTC (rev 9477)
@@ -160,12 +160,14 @@
 
 int base64_encode(char *dest, size_t destlen, const char *src, size_t srclen);
 int base64_decode(char *dest, size_t destlen, const char *src, size_t srclen);
+/** Characters that can appear (case-insensitively) in a base-32 encoding. */
 #define BASE32_CHARS "abcdefghijklmnopqrstuvwxyz234567"
 void base32_encode(char *dest, size_t destlen, const char *src, size_t srclen);
 
 int digest_to_base64(char *d64, const char *digest);
 int digest_from_base64(char *digest, const char *d64);
 
+/** DOCDOC */
 #define S2K_SPECIFIER_LEN 9
 void secret_to_key(char *key_out, size_t key_out_len, const char *secret,
                    size_t secret_len, const char *s2k_specifier);

Modified: tor/trunk/src/common/log.h
===================================================================
--- tor/trunk/src/common/log.h	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/common/log.h	2007-02-02 20:06:43 UTC (rev 9477)
@@ -90,6 +90,7 @@
 /** Bandwidth accounting. */
 #define LD_ACCT     (1u<<17)
 
+/** DOCDOC */
 typedef void (*log_callback)(int severity, uint32_t domain, const char *msg);
 
 int parse_log_level(const char *level);

Modified: tor/trunk/src/common/torgzip.c
===================================================================
--- tor/trunk/src/common/torgzip.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/common/torgzip.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -299,6 +299,7 @@
   }
 }
 
+/** DOCDOC */
 struct tor_zlib_state_t {
   struct z_stream_s stream;
   int compress;

Modified: tor/trunk/src/common/torgzip.h
===================================================================
--- tor/trunk/src/common/torgzip.h	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/common/torgzip.h	2007-02-02 20:06:43 UTC (rev 9477)
@@ -12,6 +12,7 @@
 #define __TORGZIP_H
 #define TORGZIP_H_ID "$Id$"
 
+/** DOCDOC */
 typedef enum {
   NO_METHOD=0, GZIP_METHOD=1, ZLIB_METHOD=2, UNKNOWN_METHOD=3
 } compress_method_t;
@@ -31,6 +32,7 @@
 
 compress_method_t detect_compression_method(const char *in, size_t in_len);
 
+/** DOCDOC */
 typedef enum {
   TOR_ZLIB_OK, TOR_ZLIB_DONE, TOR_ZLIB_BUF_FULL, TOR_ZLIB_ERR
 }  tor_zlib_output_t;

Modified: tor/trunk/src/common/tortls.c
===================================================================
--- tor/trunk/src/common/tortls.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/common/tortls.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -103,6 +103,7 @@
   }
 }
 
+/** DOCDOC */
 static int
 tor_errno_to_tls_error(int e)
 {
@@ -205,6 +206,7 @@
   }
 }
 
+/** DOCDOC */
 void
 tor_tls_free_all(void)
 {
@@ -720,6 +722,7 @@
   return r;
 }
 
+/** DOCDOC */
 static void
 log_cert_lifetime(X509 *cert, const char *problem)
 {

Modified: tor/trunk/src/common/tortls.h
===================================================================
--- tor/trunk/src/common/tortls.h	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/common/tortls.h	2007-02-02 20:06:43 UTC (rev 9477)
@@ -31,7 +31,7 @@
 #define TOR_TLS_WANTWRITE          -1
 #define TOR_TLS_DONE                0
 
-/* Use this macro in a switch statement to catch _any_ TLS error.  That way,
+/** Use this macro in a switch statement to catch _any_ TLS error.  That way,
  * if more errors are added, your switches will still work. */
 #define CASE_TOR_TLS_ERROR_ANY                  \
   case TOR_TLS_ERROR_MISC:                      \

Modified: tor/trunk/src/common/util.c
===================================================================
--- tor/trunk/src/common/util.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/common/util.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -125,7 +125,7 @@
   return result;
 }
 
-/* Allocate a chunk of <b>size</b> bytes of memory, fill the memory with
+/** Allocate a chunk of <b>size</b> bytes of memory, fill the memory with
  * zero bytes, and return a pointer to the result.  Log and terminate
  * the process on error.  (Same as calloc(size,1), but never returns NULL.)
  */
@@ -361,7 +361,7 @@
   return 1;
 }
 
-/* Compares the first strlen(s2) characters of s1 with s2.  Returns as for
+/** Compares the first strlen(s2) characters of s1 with s2.  Returns as for
  * strcmp.
  */
 int
@@ -371,7 +371,7 @@
   return strncmp(s1, s2, n);
 }
 
-/* Compares the first strlen(s2) characters of s1 with s2.  Returns as for
+/** Compares the first strlen(s2) characters of s1 with s2.  Returns as for
  * strcasecmp.
  */
 int
@@ -381,7 +381,7 @@
   return strncasecmp(s1, s2, n);
 }
 
-/* Compares the last strlen(s2) characters of s1 with s2.  Returns as for
+/** Compares the last strlen(s2) characters of s1 with s2.  Returns as for
  * strcmp.
  */
 int
@@ -394,7 +394,7 @@
     return strncmp(s1+(n1-n2), s2, n2);
 }
 
-/* Compares the last strlen(s2) characters of s1 with s2.  Returns as for
+/** Compares the last strlen(s2) characters of s1 with s2.  Returns as for
  * strcasecmp.
  */
 int
@@ -624,7 +624,7 @@
   }
 }
 
-/** Given a hexadecimal string of <b>srclen</b> bytes in <b>src/b>, decode it
+/** Given a hexadecimal string of <b>srclen</b> bytes in <b>src</b>, decode it
  * and store the result in the <b>destlen</b>-byte buffer at <b>dest</b>.
  * Return 0 on success, -1 on failure. */
 int
@@ -878,7 +878,9 @@
   a->tv_usec %= 1000000;
 }
 
+/** DOCDOC */
 #define IS_LEAPYEAR(y) (!(y % 4) && ((y % 100) || !(y % 400)))
+/** DOCDOC */
 static int
 n_leapdays(int y1, int y2)
 {
@@ -1263,7 +1265,7 @@
 }
 
 /** Helper: given a set of flags as passed to open(2), open the file
- * <b>fname</b> and write all the sized_chunk_t structs in <b>chunks</t> to
+ * <b>fname</b> and write all the sized_chunk_t structs in <b>chunks</b> to
  * the file.  Do so as atomically as possible e.g. by opening temp files and
  * renaming. */
 static int
@@ -1320,7 +1322,7 @@
   return -1;
 }
 
-/* Given a smartlist of sized_chunk_t, write them atomically to a file
+/** Given a smartlist of sized_chunk_t, write them atomically to a file
  * <b>fname</b>, overwriting or creating the file as necessary. */
 int
 write_chunks_to_file(const char *fname, const smartlist_t *chunks, int bin)
@@ -1962,8 +1964,11 @@
 
 #ifndef MS_WINDOWS
 /* Based on code contributed by christian grothoff */
+/** DOCDOC */
 static int start_daemon_called = 0;
+/** DOCDOC */
 static int finish_daemon_called = 0;
+/** DOCDOC */
 static int daemon_filedes[2];
 /** Start putting the process into daemon mode: fork and drop all resources
  * except standard fds.  The parent process never returns, but stays around

Modified: tor/trunk/src/common/util.h
===================================================================
--- tor/trunk/src/common/util.h	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/common/util.h	2007-02-02 20:06:43 UTC (rev 9477)
@@ -39,10 +39,13 @@
 #error "Sorry; we don't support building with NDEBUG."
 #else
 #ifdef __GNUC__
+/** DOCDOC */
 #define PREDICT_FALSE(x) PREDICT((x) == ((typeof(x)) 0), 0)
 #else
 #define PREDICT_FALSE(x) !(x)
 #endif
+
+/** DOCDOC */
 #define tor_assert(expr) do {                                           \
     if (PREDICT_FALSE(expr)) {                                          \
       log(LOG_ERR, LD_BUG, "%s:%d: %s: Assertion %s failed; aborting.", \
@@ -106,6 +109,8 @@
 #endif
 
 /* String manipulation */
+
+/** DOCDOC */
 #define HEX_CHARACTERS "0123456789ABCDEFabcdef"
 void tor_strlower(char *s) ATTR_NONNULL((1));
 void tor_strupper(char *s) ATTR_NONNULL((1));
@@ -118,6 +123,7 @@
 int strcasecmpend(const char *s1, const char *s2)
   ATTR_PURE ATTR_NONNULL((1,2));
 int tor_strstrip(char *s, const char *strip) ATTR_NONNULL((1,2));
+/** DOCDOC */
 typedef enum {
   ALWAYS_TERMINATE, NEVER_TERMINATE, TERMINATE_IF_EVEN
 } part_finish_rule_t;
@@ -163,9 +169,11 @@
 int write_all(int fd, const char *buf, size_t count, int isSocket);
 int read_all(int fd, char *buf, size_t count, int isSocket);
 
+/** DOCDOC */
 typedef enum { FN_ERROR, FN_NOENT, FN_FILE, FN_DIR} file_status_t;
 file_status_t file_status(const char *filename);
 
+/** DOCDOC */
 typedef enum { CPD_NONE, CPD_CREATE, CPD_CHECK } cpd_check_t;
 int check_private_dir(const char *dirname, cpd_check_t check);
 int write_str_to_file(const char *fname, const char *str, int bin);

Modified: tor/trunk/src/or/buffers.c
===================================================================
--- tor/trunk/src/or/buffers.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/buffers.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -22,7 +22,7 @@
 
 #ifdef SENTINELS
 /* If SENTINELS is defined, check for attempts to write beyond the
- * end/before the start of the buffer.
+ * end/before the start of the buffer. DOCDOC macros
  */
 #define START_MAGIC 0x70370370u
 #define END_MAGIC 0xA0B0C0D0u
@@ -49,6 +49,7 @@
 #define INLINE
 #endif
 
+/* DOCDOC */
 #define BUFFER_MAGIC 0xB0FFF312u
 /** A resizeable buffer, optimized for reading and writing. */
 struct buf_t {

Modified: tor/trunk/src/or/circuitbuild.c
===================================================================
--- tor/trunk/src/or/circuitbuild.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/circuitbuild.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -288,7 +288,7 @@
   return circ;
 }
 
-/** Build a new circuit for <b>purpose</b>. If <b>info/b>
+/** Build a new circuit for <b>purpose</b>. If <b>info</b>
  * is defined, then use that as your exit router, else choose a suitable
  * exit node.
  *
@@ -1117,6 +1117,7 @@
   return 0;
 }
 
+/* DOCDOC */
 static int
 ap_stream_wants_exit_attention(connection_t *conn)
 {
@@ -1982,6 +1983,7 @@
 #endif
 }
 
+/* DOCDOC */
 #define NUM_ENTRY_PICK_TRIES 100
 
 /** Add a new (preferably stable and fast) router to our

Modified: tor/trunk/src/or/circuitlist.c
===================================================================
--- tor/trunk/src/or/circuitlist.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/circuitlist.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -48,12 +48,14 @@
   return a->or_conn == b->or_conn && a->circ_id == b->circ_id;
 }
 
+/** DOCDOC */
 static INLINE unsigned int
 _orconn_circid_entry_hash(orconn_circid_circuit_map_t *a)
 {
   return (((unsigned)a->circ_id)<<16) ^ (unsigned)(uintptr_t)(a->or_conn);
 }
 
+/** DOCDOC */
 static HT_HEAD(orconn_circid_map, orconn_circid_circuit_map_t)
      orconn_circid_circuit_map = HT_INITIALIZER();
 HT_PROTOTYPE(orconn_circid_map, orconn_circid_circuit_map_t, node,
@@ -279,6 +281,7 @@
   return circ;
 }
 
+/** DOCDOC */
 or_circuit_t *
 or_circuit_new(uint16_t p_circ_id, or_connection_t *p_conn)
 {

Modified: tor/trunk/src/or/circuituse.c
===================================================================
--- tor/trunk/src/or/circuituse.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/circuituse.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -22,7 +22,7 @@
 static void circuit_expire_old_circuits(time_t now);
 static void circuit_increment_failure_count(void);
 
-/* Return 1 if <b>circ</b> could be returned by circuit_get_best().
+/** Return 1 if <b>circ</b> could be returned by circuit_get_best().
  * Else return 0.
  */
 static int
@@ -112,7 +112,7 @@
   return 1;
 }
 
-/* Return 1 if circuit <b>a</b> is better than circuit <b>b</b> for
+/** Return 1 if circuit <b>a</b> is better than circuit <b>b</b> for
  * <b>purpose</b>, and return 0 otherwise. Used by circuit_get_best.
  */
 static int
@@ -566,8 +566,10 @@
   }
 }
 
+/** DOCDOC */
 #define NUM_PARALLEL_TESTING_CIRCS 4
 
+/** DOCDOC */
 static int have_performed_bandwidth_test = 0;
 
 /** Reset have_performed_bandwidth_test, so we'll start building
@@ -774,6 +776,7 @@
  * circuit_launch_new and circuit_*_failure_count.
  */
 static int n_circuit_failures = 0;
+/** DOCDOC */
 static int did_circs_fail_last_period = 0;
 
 /** Don't retry launching a new circuit if we try this many times with no

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/config.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -102,6 +102,7 @@
   const char *initvalue; /**< String (or null) describing initial value. */
 } config_var_t;
 
+/** DOCDOC */
 #define STRUCT_VAR_P(st, off) \
   ((void*) ( ((char*)st) + off ) )
 
@@ -511,6 +512,7 @@
   { NULL, NULL },
 };
 
+/** DOCDOC */
 typedef int (*validate_fn_t)(void*,void*,int,char**);
 
 /** Information on the keys, value types, key-to-struct-member mappings,
@@ -529,6 +531,7 @@
   config_var_t *extra;
 } config_format_t;
 
+/** DOCDOC */
 #define CHECK(fmt, cfg) do {                                            \
     tor_assert(fmt && cfg);                                             \
     tor_assert((fmt)->magic ==                                          \
@@ -591,8 +594,10 @@
 
 /*static*/ or_options_t *options_new(void);
 
+/** DOCDOC */
 #define OR_OPTIONS_MAGIC 9090909
 
+/** DOCDOC */
 static config_format_t options_format = {
   sizeof(or_options_t),
   OR_OPTIONS_MAGIC,
@@ -604,12 +609,15 @@
   NULL
 };
 
+/** DOCDOC */
 #define OR_STATE_MAGIC 0x57A73f57
 
+/** DOCDOC */
 static config_var_t state_extra_var = {
   "__extra", CONFIG_TYPE_LINELIST, STRUCT_OFFSET(or_state_t, ExtraLines), NULL
 };
 
+/** DOCDOC */
 static config_format_t state_format = {
   sizeof(or_state_t),
   OR_STATE_MAGIC,
@@ -1443,6 +1451,7 @@
   return get_assigned_option(&options_format, options, key);
 }
 
+/** DOCDOC */
 static config_line_t *
 config_lines_dup(const config_line_t *inp)
 {
@@ -1459,6 +1468,7 @@
   return result;
 }
 
+/** DOCDOC */
 static config_line_t *
 get_assigned_option(config_format_t *fmt, or_options_t *options,
                     const char *key)
@@ -2135,7 +2145,7 @@
   }
 }
 
-/* Allocate and return a new string holding the written-out values of the vars
+/** Allocate and return a new string holding the written-out values of the vars
  * in 'options'.  If 'minimal', do not write out any default-valued vars.
  * Else, if comment_defaults, write default values as comments.
  */
@@ -2230,7 +2240,7 @@
   return config_dump(&options_format, options, minimal, 0);
 }
 
-/* Return 0 if every element of sl is a string holding a decimal
+/** Return 0 if every element of sl is a string holding a decimal
  * representation of a port number, or if sl is NULL.
  * Otherwise set *msg and return -1. */
 static int
@@ -3795,6 +3805,7 @@
   { NULL, LE_OTHER }
 };
 
+/** DOCDOC */
 static le_version_t
 decode_libevent_version(void)
 {

Modified: tor/trunk/src/or/connection_edge.c
===================================================================
--- tor/trunk/src/or/connection_edge.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/connection_edge.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -24,7 +24,7 @@
 #define TRANS_PF
 #endif
 
-/* List of exit_redirect_t */
+/** List of exit_redirect_t for every configured RedirectExit. */
 static smartlist_t *redirect_exit_list = NULL;
 
 static int connection_ap_handshake_process_socks(edge_connection_t *conn);
@@ -927,7 +927,7 @@
  * application accidentally tried to connect to them directly (not
  * via Tor), it wouldn't get too far astray.
  *
- * Eventually, we should probably make this configurable.
+ * These options are configured by parse_virtual_addr_network().
  */
 static uint32_t virtual_addr_network = 0x7fc00000u;
 static uint32_t virtual_addr_netmask = 0xffc00000u;
@@ -1182,7 +1182,7 @@
    }
 }
 
-/* Connection <b>conn</b> just finished its socks handshake, or the
+/** Connection <b>conn</b> just finished its socks handshake, or the
  * controller asked us to take care of it. If <b>circ</b> is defined,
  * then that's where we'll want to attach it. Otherwise we have to
  * figure it out ourselves.
@@ -1394,6 +1394,7 @@
                safe_str(conn->rend_query));
       rend_client_refetch_renddesc(conn->rend_query);
     } else { /* r > 0 */
+/** DOCDOC */
 #define NUM_SECONDS_BEFORE_REFETCH (60*15)
       if (time(NULL) - entry->received < NUM_SECONDS_BEFORE_REFETCH) {
         conn->_base.state = AP_CONN_STATE_CIRCUIT_WAIT;

Modified: tor/trunk/src/or/connection_or.c
===================================================================
--- tor/trunk/src/or/connection_or.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/connection_or.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -810,7 +810,9 @@
   return cnt;
 }
 
+/** DOCDOC */
 #define BUF_FULLNESS_THRESHOLD (128*1024)
+/** DOCDOC */
 #define BUF_EMPTINESS_THRESHOLD (96*1024)
 
 /** Return true iff there is so much data waiting to be flushed on <b>conn</b>

Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/control.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -11,8 +11,10 @@
 
 #include "or.h"
 
+/** DOCDOC */
 #define STATE_IS_OPEN(s) ((s) == CONTROL_CONN_STATE_OPEN_V0 ||          \
                           (s) == CONTROL_CONN_STATE_OPEN_V1)
+/** DOCDOC */
 #define STATE_IS_V0(s) ((s) == CONTROL_CONN_STATE_NEEDAUTH_V0 ||        \
                         (s) == CONTROL_CONN_STATE_OPEN_V0)
 
@@ -685,6 +687,7 @@
   }
 }
 
+/** DOCDOC */
 static void
 send_control1_event_impl(uint16_t event, event_format_t which, int extended,
                          const char *format, va_list ap)
@@ -1437,6 +1440,7 @@
   return 0;
 }
 
+/** DOCDOC */
 static int
 getinfo_helper_misc(control_connection_t *conn, const char *question,
                     char **answer)
@@ -1474,6 +1478,7 @@
   return 0;
 }
 
+/** DOCDOC */
 static int
 getinfo_helper_dir(control_connection_t *control_conn,
                    const char *question, char **answer)
@@ -1581,6 +1586,7 @@
   return 0;
 }
 
+/** DOCDOC */
 static int
 getinfo_helper_events(control_connection_t *control_conn,
                       const char *question, char **answer)
@@ -1726,9 +1732,11 @@
   return 0;
 }
 
+/** DOCDOC */
 typedef int (*getinfo_helper_t)(control_connection_t *,
                                 const char *q, char **a);
 
+/** DOCDOC */
 typedef struct getinfo_item_t {
   const char *varname;
   getinfo_helper_t fn;
@@ -1740,6 +1748,7 @@
 #define PREFIX(name, fn, desc) { name, getinfo_helper_##fn, desc, 1 }
 #define DOC(name, desc) { name, NULL, desc, 0 }
 
+/** DOCDOC */
 static const getinfo_item_t getinfo_items[] = {
   ITEM("version", misc, "The current version of Tor."),
   ITEM("config-file", misc, "Current location of the \"torrc\" file."),
@@ -2537,6 +2546,7 @@
   return 0;
 }
 
+/** DOCDOC */
 static int
 handle_control_usefeature(control_connection_t *conn,
                           uint32_t len,
@@ -2966,6 +2976,7 @@
     return connection_control_process_inbuf_v1(conn);
 }
 
+/** DOCDOC */
 static const char *
 circuit_end_reason_to_string(int reason)
 {
@@ -3231,6 +3242,7 @@
   return 0;
 }
 
+/** DOCDOC */
 static void
 orconn_target_get_name(int long_names,
                        char *name, size_t len, or_connection_t *conn)
@@ -3257,6 +3269,7 @@
   }
 }
 
+/** DOCDOC */
 int
 control_tls_error_to_reason(int e)
 {
@@ -3281,6 +3294,7 @@
   }
 }
 
+/** DOCDOC */
 static const char *
 or_conn_end_reason_to_string(int r)
 {
@@ -3309,6 +3323,7 @@
   }
 }
 
+/** DOCDOC */
 int
 control_event_or_conn_status(or_connection_t *conn,or_conn_status_event_t tp,
         int reason)

Modified: tor/trunk/src/or/directory.c
===================================================================
--- tor/trunk/src/or/directory.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/directory.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -56,7 +56,8 @@
 
 #define X_ADDRESS_HEADER "X-Your-Address-Is: "
 
-/* HTTP cache control: how long do we tell proxies they can cache things? */
+/** HTTP cache control: how long do we tell proxies they can cache each
+ * kind of document we serve? */
 #define FULL_DIR_CACHE_LIFETIME (60*60)
 #define RUNNINGROUTERS_CACHE_LIFETIME (20*60)
 #define NETWORKSTATUS_CACHE_LIFETIME (5*60)
@@ -1978,7 +1979,7 @@
 }
 
 /** Called when one or more networkstatus fetches have failed (with uppercase
- * fingerprints listed in <b>failed</>).  Mark those fingerprints as having
+ * fingerprints listed in <b>failed</b>).  Mark those fingerprints as having
  * failed once, unless they failed with status code 503. */
 static void
 dir_networkstatus_download_failed(smartlist_t *failed, int status_code)
@@ -2054,7 +2055,7 @@
   /* update_router_descriptor_downloads(time(NULL)); */
 }
 
-/* Given a directory <b>resource</b> request, containing zero
+/** Given a directory <b>resource</b> request, containing zero
  * or more strings separated by plus signs, followed optionally by ".z", store
  * the strings, in order, into <b>fp_out</b>.  If <b>compressed_out</b> is
  * non-NULL, set it to 1 if the resource ends in ".z", else set it to 0.  If

Modified: tor/trunk/src/or/dirserv.c
===================================================================
--- tor/trunk/src/or/dirserv.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/dirserv.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -52,6 +52,7 @@
 #define FP_REJECT  4  /**< We will not publish this router. */
 #define FP_BADEXIT 8 /**< We'll tell clients not to use this as an exit. */
 
+/** DOCDOC */
 typedef struct router_status_t {
   char nickname[MAX_NICKNAME_LEN+1];
   uint32_t status;
@@ -64,9 +65,10 @@
   digestmap_t *status_by_digest; /* Map from digest to FP_x mask */
 } authdir_config_t;
 
-/* Should be static; exposed for testing */
+/** Should be static; exposed for testing */
 authdir_config_t *fingerprint_list = NULL;
 
+/** DOCDOC */
 static authdir_config_t *
 authdir_config_new(void)
 {
@@ -574,6 +576,7 @@
   }
 }
 
+/** DOCDOC */
 static INLINE int
 bool_neq(int a, int b)
 {
@@ -790,7 +793,7 @@
   return 0;
 }
 
-/* Given a (possibly empty) list of config_line_t, each line of which contains
+/** Given a (possibly empty) list of config_line_t, each line of which contains
  * a list of comma-separated version numbers surrounded by optional space,
  * allocate and return a new string containing the version numbers, in order,
  * separated by commas.  Used to generate Recommended(Client|Server)?Versions
@@ -942,7 +945,7 @@
 static cached_dir_t *cached_directory = NULL;
 static cached_dir_t cached_runningrouters = { NULL, NULL, 0, 0, 0, -1 };
 
-/* Used for other dirservers' v2 network statuses.  Map from hexdigest to
+/** Used for other dirservers' v2 network statuses.  Map from hexdigest to
  * cached_dir_t. */
 static digestmap_t *cached_v2_networkstatus = NULL;
 
@@ -1319,6 +1322,7 @@
 /** For authoritative directories: the current (v2) network status */
 static cached_dir_t *the_v2_networkstatus = NULL;
 
+/** DOCDOC */
 static int
 should_generate_v2_networkstatus(void)
 {
@@ -1468,8 +1472,11 @@
 static cached_dir_t *
 generate_v2_networkstatus(void)
 {
+/** DOCDOC */
 #define LONGEST_STATUS_FLAG_NAME_LEN 9
+/** DOCDOC */
 #define N_STATUS_FLAGS 9
+/** DOCDOC */
 #define RS_ENTRY_LEN                                                    \
   ( /* first line */                                                    \
    MAX_NICKNAME_LEN+BASE64_DIGEST_LEN*2+ISO_TIME_LEN+INET_NTOA_BUF_LEN+ \
@@ -1988,7 +1995,7 @@
   tor_assert(!dir_conn->is_blocked_on_or_conn);
 }
 
-/* If <b>dir_conn</b> is a dirserv connection that's bridged over an edge_conn
+/** If <b>dir_conn</b> is a dirserv connection that's bridged over an edge_conn
  * onto an or_conn, remove it from the blocked list (if it's blocked) and
  * unlink it and the edge_conn from one another. */
 void
@@ -2190,7 +2197,7 @@
   return 0;
 }
 
-/* Spooling helper: Called when we're spooling networkstatus objects on
+/** Spooling helper: Called when we're spooling networkstatus objects on
  * <b>conn</b>, and the outbuf has become too empty.  If the current
  * networkstatus object (in <b>conn</b>-\>cached_dir) has more data, pull data
  * from there.  Otherwise, pop the next fingerprint from fingerprint_stack,

Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/dns.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -68,6 +68,7 @@
   struct pending_connection_t *next;
 } pending_connection_t;
 
+/** DOCDOC */
 #define CACHED_RESOLVE_MAGIC 0x1234F00D
 
 /* Possible states for a cached resolve_t */

Modified: tor/trunk/src/or/hibernate.c
===================================================================
--- tor/trunk/src/or/hibernate.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/hibernate.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -25,18 +25,24 @@
 
 #include "or.h"
 
+/** DOCDOC */
 #define HIBERNATE_STATE_LIVE 1
+/** DOCDOC */
 #define HIBERNATE_STATE_EXITING 2
+/** DOCDOC */
 #define HIBERNATE_STATE_LOWBANDWIDTH 3
+/** DOCDOC */
 #define HIBERNATE_STATE_DORMANT 4
 
 extern long stats_n_seconds_working; /* published uptime */
 
+/** DOCDOC */
 static int hibernate_state = HIBERNATE_STATE_LIVE;
 /** If are hibernating, when do we plan to wake up? Set to 0 if we
  * aren't hibernating. */
 static time_t hibernate_end_time = 0;
 
+/** DOCDOC */
 typedef enum {
   UNIT_MONTH=1, UNIT_WEEK=2, UNIT_DAY=3,
 } time_unit_t;
@@ -69,8 +75,9 @@
  * step one.
  */
 
-/** How many bytes have we read/written in this accounting interval? */
+/** How many bytes have we read in this accounting interval? */
 static uint64_t n_bytes_read_in_interval = 0;
+/** How many bytes have we written in this accounting interval? */
 static uint64_t n_bytes_written_in_interval = 0;
 /** How many seconds have we been running this interval? */
 static uint32_t n_seconds_active_in_interval = 0;

Modified: tor/trunk/src/or/main.c
===================================================================
--- tor/trunk/src/or/main.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/main.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -58,6 +58,7 @@
 /** Array of all open connections.  The first n_conns elements are valid. */
 static connection_t *connection_array[MAXCONNECTIONS+1] =
         { NULL };
+/** DOCDOC */
 static smartlist_t *closeable_connection_lst = NULL;
 
 static int n_conns=0; /**< Number of connections currently active. */
@@ -814,6 +815,7 @@
       if (any_trusted_dir_is_v1_authority())
         directory_get_from_dirserver(DIR_PURPOSE_FETCH_DIR, NULL, 1);
     }
+/** DOCDOC */
 #define V1_DIR_FETCH_PERIOD (6*60*60)
     time_to_fetch_directory = now + V1_DIR_FETCH_PERIOD;
   }
@@ -823,6 +825,7 @@
     if (!authdir_mode(options) || !options->V1AuthoritativeDir) {
       directory_get_from_dirserver(DIR_PURPOSE_FETCH_RUNNING_LIST, NULL, 1);
     }
+/** DOCDOC */
 #define V1_RUNNINGROUTERS_FETCH_PERIOD (30*60)
     time_to_fetch_running_routers = now + V1_RUNNINGROUTERS_FETCH_PERIOD;
 
@@ -949,7 +952,9 @@
   }
 }
 
+/** DOCDOC */
 static struct event *timeout_event = NULL;
+/** DOCDOC */
 static int n_libevent_errors = 0;
 
 /** Libevent callback: invoked once every second. */

Modified: tor/trunk/src/or/onion.c
===================================================================
--- tor/trunk/src/or/onion.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/onion.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -25,7 +25,7 @@
 /** 5 seconds on the onion queue til we just send back a destroy */
 #define ONIONQUEUE_WAIT_CUTOFF 5
 
-/** Global (within this file) variables used by the next few functions */
+/** DOCDOC */
 static onion_queue_t *ol_list=NULL;
 static onion_queue_t *ol_tail=NULL;
 /** Length of ol_list */
@@ -359,10 +359,10 @@
 
 /** Implement the server side of the CREATE_FAST abbreviated handshake.  The
  * client has provided DIGEST_LEN key bytes in <b>key_in</b> ("x").  We
- * generate a reply of DIGEST_LEN*2 bytes in <b>key_out/b>, consisting of a
+ * generate a reply of DIGEST_LEN*2 bytes in <b>key_out</b>, consisting of a
  * new random "y", followed by H(x|y) to check for correctness.  We set
  * <b>key_out_len</b> bytes of key material in <b>key_out</b>.
- * Return 0 on success, <0 on failure.
+ * Return 0 on success, &lt;0 on failure.
  **/
 int
 fast_server_handshake(const char *key_in, /* DIGEST_LEN bytes */

Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/or.h	2007-02-02 20:06:43 UTC (rev 9477)
@@ -155,23 +155,27 @@
 #define cell_t tor_cell_t
 #endif
 
+/** DOCDOC */
 #define MAX_NICKNAME_LEN 19
-/* Hex digest plus dollar sign. */
+/** DOCDOC: Hex digest plus dollar sign. */
 #define MAX_HEX_NICKNAME_LEN (HEX_DIGEST_LEN+1)
-/* $Hexdigest=nickname */
+/** DOCDOC: $Hexdigest=nickname */
 #define MAX_VERBOSE_NICKNAME_LEN (1+HEX_DIGEST_LEN+1+MAX_NICKNAME_LEN)
 
 /** Maximum size, in bytes, for resized buffers. */
 #define MAX_BUF_SIZE ((1<<24)-1)
+/** DOCDOC */
 #define MAX_DIR_SIZE MAX_BUF_SIZE
 
-/* For http parsing */
+/** For http parsing DOCDOC */
 #define MAX_HEADERS_SIZE 50000
+/** DOCDOC */
 #define MAX_BODY_SIZE 500000
 
 /** How long do we keep DNS cache entries before purging them (regardless of
  * their TTL)? */
 #define MAX_DNS_ENTRY_AGE (30*60)
+/** DOCDOC */
 #define DEFAULT_DNS_TTL (30*60)
 /** How long can a TTL be before we stop believing it? */
 #define MAX_DNS_TTL (3*60*60)
@@ -194,6 +198,7 @@
 /** How old do we let a networkstatus get before ignoring it? */
 #define NETWORKSTATUS_MAX_AGE (60*60*24)
 
+/** DOCDOC */
 typedef enum {
   CIRC_ID_TYPE_LOWER=0,
   CIRC_ID_TYPE_HIGHER=1
@@ -303,6 +308,7 @@
 #define AP_CONN_STATE_NATD_WAIT 12
 #define _AP_CONN_STATE_MAX 12
 
+/** DOCDOC */
 #define AP_CONN_STATE_IS_UNATTACHED(s) \
   ((s) <= AP_CONN_STATE_CIRCUIT_WAIT || (s) == AP_CONN_STATE_NATD_WAIT)
 
@@ -321,12 +327,17 @@
 #define DIR_CONN_STATE_SERVER_WRITING 6
 #define _DIR_CONN_STATE_MAX 6
 
+/** DOCDOC */
 #define DIR_CONN_IS_SERVER(conn) ((conn)->purpose == DIR_PURPOSE_SERVER)
 
 #define _CONTROL_CONN_STATE_MIN 1
+/** DOCDOC */
 #define CONTROL_CONN_STATE_OPEN_V0 1
+/** DOCDOC */
 #define CONTROL_CONN_STATE_OPEN_V1 2
+/** DOCDOC */
 #define CONTROL_CONN_STATE_NEEDAUTH_V0 3
+/** DOCDOC */
 #define CONTROL_CONN_STATE_NEEDAUTH_V1 4
 #define _CONTROL_CONN_STATE_MAX 4
 
@@ -507,17 +518,24 @@
  * and are not intended to be put in relay end cells. They are here
  * to be more informative when sending back socks replies to the
  * application. */
+/** DOCDOC */
 #define END_STREAM_REASON_ALREADY_SOCKS_REPLIED 256
+/** DOCDOC */
 #define END_STREAM_REASON_CANT_ATTACH 257
+/** DOCDOC */
 #define END_STREAM_REASON_NET_UNREACHABLE 258
+/** DOCDOC */
 #define END_STREAM_REASON_SOCKSPROTOCOL 259
+/** DOCDOC */
 #define END_STREAM_REASON_CANT_FETCH_ORIG_DEST 260
+/** DOCDOC */
 #define END_STREAM_REASON_INVALID_NATD_DEST 261
 
 /** Bitwise-or this with the argument to control_event_stream_status
  * to indicate that the reason came from an END cell. */
 #define END_STREAM_REASON_FLAG_REMOTE     512
 
+/* DOCDOC */
 #define RESOLVED_TYPE_HOSTNAME 0
 #define RESOLVED_TYPE_IPV4 4
 #define RESOLVED_TYPE_IPV6 6
@@ -566,9 +584,13 @@
 #define STREAMWINDOW_START 5000
 #define STREAMWINDOW_INCREMENT 500
 #else
+/** DOCDOC */
 #define CIRCWINDOW_START 1000
+/** DOCDOC */
 #define CIRCWINDOW_INCREMENT 100
+/** DOCDOC */
 #define STREAMWINDOW_START 500
+/** DOCDOC */
 #define STREAMWINDOW_INCREMENT 50
 #endif
 
@@ -584,15 +606,17 @@
 /** How long to test reachability before complaining to the user. */
 #define TIMEOUT_UNTIL_UNREACHABILITY_COMPLAINT (20*60)
 
-/* legal characters in a nickname */
+/** legal characters in a nickname */
 #define LEGAL_NICKNAME_CHARACTERS \
   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
 
 /** Name to use in client TLS certificates if no nickname is given.*/
 #define DEFAULT_CLIENT_NICKNAME "client"
 
+/** DOCDOC */
 #define SOCKS4_NETWORK_LEN 8
 
+/** DOCDOC */
 typedef enum {
   SOCKS5_SUCCEEDED                  = 0x00,
   SOCKS5_GENERAL_ERROR              = 0x01,
@@ -615,10 +639,14 @@
  *         Relay payload           [498 bytes]
  */
 
+/** DOCDOC */
 #define CELL_PAYLOAD_SIZE 509
+/** DOCDOC */
 #define CELL_NETWORK_SIZE 512
 
+/** DOCDOC */
 #define RELAY_HEADER_SIZE (1+2+2+4+2)
+/** DOCDOC */
 #define RELAY_PAYLOAD_SIZE (CELL_PAYLOAD_SIZE-RELAY_HEADER_SIZE)
 
 /** Parsed onion routing cell.  All communication between nodes
@@ -642,10 +670,15 @@
 typedef struct buf_t buf_t;
 typedef struct socks_request_t socks_request_t;
 
+/** DOCDOC */
 #define BASE_CONNECTION_MAGIC 0x7C3C304Eu
+/** DOCDOC */
 #define OR_CONNECTION_MAGIC 0x7D31FF03u
+/** DOCDOC */
 #define EDGE_CONNECTION_MAGIC 0xF0374013u
+/** DOCDOC */
 #define DIR_CONNECTION_MAGIC 0x9988ffeeu
+/** DOCDOC */
 #define CONTROL_CONNECTION_MAGIC 0x8abc765du
 
 /** Description of a connection to another host or process, and associated

Modified: tor/trunk/src/or/policies.c
===================================================================
--- tor/trunk/src/or/policies.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/policies.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -12,10 +12,15 @@
 
 #include "or.h"
 
+/** DOCDOC */
 static addr_policy_t *socks_policy = NULL;
+/** DOCDOC */
 static addr_policy_t *dir_policy = NULL;
+/** DOCDOC */
 static addr_policy_t *authdir_reject_policy = NULL;
+/** DOCDOC */
 static addr_policy_t *authdir_invalid_policy = NULL;
+/** DOCDOC */
 static addr_policy_t *authdir_badexit_policy = NULL;
 
 /** Parsed addr_policy_t describing which addresses we believe we can start
@@ -209,6 +214,8 @@
 
 #define REJECT(arg) \
   do { *msg = tor_strdup(arg); goto err; } while (0)
+
+/** DOCDOC */
 int
 validate_addr_policies(or_options_t *options, char **msg)
 {
@@ -247,7 +254,7 @@
 #undef REJECT
 }
 
-/* Parse <b>string</b> in the same way that the exit policy
+/** Parse <b>string</b> in the same way that the exit policy
  * is parsed, and put the processed version in *<b>policy</b>.
  * Ignore port specifiers.
  */
@@ -266,6 +273,7 @@
   }
 }
 
+/** DOCDOC */
 void
 policies_parse_from_options(or_options_t *options)
 {
@@ -655,6 +663,7 @@
   return (int)written;
 }
 
+/** DOCDOC */
 int
 getinfo_helper_policies(control_connection_t *conn,
                         const char *question, char **answer)
@@ -680,6 +689,7 @@
   }
 }
 
+/** DOCDOC */
 void
 policies_free_all(void)
 {

Modified: tor/trunk/src/or/rephist.c
===================================================================
--- tor/trunk/src/or/rephist.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/rephist.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -956,6 +956,7 @@
 static uint32_t n_rend_mid_ops = 0;
 static uint32_t n_rend_server_ops = 0;
 
+/** DOCDOC */
 void
 note_crypto_pk_op(pk_op_t operation)
 {
@@ -999,6 +1000,7 @@
   }
 }
 
+/** DOCDOC */
 void
 dump_pk_ops(int severity)
 {

Modified: tor/trunk/src/or/router.c
===================================================================
--- tor/trunk/src/or/router.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/router.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -27,10 +27,14 @@
 /** Private keys for this OR.  There is also an SSL key managed by tortls.c.
  */
 static tor_mutex_t *key_lock=NULL;
-static time_t onionkey_set_at=0; /* When was onionkey last changed? */
+static time_t onionkey_set_at=0; /**< When was onionkey last changed? */
+/** DOCDOC */
 static crypto_pk_env_t *onionkey=NULL;
+/** DOCDOC */
 static crypto_pk_env_t *lastonionkey=NULL;
+/** DOCDOC */
 static crypto_pk_env_t *identitykey=NULL;
+/** DOCDOC */
 static char identitykey_digest[DIGEST_LEN];
 
 /** Replace the current onion key with <b>k</b>.  Does not affect lastonionkey;
@@ -995,6 +999,7 @@
   }
 }
 
+/** DOCDOC */
 static void
 log_addr_has_changed(int severity, uint32_t prev, uint32_t cur)
 {
@@ -1045,6 +1050,7 @@
   }
 }
 
+/** DOCDOC */
 static uint32_t last_guessed_ip = 0;
 
 /** A directory authority told us our IP address is <b>suggestion</b>.

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/routerlist.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -214,6 +214,7 @@
   return 0;
 }
 
+/** DOCDOC */
 static int
 _compare_old_routers_by_age(const void **_a, const void **_b)
 {
@@ -221,6 +222,7 @@
   return r1->published_on - r2->published_on;
 }
 
+/** DOCDOC */
 static int
 _compare_routers_by_age(const void **_a, const void **_b)
 {
@@ -343,7 +345,7 @@
   return r;
 }
 
-/* Load all cached router descriptors from the store. Return 0 on success and
+/** Load all cached router descriptors from the store. Return 0 on success and
  * -1 on failure.
  */
 int
@@ -931,6 +933,7 @@
   return router->bandwidthrate;
 }
 
+/** DOCDOC */
 #define MAX_BELIEVABLE_BANDWIDTH 1500000 /* 1.5 MB/sec */
 
 /** Helper function:
@@ -1953,6 +1956,7 @@
   return 0;
 }
 
+/** DOCDOC */
 static int
 _compare_old_routers_by_identity(const void **_a, const void **_b)
 {
@@ -1963,12 +1967,14 @@
   return r1->published_on - r2->published_on;
 }
 
+/** DOCDOC */
 struct duration_idx_t {
   int duration;
   int idx;
   int old;
 };
 
+/** DOCDOC */
 static int
 _compare_duration_idx(const void *_d1, const void *_d2)
 {
@@ -2574,6 +2580,7 @@
                            _compare_digest_to_routerstatus_entry);
 }
 
+/** DOCDOC */
 static local_routerstatus_t *
 router_get_combined_status_by_nickname(const char *nickname,
                                        int warn_if_unnamed)
@@ -2739,7 +2746,7 @@
 /** How long (in seconds) does a client wait after getting a network status
  * before downloading the next in sequence? */
 #define NETWORKSTATUS_CLIENT_DL_INTERVAL (30*60)
-/* How many times do we allow a networkstatus download to fail before we
+/** How many times do we allow a networkstatus download to fail before we
  * assume that the authority isn't publishing? */
 #define NETWORKSTATUS_N_ALLOWABLE_FAILURES 3
 /** We are not a directory cache or authority.  Update our network-status list
@@ -3802,7 +3809,7 @@
 static void
 update_router_descriptor_client_downloads(time_t now)
 {
-  /* Max amount of hashes to download per request.
+  /** Max amount of hashes to download per request.
    * Since squid does not like URLs >= 4096 bytes we limit it to 96.
    *   4096 - strlen(http://255.255.255.255/tor/server/d/.z) == 4058
    *   4058/41 (40 for the hash and 1 for the + that separates them) => 98
@@ -4029,6 +4036,7 @@
   }
 }
 
+/** DOCDOC */
 static int
 routerstatus_count_usable_entries(smartlist_t *entries)
 {
@@ -4040,7 +4048,9 @@
   return count;
 }
 
+/** DOCDOC */
 static int have_min_dir_info = 0;
+/** DOCDOC */
 static int need_to_update_have_min_dir_info = 1;
 
 /** Return true iff we have enough networkstatus and router information to

Modified: tor/trunk/src/or/routerparse.c
===================================================================
--- tor/trunk/src/or/routerparse.c	2007-02-02 18:58:11 UTC (rev 9476)
+++ tor/trunk/src/or/routerparse.c	2007-02-02 20:06:43 UTC (rev 9477)
@@ -709,6 +709,7 @@
 static digestmap_t *verified_digests = NULL;
 #endif
 
+/** DOCDOC */
 void
 dump_distinct_digest_count(int severity)
 {
@@ -1121,6 +1122,7 @@
   return memcmp(a->identity_digest, b->identity_digest, DIGEST_LEN);
 }
 
+/** DOCDOC */
 static void
 _free_duplicate_routerstatus_entry(void *e)
 {



More information about the tor-commits mailing list