summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/address.c2
-rw-r--r--src/common/log.c12
-rw-r--r--src/common/memarea.c2
-rw-r--r--src/common/tortls.c6
-rw-r--r--src/common/tortls.h3
5 files changed, 17 insertions, 8 deletions
diff --git a/src/common/address.c b/src/common/address.c
index d6b64828c1..7da9cb220b 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -630,7 +630,7 @@ tor_addr_from_ipv6_bytes(tor_addr_t *dest, const char *ipv6_bytes)
memcpy(dest->addr.in6_addr.s6_addr, ipv6_bytes, 16);
}
-/** DOCDOC */
+/** Set <b>dest</b> equal to the IPv6 address in the in6_addr <b>in6</b>. */
void
tor_addr_from_in6(tor_addr_t *dest, const struct in6_addr *in6)
{
diff --git a/src/common/log.c b/src/common/log.c
index dca7866273..d93bc8a556 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -53,7 +53,8 @@ typedef struct logfile_t {
int is_temporary; /**< Boolean: close after initializing logging subsystem.*/
int is_syslog; /**< Boolean: send messages to syslog. */
log_callback callback; /**< If not NULL, send messages to this function. */
- log_severity_list_t *severities; /**< DOCDOC */
+ log_severity_list_t *severities; /**< Which severity of messages should we
+ * log for each log domain? */
} logfile_t;
static void log_free(logfile_t *victim);
@@ -415,7 +416,7 @@ _log_err(log_domain_mask_t domain, const char *format, ...)
}
#endif
-/** DOCDOC */
+/** Free all storage held by <b>victim</b>. */
static void
log_free(logfile_t *victim)
{
@@ -730,14 +731,17 @@ log_level_to_string(int level)
return sev_to_string(level);
}
-/** DOCDOC */
+/** NULL-terminated array of names for log domains such that domain_list[dom]
+ * is a description of <b>dom</b>. */
static const char *domain_list[] = {
"GENERAL", "CRYPTO", "NET", "CONFIG", "FS", "PROTOCOL", "MM",
"HTTP", "APP", "CONTROL", "CIRC", "REND", "BUG", "DIR", "DIRSERV",
"OR", "EDGE", "ACCT", "HIST", NULL
};
-/** DOCDOC */
+/** Return the log domain for which <b>domain</b> is the name, or 0 if there
+ * is no such name. */
+/*XXXX021 0 could mean "no such domain" or LD_GENERAL. Fix that. */
static log_domain_mask_t
parse_log_domain(const char *domain)
{
diff --git a/src/common/memarea.c b/src/common/memarea.c
index d888cf076a..4257c4552c 100644
--- a/src/common/memarea.c
+++ b/src/common/memarea.c
@@ -138,7 +138,7 @@ memarea_clear(memarea_t *area)
area->first->next_mem = area->first->u.mem;
}
-/** DOCDOC */
+/** Remove all unused memarea chunks from the internal freelist. */
void
memarea_clear_freelist(void)
{
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 1032a53f25..ec59d67ae6 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -1442,7 +1442,11 @@ tor_tls_used_v1_handshake(tor_tls_t *tls)
return 1;
}
-/** DOCDOC */
+/** Examine the amount of memory used and available for buffers in <b>tls</b>.
+ * Set *<b>rbuf_capacity</b> to the amount of storage allocated for the read
+ * buffer and *<b>rbuf_bytes</b> to the amount actually used.
+ * Set *<b>wbuf_capacity</b> to the amount of storage allocated for the write
+ * buffer and *<b>wbuf_bytes</b> to the amount actually used. */
void
tor_tls_get_buffer_sizes(tor_tls_t *tls,
int *rbuf_capacity, int *rbuf_bytes,
diff --git a/src/common/tortls.h b/src/common/tortls.h
index 211c8255ba..968430d4c9 100644
--- a/src/common/tortls.h
+++ b/src/common/tortls.h
@@ -33,7 +33,8 @@ typedef struct tor_tls_t tor_tls_t;
#define TOR_TLS_WANTWRITE -1
#define TOR_TLS_DONE 0
-/** DOCDOC XXXX021 also rename me. */
+/** Collection of case statements for all TLS errors that are not due to
+ * underlying IO failure. */
#define CASE_TOR_TLS_ERROR_ANY_NONIO \
case TOR_TLS_ERROR_MISC: \
case TOR_TLS_ERROR_CONNREFUSED: \