[or-cvs] Make doxygen marginally happier

Nick Mathewson nickm at seul.org
Thu Oct 6 04:33:42 UTC 2005


Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv30951/src/or

Modified Files:
	buffers.c config.c connection_edge.c connection_or.c dirserv.c 
	onion.c or.h router.c 
Log Message:
Make doxygen marginally happier

Index: buffers.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/buffers.c,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -d -r1.172 -r1.173
--- buffers.c	30 Sep 2005 20:47:58 -0000	1.172
+++ buffers.c	6 Oct 2005 04:33:40 -0000	1.173
@@ -49,6 +49,7 @@
 #endif
 
 #define BUFFER_MAGIC 0xB0FFF312u
+/** A resizeable buffer, optimized for reading and writing. */
 struct buf_t {
   uint32_t magic; /**< Magic cookie for debugging: Must be set to BUFFER_MAGIC */
   char *mem;      /**< Storage for data in the buffer */
@@ -473,7 +474,7 @@
  * -1 on failure.
  */
 static INLINE int
-read_to_buf_tls_impl(tor_tls *tls, size_t at_most, buf_t *buf, char *next)
+read_to_buf_tls_impl(tor_tls_t *tls, size_t at_most, buf_t *buf, char *next)
 {
   int r;
 
@@ -512,7 +513,7 @@
  * ready to write -- or vice versa.
  */
 int
-read_to_buf_tls(tor_tls *tls, size_t at_most, buf_t *buf)
+read_to_buf_tls(tor_tls_t *tls, size_t at_most, buf_t *buf)
 {
   int r;
   char *next;
@@ -634,7 +635,7 @@
  * Return the number of bytes written on success, -1 on failure.
  */
 static INLINE int
-flush_buf_tls_impl(tor_tls *tls, buf_t *buf, size_t sz, size_t *buf_flushlen)
+flush_buf_tls_impl(tor_tls_t *tls, buf_t *buf, size_t sz, size_t *buf_flushlen)
 {
   int r;
 
@@ -652,7 +653,7 @@
 /** As flush_buf(), but writes data to a TLS connection.
  */
 int
-flush_buf_tls(tor_tls *tls, buf_t *buf, size_t *buf_flushlen)
+flush_buf_tls(tor_tls_t *tls, buf_t *buf, size_t *buf_flushlen)
 {
   int r;
   size_t flushed=0;

Index: config.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.429
retrieving revision 1.430
diff -u -d -r1.429 -r1.430
--- config.c	5 Oct 2005 23:02:40 -0000	1.429
+++ config.c	6 Oct 2005 04:33:40 -0000	1.430
@@ -36,7 +36,7 @@
   CONFIG_TYPE_OBSOLETE,     /**< Obsolete (ignored) option. */
 } config_type_t;
 
-/* An abbreviation for a configuration option allowed on the command line */
+/** An abbreviation for a configuration option allowed on the command line */
 typedef struct config_abbrev_t {
   const char *abbreviated;
   const char *full;
@@ -242,6 +242,9 @@
 
 typedef int (*validate_fn_t)(void*);
 
+/** Information on the keys, value types, key-to-struct-member mappings,
+ * variable descriptions, validation functions, and abbreviations for a
+ * configuration or storage format. */
 typedef struct {
   size_t size;
   uint32_t magic;
@@ -3087,6 +3090,8 @@
   return write_configuration_file(get_default_conf_file(), get_options());
 }
 
+/** Mapping from a unit name to a multiplier for converting that unit into a
+ * base unit. */
 struct unit_table_t {
   const char *unit;
   uint64_t multiplier;

Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/connection_edge.c,v
retrieving revision 1.353
retrieving revision 1.354
diff -u -d -r1.353 -r1.354
--- connection_edge.c	5 Oct 2005 02:06:35 -0000	1.353
+++ connection_edge.c	6 Oct 2005 04:33:40 -0000	1.354
@@ -451,6 +451,7 @@
   int num_resolve_failures;
 } addressmap_entry_t;
 
+/** Entry for mapping addresses to which virtual address we mapped them to. */
 typedef struct {
   char *ipv4_address;
   char *hostname_address;
@@ -1728,7 +1729,7 @@
 /** A helper function for socks_policy_permits_address() below.
  *
  * Parse options->SocksPolicy in the same way that the exit policy
- * is parsed, and put the processed version in &socks_policy.
+ * is parsed, and put the processed version in socks_policy.
  * Ignore port specifiers.
  */
 void
@@ -1788,10 +1789,10 @@
 }
 
 /** If address is of the form "y.onion" with a well-formed handle y:
- *     Put a \code{'\0'} after y, lower-case it, and return ONION_HOSTNAME.
+ *     Put a NUL after y, lower-case it, and return ONION_HOSTNAME.
  *
  * If address is of the form "y.exit":
- *     Put a \code{'\0'} after y and return EXIT_HOSTNAME.
+ *     Put a NUL after y and return EXIT_HOSTNAME.
  *
  * Otherwise:
  *     Return NORMAL_HOSTNAME and change nothing.

Index: connection_or.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/connection_or.c,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -d -r1.187 -r1.188
--- connection_or.c	4 Oct 2005 22:23:31 -0000	1.187
+++ connection_or.c	6 Oct 2005 04:33:40 -0000	1.188
@@ -379,7 +379,7 @@
 {
   conn->state = OR_CONN_STATE_HANDSHAKING;
   conn->tls = tor_tls_new(conn->s, receiving, 0);
-  if (!conn->tls) {
+  if (!conn->tls)
     log_fn(LOG_WARN,"tor_tls_new failed. Closing.");
     return -1;
   }

Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.245
retrieving revision 1.246
diff -u -d -r1.245 -r1.246
--- dirserv.c	4 Oct 2005 22:23:31 -0000	1.245
+++ dirserv.c	6 Oct 2005 04:33:40 -0000	1.246
@@ -78,13 +78,19 @@
   }
 }
 
+/** A member of fingerprint_list: maps a name to a fingerprint.
+ **/
 typedef struct fingerprint_entry_t {
-  char *nickname;
+  char *nickname; /**< The name of a router (if this fingerprint is bound to a
+                   * name); the string "!reject" (if this fingerprint should
+                   * always be rejected); or the string "!invalid" (if this
+                   * fingerprint should be accepted but never marked as
+                   * valid. */
   char *fingerprint; /**< Stored as HEX_DIGEST_LEN characters, followed by a NUL */
 } fingerprint_entry_t;
 
 /** List of nickname-\>identity fingerprint mappings for all the routers
- * that we recognize. Used to prevent Sybil attacks. */
+ * that we name.  Used to prevent router impersonation. */
 /* Should be static; exposed for testing */
 smartlist_t *fingerprint_list = NULL;
 

Index: onion.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/onion.c,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -d -r1.184 -r1.185
--- onion.c	22 Jul 2005 21:12:10 -0000	1.184
+++ onion.c	6 Oct 2005 04:33:40 -0000	1.185
@@ -13,6 +13,8 @@
 
 #include "or.h"
 
+/** Type for a linked list of circuits that are waiting for a free CPU worker
+ * to process a waiting onion handshake. */
 typedef struct onion_queue_t {
   circuit_t *circ;
   time_t when_added;

Index: or.h
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.708
retrieving revision 1.709
diff -u -d -r1.708 -r1.709
--- or.h	5 Oct 2005 23:20:45 -0000	1.708
+++ or.h	6 Oct 2005 04:33:40 -0000	1.709
@@ -644,7 +644,7 @@
   char *chosen_exit_name;
 
 /* Used only by OR connections: */
-  tor_tls *tls; /**< TLS connection state (OR only.) */
+  tor_tls_t *tls; /**< TLS connection state (OR only.) */
   uint16_t next_circ_id; /**< Which circ_id do we try to use next on
                           * this connection?  This is always in the
                           * range 0..1<<15-1. (OR only.)*/
@@ -1100,6 +1100,8 @@
 #define ALLOW_UNVERIFIED_RENDEZVOUS   8
 #define ALLOW_UNVERIFIED_INTRODUCTION 16
 
+/** An entry specifying a set of addresses and ports that should be remapped
+ * to another address and port before exiting this exit node. */
 typedef struct exit_redirect_t {
   uint32_t addr;
   uint32_t mask;
@@ -1111,6 +1113,7 @@
   unsigned is_redirect:1;
 } exit_redirect_t;
 
+/** A linked list of lines in a config file. */
 typedef struct config_line_t {
   char *key;
   char *value;
@@ -1341,10 +1344,10 @@
 const char *_buf_peek_raw_buffer(const buf_t *buf);
 
 int read_to_buf(int s, size_t at_most, buf_t *buf, int *reached_eof);
-int read_to_buf_tls(tor_tls *tls, size_t at_most, buf_t *buf);
+int read_to_buf_tls(tor_tls_t *tls, size_t at_most, buf_t *buf);
 
 int flush_buf(int s, buf_t *buf, size_t *buf_flushlen);
-int flush_buf_tls(tor_tls *tls, buf_t *buf, size_t *buf_flushlen);
+int flush_buf_tls(tor_tls_t *tls, buf_t *buf, size_t *buf_flushlen);
 
 int write_to_buf(const char *string, size_t string_len, buf_t *buf);
 int fetch_from_buf(char *string, size_t string_len, buf_t *buf);
@@ -1965,10 +1968,11 @@
 rend_service_descriptor_t *rend_parse_service_descriptor(const char *str, size_t len);
 int rend_get_service_id(crypto_pk_env_t *pk, char *out);
 
+/** A cached rendezvous descriptor. */
 typedef struct rend_cache_entry_t {
-  size_t len; /* Length of desc */
-  time_t received; /* When was the descriptor received? */
-  char *desc; /* Service descriptor */
+  size_t len; /** Length of <b>desc</b> */
+  time_t received; /** When was the descriptor received? */
+  char *desc; /** Service descriptor */
   rend_service_descriptor_t *parsed; /* Parsed value of 'desc' */
 } rend_cache_entry_t;
 

Index: router.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/router.c,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -d -r1.216 -r1.217
--- router.c	5 Oct 2005 23:20:45 -0000	1.216
+++ router.c	6 Oct 2005 04:33:40 -0000	1.217
@@ -1175,3 +1175,4 @@
     smartlist_free(warned_nonexistent_family);
   }
 }
+



More information about the tor-commits mailing list