diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-15 10:17:27 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-15 10:17:27 -0400 |
commit | 3b917b2408748efb2ce84c2725e2e81ee0217e03 (patch) | |
tree | d16bcb1c6393d70e05300d5fd8f95601cffc00ae /src/or/or.h | |
parent | 5d5c442e6ad726382c7b8efc0e999825a783bd9e (diff) | |
download | tor-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/or.h')
-rw-r--r-- | src/or/or.h | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/src/or/or.h b/src/or/or.h index b592484a5c..138c5a18d7 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1639,6 +1639,7 @@ typedef struct or_connection_t { uint64_t bytes_xmitted, bytes_xmitted_by_tls; } or_connection_t; +typedef struct control_connection_t control_connection_t; typedef struct edge_connection_t edge_connection_t; typedef struct entry_connection_t entry_connection_t; @@ -1695,38 +1696,6 @@ typedef struct dir_connection_t { #endif /* defined(MEASUREMENTS_21206) */ } dir_connection_t; -/** Subtype of connection_t for an connection to a controller. */ -typedef 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; -} control_connection_t; - /** Cast a connection_t subtype pointer to a connection_t **/ #define TO_CONN(c) (&(((c)->base_))) @@ -1739,9 +1708,6 @@ static or_connection_t *TO_OR_CONN(connection_t *); /** Convert a connection_t* to a dir_connection_t*; assert if the cast is * invalid. */ static dir_connection_t *TO_DIR_CONN(connection_t *); -/** Convert a connection_t* to an control_connection_t*; assert if the cast is - * invalid. */ -static control_connection_t *TO_CONTROL_CONN(connection_t *); /** Convert a connection_t* to an listener_connection_t*; assert if the cast is * invalid. */ static listener_connection_t *TO_LISTENER_CONN(connection_t *); @@ -1756,11 +1722,6 @@ static inline dir_connection_t *TO_DIR_CONN(connection_t *c) tor_assert(c->magic == DIR_CONNECTION_MAGIC); return DOWNCAST(dir_connection_t, c); } -static inline control_connection_t *TO_CONTROL_CONN(connection_t *c) -{ - tor_assert(c->magic == CONTROL_CONNECTION_MAGIC); - return DOWNCAST(control_connection_t, c); -} static inline listener_connection_t *TO_LISTENER_CONN(connection_t *c) { tor_assert(c->magic == LISTENER_CONNECTION_MAGIC); |