#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_testing_lib.h"
#include "gnunet_testbed_lib.h"
#include "gnunet_testing_testbed_lib.h"
#include "gnunet_testing_transport_lib.h"
#include "transport-testing2.h"
#include "transport-testing-cmds.h"
Go to the source code of this file.
Data Structures | |
struct | SendSimpleState |
Struct to hold information for callbacks. More... | |
Macros | |
#define | LOG(kind, ...) GNUNET_log (kind, __VA_ARGS__) |
Generic logging shortcut. More... | |
Functions | |
static void | send_simple_cleanup (void *cls) |
The cleanup function of this cmd frees resources the cmd allocated. More... | |
static int | send_simple_cb (void *cls, const struct GNUNET_ShortHashCode *key, void *value) |
static void | send_simple_run (void *cls, struct GNUNET_TESTING_Interpreter *is) |
The run method of this cmd will send a simple message to the connected peers. More... | |
struct GNUNET_TESTING_Command | GNUNET_TRANSPORT_cmd_send_simple (const char *label, const char *start_peer_label, const char *create_label, uint32_t num) |
Create command. More... | |
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log (kind, __VA_ARGS__) |
Generic logging shortcut.
Definition at line 38 of file testing_cmd_transport_send_simple.c.
|
static |
The cleanup function of this cmd frees resources the cmd allocated.
Definition at line 72 of file testing_cmd_transport_send_simple.c.
References GNUNET_free.
Referenced by GNUNET_TRANSPORT_cmd_send_simple().
|
static |
Definition at line 81 of file testing_cmd_transport_send_simple.c.
References env, GNUNET_ERROR_TYPE_DEBUG, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_OK, GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE, LOG, mq, SendSimpleState::num, GNUNET_TRANSPORT_TESTING_TestMessage::num, and value.
Referenced by send_simple_run().
|
static |
The run method of this cmd will send a simple message to the connected peers.
Definition at line 112 of file testing_cmd_transport_send_simple.c.
References SendSimpleState::create_label, GNUNET_CONTAINER_multishortmap_iterate(), GNUNET_TESTING_interpreter_lookup_command(), GNUNET_TESTING_TESTBED_get_trait_test_system(), GNUNET_TRANSPORT_TESTING_get_trait_connected_peers_map(), is, send_simple_cb(), and SendSimpleState::start_peer_label.
Referenced by GNUNET_TRANSPORT_cmd_send_simple().
struct GNUNET_TESTING_Command GNUNET_TRANSPORT_cmd_send_simple | ( | const char * | label, |
const char * | start_peer_label, | ||
const char * | create_label, | ||
uint32_t | num | ||
) |
Create command.
label | name for command. |
start_peer_label | Label of the cmd to start a peer. |
create_label | Label of the cmd which started the test system. |
num | Number globally identifying the node. |
topology | The topology for the test setup. |
Definition at line 139 of file testing_cmd_transport_send_simple.c.
References SendSimpleState::create_label, GNUNET_new, GNUNET_TESTING_command_new, SendSimpleState::num, send_simple_cleanup(), send_simple_run(), and SendSimpleState::start_peer_label.
Referenced by start_testcase().