GNUnet 0.21.1
gnunet_testing_plugin.h
Go to the documentation of this file.
1/*
2 This file is part of GNUnet
3 Copyright (C) 2021 GNUnet e.V.
4
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19 */
20
28#ifndef GNUNET_TESTING_PLUGIN_H
29#define GNUNET_TESTING_PLUGIN_H
30
31#include "gnunet_common.h"
32
33#ifdef __cplusplus
34extern "C"
35{
36#if 0 /* keep Emacsens' auto-indent happy */
37}
38#endif
39#endif
40
41
48typedef void
50 size_t msg_length);
51
55typedef void
57
58
77typedef struct GNUNET_TESTING_Interpreter *
78(*GNUNET_TESTING_PLUGIN_StartTestCase) (
80 const char *router_ip,
81 const char *node_ip,
82 const char *n,
83 const char *m,
84 const char *local_m,
85 const char *topology_data,
86 unsigned int *read_file,
88 finish_cb);
89
97typedef void
99
108typedef void
110
111
119typedef struct GNUNET_TESTING_BarrierList*
120(*GNUNET_TESTING_PLUGIN_GET_WAITING_FOR_BARRIERS) (void);
121
122
127{
128
130
132
134
136};
137
138#if 0 /* keep Emacsens' auto-indent happy */
139{
140#endif
141#ifdef __cplusplus
142}
143#endif
144
145#endif
static struct GNUNET_ARM_MonitorHandle * m
Monitor connection with ARM.
Definition: gnunet-arm.c:104
static int write_message(uint16_t message_type, const char *data, size_t data_length)
Write message to the master process.
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
void(* GNUNET_TESTING_cmd_helper_finish_cb)()
Callback function which writes a message from the helper process running on a netjail node to the mas...
void(* GNUNET_TESTING_cmd_helper_write_cb)(struct GNUNET_MessageHeader *message, size_t msg_length)
Callback function to write messages from the helper process running on a netjail node to the master p...
void(* GNUNET_TESTING_PLUGIN_ALL_PEERS_STARTED)()
DEPRECATED The helper process received a message of type GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_PEERS_ST...
void(* GNUNET_TESTING_PLUGIN_ALL_LOCAL_TESTS_PREPARED)()
DEPRECATED The helper process received a message of type GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_LOCAL_TE...
struct GNUNET_TESTING_BarrierList *(* GNUNET_TESTING_PLUGIN_GET_WAITING_FOR_BARRIERS)(void)
This function returns a struct GNUNET_TESTING_BarrierList, which is a list of all barriers this test ...
struct GNUNET_TESTING_Interpreter *(* GNUNET_TESTING_PLUGIN_StartTestCase)(GNUNET_TESTING_cmd_helper_write_cb write_message, const char *router_ip, const char *node_ip, const char *n, const char *m, const char *local_m, const char *topology_data, unsigned int *read_file, GNUNET_TESTING_cmd_helper_finish_cb finish_cb)
Function to be implemented for each test case plugin which starts the test case on a netjail node.
enum GNUNET_GenericReturnValue read_file(char const *const filename, char **buffer)
Definition: pabc_helper.c:71
Header for all communications.
A list to hold barriers provided by plugins FIXME: why is this in the public API!?...
Global state of the interpreter, used by a command to access information about other commands.
The plugin API every test case plugin has to implement.
GNUNET_TESTING_PLUGIN_ALL_LOCAL_TESTS_PREPARED all_local_tests_prepared
GNUNET_TESTING_PLUGIN_ALL_PEERS_STARTED all_peers_started
GNUNET_TESTING_PLUGIN_GET_WAITING_FOR_BARRIERS get_waiting_for_barriers
GNUNET_TESTING_PLUGIN_StartTestCase start_testcase