/*
This file is part of GNUnet
- (C) 2012 Christian Grothoff (and other contributing authors)
+ (C) 2008--2013 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
* 0 to use no user name; otherwise 'strlen (username)',
* excluding 0-termination!
*/
- uint16_t user_name_length GNUNET_PACKED;
+ uint16_t username_length GNUNET_PACKED;
/**
* Number of bytes in the host name (excluding 0-termination) that follows the
*/
uint16_t hostname_length GNUNET_PACKED;
+ /**
+ * The length of the uncompressed configuration
+ */
+ uint16_t config_size GNUNET_PACKED;
+
/* followed by non 0-terminated user name */
/* followed by non 0-terminated host name */
/**
- * Message to testing service: configure service sharing
- * at a host.
+ * Client notifies controller that it should delegate
+ * requests for a particular client to a particular
+ * sub-controller.
*/
-struct GNUNET_TESTBED_ConfigureSharedServiceMessage
+struct GNUNET_TESTBED_ControllerLinkRequest
{
/**
- * Type is GNUNET_MESSAGE_TYPE_TESTBED_SHARE_SERVICE
+ * Type is GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS
*/
struct GNUNET_MessageHeader header;
/**
- * Host that is being configured.
+ * For which host should requests be delegated? NBO.
*/
- uint32_t host_id GNUNET_PACKED;
+ uint32_t delegated_host_id GNUNET_PACKED;
+
+ /**
+ * The id of the operation which created this message
+ */
+ uint64_t operation_id GNUNET_PACKED;
/**
- * Number of peers that should share a service instance;
- * 1 for no sharing, 0 to forcefully disable the service.
+ * Which host is responsible for managing the delegation? NBO
*/
- uint32_t num_peers GNUNET_PACKED;
+ uint32_t slave_host_id GNUNET_PACKED;
- /* followed by 0-terminated name of the service */
+ /**
+ * Set to 1 if the receiving controller is the master controller for
+ * the slave host (and thus responsible for starting it?). 0 if not
+ */
+ uint8_t is_subordinate;
};
/**
- * Client notifies controller that it should delegate
- * requests for a particular client to a particular
- * sub-controller.
+ * Response message for ControllerLinkRequest message
*/
-struct GNUNET_TESTBED_ControllerLinkMessage
+struct GNUNET_TESTBED_ControllerLinkResponse
{
-
+
/**
- * Type is GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS
+ * Type is GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS_RESULT
*/
struct GNUNET_MessageHeader header;
/**
- * For which host should requests be delegated? NBO.
- */
- uint32_t delegated_host_id GNUNET_PACKED;
-
- /**
- * The id of the operation which created this message
+ * The size of the compressed configuration. Can be ZERO if the controller is
+ * not started (depends on the ControllerLinkRequest). NBO.
*/
- uint64_t operation_id GNUNET_PACKED;
+ uint16_t config_size GNUNET_PACKED;
/**
- * Which host is responsible for managing the delegation? NBO
+ * Set to GNUNET_YES to signify SUCCESS; GNUNET_NO to signify failure
*/
- uint32_t slave_host_id GNUNET_PACKED;
+ uint16_t success GNUNET_PACKED;
/**
- * The size of the uncompressed configuration
+ * The id of the operation which created this message. NBO
*/
- uint16_t config_size GNUNET_PACKED;
+ uint64_t operation_id GNUNET_PACKED;
- /**
- * Set to 1 if the receiving controller is the master controller for
- * the slave host (and thus responsible for starting it?). 0 if not
- */
- uint8_t is_subordinate;
+ /* If controller linking is successful and configuration is present, then here
+ * comes the serialized gzip configuration with which the controller is
+ * running at the delegate host */
- /* followed by serialized slave configuration;
- * gzip'ed configuration file in INI format */
+ /* In case of failure, here comes the error message (without \0 termination)*/
};
struct GNUNET_MessageHeader header;
/**
- * Unique operation id
+ * On which host should the peer be started?
*/
- uint64_t operation_id GNUNET_PACKED;
+ uint32_t host_id GNUNET_PACKED;
/**
- * On which host should the peer be started?
+ * Unique operation id
*/
- uint32_t host_id GNUNET_PACKED;
+ uint64_t operation_id GNUNET_PACKED;
/**
* Unique ID for the peer.
/**
* Size of the uncompressed configuration
*/
- uint32_t config_size GNUNET_PACKED;
+ uint16_t config_size GNUNET_PACKED;
/* followed by serialized peer configuration;
* gzip'ed configuration file in INI format */
{
/**
- * Type is GNUNET_MESSAGE_TYPDE_TESTBED_RECONFIGURE_PEER
+ * Type is GNUNET_MESSAGE_TYPE_TESTBED_RECONFIGURE_PEER
*/
struct GNUNET_MessageHeader header;
*/
uint64_t operation_id GNUNET_PACKED;
+ /**
+ * The length of the serialized configuration when uncompressed
+ */
+ uint16_t config_size GNUNET_PACKED;
+
/* followed by serialized peer configuration;
* gzip'ed configuration file in INI format */
};
+/**
+ * Shutdown peers message
+ */
+struct GNUNET_TESTBED_ShutdownPeersMessage
+{
+ /**
+ * Type is GNUNET_MESSAGE_TYPE_TESTBED_SHUTDOWN_PEERS
+ */
+ struct GNUNET_MessageHeader header;
+
+ /**
+ * Operation ID
+ */
+ uint64_t operation_id GNUNET_PACKED;
+};
+
+
+/**
+ * Message to start/stop services of a peer
+ */
+struct GNUNET_TESTBED_ManagePeerServiceMessage
+{
+ /**
+ * Type is GNUNET_MESSAGE_TYPE_TESTBED_SHUTDOWN_PEERS
+ */
+ struct GNUNET_MessageHeader header;
+
+ /**
+ * Unique ID of the peer whose service has to be managed.
+ */
+ uint32_t peer_id GNUNET_PACKED;
+
+ /**
+ * Operation ID
+ */
+ uint64_t operation_id GNUNET_PACKED;
+
+ /**
+ * set this to 1 to start the service; 0 to stop the service
+ */
+ uint8_t start;
+
+ /**
+ * The NULL-terminated name of the service to start/stop follows here
+ */
+};
+
+
GNUNET_NETWORK_STRUCT_END
#endif
/* end of testbed.h */