- hide temp config file, show config template
[oweals/gnunet.git] / src / mesh / gnunet-service-mesh_peer.h
index 58386c0aa0f71502a6aecab286883dde60f9be13..dd8bd2a5ed6a347112c925520a333d5640766860 100644 (file)
@@ -160,6 +160,17 @@ GMP_queue_add (struct MeshPeer *peer, void *cls, uint16_t type, size_t size,
 void
 GMP_queue_cancel (struct MeshPeer *peer, struct MeshConnection *c);
 
+/**
+ * Get the first message for a connection and unqueue it.
+ *
+ * @param peer Neighboring peer.
+ * @param c Connection.
+ *
+ * @return First message for this connection.
+ */
+struct GNUNET_MessageHeader *
+GMP_connection_pop (struct MeshPeer *peer, struct MeshConnection *c);
+
 void
 GMP_queue_unlock (struct MeshPeer *peer, struct MeshConnection *c);
 
@@ -250,6 +261,15 @@ GMP_add_path_to_origin (struct MeshPeer *peer,
 void
 GMP_add_path_to_all (const struct MeshPeerPath *p, int confirmed);
 
+/**
+ * Remove any path to the peer that has the extact same peers as the one given.
+ *
+ * @param peer Peer to remove the path from.
+ * @param path Path to remove. Is always destroyed .
+ */
+void
+GMP_remove_path (struct MeshPeer *peer, struct MeshPeerPath *path);
+
 /**
  * Remove a connection from a neighboring peer.
  *
@@ -309,6 +329,53 @@ GMP_get_short_id (const struct MeshPeer *peer);
 struct MeshTunnel3 *
 GMP_get_tunnel (const struct MeshPeer *peer);
 
+/**
+ * Set the hello message.
+ *
+ * @param peer Peer whose message to set.
+ * @param hello Hello message.
+ */
+void
+GMP_set_hello (struct MeshPeer *peer, const struct GNUNET_HELLO_Message *hello);
+
+/**
+ * Get the hello message.
+ *
+ * @param peer Peer whose message to get.
+ *
+ * @return Hello message.
+ */
+struct GNUNET_HELLO_Message *
+GMP_get_hello (struct MeshPeer *peer);
+
+
+/**
+ * Try to connect to a peer on TRANSPORT level.
+ *
+ * @param peer Peer to whom to connect.
+ */
+void
+GMP_try_connect (struct MeshPeer *peer);
+
+/**
+ * Count the number of known paths toward the peer.
+ *
+ * @param peer Peer to get path info.
+ *
+ * @return Number of known paths.
+ */
+unsigned int
+GMP_count_paths (const struct MeshPeer *peer);
+
+/**
+ * Iterate all known peers.
+ *
+ * @param iter Iterator.
+ * @param cls Closure for @c iter.
+ */
+void
+GMP_iterate_all (GNUNET_CONTAINER_PeerMapIterator iter, void *cls);
+
 /**
  * Get the static string for a peer ID.
  *