fakechans.h 733 B

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