+/**
+ * Request that the tunnel data rate is limited to the speed of the slowest
+ * receiver.
+ *
+ * @param tunnel Tunnel affected.
+ */
+void
+GNUNET_MESH_tunnel_speed_min (struct GNUNET_MESH_Tunnel *tunnel)
+{
+ struct GNUNET_MESH_TunnelMessage msg;
+ struct GNUNET_MESH_Handle *h;
+
+ h = tunnel->mesh;
+ tunnel->speed_min = GNUNET_YES;
+
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_MIN);
+ msg.header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage));
+ msg.tunnel_id = htonl (tunnel->tid);
+
+ send_packet (h, &msg.header, NULL);
+}
+
+
+/**
+ * Request that the tunnel data rate is limited to the speed of the fastest
+ * receiver. This is the default behavior.
+ *
+ * @param tunnel Tunnel affected.
+ */
+void
+GNUNET_MESH_tunnel_speed_max (struct GNUNET_MESH_Tunnel *tunnel)
+{
+ struct GNUNET_MESH_TunnelMessage msg;
+ struct GNUNET_MESH_Handle *h;
+
+ h = tunnel->mesh;
+ tunnel->speed_min = GNUNET_NO;
+
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_MAX);
+ msg.header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage));
+ msg.tunnel_id = htonl (tunnel->tid);
+
+ send_packet (h, &msg.header, NULL);
+}
+
+/**
+ * Turn on/off the buffering status of the tunnel.
+ *
+ * @param tunnel Tunnel affected.
+ * @param buffer GNUNET_YES to turn buffering on (default),
+ * GNUNET_NO otherwise.
+ */
+void
+GNUNET_MESH_tunnel_buffer (struct GNUNET_MESH_Tunnel *tunnel, int buffer)
+{
+ struct GNUNET_MESH_TunnelMessage msg;
+ struct GNUNET_MESH_Handle *h;
+
+ h = tunnel->mesh;
+ tunnel->buffering = buffer;
+
+ if (GNUNET_YES == buffer)
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_BUFFER);
+ else
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_NOBUFFER);
+ msg.header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage));
+ msg.tunnel_id = htonl (tunnel->tid);
+
+ send_packet (h, &msg.header, NULL);
+}