summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-18 14:18:34 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-18 14:18:34 -0400
commit104c2e9e7e3a61924cdc4d5729c03932712fc1e3 (patch)
treed140fbb949cc3cc84069f521f8e76787ff5c0a51 /src/or/control.c
parentbcc1368c77d6ed8ac7f8bd81acdec7bb2da9f925 (diff)
parent3edc48c07b35ea0708ad4149a725a60887c13326 (diff)
downloadtor-104c2e9e7e3a61924cdc4d5729c03932712fc1e3.tar.gz
tor-104c2e9e7e3a61924cdc4d5729c03932712fc1e3.zip
Merge branch 'split_or_h'
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 72d4ff3189..fa9bd05136 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -81,6 +81,24 @@
#include "routerparse.h"
#include "shared_random_client.h"
+#include "cached_dir_st.h"
+#include "control_connection_st.h"
+#include "cpath_build_state_st.h"
+#include "entry_connection_st.h"
+#include "extrainfo_st.h"
+#include "networkstatus_st.h"
+#include "node_st.h"
+#include "or_connection_st.h"
+#include "or_circuit_st.h"
+#include "origin_circuit_st.h"
+#include "microdesc_st.h"
+#include "rend_authorized_client_st.h"
+#include "rend_encoded_v2_service_descriptor_st.h"
+#include "rend_service_descriptor_st.h"
+#include "routerinfo_st.h"
+#include "routerlist_st.h"
+#include "socks_request_st.h"
+
#ifndef _WIN32
#include <pwd.h>
#include <sys/resource.h>
@@ -226,6 +244,15 @@ static void flush_queued_events_cb(mainloop_event_t *event, void *arg);
static char * download_status_to_string(const download_status_t *dl);
static void control_get_bytes_rw_last_sec(uint64_t *r, uint64_t *w);
+/** Convert a connection_t* to an control_connection_t*; assert if the cast is
+ * invalid. */
+control_connection_t *
+TO_CONTROL_CONN(connection_t *c)
+{
+ tor_assert(c->magic == CONTROL_CONNECTION_MAGIC);
+ return DOWNCAST(control_connection_t, c);
+}
+
/** Given a control event code for a message event, return the corresponding
* log severity. */
static inline int