tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

cell_queue_st.h (1051B)


      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-2021, The Tor Project, Inc. */
      5 /* See LICENSE for licensing information */
      6 
      7 /**
      8 * @file cell_queue_st.h
      9 * @brief Cell queue structures
     10 **/
     11 
     12 #ifndef PACKED_CELL_ST_H
     13 #define PACKED_CELL_ST_H
     14 
     15 #include "tor_queue.h"
     16 
     17 /** A cell as packed for writing to the network. */
     18 struct packed_cell_t {
     19  /** Next cell queued on this circuit. */
     20  TOR_SIMPLEQ_ENTRY(packed_cell_t) next;
     21  char body[CELL_MAX_NETWORK_SIZE]; /**< Cell as packed for network. */
     22  uint32_t inserted_timestamp; /**< Time (in timestamp units) when this cell
     23                                * was inserted */
     24 };
     25 
     26 /** A queue of cells on a circuit, waiting to be added to the
     27 * or_connection_t's outbuf. */
     28 struct cell_queue_t {
     29  /** Linked list of packed_cell_t*/
     30  TOR_SIMPLEQ_HEAD(cell_simpleq_t, packed_cell_t) head;
     31  int n; /**< The number of cells in the queue. */
     32 };
     33 
     34 #endif /* !defined(PACKED_CELL_ST_H) */