socks5_status.h 1003 B

1234567891011121314151617181920212223242526272829303132
  1. /* Copyright (c) 2003-2004, Roger Dingledine
  2. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  3. * Copyright (c) 2007-2018, The Tor Project, Inc. */
  4. /* See LICENSE for licensing information */
  5. /**
  6. * \file socks5_status.h
  7. * \brief Status codes used by the SOCKS5 protocol.
  8. **/
  9. /* NOTE: it probably isn't necessary to put this header in lib/net, but
  10. * we need it in _some_ lower-level layer for now, since it is used by
  11. * tools/tor-resolve.c.
  12. */
  13. #ifndef TOR_SOCKS5_STATUS_H
  14. #define TOR_SOCKS5_STATUS_H
  15. /** Specified SOCKS5 status codes. */
  16. typedef enum {
  17. SOCKS5_SUCCEEDED = 0x00,
  18. SOCKS5_GENERAL_ERROR = 0x01,
  19. SOCKS5_NOT_ALLOWED = 0x02,
  20. SOCKS5_NET_UNREACHABLE = 0x03,
  21. SOCKS5_HOST_UNREACHABLE = 0x04,
  22. SOCKS5_CONNECTION_REFUSED = 0x05,
  23. SOCKS5_TTL_EXPIRED = 0x06,
  24. SOCKS5_COMMAND_NOT_SUPPORTED = 0x07,
  25. SOCKS5_ADDRESS_TYPE_NOT_SUPPORTED = 0x08,
  26. } socks5_reply_status_t;
  27. #endif