aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-04-08 12:06:03 -0400
committerNick Mathewson <nickm@torproject.org>2014-04-08 12:06:03 -0400
commitfffc59b0e941f12e1588e0604c8295ecc0679150 (patch)
treee65e5c6e493d5ff6beb4371a0bf8b5f579e3343d /src/or/or.h
parentf0bce2dc359dc2b3004af33541b27c495ad731f3 (diff)
parent8f16a77d6ae6bfc8f7983decf8269ae70ca1cc5e (diff)
downloadtor-fffc59b0e941f12e1588e0604c8295ecc0679150.tar
tor-fffc59b0e941f12e1588e0604c8295ecc0679150.tar.gz
Merge remote-tracking branch 'public/bug9841_025'
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 1b35c1f99..e17b5816a 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -3174,20 +3174,8 @@ typedef struct or_circuit_t {
* is not marked for close. */
struct or_circuit_t *rend_splice;
-#if REND_COOKIE_LEN >= DIGEST_LEN
-#define REND_TOKEN_LEN REND_COOKIE_LEN
-#else
-#define REND_TOKEN_LEN DIGEST_LEN
-#endif
+ struct or_circuit_rendinfo_s *rendinfo;
- /** A hash of location-hidden service's PK if purpose is INTRO_POINT, or a
- * rendezvous cookie if purpose is REND_POINT_WAITING. Filled with zeroes
- * otherwise.
- * ???? move to a subtype or adjunct structure? Wastes 20 bytes. -NM
- */
- char rend_token[REND_TOKEN_LEN];
-
- /* ???? move to a subtype or adjunct structure? Wastes 20 bytes -NM */
/** Stores KH for the handshake. */
char rend_circ_nonce[DIGEST_LEN];/* KH in tor-spec.txt */
@@ -3214,6 +3202,25 @@ typedef struct or_circuit_t {
uint32_t max_middle_cells;
} or_circuit_t;
+typedef struct or_circuit_rendinfo_s {
+
+#if REND_COOKIE_LEN != DIGEST_LEN
+#error "The REND_TOKEN_LEN macro assumes REND_COOKIE_LEN == DIGEST_LEN"
+#endif
+#define REND_TOKEN_LEN DIGEST_LEN
+
+ /** A hash of location-hidden service's PK if purpose is INTRO_POINT, or a
+ * rendezvous cookie if purpose is REND_POINT_WAITING. Filled with zeroes
+ * otherwise.
+ */
+ char rend_token[REND_TOKEN_LEN];
+
+ /** True if this is a rendezvous point circuit; false if this is an
+ * introduction point. */
+ unsigned is_rend_circ;
+
+} or_circuit_rendinfo_t;
+
/** Convert a circuit subtype to a circuit_t. */
#define TO_CIRCUIT(x) (&((x)->base_))