diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-03-15 11:40:24 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-03-15 11:40:47 +0100 |
commit | 796d0e5aa54ed99dd00fae26982a0e99f9d99f8e (patch) | |
tree | 45b58e703374b2227ab606b2758467c3c4fa79c4 /src/testing/gnunet-testing.c | |
parent | f51f3438fa3451ee758152e53fe823780fb1e261 (diff) | |
download | gnunet-796d0e5aa54ed99dd00fae26982a0e99f9d99f8e.tar.gz gnunet-796d0e5aa54ed99dd00fae26982a0e99f9d99f8e.zip |
Porting 'nat'.
Diffstat (limited to 'src/testing/gnunet-testing.c')
-rw-r--r-- | src/testing/gnunet-testing.c | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/src/testing/gnunet-testing.c b/src/testing/gnunet-testing.c index 07f1560cb..686b38192 100644 --- a/src/testing/gnunet-testing.c +++ b/src/testing/gnunet-testing.c | |||
@@ -348,17 +348,35 @@ run_no_scheduler (void *cls, char *const *args, const char *cfgfile, | |||
348 | int | 348 | int |
349 | main (int argc, char *const *argv) | 349 | main (int argc, char *const *argv) |
350 | { | 350 | { |
351 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 351 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
352 | {'C', "cfg", NULL, gettext_noop ("create unique configuration files"), | 352 | GNUNET_GETOPT_OPTION_SET_ONE ('C', |
353 | GNUNET_NO, &GNUNET_GETOPT_set_one, &create_cfg}, | 353 | "cfg", |
354 | {'k', "key", "FILENAME", gettext_noop ("extract hostkey file from pre-computed hostkey list"), | 354 | gettext_noop ("create unique configuration files"), |
355 | GNUNET_YES, &GNUNET_GETOPT_set_string, &create_hostkey}, | 355 | &create_cfg), |
356 | {'n', "number", "NUMBER", gettext_noop ("number of unique configuration files to create, or number of the hostkey to extract"), | 356 | GNUNET_GETOPT_OPTION_STRING ('k', |
357 | GNUNET_YES, &GNUNET_GETOPT_set_uint, &create_no}, | 357 | "key", |
358 | {'t', "template", "FILENAME", gettext_noop ("configuration template"), | 358 | "FILENAME", |
359 | GNUNET_YES, &GNUNET_GETOPT_set_string, &create_cfg_template}, | 359 | gettext_noop ("extract hostkey file from pre-computed hostkey list"), |
360 | {'r', "run", "SERVICE", gettext_noop ("run the given service, wait on stdin for 'r' (restart) or 'q' (quit)"), | 360 | &create_hostkey), |
361 | GNUNET_YES, &GNUNET_GETOPT_set_string, &run_service_name}, | 361 | |
362 | GNUNET_GETOPT_OPTION_SET_UINT ('n', | ||
363 | "number", | ||
364 | "NUMBER", | ||
365 | gettext_noop ("number of unique configuration files to create, or number of the hostkey to extract"), | ||
366 | &create_no), | ||
367 | |||
368 | |||
369 | GNUNET_GETOPT_OPTION_STRING ('t', | ||
370 | "template", | ||
371 | "FILENAME", | ||
372 | gettext_noop ("configuration template"), | ||
373 | &create_cfg_template), | ||
374 | |||
375 | GNUNET_GETOPT_OPTION_STRING ('r', | ||
376 | "run", | ||
377 | "SERVICE", | ||
378 | gettext_noop ("run the given service, wait on stdin for 'r' (restart) or 'q' (quit)"), | ||
379 | &run_service_name), | ||
362 | GNUNET_GETOPT_OPTION_END | 380 | GNUNET_GETOPT_OPTION_END |
363 | }; | 381 | }; |
364 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 382 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |