#include "platform.h"
#include "gnunet_dht_service.h"
+#define LOG(kind,...) GNUNET_log_from (kind, "dht-clients",__VA_ARGS__)
/**
* The type of the query
*/
*/
static int verbose;
+/**
+ * Use DHT demultixplex_everywhere
+ */
+static int demultixplex_everywhere;
+
/**
* Handle to the DHT
*/
unsigned int put_path_length, enum GNUNET_BLOCK_Type type,
size_t size, const void *data)
{
- FPRINTF (stdout,
- _("Result %d, type %d:\n%.*s\n"),
+ FPRINTF (stdout,
+ _("Result %d, type %d:\n%.*s\n"),
result_count, type,
(unsigned int) size, (char *) data);
result_count++;
{
struct GNUNET_HashCode key;
+
+
cfg = c;
if (NULL == query_key)
{
if (query_type == GNUNET_BLOCK_TYPE_ANY) /* Type of data not set */
query_type = GNUNET_BLOCK_TYPE_TEST;
GNUNET_CRYPTO_hash (query_key, strlen (query_key), &key);
+ if (verbose)
+ FPRINTF (stderr, "%s `%s' \n", _("Issueing DHT GET with key"), GNUNET_h2s_full (&key));
GNUNET_SCHEDULER_add_delayed (timeout_request,
&cleanup_task, NULL);
get_handle =
GNUNET_DHT_get_start (dht_handle, query_type, &key, replication,
- GNUNET_DHT_RO_NONE, NULL, 0, &get_result_iterator,
- NULL);
+ (demultixplex_everywhere) ? GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE : GNUNET_DHT_RO_NONE,
+ NULL, 0, &get_result_iterator, NULL);
}
{'T', "timeout", "TIMEOUT",
gettext_noop ("how long to execute this query before giving up?"),
1, &GNUNET_GETOPT_set_relative_time, &timeout_request},
+ {'x', "demultiplex", NULL,
+ gettext_noop ("use DHT's demultiplex everywhere option"),
+ 0, &GNUNET_GETOPT_set_one, &demultixplex_everywhere},
{'V', "verbose", NULL,
gettext_noop ("be verbose (print progress information)"),
0, &GNUNET_GETOPT_set_one, &verbose},