From a0bc164af57a3e5828cfc4fdefb9b2191af79ce9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 15 Jun 2018 11:34:33 -0400 Subject: Extract {or,origin}_circuit_t into their own headers --- src/or/circuitlist.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/or/circuitlist.h') 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); -- cgit v1.2.3-54-g00ecf