GNUnet 0.21.1
gnunet_testing_plugin.h File Reference
#include "gnunet_common.h"
Include dependency graph for gnunet_testing_plugin.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GNUNET_TESTING_PluginFunctions
 The plugin API every test case plugin has to implement. More...
 

Typedefs

typedef 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 process. More...
 
typedef void(* GNUNET_TESTING_cmd_helper_finish_cb) ()
 Callback function which writes a message from the helper process running on a netjail node to the master process * signaling that the test case running on the netjail node finished. More...
 
typedef 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. More...
 
typedef void(* GNUNET_TESTING_PLUGIN_ALL_PEERS_STARTED) ()
 DEPRECATED The helper process received a message of type GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_PEERS_STARTED. More...
 
typedef void(* GNUNET_TESTING_PLUGIN_ALL_LOCAL_TESTS_PREPARED) ()
 DEPRECATED The helper process received a message of type GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_LOCAL_TESTS_PREPARED. More...
 
typedef 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 case will wait for. More...
 

Typedef Documentation

◆ GNUNET_TESTING_cmd_helper_write_cb

typedef 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 process.

Author
t3sserakt

Plugin API to start test cases.

Parameters
messageThe message to write.
msg_lengthThe length of the message.

Definition at line 48 of file gnunet_testing_plugin.h.

◆ GNUNET_TESTING_cmd_helper_finish_cb

typedef void(* GNUNET_TESTING_cmd_helper_finish_cb) ()

Callback function which writes a message from the helper process running on a netjail node to the master process * signaling that the test case running on the netjail node finished.

Definition at line 55 of file gnunet_testing_plugin.h.

◆ GNUNET_TESTING_PLUGIN_StartTestCase

typedef 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.

Parameters
write_messageCallback function to write messages from the helper process running on a netjail node to the master process.
router_ipGlobal address of the network namespace, if the helper process is for a node in a subnet.
node_ipThe IP address of the node.
mThe number of the node in a network namespace.
nThe number of the network namespace.
local_mThe number of nodes in a network namespace.
topology_dataA file name for the file containing the topology configuration, or a string containing the topology configuration.
read_fileIf read_file is GNUNET_YES this string is the filename for the topology configuration, if read_file is GNUNET_NO the string contains the topology configuration.
finish_cbCallback function which writes a message from the helper process running on a netjail node to the master process * signaling that the test case running on the netjail node finished.
Returns
Returns The struct GNUNET_TESTING_Interpreter of the command loop running on this netjail node.

Definition at line 55 of file gnunet_testing_plugin.h.

◆ GNUNET_TESTING_PLUGIN_ALL_PEERS_STARTED

typedef void(* GNUNET_TESTING_PLUGIN_ALL_PEERS_STARTED) ()

DEPRECATED The helper process received a message of type GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_PEERS_STARTED.

This will finish the blocking command GNUNET_TESTING_cmd_block_until_external_trigger which was execute right after the command GNUNET_TESTING_cmd_send_peer_ready.

Definition at line 97 of file gnunet_testing_plugin.h.

◆ GNUNET_TESTING_PLUGIN_ALL_LOCAL_TESTS_PREPARED

typedef void(* GNUNET_TESTING_PLUGIN_ALL_LOCAL_TESTS_PREPARED) ()

DEPRECATED The helper process received a message of type GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_LOCAL_TESTS_PREPARED.

This will finish the blocking command GNUNET_TESTING_cmd_local_test_prepared which was execute right after the command GNUNET_TRANSPORT_cmd_connect_peers. FIXME: do not use ALL CAPS

Definition at line 108 of file gnunet_testing_plugin.h.

◆ GNUNET_TESTING_PLUGIN_GET_WAITING_FOR_BARRIERS

typedef 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 case will wait for.

Returns
A struct GNUNET_TESTING_BarrierList. FIXME: do not use ALL CAPS

Definition at line 108 of file gnunet_testing_plugin.h.