-indentation, code cleanup
[oweals/gnunet.git] / src / set / set_protocol.h
index 543e2a002e498de3ada08bf90f0fd2af9792fa3f..e4755bbcc97d09e89b6d15c9267f7b7f975e38d2 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
@@ -42,30 +42,21 @@ struct OperationRequestMessage
   /**
    * Operation to request, values from 'enum GNUNET_SET_OperationType'
    */
-  uint32_t operation;
+  uint32_t operation GNUNET_PACKED;
 
   /**
-   * Application-specific identifier of the request.
+   * Salt to use for this operation.
    */
-  struct GNUNET_HashCode app_id;
-
-  /* rest: optional message */
-};
+  uint32_t salt;
 
-struct ElementRequestMessage
-{
   /**
-   * Type: GNUNET_MESSAGE_TYPE_SET_P2P_ELEMENT_REQUESTS
+   * Application-specific identifier of the request.
    */
-  struct GNUNET_MessageHeader header;
+  struct GNUNET_HashCode app_id;
 
-  /**
-   * Salt the keys in the body use
-   */
-  uint8_t salt;
+  /* rest: optional message */
 };
 
-
 struct IBFMessage
 {
   /**
@@ -80,15 +71,20 @@ struct IBFMessage
   uint8_t order;
 
   /**
-   * Salt used when hashing elements for this IBF.
+   * Padding, must be 0.
    */
-  uint8_t salt;
+  uint8_t reserved;
 
   /**
    * Offset of the strata in the rest of the message
    */
   uint16_t offset GNUNET_PACKED;
 
+  /**
+   * Salt used when hashing elements for this IBF.
+   */
+  uint32_t salt;
+
   /* rest: strata */
 };