+/**
+ * Context information for test run
+ */
+struct TestRunContext
+{
+ /**
+ * Test master callback
+ */
+ GNUNET_TESTBED_TestMaster test_master;
+
+ /**
+ * Closure for test master
+ */
+ void *test_master_cls;
+
+ /**
+ * The controller event callback
+ */
+ GNUNET_TESTBED_ControllerCallback cc;
+
+ /**
+ * Closure for the above callback
+ */
+ void *cc_cls;
+
+ /**
+ * event mask for the controller callback
+ */
+ uint64_t event_mask;
+
+ /**
+ * Number of peers to start
+ */
+ unsigned int num_peers;
+};
+
+
+/**
+ * Main run function.
+ *
+ * @param cls NULL
+ * @param args arguments passed to GNUNET_PROGRAM_run
+ * @param cfgfile the path to configuration file
+ * @param config the configuration file handle
+ */
+static void
+run (void *cls, char *const *args, const char *cfgfile,
+ const struct GNUNET_CONFIGURATION_Handle *config)
+{
+ struct TestRunContext *rc = cls;
+
+ GNUNET_TESTBED_run (NULL, config, rc->num_peers, rc->event_mask, rc->cc,
+ rc->cc_cls, rc->test_master, rc->test_master_cls);
+}