cell_queue_st.h 949 B

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