aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-04-21 20:01:34 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-04-21 20:01:34 +0000
commitda683835112d7510461269a81363dcaf23af4b9b (patch)
tree5c4e530a304c315f132a18e0f9d938d04b9e94de /src/include
parente823f8b9a57844dc90afed91076117eea7cb85ea (diff)
downloadgnunet-da683835112d7510461269a81363dcaf23af4b9b.tar.gz
gnunet-da683835112d7510461269a81363dcaf23af4b9b.zip
fix #2666: Implement service sharing among peers
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_protocols.h49
-rw-r--r--src/include/gnunet_testbed_service.h19
2 files changed, 22 insertions, 46 deletions
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index b49590390..ae28da7b1 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -1524,122 +1524,117 @@ extern "C"
1524#define GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST_SUCCESS 462 1524#define GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST_SUCCESS 462
1525 1525
1526/** 1526/**
1527 * Message to configure a service to be shared among peers
1528 */
1529#define GNUNET_MESSAGE_TYPE_TESTBED_SHARE_SERVICE 463
1530
1531/**
1532 * Message to link delegated controller to slave controller 1527 * Message to link delegated controller to slave controller
1533 */ 1528 */
1534#define GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS 464 1529#define GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS 463
1535 1530
1536/** 1531/**
1537 * Message to create a peer at a host 1532 * Message to create a peer at a host
1538 */ 1533 */
1539#define GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER 465 1534#define GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER 464
1540 1535
1541/** 1536/**
1542 * Message to reconfigure a peer 1537 * Message to reconfigure a peer
1543 */ 1538 */
1544#define GNUNET_MESSAGE_TYPE_TESTBED_RECONFIGURE_PEER 466 1539#define GNUNET_MESSAGE_TYPE_TESTBED_RECONFIGURE_PEER 465
1545 1540
1546/** 1541/**
1547 * Message to start a peer at a host 1542 * Message to start a peer at a host
1548 */ 1543 */
1549#define GNUNET_MESSAGE_TYPE_TESTBED_START_PEER 467 1544#define GNUNET_MESSAGE_TYPE_TESTBED_START_PEER 466
1550 1545
1551/** 1546/**
1552 * Message to stop a peer at a host 1547 * Message to stop a peer at a host
1553 */ 1548 */
1554#define GNUNET_MESSAGE_TYPE_TESTBED_STOP_PEER 468 1549#define GNUNET_MESSAGE_TYPE_TESTBED_STOP_PEER 467
1555 1550
1556/** 1551/**
1557 * Message to destroy a peer 1552 * Message to destroy a peer
1558 */ 1553 */
1559#define GNUNET_MESSAGE_TYPE_TESTBED_DESTROY_PEER 469 1554#define GNUNET_MESSAGE_TYPE_TESTBED_DESTROY_PEER 468
1560 1555
1561/** 1556/**
1562 * Configure underlay link message 1557 * Configure underlay link message
1563 */ 1558 */
1564#define GNUNET_MESSAGE_TYPE_TESTBED_CONFIGURE_UNDERLAY_LINK 470 1559#define GNUNET_MESSAGE_TYPE_TESTBED_CONFIGURE_UNDERLAY_LINK 469
1565 1560
1566/** 1561/**
1567 * Message to connect peers in a overlay 1562 * Message to connect peers in a overlay
1568 */ 1563 */
1569#define GNUNET_MESSAGE_TYPE_TESTBED_OVERLAY_CONNECT 471 1564#define GNUNET_MESSAGE_TYPE_TESTBED_OVERLAY_CONNECT 470
1570 1565
1571/** 1566/**
1572 * Message for peer events 1567 * Message for peer events
1573 */ 1568 */
1574#define GNUNET_MESSAGE_TYPE_TESTBED_PEER_EVENT 472 1569#define GNUNET_MESSAGE_TYPE_TESTBED_PEER_EVENT 471
1575 1570
1576/** 1571/**
1577 * Message for peer connect events 1572 * Message for peer connect events
1578 */ 1573 */
1579#define GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONNECT_EVENT 473 1574#define GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONNECT_EVENT 472
1580 1575
1581/** 1576/**
1582 * Message for operation events 1577 * Message for operation events
1583 */ 1578 */
1584#define GNUNET_MESSAGE_TYPE_TESTBED_OPERATION_FAIL_EVENT 474 1579#define GNUNET_MESSAGE_TYPE_TESTBED_OPERATION_FAIL_EVENT 473
1585 1580
1586/** 1581/**
1587 * Message to signal successful peer creation 1582 * Message to signal successful peer creation
1588 */ 1583 */
1589#define GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER_SUCCESS 475 1584#define GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER_SUCCESS 474
1590 1585
1591/** 1586/**
1592 * Message to signal a generic operation has been successful 1587 * Message to signal a generic operation has been successful
1593 */ 1588 */
1594#define GNUNET_MESSAGE_TYPE_TESTBED_GENERIC_OPERATION_SUCCESS 476 1589#define GNUNET_MESSAGE_TYPE_TESTBED_GENERIC_OPERATION_SUCCESS 475
1595 1590
1596/** 1591/**
1597 * Message to get the configuration of a peer 1592 * Message to get the configuration of a peer
1598 */ 1593 */
1599#define GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_CONFIGURATION 477 1594#define GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_CONFIGURATION 476
1600 1595
1601/** 1596/**
1602 * Message containing the peer configuration 1597 * Message containing the peer configuration
1603 */ 1598 */
1604#define GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONFIGURATION 478 1599#define GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONFIGURATION 477
1605 1600
1606/** 1601/**
1607 * Message to request a controller to make one of its peer to connect to another 1602 * Message to request a controller to make one of its peer to connect to another
1608 * peer using the contained HELLO 1603 * peer using the contained HELLO
1609 */ 1604 */
1610#define GNUNET_MESSAGE_TYPE_TESTBED_REMOTE_OVERLAY_CONNECT 479 1605#define GNUNET_MESSAGE_TYPE_TESTBED_REMOTE_OVERLAY_CONNECT 478
1611 1606
1612/** 1607/**
1613 * Message to request configuration of a slave controller 1608 * Message to request configuration of a slave controller
1614 */ 1609 */
1615#define GNUNET_MESSAGE_TYPE_TESTBED_GET_SLAVE_CONFIGURATION 480 1610#define GNUNET_MESSAGE_TYPE_TESTBED_GET_SLAVE_CONFIGURATION 479
1616 1611
1617/** 1612/**
1618 * Message which contains the configuration of slave controller 1613 * Message which contains the configuration of slave controller
1619 */ 1614 */
1620#define GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_CONFIGURATION 481 1615#define GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_CONFIGURATION 480
1621 1616
1622/** 1617/**
1623 * Message to signal the result of GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS request 1618 * Message to signal the result of GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS request
1624 */ 1619 */
1625#define GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS_RESULT 482 1620#define GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS_RESULT 481
1626 1621
1627/** 1622/**
1628 * A controller receiving this message floods it to its directly-connected 1623 * A controller receiving this message floods it to its directly-connected
1629 * sub-controllers and then stops and destroys all peers 1624 * sub-controllers and then stops and destroys all peers
1630 */ 1625 */
1631#define GNUNET_MESSAGE_TYPE_TESTBED_SHUTDOWN_PEERS 483 1626#define GNUNET_MESSAGE_TYPE_TESTBED_SHUTDOWN_PEERS 482
1632 1627
1633/** 1628/**
1634 * Message to start/stop a service of a peer 1629 * Message to start/stop a service of a peer
1635 */ 1630 */
1636#define GNUNET_MESSAGE_TYPE_TESTBED_MANAGE_PEER_SERVICE 484 1631#define GNUNET_MESSAGE_TYPE_TESTBED_MANAGE_PEER_SERVICE 483
1637 1632
1638/** 1633/**
1639 * Not really a message, but for careful checks on the testbed messages; Should 1634 * Not really a message, but for careful checks on the testbed messages; Should
1640 * always be the maximum and never be used to send messages with this type 1635 * always be the maximum and never be used to send messages with this type
1641 */ 1636 */
1642#define GNUNET_MESSAGE_TYPE_TESTBED_MAX 485 1637#define GNUNET_MESSAGE_TYPE_TESTBED_MAX 484
1643 1638
1644/** 1639/**
1645 * The initialization message towards gnunet-testbed-helper 1640 * The initialization message towards gnunet-testbed-helper
diff --git a/src/include/gnunet_testbed_service.h b/src/include/gnunet_testbed_service.h
index 9b92d4856..f19122978 100644
--- a/src/include/gnunet_testbed_service.h
+++ b/src/include/gnunet_testbed_service.h
@@ -501,25 +501,6 @@ GNUNET_TESTBED_controller_connect (struct GNUNET_TESTBED_Host *host,
501 501
502 502
503/** 503/**
504 * Configure shared services at a controller. Using this function,
505 * you can specify that certain services (such as "resolver")
506 * should not be run for each peer but instead be shared
507 * across N peers on the specified host. This function
508 * must be called before any peers are created at the host.
509 *
510 * @param controller controller to configure
511 * @param service_name name of the service to share
512 * @param num_peers number of peers that should share one instance
513 * of the specified service (1 for no sharing is the default),
514 * use 0 to disable the service
515 */
516void
517GNUNET_TESTBED_controller_configure_sharing (struct GNUNET_TESTBED_Controller *controller,
518 const char *service_name,
519 uint32_t num_peers);
520
521
522/**
523 * Stop the given controller (also will terminate all peers and 504 * Stop the given controller (also will terminate all peers and
524 * controllers dependent on this controller). This function 505 * controllers dependent on this controller). This function
525 * blocks until the testbed has been fully terminated (!). 506 * blocks until the testbed has been fully terminated (!).