refactor DHT for new service API
[oweals/gnunet.git] / src / cadet / cadet_path.h
index 326626f9d54c7e4bfef18077ab9bd8b3a580ce09..bb68eec42e5344ca948eec77a6a94c0e1b216d25 100644 (file)
@@ -1,6 +1,6 @@
 /*
      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
@@ -14,8 +14,8 @@
 
      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.
 */
 
 /**
@@ -35,8 +35,6 @@ extern "C"
 #endif
 #endif
 
-#include "gnunet-service-cadet_connection.h"
-
 
 /******************************************************************************/
 /************************      DATA STRUCTURES     ****************************/
@@ -171,6 +169,19 @@ path_is_valid (const struct CadetPeerPath *path);
 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.
  *