tor

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

fakechans.h (724B)


      1 /* Copyright (c) 2014-2021, The Tor Project, Inc. */
      2 /* See LICENSE for licensing information */
      3 
      4 #ifndef TOR_FAKECHANS_H
      5 #define TOR_FAKECHANS_H
      6 
      7 /**
      8 * \file fakechans.h
      9 * \brief Declarations for fake channels for test suite use
     10 */
     11 
     12 void make_fake_cell(cell_t *c);
     13 void make_fake_var_cell(var_cell_t *c);
     14 channel_t * new_fake_channel(void);
     15 void free_fake_channel(channel_t *c);
     16 
     17 /* Also exposes some a mock used by both test_channel.c and test_relay.c */
     18 void scheduler_channel_has_waiting_cells_mock(channel_t *ch);
     19 void scheduler_release_channel_mock(channel_t *ch);
     20 
     21 /* Query some counters used by the exposed mocks */
     22 int get_mock_scheduler_has_waiting_cells_count(void);
     23 
     24 #endif /* !defined(TOR_FAKECHANS_H) */