- debug
[oweals/gnunet.git] / src / mesh / gnunet-service-mesh_peer.h
index c7265ce2f62327b5974e7fd8ff747d3d34e10d07..7cc48fb663f948fabb991910c77773e2e49d0a4b 100644 (file)
@@ -45,6 +45,8 @@ extern "C"
  */
 struct MeshPeer;
 
+#include "gnunet-service-mesh_connection.h"
+
 /**
  * Callback called when a queued message is sent.
  *
@@ -60,9 +62,6 @@ typedef void (*GMP_sent) (void *cls,
                           int fwd, size_t size,
                           struct GNUNET_TIME_Relative wait);
 
-#include "gnunet-service-mesh_connection.h"
-
-
 /******************************************************************************/
 /********************************    API    ***********************************/
 /******************************************************************************/
@@ -225,7 +224,7 @@ GMP_add_path_to_origin (struct MeshPeer *peer_info,
  * @param confirmed Whether we know if the path works or not.
  */
 void
-GMP_add_path_to_all (struct MeshPeerPath *p, int confirmed);
+GMP_add_path_to_all (const struct MeshPeerPath *p, int confirmed);
 
 /**
  * Remove a connection from a neighboring peer.
@@ -238,9 +237,21 @@ GMP_add_path_to_all (struct MeshPeerPath *p, int confirmed);
 int
 GMP_remove_connection (struct MeshPeer *peer, const struct MeshConnection *c);
 
+/**
+ * Start the DHT search for new paths towards the peer: we don't have
+ * enough good connections.
+ *
+ * @param peer Destination peer.
+ */
 void
 GMP_start_search (struct MeshPeer *peer);
 
+/**
+ * Stop the DHT search for new paths towards the peer: we already have
+ * enough good connections.
+ *
+ * @param peer Destination peer.
+ */
 void
 GMP_stop_search (struct MeshPeer *peer);
 
@@ -264,6 +275,16 @@ GMP_get_id (const struct MeshPeer *peer);
 GNUNET_PEER_Id
 GMP_get_short_id (const struct MeshPeer *peer);
 
+/**
+ * Get the tunnel towards a peer.
+ *
+ * @param peer Peer to get from.
+ *
+ * @return Tunnel towards peer.
+ */
+struct MeshTunnel3 *
+GMP_get_tunnel (const struct MeshPeer *peer);
+
 /**
  * Get the static string for a peer ID.
  *