aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-dht-put.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-09-14 09:02:31 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-09-14 09:02:31 +0000
commit475b609e3627e489ad234cb9679e7df15e012fcb (patch)
tree87a58d87710b86aeb955c585e497f878e2d08990 /src/dht/gnunet-dht-put.c
parent1b05f977d5fff527287ac0de18405d958b9307bb (diff)
downloadgnunet-475b609e3627e489ad234cb9679e7df15e012fcb.tar.gz
gnunet-475b609e3627e489ad234cb9679e7df15e012fcb.zip
demux everywhere option for CLI
Diffstat (limited to 'src/dht/gnunet-dht-put.c')
-rw-r--r--src/dht/gnunet-dht-put.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/dht/gnunet-dht-put.c b/src/dht/gnunet-dht-put.c
index f1d8fb56e..a55986450 100644
--- a/src/dht/gnunet-dht-put.c
+++ b/src/dht/gnunet-dht-put.c
@@ -62,6 +62,11 @@ static unsigned int replication = 5;
62static int verbose; 62static int verbose;
63 63
64/** 64/**
65 * Use DHT demultixplex_everywhere
66 */
67static int demultixplex_everywhere;
68
69/**
65 * Handle to the DHT 70 * Handle to the DHT
66 */ 71 */
67static struct GNUNET_DHT_Handle *dht_handle; 72static struct GNUNET_DHT_Handle *dht_handle;
@@ -175,7 +180,9 @@ run (void *cls, char *const *args, const char *cfgfile,
175 if (verbose) 180 if (verbose)
176 FPRINTF (stderr, _("Issuing put request for `%s' with data `%s'!\n"), 181 FPRINTF (stderr, _("Issuing put request for `%s' with data `%s'!\n"),
177 query_key, data); 182 query_key, data);
178 GNUNET_DHT_put (dht_handle, &key, replication, GNUNET_DHT_RO_NONE, query_type, 183 GNUNET_DHT_put (dht_handle, &key, replication,
184 (demultixplex_everywhere) ? GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE : GNUNET_DHT_RO_NONE,
185 query_type,
179 strlen (data), data, expiration, timeout, &message_sent_cont, 186 strlen (data), data, expiration, timeout, &message_sent_cont,
180 NULL); 187 NULL);
181 188
@@ -195,6 +202,9 @@ static struct GNUNET_GETOPT_CommandLineOption options[] = {
195 {'k', "key", "KEY", 202 {'k', "key", "KEY",
196 gettext_noop ("the query key"), 203 gettext_noop ("the query key"),
197 1, &GNUNET_GETOPT_set_string, &query_key}, 204 1, &GNUNET_GETOPT_set_string, &query_key},
205 {'x', "demultiplex", NULL,
206 gettext_noop ("use DHT's demultiplex everywhere option"),
207 0, &GNUNET_GETOPT_set_one, &demultixplex_everywhere},
198 {'r', "replication", "LEVEL", 208 {'r', "replication", "LEVEL",
199 gettext_noop ("how many replicas to create"), 209 gettext_noop ("how many replicas to create"),
200 1, &GNUNET_GETOPT_set_uint, &replication}, 210 1, &GNUNET_GETOPT_set_uint, &replication},