Go to the source code of this file.
Data Structures | |
struct | GNUNET_TESTING_ConnectPeersState |
Struct to store information needed in callbacks. More... | |
struct | GNUNET_TESTING_CORE_Channel |
struct | GNUNET_TESTING_CORE_Message |
struct | GNUNET_TESTING_CORE_ConnectCb |
struct | GNUNET_TESTING_CORE_ConnectState |
Macros | |
#define | MTYPE 12345 |
API for cmds working with core sub system provided by libgnunetcoretesting. | |
#define | NODE_ID_LEN 16 |
#define | GNUNET_CORE_TESTING_SIMPLE_TRAITS(op, prefix) |
Call op on all simple traits. | |
Typedefs | |
typedef void *(* | GNUNET_TESTING_CORE_connect_cb) (void *cls, const struct GNUNET_PeerIdentity *peer_id, struct GNUNET_MQ_Handle *mq) |
typedef void(* | GNUNET_TESTING_CORE_handle_msg) (void *cls, struct GNUNET_TESTING_CORE_Channel *channel, const struct GNUNET_TESTING_CORE_Message *msg) |
#define MTYPE 12345 |
API for cmds working with core sub system provided by libgnunetcoretesting.
Definition at line 33 of file gnunet_testing_core_lib.h.
#define NODE_ID_LEN 16 |
Definition at line 35 of file gnunet_testing_core_lib.h.
Call op on all simple traits.
Definition at line 250 of file gnunet_testing_core_lib.h.
typedef void *(* GNUNET_TESTING_CORE_connect_cb) (void *cls, const struct GNUNET_PeerIdentity *peer_id, struct GNUNET_MQ_Handle *mq) |
Definition at line 153 of file gnunet_testing_core_lib.h.
typedef void(* GNUNET_TESTING_CORE_handle_msg) (void *cls, struct GNUNET_TESTING_CORE_Channel *channel, const struct GNUNET_TESTING_CORE_Message *msg) |
Definition at line 167 of file gnunet_testing_core_lib.h.
struct GNUNET_TESTING_Command GNUNET_CORE_cmd_connect_peers | ( | const char * | label, |
const char * | start_peer_label, | ||
const char * | create_label, | ||
uint32_t | num, | ||
struct GNUNET_TESTING_NetjailTopology * | topology, | ||
unsigned int | additional_connects, | ||
unsigned int | wait_for_connect, | ||
struct GNUNET_MQ_MessageHandler * | handlers | ||
) |
FIXME: document properly! 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. |
additional_connects | Number of additional connects this cmd will wait for not triggered by this cmd. |
Definition at line 212 of file testing_core_cmd_connecting_peers.c.
References GNUNET_TESTING_ConnectPeersState::ac, GNUNET_TESTING_ConnectPeersState::additional_connects, connect_peers_cleanup(), connect_peers_run(), connect_peers_traits(), GNUNET_TESTING_ConnectPeersState::connected_peers_map, GNUNET_TESTING_ConnectPeersState::create_label, GNUNET_CONTAINER_multishortmap_create(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_memcpy, GNUNET_new, GNUNET_new_array, GNUNET_NO, GNUNET_TESTING_command_new, GNUNET_TESTING_command_new_ac(), GNUNET_TESTING_get_additional_connects(), GNUNET_YES, handlers, GNUNET_TESTING_ConnectPeersState::handlers, LOG, GNUNET_TESTING_ConnectPeersState::num, GNUNET_TESTING_ConnectPeersState::start_peer_label, GNUNET_TESTING_ConnectPeersState::topology, and GNUNET_TESTING_ConnectPeersState::wait_for_connect.
const struct GNUNET_TESTING_Command GNUNET_TESTING_CORE_cmd_connect | ( | const char * | label, |
const char * | node_id, | ||
char * | arm_service_label | ||
) |
Definition at line 297 of file testing_core_cmd_connect.c.
References GNUNET_TESTING_CORE_ConnectState::ac, GNUNET_TESTING_CORE_ConnectState::arm_service_label, GNUNET_TESTING_CORE_ConnectState::connect_cbs, GNUNET_TESTING_CORE_ConnectState::connect_cbs_len, connect_traits(), exec_connect_cleanup(), exec_connect_run(), GNUNET_TESTING_CORE_ConnectState::finished, GNUNET_ERROR_TYPE_DEBUG, GNUNET_new, GNUNET_new_array, GNUNET_NO, GNUNET_strdup, GNUNET_TESTING_command_new_ac(), LOG, GNUNET_TESTING_CORE_ConnectState::node_id, GNUNET_TESTING_CORE_ConnectState::recv_handlers, and GNUNET_TESTING_CORE_ConnectState::recv_handlers_len.
const struct GNUNET_TESTING_Command GNUNET_TESTING_CORE_cmd_recv | ( | const char * | label, |
uint64_t | num_messages | ||
) |
Definition at line 251 of file testing_core_cmd_recv.c.
References RecvState::ac, RecvState::channel_count, exec_recv_cleanup(), exec_recv_run(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_new, GNUNET_new_array, GNUNET_TESTING_command_new_ac(), LOG, RecvState::num_channels, and RecvState::num_messages_target.
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.
enum GNUNET_GenericReturnValue GNUNET_CORE_TESTING_get_trait_connect_peer_state | ( | const struct GNUNET_TESTING_Command * | cmd, |
const struct GNUNET_TESTING_ConnectPeersState ** | ret | ||
) |
struct GNUNET_TESTING_Trait GNUNET_CORE_TESTING_make_trait_connect_peer_state | ( | const struct GNUNET_TESTING_ConnectPeersState * | value | ) |
enum GNUNET_GenericReturnValue GNUNET_CORE_TESTING_get_trait_connect | ( | const struct GNUNET_TESTING_Command * | cmd, |
const struct GNUNET_TESTING_CORE_ConnectState ** | ret | ||
) |
struct GNUNET_TESTING_Trait GNUNET_CORE_TESTING_make_trait_connect | ( | const struct GNUNET_TESTING_CORE_ConnectState * | value | ) |