diff options
Diffstat (limited to 'src/testbed/testbed_api.c')
-rw-r--r-- | src/testbed/testbed_api.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c index fda47e5f8..2df164a02 100644 --- a/src/testbed/testbed_api.c +++ b/src/testbed/testbed_api.c | |||
@@ -1508,46 +1508,6 @@ GNUNET_TESTBED_controller_connect (struct GNUNET_TESTBED_Host *host, | |||
1508 | 1508 | ||
1509 | 1509 | ||
1510 | /** | 1510 | /** |
1511 | * Configure shared services at a controller. Using this function, | ||
1512 | * you can specify that certain services (such as "resolver") | ||
1513 | * should not be run for each peer but instead be shared | ||
1514 | * across N peers on the specified host. This function | ||
1515 | * must be called before any peers are created at the host. | ||
1516 | * | ||
1517 | * @param controller controller to configure | ||
1518 | * @param service_name name of the service to share | ||
1519 | * @param num_peers number of peers that should share one instance | ||
1520 | * of the specified service (1 for no sharing is the default), | ||
1521 | * use 0 to disable the service | ||
1522 | */ | ||
1523 | void | ||
1524 | GNUNET_TESTBED_controller_configure_sharing (struct GNUNET_TESTBED_Controller | ||
1525 | *controller, | ||
1526 | const char *service_name, | ||
1527 | uint32_t num_peers) | ||
1528 | { | ||
1529 | struct GNUNET_TESTBED_ConfigureSharedServiceMessage *msg; | ||
1530 | uint16_t service_name_size; | ||
1531 | uint16_t msg_size; | ||
1532 | |||
1533 | service_name_size = strlen (service_name) + 1; | ||
1534 | msg_size = | ||
1535 | sizeof (struct GNUNET_TESTBED_ConfigureSharedServiceMessage) + | ||
1536 | service_name_size; | ||
1537 | msg = GNUNET_malloc (msg_size); | ||
1538 | msg->header.size = htons (msg_size); | ||
1539 | msg->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_SHARE_SERVICE); | ||
1540 | msg->host_id = htonl (GNUNET_TESTBED_host_get_id_ (controller->host)); | ||
1541 | msg->num_peers = htonl (num_peers); | ||
1542 | memcpy (&msg[1], service_name, service_name_size); | ||
1543 | GNUNET_TESTBED_queue_message_ (controller, | ||
1544 | (struct GNUNET_MessageHeader *) msg); | ||
1545 | GNUNET_break (0); /* This function is not yet implemented on the | ||
1546 | * testbed service */ | ||
1547 | } | ||
1548 | |||
1549 | |||
1550 | /** | ||
1551 | * Iterator to free opc map entries | 1511 | * Iterator to free opc map entries |
1552 | * | 1512 | * |
1553 | * @param cls closure | 1513 | * @param cls closure |