proto_ext_or.h 665 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-2019, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. #ifndef TOR_PROTO_EXT_OR_H
  7. #define TOR_PROTO_EXT_OR_H
  8. struct buf_t;
  9. /** A parsed Extended ORPort message. */
  10. struct ext_or_cmd_t {
  11. uint16_t cmd; /** Command type */
  12. uint16_t len; /** Body length */
  13. char body[FLEXIBLE_ARRAY_MEMBER]; /** Message body */
  14. };
  15. int fetch_ext_or_command_from_buf(struct buf_t *buf,
  16. struct ext_or_cmd_t **out);
  17. #endif /* !defined(TOR_PROTO_EXT_OR_H) */