aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-download.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-download.c')
-rw-r--r--src/fs/gnunet-download.c74
1 files changed, 46 insertions, 28 deletions
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c
index 6d9adb8ab..4d6f30587 100644
--- a/src/fs/gnunet-download.c
+++ b/src/fs/gnunet-download.c
@@ -30,7 +30,7 @@
30 30
31static int ret; 31static int ret;
32 32
33static int verbose; 33static unsigned int verbose;
34 34
35static int delete_incomplete; 35static int delete_incomplete;
36 36
@@ -299,33 +299,51 @@ run (void *cls, char *const *args, const char *cfgfile,
299int 299int
300main (int argc, char *const *argv) 300main (int argc, char *const *argv)
301{ 301{
302 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 302 struct GNUNET_GETOPT_CommandLineOption options[] = {
303 {'a', "anonymity", "LEVEL", 303 GNUNET_GETOPT_OPTION_SET_UINT ('a',
304 gettext_noop ("set the desired LEVEL of receiver-anonymity"), 304 "anonymity",
305 1, &GNUNET_GETOPT_set_uint, &anonymity}, 305 "LEVEL",
306 {'D', "delete-incomplete", NULL, 306 gettext_noop ("set the desired LEVEL of receiver-anonymity"),
307 gettext_noop ("delete incomplete downloads (when aborted with CTRL-C)"), 307 &anonymity),
308 0, &GNUNET_GETOPT_set_one, &delete_incomplete}, 308
309 {'n', "no-network", NULL, 309 GNUNET_GETOPT_OPTION_SET_ONE ('D',
310 gettext_noop ("only search the local peer (no P2P network search)"), 310 "delete-incomplete",
311 0, &GNUNET_GETOPT_set_one, &local_only}, 311 gettext_noop ("delete incomplete downloads (when aborted with CTRL-C)"),
312 {'o', "output", "FILENAME", 312 &delete_incomplete),
313 gettext_noop ("write the file to FILENAME"), 313
314 1, &GNUNET_GETOPT_set_string, &filename}, 314 GNUNET_GETOPT_OPTION_SET_ONE ('n',
315 {'p', "parallelism", "DOWNLOADS", 315 "no-network",
316 gettext_noop 316 gettext_noop ("only search the local peer (no P2P network search)"),
317 ("set the maximum number of parallel downloads that is allowed"), 317 &local_only),
318 1, &GNUNET_GETOPT_set_uint, &parallelism}, 318
319 {'r', "request-parallelism", "REQUESTS", 319 GNUNET_GETOPT_OPTION_STRING ('o',
320 gettext_noop 320 "output",
321 ("set the maximum number of parallel requests for blocks that is allowed"), 321 "FILENAME",
322 1, &GNUNET_GETOPT_set_uint, &request_parallelism}, 322 gettext_noop ("write the file to FILENAME"),
323 {'R', "recursive", NULL, 323 &filename),
324 gettext_noop ("download a GNUnet directory recursively"), 324
325 0, &GNUNET_GETOPT_set_one, &do_recursive}, 325 GNUNET_GETOPT_OPTION_SET_UINT ('p',
326 {'V', "verbose", NULL, 326 "parallelism",
327 gettext_noop ("be verbose (print progress information)"), 327 "DOWNLOADS",
328 0, &GNUNET_GETOPT_increment_value, &verbose}, 328 gettext_noop ("set the maximum number of parallel downloads that is allowed"),
329 &parallelism),
330
331 GNUNET_GETOPT_OPTION_SET_UINT ('r',
332 "request-parallelism",
333 "REQUESTS",
334 gettext_noop ("set the maximum number of parallel requests for blocks that is allowed"),
335 &request_parallelism),
336
337 GNUNET_GETOPT_OPTION_SET_ONE ('R',
338 "recursive",
339 gettext_noop ("download a GNUnet directory recursively"),
340 &do_recursive),
341
342 GNUNET_GETOPT_OPTION_INCREMENT_VALUE ('V',
343 "verbose",
344 gettext_noop ("be verbose (print progress information)"),
345 &verbose),
346
329 GNUNET_GETOPT_OPTION_END 347 GNUNET_GETOPT_OPTION_END
330 }; 348 };
331 349