- static const struct GNUNET_GETOPT_CommandLineOption options[] =
- {
- { 'a', "all", NULL,
- gettext_noop ("print information for all peers (instead of only connected peers )"),
- 0, &GNUNET_GETOPT_set_one, &iterate_all },
- { 'b', "benchmark", NULL,
- gettext_noop ("measure how fast we are receiving data from all peers (until CTRL-C)"),
- 0, &GNUNET_GETOPT_set_one, &benchmark_receive },
- { 'C', "connect",
- NULL, gettext_noop ("connect to a peer"), 0,
- &GNUNET_GETOPT_set_one, &try_connect },
- { 'D', "disconnect",
- NULL, gettext_noop ("disconnect to a peer"), 0,
- &GNUNET_GETOPT_set_one, &try_disconnect },
- { 'd', "validation", NULL,
- gettext_noop ("print information for all pending validations "),
- 0, &GNUNET_GETOPT_set_one, &iterate_validation },
- { 'f', "monitorvalidation", NULL,
- gettext_noop ("print information for all pending validations continously"),
- 0, &GNUNET_GETOPT_set_one, &monitor_validation },
- { 'i', "information", NULL,
- gettext_noop ("provide information about all current connections (once)"),
- 0, &GNUNET_GETOPT_set_one, &iterate_connections },
- { 'm', "monitor", NULL,
- gettext_noop ("provide information about all current connections (continuously)"),
- 0, &GNUNET_GETOPT_set_one, &monitor_connections },
- { 'e', "events", NULL,
- gettext_noop ("provide information about all connects and disconnect events (continuously)"),
- 0, &GNUNET_GETOPT_set_one, &monitor_connects }, { 'n', "numeric",
- NULL, gettext_noop ("do not resolve hostnames"), 0,
- &GNUNET_GETOPT_set_one, &numeric }, { 'p', "peer", "PEER",
- gettext_noop ("peer identity"), 1, &GNUNET_GETOPT_set_string,
- &cpid }, { 's', "send", NULL, gettext_noop
- ("send data for benchmarking to the other peer (until CTRL-C)"), 0,
- &GNUNET_GETOPT_set_one, &benchmark_send },
- { 't', "test", NULL,
- gettext_noop ("test transport configuration (involves external server)"),
- 0, &GNUNET_GETOPT_set_one, &test_configuration },
- GNUNET_GETOPT_OPTION_VERBOSE (&verbosity),
- GNUNET_GETOPT_OPTION_END };
+ struct GNUNET_GETOPT_CommandLineOption options[] = {
+ GNUNET_GETOPT_option_flag ('a',
+ "all",
+ gettext_noop ("print information for all peers (instead of only connected peers)"),
+ &iterate_all),
+ GNUNET_GETOPT_option_flag ('b',
+ "benchmark",
+ gettext_noop ("measure how fast we are receiving data from all peers (until CTRL-C)"),
+ &benchmark_receive),
+ GNUNET_GETOPT_option_flag ('D',
+ "disconnect",
+ gettext_noop ("disconnect from a peer"),
+ &do_disconnect),
+ GNUNET_GETOPT_option_flag ('i',
+ "information",
+ gettext_noop ("provide information about all current connections (once)"),
+ &iterate_connections),
+ GNUNET_GETOPT_option_flag ('m',
+ "monitor",
+ gettext_noop ("provide information about all current connections (continuously)"),
+ &monitor_connections),
+ GNUNET_GETOPT_option_flag ('e',
+ "events",
+ gettext_noop ("provide information about all connects and disconnect events (continuously)"),
+ &monitor_connects),
+ GNUNET_GETOPT_option_flag ('n',
+ "numeric",
+ gettext_noop ("do not resolve hostnames"),
+ &numeric),
+ GNUNET_GETOPT_option_base32_auto ('p',
+ "peer",
+ "PEER",
+ gettext_noop ("peer identity"),
+ &pid),
+ GNUNET_GETOPT_option_flag ('P',
+ "plugins",
+ gettext_noop ("monitor plugin sessions"),
+ &monitor_plugins),
+ GNUNET_GETOPT_option_flag ('s',
+ "send",
+ gettext_noop
+ ("send data for benchmarking to the other peer (until CTRL-C)"),
+ &benchmark_send),
+ GNUNET_GETOPT_option_verbose (&verbosity),
+ GNUNET_GETOPT_OPTION_END
+ };