chiark / gitweb /
Use standard GNU uppercase for metavariables in usage strings. Some manpage
authormdw <mdw>
Sat, 2 Oct 2004 09:38:48 +0000 (09:38 +0000)
committermdw <mdw>
Sat, 2 Oct 2004 09:38:48 +0000 (09:38 +0000)
fixing.  Write mallory's help message.

admin.c
client.c
doc/tripe-admin.5
doc/tripe-mitm.8
mallory.c
tripe.c

diff --git a/admin.c b/admin.c
index bca525d8a3bdc01c461fb0965d624717c4cd9a8b..b95db51c276ffe9ff8ff2f6d9725664ba7161e22 100644 (file)
--- a/admin.c
+++ b/admin.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
 /* -*-c-*-
  *
- * $Id: admin.c,v 1.10 2004/04/08 01:36:17 mdw Exp $
+ * $Id$
  *
  * Admin interface for configuration
  *
  *
  * Admin interface for configuration
  *
@@ -641,19 +641,19 @@ typedef struct acmd {
 static void acmd_help(admin */*a*/, unsigned /*ac*/, char */*av*/[]);
 
 static const acmd acmdtab[] = {
 static void acmd_help(admin */*a*/, unsigned /*ac*/, char */*av*/[]);
 
 static const acmd acmdtab[] = {
-  { "help",    "HELP",                 0,      0,      acmd_help },
+  { "help",    "help",                 0,      0,      acmd_help },
 #ifndef NTRACE
 #ifndef NTRACE
-  { "trace",   "TRACE [options]",      0,      1,      acmd_trace },
+  { "trace",   "trace [OPTIONS]",      0,      1,      acmd_trace },
 #endif
 #endif
-  { "port",    "PORT",                 0,      0,      acmd_port },
-  { "daemon",  "DAEMON",               0,      0,      acmd_daemon },
-  { "list",    "LIST",                 0,      0,      acmd_list },
-  { "ifname",  "IFNAME peer",          1,      1,      acmd_ifname },
-  { "addr",    "ADDR peer",            1,      1,      acmd_addr },
-  { "stats",   "STATS peer",           1,      1,      acmd_stats },
-  { "kill",    "KILL peer",            1,      1,      acmd_kill },
-  { "add",     "ADD peer addr port",   3,      3,      acmd_add },
-  { "quit",    "QUIT",                 0,      0,      acmd_quit },
+  { "port",    "port",                 0,      0,      acmd_port },
+  { "daemon",  "daemon",               0,      0,      acmd_daemon },
+  { "list",    "list",                 0,      0,      acmd_list },
+  { "ifname",  "ifname PEER",          1,      1,      acmd_ifname },
+  { "addr",    "addr PEER",            1,      1,      acmd_addr },
+  { "stats",   "stats PEER",           1,      1,      acmd_stats },
+  { "kill",    "kill PEER",            1,      1,      acmd_kill },
+  { "add",     "add PEER ADDR PORT",   3,      3,      acmd_add },
+  { "quit",    "quit",                 0,      0,      acmd_quit },
   { 0,         0,                      0,      0,      0 }
 };
 
   { 0,         0,                      0,      0,      0 }
 };
 
index 45dbd7bdf39a1c840f7a456247a71689c4a9267d..7edc790bfb7af0a2b637b0c41ddfbc1a632b03ba 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
 /* -*-c-*-
  *
- * $Id: client.c,v 1.14 2004/04/08 01:36:17 mdw Exp $
+ * $Id$
  *
  * Client for TrIPE
  *
  *
  * Client for TrIPE
  *
@@ -222,11 +222,11 @@ static void usage(FILE *fp)
 {
   pquis(fp, "\
 Usage:\n\
 {
   pquis(fp, "\
 Usage:\n\
-       $ [-w] [-options] [command [args]...]\n\
-       $ [-Dl] [-f file] [-options]\n\
+       $ [-w] [-OPTIONS] [COMMAND [ARGS]...]\n\
+       $ [-Dl] [-f FILE] [-OPTIONS]\n\
 Options:\n\
 Options:\n\
-       [-s] [-d directory] [-a socket] [-P pidfile]\n\
-       [-p program] [-S arg,arg,...]\n\
+       [-s] [-d DIRECTORY] [-a SOCKET] [-P PIDFILE]\n\
+       [-p PROGRAM] [-S ARG,ARG,...]\n\
 ");
 }
 
 ");
 }
 
index 70c793d794fd2b7b69f93f596a7249a7a1967682..f762692e63a24f7e880fb50c82aebf32250e02cf 100644 (file)
@@ -90,6 +90,7 @@ given, a table is returned showing the available tracing option letters
 and their meanings.  Programs should not attempt to parse this table:
 its format is not guaranteed to remain the same.
 .RS
 and their meanings.  Programs should not attempt to parse this table:
 its format is not guaranteed to remain the same.
 .RS
+.PP
 Currently, the following tracing options are supported:
 .TP
 .B t
 Currently, the following tracing options are supported:
 .TP
 .B t
index 7c79d8a3ba19949c0455ef8cca34f69d2d0ca664..5275bf06497bc929ae6b9c3b5869ae16aa4a25d8 100644 (file)
@@ -125,7 +125,7 @@ Apply a given filter to packets received from the left peer.
 .BI lfilt: filter : args :\fR...
 Apply a given filter to packets received from the right peer.
 .TP
 .BI lfilt: filter : args :\fR...
 Apply a given filter to packets received from the right peer.
 .TP
-.B next: tag :\fR...
+.BI next: tag :\fR...
 Begin the next branch of the first fork filter node named
 .I tag
 in each filter chain.  See below for more about filter chains.
 Begin the next branch of the first fork filter node named
 .I tag
 in each filter chain.  See below for more about filter chains.
index 6a2768cc028032d0fe5bfb4de605abeb937f49f3..5078b9b5d442f68dc72a74bb78140be40b0dde3f 100644 (file)
--- a/mallory.c
+++ b/mallory.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
 /* -*-c-*-
  *
- * $Id: mallory.c,v 1.4 2004/04/08 01:36:17 mdw Exp $
+ * $Id$
  *
  * An evil proxy for TrIPE
  *
  *
  * An evil proxy for TrIPE
  *
@@ -610,7 +610,7 @@ static void version(FILE *fp)
 
 static void usage(FILE *fp)
 {
 
 static void usage(FILE *fp)
 {
-  pquis(fp, "Usage: $ [-k keyring] directive...\n");
+  pquis(fp, "Usage: $ [-k KEYRING] DIRECTIVE...\n");
 }
 
 static void help(FILE *fp)
 }
 
 static void help(FILE *fp)
@@ -618,6 +618,28 @@ static void help(FILE *fp)
   version(fp);
   putc('\n', fp);
   usage(fp);
   version(fp);
   putc('\n', fp);
   usage(fp);
+  fputs("\n\
+Options:
+
+-h, --help             Show this help text.
+-v, --version          Show the version number.
+-u, --usage            Show terse usage summary.
+
+-k, --keyring=FILE     Fetch keys from FILE.
+
+Directives:\n\
+  peer:NAME:LOCAL-PORT:REMOTE-ADDR:REMOTE-PORT\n\
+  include:FILE\n\
+  {,l,r}filt:FILTER:ARGS:...\n\
+  next:TAG\n\
+  {,l,r}flood:TYPE:MILLIS:SIZE\n\
+\n\
+Filters:\n\
+  send\n\
+  fork:TAG\n\
+  delay:QLEN[:MILLIS:P-REPLAY]\n\
+  corrupt[:P-CORRUPT]\n",
+       fp);
 }
 
 int main(int argc, char *argv[])
 }
 
 int main(int argc, char *argv[])
diff --git a/tripe.c b/tripe.c
index e2356ebbc104102c3ba6d8f3e084bdf9edb170e0..0ba169b22cc69218aeb7cc1d61a3ffd7a188a43c 100644 (file)
--- a/tripe.c
+++ b/tripe.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
 /* -*-c-*-
  *
- * $Id: tripe.c,v 1.15 2004/04/19 08:49:40 mdw Exp $
+ * $Id$
  *
  * Main program
  *
  *
  * Main program
  *
@@ -74,9 +74,9 @@ void interval(struct timeval *tv, void *v)
 
 static void usage(FILE *fp)
 {
 
 static void usage(FILE *fp)
 {
-  pquis(fp, "Usage: $ [-D] [-d dir] [-b addr] [-p port]\n\
-       [-U user] [-G group] [-a socket] [-T trace-opts]\n\
-       [-k priv-keyring] [-K pub-keyring] [-t key-tag]\n");
+  pquis(fp, "Usage: $ [-D] [-d DIR] [-b ADDR] [-p PORT]\n\
+       [-U USER] [-G GROUP] [-a SOCKET] [-T TRACE-OPTS]\n\
+       [-k PRIV-KEYRING] [-K PUB-KEYRING] [-t KEY-TAG]\n");
 }
 
 static void version(FILE *fp)
 }
 
 static void version(FILE *fp)