diff options
author | Roger Dingledine <arma@torproject.org> | 2007-11-29 15:25:04 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-11-29 15:25:04 +0000 |
commit | aaf35cccf7ac60c17dac687127ec82c612232836 (patch) | |
tree | c382f9c21bb2812178fe1eb85147432c65e73b0c /src/or/or.h | |
parent | 0f22c584cdc797e20f4aef74e5312ebda76d05fa (diff) | |
download | tor-aaf35cccf7ac60c17dac687127ec82c612232836.tar.gz tor-aaf35cccf7ac60c17dac687127ec82c612232836.zip |
karsten's second refactoring patch
svn:r12607
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/or/or.h b/src/or/or.h index ccae45efe6..833331035a 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -595,7 +595,10 @@ typedef enum { #define END_CIRC_REASON_FLAG_REMOTE 512 /** Length of 'y' portion of 'y.onion' URL. */ -#define REND_SERVICE_ID_LEN 16 +#define REND_SERVICE_ID_LEN_BASE32 16 + +/** Length of a binary-encoded rendezvous service ID. */ +#define REND_SERVICE_ID_LEN 10 /** Time period for which a v2 descriptor will be valid. */ #define REND_TIME_PERIOD_V2_DESC_VALIDITY (24*60*60) @@ -984,8 +987,8 @@ typedef struct edge_connection_t { /** Bytes written since last call to control_event_stream_bandwidth_used() */ uint32_t n_written; - char rend_query[REND_SERVICE_ID_LEN+1]; /**< What rendezvous service are we - * querying for? (AP only) */ + /** What rendezvous service are we querying for? (AP only) */ + char rend_query[REND_SERVICE_ID_LEN_BASE32+1]; /** Number of times we've reassigned this application connection to * a new circuit. We keep track because the timeout is longer if we've @@ -1038,8 +1041,8 @@ typedef struct dir_connection_t { /** The zlib object doing on-the-fly compression for spooled data. */ tor_zlib_state_t *zlib_state; - char rend_query[REND_SERVICE_ID_LEN+1]; /**< What rendezvous service are we - * querying for? */ + /** What rendezvous service are we querying for? */ + char rend_query[REND_SERVICE_ID_LEN_BASE32+1]; char identity_digest[DIGEST_LEN]; /**< Hash of the public RSA key for * the directory server's signing key. */ @@ -1818,7 +1821,7 @@ typedef struct origin_circuit_t { * if purpose is C_INTRODUCING or C_ESTABLISH_REND, or is a C_GENERAL * for a hidden service, or is S_*. */ - char rend_query[REND_SERVICE_ID_LEN+1]; + char rend_query[REND_SERVICE_ID_LEN_BASE32+1]; /** Stores the rendezvous descriptor version if purpose is S_*. Used to * distinguish introduction and rendezvous points belonging to the same @@ -1830,6 +1833,7 @@ typedef struct origin_circuit_t { * is incompatible. Would it be clearer to switch to a single version number * for now and switch back to a bitmap, when the above becomes true? -KL * Yes. "YAGNI." -NM + * Now it's not a bitmap any more. -KL */ uint8_t rend_desc_version; @@ -2088,10 +2092,8 @@ typedef struct { int FetchHidServDescriptors; /** and hidden service descriptors? */ int HidServDirectoryV2; /**< Do we act as hs dir? */ - /*XXXX020 maybe remove these next two testing options. DEFINITELY rename - * them at some point, since I think C says that identifiers beginning with - * __ are implementation-reserved or something. */ - int __MinUptimeHidServDirectoryV2; /**< Accept hs dirs after what time? */ + int MinUptimeHidServDirectoryV2; /**< As directory authority, accept hidden + * service directories after what time? */ int FetchUselessDescriptors; /**< Do we fetch non-running descriptors too? */ int AllDirActionsPrivate; /**< Should every directory action be sent * through a Tor circuit? */ |