diff options
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/or/or.h b/src/or/or.h index 585645c8c..8aff19a7f 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -341,18 +341,12 @@ typedef enum { #define DIR_CONN_IS_SERVER(conn) ((conn)->purpose == DIR_PURPOSE_SERVER) #define _CONTROL_CONN_STATE_MIN 1 -/** State for a control connection: Authenticated and accepting v0 commands. */ -#define CONTROL_CONN_STATE_OPEN_V0 1 /** State for a control connection: Authenticated and accepting v1 commands. */ -#define CONTROL_CONN_STATE_OPEN_V1 2 -/** State for a control connection: Waiting for authentication; either - * speaking v0 commands or waiting for evidence that it's a v1 - * connection. */ -#define CONTROL_CONN_STATE_NEEDAUTH_V0 3 +#define CONTROL_CONN_STATE_OPEN 1 /** State for a control connection: Waiting for authentication; speaking * protocol v1. */ -#define CONTROL_CONN_STATE_NEEDAUTH_V1 4 -#define _CONTROL_CONN_STATE_MAX 4 +#define CONTROL_CONN_STATE_NEEDAUTH 2 +#define _CONTROL_CONN_STATE_MAX 2 #define _DIR_PURPOSE_MIN 1 /** A connection to a directory server: download a directory. */ @@ -1929,11 +1923,11 @@ int fetch_from_buf_http(buf_t *buf, int force_complete); int fetch_from_buf_socks(buf_t *buf, socks_request_t *req, int log_sockstype, int safe_socks); -int fetch_from_buf_control0(buf_t *buf, uint32_t *len_out, uint16_t *type_out, - char **body_out, int check_for_v1); int fetch_from_buf_line(buf_t *buf, char *data_out, size_t *data_len); int fetch_from_buf_line_lf(buf_t *buf, char *data_out, size_t *data_len); +int peek_buf_has_control0_command(buf_t *buf); + void assert_buf_ok(buf_t *buf); /********************************* circuitbuild.c **********************/ |