28#include "gnunet_testing_ng_lib.h"
29#include "gnunet_testing_netjail_lib.h"
36#define LOG(kind, ...) GNUNET_log (kind, __VA_ARGS__)
93 "Sending simple test message with mq %p\n",
99 test->
num = htonl (sss->
num);
102 1000 -
sizeof(*test));
126 &connected_peers_map);
130 GNUNET_TESTING_get_trait_test_system (system_cmd,
142 const char *start_peer_label,
143 const char *create_label,
struct GNUNET_MQ_Handle * mq
struct GNUNET_MQ_Envelope * env
static struct GNUNET_TESTING_Interpreter * is
struct GNUNET_HashCode key
The key used in the DHT.
static char * value
Value of the record to add/remove.
const struct GNUNET_TESTING_Command * GNUNET_TESTING_interpreter_lookup_command(struct GNUNET_TESTING_Interpreter *is, const char *label)
Lookup command by label.
#define GNUNET_TESTING_command_new(cls, label, run, cleanup, traits)
Create a new command.
enum GNUNET_GenericReturnValue GNUNET_TRANSPORT_TESTING_get_trait_connected_peers_map(const struct GNUNET_TESTING_Command *cmd, const struct GNUNET_CONTAINER_MultiShortmap **ret)
int GNUNET_CONTAINER_multishortmap_iterate(struct GNUNET_CONTAINER_MultiShortmap *map, GNUNET_CONTAINER_ShortmapIterator it, void *it_cls)
Iterate over all entries in the map.
@ GNUNET_ERROR_TYPE_DEBUG
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
#define GNUNET_MQ_msg_extra(mvar, esize, type)
Allocate an envelope, with extra space allocated after the space needed by the message struct.
Internal representation of the hash map.
Handle to a message queue.
Handle for a system on which GNUnet peers are executed; a system is used for reserving unique paths a...
A command to be run by the interpreter.
struct GNUNET_TESTING_CommandLabel label
Label for the command.
Global state of the interpreter, used by a command to access information about other commands.
Toplogy of our netjail setup.
uint32_t num
Monotonically increasing counter throughout the test.
Struct to hold information for callbacks.
const char * create_label
Label of the cmd which started the test system.
uint32_t num
Number globally identifying the node.
struct GNUNET_TESTING_NetjailTopology * topology
The topology we get the connected nodes from.
const char * start_peer_label
Label of the cmd to start a peer.
#define GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE
Message type used by GNUNET_TRANSPORT_TESTING_simple_send().
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.
static void send_simple_cleanup(void *cls)
The cleanup function of this cmd frees resources the cmd allocated.
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.
#define LOG(kind,...)
Generic logging shortcut.
static int send_simple_cb(void *cls, const struct GNUNET_ShortHashCode *key, void *value)