Tor  0.4.3.0-alpha-dev
control_connection_st.h
Go to the documentation of this file.
1 /* Copyright (c) 2001 Matej Pfajfar.
2  * Copyright (c) 2001-2004, Roger Dingledine.
3  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4  * Copyright (c) 2007-2020, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 /**
8  * @file control_connection_st.h
9  * @brief Controller connection structure.
10  **/
11 
12 #ifndef CONTROL_CONNECTION_ST_H
13 #define CONTROL_CONNECTION_ST_H
14 
15 #include "core/or/or.h"
16 #include "core/or/connection_st.h"
17 
18 /** Subtype of connection_t for an connection to a controller. */
20  connection_t base_;
21 
22  uint64_t event_mask; /**< Bitfield: which events does this controller
23  * care about?
24  * EVENT_MAX_ is >31, so we need a 64 bit mask */
25 
26  /** True if we have sent a protocolinfo reply on this connection. */
27  unsigned int have_sent_protocolinfo:1;
28  /** True if we have received a takeownership command on this
29  * connection. */
31 
32  /** List of ephemeral onion services belonging to this connection. */
34 
35  /** If we have sent an AUTHCHALLENGE reply on this connection and
36  * have not received a successful AUTHENTICATE command, points to
37  * the value which the client must send to authenticate itself;
38  * otherwise, NULL. */
40 
41  /** Amount of space allocated in incoming_cmd. */
42  uint32_t incoming_cmd_len;
43  /** Number of bytes currently stored in incoming_cmd. */
45  /** A control command that we're reading from the inbuf, but which has not
46  * yet arrived completely. */
47  char *incoming_cmd;
48  /** The control command that we are currently processing. */
49  char *current_cmd;
50 };
51 
52 #endif /* !defined(CONTROL_CONNECTION_ST_H) */
unsigned int have_sent_protocolinfo
Base connection structure.
Master header file for Tor-specific functionality.
unsigned int is_owning_control_connection
smartlist_t * ephemeral_onion_services