aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/circuitmux.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/or/circuitmux.h b/src/or/circuitmux.h
index f4eb73e391..a3eacaf7d4 100644
--- a/src/or/circuitmux.h
+++ b/src/or/circuitmux.h
@@ -76,6 +76,23 @@ struct circuitmux_policy_circ_data_s {
uint32_t magic;
};
+/*
+ * Upcast #defines for the above types
+ */
+
+/**
+ * Convert a circuitmux_policy_data_t subtype to a circuitmux_policy_data_t.
+ */
+
+#define TO_CMUX_POL_DATA(x) (&((x)->_base))
+
+/**
+ * Convert a circuitmux_policy_circ_data_t subtype to a
+ * circuitmux_policy_circ_data_t.
+ */
+
+#define TO_CMUX_POL_CIRC_DATA(x) (&((x)->_base))
+
/* Consistency check */
void circuitmux_assert_okay(circuitmux_t *cmux);