aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-03-16 17:09:32 -0400
committerNick Mathewson <nickm@torproject.org>2011-03-16 17:09:32 -0400
commit57b954293e3880f3b39d2f0f0f7710250e8ffc5f (patch)
tree06800a08323c179e6e38292ebba543165b0fb22d /src/or/or.h
parent415caba967b9b470623ab29230b820b3470a91e6 (diff)
parent6617822b841e32d6339bac13c79dd5f2b566c3c6 (diff)
downloadtor-57b954293e3880f3b39d2f0f0f7710250e8ffc5f.tar
tor-57b954293e3880f3b39d2f0f0f7710250e8ffc5f.tar.gz
Merge remote-tracking branch 'origin/maint-0.2.2'
Trivial Conflicts in src/common/crypto.c src/or/main.h src/or/or.h
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 553afbdb7..6d06b85e9 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -860,9 +860,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;
- uint16_t payload_len; /**< The actual length of <b>payload</b>. */
+ /** Number of bytes actually stored in <b>payload</b> */
+ uint16_t payload_len;
+ /** Payload of this cell */
uint8_t payload[FLEXIBLE_ARRAY_MEMBER];
} var_cell_t;
@@ -1832,8 +1836,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;
@@ -1845,6 +1854,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;
@@ -3389,8 +3399,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;
@@ -3407,9 +3428,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;