Link dv transport to libgnunethello
[oweals/gnunet.git] / src / consensus / consensus.h
index 2c68849b9815a3d1bee79e77adbc197541653c55..a752988fdbd80f0643ceed4e349e1dcb0f43a5d8 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
-     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
 
 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
 {
   /**
@@ -52,33 +56,15 @@ struct GNUNET_CONSENSUS_ConcludeMessage
    */
   struct GNUNET_MessageHeader header;
 
-
   /**
-   * Minimum group size required for a consensus group.
+   * Padding, must be zero.
    */
-  uint32_t min_group_size GNUNET_PACKED;
+  uint32_t reserved GNUNET_PACKED;
 
   /**
-   * Timeout for conclude
+   * Deadline for conclude
    */
-  struct GNUNET_TIME_RelativeNBO timeout;
-};
-
-
-struct GNUNET_CONSENSUS_ConcludeDoneMessage
-{
-  /**
-   * Type: GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_CONCLUDE_DONE
-   */
-  struct GNUNET_MessageHeader header;
-
-  uint32_t group_id GNUNET_PACKED;
-
-  uint32_t num_elements GNUNET_PACKED;
-
-  uint32_t num_peers GNUNET_PACKED;
-
-  /** PeerIdentity[num_peers] */
+  struct GNUNET_TIME_AbsoluteNBO deadline;
 };
 
 
@@ -98,7 +84,7 @@ struct GNUNET_CONSENSUS_ElementMessage
   /**
    * Type: GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_NEW_ELEMENT
    */
-  uint16_t element_type GNUNET_PACKED; /* FIXME: alignment? */
+  uint16_t element_type GNUNET_PACKED; /* FIXME: alignment? => uint32_t */
 
   /* rest: element data */
 };
@@ -113,7 +99,7 @@ struct GNUNET_CONSENSUS_AckMessage
   /**
    * Do we want to keep and propagate the element?
    */
-  uint8_t keep; /* FIXME: alignment!? */
+  uint8_t keep; /* FIXME: alignment!? => (u)int32_t */
 
   /* FIXME: add message hash? */
 };