gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r35683 - gnunet/src/dht


From: gnunet
Subject: [GNUnet-SVN] r35683 - gnunet/src/dht
Date: Thu, 30 Apr 2015 10:00:51 +0200

Author: grothoff
Date: 2015-04-30 10:00:51 +0200 (Thu, 30 Apr 2015)
New Revision: 35683

Modified:
   gnunet/src/dht/gnunet-service-wdht_datacache.c
   gnunet/src/dht/gnunet-service-wdht_datacache.h
Log:
-towards an API for the successor set

Modified: gnunet/src/dht/gnunet-service-wdht_datacache.c
===================================================================
--- gnunet/src/dht/gnunet-service-wdht_datacache.c      2015-04-30 07:56:54 UTC 
(rev 35682)
+++ gnunet/src/dht/gnunet-service-wdht_datacache.c      2015-04-30 08:00:51 UTC 
(rev 35683)
@@ -37,6 +37,12 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, __VA_ARGS__)
 
 /**
+ * How many "closest" results to we return for migration when
+ * asked (at most)?
+ */
+#define NUM_CLOSEST 42
+
+/**
  * Handle to the datacache service (for inserting/retrieving data)
  */
 static struct GNUNET_DATACACHE_Handle *datacache;
@@ -424,6 +430,23 @@
 
 
 /**
+ * Handle a request for data close to a key that we have received from
+ * another peer.
+ *
+ * @param key the location at which the peer is looking for data that is close
+ */
+void
+GDS_DATACACHE_get_successors (const struct GNUNET_HashCode *key)
+{
+  GNUNET_DATACACHE_get_closest (datacache,
+                                key,
+                                NUM_CLOSEST,
+                                NULL /* FIXME */,
+                                NULL);
+}
+
+
+/**
  * Initialize datacache subsystem.
  */
 void

Modified: gnunet/src/dht/gnunet-service-wdht_datacache.h
===================================================================
--- gnunet/src/dht/gnunet-service-wdht_datacache.h      2015-04-30 07:56:54 UTC 
(rev 35682)
+++ gnunet/src/dht/gnunet-service-wdht_datacache.h      2015-04-30 08:00:51 UTC 
(rev 35683)
@@ -88,6 +88,16 @@
 
 
 /**
+ * Handle a request for data close to a key that we have received from
+ * another peer.
+ *
+ * @param key the location at which the peer is looking for data that is close
+ */
+void
+GDS_DATACACHE_get_successors (const struct GNUNET_HashCode *key);
+
+
+/**
  * Initialize datacache subsystem.
  */
 void




reply via email to

[Prev in Thread] Current Thread [Next in Thread]