aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_dht_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_dht_service.h')
-rw-r--r--src/include/gnunet_dht_service.h40
1 files changed, 29 insertions, 11 deletions
diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h
index 6606acb..0de7551 100644
--- a/src/include/gnunet_dht_service.h
+++ b/src/include/gnunet_dht_service.h
@@ -163,10 +163,12 @@ typedef void (*GNUNET_DHT_PutContinuation)(void *cls,
* (size too big)
*/
struct GNUNET_DHT_PutHandle *
-GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, const GNUNET_HashCode * key,
+GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle,
+ const struct GNUNET_HashCode * key,
uint32_t desired_replication_level,
enum GNUNET_DHT_RouteOption options,
- enum GNUNET_BLOCK_Type type, size_t size, const char *data,
+ enum GNUNET_BLOCK_Type type,
+ size_t size, const void *data,
struct GNUNET_TIME_Absolute exp,
struct GNUNET_TIME_Relative timeout,
GNUNET_DHT_PutContinuation cont,
@@ -205,7 +207,7 @@ GNUNET_DHT_put_cancel (struct GNUNET_DHT_PutHandle *ph);
*/
typedef void (*GNUNET_DHT_GetIterator) (void *cls,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *
get_path, unsigned int get_path_length,
const struct GNUNET_PeerIdentity *
@@ -234,14 +236,30 @@ typedef void (*GNUNET_DHT_GetIterator) (void *cls,
*/
struct GNUNET_DHT_GetHandle *
GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle,
- enum GNUNET_BLOCK_Type type, const GNUNET_HashCode * key,
+ enum GNUNET_BLOCK_Type type,
+ const struct GNUNET_HashCode *key,
uint32_t desired_replication_level,
- enum GNUNET_DHT_RouteOption options, const void *xquery,
- size_t xquery_size, GNUNET_DHT_GetIterator iter,
- void *iter_cls);
+ enum GNUNET_DHT_RouteOption options,
+ const void *xquery, size_t xquery_size,
+ GNUNET_DHT_GetIterator iter, void *iter_cls);
/**
+ * Tell the DHT not to return any of the following known results
+ * to this client.
+ *
+ * @param get_handle get operation for which results should be filtered
+ * @param num_results number of results to be blocked that are
+ * provided in this call (size of the 'results' array)
+ * @param results array of hash codes over the 'data' of the results
+ * to be blocked
+ */
+void
+GNUNET_DHT_get_filter_known_results (struct GNUNET_DHT_GetHandle *get_handle,
+ unsigned int num_results,
+ const struct GNUNET_HashCode *results);
+
+/**
* Stop async DHT-get. Frees associated resources.
*
* @param get_handle GET operation to stop.
@@ -279,7 +297,7 @@ typedef void (*GNUNET_DHT_MonitorGetCB) (void *cls,
uint32_t desired_replication_level,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
- const GNUNET_HashCode * key);
+ const struct GNUNET_HashCode * key);
/**
* Callback called on each GET reply going through the DHT.
@@ -304,7 +322,7 @@ typedef void (*GNUNET_DHT_MonitorGetRespCB) (void *cls,
* put_path,
unsigned int put_path_length,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const void *data,
size_t size);
@@ -331,7 +349,7 @@ typedef void (*GNUNET_DHT_MonitorPutCB) (void *cls,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const void *data,
size_t size);
@@ -351,7 +369,7 @@ typedef void (*GNUNET_DHT_MonitorPutCB) (void *cls,
struct GNUNET_DHT_MonitorHandle *
GNUNET_DHT_monitor_start (struct GNUNET_DHT_Handle *handle,
enum GNUNET_BLOCK_Type type,
- const GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
GNUNET_DHT_MonitorGetCB get_cb,
GNUNET_DHT_MonitorGetRespCB get_resp_cb,
GNUNET_DHT_MonitorPutCB put_cb,