gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r23781 - gnunet/src/dht
Date: Fri, 14 Sep 2012 11:02:31 +0200

Author: wachs
Date: 2012-09-14 11:02:31 +0200 (Fri, 14 Sep 2012)
New Revision: 23781

Modified:
   gnunet/src/dht/gnunet-dht-get.c
   gnunet/src/dht/gnunet-dht-put.c
Log:
demux everywhere option for CLI

Modified: gnunet/src/dht/gnunet-dht-get.c
===================================================================
--- gnunet/src/dht/gnunet-dht-get.c     2012-09-14 08:46:10 UTC (rev 23780)
+++ gnunet/src/dht/gnunet-dht-get.c     2012-09-14 09:02:31 UTC (rev 23781)
@@ -52,6 +52,11 @@
 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 @@
   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 @@
   {'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},

Modified: gnunet/src/dht/gnunet-dht-put.c
===================================================================
--- gnunet/src/dht/gnunet-dht-put.c     2012-09-14 08:46:10 UTC (rev 23780)
+++ gnunet/src/dht/gnunet-dht-put.c     2012-09-14 09:02:31 UTC (rev 23781)
@@ -62,6 +62,11 @@
 static int verbose;
 
 /**
+ * Use DHT demultixplex_everywhere
+ */
+static int demultixplex_everywhere;
+
+/**
  * Handle to the DHT
  */
 static struct GNUNET_DHT_Handle *dht_handle;
@@ -175,7 +180,9 @@
   if (verbose)
     FPRINTF (stderr, _("Issuing put request for `%s' with data `%s'!\n"),
              query_key, data);
-  GNUNET_DHT_put (dht_handle, &key, replication, GNUNET_DHT_RO_NONE, 
query_type,
+  GNUNET_DHT_put (dht_handle, &key, replication,
+                  (demultixplex_everywhere) ? 
GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE : GNUNET_DHT_RO_NONE,
+                  query_type,
                   strlen (data), data, expiration, timeout, &message_sent_cont,
                   NULL);
 
@@ -195,6 +202,9 @@
   {'k', "key", "KEY",
    gettext_noop ("the query key"),
    1, &GNUNET_GETOPT_set_string, &query_key},
+  {'x', "demultiplex", NULL,
+   gettext_noop ("use DHT's demultiplex everywhere option"),
+   0, &GNUNET_GETOPT_set_one, &demultixplex_everywhere},
   {'r', "replication", "LEVEL",
    gettext_noop ("how many replicas to create"),
    1, &GNUNET_GETOPT_set_uint, &replication},




reply via email to

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