xvine:fixes
[oweals/gnunet.git] / src / dv / dv.h
index bcc586a0e6ddb20435d3d6d4b2a3601c6581790e..e6271ff58a8596f865502848ec640f628fe56b63 100644 (file)
@@ -37,7 +37,7 @@ GNUNET_NETWORK_STRUCT_BEGIN
 struct GNUNET_DV_ConnectMessage
 {
   /**
-   * Type:  GNUNET_MESSAGE_TYPE_TRANSPORT_DV_CONNECT
+   * Type: #GNUNET_MESSAGE_TYPE_DV_CONNECT
    */
   struct GNUNET_MessageHeader header;
 
@@ -51,6 +51,11 @@ struct GNUNET_DV_ConnectMessage
    */
   struct GNUNET_PeerIdentity peer;
 
+  /**
+   * The network the peer is in
+   */
+  uint32_t network GNUNET_PACKED;
+
 };
 
 
@@ -64,7 +69,7 @@ struct GNUNET_DV_ConnectMessage
 struct GNUNET_DV_DisconnectMessage
 {
   /**
-   * Type:  GNUNET_MESSAGE_TYPE_TRANSPORT_DV_DISCONNECT
+   * Type: #GNUNET_MESSAGE_TYPE_DV_DISCONNECT
    */
   struct GNUNET_MessageHeader header;
 
@@ -91,7 +96,7 @@ struct GNUNET_DV_DisconnectMessage
 struct GNUNET_DV_ReceivedMessage
 {
   /**
-   * Type:  GNUNET_MESSAGE_TYPE_TRANSPORT_DV_RECV
+   * Type: #GNUNET_MESSAGE_TYPE_DV_RECV
    */
   struct GNUNET_MessageHeader header;
 
@@ -116,7 +121,7 @@ struct GNUNET_DV_ReceivedMessage
 struct GNUNET_DV_SendMessage
 {
   /**
-   * Type: GNUNET_MESSAGE_TYPE_DV_SEND
+   * Type: #GNUNET_MESSAGE_TYPE_DV_SEND
    */
   struct GNUNET_MessageHeader header;
 
@@ -135,13 +140,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 +161,37 @@ 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;
+
+  /**
+   * The network the peer is in
+   */
+  uint32_t network GNUNET_PACKED;
+
+};
+
+
 GNUNET_NETWORK_STRUCT_END
 
 #endif