gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r32628 - in gnunet/src: include testbed


From: gnunet
Subject: [GNUnet-SVN] r32628 - in gnunet/src: include testbed
Date: Thu, 13 Mar 2014 16:01:36 +0100

Author: bartpolot
Date: 2014-03-13 16:01:36 +0100 (Thu, 13 Mar 2014)
New Revision: 32628

Modified:
   gnunet/src/include/gnunet_testbed_service.h
   gnunet/src/testbed/testbed_api.c
Log:
- add a getter for peer->unique_id

Modified: gnunet/src/include/gnunet_testbed_service.h
===================================================================
--- gnunet/src/include/gnunet_testbed_service.h 2014-03-13 15:01:35 UTC (rev 
32627)
+++ gnunet/src/include/gnunet_testbed_service.h 2014-03-13 15:01:36 UTC (rev 
32628)
@@ -1335,7 +1335,19 @@
                                GNUNET_TESTBED_OperationCompletionCallback cont,
                                void *cls);
 
+
 /**
+ * Return the index of the peer inside of the total peer array,
+ * aka. the peer's "unique ID".
+ *
+ * @param peer Peer handle.
+ *
+ * @return The peer's unique ID.
+ */
+uint32_t
+GNUNET_TESTBED_get_index (struct GNUNET_TESTBED_Peer *peer);
+
+/**
  * Handle for testbed run helper funtions
  */
 struct GNUNET_TESTBED_RunHandle;

Modified: gnunet/src/testbed/testbed_api.c
===================================================================
--- gnunet/src/testbed/testbed_api.c    2014-03-13 15:01:35 UTC (rev 32627)
+++ gnunet/src/testbed/testbed_api.c    2014-03-13 15:01:36 UTC (rev 32628)
@@ -2156,4 +2156,18 @@
 }
 
 
+/**
+ * Return the index of the peer inside of the total peer array,
+ * aka. the peer's "unique ID".
+ *
+ * @param peer Peer handle.
+ *
+ * @return The peer's unique ID.
+ */
+uint32_t
+GNUNET_TESTBED_get_index (struct GNUNET_TESTBED_Peer *peer)
+{
+  return peer->unique_id;
+}
+
 /* end of testbed_api.c */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]