- debug
[oweals/gnunet.git] / src / mesh / gnunet-service-mesh_tunnel.h
index 49533edf6dc7ca309d0bd2f56071ee155331924e..e15d07988701f1e83594b2fa8b6cf87f68da056e 100644 (file)
@@ -79,6 +79,7 @@ struct MeshTunnel3;
 
 #include "gnunet-service-mesh_channel.h"
 #include "gnunet-service-mesh_connection.h"
+#include "gnunet-service-mesh_peer.h"
 
 
 /******************************************************************************/
@@ -197,6 +198,19 @@ GMT_remove_channel (struct MeshTunnel3 *t, struct MeshChannel *ch);
 struct MeshChannel *
 GMT_get_channel (struct MeshTunnel3 *t, MESH_ChannelNumber chid);
 
+/**
+ * Decrypt and demultiplex by message type. Call appropriate handler
+ * for a message
+ * towards a channel of a local tunnel.
+ *
+ * @param t Tunnel this message came on.
+ * @param msgh Message header.
+ * @param fwd Is this message fwd?
+ */
+void
+GMT_handle_encrypted (struct MeshTunnel3 *t,
+                      const struct GNUNET_MESH_Encrypted *msg,
+                      int fwd);
 
 /**
  * Cache a message to be sent once tunnel is online.
@@ -295,6 +309,17 @@ GMT_get_destination (struct MeshTunnel3 *t);
 MESH_ChannelNumber
 GMT_get_next_chid (struct MeshTunnel3 *t);
 
+/**
+ * Send ACK on one or more connections due to buffer space to the client.
+ *
+ * Iterates all connections of the tunnel and sends ACKs appropriately.
+ *
+ * @param ch Channel which has some free buffer space.
+ * @param fwd Is this in for FWD traffic? (ACK goes dest->root)
+ */
+void
+GMT_send_acks (struct MeshTunnel3 *t, unsigned int buffer, int fwd);
+
 /**
  * Sends an already built message on a tunnel, encrypting it and
  * choosing the best connection.