25#ifndef GNUNET_TRANSPORT_TESTING_NG_LIB_H
26#define GNUNET_TRANSPORT_TESTING_NG_LIB_H
75 struct GNUNET_TESTING_Peer *
peer;
208 const char *system_label,
212 unsigned int broadcast);
217 const char *start_label);
229 const struct GNUNET_TESTING_System *tl_system);
235#define GNUNET_TRANSPORT_TESTING_SIMPLE_TRAITS(op, prefix) \
236 op (prefix, connected_peers_map, const struct \
237 GNUNET_CONTAINER_MultiShortmap) \
238 op (prefix, peer_id, const struct GNUNET_PeerIdentity) \
239 op (prefix, hello_size, const size_t) \
240 op (prefix, hello, const char) \
241 op (prefix, application_handle, const struct \
242 GNUNET_TRANSPORT_ApplicationHandle) \
243 op (prefix, state, const struct GNUNET_TESTING_StartPeerState) \
244 op (prefix, broadcast, const enum GNUNET_GenericReturnValue)
248 GNUNET_TRANSPORT_TESTING)
static struct GNUNET_TESTING_Interpreter * is
#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.
#define GNUNET_TRANSPORT_TESTING_SIMPLE_TRAITS(op, prefix)
Call op on all simple traits.
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_stop_peer(const char *label, const char *start_label)
Create command.
struct GNUNET_PeerIdentity * GNUNET_TESTING_get_peer(unsigned int num, const struct GNUNET_TESTING_System *tl_system)
Retrieve peer identity from the test system with the unique node id.
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_start_peer(const char *label, const char *system_label, uint32_t no, const char *node_ip, const char *cfgname, unsigned int broadcast)
Create command.
void *(* GNUNET_TESTING_notify_connect_cb)(struct GNUNET_TESTING_Interpreter *is, const struct GNUNET_PeerIdentity *peer)
GNUNET_GenericReturnValue
Named constants for return values.
Handle for interacting with ARM.
Entry in a doubly-linked list of operations awaiting for replies (in-order) from the ARM service.
Internal representation of the hash map.
Handle used to access files (and pipes).
Message handler for a specific message type.
Handle to the PEERSTORE service.
Context for a iterate request.
The identity of the host (wraps the signing key of the peer).
Entry in list of pending tasks.
State each asynchronous command must have in its closure.
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.
Handle for a peer controlled via ARM.
struct GNUNET_TESTING_AsyncContext ac
Context for our asynchronous completion.
struct GNUNET_PeerIdentity id
Peer identity.
unsigned int num_coms_started
Number of communicators connecteds with transport service.
struct GNUNET_PEERSTORE_IterateContext * pic
Peer's transport get hello handle to retrieve peer's HELLO message.
const struct GNUNET_TESTING_System * tl_system
Test setup for this peer.
struct GNUNET_TRANSPORT_ApplicationHandle * ah
Application handle.
struct GNUNET_MQ_MessageHandler * handlers
Receive callback.
struct GNUNET_SCHEDULER_Task * log_task
Task to search for log entry indicating the communicators started.
FILE * stream
Stream to read log file lines.
char * system_label
The label of the command which was started by calling GNUNET_TESTING_cmd_system_create.
enum GNUNET_GenericReturnValue coms_started
Flag indicating if all (udp and tcp) communicators connected to transport service.
struct GNUNET_ARM_Handle * h
Handle for the arm service.
unsigned int no
An unique number to identify the peer.
struct GNUNET_CONTAINER_MultiShortmap * connected_peers_map
A map with struct GNUNET_MQ_Handle values for each peer this peer is connected to.
char * node_ip
The ip of a node.
enum GNUNET_GenericReturnValue not_all_started
Flag indicating, if there are services not started completely.
struct GNUNET_SCHEDULER_Task * request_task
Task to start the request for the list of services.
struct GNUNET_DISK_FileHandle * fh
File handle for log file.
struct GNUNET_PEERSTORE_Handle * ph
Peer's PEERSTORE Handle.
size_t hello_size
Hello size.
struct GNUNET_TESTING_Peer * peer
struct GNUNET_TESTING_Peer returned by GNUNET_TESTING_peer_configure.
struct GNUNET_ARM_Operation * op
Arm operation to get a list of the services, to check if all started.
GNUNET_TESTING_notify_connect_cb notify_connect
Callback which is called on neighbour connect events.
enum GNUNET_GenericReturnValue broadcast
Flag indicating, if udp broadcast should be switched on.
struct GNUNET_TRANSPORT_CoreHandle * th
Peer's transport service handle.
struct GNUNET_CONFIGURATION_Handle * cfg
Peer's configuration.
struct GNUNET_SCHEDULER_Task * rh_task
Hello get task.
char * cfgname
GNUnet configuration file used to start a peer.
Handle to the TRANSPORT subsystem for application management.
Handle for the transport service (includes all of the state for the transport service).