diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-15 11:57:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-15 11:57:48 -0400 |
commit | c846b0e486786f228a51f39d32b83d83f15bd3cd (patch) | |
tree | 6375dcfb35bcf126913a870c318cfcf6305d44fc | |
parent | b3f2c682b721eac104455b09bd2f0d481f17d750 (diff) | |
download | tor-c846b0e486786f228a51f39d32b83d83f15bd3cd.tar.gz tor-c846b0e486786f228a51f39d32b83d83f15bd3cd.zip |
Extract crypt_path_reference_t into its own header.
-rw-r--r-- | src/or/circuitlist.c | 1 | ||||
-rw-r--r-- | src/or/crypt_path_reference_st.h | 23 | ||||
-rw-r--r-- | src/or/include.am | 1 | ||||
-rw-r--r-- | src/or/or.h | 13 | ||||
-rw-r--r-- | src/or/rendservice.c | 1 |
5 files changed, 27 insertions, 12 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 7601bc6135..3f03ae2f4e 100644 --- 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 new file mode 100644 index 0000000000..2758a281c0 --- /dev/null +++ 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 index 0a58796e04..e15b58c389 100644 --- 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 index df232604e6..5c8267cf52 100644 --- 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 index 09a52ea07b..20a4288af0 100644 --- 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" |