-fixes
[oweals/gnunet.git] / src / fs / fs.h
index 90d32f4a7ef99475a308c85da9a0c0cad72cdbdc..059b8920d248d01d16eb93a82b0f3c9622c2b2ea 100644 (file)
@@ -64,6 +64,8 @@ struct ContentHashKey
 };
 
 
+GNUNET_NETWORK_STRUCT_BEGIN
+
 /**
  * Message sent from a GNUnet (fs) publishing activity to the
  * gnunet-fs-service to initiate indexing of a file.  The service is
@@ -265,7 +267,7 @@ struct SearchMessage
  * Response from FS service with a result for a previous FS search.
  * Note that queries for DBLOCKS and IBLOCKS that have received a
  * single response are considered done.  This message is transmitted
- * between peers as well as between the service and a client.
+ * between peers.
  */
 struct PutMessage
 {
@@ -289,6 +291,40 @@ struct PutMessage
 
 };
 
+/**
+ * Response from FS service with a result for a previous FS search.
+ * Note that queries for DBLOCKS and IBLOCKS that have received a
+ * single response are considered done.  This message is transmitted
+ * between the service and a client.
+ */
+struct ClientPutMessage
+{
+
+  /**
+   * Message type will be GNUNET_MESSAGE_TYPE_FS_PUT.
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * Type of the block (in big endian).  Should never be zero.
+   */
+  uint32_t type GNUNET_PACKED;
+
+  /**
+   * When does this result expire?
+   */
+  struct GNUNET_TIME_AbsoluteNBO expiration;
+
+  /**
+   * When was the last time we've tried to download this block?
+   * (FOREVER if unknown/not relevant)
+   */
+  struct GNUNET_TIME_AbsoluteNBO last_transmission;
+
+  /* this is followed by the actual encrypted content */
+
+};
+GNUNET_NETWORK_STRUCT_END
 
 
 #endif