#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_testing_ng_lib.h"
#include "gnunet_testing_netjail_lib.h"
#include "gnunet_transport_application_service.h"
#include "gnunet_hello_lib.h"
#include "gnunet_transport_service.h"
#include "transport-testing-cmds.h"
Go to the source code of this file.
Macros | |
#define | LOG(kind, ...) GNUNET_log (kind, __VA_ARGS__) |
Generic logging shortcut. More... | |
Functions | |
static void | connect_peers_run (void *cls, struct GNUNET_TESTING_Interpreter *is) |
The run method of this cmd will connect to peers. More... | |
static void * | notify_connect (struct GNUNET_TESTING_Interpreter *is, const struct GNUNET_PeerIdentity *peer) |
Callback from start peer cmd for signaling a peer got connected. More... | |
static void | connect_peers_cleanup (void *cls) |
The cleanup function of this cmd frees resources the cmd allocated. More... | |
enum GNUNET_GenericReturnValue | connect_peers_traits (void *cls, const void **ret, const char *trait, unsigned int index) |
This function prepares an array with traits. More... | |
struct GNUNET_TESTING_Command | GNUNET_TRANSPORT_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) |
Create command. More... | |
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log (kind, __VA_ARGS__) |
Generic logging shortcut.
Definition at line 38 of file transport_api_cmd_connecting_peers.c.
|
static |
The run method of this cmd will connect to peers.
Definition at line 45 of file transport_api_cmd_connecting_peers.c.
References address, GNUNET_TESTING_AddressPrefix::address_prefix, GNUNET_TESTING_NodeConnection::address_prefixes_head, ah, ConnectPeersState::con_num, ConnectPeersState::create_label, GNUNET_asprintf(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_i2s(), GNUNET_log, GNUNET_memcmp, GNUNET_TESTING_calculate_num(), GNUNET_TESTING_get_address(), GNUNET_TESTING_get_connections(), GNUNET_TESTING_get_peer(), GNUNET_TESTING_get_trait_test_system(), GNUNET_TESTING_interpreter_lookup_command(), GNUNET_TRANSPORT_application_validate(), GNUNET_TRANSPORT_get_trait_application_handle(), GNUNET_TRANSPORT_get_trait_broadcast(), GNUNET_YES, is, ConnectPeersState::is, LOG, GNUNET_TESTING_AddressPrefix::next, GNUNET_TESTING_NodeConnection::next, ConnectPeersState::node_connections_head, nt, ConnectPeersState::num, peer, prefix, ConnectPeersState::start_peer_label, ConnectPeersState::tl_system, and ConnectPeersState::topology.
|
static |
Callback from start peer cmd for signaling a peer got connected.
Definition at line 169 of file transport_api_cmd_connecting_peers.c.
References ConnectPeersState::ac, ConnectPeersState::additional_connects, ConnectPeersState::additional_connects_notified, GNUNET_TESTING_Command::cls, ConnectPeersState::con_num, ConnectPeersState::con_num_notified, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_i2s(), GNUNET_log, GNUNET_memcmp, GNUNET_TESTING_async_finish(), GNUNET_TESTING_calculate_num(), GNUNET_TESTING_get_peer(), GNUNET_TESTING_interpreter_lookup_command_all(), is, GNUNET_TESTING_NodeConnection::next, ConnectPeersState::node_connections_head, peer, ret, ConnectPeersState::tl_system, and ConnectPeersState::topology.
|
static |
The cleanup function of this cmd frees resources the cmd allocated.
Definition at line 221 of file transport_api_cmd_connecting_peers.c.
References GNUNET_free.
enum GNUNET_GenericReturnValue connect_peers_traits | ( | void * | cls, |
const void ** | ret, | ||
const char * | trait, | ||
unsigned int | index | ||
) |
This function prepares an array with traits.
Definition at line 221 of file transport_api_cmd_connecting_peers.c.
struct GNUNET_TESTING_Command GNUNET_TRANSPORT_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 | ||
) |
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 221 of file transport_api_cmd_connecting_peers.c.