summaryrefslogtreecommitdiff
path: root/src/or/circuitlist.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-15 11:34:33 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-15 11:34:33 -0400
commita0bc164af57a3e5828cfc4fdefb9b2191af79ce9 (patch)
tree3845bbf84170303102ff6c69d42105320d9039d4 /src/or/circuitlist.h
parentbba998af65c9a414c56824f5779d2c47cf5a6b44 (diff)
downloadtor-a0bc164af57a3e5828cfc4fdefb9b2191af79ce9.tar.gz
tor-a0bc164af57a3e5828cfc4fdefb9b2191af79ce9.zip
Extract {or,origin}_circuit_t into their own headers
Diffstat (limited to 'src/or/circuitlist.h')
-rw-r--r--src/or/circuitlist.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/circuitlist.h b/src/or/circuitlist.h
index 246f0c8815..8eb6fefbfe 100644
--- a/src/or/circuitlist.h
+++ b/src/or/circuitlist.h
@@ -15,6 +15,15 @@
#include "testsupport.h"
#include "hs_ident.h"
+/** Convert a circuit_t* to a pointer to the enclosing or_circuit_t. Assert
+ * if the cast is impossible. */
+or_circuit_t *TO_OR_CIRCUIT(circuit_t *);
+const or_circuit_t *CONST_TO_OR_CIRCUIT(const circuit_t *);
+/** Convert a circuit_t* to a pointer to the enclosing origin_circuit_t.
+ * Assert if the cast is impossible. */
+origin_circuit_t *TO_ORIGIN_CIRCUIT(circuit_t *);
+const origin_circuit_t *CONST_TO_ORIGIN_CIRCUIT(const circuit_t *);
+
MOCK_DECL(smartlist_t *, circuit_get_global_list, (void));
smartlist_t *circuit_get_global_origin_circuit_list(void);
int circuit_any_opened_circuits(void);