aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/socks_request_st.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-10-17 08:52:58 -0400
committerDavid Goulet <dgoulet@torproject.org>2019-10-17 08:52:58 -0400
commit84162c1d33c94f6d7eb87fdfea5934cba1d4fad3 (patch)
tree35424a1eeeb81ccb09af0f29a81ba0216f3d7465 /src/core/or/socks_request_st.h
parent78a9158bf00e771dcfc41d7e992692b915f27689 (diff)
downloadtor-84162c1d33c94f6d7eb87fdfea5934cba1d4fad3.tar.gz
tor-84162c1d33c94f6d7eb87fdfea5934cba1d4fad3.zip
socks: Send back extended error code if set
This commit defines the new extended error codes. It also flags the socks request object that it can use them. Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core/or/socks_request_st.h')
-rw-r--r--src/core/or/socks_request_st.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/or/socks_request_st.h b/src/core/or/socks_request_st.h
index 9fb941ff7e..0f9898524d 100644
--- a/src/core/or/socks_request_st.h
+++ b/src/core/or/socks_request_st.h
@@ -7,6 +7,8 @@
#ifndef SOCKS_REQUEST_ST_H
#define SOCKS_REQUEST_ST_H
+#include "lib/net/socks5_status.h"
+
#define MAX_SOCKS_REPLY_LEN 1024
#define SOCKS_NO_AUTH 0x00
@@ -58,6 +60,11 @@ struct socks_request_t {
* "username/password" authentication if both are offered. Used as input to
* parse_socks. */
unsigned int socks_prefer_no_auth : 1;
+ /** If set, we can send back the extended error code in the reply. */
+ unsigned int socks_use_extended_errors : 1;
+ /** If non zero, this contains the extended error code that should be used
+ * if the port was configured to use them. */
+ socks5_reply_status_t socks_extended_error_code;
/** Number of bytes in username; 0 if username is NULL */
size_t usernamelen;