commit c846b0e486786f228a51f39d32b83d83f15bd3cd
parent b3f2c682b721eac104455b09bd2f0d481f17d750
Author: Nick Mathewson <nickm@torproject.org>
Date: Fri, 15 Jun 2018 11:57:48 -0400
Extract crypt_path_reference_t into its own header.
Diffstat:
5 files changed, 27 insertions(+), 12 deletions(-)
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
@@ -92,6 +92,7 @@
#include "ht.h"
+#include "crypt_path_reference_st.h"
#include "dir_connection_st.h"
#include "edge_connection_st.h"
#include "or_circuit_st.h"
diff --git a/src/or/crypt_path_reference_st.h b/src/or/crypt_path_reference_st.h
@@ -0,0 +1,23 @@
+/* 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 CRYPT_PATH_REFERENCE_ST_H
+#define CRYPT_PATH_REFERENCE_ST_H
+
+/** A reference-counted pointer to a crypt_path_t, used only to share
+ * the final rendezvous cpath to be used on a service-side rendezvous
+ * circuit among multiple circuits built in parallel to the same
+ * destination rendezvous point. */
+struct crypt_path_reference_t {
+ /** The reference count. */
+ unsigned int refcount;
+ /** The pointer. Set to NULL when the crypt_path_t is put into use
+ * on an opened rendezvous circuit. */
+ crypt_path_t *cpath;
+};
+
+#endif
+
diff --git a/src/or/include.am b/src/or/include.am
@@ -207,6 +207,7 @@ ORHEADERS = \
src/or/control_connection_st.h \
src/or/control.h \
src/or/crypt_path_st.h \
+ src/or/crypt_path_reference_st.h \
src/or/cpuworker.h \
src/or/directory.h \
src/or/dirserv.h \
diff --git a/src/or/or.h b/src/or/or.h
@@ -2280,18 +2280,7 @@ typedef struct {
typedef struct relay_crypto_t relay_crypto_t;
typedef struct crypt_path_t crypt_path_t;
-
-/** A reference-counted pointer to a crypt_path_t, used only to share
- * the final rendezvous cpath to be used on a service-side rendezvous
- * circuit among multiple circuits built in parallel to the same
- * destination rendezvous point. */
-typedef struct {
- /** The reference count. */
- unsigned int refcount;
- /** The pointer. Set to NULL when the crypt_path_t is put into use
- * on an opened rendezvous circuit. */
- crypt_path_t *cpath;
-} crypt_path_reference_t;
+typedef struct crypt_path_reference_t crypt_path_reference_t;
#define CPATH_KEY_MATERIAL_LEN (20*2+16*2)
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
@@ -37,6 +37,7 @@
#include "routerset.h"
#include "crypt_path_st.h"
+#include "crypt_path_reference_st.h"
#include "edge_connection_st.h"
#include "origin_circuit_st.h"