- use variables to cound ch, conns
[oweals/gnunet.git] / src / mesh / mesh.h
index 1211f7ebc1e20d51f79259b4a1a57ba725461399..7011bd51ac6ebf495b58ef6603c064d527e22c64 100644 (file)
@@ -166,10 +166,10 @@ struct GNUNET_MESH_LocalAck
 /**
  * Message to inform the client about channels in the service.
  */
-struct GNUNET_MESH_LocalMonitor
+struct GNUNET_MESH_LocalInfo
 {
   /**
-     * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_MONITOR[_TUNNEL]
+     * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_INFO[_TUNNEL]
    */
   struct GNUNET_MessageHeader header;
 
@@ -179,19 +179,53 @@ struct GNUNET_MESH_LocalMonitor
   MESH_ChannelNumber channel_id GNUNET_PACKED;
 
   /**
-   * Alignment.
+   * ID of the owner of the channel (can be local peer).
    */
-  uint32_t reserved GNUNET_PACKED;
+//   struct GNUNET_PeerIdentity owner;
 
   /**
-   * ID of the owner of the channel (can be local peer).
+   * ID of the destination of the channel (can be local peer).
    */
-  struct GNUNET_PeerIdentity owner;
+  struct GNUNET_PeerIdentity peer;
+};
 
+/**
+ * Message to inform the client about one of the tunnels in the service.
+ */
+struct GNUNET_MESH_LocalInfoTunnel
+{
   /**
-   * ID of the destination of the channel (can be local peer).
+   * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_INFO_TUNNEL[S]
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * Number of channels.
+   */
+  uint32_t channels GNUNET_PACKED;
+
+  /**
+   * ID of the destination of the tunnel (can be local peer).
    */
   struct GNUNET_PeerIdentity destination;
+
+  /**
+   * Number of connections.
+   */
+  uint32_t connections GNUNET_PACKED;
+
+  /**
+   * Encryption state.
+   */
+  uint16_t estate GNUNET_PACKED;
+
+  /**
+   * Connection state.
+   */
+  uint16_t cstate GNUNET_PACKED;
+
+  /* If TUNNEL (no 'S'): GNUNET_PeerIdentity connection_ids[connections] */
+  /* If TUNNEL (no 'S'): uint32_t channel_ids[channels] */
 };