aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-search.c
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-16 15:41:10 +0100
committerMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-16 15:41:10 +0100
commite724ea478e4efe6e2531f81908ce0f9334357d81 (patch)
treead114d0882c246bb0a314cdb2ca1c025cecef034 /src/fs/gnunet-search.c
parent1c4f90e7c538f1489ea17be3d2f655c2390d7ccf (diff)
downloadgnunet-e724ea478e4efe6e2531f81908ce0f9334357d81.tar.gz
gnunet-e724ea478e4efe6e2531f81908ce0f9334357d81.zip
porting fs finished.
Diffstat (limited to 'src/fs/gnunet-search.c')
-rw-r--r--src/fs/gnunet-search.c58
1 files changed, 37 insertions, 21 deletions
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c
index dfe6d0e75..22e790cf3 100644
--- a/src/fs/gnunet-search.c
+++ b/src/fs/gnunet-search.c
@@ -51,7 +51,7 @@ static unsigned int results_limit;
51 51
52static unsigned int results; 52static unsigned int results;
53 53
54static int verbose; 54static unsigned int verbose;
55 55
56static int local_only; 56static int local_only;
57 57
@@ -305,26 +305,42 @@ run (void *cls, char *const *args, const char *cfgfile,
305int 305int
306main (int argc, char *const *argv) 306main (int argc, char *const *argv)
307{ 307{
308 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 308 struct GNUNET_GETOPT_CommandLineOption options[] = {
309 {'a', "anonymity", "LEVEL", 309
310 gettext_noop ("set the desired LEVEL of receiver-anonymity"), 310 GNUNET_GETOPT_OPTION_SET_UINT ('a',
311 1, &GNUNET_GETOPT_set_uint, &anonymity}, 311 "anonymity",
312 {'n', "no-network", NULL, 312 "LEVEL",
313 gettext_noop ("only search the local peer (no P2P network search)"), 313 gettext_noop ("set the desired LEVEL of receiver-anonymity"),
314 0, &GNUNET_GETOPT_set_one, &local_only}, 314 &anonymity),
315 {'o', "output", "PREFIX", 315
316 gettext_noop ("write search results to file starting with PREFIX"), 316
317 1, &GNUNET_GETOPT_set_string, &output_filename}, 317 GNUNET_GETOPT_OPTION_SET_ONE ('n',
318 {'t', "timeout", "DELAY", 318 "no-network",
319 gettext_noop ("automatically terminate search after DELAY"), 319 gettext_noop ("only search the local peer (no P2P network search)"),
320 1, &GNUNET_GETOPT_set_relative_time, &timeout}, 320 &local_only),
321 {'V', "verbose", NULL, 321
322 gettext_noop ("be verbose (print progress information)"), 322 GNUNET_GETOPT_OPTION_STRING ('o',
323 0, &GNUNET_GETOPT_set_one, &verbose}, 323 "output",
324 {'N', "results", "VALUE", 324 "PREFIX",
325 gettext_noop 325 gettext_noop ("write search results to file starting with PREFIX"),
326 ("automatically terminate search after VALUE results are found"), 326 &output_filename),
327 1, &GNUNET_GETOPT_set_uint, &results_limit}, 327
328 GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
329 "timeout",
330 "DELAY",
331 gettext_noop ("automatically terminate search after DELAY"),
332 &timeout),
333
334
335 GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
336
337 GNUNET_GETOPT_OPTION_SET_UINT ('N',
338 "results",
339 "VALUE",
340 gettext_noop ("automatically terminate search "
341 "after VALUE results are found"),
342 &results_limit),
343
328 GNUNET_GETOPT_OPTION_END 344 GNUNET_GETOPT_OPTION_END
329 }; 345 };
330 346