#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_testing_ng_lib.h"
#include "gnunet_testing_netjail_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, struct GNUNET_TESTING_NetjailTopology *topology) |
Create command. More... | |
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log (kind, __VA_ARGS__) |
Generic logging shortcut.
Definition at line 36 of file transport_api_cmd_send_simple.c.
|
static |
The cleanup function of this cmd frees resources the cmd allocated.
Definition at line 74 of file transport_api_cmd_send_simple.c.
References GNUNET_free.
Referenced by GNUNET_TRANSPORT_cmd_send_simple().
|
static |
Definition at line 83 of file transport_api_cmd_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, GNUNET_TRANSPORT_TESTING_TestMessage::num, SendSimpleState::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 114 of file transport_api_cmd_send_simple.c.
References SendSimpleState::create_label, GNUNET_CONTAINER_multishortmap_iterate(), GNUNET_TESTING_interpreter_lookup_command(), 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, | ||
struct GNUNET_TESTING_NetjailTopology * | topology | ||
) |
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 141 of file transport_api_cmd_send_simple.c.
References SendSimpleState::create_label, GNUNET_new, GNUNET_TESTING_command_new, SendSimpleState::num, send_simple_cleanup(), send_simple_run(), SendSimpleState::start_peer_label, and SendSimpleState::topology.