- verboser log, faster start
[oweals/gnunet.git] / src / testbed / testbed.h
index 2b9a617f92b3c941c00623ce927d8f962841fef9..180464bd793614e84f9728427fd7609900d28652 100644 (file)
 
 #include "gnunet_util_lib.h"
 
-
+GNUNET_NETWORK_STRUCT_BEGIN
 /**
  * Initial message from a client to a testing control service.
  */
-struct GNUNET_TESTBED_InitMessage
+    struct GNUNET_TESTBED_InitMessage
 {
 
   /**
@@ -66,7 +66,7 @@ struct GNUNET_TESTBED_AddHostMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_ADDHOST
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST
    */
   struct GNUNET_MessageHeader header;
 
@@ -103,7 +103,7 @@ struct GNUNET_TESTBED_HostConfirmedMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_ADDHOSTSUCCESS
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST_SUCCESS
    */
   struct GNUNET_MessageHeader header;
 
@@ -113,8 +113,7 @@ struct GNUNET_TESTBED_HostConfirmedMessage
   uint32_t host_id GNUNET_PACKED;
 
   /* followed by the 0-terminated error message (on failure)
-   * (typical errors include failure to login and
-   * host-id already in use) */
+   * (typical errors include host-id already in use) */
 
 };
 
@@ -127,7 +126,7 @@ struct GNUNET_TESTBED_ConfigureSharedServiceMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_SERVICESHARE
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_SHARE_SERVICE
    */
   struct GNUNET_MessageHeader header;
 
@@ -156,7 +155,7 @@ struct GNUNET_TESTBED_ControllerLinkMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_LCONTROLLERS
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS
    */
   struct GNUNET_MessageHeader header;
 
@@ -200,7 +199,7 @@ struct GNUNET_TESTBED_PeerCreateMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_CREATEPEER
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER
    */
   struct GNUNET_MessageHeader header;
 
@@ -238,7 +237,7 @@ struct GNUNET_TESTBED_PeerReconfigureMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPDE_TESTBED_PEERRECONF
+   * Type is GNUNET_MESSAGE_TYPDE_TESTBED_RECONFIGURE_PEER
    */
   struct GNUNET_MessageHeader header;
 
@@ -266,7 +265,7 @@ struct GNUNET_TESTBED_PeerStartMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_STARTPEER
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_START_PEER
    */
   struct GNUNET_MessageHeader header;
 
@@ -291,7 +290,7 @@ struct GNUNET_TESTBED_PeerStopMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_STOPPEER
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_STOP_PEER
    */
   struct GNUNET_MessageHeader header;
 
@@ -316,7 +315,7 @@ struct GNUNET_TESTBED_PeerDestroyMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_DESTROYPEER
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_DESTROY_PEER
    */
   struct GNUNET_MessageHeader header;
 
@@ -341,7 +340,7 @@ struct GNUNET_TESTBED_ConfigureUnderlayLinkMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_CONFIGULLINK
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_CONFIGURE_UNDERLAY_LINK
    */
   struct GNUNET_MessageHeader header;
 
@@ -378,7 +377,7 @@ struct GNUNET_TESTBED_OverlayConnectMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_OLCONNECT
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_OVERLAY_CONNECT
    */
   struct GNUNET_MessageHeader header;
 
@@ -397,6 +396,45 @@ struct GNUNET_TESTBED_OverlayConnectMessage
    */
   uint32_t peer2 GNUNET_PACKED;
 
+  /**
+   * The ID of the host which runs peer2
+   */
+  uint32_t peer2_host_id GNUNET_PACKED;
+
+};
+
+
+/**
+ * Message sent from host controller of a peer(A) to the host controller of
+ * another peer(B) to request B to connect to A
+ */
+struct GNUNET_TESTBED_RemoteOverlayConnectMessage
+{
+  /**
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_REMOTE_OVERLAY_CONNECT
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * The Unique ID of B
+   */
+  uint32_t peer GNUNET_PACKED;
+
+  /**
+   * The Operation ID that is used to identify this operation
+   */
+  uint64_t operation_id GNUNET_PACKED;
+
+  /**
+   * Identity of A
+   */
+  struct GNUNET_PeerIdentity peer_identity;
+
+  /**
+   * To be followed by the HELLO message of A
+   */
+  struct GNUNET_MessageHeader hello[0];
+
 };
 
 
@@ -407,7 +445,7 @@ struct GNUNET_TESTBED_PeerEventMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_PEEREVENT
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_PEER_EVENT
    */
   struct GNUNET_MessageHeader header;
 
@@ -442,7 +480,7 @@ struct GNUNET_TESTBED_ConnectionEventMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_PEERCONEVENT
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONNECT_EVENT
    */
   struct GNUNET_MessageHeader header;
 
@@ -477,7 +515,7 @@ struct GNUNET_TESTBED_OperationFailureEventMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_OPERATIONFAILEVENT
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_OPERATION_FAIL_EVENT
    */
   struct GNUNET_MessageHeader header;
 
@@ -504,7 +542,7 @@ struct GNUNET_TESTBED_PeerCreateSuccessEventMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_PEERCREATESUCCESS
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER_SUCCESS
    */
   struct GNUNET_MessageHeader header;
 
@@ -530,7 +568,7 @@ struct GNUNET_TESTBED_GenericOperationSuccessEventMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_GENERICOPSUCCESS
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_GENERIC_OPERATION_SUCCESS
    */
   struct GNUNET_MessageHeader header;
 
@@ -556,7 +594,7 @@ struct GNUNET_TESTBED_PeerGetConfigurationMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_GETPEERCONFIG
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_CONFIGURATION
    */
   struct GNUNET_MessageHeader header;
 
@@ -580,7 +618,7 @@ struct GNUNET_TESTBED_PeerConfigurationInformationMessage
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_PEERCONFIG
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONFIGURATION
    */
   struct GNUNET_MessageHeader header;
 
@@ -602,12 +640,66 @@ struct GNUNET_TESTBED_PeerConfigurationInformationMessage
   /**
    * The size of configuration when uncompressed
    */
-  uint16_t config_size;
+  uint16_t config_size GNUNET_PACKED;
+
+  /* followed by gzip-compressed configuration of the peer */
+
+};
+
+
+/**
+ * Message to request configuration of a slave controller
+ */
+struct GNUNET_TESTBED_SlaveGetConfigurationMessage
+{
+  /**
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_GET_SLAVE_CONFIGURATION
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * The id of the slave host
+   */
+  uint32_t slave_id GNUNET_PACKED;
+
+  /**
+   * Operation ID
+   */
+  uint64_t operation_id GNUNET_PACKED;
+
+};
+
+
+/**
+ * Reply to GNUNET_MESSAGE_TYPE_TESTBED_GET_SLAVE_CONFIG message
+ */
+struct GNUNET_TESTBED_SlaveConfiguration
+{
+  /**
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_CONFIGURATION
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * The id of the host where the slave is running
+   */
+  uint32_t slave_id GNUNET_PACKED;
+
+  /**
+   * Operation ID
+   */
+  uint64_t operation_id GNUNET_PACKED;
+
+  /**
+   * The size of the configuration when uncompressed
+   */
+  uint16_t config_size GNUNET_PACKED;
 
   /* followed by gzip-compressed configuration of the peer */
 
 };
 
 
+GNUNET_NETWORK_STRUCT_END
 #endif
 /* end of testbed.h */