258 unsigned int new_ip);
279 const char *barrier_name);
294 const char *barrier_name,
295 unsigned int global_node_number,
296 unsigned int expected_reaches,
325 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.
struct GNUNET_TESTING_Command * GNUNET_TESTING_cmd_batch_get_current_(const struct GNUNET_TESTING_Command *cmd)
Obtain what command the batch is at.
struct GNUNET_TESTING_Barrier * GNUNET_TESTING_get_barrier_(struct GNUNET_TESTING_Interpreter *is, const char *barrier_name)
Getting a barrier from the interpreter.
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.
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 GNUNET_TESTING_finish_barrier_(struct GNUNET_TESTING_Interpreter *is, const char *barrier_name)
Finish all "barrier reached" commands attached to this 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.
void GNUNET_TESTING_send_barrier_attach_(struct GNUNET_TESTING_Interpreter *is, const 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.
bool 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...
void GNUNET_TESTING_add_barrier_(struct GNUNET_TESTING_Interpreter *is, struct GNUNET_TESTING_Barrier *barrier)
Add a barrier to the loop.