summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2021-08-24 11:22:45 +0200
committert3sserakt <t3ss@posteo.de>2021-08-24 11:22:45 +0200
commit9d5a8c05f3a33c49fd97e5b8ef99d58b96704c6d (patch)
tree0d6c5bdfe5746b8bad8b8e2b4ce71e51940f407e
parent3d3d4a2ecadb2ab31cb6219db46489d1081f5ebc (diff)
- added header changes for cmds to stop a peer and remove a test environment, used in simple send test case plugin
-rw-r--r--src/include/gnunet_testing_ng_lib.h6
-rw-r--r--src/transport/transport-testing-ng.h74
2 files changed, 61 insertions, 19 deletions
diff --git a/src/include/gnunet_testing_ng_lib.h b/src/include/gnunet_testing_ng_lib.h
index 035d1bcad..939863d67 100644
--- a/src/include/gnunet_testing_ng_lib.h
+++ b/src/include/gnunet_testing_ng_lib.h
@@ -838,11 +838,17 @@ GNUNET_TESTING_get_trait_test_system (const struct
GNUNET_TESTING_Command *cmd,
struct GNUNET_TESTING_System **test_system);
+
struct GNUNET_TESTING_Command
GNUNET_TESTING_cmd_system_create (const char *label,
const char *testdir);
+struct GNUNET_TESTING_Command
+GNUNET_TESTING_cmd_system_destroy (const char *label,
+ const char *create_label);
+
+
/**
* Create command.
*
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);