pass only CadetTunnelAxolotl if it suffices, preparation for having ambiguous KX...
[oweals/gnunet.git] / src / cadet / gnunet-service-cadet-new_paths.h
index f08d4a705ffb526fbce23ae11fef40babb0bd941..7310d75e640e0b72c47a0a06c5286dd75a9e9a3e 100644 (file)
@@ -49,6 +49,18 @@ GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity *get_path,
                         unsigned int put_path_length);
 
 
+/**
+ * We got an incoming connection, obtain the corresponding path.
+ *
+ * @param path_length number of segments on the @a path
+ * @param path through the network, in reverse order (we are at the end!)
+ * @return corresponding path object
+ */
+struct CadetPeerPath *
+GCPP_get_path_from_route (unsigned int path_length,
+                          const struct GNUNET_PeerIdentity *pids);
+
+
 /**
  * Return the length of the path.  Excludes one end of the
  * path, so the loopback path has length 0.
@@ -67,7 +79,7 @@ GCPP_get_length (struct CadetPeerPath *path);
  * @param path path to traverse
  * @param destination destination node to get to, must be on path
  * @param off offset of @a destination on @a path
- * @return NULL if @a create is NO and we have no existing connection
+ * @return NULL if we have no existing connection
  *         otherwise connection from us to @a destination via @a path
  */
 struct CadetConnection *
@@ -157,4 +169,14 @@ GCPP_get_peer_at_offset (struct CadetPeerPath *path,
                          unsigned int off);
 
 
+/**
+ * Convert a path to a human-readable string.
+ *
+ * @param path path to convert
+ * @return string, statically allocated
+ */
+const char *
+GCPP_2s (struct CadetPeerPath *p);
+
+
 #endif