[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r12437 - gnunet/src/include
From: |
gnunet |
Subject: |
[GNUnet-SVN] r12437 - gnunet/src/include |
Date: |
Tue, 3 Aug 2010 10:22:59 +0200 |
Author: nevans
Date: 2010-08-03 10:22:59 +0200 (Tue, 03 Aug 2010)
New Revision: 12437
Modified:
gnunet/src/include/gnunet_core_service.h
gnunet/src/include/gnunet_protocols.h
gnunet/src/include/gnunet_testing_lib.h
Log:
iterate topoogy header related stuff
Modified: gnunet/src/include/gnunet_core_service.h
===================================================================
--- gnunet/src/include/gnunet_core_service.h 2010-08-03 08:22:04 UTC (rev
12436)
+++ gnunet/src/include/gnunet_core_service.h 2010-08-03 08:22:59 UTC (rev
12437)
@@ -359,6 +359,20 @@
void
GNUNET_CORE_peer_change_preference_cancel (struct
GNUNET_CORE_InformationRequestContext *irc);
+/**
+ * Obtain statistics and/or change preferences for the given peer.
+ *
+ * @param sched scheduler to use
+ * @param cfg configuration to use
+ * @param peer_cb function to call with the peer information
+ * @param cb_cls closure for peer_cb
+ * @return GNUNET_OK if iterating, GNUNET_SYSERR on error
+ */
+int
+GNUNET_CORE_iterate_peers (struct GNUNET_SCHEDULER_Handle *sched,
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
+ GNUNET_CORE_ConnectEventHandler peer_cb,
+ void *cb_cls);
/**
* Handle for a transmission request.
Modified: gnunet/src/include/gnunet_protocols.h
===================================================================
--- gnunet/src/include/gnunet_protocols.h 2010-08-03 08:22:04 UTC (rev
12436)
+++ gnunet/src/include/gnunet_protocols.h 2010-08-03 08:22:59 UTC (rev
12437)
@@ -360,6 +360,10 @@
*/
#define GNUNET_MESSAGE_TYPE_CORE_REQUEST_CONNECT 75
+/**
+ * Request from client asking to call back with all connected peers.
+ */
+#define GNUNET_MESSAGE_TYPE_CORE_ITERATE_PEERS 76
/**
* Session key exchange between peers.
Modified: gnunet/src/include/gnunet_testing_lib.h
===================================================================
--- gnunet/src/include/gnunet_testing_lib.h 2010-08-03 08:22:04 UTC (rev
12436)
+++ gnunet/src/include/gnunet_testing_lib.h 2010-08-03 08:22:59 UTC (rev
12437)
@@ -364,6 +364,23 @@
const char *emsg);
/**
+ * Prototype of a callback function indicating that two peers
+ * are currently connected.
+ *
+ * @param cls closure
+ * @param first peer id for first daemon
+ * @param second peer id for the second daemon
+ * @param distance distance between the connected peers
+ * @param emsg error message (NULL on success)
+ */
+typedef void (*GNUNET_TESTING_NotifyTopology)(void *cls,
+ const struct GNUNET_PeerIdentity
*first,
+ const struct GNUNET_PeerIdentity
*second,
+ struct GNUNET_TIME_Relative
latency,
+ uint32_t distance,
+ const char *emsg);
+
+/**
* Starts a GNUnet daemon. GNUnet must be installed on the target
* system and available in the PATH. The machine must furthermore be
* reachable via "ssh" (unless the hostname is "NULL") without the
@@ -743,6 +760,17 @@
char *restrict_transports);
/**
+ * Iterate over all (running) peers in the peer group, retrieve
+ * all connections that each currently has.
+ *
+ * @param pg the peer group we are concerned with
+ * @param cb callback for topology information
+ * @param cls closure for callback
+ */
+void
+GNUNET_TESTING_get_topology (struct GNUNET_TESTING_PeerGroup *pg,
GNUNET_TESTING_NotifyTopology cb, void *cls);
+
+/**
* There are many ways to connect peers that are supported by this function.
* To connect peers in the same topology that was created via the
* GNUNET_TESTING_create_topology, the topology variable must be set to
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r12437 - gnunet/src/include,
gnunet <=