diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-17 12:07:08 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-17 12:07:08 +0100 |
commit | 5b085881ab278a85c3ef3a1d91c58a5724a4e430 (patch) | |
tree | 6da52a32d424e01d68d98216f254612492ed1754 /src/cadet | |
parent | 2951cdb72d730529e2382fca76607681cfc0a3c6 (diff) | |
parent | c253a40bae417335fab8446f3c7182c8c5d4833f (diff) | |
download | gnunet-5b085881ab278a85c3ef3a1d91c58a5724a4e430.tar.gz gnunet-5b085881ab278a85c3ef3a1d91c58a5724a4e430.zip |
Merge branch 'getopt'
Diffstat (limited to 'src/cadet')
-rw-r--r-- | src/cadet/gnunet-cadet.c | 72 |
1 files changed, 47 insertions, 25 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 | }; |