aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_testing_lib.h
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-08-03 08:22:59 +0000
committerNathan S. Evans <evans@in.tum.de>2010-08-03 08:22:59 +0000
commit7d86288c8819afc624d08cb88e3ed77ab05f541d (patch)
treeac95abbcf293a8ed18317d8f902fdc1ae421957b /src/include/gnunet_testing_lib.h
parent6805357073d73c41c8712c8e852f3a95030bad89 (diff)
downloadgnunet-7d86288c8819afc624d08cb88e3ed77ab05f541d.tar.gz
gnunet-7d86288c8819afc624d08cb88e3ed77ab05f541d.zip
iterate topoogy header related stuff
Diffstat (limited to 'src/include/gnunet_testing_lib.h')
-rw-r--r--src/include/gnunet_testing_lib.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h
index 04a2d8191..479cb07e0 100644
--- a/src/include/gnunet_testing_lib.h
+++ b/src/include/gnunet_testing_lib.h
@@ -364,6 +364,23 @@ typedef void (*GNUNET_TESTING_NotifyConnection)(void *cls,
364 const char *emsg); 364 const char *emsg);
365 365
366/** 366/**
367 * Prototype of a callback function indicating that two peers
368 * are currently connected.
369 *
370 * @param cls closure
371 * @param first peer id for first daemon
372 * @param second peer id for the second daemon
373 * @param distance distance between the connected peers
374 * @param emsg error message (NULL on success)
375 */
376typedef void (*GNUNET_TESTING_NotifyTopology)(void *cls,
377 const struct GNUNET_PeerIdentity *first,
378 const struct GNUNET_PeerIdentity *second,
379 struct GNUNET_TIME_Relative latency,
380 uint32_t distance,
381 const char *emsg);
382
383/**
367 * Starts a GNUnet daemon. GNUnet must be installed on the target 384 * Starts a GNUnet daemon. GNUnet must be installed on the target
368 * system and available in the PATH. The machine must furthermore be 385 * system and available in the PATH. The machine must furthermore be
369 * reachable via "ssh" (unless the hostname is "NULL") without the 386 * reachable via "ssh" (unless the hostname is "NULL") without the
@@ -743,6 +760,17 @@ GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup *pg,
743 char *restrict_transports); 760 char *restrict_transports);
744 761
745/** 762/**
763 * Iterate over all (running) peers in the peer group, retrieve
764 * all connections that each currently has.
765 *
766 * @param pg the peer group we are concerned with
767 * @param cb callback for topology information
768 * @param cls closure for callback
769 */
770void
771GNUNET_TESTING_get_topology (struct GNUNET_TESTING_PeerGroup *pg, GNUNET_TESTING_NotifyTopology cb, void *cls);
772
773/**
746 * There are many ways to connect peers that are supported by this function. 774 * There are many ways to connect peers that are supported by this function.
747 * To connect peers in the same topology that was created via the 775 * To connect peers in the same topology that was created via the
748 * GNUNET_TESTING_create_topology, the topology variable must be set to 776 * GNUNET_TESTING_create_topology, the topology variable must be set to