tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

socks5_status.h (1497B)


      1 /* Copyright (c) 2003-2004, Roger Dingledine
      2 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
      3 * Copyright (c) 2007-2021, The Tor Project, Inc. */
      4 /* See LICENSE for licensing information */
      5 
      6 /**
      7 * \file socks5_status.h
      8 * \brief Status codes used by the SOCKS5 protocol.
      9 **/
     10 
     11 /* NOTE: it probably isn't necessary to put this header in lib/net, but
     12 * we need it in _some_ lower-level layer for now, since it is used by
     13 * tools/tor-resolve.c.
     14 */
     15 
     16 #ifndef TOR_SOCKS5_STATUS_H
     17 #define TOR_SOCKS5_STATUS_H
     18 
     19 /** Specified SOCKS5 status codes. */
     20 typedef enum {
     21  SOCKS5_SUCCEEDED                  = 0x00,
     22  SOCKS5_GENERAL_ERROR              = 0x01,
     23  SOCKS5_NOT_ALLOWED                = 0x02,
     24  SOCKS5_NET_UNREACHABLE            = 0x03,
     25  SOCKS5_HOST_UNREACHABLE           = 0x04,
     26  SOCKS5_CONNECTION_REFUSED         = 0x05,
     27  SOCKS5_TTL_EXPIRED                = 0x06,
     28  SOCKS5_COMMAND_NOT_SUPPORTED      = 0x07,
     29  SOCKS5_ADDRESS_TYPE_NOT_SUPPORTED = 0x08,
     30 
     31  /* Extended error code (see prop304). Only used if the SocksPort flag
     32   * "ExtendedErrors" is set. */
     33  SOCKS5_HS_NOT_FOUND               = 0xF0,
     34  SOCKS5_HS_IS_INVALID              = 0xF1,
     35  SOCKS5_HS_INTRO_FAILED            = 0xF2,
     36  SOCKS5_HS_REND_FAILED             = 0xF3,
     37  SOCKS5_HS_MISSING_CLIENT_AUTH     = 0xF4,
     38  SOCKS5_HS_BAD_CLIENT_AUTH         = 0xF5,
     39  SOCKS5_HS_BAD_ADDRESS             = 0xF6,
     40  SOCKS5_HS_INTRO_TIMEDOUT          = 0xF7,
     41 } socks5_reply_status_t;
     42 
     43 #endif /* !defined(TOR_SOCKS5_STATUS_H) */