diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-03-16 17:05:37 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-03-16 17:05:37 -0400 |
commit | 6617822b841e32d6339bac13c79dd5f2b566c3c6 (patch) | |
tree | 43bbf3c16b473a89c94dfe4c44460c39cbf8eedf /src/or | |
parent | 7f6af7a60281f00fde2e3b3f552edcc5f9311a04 (diff) | |
download | tor-6617822b841e32d6339bac13c79dd5f2b566c3c6.tar.gz tor-6617822b841e32d6339bac13c79dd5f2b566c3c6.zip |
Doxygen documentation for about 100 things that didn't have any
About 860 doxygen-less things remain in 0.2.2
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/main.h | 6 | ||||
-rw-r--r-- | src/or/ntmain.c | 10 | ||||
-rw-r--r-- | src/or/or.h | 28 |
3 files changed, 41 insertions, 3 deletions
diff --git a/src/or/main.h b/src/or/main.h index d399aaaaf3..ed0fb97703 100644 --- a/src/or/main.h +++ b/src/or/main.h @@ -23,9 +23,11 @@ int connection_is_on_closeable_list(connection_t *conn); smartlist_t *get_connection_array(void); +/** Bitmask for events that we can turn on and off with + * connection_watch_events. */ typedef enum watchable_events { - READ_EVENT=0x02, - WRITE_EVENT=0x04 + READ_EVENT=0x02, /**< We want to know when a connection is readable */ + WRITE_EVENT=0x04 /**< We want to know when a connection is writable */ } watchable_events_t; void connection_watch_events(connection_t *conn, watchable_events_t events); int connection_is_reading(connection_t *conn); diff --git a/src/or/ntmain.c b/src/or/ntmain.c index 06ca2df91e..b2fee648cc 100644 --- a/src/or/ntmain.c +++ b/src/or/ntmain.c @@ -54,6 +54,11 @@ static int nt_service_cmd_stop(void); struct service_fns { int loaded; + /** @{ */ + /** Function pointers for Windows API functions related to service + * management. These are NULL, or they point to the . They're set by + * calling the LOAD macro below. */ + BOOL (WINAPI *ChangeServiceConfig2A_fn)( SC_HANDLE hService, DWORD dwInfoLevel, @@ -122,6 +127,7 @@ struct service_fns { LPTSTR ReferencedDomainName, LPDWORD cchReferencedDomainName, PSID_NAME_USE peUse); + /** @} */ } service_fns = { 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -144,6 +150,10 @@ nt_service_loadlibrary(void) goto err; } +/* Helper macro: try to load a function named <b>f</b> from "library" into + * service_functions.<b>f</b>_fn. On failure, log an error message, and goto + * err. + */ #define LOAD(f) STMT_BEGIN \ if (!(fn = GetProcAddress(library, #f))) { \ log_err(LD_BUG, \ diff --git a/src/or/or.h b/src/or/or.h index 910bf8d8af..e3e01cff55 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -848,9 +848,13 @@ typedef struct cell_t { /** Parsed variable-length onion routing cell. */ typedef struct var_cell_t { + /** Type of the cell: CELL_VERSIONS, etc. */ uint8_t command; + /** Circuit thich received the cell */ circid_t circ_id; + /** Number of bytes actually stored in <b>payload</b> */ uint16_t payload_len; + /** Payload of this cell */ uint8_t payload[1]; } var_cell_t; @@ -1679,8 +1683,13 @@ typedef struct networkstatus_v2_t { * sorted by identity_digest. */ } networkstatus_v2_t; +/** Linked list of microdesc hash lines for a single router in a directory + * vote. + */ typedef struct vote_microdesc_hash_t { + /** Next element in the list, or NULL. */ struct vote_microdesc_hash_t *next; + /** The raw contents of the microdesc hash line, excluding the "m". */ char *microdesc_hash_line; } vote_microdesc_hash_t; @@ -1692,6 +1701,7 @@ typedef struct vote_routerstatus_t { * networkstatus_t.known_flags. */ char *version; /**< The version that the authority says this router is * running. */ + /** The hash or hashes that the authority claims this microdesc has. */ vote_microdesc_hash_t *microdesc; } vote_routerstatus_t; @@ -3218,8 +3228,19 @@ typedef struct { } fp_pair_t; /********************************* dirserv.c ***************************/ + +/** An enum to describe what format we're generating a routerstatus line in. + */ typedef enum { - NS_V2, NS_V3_CONSENSUS, NS_V3_VOTE, NS_CONTROL_PORT, + /** For use in a v2 opinion */ + NS_V2, + /** For use in a consensus networkstatus document (ns flavor) */ + NS_V3_CONSENSUS, + /** For use in a vote networkstatus document */ + NS_V3_VOTE, + /** For passing to the controlport in response to a GETINFO request */ + NS_CONTROL_PORT, + /** For use in a consensus networkstatus document (microdesc flavor) */ NS_V3_CONSENSUS_MICRODESC } routerstatus_format_type_t; @@ -3236,9 +3257,14 @@ typedef struct measured_bw_line_t { /** Describes the schedule by which votes should be generated. */ typedef struct vote_timing_t { + /** Length in seconds between one consensus becoming valid and the next + * becoming valid. */ int vote_interval; + /** For how many intervals is a consensus valid? */ int n_intervals_valid; + /** Time in seconds allowed to propagate votes */ int vote_delay; + /** Time in seconds allowed to propagate signatures */ int dist_delay; } vote_timing_t; |