From 9d5a8c05f3a33c49fd97e5b8ef99d58b96704c6d Mon Sep 17 00:00:00 2001 From: t3sserakt Date: Tue, 24 Aug 2021 11:22:45 +0200 Subject: - added header changes for cmds to stop a peer and remove a test environment, used in simple send test case plugin --- src/transport/transport-testing-ng.h | 74 +++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 19 deletions(-) (limited to 'src/transport') diff --git a/src/transport/transport-testing-ng.h b/src/transport/transport-testing-ng.h index cd5ba65a9..cd4e1f3fe 100644 --- a/src/transport/transport-testing-ng.h +++ b/src/transport/transport-testing-ng.h @@ -22,50 +22,86 @@ * @author t3sserakt */ -struct TngState +struct StartPeerState { /** - * Handle to operation + * Receive callback */ - struct GNUNET_TESTBED_Operation *operation; + struct GNUNET_MQ_MessageHandler *handlers; + + const char *cfgname; + + /** + * Peer's configuration + */ + struct GNUNET_CONFIGURATION_Handle *cfg; + + struct GNUNET_TESTING_Peer *peer; /** - * Flag indicating if service is ready. + * Peer identity */ - int service_ready; + struct GNUNET_PeerIdentity id; /** - * Abort task identifier + * Peer's transport service handle */ - struct GNUNET_SCHEDULER_Task *abort_task; + struct GNUNET_TRANSPORT_CoreHandle *th; /** - * Label of peer command. + * Application handle */ - const char *peer_label; + struct GNUNET_TRANSPORT_ApplicationHandle *ah; /** - * Name of service to start. + * Peer's PEERSTORE Handle */ - const char *servicename; + struct GNUNET_PEERSTORE_Handle *ph; /** - * Peer identity of the system. + * Hello get task */ - struct GNUNET_PeerIdentity *peer_identity; + struct GNUNET_SCHEDULER_Task *rh_task; /** - * Message handler for transport service. + * Peer's transport get hello handle to retrieve peer's HELLO message */ - const struct GNUNET_MQ_MessageHandler *handlers; + struct GNUNET_PEERSTORE_IterateContext *pic; /** - * Notify connect callback + * Hello */ - GNUNET_TRANSPORT_NotifyConnect nc; + char *hello; + + /** + * Hello size + */ + size_t hello_size; + + char *m; + + char *n; + + char *local_m; + + unsigned int finished; + + const char *system_label; /** - * Closure for the @a nc callback + * An unique number to identify the peer */ - void *cb_cls; + unsigned int no; + + struct GNUNET_CONTAINER_MultiShortmap *connected_peers_map; + + struct GNUNET_TESTING_System *tl_system; + }; + + +int +GNUNET_TRANSPORT_get_trait_state (const struct + GNUNET_TESTING_Command + *cmd, + struct StartPeerState **sps); -- cgit v1.2.3