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 bca525d..b95db51 100644 (file)
--- a/admin.c
+++ b/admin.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: admin.c,v 1.10 2004/04/08 01:36:17 mdw Exp $
+ * $Id$
  *
  * 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[] = {
-  { "help",    "HELP",                 0,      0,      acmd_help },
+  { "help",    "help",                 0,      0,      acmd_help },
 #ifndef NTRACE
-  { "trace",   "TRACE [options]",      0,      1,      acmd_trace },
+  { "trace",   "trace [OPTIONS]",      0,      1,      acmd_trace },
 #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 }
 };
 
index 45dbd7b..7edc790 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: client.c,v 1.14 2004/04/08 01:36:17 mdw Exp $
+ * $Id$
  *
  * Client for TrIPE
  *
@@ -222,11 +222,11 @@ static void usage(FILE *fp)
 {
   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\
-       [-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 70c793d..f762692 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
+.PP
 Currently, the following tracing options are supported:
 .TP
 .B t
index 7c79d8a..5275bf0 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
-.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.
index 6a2768c..5078b9b 100644 (file)
--- a/mallory.c
+++ b/mallory.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: mallory.c,v 1.4 2004/04/08 01:36:17 mdw Exp $
+ * $Id$
  *
  * An evil proxy for TrIPE
  *
@@ -610,7 +610,7 @@ static void version(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)
@@ -618,6 +618,28 @@ static void help(FILE *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[])
diff --git a/tripe.c b/tripe.c
index e2356eb..0ba169b 100644 (file)
--- a/tripe.c
+++ b/tripe.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: tripe.c,v 1.15 2004/04/19 08:49:40 mdw Exp $
+ * $Id$
  *
  * Main program
  *
@@ -74,9 +74,9 @@ void interval(struct timeval *tv, void *v)
 
 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)