aboutsummaryrefslogtreecommitdiff
path: root/src/nse/gnunet-nse-profiler.c
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-15 16:21:06 +0100
committerMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-15 16:21:06 +0100
commite6b3fec9e4a573e1f0c594a3c2f345357c0c12b8 (patch)
tree2fecdbebccc0970ff483ed28ea327f056f87423b /src/nse/gnunet-nse-profiler.c
parent5d6ed5fbda01a324d8d9b800928339d4a90343c3 (diff)
downloadgnunet-e6b3fec9e4a573e1f0c594a3c2f345357c0c12b8.tar.gz
gnunet-e6b3fec9e4a573e1f0c594a3c2f345357c0c12b8.zip
getopt API porting.
Diffstat (limited to 'src/nse/gnunet-nse-profiler.c')
-rw-r--r--src/nse/gnunet-nse-profiler.c65
1 files changed, 42 insertions, 23 deletions
diff --git a/src/nse/gnunet-nse-profiler.c b/src/nse/gnunet-nse-profiler.c
index 48afd9298..ea28bf610 100644
--- a/src/nse/gnunet-nse-profiler.c
+++ b/src/nse/gnunet-nse-profiler.c
@@ -129,7 +129,7 @@ static int ok;
129/** 129/**
130 * Be verbose (configuration option) 130 * Be verbose (configuration option)
131 */ 131 */
132static int verbose; 132static unsigned int verbose;
133 133
134/** 134/**
135 * Name of the file with the hosts to run the test over (configuration option) 135 * Name of the file with the hosts to run the test over (configuration option)
@@ -835,28 +835,47 @@ run (void *cls, char *const *args, const char *cfgfile,
835int 835int
836main (int argc, char *const *argv) 836main (int argc, char *const *argv)
837{ 837{
838 static struct GNUNET_GETOPT_CommandLineOption options[] = { 838 struct GNUNET_GETOPT_CommandLineOption options[] = {
839 {'C', "connections", "COUNT", 839 GNUNET_GETOPT_OPTION_SET_UINT ('C',
840 gettext_noop ("limit to the number of connections to NSE services, 0 for none"), 840 "connections",
841 1, &GNUNET_GETOPT_set_uint, &connection_limit}, 841 "COUNT",
842 {'d', "details", "FILENAME", 842 gettext_noop ("limit to the number of connections to NSE services, 0 for none"),
843 gettext_noop ("name of the file for writing connection information and statistics"), 843 &connection_limit),
844 1, &GNUNET_GETOPT_set_string, &data_filename}, 844 GNUNET_GETOPT_OPTION_STRING ('d',
845 {'H', "hosts", "FILENAME", 845 "details",
846 gettext_noop ("name of the file with the login information for the testbed"), 846 "FILENAME",
847 1, &GNUNET_GETOPT_set_string, &hosts_file}, 847 gettext_noop ("name of the file for writing connection information and statistics"),
848 {'o', "output", "FILENAME", 848 &data_filename),
849 gettext_noop ("name of the file for writing the main results"), 849
850 1, &GNUNET_GETOPT_set_string, &output_filename}, 850 GNUNET_GETOPT_OPTION_STRING ('H',
851 {'p', "peers", "NETWORKSIZESPEC", 851 "hosts",
852 gettext_noop ("Number of peers to run in each round, separated by commas"), 852 "FILENAME",
853 1, &GNUNET_GETOPT_set_string, &num_peer_spec}, 853 gettext_noop ("name of the file with the login information for the testbed"),
854 {'V', "verbose", NULL, 854 &hosts_file),
855 gettext_noop ("be verbose (print progress information)"), 855
856 0, &GNUNET_GETOPT_increment_value, &verbose}, 856 GNUNET_GETOPT_OPTION_STRING ('o',
857 {'w', "wait", "DELAY", 857 "output",
858 gettext_noop ("delay between rounds"), 858 "FILENAME",
859 1, &GNUNET_GETOPT_set_relative_time, &wait_time}, 859 gettext_noop ("name of the file for writing the main results"),
860 &output_filename),
861
862
863 GNUNET_GETOPT_OPTION_STRING ('p',
864 "peers",
865 "NETWORKSIZESPEC",
866 gettext_noop ("Number of peers to run in each round, separated by commas"),
867 &num_peer_spec),
868
869 GNUNET_GETOPT_OPTION_INCREMENT_VALUE ('V',
870 "verbose",
871 gettext_noop ("be verbose (print progress information)"),
872 &verbose),
873
874 GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('w',
875 "wait",
876 "DELAY",
877 gettext_noop ("delay between rounds"),
878 &wait_time),
860 GNUNET_GETOPT_OPTION_END 879 GNUNET_GETOPT_OPTION_END
861 }; 880 };
862 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) 881 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))