- doc
[oweals/gnunet.git] / src / mesh / gnunet-service-mesh_peer.h
index 586cf5d06877c633f93b68925905ce09c395e880..49bfd4050f1de875c6eb16a2211b8c0cbf8f9a51 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);
 
@@ -325,7 +336,7 @@ GMP_get_tunnel (const struct MeshPeer *peer);
  * @param hello Hello message.
  */
 void
-GMP_set_hello (struct MeshPeer *peer, struct GNUNET_HELLO_Message *hello);
+GMP_set_hello (struct MeshPeer *peer, const struct GNUNET_HELLO_Message *hello);
 
 /**
  * Get the hello message.
@@ -337,6 +348,28 @@ GMP_set_hello (struct MeshPeer *peer, struct GNUNET_HELLO_Message *hello);
 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);
+
+/**
+ * Notify a peer that a link between two other peers is broken. If any path
+ * used that link, eliminate it.
+ *
+ * @param peer Peer affected by the change.
+ * @param peer1 Peer whose link is broken.
+ * @param peer2 Peer whose link is broken.
+ */
+void
+GMP_notify_broken_link (struct MeshPeer *peer,
+                        struct GNUNET_PeerIdentity *peer1,
+                        struct GNUNET_PeerIdentity *peer2);
+
 /**
  * Count the number of known paths toward the peer.
  *