renaming and modifications to the shorten test
[oweals/gnunet.git] / src / consensus / consensus.h
index 75b90b0f9290605e965978b07771eee77ea90bc1..f1049e1cd20c7c4c11da081bf8a5978ce0a48a34 100644 (file)
@@ -4,7 +4,7 @@
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
 
 GNUNET_NETWORK_STRUCT_BEGIN
 
 
 GNUNET_NETWORK_STRUCT_BEGIN
 
+/**
+ * Sent by the client to the service,
+ * when the client wants the service to join a consensus session.
+ */
 struct GNUNET_CONSENSUS_JoinMessage
 {
   /**
 struct GNUNET_CONSENSUS_JoinMessage
 {
   /**
@@ -37,9 +41,9 @@ struct GNUNET_CONSENSUS_JoinMessage
    */
   struct GNUNET_MessageHeader header;
 
    */
   struct GNUNET_MessageHeader header;
 
-  struct GNUNET_HashCode session_id;
+  uint32_t num_peers GNUNET_PACKED;
 
 
-  uint16_t num_peers;
+  struct GNUNET_HashCode session_id;
 
   /* GNUNET_PeerIdentity[num_peers] */
 };
 
   /* GNUNET_PeerIdentity[num_peers] */
 };
@@ -52,28 +56,12 @@ struct GNUNET_CONSENSUS_ConcludeMessage
    */
   struct GNUNET_MessageHeader header;
 
    */
   struct GNUNET_MessageHeader header;
 
+  // uint32_t reserved GNUNET_PACKED; // FIXME...
+
   /**
    * Timeout for conclude
    */
   struct GNUNET_TIME_RelativeNBO timeout;
   /**
    * Timeout for conclude
    */
   struct GNUNET_TIME_RelativeNBO timeout;
-
-  /**
-   * Minimum group size required for a consensus group.
-   */
-  uint32_t min_group_size;
-};
-
-
-struct GNUNET_CONSENSUS_ConcludeDoneMessage
-{
-  /**
-   * Type: GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_CONCLUDE_DONE
-   */
-  struct GNUNET_MessageHeader header;
-
-  uint16_t num_peers;
-
-  /** PeerIdentity[num_peers] */
 };
 
 
 };
 
 
@@ -93,7 +81,7 @@ struct GNUNET_CONSENSUS_ElementMessage
   /**
    * Type: GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_NEW_ELEMENT
    */
   /**
    * Type: GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_NEW_ELEMENT
    */
-  uint16_t element_type;
+  uint16_t element_type GNUNET_PACKED; /* FIXME: alignment? => uint32_t */
 
   /* rest: element data */
 };
 
   /* rest: element data */
 };
@@ -108,7 +96,7 @@ struct GNUNET_CONSENSUS_AckMessage
   /**
    * Do we want to keep and propagate the element?
    */
   /**
    * Do we want to keep and propagate the element?
    */
-  uint8_t keep;
+  uint8_t keep; /* FIXME: alignment!? => (u)int32_t */
 
   /* FIXME: add message hash? */
 };
 
   /* FIXME: add message hash? */
 };