/*
This file is part of GNUnet.
- (C) 2001 - 2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2001 - 2013 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
#endif
#endif
-#include "gnunet-service-cadet_connection.h"
-
/******************************************************************************/
/************************ DATA STRUCTURES ****************************/
* Task to delete the path.
* We tried it, it didn't work, don't try again in a while.
*/
- GNUNET_SCHEDULER_TaskIdentifier path_delete;
+ struct GNUNET_SCHEDULER_Task * path_delete;
};
void
path_invalidate (struct CadetPeerPath *p);
+/**
+ * Test if two paths are equivalent (equal or revese of each other).
+ *
+ * @param p1 First path
+ * @param p2 Second path
+ *
+ * @return GNUNET_YES if both paths are equivalent
+ * GNUNET_NO otherwise
+ */
+int
+path_equivalent (const struct CadetPeerPath *p1,
+ const struct CadetPeerPath *p2);
+
/**
* Test if a path is valid (or at least not known to be invalid).
*
int
path_destroy (struct CadetPeerPath *p);
+/**
+ * Compare two paths.
+ *
+ * @param p1 First path.
+ * @param p2 Second path.
+ *
+ * @return > 0 if p1 is longer, or the first differing PEER_Id is higher on p1.
+ * < 0 if p2 is longer, or the first differing PEER_Id is higher on p2.
+ * 0 if they are identical.
+ */
+int
+path_cmp (const struct CadetPeerPath *p1, const struct CadetPeerPath *p2);
+
/**
* Builds a path from a PeerIdentity array.
*