summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
Diffstat (limited to 'src/or')
-rw-r--r--src/or/include.am2
-rw-r--r--src/or/or.h9
-rw-r--r--src/or/rendcache.c9
-rw-r--r--src/or/rendcache.h23
-rw-r--r--src/or/rendclient.h2
-rw-r--r--src/or/rendcommon.h2
6 files changed, 38 insertions, 9 deletions
diff --git a/src/or/include.am b/src/or/include.am
index 6bbf78871c..af3336547f 100644
--- a/src/or/include.am
+++ b/src/or/include.am
@@ -66,6 +66,7 @@ LIBTOR_A_SOURCES = \
src/or/policies.c \
src/or/reasons.c \
src/or/relay.c \
+ src/or/rendcache.c \
src/or/rendclient.c \
src/or/rendcommon.c \
src/or/rendmid.c \
@@ -174,6 +175,7 @@ ORHEADERS = \
src/or/policies.h \
src/or/reasons.h \
src/or/relay.h \
+ src/or/rendcache.h \
src/or/rendclient.h \
src/or/rendcommon.h \
src/or/rendmid.h \
diff --git a/src/or/or.h b/src/or/or.h
index 9e7b7534fb..d3a476ecf9 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -4970,15 +4970,6 @@ typedef struct rend_service_descriptor_t {
smartlist_t *successful_uploads;
} rend_service_descriptor_t;
-/** A cached rendezvous descriptor. */
-typedef struct rend_cache_entry_t {
- size_t len; /**< Length of <b>desc</b> */
- time_t last_served; /**< When did we last write this one to somebody?
- * (HSDir only) */
- char *desc; /**< Service descriptor */
- rend_service_descriptor_t *parsed; /**< Parsed value of 'desc' */
-} rend_cache_entry_t;
-
/********************************* routerlist.c ***************************/
/** Represents information about a single trusted or fallback directory
diff --git a/src/or/rendcache.c b/src/or/rendcache.c
new file mode 100644
index 0000000000..758d7e6017
--- /dev/null
+++ b/src/or/rendcache.c
@@ -0,0 +1,9 @@
+/* Copyright (c) 2015, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file rendcache.c
+ * \brief Hidden service desriptor cache.
+ **/
+
+#include "rendcache.h"
diff --git a/src/or/rendcache.h b/src/or/rendcache.h
new file mode 100644
index 0000000000..1b78436c94
--- /dev/null
+++ b/src/or/rendcache.h
@@ -0,0 +1,23 @@
+/* Copyright (c) 2015, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file rendcache.h
+ * \brief Header file for rendcache.c
+ **/
+
+#ifndef TOR_RENDCACHE_H
+#define TOR_RENDCACHE_H
+
+#include "or.h"
+
+/** A cached rendezvous descriptor. */
+typedef struct rend_cache_entry_t {
+ size_t len; /**< Length of <b>desc</b> */
+ time_t last_served; /**< When did we last write this one to somebody?
+ * (HSDir only) */
+ char *desc; /**< Service descriptor */
+ rend_service_descriptor_t *parsed; /**< Parsed value of 'desc' */
+} rend_cache_entry_t;
+
+#endif /* TOR_RENDCACHE_H */
diff --git a/src/or/rendclient.h b/src/or/rendclient.h
index 6118924e1d..439f42875b 100644
--- a/src/or/rendclient.h
+++ b/src/or/rendclient.h
@@ -12,6 +12,8 @@
#ifndef TOR_RENDCLIENT_H
#define TOR_RENDCLIENT_H
+#include "rendcache.h"
+
void rend_client_purge_state(void);
void rend_client_introcirc_has_opened(origin_circuit_t *circ);
diff --git a/src/or/rendcommon.h b/src/or/rendcommon.h
index 0ed7adc710..c6f2b8eac9 100644
--- a/src/or/rendcommon.h
+++ b/src/or/rendcommon.h
@@ -12,6 +12,8 @@
#ifndef TOR_RENDCOMMON_H
#define TOR_RENDCOMMON_H
+#include "rendcache.h"
+
/** Free all storage associated with <b>data</b> */
static INLINE void
rend_data_free(rend_data_t *data)