Loading src/common/compat.h +0 −13 Original line number Diff line number Diff line Loading @@ -68,19 +68,6 @@ /* ===== Net compatibility */ /** Specified SOCKS5 status codes. */ typedef enum { SOCKS5_SUCCEEDED = 0x00, SOCKS5_GENERAL_ERROR = 0x01, SOCKS5_NOT_ALLOWED = 0x02, SOCKS5_NET_UNREACHABLE = 0x03, SOCKS5_HOST_UNREACHABLE = 0x04, SOCKS5_CONNECTION_REFUSED = 0x05, SOCKS5_TTL_EXPIRED = 0x06, SOCKS5_COMMAND_NOT_SUPPORTED = 0x07, SOCKS5_ADDRESS_TYPE_NOT_SUPPORTED = 0x08, } socks5_reply_status_t; /* ===== OS compatibility */ /* This needs some of the declarations above so we include it here. */ Loading src/common/include.am +1 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ COMMONHEADERS = \ src/common/compat_libevent.h \ src/common/handles.h \ src/common/procmon.h \ src/common/socks5_status.h \ src/common/timers.h \ src/common/token_bucket.h \ src/common/util.h \ Loading src/common/socks5_status.h 0 → 100644 +22 −0 Original line number Diff line number Diff line /* Copyright (c) 2003-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 TOR_SOCKS5_STATUS_H #define TOR_SOCKS5_STATUS_H /** Specified SOCKS5 status codes. */ typedef enum { SOCKS5_SUCCEEDED = 0x00, SOCKS5_GENERAL_ERROR = 0x01, SOCKS5_NOT_ALLOWED = 0x02, SOCKS5_NET_UNREACHABLE = 0x03, SOCKS5_HOST_UNREACHABLE = 0x04, SOCKS5_CONNECTION_REFUSED = 0x05, SOCKS5_TTL_EXPIRED = 0x06, SOCKS5_COMMAND_NOT_SUPPORTED = 0x07, SOCKS5_ADDRESS_TYPE_NOT_SUPPORTED = 0x08, } socks5_reply_status_t; #endif src/or/reasons.h +2 −1 Original line number Diff line number Diff line Loading @@ -12,6 +12,8 @@ #ifndef TOR_REASONS_H #define TOR_REASONS_H #include "common/socks5_status.h" const char *stream_end_reason_to_control_string(int reason); const char *stream_end_reason_to_string(int reason); socks5_reply_status_t stream_end_reason_to_socks5_response(int reason); Loading @@ -29,4 +31,3 @@ const char *bandwidth_weight_rule_to_string(enum bandwidth_weight_rule_t rule); const char *end_reason_to_http_connect_response_line(int endreason); #endif /* !defined(TOR_REASONS_H) */ src/test/test_socks.c +1 −1 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ #include "test/test.h" #include "test/log_test_helpers.h" #include "or/socks_request_st.h" #include "common/socks5_status.h" typedef struct socks_test_data_t { socks_request_t *req; Loading Loading @@ -1047,4 +1048,3 @@ struct testcase_t socks_tests[] = { END_OF_TESTCASES }; Loading
src/common/compat.h +0 −13 Original line number Diff line number Diff line Loading @@ -68,19 +68,6 @@ /* ===== Net compatibility */ /** Specified SOCKS5 status codes. */ typedef enum { SOCKS5_SUCCEEDED = 0x00, SOCKS5_GENERAL_ERROR = 0x01, SOCKS5_NOT_ALLOWED = 0x02, SOCKS5_NET_UNREACHABLE = 0x03, SOCKS5_HOST_UNREACHABLE = 0x04, SOCKS5_CONNECTION_REFUSED = 0x05, SOCKS5_TTL_EXPIRED = 0x06, SOCKS5_COMMAND_NOT_SUPPORTED = 0x07, SOCKS5_ADDRESS_TYPE_NOT_SUPPORTED = 0x08, } socks5_reply_status_t; /* ===== OS compatibility */ /* This needs some of the declarations above so we include it here. */ Loading
src/common/include.am +1 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ COMMONHEADERS = \ src/common/compat_libevent.h \ src/common/handles.h \ src/common/procmon.h \ src/common/socks5_status.h \ src/common/timers.h \ src/common/token_bucket.h \ src/common/util.h \ Loading
src/common/socks5_status.h 0 → 100644 +22 −0 Original line number Diff line number Diff line /* Copyright (c) 2003-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 TOR_SOCKS5_STATUS_H #define TOR_SOCKS5_STATUS_H /** Specified SOCKS5 status codes. */ typedef enum { SOCKS5_SUCCEEDED = 0x00, SOCKS5_GENERAL_ERROR = 0x01, SOCKS5_NOT_ALLOWED = 0x02, SOCKS5_NET_UNREACHABLE = 0x03, SOCKS5_HOST_UNREACHABLE = 0x04, SOCKS5_CONNECTION_REFUSED = 0x05, SOCKS5_TTL_EXPIRED = 0x06, SOCKS5_COMMAND_NOT_SUPPORTED = 0x07, SOCKS5_ADDRESS_TYPE_NOT_SUPPORTED = 0x08, } socks5_reply_status_t; #endif
src/or/reasons.h +2 −1 Original line number Diff line number Diff line Loading @@ -12,6 +12,8 @@ #ifndef TOR_REASONS_H #define TOR_REASONS_H #include "common/socks5_status.h" const char *stream_end_reason_to_control_string(int reason); const char *stream_end_reason_to_string(int reason); socks5_reply_status_t stream_end_reason_to_socks5_response(int reason); Loading @@ -29,4 +31,3 @@ const char *bandwidth_weight_rule_to_string(enum bandwidth_weight_rule_t rule); const char *end_reason_to_http_connect_response_line(int endreason); #endif /* !defined(TOR_REASONS_H) */
src/test/test_socks.c +1 −1 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ #include "test/test.h" #include "test/log_test_helpers.h" #include "or/socks_request_st.h" #include "common/socks5_status.h" typedef struct socks_test_data_t { socks_request_t *req; Loading Loading @@ -1047,4 +1048,3 @@ struct testcase_t socks_tests[] = { END_OF_TESTCASES };