aboutsummaryrefslogtreecommitdiff
path: root/src/secretsharing
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-16 16:27:38 +0100
committerMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-16 16:27:38 +0100
commitb92543a726e5f0df8c29788badae049923f3b35a (patch)
treebd7ee5d653054174441e01f2ae1ab0d178cdf247 /src/secretsharing
parente724ea478e4efe6e2531f81908ce0f9334357d81 (diff)
downloadgnunet-b92543a726e5f0df8c29788badae049923f3b35a.tar.gz
gnunet-b92543a726e5f0df8c29788badae049923f3b35a.zip
porting social
Diffstat (limited to 'src/secretsharing')
-rw-r--r--src/secretsharing/gnunet-secretsharing-profiler.c59
1 files changed, 37 insertions, 22 deletions
diff --git a/src/secretsharing/gnunet-secretsharing-profiler.c b/src/secretsharing/gnunet-secretsharing-profiler.c
index 3ff5d7fdd..e66019dc6 100644
--- a/src/secretsharing/gnunet-secretsharing-profiler.c
+++ b/src/secretsharing/gnunet-secretsharing-profiler.c
@@ -41,7 +41,7 @@ static unsigned int threshold = 2;
41/** 41/**
42 * Should we try to decrypt a value after the key generation? 42 * Should we try to decrypt a value after the key generation?
43 */ 43 */
44static unsigned int decrypt = GNUNET_NO; 44static int decrypt = GNUNET_NO;
45 45
46/** 46/**
47 * When would we like to see the operation finished? 47 * When would we like to see the operation finished?
@@ -88,7 +88,7 @@ static unsigned int num_decrypted;
88 88
89static struct GNUNET_HashCode session_id; 89static struct GNUNET_HashCode session_id;
90 90
91static int verbose; 91static unsigned int verbose;
92 92
93static struct GNUNET_SECRETSHARING_Plaintext reference_plaintext; 93static struct GNUNET_SECRETSHARING_Plaintext reference_plaintext;
94 94
@@ -602,26 +602,41 @@ run (void *cls, char *const *args, const char *cfgfile,
602int 602int
603main (int argc, char **argv) 603main (int argc, char **argv)
604{ 604{
605 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 605 struct GNUNET_GETOPT_CommandLineOption options[] = {
606 { 'n', "num-peers", NULL, 606
607 gettext_noop ("number of peers in consensus"), 607 GNUNET_GETOPT_OPTION_SET_UINT ('n',
608 GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_peers }, 608 "num-peers",
609 { 'D', "delay", NULL, 609 NULL,
610 gettext_noop ("dkg start delay"), 610 gettext_noop ("number of peers in consensus"),
611 GNUNET_YES, &GNUNET_GETOPT_set_relative_time, &delay }, 611 &num_peers),
612 { 't', "timeout", NULL, 612
613 gettext_noop ("dkg timeout"), 613 GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('D',
614 GNUNET_YES, &GNUNET_GETOPT_set_relative_time, &timeout }, 614 "delay",
615 { 'k', "threshold", NULL, 615 NULL,
616 gettext_noop ("threshold"), 616 gettext_noop ("dkg start delay"),
617 GNUNET_YES, &GNUNET_GETOPT_set_uint, &threshold }, 617 &delay),
618 { 'd', "decrypt", NULL, 618
619 gettext_noop ("also profile decryption"), 619 GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
620 GNUNET_NO, &GNUNET_GETOPT_set_one, &decrypt }, 620 "timeout",
621 { 'V', "verbose", NULL, 621 NULL,
622 gettext_noop ("be more verbose (print received values)"), 622 gettext_noop ("dkg timeout"),
623 GNUNET_NO, &GNUNET_GETOPT_set_one, &verbose }, 623 &timeout),
624 GNUNET_GETOPT_OPTION_END 624
625 GNUNET_GETOPT_OPTION_SET_UINT ('k',
626 "threshold",
627 NULL,
628 gettext_noop ("threshold"),
629 &threshold),
630
631 GNUNET_GETOPT_OPTION_SET_ONE ('d',
632 "descrypt",
633 gettext_noop ("also profile decryption"),
634 &decrypt),
635
636
637 GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
638
639 GNUNET_GETOPT_OPTION_END
625 }; 640 };
626 delay = GNUNET_TIME_UNIT_ZERO; 641 delay = GNUNET_TIME_UNIT_ZERO;
627 timeout = GNUNET_TIME_UNIT_MINUTES; 642 timeout = GNUNET_TIME_UNIT_MINUTES;