cell_queue_st.h 926 B

12345678910111213141516171819202122232425262728
  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 PACKED_CELL_ST_H
  7. #define PACKED_CELL_ST_H
  8. /** A cell as packed for writing to the network. */
  9. struct packed_cell_t {
  10. /** Next cell queued on this circuit. */
  11. TOR_SIMPLEQ_ENTRY(packed_cell_t) next;
  12. char body[CELL_MAX_NETWORK_SIZE]; /**< Cell as packed for network. */
  13. uint32_t inserted_timestamp; /**< Time (in timestamp units) when this cell
  14. * was inserted */
  15. };
  16. /** A queue of cells on a circuit, waiting to be added to the
  17. * or_connection_t's outbuf. */
  18. struct cell_queue_t {
  19. /** Linked list of packed_cell_t*/
  20. TOR_SIMPLEQ_HEAD(cell_simpleq, packed_cell_t) head;
  21. int n; /**< The number of cells in the queue. */
  22. };
  23. #endif