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.h34
1 files changed, 27 insertions, 7 deletions
diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h
index 15da9ecdd..d33ef2f0d 100644
--- a/src/include/gnunet_dht_service.h
+++ b/src/include/gnunet_dht_service.h
@@ -257,7 +257,9 @@ GNUNET_DHT_put_cancel (struct GNUNET_DHT_PutHandle *ph);
257 * @param get_path_length number of entries in @a get_path 257 * @param get_path_length number of entries in @a get_path
258 * @param put_path peers on the PUT path (or NULL if not recorded) 258 * @param put_path peers on the PUT path (or NULL if not recorded)
259 * [0] = origin, [length - 1] = datastore 259 * [0] = origin, [length - 1] = datastore
260 * @param put_path_length number of entries in @a put_path 260 * @param put_path_length number of entries in @a put_path,
261 * note that the last signature will be all zeros as
262 * we did not forward and thus did not sign!
261 * @param type type of the result 263 * @param type type of the result
262 * @param size number of bytes in @a data 264 * @param size number of bytes in @a data
263 * @param data pointer to the result data 265 * @param data pointer to the result data
@@ -266,9 +268,9 @@ typedef void
266(*GNUNET_DHT_GetIterator) (void *cls, 268(*GNUNET_DHT_GetIterator) (void *cls,
267 struct GNUNET_TIME_Absolute exp, 269 struct GNUNET_TIME_Absolute exp,
268 const struct GNUNET_HashCode *key, 270 const struct GNUNET_HashCode *key,
269 const struct GNUNET_PeerIdentity *get_path, 271 const struct GNUNET_DHT_PathElement *get_path,
270 unsigned int get_path_length, 272 unsigned int get_path_length,
271 const struct GNUNET_PeerIdentity *put_path, 273 const struct GNUNET_DHT_PathElement *put_path,
272 unsigned int put_path_length, 274 unsigned int put_path_length,
273 enum GNUNET_BLOCK_Type type, 275 enum GNUNET_BLOCK_Type type,
274 size_t size, 276 size_t size,
@@ -343,6 +345,8 @@ struct GNUNET_DHT_MonitorHandle;
343 * @param hop_count Hop count so far. 345 * @param hop_count Hop count so far.
344 * @param path_length number of entries in @a path (or 0 if not recorded). 346 * @param path_length number of entries in @a path (or 0 if not recorded).
345 * @param path peers on the GET path (or NULL if not recorded). 347 * @param path peers on the GET path (or NULL if not recorded).
348 * note that the last signature will be all zeros as
349 * we did not forward and thus did not sign!
346 * @param desired_replication_level Desired replication level. 350 * @param desired_replication_level Desired replication level.
347 * @param key Key of the requested data. 351 * @param key Key of the requested data.
348 */ 352 */
@@ -353,7 +357,7 @@ typedef void
353 uint32_t hop_count, 357 uint32_t hop_count,
354 uint32_t desired_replication_level, 358 uint32_t desired_replication_level,
355 unsigned int path_length, 359 unsigned int path_length,
356 const struct GNUNET_PeerIdentity *path, 360 const struct GNUNET_DHT_PathElement *path,
357 const struct GNUNET_HashCode *key); 361 const struct GNUNET_HashCode *key);
358 362
359 363
@@ -363,6 +367,8 @@ typedef void
363 * @param cls Closure. 367 * @param cls Closure.
364 * @param type The type of data in the result. 368 * @param type The type of data in the result.
365 * @param get_path Peers on GET path (or NULL if not recorded). 369 * @param get_path Peers on GET path (or NULL if not recorded).
370 * note that the last signature will be all zeros as
371 * we did not forward and thus did not sign!
366 * @param get_path_length number of entries in @a get_path. 372 * @param get_path_length number of entries in @a get_path.
367 * @param put_path peers on the PUT path (or NULL if not recorded). 373 * @param put_path peers on the PUT path (or NULL if not recorded).
368 * @param put_path_length number of entries in @a get_path. 374 * @param put_path_length number of entries in @a get_path.
@@ -374,9 +380,9 @@ typedef void
374typedef void 380typedef void
375(*GNUNET_DHT_MonitorGetRespCB) (void *cls, 381(*GNUNET_DHT_MonitorGetRespCB) (void *cls,
376 enum GNUNET_BLOCK_Type type, 382 enum GNUNET_BLOCK_Type type,
377 const struct GNUNET_PeerIdentity *get_path, 383 const struct GNUNET_DHT_PathElement *get_path,
378 unsigned int get_path_length, 384 unsigned int get_path_length,
379 const struct GNUNET_PeerIdentity *put_path, 385 const struct GNUNET_DHT_PathElement *put_path,
380 unsigned int put_path_length, 386 unsigned int put_path_length,
381 struct GNUNET_TIME_Absolute exp, 387 struct GNUNET_TIME_Absolute exp,
382 const struct GNUNET_HashCode *key, 388 const struct GNUNET_HashCode *key,
@@ -393,6 +399,8 @@ typedef void
393 * @param hop_count Hop count so far. 399 * @param hop_count Hop count so far.
394 * @param path_length number of entries in @a path (or 0 if not recorded). 400 * @param path_length number of entries in @a path (or 0 if not recorded).
395 * @param path peers on the PUT path (or NULL if not recorded). 401 * @param path peers on the PUT path (or NULL if not recorded).
402 * note that the last signature will be all zeros as
403 * we did not forward and thus did not sign!
396 * @param desired_replication_level Desired replication level. 404 * @param desired_replication_level Desired replication level.
397 * @param exp Expiration time of the data. 405 * @param exp Expiration time of the data.
398 * @param key Key under which data is to be stored. 406 * @param key Key under which data is to be stored.
@@ -406,7 +414,7 @@ typedef void
406 uint32_t hop_count, 414 uint32_t hop_count,
407 uint32_t desired_replication_level, 415 uint32_t desired_replication_level,
408 unsigned int path_length, 416 unsigned int path_length,
409 const struct GNUNET_PeerIdentity *path, 417 const struct GNUNET_DHT_PathElement *path,
410 struct GNUNET_TIME_Absolute exp, 418 struct GNUNET_TIME_Absolute exp,
411 const struct GNUNET_HashCode *key, 419 const struct GNUNET_HashCode *key,
412 const void *data, 420 const void *data,
@@ -446,6 +454,18 @@ void
446GNUNET_DHT_monitor_stop (struct GNUNET_DHT_MonitorHandle *handle); 454GNUNET_DHT_monitor_stop (struct GNUNET_DHT_MonitorHandle *handle);
447 455
448 456
457/**
458 * Convert a peer path to a human-readable string.
459 *
460 * @param path array of path elements to convert to a string
461 * @param num_pids length of the @a pids array
462 * @return string representing the array of @a pids
463 */
464char *
465GNUNET_DHT_pp2s (const struct GNUNET_DHT_PathElement *path,
466 unsigned int path_len);
467
468
449#if 0 /* keep Emacsens' auto-indent happy */ 469#if 0 /* keep Emacsens' auto-indent happy */
450{ 470{
451#endif 471#endif