aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpsyc://loupsycedyglgamf.onion/~lynX <BM-NB7xa9gEpmJgYp9PVnEdACiZcGmmEJcY>2017-03-08 23:15:55 +0000
committerpsyc://loupsycedyglgamf.onion/~lynX <BM-NB7xa9gEpmJgYp9PVnEdACiZcGmmEJcY>2017-03-08 23:15:55 +0000
commit5939efa5df9e8a19ec3c8c56dc0593464e5e72da (patch)
tree34bdbc2a5f4ea8761cfc88e8062c5c4fa3705df0
parent99350928f4087a116de62350d7d3f293e50e468c (diff)
downloadgnunet-5939efa5df9e8a19ec3c8c56dc0593464e5e72da.tar.gz
gnunet-5939efa5df9e8a19ec3c8c56dc0593464e5e72da.zip
upstyle gnunet-cadet docs
-rw-r--r--doc/man/gnunet-cadet.149
-rw-r--r--src/cadet/gnunet-cadet.c29
2 files changed, 54 insertions, 24 deletions
diff --git a/doc/man/gnunet-cadet.1 b/doc/man/gnunet-cadet.1
index 867a59f65..d95cf851c 100644
--- a/doc/man/gnunet-cadet.1
+++ b/doc/man/gnunet-cadet.1
@@ -1,17 +1,52 @@
1.TH GNUNET\-CADET 1 "May 3, 2016" "GNUnet" 1.TH GNUNET\-CADET 1 "May 3, 2016" "GNUnet"
2 2
3.SH NAME 3.SH NAME
4gnunet\-cadet \- Print information about CADET tunnels and peers 4gnunet\-cadet \- Create or obtain information about CADET tunnels and peers
5 5
6.SH SYNOPSIS 6.SH SYNOPSIS
7.B gnunet\-cadet 7.B gnunet\-cadet
8.RI [ options ] 8.RI [ options ]
9.I [ \fIPEER_ID SHARED_SECRET\fR ]
9.br 10.br
10 11
11.SH DESCRIPTION 12.SH DESCRIPTION
12\fBgnunet\-cadet\fP prints information about CADET tunnels and peers. 13\fBgnunet\-cadet\fP prints information about CADET tunnels and peers.
14It can also be used for command-line based CADET tunnels using the
15\fI-o SHARED_SECRET\fR option to open a port on a receiving PEER_ID
16and using "\fBgnunet\-cadet\fP \fIPEER_ID SHARED_SECRET\fR" to
17establish one circuit to that peer from any other peer. The receiving
18process will only accept one incoming circuit, but several commands
19using the same \fI-o\fR can be issued to satisfy multiple requests.
20For one-to-many communication \fBgnunet\-social\fP may be better
21suited, however.
13 22
14.SH OPTIONS 23.SH SPECIFIC OPTIONS
24.B
25.IP "\-C CONNECTION_ID, \-\-connection=CONNECTION_ID"
26Provide information about a particular connection.
27.B
28.IP "\-d, \-\-dump"
29Dump debug information to STDERR.
30.B
31.IP "\-e, \-\-echo"
32Activate echo mode.
33.B
34.IP "\-o SHARED_SECRET, \-\-open-port=SHARED_SECRET"
35Listen for connections using a shared secret among sender and recipient.
36.B
37.IP "\-p PEER_ID, \-\-peer=PEER_ID"
38Provide information about a patricular peer.
39.B
40.IP "\-P, \-\-peers"
41Provide information about all peers.
42.B
43.IP "\-t TUNNEL_ID, \-\-tunnel=TUNNEL_ID"
44Provide information about a patricular tunnel.
45.B
46.IP "\-T, \-\-tunnels"
47Provide information about all tunnels.
48
49.SH STANDARD OPTIONS
15.B 50.B
16.IP "\-c FILENAME, \-\-config=FILENAME" 51.IP "\-c FILENAME, \-\-config=FILENAME"
17Use the configuration file FILENAME. 52Use the configuration file FILENAME.
@@ -19,17 +54,11 @@ Use the configuration file FILENAME.
19.IP "\-h, \-\-help" 54.IP "\-h, \-\-help"
20Print short help on options. 55Print short help on options.
21.B 56.B
22.IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL"
23Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR.
24.B
25.IP "\-l LOGFILE, \-\-logfile=LOGFILE" 57.IP "\-l LOGFILE, \-\-logfile=LOGFILE"
26Configure logging to write logs to LOGFILE. 58Configure logging to write logs to LOGFILE.
27.B 59.B
28.IP "\-m, \-\-monitor" 60.IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL"
29Provide information about all tunnels (continuously) NOT IMPLEMENTED. 61Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR.
30.B
31.IP "\-t OWNER\_ID:TUNNEL\_ID, \-\-tunnel=OWNER\_ID:TUNNEL\_ID"
32Provide information about a particular tunnel.
33.B 62.B
34.IP "\-v, \-\-version" 63.IP "\-v, \-\-version"
35Print GNUnet version number. 64Print GNUnet version number.
diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c
index c194a5bc1..abbf9a0a7 100644
--- a/src/cadet/gnunet-cadet.c
+++ b/src/cadet/gnunet-cadet.c
@@ -772,15 +772,15 @@ run (void *cls,
772 && target_id != NULL) 772 && target_id != NULL)
773 { 773 {
774 FPRINTF (stderr, 774 FPRINTF (stderr,
775 _("You must NOT give a TARGET " 775 _("Extra arguments are not applicable "
776 "when using 'request all' options\n")); 776 "in combination with this option.\n"));
777 return; 777 return;
778 } 778 }
779 779
780 if (GNUNET_YES == dump) 780 if (GNUNET_YES == dump)
781 { 781 {
782 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 782 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
783 "requesting debug dump\n"); 783 "Requesting debug dump\n");
784 job = GNUNET_SCHEDULER_add_now (&request_dump, 784 job = GNUNET_SCHEDULER_add_now (&request_dump,
785 NULL); 785 NULL);
786 } 786 }
@@ -919,31 +919,32 @@ main (int argc,
919 char *const *argv) 919 char *const *argv)
920{ 920{
921 int res; 921 int res;
922 const char helpstr[] = "Create channels and retreive info about cadets status."; 922 const char helpstr[] = "Create tunnels and retrieve info about CADET's status.";
923 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 923 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
924 /* I would use the terminology 'circuit' here... --lynX */
924 {'C', "connection", "CONNECTION_ID", 925 {'C', "connection", "CONNECTION_ID",
925 gettext_noop ("provide information about a particular connection"), 926 gettext_noop ("Provide information about a particular connection"),
926 GNUNET_YES, &GNUNET_GETOPT_set_string, &conn_id}, 927 GNUNET_YES, &GNUNET_GETOPT_set_string, &conn_id},
927 {'e', "echo", NULL, 928 {'e', "echo", NULL,
928 gettext_noop ("activate echo mode"), 929 gettext_noop ("Activate echo mode"),
929 GNUNET_NO, &GNUNET_GETOPT_set_one, &echo}, 930 GNUNET_NO, &GNUNET_GETOPT_set_one, &echo},
930 {'d', "dump", NULL, 931 {'d', "dump", NULL,
931 gettext_noop ("dump debug information to STDERR"), 932 gettext_noop ("Dump debug information to STDERR"),
932 GNUNET_NO, &GNUNET_GETOPT_set_one, &dump}, 933 GNUNET_NO, &GNUNET_GETOPT_set_one, &dump},
933 {'o', "open-port", "PORT", 934 {'o', "open-port", "SHARED_SECRET",
934 gettext_noop ("port to listen to"), 935 gettext_noop ("Listen for connections using a shared secret among sender and recipient"),
935 GNUNET_YES, &GNUNET_GETOPT_set_string, &listen_port}, 936 GNUNET_YES, &GNUNET_GETOPT_set_string, &listen_port},
936 {'p', "peer", "PEER_ID", 937 {'p', "peer", "PEER_ID",
937 gettext_noop ("provide information about a patricular peer"), 938 gettext_noop ("Provide information about a patricular peer"),
938 GNUNET_YES, &GNUNET_GETOPT_set_string, &peer_id}, 939 GNUNET_YES, &GNUNET_GETOPT_set_string, &peer_id},
939 {'P', "peers", NULL, 940 {'P', "peers", NULL,
940 gettext_noop ("provide information about all peers"), 941 gettext_noop ("Provide information about all peers"),
941 GNUNET_NO, &GNUNET_GETOPT_set_one, &request_peers}, 942 GNUNET_NO, &GNUNET_GETOPT_set_one, &request_peers},
942 {'t', "tunnel", "TUNNEL_ID", 943 {'t', "tunnel", "TUNNEL_ID",
943 gettext_noop ("provide information about a particular tunnel"), 944 gettext_noop ("Provide information about a particular tunnel"),
944 GNUNET_YES, &GNUNET_GETOPT_set_string, &tunnel_id}, 945 GNUNET_YES, &GNUNET_GETOPT_set_string, &tunnel_id},
945 {'T', "tunnels", NULL, 946 {'T', "tunnels", NULL,
946 gettext_noop ("provide information about all tunnels"), 947 gettext_noop ("Provide information about all tunnels"),
947 GNUNET_NO, &GNUNET_GETOPT_set_one, &request_tunnels}, 948 GNUNET_NO, &GNUNET_GETOPT_set_one, &request_tunnels},
948 949
949 GNUNET_GETOPT_OPTION_END 950 GNUNET_GETOPT_OPTION_END
@@ -955,7 +956,7 @@ main (int argc,
955 return 2; 956 return 2;
956 957
957 res = GNUNET_PROGRAM_run (argc, argv, 958 res = GNUNET_PROGRAM_run (argc, argv,
958 "gnunet-cadet (OPTIONS | TARGET PORT)", 959 "gnunet-cadet (OPTIONS | PEER_ID SHARED_SECRET)",
959 gettext_noop (helpstr), 960 gettext_noop (helpstr),
960 options, &run, NULL); 961 options, &run, NULL);
961 962