2016-02-27 18:48:19 +01:00
|
|
|
/* Copyright (c) 2014-2016, The Tor Project, Inc. */
|
2014-01-21 09:46:57 +01:00
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
|
|
|
#ifndef TOR_FAKECHANS_H
|
|
|
|
#define TOR_FAKECHANS_H
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \file fakechans.h
|
|
|
|
* \brief Declarations for fake channels for test suite use
|
|
|
|
*/
|
|
|
|
|
|
|
|
void make_fake_cell(cell_t *c);
|
|
|
|
void make_fake_var_cell(var_cell_t *c);
|
|
|
|
channel_t * new_fake_channel(void);
|
2014-12-22 18:27:26 +01:00
|
|
|
void free_fake_channel(channel_t *c);
|
2014-01-21 09:46:57 +01:00
|
|
|
|
2014-01-21 09:58:27 +01:00
|
|
|
/* Also exposes some a mock used by both test_channel.c and test_relay.c */
|
2014-01-21 11:50:33 +01:00
|
|
|
void scheduler_channel_has_waiting_cells_mock(channel_t *ch);
|
2014-01-21 09:58:27 +01:00
|
|
|
void scheduler_release_channel_mock(channel_t *ch);
|
|
|
|
|
2014-01-21 11:50:33 +01:00
|
|
|
/* Query some counters used by the exposed mocks */
|
|
|
|
int get_mock_scheduler_has_waiting_cells_count(void);
|
|
|
|
int get_mock_scheduler_release_channel_count(void);
|
|
|
|
|
2014-01-21 09:46:57 +01:00
|
|
|
#endif /* !defined(TOR_FAKECHANS_H) */
|
2014-01-21 11:50:33 +01:00
|
|
|
|