aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2011-04-05 14:40:12 +0000
committerNathan S. Evans <evans@in.tum.de>2011-04-05 14:40:12 +0000
commita28f7673e8a3ff72c86b94f40ea643f16d0ed527 (patch)
tree3ec3563793058f218b2dce57a4df4004ba32a27e /src/include
parent8da74da33f616eecdba93e9c94715a3e6244876f (diff)
downloadgnunet-a28f7673e8a3ff72c86b94f40ea643f16d0ed527.tar.gz
gnunet-a28f7673e8a3ff72c86b94f40ea643f16d0ed527.zip
convenience api for peergroup running
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_testing_lib.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h
index f08dd9d20..b52da166a 100644
--- a/src/include/gnunet_testing_lib.h
+++ b/src/include/gnunet_testing_lib.h
@@ -970,6 +970,55 @@ GNUNET_TESTING_daemons_vary (struct GNUNET_TESTING_PeerGroup *pg,
970 GNUNET_TESTING_NotifyCompletion cb, 970 GNUNET_TESTING_NotifyCompletion cb,
971 void *cb_cls); 971 void *cb_cls);
972 972
973/**
974 * Start count gnunet instances with the same set of transports and
975 * applications. The port numbers (any option called "PORT") will be
976 * adjusted to ensure that no two peers running on the same system
977 * have the same port(s) in their respective configurations.
978 *
979 * @param cfg configuration template to use
980 * @param total number of daemons to start
981 * @param max_concurrent_connections for testing, how many peers can
982* we connect to simultaneously
983 * @param max_concurrent_ssh when starting with ssh, how many ssh
984 * connections will we allow at once (based on remote hosts allowed!)
985 * @param timeout total time allowed for peers to start
986 * @param connect_cb function to call each time two daemons are connected
987 * @param connect_cb_cls closure for connect_callback
988 * @param peergroup_cb function to call once all peers are up and connected
989 * @param peergroup_cb_cls closure for peergroup_cb
990 * @param hostnames linked list of host structs to use to start peers on
991 * (NULL to run on localhost only)
992 * @param topology allowed overlay topology
993 * @param restrict_topology blacklist connections to this topology
994 * @param restrict_transports specific transports to blacklist
995 * @param connect_topology topology to connect peers in (defaults to allowed
996 * topology)
997 * @param connect_topology_options options for connect topology
998 * @param connect_topology_option_modifier option modifier for connect topology
999 * @param verbose GNUNET_YES to print progress bars, GNUNET_NO otherwise
1000 *
1001 * @return NULL on error, otherwise handle to control peer group
1002 */
1003struct GNUNET_TESTING_PeerGroup *
1004GNUNET_TESTING_PeerGroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
1005 unsigned int total,
1006 unsigned int max_concurrent_connections,
1007 unsigned int max_concurrent_ssh,
1008 struct GNUNET_TIME_Relative timeout,
1009 GNUNET_TESTING_NotifyConnection
1010 connect_cb, void *connect_cb_cls,
1011 GNUNET_TESTING_NotifyCompletion peergroup_cb,
1012 void *peergroup_cb_cls,
1013 const struct GNUNET_TESTING_Host *hostnames,
1014 enum GNUNET_TESTING_Topology topology,
1015 enum GNUNET_TESTING_Topology restrict_topology,
1016 const char *restrict_transports,
1017 enum GNUNET_TESTING_Topology connect_topology,
1018 enum GNUNET_TESTING_TopologyOption connect_topology_options,
1019 double connect_topology_option_modifier,
1020 int verbose);
1021
973 1022
974#if 0 /* keep Emacsens' auto-indent happy */ 1023#if 0 /* keep Emacsens' auto-indent happy */
975{ 1024{