diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cadet/gnunet-cadet.c | 72 | ||||
-rw-r--r-- | src/dht/gnunet-dht-get.c | 5 | ||||
-rw-r--r-- | src/dns/gnunet-dns-monitor.c | 21 | ||||
-rw-r--r-- | src/dns/gnunet-dns-redirector.c | 22 | ||||
-rw-r--r-- | src/identity/gnunet-identity.c | 54 | ||||
-rw-r--r-- | src/namecache/gnunet-namecache.c | 20 | ||||
-rw-r--r-- | src/namestore/gnunet-namestore.c | 125 | ||||
-rw-r--r-- | src/regex/gnunet-regex-profiler.c | 49 | ||||
-rw-r--r-- | src/set/gnunet-set-profiler.c | 86 |
9 files changed, 294 insertions, 160 deletions
diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c index 1556f7d86..57eeac735 100644 --- a/src/cadet/gnunet-cadet.c +++ b/src/cadet/gnunet-cadet.c | |||
@@ -920,32 +920,54 @@ main (int argc, | |||
920 | { | 920 | { |
921 | int res; | 921 | int res; |
922 | const char helpstr[] = "Create tunnels and retrieve info about CADET's status."; | 922 | const char helpstr[] = "Create tunnels and retrieve info about CADET's status."; |
923 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 923 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
924 | /* I would use the terminology 'circuit' here... --lynX */ | 924 | /* I would use the terminology 'circuit' here... --lynX */ |
925 | {'C', "connection", "CONNECTION_ID", | 925 | GNUNET_GETOPT_OPTION_STRING ('C', |
926 | gettext_noop ("Provide information about a particular connection"), | 926 | "connection", |
927 | GNUNET_YES, &GNUNET_GETOPT_set_string, &conn_id}, | 927 | "CONNECTION_ID", |
928 | {'e', "echo", NULL, | 928 | gettext_noop ("Provide information about a particular connection"), |
929 | gettext_noop ("Activate echo mode"), | 929 | &conn_id), |
930 | GNUNET_NO, &GNUNET_GETOPT_set_one, &echo}, | 930 | |
931 | {'d', "dump", NULL, | 931 | GNUNET_GETOPT_OPTION_SET_ONE ('e', |
932 | gettext_noop ("Dump debug information to STDERR"), | 932 | "echo", |
933 | GNUNET_NO, &GNUNET_GETOPT_set_one, &dump}, | 933 | gettext_noop ("Activate echo mode"), |
934 | {'o', "open-port", "SHARED_SECRET", | 934 | &echo), |
935 | gettext_noop ("Listen for connections using a shared secret among sender and recipient"), | 935 | |
936 | GNUNET_YES, &GNUNET_GETOPT_set_string, &listen_port}, | 936 | GNUNET_GETOPT_OPTION_SET_ONE ('d', |
937 | {'p', "peer", "PEER_ID", | 937 | "dump", |
938 | gettext_noop ("Provide information about a patricular peer"), | 938 | gettext_noop ("Dump debug information to STDERR"), |
939 | GNUNET_YES, &GNUNET_GETOPT_set_string, &peer_id}, | 939 | &dump), |
940 | {'P', "peers", NULL, | 940 | |
941 | gettext_noop ("Provide information about all peers"), | 941 | GNUNET_GETOPT_OPTION_STRING ('o', |
942 | GNUNET_NO, &GNUNET_GETOPT_set_one, &request_peers}, | 942 | "open-port", |
943 | {'t', "tunnel", "TUNNEL_ID", | 943 | "SHARED_SECRET", |
944 | gettext_noop ("Provide information about a particular tunnel"), | 944 | gettext_noop ("Listen for connections using a shared secret among sender and recipient"), |
945 | GNUNET_YES, &GNUNET_GETOPT_set_string, &tunnel_id}, | 945 | &listen_port), |
946 | {'T', "tunnels", NULL, | 946 | |
947 | gettext_noop ("Provide information about all tunnels"), | 947 | |
948 | GNUNET_NO, &GNUNET_GETOPT_set_one, &request_tunnels}, | 948 | GNUNET_GETOPT_OPTION_STRING ('p', |
949 | "peer", | ||
950 | "PEER_ID", | ||
951 | gettext_noop ("Provide information about a patricular peer"), | ||
952 | &peer_id), | ||
953 | |||
954 | |||
955 | GNUNET_GETOPT_OPTION_SET_ONE ('P', | ||
956 | "peers", | ||
957 | gettext_noop ("Provide information about all peers"), | ||
958 | &request_peers), | ||
959 | |||
960 | GNUNET_GETOPT_OPTION_STRING ('t', | ||
961 | "tunnel", | ||
962 | "TUNNEL_ID", | ||
963 | gettext_noop ("Provide information about a particular tunnel"), | ||
964 | &tunnel_id), | ||
965 | |||
966 | |||
967 | GNUNET_GETOPT_OPTION_SET_ONE ('T', | ||
968 | "tunnels", | ||
969 | gettext_noop ("Provide information about all tunnels"), | ||
970 | &request_tunnels), | ||
949 | 971 | ||
950 | GNUNET_GETOPT_OPTION_END | 972 | GNUNET_GETOPT_OPTION_END |
951 | }; | 973 | }; |
diff --git a/src/dht/gnunet-dht-get.c b/src/dht/gnunet-dht-get.c index 812e62b17..67f0ce76d 100644 --- a/src/dht/gnunet-dht-get.c +++ b/src/dht/gnunet-dht-get.c | |||
@@ -269,10 +269,7 @@ main (int argc, char *const *argv) | |||
269 | gettext_noop ("use DHT's demultiplex everywhere option"), | 269 | gettext_noop ("use DHT's demultiplex everywhere option"), |
270 | &demultixplex_everywhere), | 270 | &demultixplex_everywhere), |
271 | 271 | ||
272 | GNUNET_GETOPT_OPTION_SET_ONE ('V', | 272 | GNUNET_GETOPT_OPTION_VERBOSE (&verbose), |
273 | "verbose", | ||
274 | gettext_noop ("be verbose (print progress information)"), | ||
275 | &verbose), | ||
276 | GNUNET_GETOPT_OPTION_END | 273 | GNUNET_GETOPT_OPTION_END |
277 | }; | 274 | }; |
278 | 275 | ||
diff --git a/src/dns/gnunet-dns-monitor.c b/src/dns/gnunet-dns-monitor.c index 5e6f90555..2436931fb 100644 --- a/src/dns/gnunet-dns-monitor.c +++ b/src/dns/gnunet-dns-monitor.c | |||
@@ -52,7 +52,7 @@ static int ret; | |||
52 | /** | 52 | /** |
53 | * Selected level of verbosity. | 53 | * Selected level of verbosity. |
54 | */ | 54 | */ |
55 | static int verbosity; | 55 | static unsigned int verbosity; |
56 | 56 | ||
57 | 57 | ||
58 | /** | 58 | /** |
@@ -346,13 +346,18 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
346 | int | 346 | int |
347 | main (int argc, char *const *argv) | 347 | main (int argc, char *const *argv) |
348 | { | 348 | { |
349 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 349 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
350 | {'i', "inbound-only", NULL, | 350 | |
351 | gettext_noop ("only monitor DNS queries"), | 351 | GNUNET_GETOPT_OPTION_SET_ONE ('i', |
352 | 0, &GNUNET_GETOPT_set_one, &inbound_only}, | 352 | "inbound-only", |
353 | {'o', "outbound-only", NULL, | 353 | gettext_noop ("only monitor DNS queries"), |
354 | gettext_noop ("only monitor DNS replies"), | 354 | &inbound_only), |
355 | 0, &GNUNET_GETOPT_set_one, &outbound_only}, | 355 | |
356 | GNUNET_GETOPT_OPTION_SET_ONE ('o', | ||
357 | "outbound-only", | ||
358 | gettext_noop ("only monitor DNS queries"), | ||
359 | &outbound_only), | ||
360 | |||
356 | GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), | 361 | GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), |
357 | GNUNET_GETOPT_OPTION_END | 362 | GNUNET_GETOPT_OPTION_END |
358 | }; | 363 | }; |
diff --git a/src/dns/gnunet-dns-redirector.c b/src/dns/gnunet-dns-redirector.c index 89929815a..0469af732 100644 --- a/src/dns/gnunet-dns-redirector.c +++ b/src/dns/gnunet-dns-redirector.c | |||
@@ -52,7 +52,7 @@ static int ret; | |||
52 | /** | 52 | /** |
53 | * Selected level of verbosity. | 53 | * Selected level of verbosity. |
54 | */ | 54 | */ |
55 | static int verbosity; | 55 | static unsigned int verbosity; |
56 | 56 | ||
57 | 57 | ||
58 | /** | 58 | /** |
@@ -230,13 +230,19 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
230 | int | 230 | int |
231 | main (int argc, char *const *argv) | 231 | main (int argc, char *const *argv) |
232 | { | 232 | { |
233 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 233 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
234 | {'4', "ipv4", "IPV4", | 234 | GNUNET_GETOPT_OPTION_STRING ('4', |
235 | gettext_noop ("set A records"), | 235 | "ipv4", |
236 | 1, &GNUNET_GETOPT_set_string, &n4}, | 236 | "IPV4", |
237 | {'6', "ipv4", "IPV6", | 237 | gettext_noop ("set A records"), |
238 | gettext_noop ("set AAAA records"), | 238 | &n4), |
239 | 1, &GNUNET_GETOPT_set_string, &n6}, | 239 | |
240 | GNUNET_GETOPT_OPTION_STRING ('6', | ||
241 | "ipv4", | ||
242 | "IPV6", | ||
243 | gettext_noop ("set AAAA records"), | ||
244 | &n6), | ||
245 | |||
240 | GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), | 246 | GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), |
241 | GNUNET_GETOPT_OPTION_END | 247 | GNUNET_GETOPT_OPTION_END |
242 | }; | 248 | }; |
diff --git a/src/identity/gnunet-identity.c b/src/identity/gnunet-identity.c index 8c8485249..5c457ef5d 100644 --- a/src/identity/gnunet-identity.c +++ b/src/identity/gnunet-identity.c | |||
@@ -349,25 +349,41 @@ run (void *cls, | |||
349 | int | 349 | int |
350 | main (int argc, char *const *argv) | 350 | main (int argc, char *const *argv) |
351 | { | 351 | { |
352 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 352 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
353 | {'C', "create", "NAME", | 353 | GNUNET_GETOPT_OPTION_STRING ('C', |
354 | gettext_noop ("create ego NAME"), | 354 | "create", |
355 | 1, &GNUNET_GETOPT_set_string, &create_ego}, | 355 | "NAME", |
356 | {'D', "delete", "NAME", | 356 | gettext_noop ("create ego NAME"), |
357 | gettext_noop ("delete ego NAME "), | 357 | &create_ego), |
358 | 1, &GNUNET_GETOPT_set_string, &delete_ego}, | 358 | |
359 | {'d', "display", NULL, | 359 | GNUNET_GETOPT_OPTION_STRING ('D', |
360 | gettext_noop ("display all egos"), | 360 | "delete", |
361 | 0, &GNUNET_GETOPT_set_one, &list}, | 361 | "NAME", |
362 | {'e', "ego", "NAME", | 362 | gettext_noop ("delete ego NAME "), |
363 | gettext_noop ("set default identity to EGO for a subsystem SUBSYSTEM (use together with -s)"), | 363 | &delete_ego), |
364 | 1, &GNUNET_GETOPT_set_string, &set_ego}, | 364 | |
365 | {'m', "monitor", NULL, | 365 | GNUNET_GETOPT_OPTION_SET_ONE ('d', |
366 | gettext_noop ("run in monitor mode egos"), | 366 | "display", |
367 | 0, &GNUNET_GETOPT_set_one, &monitor}, | 367 | gettext_noop ("display all egos"), |
368 | {'s', "set", "SUBSYSTEM", | 368 | &list), |
369 | gettext_noop ("set default identity to EGO for a subsystem SUBSYSTEM (use together with -e)"), | 369 | |
370 | 1, &GNUNET_GETOPT_set_string, &set_subsystem}, | 370 | GNUNET_GETOPT_OPTION_STRING ('e', |
371 | "ego", | ||
372 | "NAME", | ||
373 | gettext_noop ("set default identity to EGO for a subsystem SUBSYSTEM (use together with -s)"), | ||
374 | &set_ego), | ||
375 | |||
376 | GNUNET_GETOPT_OPTION_SET_ONE ('m', | ||
377 | "monitor", | ||
378 | gettext_noop ("run in monitor mode egos"), | ||
379 | &monitor), | ||
380 | |||
381 | GNUNET_GETOPT_OPTION_STRING ('s', | ||
382 | "set", | ||
383 | "SUBSYSTEM", | ||
384 | gettext_noop ("set default identity to EGO for a subsystem SUBSYSTEM (use together with -e)"), | ||
385 | &set_subsystem), | ||
386 | |||
371 | GNUNET_GETOPT_OPTION_END | 387 | GNUNET_GETOPT_OPTION_END |
372 | }; | 388 | }; |
373 | int res; | 389 | int res; |
diff --git a/src/namecache/gnunet-namecache.c b/src/namecache/gnunet-namecache.c index 490197b1e..2410c9b3c 100644 --- a/src/namecache/gnunet-namecache.c +++ b/src/namecache/gnunet-namecache.c | |||
@@ -225,13 +225,19 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
225 | int | 225 | int |
226 | main (int argc, char *const *argv) | 226 | main (int argc, char *const *argv) |
227 | { | 227 | { |
228 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 228 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
229 | {'n', "name", "NAME", | 229 | GNUNET_GETOPT_OPTION_STRING ('n', |
230 | gettext_noop ("name of the record to add/delete/display"), 1, | 230 | "name", |
231 | &GNUNET_GETOPT_set_string, &name}, | 231 | "NAME", |
232 | {'z', "zone", "PKEY", | 232 | gettext_noop ("name of the record to add/delete/display"), |
233 | gettext_noop ("spezifies the public key of the zone to look in"), 1, | 233 | &name), |
234 | &GNUNET_GETOPT_set_string, &pkey}, | 234 | |
235 | GNUNET_GETOPT_OPTION_STRING ('z', | ||
236 | "zone", | ||
237 | "PKEY", | ||
238 | gettext_noop ("spezifies the public key of the zone to look in"), | ||
239 | &pkey), | ||
240 | |||
235 | GNUNET_GETOPT_OPTION_END | 241 | GNUNET_GETOPT_OPTION_END |
236 | }; | 242 | }; |
237 | 243 | ||
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 457e77022..2ce3741f8 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -1130,49 +1130,88 @@ main (int argc, | |||
1130 | is_public = -1; | 1130 | is_public = -1; |
1131 | is_shadow = -1; | 1131 | is_shadow = -1; |
1132 | 1132 | ||
1133 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 1133 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
1134 | {'a', "add", NULL, | 1134 | |
1135 | gettext_noop ("add record"), 0, | 1135 | GNUNET_GETOPT_OPTION_SET_ONE ('a', |
1136 | &GNUNET_GETOPT_set_one, &add}, | 1136 | "add", |
1137 | {'d', "delete", NULL, | 1137 | gettext_noop ("add record"), |
1138 | gettext_noop ("delete record"), 0, | 1138 | &add), |
1139 | &GNUNET_GETOPT_set_one, &del}, | 1139 | |
1140 | {'D', "display", NULL, | 1140 | GNUNET_GETOPT_OPTION_SET_ONE ('d', |
1141 | gettext_noop ("display records"), 0, | 1141 | "delete", |
1142 | &GNUNET_GETOPT_set_one, &list}, | 1142 | gettext_noop ("delete record"), |
1143 | {'e', "expiration", "TIME", | 1143 | &del), |
1144 | gettext_noop ("expiration time for record to use (for adding only), \"never\" is possible"), 1, | 1144 | |
1145 | &GNUNET_GETOPT_set_string, &expirationstring}, | 1145 | GNUNET_GETOPT_OPTION_SET_ONE ('D', |
1146 | {'i', "nick", "NICKNAME", | 1146 | "display", |
1147 | gettext_noop ("set the desired nick name for the zone"), 1, | 1147 | gettext_noop ("display records"), |
1148 | &GNUNET_GETOPT_set_string, &nickstring}, | 1148 | &list), |
1149 | {'m', "monitor", NULL, | 1149 | |
1150 | gettext_noop ("monitor changes in the namestore"), 0, | 1150 | GNUNET_GETOPT_OPTION_STRING ('e', |
1151 | &GNUNET_GETOPT_set_one, &monitor}, | 1151 | "expiration", |
1152 | {'n', "name", "NAME", | 1152 | "TIME", |
1153 | gettext_noop ("name of the record to add/delete/display"), 1, | 1153 | gettext_noop ("expiration time for record to use (for adding only), \"never\" is possible"), |
1154 | &GNUNET_GETOPT_set_string, &name}, | 1154 | &expirationstring), |
1155 | {'r', "reverse", "PKEY", | 1155 | |
1156 | gettext_noop ("determine our name for the given PKEY"), 1, | 1156 | GNUNET_GETOPT_OPTION_STRING ('i', |
1157 | &GNUNET_GETOPT_set_string, &reverse_pkey}, | 1157 | "nick", |
1158 | {'t', "type", "TYPE", | 1158 | "NICKNAME", |
1159 | gettext_noop ("type of the record to add/delete/display"), 1, | 1159 | gettext_noop ("set the desired nick name for the zone"), |
1160 | &GNUNET_GETOPT_set_string, &typestring}, | 1160 | &nickstring), |
1161 | {'u', "uri", "URI", | 1161 | |
1162 | gettext_noop ("URI to import into our zone"), 1, | 1162 | GNUNET_GETOPT_OPTION_SET_ONE ('m', |
1163 | &GNUNET_GETOPT_set_string, &uri}, | 1163 | "monitor", |
1164 | {'V', "value", "VALUE", | 1164 | gettext_noop ("monitor changes in the namestore"), |
1165 | gettext_noop ("value of the record to add/delete"), 1, | 1165 | &monitor), |
1166 | &GNUNET_GETOPT_set_string, &value}, | 1166 | |
1167 | {'p', "public", NULL, | 1167 | GNUNET_GETOPT_OPTION_STRING ('n', |
1168 | gettext_noop ("create or list public record"), 0, | 1168 | "name", |
1169 | &GNUNET_GETOPT_set_one, &is_public}, | 1169 | "NAME", |
1170 | {'s', "shadow", NULL, | 1170 | gettext_noop ("name of the record to add/delete/display"), |
1171 | gettext_noop ("create shadow record (only valid if all other records of the same type have expired"), 0, | 1171 | &name), |
1172 | &GNUNET_GETOPT_set_one, &is_shadow}, | 1172 | |
1173 | {'z', "zone", "EGO", | 1173 | GNUNET_GETOPT_OPTION_STRING ('r', |
1174 | gettext_noop ("name of the ego controlling the zone"), 1, | 1174 | "reverse", |
1175 | &GNUNET_GETOPT_set_string, &ego_name}, | 1175 | "PKEY", |
1176 | gettext_noop ("determine our name for the given PKEY"), | ||
1177 | &reverse_pkey), | ||
1178 | |||
1179 | |||
1180 | |||
1181 | GNUNET_GETOPT_OPTION_STRING ('t', | ||
1182 | "type", | ||
1183 | "TYPE", | ||
1184 | gettext_noop ("type of the record to add/delete/display"), | ||
1185 | &typestring), | ||
1186 | |||
1187 | GNUNET_GETOPT_OPTION_STRING ('u', | ||
1188 | "uri", | ||
1189 | "URI", | ||
1190 | gettext_noop ("URI to import into our zone"), | ||
1191 | &uri), | ||
1192 | |||
1193 | GNUNET_GETOPT_OPTION_STRING ('V', | ||
1194 | "value", | ||
1195 | "VALUE", | ||
1196 | gettext_noop ("value of the record to add/delete"), | ||
1197 | &value), | ||
1198 | |||
1199 | GNUNET_GETOPT_OPTION_SET_ONE ('p', | ||
1200 | "public", | ||
1201 | gettext_noop ("create or list public record"), | ||
1202 | &is_public), | ||
1203 | |||
1204 | GNUNET_GETOPT_OPTION_SET_ONE ('s', | ||
1205 | "shadow", | ||
1206 | gettext_noop ("create shadow record (only valid if all other records of the same type have expired"), | ||
1207 | &is_shadow), | ||
1208 | |||
1209 | GNUNET_GETOPT_OPTION_STRING ('z', | ||
1210 | "zone", | ||
1211 | "EGO", | ||
1212 | gettext_noop ("name of the ego controlling the zone"), | ||
1213 | &ego_name), | ||
1214 | |||
1176 | GNUNET_GETOPT_OPTION_END | 1215 | GNUNET_GETOPT_OPTION_END |
1177 | }; | 1216 | }; |
1178 | 1217 | ||
diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c index dfbcd388a..71f3580f8 100644 --- a/src/regex/gnunet-regex-profiler.c +++ b/src/regex/gnunet-regex-profiler.c | |||
@@ -1477,22 +1477,39 @@ run (void *cls, | |||
1477 | int | 1477 | int |
1478 | main (int argc, char *const *argv) | 1478 | main (int argc, char *const *argv) |
1479 | { | 1479 | { |
1480 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 1480 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
1481 | {'o', "output-file", "FILENAME", | 1481 | |
1482 | gettext_noop ("name of the file for writing statistics"), | 1482 | GNUNET_GETOPT_OPTION_FILENAME ('o', |
1483 | GNUNET_YES, &GNUNET_GETOPT_set_string, &data_filename}, | 1483 | "output-file", |
1484 | {'t', "matching-timeout", "TIMEOUT", | 1484 | "FILENAME", |
1485 | gettext_noop ("wait TIMEOUT before ending the experiment"), | 1485 | gettext_noop ("name of the file for writing statistics"), |
1486 | GNUNET_YES, &GNUNET_GETOPT_set_relative_time, &search_timeout_time}, | 1486 | &data_filename), |
1487 | {'p', "policy-dir", "DIRECTORY", | 1487 | |
1488 | gettext_noop ("directory with policy files"), | 1488 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', |
1489 | GNUNET_YES, &GNUNET_GETOPT_set_filename, &policy_dir}, | 1489 | "matching-timeout", |
1490 | {'s', "strings-file", "FILENAME", | 1490 | "TIMEOUT", |
1491 | gettext_noop ("name of file with input strings"), | 1491 | gettext_noop ("wait TIMEOUT before ending the experiment"), |
1492 | GNUNET_YES, &GNUNET_GETOPT_set_filename, &strings_file}, | 1492 | &search_timeout_time), |
1493 | {'H', "hosts-file", "FILENAME", | 1493 | |
1494 | gettext_noop ("name of file with hosts' names"), | 1494 | GNUNET_GETOPT_OPTION_FILENAME ('p', |
1495 | GNUNET_YES, &GNUNET_GETOPT_set_filename, &hosts_file}, | 1495 | "policy-dir", |
1496 | "DIRECTORY", | ||
1497 | gettext_noop ("directory with policy files"), | ||
1498 | &policy_dir), | ||
1499 | |||
1500 | |||
1501 | GNUNET_GETOPT_OPTION_FILENAME ('s', | ||
1502 | "strings-file", | ||
1503 | "FILENAME", | ||
1504 | gettext_noop ("name of file with input strings"), | ||
1505 | &strings_file), | ||
1506 | |||
1507 | GNUNET_GETOPT_OPTION_FILENAME ('H', | ||
1508 | "hosts-file", | ||
1509 | "FILENAME", | ||
1510 | gettext_noop ("name of file with hosts' names"), | ||
1511 | &hosts_file), | ||
1512 | |||
1496 | GNUNET_GETOPT_OPTION_END | 1513 | GNUNET_GETOPT_OPTION_END |
1497 | }; | 1514 | }; |
1498 | int ret; | 1515 | int ret; |
diff --git a/src/set/gnunet-set-profiler.c b/src/set/gnunet-set-profiler.c index 8404b191c..349bce6ea 100644 --- a/src/set/gnunet-set-profiler.c +++ b/src/set/gnunet-set-profiler.c | |||
@@ -59,8 +59,8 @@ static struct GNUNET_PeerIdentity local_peer; | |||
59 | static struct GNUNET_SET_ListenHandle *set_listener; | 59 | static struct GNUNET_SET_ListenHandle *set_listener; |
60 | 60 | ||
61 | static int byzantine; | 61 | static int byzantine; |
62 | static int force_delta; | 62 | static unsigned int force_delta; |
63 | static int force_full; | 63 | static unsigned int force_full; |
64 | static unsigned int element_size = 32; | 64 | static unsigned int element_size = 32; |
65 | 65 | ||
66 | /** | 66 | /** |
@@ -426,34 +426,60 @@ pre_run (void *cls, char *const *args, const char *cfgfile, | |||
426 | int | 426 | int |
427 | main (int argc, char **argv) | 427 | main (int argc, char **argv) |
428 | { | 428 | { |
429 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 429 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
430 | { 'A', "num-first", NULL, | 430 | GNUNET_GETOPT_OPTION_SET_UINT ('A', |
431 | gettext_noop ("number of values"), | 431 | "num-first", |
432 | GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_a }, | 432 | NULL, |
433 | { 'B', "num-second", NULL, | 433 | gettext_noop ("number of values"), |
434 | gettext_noop ("number of values"), | 434 | &num_a), |
435 | GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_b }, | 435 | |
436 | { 'b', "byzantine", NULL, | 436 | GNUNET_GETOPT_OPTION_SET_UINT ('B', |
437 | gettext_noop ("use byzantine mode"), | 437 | "num-second", |
438 | GNUNET_NO, &GNUNET_GETOPT_set_one, &byzantine }, | 438 | NULL, |
439 | { 'f', "force-full", NULL, | 439 | gettext_noop ("number of values"), |
440 | gettext_noop ("force sending full set"), | 440 | &num_b), |
441 | GNUNET_NO, &GNUNET_GETOPT_set_uint, &force_full }, | 441 | |
442 | { 'd', "force-delta", NULL, | 442 | GNUNET_GETOPT_OPTION_SET_ONE ('b', |
443 | gettext_noop ("number delta operation"), | 443 | "byzantine", |
444 | GNUNET_NO, &GNUNET_GETOPT_set_uint, &force_delta }, | 444 | gettext_noop ("use byzantine mode"), |
445 | { 'C', "num-common", NULL, | 445 | &byzantine), |
446 | gettext_noop ("number of values"), | 446 | |
447 | GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_c }, | 447 | GNUNET_GETOPT_OPTION_SET_UINT ('f', |
448 | { 'x', "operation", NULL, | 448 | "force-full", |
449 | gettext_noop ("operation to execute"), | 449 | NULL, |
450 | GNUNET_YES, &GNUNET_GETOPT_set_string, &op_str }, | 450 | gettext_noop ("force sending full set"), |
451 | { 'w', "element-size", NULL, | 451 | &force_full), |
452 | gettext_noop ("element size"), | 452 | |
453 | GNUNET_YES, &GNUNET_GETOPT_set_uint, &element_size }, | 453 | GNUNET_GETOPT_OPTION_SET_UINT ('d', |
454 | { 's', "statistics", NULL, | 454 | "force-delta", |
455 | gettext_noop ("write statistics to file"), | 455 | NULL, |
456 | GNUNET_YES, &GNUNET_GETOPT_set_filename, &statistics_filename }, | 456 | gettext_noop ("number delta operation"), |
457 | &force_delta), | ||
458 | |||
459 | GNUNET_GETOPT_OPTION_SET_UINT ('C', | ||
460 | "num-common", | ||
461 | NULL, | ||
462 | gettext_noop ("number of values"), | ||
463 | &num_c), | ||
464 | |||
465 | GNUNET_GETOPT_OPTION_STRING ('x', | ||
466 | "operation", | ||
467 | NULL, | ||
468 | gettext_noop ("operation to execute"), | ||
469 | &op_str), | ||
470 | |||
471 | GNUNET_GETOPT_OPTION_SET_UINT ('w', | ||
472 | "element-size", | ||
473 | NULL, | ||
474 | gettext_noop ("element size"), | ||
475 | &element_size), | ||
476 | |||
477 | GNUNET_GETOPT_OPTION_FILENAME ('s', | ||
478 | "statistics", | ||
479 | "FILENAME", | ||
480 | gettext_noop ("write statistics to file"), | ||
481 | &statistics_filename), | ||
482 | |||
457 | GNUNET_GETOPT_OPTION_END | 483 | GNUNET_GETOPT_OPTION_END |
458 | }; | 484 | }; |
459 | GNUNET_PROGRAM_run2 (argc, argv, "gnunet-set-profiler", | 485 | GNUNET_PROGRAM_run2 (argc, argv, "gnunet-set-profiler", |