-dce
[oweals/gnunet.git] / src / dht / dht.h
index 936895b8321f15cc15832ffe84c586e4bd959161..8adf49f5c72b6b6200d1cd10ff306f35fc398672 100644 (file)
@@ -180,6 +180,11 @@ struct GNUNET_DHT_ClientPutMessage
    */
   uint32_t desired_replication_level GNUNET_PACKED;
 
+  /**
+   * Unique ID for the PUT message.
+   */
+  uint64_t unique_id GNUNET_PACKED;
+
   /**
    * How long should this data persist?
    */
@@ -196,7 +201,31 @@ struct GNUNET_DHT_ClientPutMessage
 
 
 /**
- * Message to monitor put requests going through peer, DHT service --> clients.
+ * Message to confirming receipt of PUT, sent from DHT service to clients.
+ */
+struct GNUNET_DHT_ClientPutConfirmationMessage
+{
+  /**
+   * Type: GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT_OK
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * Always zero.
+   */
+  uint32_t reserved GNUNET_PACKED;
+
+  /**
+   * Unique ID from the PUT message that is being confirmed.
+   */
+  uint64_t unique_id GNUNET_PACKED;
+
+};
+
+
+
+/**
+ * Message to monitor put requests going through peer, DHT service -> clients.
  */
 struct GNUNET_DHT_MonitorPutMessage
 {
@@ -249,7 +278,49 @@ struct GNUNET_DHT_MonitorPutMessage
 
 
 /**
- * Message to monitor get requests going through peer, DHT service --> clients.
+ * Message to request monitoring messages, clients -> DHT service.
+ */
+struct GNUNET_DHT_MonitorStartStopMessage
+{
+  /**
+   * Type: GNUNET_MESSAGE_TYPE_DHT_MONITOR_(START|STOP)
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * The type of data desired, GNUNET_BLOCK_TYPE_ANY for all.
+   */
+  uint32_t type GNUNET_PACKED;
+
+  /**
+   * Flag whether to notify about GET messages.
+   */
+  int16_t get GNUNET_PACKED;
+
+  /**
+   * Flag whether to notify about GET_REPONSE messages.
+   */
+  int16_t get_resp GNUNET_PACKED;
+
+  /**
+   * Flag whether to notify about PUT messages.
+   */
+  int16_t put GNUNET_PACKED;
+
+  /**
+   * Flag whether to use the provided key to filter messages.
+   */
+  int16_t filter_key GNUNET_PACKED;
+
+  /**
+   * The key to filter messages by.
+   */
+  GNUNET_HashCode key;
+};
+
+
+/**
+ * Message to monitor get requests going through peer, DHT service -> clients.
  */
 struct GNUNET_DHT_MonitorGetMessage
 {
@@ -294,9 +365,9 @@ struct GNUNET_DHT_MonitorGetMessage
 };
 
 /**
- * Message to monitor get results going through peer, DHT service --> clients.
+ * Message to monitor get results going through peer, DHT service -> clients.
  */
-struct GNUNET_DHT_MonitorGetResultMessage
+struct GNUNET_DHT_MonitorGetRespMessage
 {
   /**
    * Type: GNUNET_MESSAGE_TYPE_DHT_P2P_RESULT