aboutsummaryrefslogtreecommitdiff
path: root/src/or/control_connection_st.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-15 10:17:27 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-15 10:17:27 -0400
commit3b917b2408748efb2ce84c2725e2e81ee0217e03 (patch)
treed16bcb1c6393d70e05300d5fd8f95601cffc00ae /src/or/control_connection_st.h
parent5d5c442e6ad726382c7b8efc0e999825a783bd9e (diff)
downloadtor-3b917b2408748efb2ce84c2725e2e81ee0217e03.tar.gz
tor-3b917b2408748efb2ce84c2725e2e81ee0217e03.zip
Split control_connection_t into its own header.
This one was actually fairly simple.
Diffstat (limited to 'src/or/control_connection_st.h')
-rw-r--r--src/or/control_connection_st.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/or/control_connection_st.h b/src/or/control_connection_st.h
new file mode 100644
index 0000000000..2d8efec1f6
--- /dev/null
+++ b/src/or/control_connection_st.h
@@ -0,0 +1,45 @@
+/* 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 CONTROL_CONNECTION_ST_H
+#define CONTROL_CONNECTION_ST_H
+
+#include "or.h"
+
+/** Subtype of connection_t for an connection to a controller. */
+struct control_connection_t {
+ connection_t base_;
+
+ uint64_t event_mask; /**< Bitfield: which events does this controller
+ * care about?
+ * EVENT_MAX_ is >31, so we need a 64 bit mask */
+
+ /** True if we have sent a protocolinfo reply on this connection. */
+ unsigned int have_sent_protocolinfo:1;
+ /** True if we have received a takeownership command on this
+ * connection. */
+ unsigned int is_owning_control_connection:1;
+
+ /** List of ephemeral onion services belonging to this connection. */
+ smartlist_t *ephemeral_onion_services;
+
+ /** If we have sent an AUTHCHALLENGE reply on this connection and
+ * have not received a successful AUTHENTICATE command, points to
+ * the value which the client must send to authenticate itself;
+ * otherwise, NULL. */
+ char *safecookie_client_hash;
+
+ /** Amount of space allocated in incoming_cmd. */
+ uint32_t incoming_cmd_len;
+ /** Number of bytes currently stored in incoming_cmd. */
+ uint32_t incoming_cmd_cur_len;
+ /** A control command that we're reading from the inbuf, but which has not
+ * yet arrived completely. */
+ char *incoming_cmd;
+};
+
+#endif
+