proto_socks.h 775 B

12345678910111213141516171819202122
  1. /* Copyright (c) 2001 Matej Pfajfar.
  2. * Copyright (c) 2001-2004, Roger Dingledine.
  3. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  4. * Copyright (c) 2007-2018, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. #ifndef TOR_PROTO_SOCKS_H
  7. #define TOR_PROTO_SOCKS_H
  8. struct socks_request_t;
  9. struct buf_t;
  10. struct socks_request_t *socks_request_new(void);
  11. void socks_request_free_(struct socks_request_t *req);
  12. #define socks_request_free(req) \
  13. FREE_AND_NULL(socks_request_t, socks_request_free_, (req))
  14. int fetch_from_buf_socks(struct buf_t *buf, socks_request_t *req,
  15. int log_sockstype, int safe_socks);
  16. int fetch_from_buf_socks_client(buf_t *buf, int state, char **reason);
  17. #endif /* !defined(TOR_PROTO_SOCKS_H) */