diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-29 10:59:23 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-29 12:21:52 -0400 |
commit | 31897a256c129c12c5a406e630d0d4aaeb7728fd (patch) | |
tree | 568a062eddcad53272ca1d6156985a7d69828175 /src/common | |
parent | 080069c7b37d398447fe63bb3941d4412587978c (diff) | |
download | tor-31897a256c129c12c5a406e630d0d4aaeb7728fd.tar.gz tor-31897a256c129c12c5a406e630d0d4aaeb7728fd.zip |
Extract socks5_status_t
I'm not sure of the best place to put this header long-term, since
both or/*.c and tools/tor-resolve.c use it.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/compat.h | 13 | ||||
-rw-r--r-- | src/common/include.am | 1 | ||||
-rw-r--r-- | src/common/socks5_status.h | 22 |
3 files changed, 23 insertions, 13 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index 6ac958c01f..48e6d916a3 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -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. */ diff --git a/src/common/include.am b/src/common/include.am index 9bc9bb65bd..899e76364f 100644 --- a/src/common/include.am +++ b/src/common/include.am @@ -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 \ diff --git a/src/common/socks5_status.h b/src/common/socks5_status.h new file mode 100644 index 0000000000..74b9c91023 --- /dev/null +++ b/src/common/socks5_status.h @@ -0,0 +1,22 @@ +/* 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 |