- FIX: GNUNET_SET_STATUS_HALF_DONE is never called only GNUNET_SET_STATUS_DONE
[oweals/gnunet.git] / src / dv / dv.h
index cfa09409ef969e48856d26971d85777d22ee44f5..c0a4828a20592a7f55fc05d9b68a9a9e2931bfd2 100644 (file)
@@ -69,9 +69,9 @@ struct GNUNET_DV_DisconnectMessage
   struct GNUNET_MessageHeader header;
 
   /**
-   * The distance to the peer that we used to have
+   * Always zero.
    */
-  uint32_t distance GNUNET_PACKED;
+  uint32_t reserved GNUNET_PACKED;
 
   /**
    * The peer that is no longer available.
@@ -121,7 +121,7 @@ struct GNUNET_DV_SendMessage
   struct GNUNET_MessageHeader header;
 
   /**
-   * Unique ID for this message, for confirm callback.
+   * Unique ID for this message, for confirm callback, must never be zero.
    */
   uint32_t uid GNUNET_PACKED;
 
@@ -135,13 +135,14 @@ struct GNUNET_DV_SendMessage
 
 /**
  * Message from service to DV plugin, saying that a
- * SEND request was handled.  
+ * SEND request was handled.
  */
 struct GNUNET_DV_AckMessage
 {
   /**
-   * Type: GNUNET_MESSAGE_TYPE_DV_SEND_ACK
-   */ 
+   * Type: GNUNET_MESSAGE_TYPE_DV_SEND_ACK or
+   * GNUNET_MESSAGE_TYPE_DV_SEND_NACK.
+   */
   struct GNUNET_MessageHeader header;
 
   /**
@@ -155,6 +156,32 @@ struct GNUNET_DV_AckMessage
   struct GNUNET_PeerIdentity target;
 
 };
+
+
+/**
+ * Message from service to DV plugin, saying that our
+ * distance to another peer changed.
+ */
+struct GNUNET_DV_DistanceUpdateMessage
+{
+  /**
+   * Type: GNUNET_MESSAGE_TYPE_DV_DISTANCE_CHANGED.
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * What is the new distance?
+   */
+  uint32_t distance GNUNET_PACKED;
+
+  /**
+   * The peer for which the distance changed.
+   */
+  struct GNUNET_PeerIdentity peer;
+
+};
+
+
 GNUNET_NETWORK_STRUCT_END
 
 #endif