#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_testing_lib.h"
#include "gnunet_testing_transport_lib.h"
#include "gnunet_messenger_service.h"
#include "messenger-testing-cmds.h"
Go to the source code of this file.
Functions | |
static void | on_message_cb (void *cls, struct GNUNET_MESSENGER_Room *room, const struct GNUNET_MESSENGER_Contact *sender, const struct GNUNET_MESSENGER_Contact *recipient, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash, enum GNUNET_MESSENGER_MessageFlags flags) |
static void | start_service_run (void *cls, struct GNUNET_TESTING_Interpreter *is) |
static void | start_service_cleanup (void *cls) |
static enum GNUNET_GenericReturnValue | start_service_traits (void *cls, const void **ret, const char *trait, unsigned int index) |
struct GNUNET_TESTING_Command | GNUNET_MESSENGER_cmd_start_service (const char *label, const char *peer_label, const char *system_label, struct GNUNET_MESSENGER_TestStageTopology *topology, unsigned int peer_index) |
|
static |
Definition at line 34 of file testing_messenger_cmd_start_service.c.
References GNUNET_MESSENGER_Message::body, GNUNET_MESSENGER_RoomState::doors, GNUNET_CONTAINER_multihashmap_get(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE, GNUNET_CONTAINER_multipeermap_put(), GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_MESSENGER_KIND_PEER, GNUNET_MESSENGER_room_get_key(), GNUNET_OK, GNUNET_TESTING_interpreter_fail(), GNUNET_MESSENGER_Message::header, GNUNET_MESSENGER_StartServiceState::is, key, GNUNET_MESSENGER_MessageHeader::kind, GNUNET_MESSENGER_MessagePeer::peer, GNUNET_MESSENGER_MessageBody::peer, and GNUNET_MESSENGER_StartServiceState::rooms.
Referenced by start_service_run().
|
static |
Definition at line 74 of file testing_messenger_cmd_start_service.c.
References GNUNET_TESTING_StartPeerState::cfg, GNUNET_CONTAINER_multihashmap_create(), GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_MESSENGER_connect(), GNUNET_NO, GNUNET_TESTING_interpreter_fail(), GNUNET_TESTING_interpreter_lookup_command(), GNUNET_TRANSPORT_TESTING_get_trait_state(), is, GNUNET_MESSENGER_StartServiceState::is, GNUNET_MESSENGER_StartServiceState::msg, on_message_cb(), GNUNET_MESSENGER_StartServiceState::peer_label, GNUNET_MESSENGER_StartServiceState::rooms, GNUNET_MESSENGER_TestStageTopology::stage_amount, GNUNET_MESSENGER_StartServiceState::system_label, GNUNET_MESSENGER_StartServiceState::tl_system, and GNUNET_MESSENGER_StartServiceState::topology.
Referenced by GNUNET_MESSENGER_cmd_start_service().
|
static |
Definition at line 114 of file testing_messenger_cmd_start_service.c.
References GNUNET_free, GNUNET_MESSENGER_StartServiceState::peer_label, and GNUNET_MESSENGER_StartServiceState::system_label.
Referenced by GNUNET_MESSENGER_cmd_start_service().
|
static |
Definition at line 125 of file testing_messenger_cmd_start_service.c.
References GNUNET_MESSENGER_make_trait_state(), GNUNET_TESTING_get_trait(), GNUNET_TESTING_trait_end(), GNUNET_TESTING_Trait::index, ret, and traits().
Referenced by GNUNET_MESSENGER_cmd_start_service().
struct GNUNET_TESTING_Command GNUNET_MESSENGER_cmd_start_service | ( | const char * | label, |
const char * | peer_label, | ||
const char * | system_label, | ||
struct GNUNET_MESSENGER_TestStageTopology * | topology, | ||
unsigned int | peer_index | ||
) |
Definition at line 145 of file testing_messenger_cmd_start_service.c.
References GNUNET_new, GNUNET_strdup, GNUNET_TESTING_command_new, GNUNET_MESSENGER_StartServiceState::is, GNUNET_MESSENGER_StartServiceState::msg, GNUNET_MESSENGER_StartServiceState::peer_index, GNUNET_MESSENGER_StartServiceState::peer_label, GNUNET_MESSENGER_StartServiceState::rooms, GNUNET_MESSENGER_StartServiceState::stage_index, start_service_cleanup(), start_service_run(), start_service_traits(), GNUNET_MESSENGER_StartServiceState::system_label, GNUNET_MESSENGER_StartServiceState::tl_system, and GNUNET_MESSENGER_StartServiceState::topology.