aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_topology.c
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2012-11-20 12:29:57 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2012-11-20 12:29:57 +0000
commitb0ca95f6c05e8486e252b4d8bdd6ae16b6d2560a (patch)
tree09352f2efafd76b317cb7ccd1a3a47f97d6cc798 /src/testbed/testbed_api_topology.c
parent984eaa29119a4b1ae01490db9b16cf1020e01d55 (diff)
downloadgnunet-b0ca95f6c05e8486e252b4d8bdd6ae16b6d2560a.tar.gz
gnunet-b0ca95f6c05e8486e252b4d8bdd6ae16b6d2560a.zip
extended overlay configure topology to return max connections
Diffstat (limited to 'src/testbed/testbed_api_topology.c')
-rw-r--r--src/testbed/testbed_api_topology.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/testbed/testbed_api_topology.c b/src/testbed/testbed_api_topology.c
index 17fb7070a..2c1e7b1bc 100644
--- a/src/testbed/testbed_api_topology.c
+++ b/src/testbed/testbed_api_topology.c
@@ -527,6 +527,8 @@ GNUNET_TESTBED_underlay_configure_topology (void *op_cls,
527 * @param op_cls closure argument to give with the operation event 527 * @param op_cls closure argument to give with the operation event
528 * @param num_peers number of peers in 'peers' 528 * @param num_peers number of peers in 'peers'
529 * @param peers array of 'num_peers' with the peers to configure 529 * @param peers array of 'num_peers' with the peers to configure
530 * @param max_connections the maximums number of overlay connections that will
531 * be made to achieve the given topology
530 * @param topo desired underlay topology to use 532 * @param topo desired underlay topology to use
531 * @param va topology-specific options 533 * @param va topology-specific options
532 * @return handle to the operation, NULL if connecting these 534 * @return handle to the operation, NULL if connecting these
@@ -537,6 +539,7 @@ struct GNUNET_TESTBED_Operation *
537GNUNET_TESTBED_overlay_configure_topology_va (void *op_cls, 539GNUNET_TESTBED_overlay_configure_topology_va (void *op_cls,
538 unsigned int num_peers, 540 unsigned int num_peers,
539 struct GNUNET_TESTBED_Peer **peers, 541 struct GNUNET_TESTBED_Peer **peers,
542 unsigned int *max_connections,
540 enum GNUNET_TESTBED_TopologyOption 543 enum GNUNET_TESTBED_TopologyOption
541 topo, va_list va) 544 topo, va_list va)
542{ 545{
@@ -637,6 +640,8 @@ GNUNET_TESTBED_overlay_configure_topology_va (void *op_cls,
637 GNUNET_TESTBED_operation_queue_insert_ 640 GNUNET_TESTBED_operation_queue_insert_
638 (c->opq_parallel_topology_config_operations, op); 641 (c->opq_parallel_topology_config_operations, op);
639 GNUNET_TESTBED_operation_begin_wait_ (op); 642 GNUNET_TESTBED_operation_begin_wait_ (op);
643 if (NULL != max_connections)
644 *max_connections = tc->link_array_size;
640 return op; 645 return op;
641} 646}
642 647
@@ -649,6 +654,8 @@ GNUNET_TESTBED_overlay_configure_topology_va (void *op_cls,
649 * @param op_cls closure argument to give with the operation event 654 * @param op_cls closure argument to give with the operation event
650 * @param num_peers number of peers in 'peers' 655 * @param num_peers number of peers in 'peers'
651 * @param peers array of 'num_peers' with the peers to configure 656 * @param peers array of 'num_peers' with the peers to configure
657 * @param max_connections the maximums number of overlay connections that will
658 * be made to achieve the given topology
652 * @param topo desired underlay topology to use 659 * @param topo desired underlay topology to use
653 * @param ... topology-specific options 660 * @param ... topology-specific options
654 * @return handle to the operation, NULL if connecting these 661 * @return handle to the operation, NULL if connecting these
@@ -658,6 +665,7 @@ GNUNET_TESTBED_overlay_configure_topology_va (void *op_cls,
658struct GNUNET_TESTBED_Operation * 665struct GNUNET_TESTBED_Operation *
659GNUNET_TESTBED_overlay_configure_topology (void *op_cls, unsigned int num_peers, 666GNUNET_TESTBED_overlay_configure_topology (void *op_cls, unsigned int num_peers,
660 struct GNUNET_TESTBED_Peer **peers, 667 struct GNUNET_TESTBED_Peer **peers,
668 unsigned int *max_connections,
661 enum GNUNET_TESTBED_TopologyOption 669 enum GNUNET_TESTBED_TopologyOption
662 topo, ...) 670 topo, ...)
663{ 671{
@@ -667,7 +675,8 @@ GNUNET_TESTBED_overlay_configure_topology (void *op_cls, unsigned int num_peers,
667 GNUNET_assert (topo < GNUNET_TESTBED_TOPOLOGY_OPTION_END); 675 GNUNET_assert (topo < GNUNET_TESTBED_TOPOLOGY_OPTION_END);
668 va_start (vargs, topo); 676 va_start (vargs, topo);
669 op = GNUNET_TESTBED_overlay_configure_topology_va (op_cls, num_peers, peers, 677 op = GNUNET_TESTBED_overlay_configure_topology_va (op_cls, num_peers, peers,
670 topo, vargs); 678 max_connections,
679 topo, vargs);
671 va_end (vargs); 680 va_end (vargs);
672 return op; 681 return op;
673} 682}