chiark / gitweb /
Overhaul manual pages.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 5 Apr 2008 12:26:24 +0000 (13:26 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 5 Apr 2008 14:32:56 +0000 (15:32 +0100)
Make the source code look prettier, and attach copyright notices to them
all.

19 files changed:
Makefile.am
client/Makefile.am
client/tripectl.1.in
defs.man.in [new file with mode: 0644]
keys/Makefile.am
keys/tripe-keys.8.in [moved from keys/tripe-keys.8 with 76% similarity]
keys/tripe-keys.conf.5.in [moved from keys/tripe-keys.conf.5 with 76% similarity]
maint-utils/manfix [new file with mode: 0755]
mon/Makefile.am
mon/tripemon.1.in
pkstream/Makefile.am
pkstream/pkstream.1.in [moved from pkstream/pkstream.1 with 63% similarity]
proxy/Makefile.am
proxy/tripe-mitm.8.in [moved from proxy/tripe-mitm.8 with 76% similarity]
server/Makefile.am
server/make-summary
server/tripe-admin.5.in
server/tripe.8.in
vars.am

index 53085abd786b6481fd93878d4199991883f72f5a..53779bcccbdddc95294db40c6b36ab75ebc25fcc 100644 (file)
@@ -79,6 +79,10 @@ DISTCHECK_CONFIGURE_FLAGS = \
 dist-hook::
        echo $(VERSION) >$(distdir)/RELEASE
 
+## Manual page preamble.
+EXTRA_DIST             += defs.man.in
+CLEANFILES             += defs.man
+
 ## Additional build tools.
 EXTRA_DIST             += config/confsubst
 
index cfef996fc4f95e73ede604fbd2cc0c59e52b9d3d..dbbc25796d90fbd9d29e08e4a7e2fa310dd4df2e 100644 (file)
@@ -41,8 +41,4 @@ man_MANS              += tripectl.1
 CLEANFILES             += tripectl.1
 EXTRA_DIST             += tripectl.1.in
 
-tripectl.1: tripectl.1.in Makefile
-       $(confsubst) $(srcdir)/tripectl.1.in >$@.new $(SUBSTITUTIONS) && \
-               mv $@.new $@
-
 ###----- That's all, folks --------------------------------------------------
index 9c1143779a2566d6c1e8ae4c5cf73f4fe4d98783..edf93a901c806af387e8590d2ae4f1fdf8e0dc3d 100644 (file)
@@ -1,25 +1,42 @@
 .\" -*-nroff-*-
-.de VS
-.sp 1
-.RS
-.nf
-.ft B
-..
-.de VE
-.ft R
-.fi
-.RE
-.sp 1
-..
-.ie t \{\
-.  if \n(.g \{\
-.    fam P
-.  \}
-.\}
+.\".
+.\" Manual for the administration client
+.\"
+.\" (c) 2008 Straylight/Edgeware
+.\"
+.
+.\"----- Licensing notice ---------------------------------------------------
+.\"
+.\" This file is part of Trivial IP Encryption (TrIPE).
+.\"
+.\" TrIPE is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 2 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" TrIPE is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with TrIPE; if not, write to the Free Software Foundation,
+.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.
+.\"--------------------------------------------------------------------------
+.so ../defs.man.in \" @@@PRE@@@
+.
+.\"--------------------------------------------------------------------------
 .TH tripectl 1 "19 February 2001" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
-.SH NAME
+.
+.\"--------------------------------------------------------------------------
+.SH "NAME"
+.
 tripectl \- simple client for TrIPE
-.SH SYNOPSIS
+.
+.\"--------------------------------------------------------------------------
+.SH "SYNOPSIS"
+.
 .B tripectl
 .RB [ \-w ]
 .RB [ \-\fIoptions ]
@@ -48,7 +65,10 @@ Options:
 .IR program ]
 .RB [ \-S
 .IB arg , arg ,\fR...]
-.SH DESCRIPTION
+.
+.\"--------------------------------------------------------------------------
+.SH "DESCRIPTION"
+.
 The
 .B tripectl
 program is a simple client which can be used, either interactively or
@@ -86,7 +106,7 @@ directory.  The default directory, if this option is not specified, is
 taken from the environment variable
 .BR TRIPEDIR ;
 if that's not defined either, a default default of
-.B "@configdir@"
+.B "*(/c"
 is used.
 .TP
 .BI "\-a, \-\-admin-socket=" socket
@@ -99,7 +119,7 @@ The default socket, if this option is not specified, is taken from the
 environment variable
 .BR TRIPESOCK ;
 if that's not defined either, a default default of
-.B "@socketdir@/tripesock"
+.B "*(/s/tripesock"
 is used.
 .TP
 .BI "\-P, \-\-pidfile=" pidfile
@@ -243,11 +263,19 @@ It stores its process-id in
 .PP
 It's possible to communicate interactively with a newly-started server,
 or to give it a command and quit, but this is seldom useful.
+.
+.\"--------------------------------------------------------------------------
 .SH "SEE ALSO"
+.
 .BR tripe\-admin (5),
 .BR tripe (8).
 .PP
 .IR "The Trivial IP Encryption Protocol" ,
 .IR "The Wrestlers Protocol" .
+.
+.\"--------------------------------------------------------------------------
 .SH "AUTHOR"
+.
 Mark Wooding, <mdw@distorted.org.uk>
+.
+.\"----- That's all, folks --------------------------------------------------
diff --git a/defs.man.in b/defs.man.in
new file mode 100644 (file)
index 0000000..ea198fe
--- /dev/null
@@ -0,0 +1,72 @@
+.\" -*-nroff-*-
+.\"
+.\" Common definitions for TrIPE manpages
+.\"
+.\" (c) 2008 Straylight/Edgeware
+.\"
+.
+.\"----- Licensing notice ---------------------------------------------------
+.\"
+.\" This file is part of Trivial IP Encryption (TrIPE).
+.\"
+.\" TrIPE is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 2 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" TrIPE is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with TrIPE; if not, write to the Free Software Foundation,
+.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.
+.\"--------------------------------------------------------------------------
+.\" Preliminary definitions.
+.
+.\" String definitions and font selection.
+.ie t \{\
+.  ds o \(bu
+.  ds ss \s8\u
+.  ds se \d\s0
+.  if \n(.g \{\
+.    fam P
+.  \}
+.\}
+.el \{\
+.  ds o o
+.  ds ss ^
+.  ds se
+.\}
+.
+.ds /c @configdir@
+.ds /s @socketdir@
+.
+.\" .hP TEXT -- start an indented paragraph with TEXT hanging off to the left
+.de hP
+.IP
+\h'-\w'\fB\\$1\ \fP'u'\fB\\$1\ \fP\c
+..
+.
+.\" .SP -- equivalent to .TP, but indicates item should be summarized
+.de SP
+.TP
+..
+.
+.\" .VS ... .VE -- present a code example
+.de VS
+.sp 1
+.RS
+.nf
+.ft B
+..
+.de VE
+.ft R
+.fi
+.RE
+.sp 1
+..
+.
+.\"----- That's all, folks --------------------------------------------------
index 9bbe384c4f308ade07342b3d2cf374e560e425e9..954e5d9ded2cfa36160c96f5bbef56d8f5e5b49c 100644 (file)
@@ -42,7 +42,8 @@ tripe-keys: tripe-keys.in Makefile
 
 ## Manual pages.
 man_MANS               += tripe-keys.8 tripe-keys.conf.5
-EXTRA_DIST             += tripe-keys.8 tripe-keys.conf.5
+CLEANFILES             += tripe-keys.8 tripe-keys.conf.5
+EXTRA_DIST             += tripe-keys.8.in tripe-keys.conf.5.in
 
 ## Examples.
 EXTRA_DIST             += tripe-keys.master
similarity index 76%
rename from keys/tripe-keys.8
rename to keys/tripe-keys.8.in
index bebe3312370a8927e891b5cfa84d14af5554b4b4..eb2604b8c67ee4e55991497a95fb7fa6beca5cc0 100644 (file)
@@ -1,38 +1,42 @@
 .\" -*-nroff-*-
 .\".
-.de hP
-.IP
-\h'-\w'\fB\\$1\ \fP'u'\fB\\$1\ \fP\c
-..
-.de VS
-.sp 1
-.RS
-.nf
-.ft B
-..
-.de VE
-.ft R
-.fi
-.RE
-.sp 1
-..
-.ie t \{\
-.  ds o \(bu
-.  ds ss \s8\u
-.  ds se \d\s0
-.  if \n(.g \{\
-.    fam P
-.  \}
-.\}
-.el \{\
-.  ds o o
-.  ds ss ^
-.  ds se
-.\}
+.\" Manual for the key-management tool
+.\"
+.\" (c) 2008 Straylight/Edgeware
+.\"
+.
+.\"----- Licensing notice ---------------------------------------------------
+.\"
+.\" This file is part of Trivial IP Encryption (TrIPE).
+.\"
+.\" TrIPE is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 2 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" TrIPE is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with TrIPE; if not, write to the Free Software Foundation,
+.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.
+.\"--------------------------------------------------------------------------
+.so ../defs.man.in \" @@@PRE@@@
+.
+.\"--------------------------------------------------------------------------
 .TH tripe-keys 8 "14 September 2005" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
+.
+.\"--------------------------------------------------------------------------
 .SH "NAME"
+.
 tripe-keys \- simple centralized key management for tripe
+.
+.\"--------------------------------------------------------------------------
 .SH "SYNOPSIS"
+.
 .B tripe-keys
 .I operation
 .IP "Operations supported:"
@@ -51,7 +55,10 @@ tripe-keys \- simple centralized key management for tripe
 .B "rebuild"
 .br
 .B "clean"
+.
+.\"--------------------------------------------------------------------------
 .SH "DESCRIPTION"
+.
 The
 .B tripe-keys
 script implements a very simple, centralized key management system for
@@ -208,9 +215,17 @@ might have written to a directory.  In particular, it deletes
 and their associated
 .B .old
 files.
+.
+.\"--------------------------------------------------------------------------
 .SH "SEE ALSO"
+.
 .BR key (1),
 .BR tripe\-keys.conf (5),
 .BR tripe (8).
+.
+.\"--------------------------------------------------------------------------
 .SH "AUTHOR"
+.
 Mark Wooding, <mdw@distorted.org.uk>
+.
+.\"----- That's all, folks --------------------------------------------------
similarity index 76%
rename from keys/tripe-keys.conf.5
rename to keys/tripe-keys.conf.5.in
index d4c5fd2d359494818d3c4dfb56efab775c533e5b..c6e0f2579a94f5c5cef959c4dd5926be85896d75 100644 (file)
@@ -1,38 +1,42 @@
 .\" -*-nroff-*-
 .\".
-.de hP
-.IP
-\h'-\w'\fB\\$1\ \fP'u'\fB\\$1\ \fP\c
-..
-.de VS
-.sp 1
-.RS
-.nf
-.ft B
-..
-.de VE
-.ft R
-.fi
-.RE
-.sp 1
-..
-.ie t \{\
-.  ds o \(bu
-.  ds ss \s8\u
-.  ds se \d\s0
-.  if \n(.g \{\
-.    fam P
-.  \}
-.\}
-.el \{\
-.  ds o o
-.  ds ss ^
-.  ds se
-.\}
+.\" Manual for the key-management configuration files
+.\"
+.\" (c) 2008 Straylight/Edgeware
+.\"
+.
+.\"----- Licensing notice ---------------------------------------------------
+.\"
+.\" This file is part of Trivial IP Encryption (TrIPE).
+.\"
+.\" TrIPE is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 2 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" TrIPE is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with TrIPE; if not, write to the Free Software Foundation,
+.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.
+.\"--------------------------------------------------------------------------
+.so ../defs.man.in \" @@@PRE@@@
+.
+.\"--------------------------------------------------------------------------
 .TH tripe-keys.conf 5 "14 September 2005" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
+.
+.\"--------------------------------------------------------------------------
 .SH "NAME"
+.
 tripe-keys.conf \- configuration file format for tripe-keys
+.
+.\"--------------------------------------------------------------------------
 .SH "DESCRIPTION"
+.
 The
 .B tripe-keys.master
 or
@@ -275,8 +279,16 @@ and
 .I conf-file
 Filename for local repository configuration file.  Default is
 .IB basedir /tripe-keys.conf \fR.
+.
+.\"--------------------------------------------------------------------------
 .SH "SEE ALSO"
+.
 .BR tripe (8),
 .BR tripe\-keys (8).
+.
+.\"--------------------------------------------------------------------------
 .SH "AUTHOR"
+.
 Mark Wooding, <mdw@distorted.org.uk>
+.
+.\"----- That's all, folks --------------------------------------------------
diff --git a/maint-utils/manfix b/maint-utils/manfix
new file mode 100755 (executable)
index 0000000..5d6550b
--- /dev/null
@@ -0,0 +1,49 @@
+#! /bin/sed -f
+
+/^\.TH/ {
+  i\
+.\\" -*-nroff-*-\
+.\\".\
+.\\" ###DESCRIPTION###\
+.\\"\
+.\\" (c) 2008 Straylight/Edgeware\
+.\\"\
+.\
+.\\"----- Licensing notice ---------------------------------------------------\
+.\\"\
+.\\" This file is part of Trivial IP Encryption (TrIPE).\
+.\\"\
+.\\" TrIPE is free software; you can redistribute it and/or modify\
+.\\" it under the terms of the GNU General Public License as published by\
+.\\" the Free Software Foundation; either version 2 of the License, or\
+.\\" (at your option) any later version.\
+.\\"\
+.\\" TrIPE is distributed in the hope that it will be useful,\
+.\\" but WITHOUT ANY WARRANTY; without even the implied warranty of\
+.\\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\
+.\\" GNU General Public License for more details.\
+.\\"\
+.\\" You should have received a copy of the GNU General Public License\
+.\\" along with TrIPE; if not, write to the Free Software Foundation,\
+.\\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\
+.\
+.\\"--------------------------------------------------------------------------\
+.so ../defs.man.in \\"@@@PRE@@@\
+.\
+.\\"--------------------------------------------------------------------------
+  p
+}
+1,/^\.TH/ d
+/^\.SH/i\
+.\
+.\\"--------------------------------------------------------------------------
+/^\.SH/ a\
+.
+/^\.S[SH]/ {
+  /"/ ! s:^\(...\) \(.*\):\1 "\2":
+}
+$a\
+.\
+.\\"----- That's all, folks --------------------------------------------------
+s:@configdir@:\*(/c:g
+s:@socketdir@:\*(/s:g
index 425a2a597629884ed41ef279e63e16065847a37c..d3053b1bf77d553a28d4fef364852f15123c436b 100644 (file)
@@ -45,9 +45,4 @@ man_MANS              += tripemon.1
 CLEANFILES             += tripemon.1
 EXTRA_DIST             += tripemon.1.in
 
-tripemon.1: tripemon.1.in Makefile
-       $(confsubst) $(srcdir)/tripemon.1.in >$@.new $(SUBSTITUTIONS) && \
-               mv $@.new $@
-
-
 ###----- That's all, folks --------------------------------------------------
index 45f705d6c5b8293466f913cfb541d43083fc89df..9126efb21731c5df834f45e56641438dbb119a50 100644 (file)
@@ -1,44 +1,51 @@
 .\" -*-nroff-*-
 .\".
-.de hP
-.IP
-\h'-\w'\fB\\$1\ \fP'u'\fB\\$1\ \fP\c
-..
-.de VS
-.sp 1
-.RS
-.nf
-.ft B
-..
-.de VE
-.ft R
-.fi
-.RE
-.sp 1
-..
-.ie t \{\
-.  ds o \(bu
-.  ds ss \s8\u
-.  ds se \d\s0
-.  if \n(.g \{\
-.    fam P
-.  \}
-.\}
-.el \{\
-.  ds o o
-.  ds ss ^
-.  ds se
-.\}
+.\" Manual for the graphical monitor
+.\"
+.\" (c) 2008 Straylight/Edgeware
+.\"
+.
+.\"----- Licensing notice ---------------------------------------------------
+.\"
+.\" This file is part of Trivial IP Encryption (TrIPE).
+.\"
+.\" TrIPE is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 2 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" TrIPE is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with TrIPE; if not, write to the Free Software Foundation,
+.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.
+.\"--------------------------------------------------------------------------
+.so ../defs.man.in \" @@@PRE@@@
+.
+.\"--------------------------------------------------------------------------
 .TH tripemon 1 "4 October 2005" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
+.
+.\"--------------------------------------------------------------------------
 .SH "NAME"
+.
 tripemon \- graphical monitor for tripe
+.
+.\"--------------------------------------------------------------------------
 .SH "SYNOPSIS"
+.
 .B tripemon
 .RB [ \-d
 .IR dir ]
 .RB [ \-a
 .IR socket ]
+.
+.\"--------------------------------------------------------------------------
 .SH "DESCRIPTION"
+.
 The
 .B tripemon
 program is a fairly simple graphical monitor program for TrIPE.  It's
@@ -71,7 +78,7 @@ directory.  The default directory, if this option is not specified, is
 taken from the environment variable
 .BR TRIPEDIR ;
 if that's not defined either, a default default of
-.B @configdir@
+.B *(/c
 is used.
 .TP
 .BI "\-a, \-\-admin-socket=" socket
@@ -80,12 +87,20 @@ Connect to the named administration
 The default socket is given by the environment variable
 .BR TRIPESOCK ;
 if that's not defined either, a default default of
-.B @socketdir@/tripesock
+.B *(/s/tripesock
 is used.
 
+.
+.\"--------------------------------------------------------------------------
 .SH "SEE ALSO"
+.
 .BR tripectl (1),
 .BR tripe\-admin (5),
 .BR tripe (8).
+.
+.\"--------------------------------------------------------------------------
 .SH "AUTHOR"
+.
 Mark Wooding, <mdw@distorted.org.uk>
+.
+.\"----- That's all, folks --------------------------------------------------
index d5fb6a900b667a2e31577d63729947d54f2f23fe..faafe0a72adc4a71a75a948121af2e08c385e3ca 100644 (file)
@@ -36,6 +36,7 @@ bin_PROGRAMS          += pkstream
 pkstream_SOURCES        = pkstream.c
 
 man_MANS               += pkstream.1
-EXTRA_DIST             += pkstream.1
+CLEANFILES             += pkstream.1
+EXTRA_DIST             += pkstream.1.in
 
 ###----- That's all, folks --------------------------------------------------
similarity index 63%
rename from pkstream/pkstream.1
rename to pkstream/pkstream.1.in
index 1de6d13f37dd9797748248ddba242abf490600c2..c2a391a2218433befb6eb78c1ef0b0fb77e8a069 100644 (file)
@@ -1,38 +1,42 @@
 .\" -*-nroff-*-
 .\".
-.de hP
-.IP
-\h'-\w'\fB\\$1\ \fP'u'\fB\\$1\ \fP\c
-..
-.de VS
-.sp 1
-.RS
-.nf
-.ft B
-..
-.de VE
-.ft R
-.fi
-.RE
-.sp 1
-..
-.ie t \{\
-.  ds o \(bu
-.  ds ss \s8\u
-.  ds se \d\s0
-.  if \n(.g \{\
-.    fam P
-.  \}
-.\}
-.el \{\
-.  ds o o
-.  ds ss ^
-.  ds se
-.\}
+.\" Manual for the simple packet streamer
+.\"
+.\" (c) 2008 Straylight/Edgeware
+.\"
+.
+.\"----- Licensing notice ---------------------------------------------------
+.\"
+.\" This file is part of Trivial IP Encryption (TrIPE).
+.\"
+.\" TrIPE is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 2 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" TrIPE is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with TrIPE; if not, write to the Free Software Foundation,
+.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.
+.\"--------------------------------------------------------------------------
+.so ../defs.man.in \" @@@PRE@@@
+.
+.\"--------------------------------------------------------------------------
 .TH pkstream 1 "23 April 2003" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
+.
+.\"--------------------------------------------------------------------------
 .SH "NAME"
+.
 pkstream \- forward UDP packets over streams
+.
+.\"--------------------------------------------------------------------------
 .SH "SYNOPSIS"
+.
 .B pkstream
 .RB [ \-l
 .IR port ]
@@ -48,7 +52,10 @@ pkstream \- forward UDP packets over streams
 
 .IB addr : port
 .IB addr : port
+.
+.\"--------------------------------------------------------------------------
 .SH "DESCRIPTION"
+.
 The
 .B pkstream
 program forwards UDP packets over some kind of reliable stream.  It
@@ -120,7 +127,10 @@ and
 .I port
 and forward packets over the TCP connection rather than using stdin and
 stdout.
+.
+.\"--------------------------------------------------------------------------
 .SH "Protocol"
+.
 The stream protocol is very simple.  Each packet is preceded by a
 two-octet length field in network byte order.  The length is number of
 octets in the following packet (i.e., it does
@@ -128,14 +138,25 @@ octets in the following packet (i.e., it does
 include the length field itself).  There is no padding between packets.
 The only way a stream can be invalid is if it stops in the middle of a
 packet.
+.
+.\"--------------------------------------------------------------------------
 .SH "BUGS"
+.
 The code hasn't been audited.  It may contain security bugs.  If you
 find one, please inform the author
 .IR immediately .
+.
+.\"--------------------------------------------------------------------------
 .SH "SEE ALSO"
+.
 .BR fw (1),
 .BR ssh (1),
 .BR stunnel (1),
 .BR tripe (8).
+.
+.\"--------------------------------------------------------------------------
 .SH "AUTHOR"
+.
 Mark Wooding, <mdw@distorted.org.uk>
+.
+.\"----- That's all, folks --------------------------------------------------
index 77dbc9fc5a346ee1bf1ccd8bccb14e5f9f612220..54add7ec5545177d7f317594310f11720eca0227 100644 (file)
@@ -37,6 +37,7 @@ tripe_mitm_LDADD       = $(catacomb_LIBS)
 tripe_mitm_SOURCES      = tripe-mitm.c
 
 man_MANS               += tripe-mitm.8
-EXTRA_DIST             += tripe-mitm.8
+CLEANFILES             += tripe-mitm.8
+EXTRA_DIST             += tripe-mitm.8.in
 
 ###----- That's all, folks --------------------------------------------------
similarity index 76%
rename from proxy/tripe-mitm.8
rename to proxy/tripe-mitm.8.in
index 843d1853a4cef3be2a4dc02a3caead458c5035eb..5f970f24b00dbe2ec10abed6fef7ae1965ce7f2d 100644 (file)
@@ -1,43 +1,50 @@
 .\" -*-nroff-*-
 .\".
-.de hP
-.IP
-\h'-\w'\fB\\$1\ \fP'u'\fB\\$1\ \fP\c
-..
-.de VS
-.sp 1
-.RS
-.nf
-.ft B
-..
-.de VE
-.ft R
-.fi
-.RE
-.sp 1
-..
-.ie t \{\
-.  ds o \(bu
-.  ds ss \s8\u
-.  ds se \d\s0
-.  if \n(.g \{\
-.    fam P
-.  \}
-.\}
-.el \{\
-.  ds o o
-.  ds ss ^
-.  ds se
-.\}
+.\" Manual for the malicious proxy
+.\"
+.\" (c) 2008 Straylight/Edgeware
+.\"
+.
+.\"----- Licensing notice ---------------------------------------------------
+.\"
+.\" This file is part of Trivial IP Encryption (TrIPE).
+.\"
+.\" TrIPE is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 2 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" TrIPE is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with TrIPE; if not, write to the Free Software Foundation,
+.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.
+.\"--------------------------------------------------------------------------
+.so ../defs.man.in \" @@@PRE@@@
+.
+.\"--------------------------------------------------------------------------
 .TH tripe-mitm 8 "14 October 2003" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
+.
+.\"--------------------------------------------------------------------------
 .SH "NAME"
+.
 tripe-mitm \- malicious proxy for TrIPE
+.
+.\"--------------------------------------------------------------------------
 .SH "SYNOPSIS"
+.
 .B tripe-mitm
 .RB [ \-k
 .IR keyring ]
 .IR directive ...
+.
+.\"--------------------------------------------------------------------------
 .SH "DESCRIPTION"
+.
 The
 .B tripe-mitm
 program is a
@@ -202,13 +209,24 @@ randomly chosen byte mangled.  The message might be further corrupted,
 again with a 1 in
 .I p-corrupt
 probability.
+.
+.\"--------------------------------------------------------------------------
 .SH "BUGS"
+.
 The parser is currently very primitive, and error handling is rather
 poor.  There are lots of pointless restrictions which wouldn't take very
 long to fix.  The program generally lacks polish.  The program doesn't
 understand the TrIPE protocol to a sufficient extent to really attack it
 properly.
+.
+.\"--------------------------------------------------------------------------
 .SH "SEE ALSO"
+.
 .BR tripe (8).
+.
+.\"--------------------------------------------------------------------------
 .SH "AUTHOR"
+.
 Mark Wooding, <mdw@distorted.org.uk>
+.
+.\"----- That's all, folks --------------------------------------------------
index 1f4a3722f20143408250b10abc3d05eba2f4e83f..fe904419cc440417e2e7953f530337ff3e74ff15 100644 (file)
@@ -60,17 +60,15 @@ man_MANS            += tripe.8
 CLEANFILES             += tripe.8
 EXTRA_DIST             += tripe.8.in
 
-tripe.8: tripe.8.in Makefile
-       $(confsubst) $(srcdir)/tripe.8.in >$@.new $(SUBSTITUTIONS) && \
-               mv $@.new $@
-
 ## The admin protocol manual page.
 man_MANS               += tripe-admin.5
-EXTRA_DIST             += tripe-admin.5.in make-summary
 CLEANFILES             += tripe-admin.5
+EXTRA_DIST             += tripe-admin.5.in make-summary
 
-tripe-admin.5: tripe-admin.5.in make-summary
-       awk -f $(srcdir)/make-summary <$(srcdir)/tripe-admin.5.in >$@.new
+tripe-admin.5: tripe-admin.5.in make-summary $(mandefs)
+       awk -f $(srcdir)/make-summary <$(srcdir)/tripe-admin.5.in >$@.tmp
+       $(mansubst) $@.tmp >$@.new
+       rm -f $@.tmp
        mv $@.new $@
 
 ###----- That's all, folks --------------------------------------------------
index 2aff34c6e511f4a5f2a45c64b634bd8e31aa3719..352ebafdd71ba2634b7cc0fe2f63cea8aeda16c7 100755 (executable)
@@ -13,7 +13,7 @@ BEGIN { n = 0; opts = 0; sep = 0; }
 /^\.\\\"\+sep$/ { sep = 1; }
 /^\.\\\"\-sep$/ { sep = 0; }
 /^\.\\\"\-opts$/ { opts = 0; lines[n] = lines[n] ".RE\n"; }
-/^\.SP/ { print; getline; lines[n] = lines[n] $0 "\n"; }
+/^\.SP/ { print ".TP"; getline; lines[n] = lines[n] $0 "\n"; }
 /^\.TP/ { if (opts) { print; getline; lines[n] = lines[n] $0 "\n"; } }
 /^\.SS/ { if (sep) lines[n] = lines[n] ".PP\n"; }
 
index caaf2557833cc5c3c9f58b2fc4fb1792ddfaa078..201b464be46bb33b74ab1c099656d168dec40823 100644 (file)
@@ -1,18 +1,42 @@
 .\" -*-nroff-*-
+.\".
+.\" Manual for the administration protocol
+.\"
+.\" (c) 2008 Straylight/Edgeware
 .\"
-.ie t \{\
-.  if \n(.g \{\
-.    fam P
-.  \}
-.\}
 .
-.de SP
-.TP
-..
+.\"----- Licensing notice ---------------------------------------------------
+.\"
+.\" This file is part of Trivial IP Encryption (TrIPE).
+.\"
+.\" TrIPE is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 2 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" TrIPE is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with TrIPE; if not, write to the Free Software Foundation,
+.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.
+.\"--------------------------------------------------------------------------
+.so ../defs.man.in \" @@@PRE@@@
+.
+.\"--------------------------------------------------------------------------
 .TH tripe-admin 5 "18 February 2001" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
-.SH NAME
+.
+.\"--------------------------------------------------------------------------
+.SH "NAME"
+.
 tripe-admin \- administrator commands for TrIPE
-.SH DESCRIPTION
+.
+.\"--------------------------------------------------------------------------
+.SH "DESCRIPTION"
+.
 This manual page describes the administration interface provided by the
 .BR tripe (8)
 daemon.
@@ -265,7 +289,10 @@ to the end of the line.
 .PP
 Lowercase key letters control individual message types.  Uppercase key
 letters control collections of message types.
+.
+.\"--------------------------------------------------------------------------
 .SH "COMMAND REFERENCE"
+.
 .\"* 10 Commands
 The commands provided are:
 .SP
@@ -734,7 +761,10 @@ All of the above.
 Issues a
 .B USER
 warning to all interested administration clients.
+.
+.\"--------------------------------------------------------------------------
 .SH "ERROR MESSAGES"
+.
 .\"* 20 Error messages (FAIL codes)
 The following
 .B FAIL
@@ -896,7 +926,10 @@ The given
 .I tag
 is not the tag for any outstanding background job.  It may have just
 finished.
+.
+.\"--------------------------------------------------------------------------
 .SH "NOTIFICATIONS"
+.
 .\"* 30 Notification broadcasts (NOTE codes)
 The following notifications are sent to clients who request them.
 .SP
@@ -959,7 +992,10 @@ is no longer available.
 An administration client issued a notification using the
 .B NOTIFY
 command.
+.
+.\"--------------------------------------------------------------------------
 .SH "WARNINGS"
+.
 .\"* 40 Warning broadcasts (WARN codes)
 .\"+sep
 There are many possible warnings.  They are categorized according to
@@ -1327,7 +1363,10 @@ command.
 .BI "USER " tokens\fR...
 An administration client issued a warning.
 .\"-sep
+.
+.\"--------------------------------------------------------------------------
 .SH "SUMMARY"
+.
 .SS "Command responses"
 .nf
 .BI "BGDETACH " tag
@@ -1339,10 +1378,18 @@ An administration client issued a warning.
 .B OK
 .fi
 .\"= summary
+.
+.\"--------------------------------------------------------------------------
 .SH "SEE ALSO"
+.
 .BR tripectl (1),
 .BR tripe (8).
 .PP
 .IR "The Trivial IP Encryption Protocol" .
+.
+.\"--------------------------------------------------------------------------
 .SH "AUTHOR"
+.
 Mark Wooding, <mdw@distorted.org.uk>
+.
+.\"----- That's all, folks --------------------------------------------------
index c72a35489f07842c8f124344ebf3c3cc0257995a..2135c4e002bf536a9abd675f41e4dc09e61b8a23 100644 (file)
@@ -1,38 +1,42 @@
 .\" -*-nroff-*-
 .\".
-.de hP
-.IP
-\h'-\w'\fB\\$1\ \fP'u'\fB\\$1\ \fP\c
-..
-.de VS
-.sp 1
-.RS
-.nf
-.ft B
-..
-.de VE
-.ft R
-.fi
-.RE
-.sp 1
-..
-.ie t \{\
-.  ds o \(bu
-.  ds ss \s8\u
-.  ds se \d\s0
-.  if \n(.g \{\
-.    fam P
-.  \}
-.\}
-.el \{\
-.  ds o o
-.  ds ss ^
-.  ds se
-.\}
+.\" Manual for the server
+.\"
+.\" (c) 2008 Straylight/Edgeware
+.\"
+.
+.\"----- Licensing notice ---------------------------------------------------
+.\"
+.\" This file is part of Trivial IP Encryption (TrIPE).
+.\"
+.\" TrIPE is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 2 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" TrIPE is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with TrIPE; if not, write to the Free Software Foundation,
+.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.
+.\"--------------------------------------------------------------------------
+.so ../defs.man.in \" @@@PRE@@@
+.
+.\"--------------------------------------------------------------------------
 .TH tripe 8 "10 February 2001" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
+.
+.\"--------------------------------------------------------------------------
 .SH "NAME"
+.
 tripe \- a simple VPN daemon
+.
+.\"--------------------------------------------------------------------------
 .SH "SYNOPSIS"
+.
 .B tripe
 .RB [ \-D ]
 .RB [ \-d
@@ -61,7 +65,10 @@ tripe \- a simple VPN daemon
 .IR pub-keyring ]
 .RB [ \-t
 .IR key-tag ]
+.
+.\"--------------------------------------------------------------------------
 .SH "DESCRIPTION"
+.
 The
 .B tripe
 program is a server which can provide strong IP-level encryption and
@@ -99,7 +106,7 @@ will initialize by following these steps:
 It sets the directory named by the
 .B TRIPEDIR
 environment variable (or
-.B "@configdir@"
+.B "*(/c"
 if the variable is unset) as the current directory.
 .hP 2.
 It acquires a UDP socket with an arbitrary kernel-selected port number.
@@ -173,7 +180,7 @@ the current directory.  The default directory to change to is given by
 the environment variable
 .BR TRIPEDIR ;
 if that's not specified, a default default of
-.B "@configdir@"
+.B "*(/c"
 is used.  Give a current directory of
 .B .
 if you don't want it to change directory at all.
@@ -234,7 +241,7 @@ The default socket, if this option isn't specified, is given by the
 environment variable
 .BR TRIPESOCK ;
 if that's not set either, then a default default of
-.B "@socketdir@/tripesock"
+.B "*(/s/tripesock"
 is used instead.
 .TP
 .BI "\-T, \-\-trace=" trace-opts
@@ -531,16 +538,27 @@ The program's name is
 all in lower-case.  The name of the protocol it uses is `TrIPE', with
 four capital letters and one lower-case.  The name stands for `Trivial
 IP Encryption'.
+.
+.\"--------------------------------------------------------------------------
 .SH "BUGS"
+.
 The code hasn't been audited.  It may contain security bugs.  If you
 find one, please inform the author
 .IR immediately .
+.
+.\"--------------------------------------------------------------------------
 .SH "SEE ALSO"
+.
 .BR key (1),
 .BR tripectl (1),
 .BR tripe\-admin (5).
 .PP
 .IR "The Trivial IP Encryption Protocol" ,
 .IR "The Wrestlers Protocol" .
+.
+.\"--------------------------------------------------------------------------
 .SH "AUTHOR"
+.
 Mark Wooding, <mdw@distorted.org.uk>
+.
+.\"----- That's all, folks --------------------------------------------------
diff --git a/vars.am b/vars.am
index 4c2b81580fc7f7e4dc2e013e0890ec36e1dcbbe4..2e680025c07886a8a2528c62d019be86d7371268 100644 (file)
--- a/vars.am
+++ b/vars.am
@@ -67,4 +67,29 @@ SUBSTITUTIONS = \
                pidfile=$(pidfile) logfile=$(logfile) \
                PYTHON=$(PYTHON)
 
+###--------------------------------------------------------------------------
+### Manpage substitutions.
+
+SUFFIXES               += .1 .1.in
+SUFFIXES               += .5 .5.in
+SUFFIXES               += .7 .7.in
+SUFFIXES               += .8 .8.in
+
+mandefs = $(top_builddir)/defs.man
+
+mansubst = sed \
+       -e '/@@@PRE@@@/ {' \
+       -e   'r$(mandefs)' \
+       -e   'd' \
+       -e '}'
+
+.1.in.1 .5.in.5 .7.in.7 .8.in.8: $(mandefs)
+       $(mansubst) $< >$@.new && mv $@.new $@
+
+$(mandefs): $(top_srcdir)/defs.man.in Makefile
+       $(confsubst) $(top_srcdir)/defs.man.in >$@.new $(SUBSTITUTIONS)
+       sed '/^\.$$/ d; /^\.\\"/ d' $@.new >$@.new2
+       rm -f $@.new
+       mv $@.new2 $@
+
 ###----- That's all, folks --------------------------------------------------