258 unsigned int new_ip);
281 const char *barrier_name,
282 unsigned int global_node_number);
292 const char *barrier_name);
308 unsigned int global_node_number,
309 unsigned int expected_reaches,
338 const char *barrier_name);
struct GNUNET_TESTING_Interpreter * is
static int write_message(uint16_t message_type, const char *data, size_t data_length)
Write message to the master process.
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...
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
#define GNUNET_PACKED
gcc-ism to get packed structs.
Message send by a child loop to inform the master loop how much GNUNET_CMDS_BARRIER_REACHED messages ...
uint32_t expected_reaches
How often the child loop will reach the barrier.
uint32_t node_number
The number of the node the barrier is running on.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_CMDS_HELPER_BARRIER_ATTACHED.
Message send to a child loop to inform the child loop about a barrier being advanced.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_CMDS_HELPER_BARRIER_CROSSABLE.
struct CommandListEntry * prev
struct CommandListEntry * next
struct GNUNET_TESTING_Command * command
Internal representation of the hash map.
const char * name
Name of the barrier.
struct GNUNET_TESTING_Barrier * next
Pointer to the next prefix in the DLL.
unsigned int number_to_be_reached
Number of commands which need to reach the barrier to change state.
struct GNUNET_CONTAINER_MultiShortmap * nodes
Hash map containing the global known nodes which are not natted.
struct CommandListEntry * cmds_tail
Tail of the DLL with local commands the barrier is attached too.
struct CommandListEntry * cmds_head
Head of the DLL with local commands the barrier is attached too.
unsigned int running_on_master
Is this barrier running on the master.
double percentage_to_be_reached
Percentage of of commands which need to reach the barrier to change state.
struct GNUNET_TESTING_Barrier * prev
Pointer to the previous prefix in the DLL.
unsigned int reached
Number of commands which reached this barrier.
unsigned int expected_reaches
Number of commands attached to this barrier.
uint32_t expected_number_of_reached_messages
The number of reach messages which most likely will send.
uint32_t node_number
The number of the node the barrier is reached.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_CMDS_HELPER_BARRIER_REACHED.
A command to be run by the interpreter.
Global state of the interpreter, used by a command to access information about other commands.
Node in the netjail topology.
unsigned int node_number
The overall number of the node in the whole test system.
The plugin API every test case plugin has to implement.
char * global_n
The number of namespaces.
char * node_ip
IP address of the specific node the helper is running for.
char * local_m
The number of local nodes per namespace.
char * plugin_name
Name of the test case plugin.
char * n
The number of the namespace this node is in.
char * m
The number of the node in the namespace.
char * library_name
Name of the shared library.
struct GNUNET_TESTING_PluginFunctions * api
Plugin API.
void GNUNET_TESTING_cmd_batch_set_current_(const struct GNUNET_TESTING_Command *cmd, unsigned int new_ip)
Set what command the batch should be at.
struct GNUNET_TESTING_Command * GNUNET_TESTING_cmd_batch_get_current_(const struct GNUNET_TESTING_Command *cmd)
Obtain what command the batch is at.
void TST_interpreter_send_barrier_crossable(struct GNUNET_TESTING_Interpreter *is, const char *barrier_name, unsigned int global_node_number)
Send Message to a netjail node that a barrier can be crossed.
void GNUNET_TESTING_send_barrier_attach(struct GNUNET_TESTING_Interpreter *is, char *barrier_name, unsigned int global_node_number, unsigned int expected_reaches, GNUNET_TESTING_cmd_helper_write_cb write_message)
Send Message to master loop that cmds being attached to a barrier.
struct GNUNET_TESTING_NetjailNode * GNUNET_TESTING_barrier_get_node(struct GNUNET_TESTING_Barrier *barrier, unsigned int node_number)
Getting a node from a map by global node number.
bool GNUNET_TESTING_cmd_batch_next_(void *cls)
Advance internal pointer to next command.
bool GNUNET_TESTING_cmd_is_batch_(const struct GNUNET_TESTING_Command *cmd)
Test if this command is a batch command.
void TST_interpreter_add_barrier(struct GNUNET_TESTING_Interpreter *is, struct GNUNET_TESTING_Barrier *barrier)
Add a barrier to the loop.
struct GNUNET_TESTING_Barrier * TST_interpreter_get_barrier(struct GNUNET_TESTING_Interpreter *is, const char *barrier_name)
Getting a barrier from the interpreter.
void TST_interpreter_finish_attached_cmds(struct GNUNET_TESTING_Interpreter *is, const char *barrier_name)
Finish all "barrier reached" comands attached to this barrier.
unsigned int GNUNET_TESTING_barrier_crossable(struct GNUNET_TESTING_Barrier *barrier)
This function checks, if a barrier can be crossed, which actually means that the cmd representing the...