ss.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * ss.h
  3. * Standard structure and related definitions.
  4. *
  5. * Matej Pfajfar <mp292@cam.ac.uk>
  6. */
  7. /*
  8. * Changes :
  9. * $Log$
  10. * Revision 1.1 2002/06/26 22:45:50 arma
  11. * Initial revision
  12. *
  13. * Revision 1.5 2002/04/02 14:27:11 badbytes
  14. * Final finishes.
  15. *
  16. * Revision 1.4 2002/01/26 22:45:34 mp292
  17. * Added ss-related error codes.
  18. *
  19. * Revision 1.3 2002/01/26 19:30:09 mp292
  20. * Reviewed according to Secure-Programs-HOWTO.
  21. *
  22. * Revision 1.2 2001/12/18 10:37:47 badbytes
  23. * Header files now only apply if they were not previously included from somewhere else.
  24. *
  25. * Revision 1.1 2001/12/14 13:14:03 badbytes
  26. * Split types.h into routent.h and ss.h. Keeping them all in one file created unnecesary dependencies.
  27. *
  28. * Revision 1.2 2001/12/11 16:31:03 badbytes
  29. * Changed type from ss to SS.
  30. *
  31. * Revision 1.1 2001/12/07 11:15:28 badbytes
  32. * Added the definition for the standard structure.
  33. *
  34. */
  35. #ifndef __SS_H
  36. /* protocol types, as used in the standard structure */
  37. #define SS_PROTOCOL_TELNET 1
  38. #define SS_PROTOCOL_HTTP 2
  39. #define SS_PROTOCOL_SMTP 3
  40. /* address format types, as used in the standard structure */
  41. #define SS_ADDR_FMT_ASCII_HOST_PORT 1
  42. /* error codes returned by the onion proxy */
  43. #define SS_ERROR_SUCCESS 0
  44. #define SS_ERROR_VERSION_UNSUPPORTED 1
  45. #define SS_ERROR_ADDR_FMT_UNSUPPORTED 2
  46. #define SS_ERROR_INVALID_ADDRESS 3
  47. #define SS_ERROR_INVALID_PORT 4
  48. /* standard structure */
  49. typedef struct
  50. {
  51. unsigned char version; /* version */
  52. unsigned char protocol; /* protocol */
  53. unsigned char retry_count; /* retry count */
  54. unsigned char addr_fmt; /* address format */
  55. } ss_t;
  56. #define __SS_H
  57. #endif