diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-09-14 09:02:31 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-09-14 09:02:31 +0000 |
commit | 475b609e3627e489ad234cb9679e7df15e012fcb (patch) | |
tree | 87a58d87710b86aeb955c585e497f878e2d08990 /src/dht/gnunet-dht-get.c | |
parent | 1b05f977d5fff527287ac0de18405d958b9307bb (diff) |
demux everywhere option for CLI
Diffstat (limited to 'src/dht/gnunet-dht-get.c')
-rw-r--r-- | src/dht/gnunet-dht-get.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/dht/gnunet-dht-get.c b/src/dht/gnunet-dht-get.c index 2dff4767f2..345a58a135 100644 --- a/src/dht/gnunet-dht-get.c +++ b/src/dht/gnunet-dht-get.c @@ -52,6 +52,11 @@ static struct GNUNET_TIME_Relative timeout_request = { 60000 }; static int verbose; /** + * Use DHT demultixplex_everywhere + */ +static int demultixplex_everywhere; + +/** * Handle to the DHT */ static struct GNUNET_DHT_Handle *dht_handle; @@ -161,12 +166,14 @@ run (void *cls, char *const *args, const char *cfgfile, 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); } @@ -187,6 +194,9 @@ static struct GNUNET_GETOPT_CommandLineOption options[] = { {'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}, |