Fixed id counters' cycling
[oweals/gnunet.git] / src / mesh / mesh_tunnel_tree.h
index 82a1d1d1bd6cc045d49c2493fd9ced4509d439a5..59a60839d43cd922698786d01fd1726bf45e043f 100644 (file)
@@ -347,6 +347,23 @@ tree_notify_connection_broken (struct MeshTunnelTree *t,
                                MeshNodeDisconnectCB cb);
 
 
+/**
+ * Deletes a peer from a tunnel, liberating all unused resources on the path to
+ * it. It shouldn't have children, if it has they will be destroyed as well.
+ * If the tree is not local and no longer has any paths, the root node will be
+ * destroyed and marked as NULL.
+ *
+ * @param t Tunnel tree to use.
+ * @param peer Short ID of the peer to remove from the tunnel tree.
+ * @param cb Callback to notify client of disconnected peers.
+ *
+ * @return GNUNET_OK or GNUNET_SYSERR
+ */
+int
+tree_del_peer (struct MeshTunnelTree *t,
+               GNUNET_PEER_Id peer,
+               MeshNodeDisconnectCB cb);
+
 /**
  * Print the tree on stderr
  *