#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_testing_lib.h"
#include "gnunet_core_service.h"
#include "gnunet_testing_core_lib.h"
Go to the source code of this file.
Data Structures | |
struct | SendState |
State for the 'send' command. More... | |
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "testing-core-send", __VA_ARGS__) |
Generic logging shortcut. More... | |
Functions | |
static void * | connect_cb (void *cls, const struct GNUNET_PeerIdentity *peer_id, struct GNUNET_MQ_Handle *mq) |
static void | cleanup_callbacks (struct SendState *send_state) |
static void | send_messages (struct SendState *send_state) |
static void | exec_send_run (void *cls, struct GNUNET_TESTING_Interpreter *is) |
static void | exec_send_cleanup (void *cls) |
const struct GNUNET_TESTING_Command | GNUNET_TESTING_CORE_cmd_send (const char *label, uint64_t num_messages, enum GNUNET_GenericReturnValue await_new_connection) |
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "testing-core-send", __VA_ARGS__) |
Generic logging shortcut.
Definition at line 37 of file testing_core_cmd_send.c.
|
static |
Definition at line 135 of file testing_core_cmd_send.c.
References send_messages().
Referenced by cleanup_callbacks(), and exec_send_run().
|
static |
Definition at line 56 of file testing_core_cmd_send.c.
References GNUNET_TESTING_CORE_ConnectCb::callback, connect_cb(), GNUNET_TESTING_CORE_ConnectState::connect_cbs, GNUNET_TESTING_CORE_ConnectState::connect_cbs_len, SendState::connect_state, GNUNET_array_grow, and GNUNET_memcpy.
Referenced by send_messages().
|
static |
Definition at line 84 of file testing_core_cmd_send.c.
References GNUNET_TESTING_CORE_ConnectState::channels_head, cleanup_callbacks(), GNUNET_TESTING_CORE_Channel::connect_state, SendState::connect_state, env, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_htonll(), GNUNET_i2s(), GNUNET_memcpy, GNUNET_MQ_msg, GNUNET_MQ_send(), LOG, GNUNET_TESTING_CORE_Channel::mq, msg, MTYPE, GNUNET_TESTING_CORE_Channel::next, GNUNET_TESTING_CORE_ConnectState::node_id, NODE_ID_LEN, SendState::num_messages, and GNUNET_TESTING_CORE_Channel::peer_id.
Referenced by connect_cb(), and exec_send_run().
|
static |
Definition at line 150 of file testing_core_cmd_send.c.
References SendState::await_new_connection, GNUNET_TESTING_CORE_ConnectCb::callback, GNUNET_TESTING_CORE_ConnectState::channels_head, GNUNET_TESTING_CORE_ConnectCb::cls, connect_cb(), GNUNET_TESTING_CORE_ConnectState::connect_cbs, GNUNET_TESTING_CORE_ConnectState::connect_cbs_len, SendState::connect_state, GNUNET_array_append, GNUNET_assert, GNUNET_CORE_TESTING_get_trait_connect(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_new, GNUNET_NO, GNUNET_OK, GNUNET_TESTING_interpreter_lookup_command(), is, LOG, and send_messages().
Referenced by GNUNET_TESTING_CORE_cmd_send().
|
static |
Definition at line 189 of file testing_core_cmd_send.c.
Referenced by GNUNET_TESTING_CORE_cmd_send().
const struct GNUNET_TESTING_Command GNUNET_TESTING_CORE_cmd_send | ( | const char * | label, |
uint64_t | num_messages, | ||
enum GNUNET_GenericReturnValue | await_new_connection | ||
) |
Definition at line 198 of file testing_core_cmd_send.c.
References SendState::await_new_connection, exec_send_cleanup(), exec_send_run(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_new, GNUNET_TESTING_command_new, LOG, and SendState::num_messages.