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.
struct GNUNET_TESTING_Daemon *second_daemon,
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
enum GNUNET_TESTING_Topology restrict_topology,
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