25#ifndef GNUNET_TESTING_CORE_LIB_H
26#define GNUNET_TESTING_CORE_LIB_H
154(*GNUNET_TESTING_CORE_connect_cb) (
219 const char *start_peer_label,
220 const char *create_label,
224 unsigned int wait_for_connect,
231 char *arm_service_label);
237 uint64_t num_messages);
243 uint64_t num_messages,
250#define GNUNET_CORE_TESTING_SIMPLE_TRAITS(op, prefix) \
251 op (prefix, connect_peer_state, const struct \
252 GNUNET_TESTING_ConnectPeersState) \
253 op (prefix, connect, const struct \
254 GNUNET_TESTING_CORE_ConnectState)
struct GNUNET_MQ_MessageHandlers handlers[]
struct GNUNET_MessageHeader * msg
static char * peer_id
Option –peer.
void *(* GNUNET_TESTING_CORE_connect_cb)(void *cls, const struct GNUNET_PeerIdentity *peer_id, struct GNUNET_MQ_Handle *mq)
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.
const struct GNUNET_TESTING_Command GNUNET_TESTING_CORE_cmd_connect(const char *label, const char *node_id, char *arm_service_label)
void(* GNUNET_TESTING_CORE_handle_msg)(void *cls, struct GNUNET_TESTING_CORE_Channel *channel, const struct GNUNET_TESTING_CORE_Message *msg)
const struct GNUNET_TESTING_Command GNUNET_TESTING_CORE_cmd_send(const char *label, uint64_t num_messages, enum GNUNET_GenericReturnValue await_new_connection)
const struct GNUNET_TESTING_Command GNUNET_TESTING_CORE_cmd_recv(const char *label, uint64_t num_messages)
#define GNUNET_CORE_TESTING_SIMPLE_TRAITS(op, prefix)
Call op on all simple traits.
#define GNUNET_TESTING_MAKE_DECL_SIMPLE_TRAIT(prefix, name, type)
Create headers for a trait with name name for statically allocated data of type type.
GNUNET_GenericReturnValue
Named constants for return values.
static struct GNUNET_MQ_Handle * mq
Our connection to the resolver service, created on-demand, but then persists until error or shutdown.
Internal representation of the hash map.
Context for the core service connection.
Handle to a message queue.
Message handler for a specific message type.
The identity of the host (wraps the signing key of the peer).
Handle for a system on which GNUnet peers are executed; a system is used for reserving unique paths a...
State each asynchronous command must have in its closure.
struct GNUNET_MQ_Handle * mq
struct GNUNET_TESTING_CORE_Channel * prev
struct GNUNET_TESTING_CORE_ConnectState * connect_state
struct GNUNET_PeerIdentity peer_id
struct GNUNET_TESTING_CORE_Channel * next
GNUNET_TESTING_CORE_connect_cb callback
struct GNUNET_TESTING_CORE_ConnectCb * connect_cbs
Connect callback TODO we probably only need a single one.
GNUNET_TESTING_CORE_handle_msg * recv_handlers
Receive callback.
struct GNUNET_TESTING_AsyncContext ac
struct GNUNET_TESTING_CORE_Channel * channels_tail
struct GNUNET_TESTING_CORE_Channel * channels_head
uint32_t recv_handlers_len
struct GNUNET_CORE_Handle * h
enum GNUNET_GenericReturnValue finished
const struct GNUNET_CONFIGURATION_Handle * cfg
struct GNUNET_PeerIdentity peer_id
struct GNUNET_MessageHeader header
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.
Topology of our netjail setup.
unsigned int additional_connects
Additional connects we do expect, beside the connects which are configured in the topology.
Connection to another node.
Handle to the TRANSPORT subsystem for application management.
Handle for the transport service (includes all of the state for the transport service).