-fix NetworkRecord/GNSRecordBlock madness
[oweals/gnunet.git] / src / include / block_gns.h
index 99f019a113ec069810e798864fa459b6d0724f7c..61ffdd6b796673de5fbca7b76247243f61a7272d 100644 (file)
@@ -35,28 +35,29 @@ GNUNET_NETWORK_STRUCT_BEGIN
  */
 struct GNSRecordBlock
 {
-  /**
-   * the record type
-   */
-  uint32_t type GNUNET_PACKED;
 
   /**
-   * expiration time of the record
+   * Expiration time for the DNS record; relative or absolute depends
+   * on 'flags', network byte order.
    */
-  struct GNUNET_TIME_AbsoluteNBO expiration;
+  uint64_t expiration_time GNUNET_PACKED;
 
   /**
    * length of the data
    */
-  uint32_t data_length GNUNET_PACKED;
+  uint32_t data_size GNUNET_PACKED;
+  
+  /**
+   * the record type
+   */
+  uint32_t record_type GNUNET_PACKED;
+
   
   /* record flags */
   uint32_t flags GNUNET_PACKED;
 
-  //Class of the record?
-
   /* followed by the record data */
-}
+};
 
 /**
  * @brief a record block for a given name of a single authority
@@ -65,28 +66,22 @@ struct GNSNameRecordBlock
 {
 
   /**
-   * GNUNET_RSA_Signature using RSA-key generated from the records.
-   */
-  struct GNUNET_CRYPTO_RsaSignature signature;
-
-  /**
-   * What is being signed and why?
+   * The public key of the authority
    */
-  struct GNUNET_CRYPTO_RsaSignaturePurpose purpose;
+  struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded public_key;
 
   /**
-   * The public key of the authority
+   * GNUNET_RSA_Signature using RSA-key generated from the records.
    */
-  struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded public_key;
+  struct GNUNET_CRYPTO_RsaSignature signature;
 
   /* number of records that follow */
-  uint32_t rd_num GNUNET_PACKED;
+  uint32_t rd_count GNUNET_PACKED;
 
   /* 0-terminated name here */
 
   /* variable-size GNSRecordBlocks follows here */
 
-
 };
 
 GNUNET_NETWORK_STRUCT_END