From 5939efa5df9e8a19ec3c8c56dc0593464e5e72da Mon Sep 17 00:00:00 2001 From: "psyc://loupsycedyglgamf.onion/~lynX" Date: Wed, 8 Mar 2017 23:15:55 +0000 Subject: [PATCH] upstyle gnunet-cadet docs --- doc/man/gnunet-cadet.1 | 49 ++++++++++++++++++++++++++++++++-------- src/cadet/gnunet-cadet.c | 29 ++++++++++++------------ 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 @@ .TH GNUNET\-CADET 1 "May 3, 2016" "GNUnet" .SH NAME -gnunet\-cadet \- Print information about CADET tunnels and peers +gnunet\-cadet \- Create or obtain information about CADET tunnels and peers .SH SYNOPSIS .B gnunet\-cadet .RI [ options ] +.I [ \fIPEER_ID SHARED_SECRET\fR ] .br .SH DESCRIPTION \fBgnunet\-cadet\fP prints information about CADET tunnels and peers. +It can also be used for command-line based CADET tunnels using the +\fI-o SHARED_SECRET\fR option to open a port on a receiving PEER_ID +and using "\fBgnunet\-cadet\fP \fIPEER_ID SHARED_SECRET\fR" to +establish one circuit to that peer from any other peer. The receiving +process will only accept one incoming circuit, but several commands +using the same \fI-o\fR can be issued to satisfy multiple requests. +For one-to-many communication \fBgnunet\-social\fP may be better +suited, however. -.SH OPTIONS +.SH SPECIFIC OPTIONS +.B +.IP "\-C CONNECTION_ID, \-\-connection=CONNECTION_ID" +Provide information about a particular connection. +.B +.IP "\-d, \-\-dump" +Dump debug information to STDERR. +.B +.IP "\-e, \-\-echo" +Activate echo mode. +.B +.IP "\-o SHARED_SECRET, \-\-open-port=SHARED_SECRET" +Listen for connections using a shared secret among sender and recipient. +.B +.IP "\-p PEER_ID, \-\-peer=PEER_ID" +Provide information about a patricular peer. +.B +.IP "\-P, \-\-peers" +Provide information about all peers. +.B +.IP "\-t TUNNEL_ID, \-\-tunnel=TUNNEL_ID" +Provide information about a patricular tunnel. +.B +.IP "\-T, \-\-tunnels" +Provide information about all tunnels. + +.SH STANDARD OPTIONS .B .IP "\-c FILENAME, \-\-config=FILENAME" Use the configuration file FILENAME. @@ -19,17 +54,11 @@ Use the configuration file FILENAME. .IP "\-h, \-\-help" Print short help on options. .B -.IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" -Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. -.B .IP "\-l LOGFILE, \-\-logfile=LOGFILE" Configure logging to write logs to LOGFILE. .B -.IP "\-m, \-\-monitor" -Provide information about all tunnels (continuously) NOT IMPLEMENTED. -.B -.IP "\-t OWNER\_ID:TUNNEL\_ID, \-\-tunnel=OWNER\_ID:TUNNEL\_ID" -Provide information about a particular tunnel. +.IP "\-L LOGLEVEL, \-\-loglevel=LOGLEVEL" +Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. .B .IP "\-v, \-\-version" Print 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, && target_id != NULL) { FPRINTF (stderr, - _("You must NOT give a TARGET " - "when using 'request all' options\n")); + _("Extra arguments are not applicable " + "in combination with this option.\n")); return; } if (GNUNET_YES == dump) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "requesting debug dump\n"); + "Requesting debug dump\n"); job = GNUNET_SCHEDULER_add_now (&request_dump, NULL); } @@ -919,31 +919,32 @@ main (int argc, char *const *argv) { int res; - const char helpstr[] = "Create channels and retreive info about cadets status."; + const char helpstr[] = "Create tunnels and retrieve info about CADET's status."; static const struct GNUNET_GETOPT_CommandLineOption options[] = { + /* I would use the terminology 'circuit' here... --lynX */ {'C', "connection", "CONNECTION_ID", - gettext_noop ("provide information about a particular connection"), + gettext_noop ("Provide information about a particular connection"), GNUNET_YES, &GNUNET_GETOPT_set_string, &conn_id}, {'e', "echo", NULL, - gettext_noop ("activate echo mode"), + gettext_noop ("Activate echo mode"), GNUNET_NO, &GNUNET_GETOPT_set_one, &echo}, {'d', "dump", NULL, - gettext_noop ("dump debug information to STDERR"), + gettext_noop ("Dump debug information to STDERR"), GNUNET_NO, &GNUNET_GETOPT_set_one, &dump}, - {'o', "open-port", "PORT", - gettext_noop ("port to listen to"), + {'o', "open-port", "SHARED_SECRET", + gettext_noop ("Listen for connections using a shared secret among sender and recipient"), GNUNET_YES, &GNUNET_GETOPT_set_string, &listen_port}, {'p', "peer", "PEER_ID", - gettext_noop ("provide information about a patricular peer"), + gettext_noop ("Provide information about a patricular peer"), GNUNET_YES, &GNUNET_GETOPT_set_string, &peer_id}, {'P', "peers", NULL, - gettext_noop ("provide information about all peers"), + gettext_noop ("Provide information about all peers"), GNUNET_NO, &GNUNET_GETOPT_set_one, &request_peers}, {'t', "tunnel", "TUNNEL_ID", - gettext_noop ("provide information about a particular tunnel"), + gettext_noop ("Provide information about a particular tunnel"), GNUNET_YES, &GNUNET_GETOPT_set_string, &tunnel_id}, {'T', "tunnels", NULL, - gettext_noop ("provide information about all tunnels"), + gettext_noop ("Provide information about all tunnels"), GNUNET_NO, &GNUNET_GETOPT_set_one, &request_tunnels}, GNUNET_GETOPT_OPTION_END @@ -955,7 +956,7 @@ main (int argc, return 2; res = GNUNET_PROGRAM_run (argc, argv, - "gnunet-cadet (OPTIONS | TARGET PORT)", + "gnunet-cadet (OPTIONS | PEER_ID SHARED_SECRET)", gettext_noop (helpstr), options, &run, NULL); -- 2.25.1