- mark old API calls used for previous VPN implementation as deprecated
[oweals/gnunet.git] / src / include / gnunet_testing_lib-new.h
index c3d17c48d4a1d373be48907d7e8a3ae252af78ce..fc26eefa03beb2810cd3fffbf94e2e3817750412 100644 (file)
@@ -102,9 +102,9 @@ GNUNET_TESTING_system_destroy (struct GNUNET_TESTING_System *system,
  * @param key_number desired pre-created hostkey to obtain
  * @param id set to the peer's identity (hash of the public
  *        key; if NULL, GNUNET_SYSERR is returned immediately
- * @return GNUNET_SYSERR on error (not enough keys)
+ * @return NULL on error (not enough keys)
  */
-int
+struct GNUNET_CRYPTO_RsaPrivateKey *
 GNUNET_TESTING_hostkey_get (const struct GNUNET_TESTING_System *system,
                            uint32_t key_number,
                            struct GNUNET_PeerIdentity *id);
@@ -176,6 +176,17 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
                               char **emsg);
 
 
+/**
+ * Obtain the peer identity from a peer handle.
+ *
+ * @param peer peer handle for which we want the peer's identity
+ * @param id identifier for the daemon, will be set
+ */
+void
+GNUNET_TESTING_peer_get_identity (const struct GNUNET_TESTING_Peer *peer,
+                                 struct GNUNET_PeerIdentity *id);
+
+
 /**
  * Start the peer. 
  *
@@ -213,9 +224,11 @@ GNUNET_TESTING_peer_destroy (struct GNUNET_TESTING_Peer *peer);
  * 
  * @param cls closure
  * @param cfg configuration of the peer that was started
+ * @param peer identity of the peer that was created
  */
 typedef void (*GNUNET_TESTING_TestMain)(void *cls,
-                                       const struct GNUNET_CONFIGURATION_Handle *cfg);
+                                       const struct GNUNET_CONFIGURATION_Handle *cfg,
+                                       struct GNUNET_TESTING_Peer *peer);
 
 
 /**
@@ -270,7 +283,6 @@ GNUNET_TESTING_service_run (const char *testdir,
                            void *tm_cls);
 
 
-
 /**
  * Sometimes we use the binary name to determine which specific
  * test to run.  In those cases, the string after the last "_"