tor/src/feature/control/control_connection_st.h
Nick Mathewson 63b4ea22af Move literally everything out of src/or
This commit won't build yet -- it just puts everything in a slightly
more logical place.

The reasoning here is that "src/core" will hold the stuff that every (or
nearly every) tor instance will need in order to do onion routing.
Other features (including some necessary ones) will live in
"src/feature".  The "src/app" directory will hold the stuff needed
to have Tor be an application you can actually run.

This commit DOES NOT refactor the former contents of src/or into a
logical set of acyclic libraries, or change any code at all.  That
will have to come in the future.

We will continue to move things around and split them in the future,
but I hope this lays a reasonable groundwork for doing so.
2018-07-05 17:15:50 -04:00

47 lines
1.6 KiB
C

/* Copyright (c) 2001 Matej Pfajfar.
* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#ifndef CONTROL_CONNECTION_ST_H
#define CONTROL_CONNECTION_ST_H
#include "or/or.h"
#include "or/connection_st.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