aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/hsdir_index_st.h24
-rw-r--r--src/or/include.am1
-rw-r--r--src/or/node_st.h2
-rw-r--r--src/or/or.h13
4 files changed, 28 insertions, 12 deletions
diff --git a/src/or/hsdir_index_st.h b/src/or/hsdir_index_st.h
new file mode 100644
index 0000000000..9d9ce66bd9
--- /dev/null
+++ b/src/or/hsdir_index_st.h
@@ -0,0 +1,24 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2017, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+#ifndef HSDIR_INDEX_ST_H
+#define HSDIR_INDEX_ST_H
+
+/* Hidden service directory index used in a node_t which is set once we set
+ * the consensus. */
+struct hsdir_index_t {
+ /* HSDir index to use when fetching a descriptor. */
+ uint8_t fetch[DIGEST256_LEN];
+
+ /* HSDir index used by services to store their first and second
+ * descriptor. The first descriptor is chronologically older than the second
+ * one and uses older TP and SRV values. */
+ uint8_t store_first[DIGEST256_LEN];
+ uint8_t store_second[DIGEST256_LEN];
+};
+
+#endif
+
diff --git a/src/or/include.am b/src/or/include.am
index 06e61e00d0..af525f35cf 100644
--- a/src/or/include.am
+++ b/src/or/include.am
@@ -252,6 +252,7 @@ ORHEADERS = \
src/or/hs_ntor.h \
src/or/hs_stats.h \
src/or/hs_service.h \
+ src/or/hsdir_index_st.h \
src/or/keypin.h \
src/or/listener_connection_st.h \
src/or/main.h \
diff --git a/src/or/node_st.h b/src/or/node_st.h
index 511e23ad17..43206f662f 100644
--- a/src/or/node_st.h
+++ b/src/or/node_st.h
@@ -7,6 +7,8 @@
#ifndef NODE_ST_H
#define NODE_ST_H
+#include "hsdir_index_st.h"
+
/** A node_t represents a Tor router.
*
* Specifically, a node_t is a Tor router as we are using it: a router that
diff --git a/src/or/or.h b/src/or/or.h
index b164cf0e7f..7d4d963e0b 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -899,18 +899,7 @@ struct hs_ident_edge_conn_t;
struct hs_ident_dir_conn_t;
struct hs_ident_circuit_t;
-/* Hidden service directory index used in a node_t which is set once we set
- * the consensus. */
-typedef struct hsdir_index_t {
- /* HSDir index to use when fetching a descriptor. */
- uint8_t fetch[DIGEST256_LEN];
-
- /* HSDir index used by services to store their first and second
- * descriptor. The first descriptor is chronologically older than the second
- * one and uses older TP and SRV values. */
- uint8_t store_first[DIGEST256_LEN];
- uint8_t store_second[DIGEST256_LEN];
-} hsdir_index_t;
+typedef struct hsdir_index_t hsdir_index_t;
/** Time interval for tracking replays of DH public keys received in
* INTRODUCE2 cells. Used only to avoid launching multiple