aboutsummaryrefslogtreecommitdiffstats
path: root/doc/manpage.d
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-04-28 07:14:48 +0000
committerMartin Willi <martin@strongswan.org>2006-04-28 07:14:48 +0000
commit997358a6c475c8886cce388ab325184a1ff733c9 (patch)
tree27a15790e030fc186d00cd710d2a3540f4defe69 /doc/manpage.d
parent52923c9acb349adec3d1cc039e7a74c2e822da6e (diff)
downloadstrongswan-997358a6c475c8886cce388ab325184a1ff733c9.tar.bz2
strongswan-997358a6c475c8886cce388ab325184a1ff733c9.tar.xz
- import of strongswan-2.7.0
- applied patch for charon
Diffstat (limited to 'doc/manpage.d')
-rw-r--r--doc/manpage.d/ipsec.8.html215
-rw-r--r--doc/manpage.d/ipsec.conf.5.html1830
-rw-r--r--doc/manpage.d/ipsec.secrets.5.html227
-rw-r--r--doc/manpage.d/ipsec__confread.8.html58
-rw-r--r--doc/manpage.d/ipsec__copyright.8.html62
-rw-r--r--doc/manpage.d/ipsec__include.8.html67
-rw-r--r--doc/manpage.d/ipsec__keycensor.8.html64
-rw-r--r--doc/manpage.d/ipsec__plutoload.8.html64
-rw-r--r--doc/manpage.d/ipsec__plutorun.8.html70
-rw-r--r--doc/manpage.d/ipsec__realsetup.8.html68
-rw-r--r--doc/manpage.d/ipsec__secretcensor.8.html65
-rw-r--r--doc/manpage.d/ipsec__startklips.8.html63
-rw-r--r--doc/manpage.d/ipsec__updown.8.html63
-rw-r--r--doc/manpage.d/ipsec_addrbytesof.3.html232
-rw-r--r--doc/manpage.d/ipsec_addrbytesptr.3.html232
-rw-r--r--doc/manpage.d/ipsec_addrcmp.3.html274
-rw-r--r--doc/manpage.d/ipsec_addrinsubnet.3.html274
-rw-r--r--doc/manpage.d/ipsec_addrlenof.3.html232
-rw-r--r--doc/manpage.d/ipsec_addrtoa.3.html448
-rw-r--r--doc/manpage.d/ipsec_addrtosubnet.3.html238
-rw-r--r--doc/manpage.d/ipsec_addrtot.3.html569
-rw-r--r--doc/manpage.d/ipsec_addrtypeof.3.html232
-rw-r--r--doc/manpage.d/ipsec_anyaddr.3.html166
-rw-r--r--doc/manpage.d/ipsec_atoaddr.3.html448
-rw-r--r--doc/manpage.d/ipsec_atoasr.3.html294
-rw-r--r--doc/manpage.d/ipsec_atosa.3.html347
-rw-r--r--doc/manpage.d/ipsec_atosubnet.3.html448
-rw-r--r--doc/manpage.d/ipsec_atoul.3.html266
-rw-r--r--doc/manpage.d/ipsec_auto.8.html416
-rw-r--r--doc/manpage.d/ipsec_barf.8.html150
-rw-r--r--doc/manpage.d/ipsec_bitstomask.3.html122
-rw-r--r--doc/manpage.d/ipsec_broadcastof.3.html107
-rw-r--r--doc/manpage.d/ipsec_calcgoo.8.html78
-rw-r--r--doc/manpage.d/ipsec_copyright_notice.3.html94
-rw-r--r--doc/manpage.d/ipsec_datatot.3.html439
-rw-r--r--doc/manpage.d/ipsec_eroute.5.html370
-rw-r--r--doc/manpage.d/ipsec_eroute.8.html421
-rw-r--r--doc/manpage.d/ipsec_goodmask.3.html122
-rw-r--r--doc/manpage.d/ipsec_hostof.3.html107
-rw-r--r--doc/manpage.d/ipsec_ikeping.8.html137
-rw-r--r--doc/manpage.d/ipsec_initaddr.3.html232
-rw-r--r--doc/manpage.d/ipsec_initsaid.3.html453
-rw-r--r--doc/manpage.d/ipsec_initsubnet.3.html238
-rw-r--r--doc/manpage.d/ipsec_isanyaddr.3.html166
-rw-r--r--doc/manpage.d/ipsec_isloopbackaddr.3.html166
-rw-r--r--doc/manpage.d/ipsec_isunspecaddr.3.html166
-rw-r--r--doc/manpage.d/ipsec_keyblobtoid.3.html174
-rw-r--r--doc/manpage.d/ipsec_klipsdebug.5.html229
-rw-r--r--doc/manpage.d/ipsec_klipsdebug.8.html264
-rw-r--r--doc/manpage.d/ipsec_look.8.html76
-rw-r--r--doc/manpage.d/ipsec_loopbackaddr.3.html166
-rw-r--r--doc/manpage.d/ipsec_lwdnsq.8.html400
-rw-r--r--doc/manpage.d/ipsec_mailkey.8.html97
-rw-r--r--doc/manpage.d/ipsec_manual.8.html414
-rw-r--r--doc/manpage.d/ipsec_maskof.3.html238
-rw-r--r--doc/manpage.d/ipsec_masktobits.3.html122
-rw-r--r--doc/manpage.d/ipsec_masktocount.3.html238
-rw-r--r--doc/manpage.d/ipsec_networkof.3.html238
-rw-r--r--doc/manpage.d/ipsec_newhostkey.8.html196
-rw-r--r--doc/manpage.d/ipsec_optionsfrom.3.html275
-rw-r--r--doc/manpage.d/ipsec_pf_key.5.html176
-rw-r--r--doc/manpage.d/ipsec_pf_key.8.html122
-rw-r--r--doc/manpage.d/ipsec_pluto.8.html1824
-rw-r--r--doc/manpage.d/ipsec_portof.3.html143
-rw-r--r--doc/manpage.d/ipsec_prng.3.html204
-rw-r--r--doc/manpage.d/ipsec_prng_bytes.3.html204
-rw-r--r--doc/manpage.d/ipsec_prng_final.3.html204
-rw-r--r--doc/manpage.d/ipsec_prng_init.3.html204
-rw-r--r--doc/manpage.d/ipsec_ranbits.8.html147
-rw-r--r--doc/manpage.d/ipsec_rangetoa.3.html294
-rw-r--r--doc/manpage.d/ipsec_rangetosubnet.3.html116
-rw-r--r--doc/manpage.d/ipsec_rsasigkey.8.html401
-rw-r--r--doc/manpage.d/ipsec_sameaddr.3.html274
-rw-r--r--doc/manpage.d/ipsec_sameaddrtype.3.html274
-rw-r--r--doc/manpage.d/ipsec_samesaid.3.html274
-rw-r--r--doc/manpage.d/ipsec_samesubnet.3.html274
-rw-r--r--doc/manpage.d/ipsec_samesubnettype.3.html274
-rw-r--r--doc/manpage.d/ipsec_satoa.3.html347
-rw-r--r--doc/manpage.d/ipsec_satot.3.html453
-rw-r--r--doc/manpage.d/ipsec_send-pr.8.html427
-rw-r--r--doc/manpage.d/ipsec_setportof.3.html143
-rw-r--r--doc/manpage.d/ipsec_setup.8.html237
-rw-r--r--doc/manpage.d/ipsec_showdefaults.8.html82
-rw-r--r--doc/manpage.d/ipsec_showhostkey.8.html269
-rw-r--r--doc/manpage.d/ipsec_showpolicy.8.html88
-rw-r--r--doc/manpage.d/ipsec_sockaddrlenof.3.html143
-rw-r--r--doc/manpage.d/ipsec_sockaddrof.3.html143
-rw-r--r--doc/manpage.d/ipsec_spi.5.html305
-rw-r--r--doc/manpage.d/ipsec_spi.8.html790
-rw-r--r--doc/manpage.d/ipsec_spigrp.5.html193
-rw-r--r--doc/manpage.d/ipsec_spigrp.8.html280
-rw-r--r--doc/manpage.d/ipsec_splitkeytoid.3.html174
-rw-r--r--doc/manpage.d/ipsec_subnetinsubnet.3.html274
-rw-r--r--doc/manpage.d/ipsec_subnetishost.3.html274
-rw-r--r--doc/manpage.d/ipsec_subnetof.3.html107
-rw-r--r--doc/manpage.d/ipsec_subnettoa.3.html448
-rw-r--r--doc/manpage.d/ipsec_subnettot.3.html569
-rw-r--r--doc/manpage.d/ipsec_subnettypeof.3.html238
-rw-r--r--doc/manpage.d/ipsec_tnatoaddr.3.html569
-rw-r--r--doc/manpage.d/ipsec_tncfg.5.html175
-rw-r--r--doc/manpage.d/ipsec_tncfg.8.html195
-rw-r--r--doc/manpage.d/ipsec_trap_count.5.html74
-rw-r--r--doc/manpage.d/ipsec_trap_sendcount.5.html72
-rw-r--r--doc/manpage.d/ipsec_ttoaddr.3.html569
-rw-r--r--doc/manpage.d/ipsec_ttodata.3.html439
-rw-r--r--doc/manpage.d/ipsec_ttosa.3.html453
-rw-r--r--doc/manpage.d/ipsec_ttosubnet.3.html569
-rw-r--r--doc/manpage.d/ipsec_ttoul.3.html310
-rw-r--r--doc/manpage.d/ipsec_ultoa.3.html266
-rw-r--r--doc/manpage.d/ipsec_ultot.3.html310
-rw-r--r--doc/manpage.d/ipsec_unspecaddr.3.html166
-rw-r--r--doc/manpage.d/ipsec_verify.8.html107
-rw-r--r--doc/manpage.d/ipsec_version.3.html94
-rw-r--r--doc/manpage.d/ipsec_version.5.html103
-rw-r--r--doc/manpage.d/ipsec_version_code.3.html94
-rw-r--r--doc/manpage.d/ipsec_version_string.3.html94
-rw-r--r--doc/manpage.d/ipsec_whack.8.html1824
117 files changed, 32603 insertions, 0 deletions
diff --git a/doc/manpage.d/ipsec.8.html b/doc/manpage.d/ipsec.8.html
new file mode 100644
index 000000000..ff9b7ca39
--- /dev/null
+++ b/doc/manpage.d/ipsec.8.html
@@ -0,0 +1,215 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC</TITLE>
+</HEAD><BODY>
+<H1>IPSEC</H1>
+Section: Maintenance Commands (8)<BR>Updated: 26 March 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec - invoke IPsec utilities
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+command [ argument ...]
+<P>
+<B>ipsec</B>
+
+<B>--help</B>
+
+<BR>
+
+<B>ipsec</B>
+
+<B>--version</B>
+
+<BR>
+
+<B>ipsec</B>
+
+<B>--versioncode</B>
+
+<BR>
+
+<B>ipsec</B>
+
+<B>--copyright</B>
+
+<BR>
+
+<B>ipsec</B>
+
+<B>--directory</B>
+
+<BR>
+
+<B>ipsec</B>
+
+<B>--confdir</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Ipsec</I>
+
+invokes any of several utilities involved in controlling the IPsec
+encryption/authentication system,
+running the specified
+<I>command</I>
+
+with the specified
+<I>argument</I>s
+
+as if it had been invoked directly.
+This largely eliminates possible name collisions with other software,
+and also permits some centralized services.
+<P>
+
+In particular,
+<I>ipsec</I>
+
+supplies the invoked
+<I>command</I>
+
+with a suitable PATH environment variable,
+and also provides IPSEC_DIR,
+IPSEC_CONFS, and IPSEC_VERSION environment variables,
+containing respectively
+the full pathname of the directory where the IPsec utilities are stored,
+the full pathname of the directory where the configuration files live,
+and the IPsec version number.
+<P>
+
+<B>ipsec --help</B>
+
+lists the available commands.
+Most have their own manual pages, e.g.
+<I><A HREF="ipsec_auto.8.html">ipsec_auto</A></I>(8)
+
+for
+<I>auto</I>.
+
+<P>
+
+<B>ipsec --version</B>
+
+outputs version information about Linux FreeS/WAN.
+A version code of the form ``U<I>xxx</I>/K<I>yyy</I>''
+indicates that the user-level utilities are version <I>xxx</I>
+but the kernel portion appears to be version <I>yyy</I>
+(this form is used only if the two disagree).
+<P>
+
+<B>ipsec --versioncode</B>
+
+outputs <I>just</I> the version code,
+with none of
+<B>--version</B>'s
+
+supporting information,
+for use by scripts.
+<P>
+
+<B>ipsec --copyright</B>
+
+supplies boring copyright details.
+<P>
+
+<B>ipsec --directory</B>
+
+reports where
+<I>ipsec</I>
+
+thinks the IPsec utilities are stored.
+<P>
+
+<B>ipsec --confdir</B>
+
+reports where
+<I>ipsec</I>
+
+thinks the IPsec configuration files are stored.
+<A NAME="lbAE">&nbsp;</A>
+<H2>FILES</H2>
+
+/usr/local/lib/ipsec<TT>&nbsp;&nbsp;&nbsp;</TT>usual utilities directory<BR>
+<A NAME="lbAF">&nbsp;</A>
+<H2>ENVIRONMENT</H2>
+
+<P>
+
+The following environment variables control where FreeS/WAN finds its
+components.
+The
+<B>ipsec</B>
+
+command sets them if they are not already set.
+<PRE>
+IPSEC_EXECDIR directory containing published commands
+IPSEC_LIBDIR directory containing internal executables
+IPSEC_SBINDIR directory containing <B>ipsec</B> command
+IPSEC_CONFS directory containing configuration files
+</PRE>
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+
+
+<A HREF="ipsec.conf.5.html">ipsec.conf</A>(5), <A HREF="ipsec.secrets.5.html">ipsec.secrets</A>(5),
+<A HREF="ipsec_auto.8.html">ipsec_auto</A>(8),
+<A HREF="ipsec_barf.8.html">ipsec_barf</A>(8),
+<A HREF="ipsec_setup.8.html">ipsec_setup</A>(8),
+<A HREF="ipsec_showdefaults.8.html">ipsec_showdefaults</A>(8),
+<A HREF="ipsec_showhostkey.8.html">ipsec_showhostkey</A>(8)
+
+
+<P>
+
+HTML documentation shipped with the release, starting with
+<I>doc/index.html</I>.
+
+<I>&lt;<A HREF="http://www.freeswan.org/doc.html">http://www.freeswan.org/doc.html</A>&gt;</I>
+
+may also be of use.
+<A NAME="lbAH">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for Linux FreeS/WAN
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by Henry Spencer.
+<A NAME="lbAI">&nbsp;</A>
+<H2>BUGS</H2>
+
+The provision of centralized services,
+while convenient,
+does compromise the original concept of making the utilities
+invocable directly as well as via
+<I>ipsec</I>.
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">FILES</A><DD>
+<DT><A HREF="#lbAF">ENVIRONMENT</A><DD>
+<DT><A HREF="#lbAG">SEE ALSO</A><DD>
+<DT><A HREF="#lbAH">HISTORY</A><DD>
+<DT><A HREF="#lbAI">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec.conf.5.html b/doc/manpage.d/ipsec.conf.5.html
new file mode 100644
index 000000000..36e0452ef
--- /dev/null
+++ b/doc/manpage.d/ipsec.conf.5.html
@@ -0,0 +1,1830 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC.CONF</TITLE>
+</HEAD><BODY>
+<H1>IPSEC.CONF</H1>
+Section: File Formats (5)<BR>Updated: 26 Nov 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec.conf - IPsec configuration and connections
+<A NAME="lbAC">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The optional
+<I>ipsec.conf</I>
+
+file
+specifies most configuration and control information for the
+FreeS/WAN IPsec subsystem.
+(The major exception is secrets for authentication;
+see
+<I><A HREF="ipsec.secrets.5.html">ipsec.secrets</A></I>(5).)
+
+Its contents are not security-sensitive
+<I>unless</I>
+
+manual keying is being done for more than just testing,
+in which case the encryption/authentication keys in the
+descriptions for the manually-keyed connections are very sensitive
+(and those connection descriptions
+are probably best kept in a separate file,
+via the include facility described below).
+<P>
+
+The file is a text file, consisting of one or more
+<I>sections</I>.
+
+White space followed by
+<B>#</B>
+
+followed by anything to the end of the line
+is a comment and is ignored,
+as are empty lines which are not within a section.
+<P>
+
+A line which contains
+<B>include</B>
+
+and a file name, separated by white space,
+is replaced by the contents of that file,
+preceded and followed by empty lines.
+If the file name is not a full pathname,
+it is considered to be relative to the directory containing the
+including file.
+Such inclusions can be nested.
+Only a single filename may be supplied, and it may not contain white space,
+but it may include shell wildcards (see
+<I><A HREF="sh.1.html">sh</A></I>(1));
+
+for example:
+<P>
+
+<B>include</B>
+
+<B>ipsec.*.conf</B>
+
+<P>
+
+The intention of the include facility is mostly to permit keeping
+information on connections, or sets of connections,
+separate from the main configuration file.
+This permits such connection descriptions to be changed,
+copied to the other security gateways involved, etc.,
+without having to constantly extract them from the configuration
+file and then insert them back into it.
+Note also the
+<B>also</B>
+
+and
+<B>alsoflip</B>
+
+parameters (described below) which permit splitting a single logical section
+(e.g. a connection description) into several actual sections.
+<P>
+
+The first significant line of the file must specify the version
+of this specification that it conforms to:
+<P>
+
+<B>version 2</B>
+<P>
+
+A section
+begins with a line of the form:
+<P>
+
+<I>type</I>
+
+<I>name</I>
+
+<P>
+
+where
+<I>type</I>
+
+indicates what type of section follows, and
+<I>name</I>
+
+is an arbitrary name which distinguishes the section from others
+of the same type.
+(Names must start with a letter and may contain only
+letters, digits, periods, underscores, and hyphens.)
+All subsequent non-empty lines
+which begin with white space are part of the section;
+comments within a section must begin with white space too.
+There may be only one section of a given type with a given name.
+<P>
+
+Lines within the section are generally of the form
+<P>
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<I>parameter</I><B>=</B><I>value</I>
+<P>
+
+(note the mandatory preceding white space).
+There can be white space on either side of the
+<B>=</B>.
+
+Parameter names follow the same syntax as section names,
+and are specific to a section type.
+Unless otherwise explicitly specified,
+no parameter name may appear more than once in a section.
+<P>
+
+An empty
+<I>value</I>
+
+stands for the system default value (if any) of the parameter,
+i.e. it is roughly equivalent to omitting the parameter line entirely.
+A
+<I>value</I>
+
+may contain white space only if the entire
+<I>value</I>
+
+is enclosed in double quotes (<B>&quot;</B>);
+a
+<I>value</I>
+
+cannot itself contain a double quote,
+nor may it be continued across more than one line.
+<P>
+
+Numeric values are specified to be either an ``integer''
+(a sequence of digits) or a ``decimal number''
+(sequence of digits optionally followed by `.' and another sequence of digits).
+<P>
+
+There is currently one parameter which is available in any type of
+section:
+<DL COMPACT>
+<DT><B>also</B>
+
+<DD>
+the value is a section name;
+the parameters of that section are appended to this section,
+as if they had been written as part of it.
+The specified section must exist, must follow the current one,
+and must have the same section type.
+(Nesting is permitted,
+and there may be more than one
+<B>also</B>
+
+in a single section,
+although it is forbidden to append the same section more than once.)
+This allows, for example, keeping the encryption keys
+for a connection in a separate file
+from the rest of the description, by using both an
+<B>also</B>
+
+parameter and an
+<B>include</B>
+
+line.
+(Caution, see BUGS below for some restrictions.)
+<DT><B>alsoflip</B>
+
+<DD>
+can be used in a
+<B>conn</B>
+
+section.
+It acts like an
+<B>also</B>
+
+that flips the referenced section's entries left-for-right.
+</DL>
+<P>
+
+Parameter names beginning with
+<B>x-</B>
+
+(or
+<B>X-</B>,
+
+or
+<B>x_</B>,
+
+or
+<B>X_</B>)
+
+are reserved for user extensions and will never be assigned meanings
+by IPsec.
+Parameters with such names must still observe the syntax rules
+(limits on characters used in the name;
+no white space in a non-quoted value;
+no newlines or double quotes within the value).
+All other as-yet-unused parameter names are reserved for future IPsec
+improvements.
+<P>
+
+A section with name
+<B>%default</B>
+
+specifies defaults for sections of the same type.
+For each parameter in it,
+any section of that type which does not have a parameter of the same name
+gets a copy of the one from the
+<B>%default</B>
+
+section.
+There may be multiple
+<B>%default</B>
+
+sections of a given type,
+but only one default may be supplied for any specific parameter name,
+and all
+<B>%default</B>
+
+sections of a given type must precede all non-<B>%default</B>
+
+sections of that type.
+<B>%default</B>
+
+sections may not contain
+<B>also</B>
+
+or
+<B>alsoflip</B>
+
+parameters.
+<P>
+
+Currently there are two types of section:
+a
+<B>config</B>
+
+section specifies general configuration information for IPsec,
+while a
+<B>conn</B>
+
+section specifies an IPsec connection.
+<A NAME="lbAD">&nbsp;</A>
+<H2>CONN SECTIONS</H2>
+
+A
+<B>conn</B>
+
+section contains a
+<I>connection specification</I>,
+
+defining a network connection to be made using IPsec.
+The name given is arbitrary, and is used to identify the connection to
+<I><A HREF="ipsec_auto.8.html">ipsec_auto</A></I>(8)
+
+and
+<I><A HREF="ipsec_manual.8.html">ipsec_manual</A></I>(8).
+
+Here's a simple example:
+<P>
+
+
+<PRE>
+<B>
+conn snt
+ left=10.11.11.1
+ leftsubnet=10.0.1.0/24
+ leftnexthop=172.16.55.66
+ right=192.168.22.1
+ rightsubnet=10.0.2.0/24
+ rightnexthop=172.16.88.99
+ keyingtries=%forever
+</B></PRE>
+
+<P>
+
+A note on terminology...
+In automatic keying, there are two kinds of communications going on:
+transmission of user IP packets, and gateway-to-gateway negotiations for
+keying, rekeying, and general control.
+The data path (a set of ``IPsec SAs'') used for user packets is herein
+referred to as the ``connection'';
+the path used for negotiations (built with ``ISAKMP SAs'') is referred to as
+the ``keying channel''.
+<P>
+
+To avoid trivial editing of the configuration file to suit it to each system
+involved in a connection,
+connection specifications are written in terms of
+<I>left</I>
+
+and
+<I>right</I>
+
+participants,
+rather than in terms of local and remote.
+Which participant is considered
+<I>left</I>
+
+or
+<I>right</I>
+
+is arbitrary;
+IPsec figures out which one it is being run on based on internal information.
+This permits using identical connection specifications on both ends.
+There are cases where there is no symmetry; a good convention is to
+use
+<I>left</I>
+
+for the local side and
+<I>right</I>
+
+for the remote side (the first letters are a good mnemonic).
+<P>
+
+Many of the parameters relate to one participant or the other;
+only the ones for
+<I>left</I>
+
+are listed here, but every parameter whose name begins with
+<B>left</B>
+
+has a
+<B>right</B>
+
+counterpart,
+whose description is the same but with
+<B>left</B>
+
+and
+<B>right</B>
+
+reversed.
+<P>
+
+Parameters are optional unless marked ``(required)'';
+a parameter required for manual keying need not be included for
+a connection which will use only automatic keying, and vice versa.
+<A NAME="lbAE">&nbsp;</A>
+<H3>CONN PARAMETERS: GENERAL</H3>
+
+The following parameters are relevant to both automatic and manual keying.
+Unless otherwise noted,
+for a connection to work,
+in general it is necessary for the two ends to agree exactly
+on the values of these parameters.
+<DL COMPACT>
+<DT><B>type</B>
+
+<DD>
+the type of the connection; currently the accepted values
+are
+<B>tunnel</B>
+
+(the default)
+signifying a host-to-host, host-to-subnet, or subnet-to-subnet tunnel;
+<B>transport</B>,
+
+signifying host-to-host transport mode;
+<B>passthrough</B>,
+
+signifying that no IPsec processing should be done at all;
+<B>drop</B>,
+
+signifying that packets should be discarded; and
+<B>reject</B>,
+
+signifying that packets should be discarded and a diagnostic ICMP returned.
+<DT><B>left</B>
+
+<DD>
+(required)
+the IP address of the left participant's public-network interface,
+in any form accepted by
+<I><A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A></I>(3)
+
+or one of several magic values.
+If it is
+<B>%defaultroute</B>,
+
+and
+the
+<B>config</B>
+
+<B>setup</B>
+
+section's,
+<B>interfaces</B>
+
+specification contains
+<B>%defaultroute,</B>
+
+<B>left</B>
+
+will be filled in automatically with the local address
+of the default-route interface (as determined at IPsec startup time);
+this also overrides any value supplied for
+<B>leftnexthop</B>.
+
+(Either
+<B>left</B>
+
+or
+<B>right</B>
+
+may be
+<B>%defaultroute</B>,
+
+but not both.)
+The value
+<B>%any</B>
+
+signifies an address to be filled in (by automatic keying) during
+negotiation.
+The value
+<B>%opportunistic</B>
+
+signifies that both
+<B>left</B>
+
+and
+<B>leftnexthop</B>
+
+are to be filled in (by automatic keying) from DNS data for
+<B>left</B>'s
+
+client.
+The values
+<B>%group</B>
+
+and
+<B>%opportunisticgroup</B>
+
+makes this a policy group conn: one that will be instantiated
+into a regular or opportunistic conn for each CIDR block listed in the
+policy group file with the same name as the conn.
+<DT><B>leftsubnet</B>
+
+<DD>
+private subnet behind the left participant, expressed as
+<I>network</I><B>/</B><I>netmask</I>
+(actually, any form acceptable to
+<I><A HREF="ipsec_ttosubnet.3.html">ipsec_ttosubnet</A></I>(3));
+
+if omitted, essentially assumed to be <I>left</I><B>/32</B>,
+signifying that the left end of the connection goes to the left participant only
+<DT><B>leftnexthop</B>
+
+<DD>
+next-hop gateway IP address for the left participant's connection
+to the public network;
+defaults to
+<B>%direct</B>
+
+(meaning
+<I>right</I>).
+
+If the value is to be overridden by the
+<B>left=%defaultroute</B>
+
+method (see above),
+an explicit value must
+<I>not</I>
+
+be given.
+If that method is not being used,
+but
+<B>leftnexthop</B>
+
+is
+<B>%defaultroute</B>,
+
+and
+<B>interfaces=%defaultroute</B>
+
+is used in the
+<B>config</B>
+
+<B>setup</B>
+
+section,
+the next-hop gateway address of the default-route interface
+will be used.
+The magic value
+<B>%direct</B>
+
+signifies a value to be filled in (by automatic keying)
+with the peer's address.
+Relevant only locally, other end need not agree on it.
+<DT><B>leftupdown</B>
+
+<DD>
+what ``updown'' script to run to adjust routing and/or firewalling
+when the status of the connection
+changes (default
+<B>ipsec _updown</B>).
+
+May include positional parameters separated by white space
+(although this requires enclosing the whole string in quotes);
+including shell metacharacters is unwise.
+See
+<I><A HREF="ipsec_pluto.8.html">ipsec_pluto</A></I>(8)
+
+for details.
+Relevant only locally, other end need not agree on it.
+<DT><B>leftfirewall</B>
+
+<DD>
+whether the left participant is doing forwarding-firewalling
+(including masquerading) for traffic from <I>leftsubnet</I>,
+which should be turned off (for traffic to the other subnet)
+once the connection is established;
+acceptable values are
+<B>yes</B>
+
+and (the default)
+<B>no</B>.
+
+May not be used in the same connection description with
+<B>leftupdown</B>.
+
+Implemented as a parameter to the default
+<I>updown</I>
+
+script.
+See notes below.
+Relevant only locally, other end need not agree on it.
+</DL>
+<P>
+
+If one or both security gateways are doing forwarding firewalling
+(possibly including masquerading),
+and this is specified using the firewall parameters,
+tunnels established with IPsec are exempted from it
+so that packets can flow unchanged through the tunnels.
+(This means that all subnets connected in this manner must have
+distinct, non-overlapping subnet address blocks.)
+This is done by the default
+<I>updown</I>
+
+script (see
+<I><A HREF="ipsec_pluto.8.html">ipsec_pluto</A></I>(8)).
+
+<P>
+
+The implementation of this makes certain assumptions about firewall setup,
+notably the use of the old
+<I>ipfwadm</I>
+
+interface to the firewall.
+In situations calling for more control,
+it may be preferable for the user to supply his own
+<I>updown</I>
+
+script,
+which makes the appropriate adjustments for his system.
+<A NAME="lbAF">&nbsp;</A>
+<H3>CONN PARAMETERS: AUTOMATIC KEYING</H3>
+
+The following parameters are relevant only to automatic keying,
+and are ignored in manual keying.
+Unless otherwise noted,
+for a connection to work,
+in general it is necessary for the two ends to agree exactly
+on the values of these parameters.
+<DL COMPACT>
+<DT><B>keyexchange</B>
+
+<DD>
+method of key exchange;
+the default and currently the only accepted value is
+<B>ike</B>
+
+<DT><B>auto</B>
+
+<DD>
+what operation, if any, should be done automatically at IPsec startup;
+currently-accepted values are
+<B>add</B>
+
+(signifying an
+<B>ipsec auto</B>
+
+<B>--add</B>),
+
+<B>route</B>
+
+(signifying that plus an
+<B>ipsec auto</B>
+
+<B>--route</B>),
+
+<B>start</B>
+
+(signifying that plus an
+<B>ipsec auto</B>
+
+<B>--up</B>),
+
+<B>manual</B>
+
+(signifying an
+<B>ipsec</B>
+
+<B>manual</B>
+
+<B>--up</B>),
+
+and
+<B>ignore</B>
+
+(also the default) (signifying no automatic startup operation).
+See the
+<B>config</B>
+
+<B>setup</B>
+
+discussion below.
+Relevant only locally, other end need not agree on it
+(but in general, for an intended-to-be-permanent connection,
+both ends should use
+<B>auto=start</B>
+
+to ensure that any reboot causes immediate renegotiation).
+<DT><B>auth</B>
+
+<DD>
+whether authentication should be done as part of
+ESP encryption, or separately using the AH protocol;
+acceptable values are
+<B>esp</B>
+
+(the default) and
+<B>ah</B>.
+
+<DT><B>authby</B>
+
+<DD>
+how the two security gateways should authenticate each other;
+acceptable values are
+<B>secret</B>
+
+for shared secrets,
+<B>rsasig</B>
+
+for RSA digital signatures (the default),
+<B>secret|rsasig</B>
+
+for either, and
+<B>never</B>
+
+if negotiation is never to be attempted or accepted (useful for shunt-only conns).
+Digital signatures are superior in every way to shared secrets.
+<DT><B>leftid</B>
+
+<DD>
+how
+the left participant
+should be identified for authentication;
+defaults to
+<B>left</B>.
+
+Can be an IP address (in any
+<I><A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A></I>(3)
+
+syntax)
+or a fully-qualified domain name preceded by
+<B>@</B>
+
+(which is used as a literal string and not resolved).
+The magic value
+<B>%myid</B>
+
+stands for the current setting of <I>myid</I>.
+This is set in <B>config setup</B> or by <I><A HREF="ipsec_whack.8.html">ipsec_whack</A></I>(8)), or, if not set,
+it is the IP address in <B>%defaultroute</B> (if that is supported by a TXT record in its reverse domain), or otherwise
+it is the system's hostname (if that is supported by a TXT record in its forward domain), or otherwise it is undefined.
+<DT><B>leftrsasigkey</B>
+
+<DD>
+the left participant's
+public key for RSA signature authentication,
+in RFC 2537 format using
+<I><A HREF="ipsec_ttodata.3.html">ipsec_ttodata</A></I>(3)
+
+encoding.
+The magic value
+<B>%none</B>
+
+means the same as not specifying a value (useful to override a default).
+The value
+<B>%dnsondemand</B>
+
+(the default)
+means the key is to be fetched from DNS at the time it is needed.
+The value
+<B>%dnsonload</B>
+
+means the key is to be fetched from DNS at the time
+the connection description is read from
+<I>ipsec.conf</I>;
+
+currently this will be treated as
+<B>%none</B>
+
+if
+<B>right=%any</B>
+
+or
+<B>right=%opportunistic</B>.
+
+The value
+<B>%dns</B>
+
+is currently treated as
+<B>%dnsonload</B>
+
+but will change to
+<B>%dnsondemand</B>
+
+in the future.
+The identity used for the left participant
+must be a specific host, not
+<B>%any</B>
+
+or another magic value.
+<B>Caution:</B>
+
+if two connection descriptions
+specify different public keys for the same
+<B>leftid</B>,
+
+confusion and madness will ensue.
+<DT><B>leftrsasigkey2</B>
+
+<DD>
+if present, a second public key.
+Either key can authenticate the signature, allowing for key rollover.
+<DT><B>pfs</B>
+
+<DD>
+whether Perfect Forward Secrecy of keys is desired on the connection's
+keying channel
+(with PFS, penetration of the key-exchange protocol
+does not compromise keys negotiated earlier);
+acceptable values are
+<B>yes</B>
+
+(the default)
+and
+<B>no</B>.
+
+<DT><B>keylife</B>
+
+<DD>
+how long a particular instance of a connection
+(a set of encryption/authentication keys for user packets) should last,
+from successful negotiation to expiry;
+acceptable values are an integer optionally followed by
+<B>s</B>
+
+(a time in seconds)
+or a decimal number followed by
+<B>m</B>,
+
+<B>h</B>,
+
+or
+<B>d</B>
+
+(a time
+in minutes, hours, or days respectively)
+(default
+<B>8.0h</B>,
+
+maximum
+<B>24h</B>).
+
+Normally, the connection is renegotiated (via the keying channel)
+before it expires.
+The two ends need not exactly agree on
+<B>keylife</B>,
+
+although if they do not,
+there will be some clutter of superseded connections on the end
+which thinks the lifetime is longer.
+<DT><B>rekey</B>
+
+<DD>
+whether a connection should be renegotiated when it is about to expire;
+acceptable values are
+<B>yes</B>
+
+(the default)
+and
+<B>no</B>.
+
+The two ends need not agree,
+but while a value of
+<B>no</B>
+
+prevents Pluto from requesting renegotiation,
+it does not prevent responding to renegotiation requested from the other end,
+so
+<B>no</B>
+
+will be largely ineffective unless both ends agree on it.
+<DT><B>rekeymargin</B>
+
+<DD>
+how long before connection expiry or keying-channel expiry
+should attempts to
+negotiate a replacement
+begin; acceptable values as for
+<B>keylife</B>
+
+(default
+<B>9m</B>).
+
+Relevant only locally, other end need not agree on it.
+<DT><B>rekeyfuzz</B>
+
+<DD>
+maximum percentage by which
+<B>rekeymargin</B>
+
+should be randomly increased to randomize rekeying intervals
+(important for hosts with many connections);
+acceptable values are an integer,
+which may exceed 100,
+followed by a `%'
+(default set by
+<I><A HREF="ipsec_pluto.8.html">ipsec_pluto</A></I>(8),
+
+currently
+<B>100%</B>).
+
+The value of
+<B>rekeymargin</B>,
+
+after this random increase,
+must not exceed
+<B>keylife</B>.
+
+The value
+<B>0%</B>
+
+will suppress time randomization.
+Relevant only locally, other end need not agree on it.
+<DT><B>keyingtries</B>
+
+<DD>
+how many attempts (a whole number or <B>%forever</B>) should be made to
+negotiate a connection, or a replacement for one, before giving up
+(default
+<B>%forever</B>).
+
+The value <B>%forever</B>
+means ``never give up'' (obsolete: this can be written <B>0</B>).
+Relevant only locally, other end need not agree on it.
+<DT><B>ikelifetime</B>
+
+<DD>
+how long the keying channel of a connection (buzzphrase: ``ISAKMP SA'')
+should last before being renegotiated;
+acceptable values as for
+<B>keylife</B>
+
+(default set by
+<I><A HREF="ipsec_pluto.8.html">ipsec_pluto</A></I>(8),
+
+currently
+<B>1h</B>,
+
+maximum
+<B>8h</B>).
+
+The two-ends-disagree case is similar to that of
+<B>keylife</B>.
+
+<DT><B>compress</B>
+
+<DD>
+whether IPComp compression of content is proposed on the connection
+(link-level compression does not work on encrypted data,
+so to be effective, compression must be done <I>before</I> encryption);
+acceptable values are
+<B>yes</B>
+
+and
+<B>no</B>
+
+(the default).
+The two ends need not agree.
+A value of
+<B>yes</B>
+
+causes IPsec to propose both compressed and uncompressed,
+and prefer compressed.
+A value of
+<B>no</B>
+
+prevents IPsec from proposing compression;
+a proposal to compress will still be accepted.
+<DT><B>disablearrivalcheck</B>
+
+<DD>
+whether KLIPS's normal tunnel-exit check
+(that a packet emerging from a tunnel has plausible addresses in its header)
+should be disabled;
+acceptable values are
+<B>yes</B>
+
+and
+<B>no</B>
+
+(the default).
+Tunnel-exit checks improve security and do not break any normal configuration.
+Relevant only locally, other end need not agree on it.
+<DT><B>failureshunt</B>
+
+<DD>
+what to do with packets when negotiation fails.
+The default is
+<B>none</B>:
+
+no shunt;
+<B>passthrough</B>,
+
+<B>drop</B>,
+
+and
+<B>reject</B>
+
+have the obvious meanings.
+</DL>
+<A NAME="lbAG">&nbsp;</A>
+<H3>CONN PARAMETERS: MANUAL KEYING</H3>
+
+The following parameters are relevant only to manual keying,
+and are ignored in automatic keying.
+Unless otherwise noted,
+for a connection to work,
+in general it is necessary for the two ends to agree exactly
+on the values of these parameters.
+A manually-keyed
+connection must specify at least one of AH or ESP.
+<DL COMPACT>
+<DT><B>spi</B>
+
+<DD>
+(this or
+<B>spibase</B>
+
+required for manual keying)
+the SPI number to be used for the connection (see
+<I><A HREF="ipsec_manual.8.html">ipsec_manual</A></I>(8));
+
+must be of the form <B>0x</B><I>hex</I><B></B>,
+where
+<I>hex</I>
+
+is one or more hexadecimal digits
+(note, it will generally be necessary to make
+<I>spi</I>
+
+at least
+<B>0x100</B>
+
+to be acceptable to KLIPS,
+and use of SPIs in the range
+<B>0x100</B>-<B>0xfff</B>
+
+is recommended)
+<DT><B>spibase</B>
+
+<DD>
+(this or
+<B>spi</B>
+
+required for manual keying)
+the base number for the SPIs to be used for the connection (see
+<I><A HREF="ipsec_manual.8.html">ipsec_manual</A></I>(8));
+
+must be of the form <B>0x</B><I>hex</I><B>0</B>,
+where
+<I>hex</I>
+
+is one or more hexadecimal digits
+(note, it will generally be necessary to make
+<I>spibase</I>
+
+at least
+<B>0x100</B>
+
+for the resulting SPIs
+to be acceptable to KLIPS,
+and use of numbers in the range
+<B>0x100</B>-<B>0xff0</B>
+
+is recommended)
+<DT><B>esp</B>
+
+<DD>
+ESP encryption/authentication algorithm to be used
+for the connection, e.g.
+<B>3des-md5-96</B>
+
+(must be suitable as a value of
+<I><A HREF="ipsec_spi.8.html">ipsec_spi</A></I>(8)'s
+
+<B>--esp</B>
+
+option);
+default is not to use ESP
+<DT><B>espenckey</B>
+
+<DD>
+ESP encryption key
+(must be suitable as a value of
+<I><A HREF="ipsec_spi.8.html">ipsec_spi</A></I>(8)'s
+
+<B>--enckey</B>
+
+option)
+(may be specified separately for each direction using
+<B>leftespenckey</B>
+
+(leftward SA)
+and
+<B>rightespenckey</B>
+
+parameters)
+<DT><B>espauthkey</B>
+
+<DD>
+ESP authentication key
+(must be suitable as a value of
+<I><A HREF="ipsec_spi.8.html">ipsec_spi</A></I>(8)'s
+
+<B>--authkey</B>
+
+option)
+(may be specified separately for each direction using
+<B>leftespauthkey</B>
+
+(leftward SA)
+and
+<B>rightespauthkey</B>
+
+parameters)
+<DT><B>espreplay_window</B>
+
+<DD>
+ESP replay-window setting,
+an integer from
+<B>0</B>
+
+(the
+<I>ipsec_manual</I>
+
+default, which turns off replay protection) to
+<B>64</B>;
+
+relevant only if ESP authentication is being used
+<DT><B>leftespspi</B>
+
+<DD>
+SPI to be used for the leftward ESP SA, overriding
+automatic assignment using
+<B>spi</B>
+
+or
+<B>spibase</B>;
+
+typically a hexadecimal number beginning with
+<B>0x</B>
+
+<DT><B>ah</B>
+
+<DD>
+AH authentication algorithm to be used
+for the connection, e.g.
+<B>hmac-md5-96</B>
+
+(must be suitable as a value of
+<I><A HREF="ipsec_spi.8.html">ipsec_spi</A></I>(8)'s
+
+<B>--ah</B>
+
+option);
+default is not to use AH
+<DT><B>ahkey</B>
+
+<DD>
+(required if
+<B>ah</B>
+
+is present) AH authentication key
+(must be suitable as a value of
+<I><A HREF="ipsec_spi.8.html">ipsec_spi</A></I>(8)'s
+
+<B>--authkey</B>
+
+option)
+(may be specified separately for each direction using
+<B>leftahkey</B>
+
+(leftward SA)
+and
+<B>rightahkey</B>
+
+parameters)
+<DT><B>ahreplay_window</B>
+
+<DD>
+AH replay-window setting,
+an integer from
+<B>0</B>
+
+(the
+<I>ipsec_manual</I>
+
+default, which turns off replay protection) to
+<B>64</B>
+
+<DT><B>leftahspi</B>
+
+<DD>
+SPI to be used for the leftward AH SA, overriding
+automatic assignment using
+<B>spi</B>
+
+or
+<B>spibase</B>;
+
+typically a hexadecimal number beginning with
+<B>0x</B>
+
+</DL>
+<A NAME="lbAH">&nbsp;</A>
+<H2>CONFIG SECTIONS</H2>
+
+At present, the only
+<B>config</B>
+
+section known to the IPsec software is the one named
+<B>setup</B>,
+
+which contains information used when the software is being started
+(see
+<I><A HREF="ipsec_setup.8.html">ipsec_setup</A></I>(8)).
+
+Here's an example:
+<P>
+
+
+<PRE>
+<B>
+config setup
+ interfaces=&quot;ipsec0=eth1 ipsec1=ppp0&quot;
+ klipsdebug=none
+ plutodebug=all
+ manualstart=
+</B></PRE>
+
+<P>
+
+Parameters are optional unless marked ``(required)''.
+The currently-accepted
+<I>parameter</I>
+
+names in a
+<B>config</B>
+
+<B>setup</B>
+
+section are:
+<DL COMPACT>
+<DT><B>myid</B>
+
+<DD>
+the identity to be used for
+<B>%myid</B>.
+
+<B>%myid</B>
+
+is used in the implicit policy group conns and can be used as
+an identity in explicit conns.
+If unspecified,
+<B>%myid</B>
+
+is set to the IP address in <B>%defaultroute</B> (if that is supported by a TXT record in its reverse domain), or otherwise
+the system's hostname (if that is supported by a TXT record in its forward domain), or otherwise it is undefined.
+An explicit value generally starts with ``<B>@</B>''.
+<DT><B>interfaces</B>
+
+<DD>
+virtual and physical interfaces for IPsec to use:
+a single
+<I>virtual</I><B>=</B><I>physical</I> pair, a (quoted!) list of pairs separated
+by white space, or
+<B>%none</B>.
+
+One of the pairs may be written as
+<B>%defaultroute</B>,
+
+which means: find the interface <I>d</I> that the default route points to,
+and then act as if the value was ``<B>ipsec0=</B><I>d</I>''.
+<B>%defaultroute</B>
+
+is the default;
+<B>%none</B>
+
+must be used to denote no interfaces.
+If
+<B>%defaultroute</B>
+
+is used (implicitly or explicitly)
+information about the default route and its interface is noted for
+use by
+<I><A HREF="ipsec_manual.8.html">ipsec_manual</A></I>(8)
+
+and
+<I><A HREF="ipsec_auto.8.html">ipsec_auto</A></I>(8).)
+
+<DT><B>forwardcontrol</B>
+
+<DD>
+whether
+<I>setup</I>
+
+should turn IP forwarding on
+(if it's not already on) as IPsec is started,
+and turn it off again (if it was off) as IPsec is stopped;
+acceptable values are
+<B>yes</B>
+
+and (the default)
+<B>no</B>.
+
+For this to have full effect, forwarding must be
+disabled before the hardware interfaces are brought
+up (e.g.,
+<B>net.ipv4.ip_forward&nbsp;=&nbsp;0</B>
+
+in Red Hat 6.x
+<I>/etc/sysctl.conf</I>),
+
+because IPsec doesn't get control early enough to do that.
+<DT><B>rp_filter</B>
+
+<DD>
+whether and how
+<I>setup</I>
+
+should adjust the reverse path filtering mechanism for the
+physical devices to be used.
+Values are <B>%unchanged</B> (to leave it alone)
+or <B>0</B>, <B>1</B>, <B>2</B> (values to set it to).
+<I>/proc/sys/net/ipv4/conf/PHYS/rp_filter</I>
+is badly documented; it must be <B>0</B> in many cases
+for ipsec to function.
+The default value for the parameter is <B>0</B>.
+<DT><B>syslog</B>
+
+<DD>
+the
+<I><A HREF="syslog.2.html">syslog</A></I>(2)
+
+``facility'' name and priority to use for
+startup/shutdown log messages,
+default
+<B>daemon.error</B>.
+
+<DT><B>klipsdebug</B>
+
+<DD>
+how much KLIPS debugging output should be logged.
+An empty value,
+or the magic value
+<B>none</B>,
+
+means no debugging output (the default).
+The magic value
+<B>all</B>
+
+means full output.
+Otherwise only the specified types of output
+(a quoted list, names separated by white space) are enabled;
+for details on available debugging types, see
+<I><A HREF="ipsec_klipsdebug.8.html">ipsec_klipsdebug</A></I>(8).
+
+<DT><B>plutodebug</B>
+
+<DD>
+how much Pluto debugging output should be logged.
+An empty value,
+or the magic value
+<B>none</B>,
+
+means no debugging output (the default).
+The magic value
+<B>all</B>
+
+means full output.
+Otherwise only the specified types of output
+(a quoted list, names without the
+<B>--debug-</B>
+
+prefix,
+separated by white space) are enabled;
+for details on available debugging types, see
+<I><A HREF="ipsec_pluto.8.html">ipsec_pluto</A></I>(8).
+
+<DT><B>plutoopts</B>
+
+<DD>
+additional options to pass to pluto upon startup. See
+<I><A HREF="ipsec_pluto.8.html">ipsec_pluto</A></I>(8).
+
+<DT><B>plutostderrlog</B>
+
+<DD>
+do not use syslog, but rather log to stderr, and direct stderr to the
+argument file.
+<DT><B>dumpdir</B>
+
+<DD>
+in what directory should things started by
+<I>setup</I>
+
+(notably the Pluto daemon) be allowed to
+dump core?
+The empty value (the default) means they are not
+allowed to.
+<DT><B>manualstart</B>
+
+<DD>
+which manually-keyed connections to set up at startup
+(empty, a name, or a quoted list of names separated by white space);
+see
+<I><A HREF="ipsec_manual.8.html">ipsec_manual</A></I>(8).
+
+Default is none.
+<DT><B>pluto</B>
+
+<DD>
+whether to start Pluto or not;
+Values are
+<B>yes</B>
+
+(the default)
+or
+<B>no</B>
+
+(useful only in special circumstances).
+<DT><B>plutowait</B>
+
+<DD>
+should Pluto wait for each
+negotiation attempt that is part of startup to
+finish before proceeding with the next?
+Values are
+<B>yes</B>
+
+or
+<B>no</B>
+
+(the default).
+<DT><B>prepluto</B>
+
+<DD>
+shell command to run before starting Pluto
+(e.g., to decrypt an encrypted copy of the
+<I>ipsec.secrets</I>
+
+file).
+It's run in a very simple way;
+complexities like I/O redirection are best hidden within a script.
+Any output is redirected for logging,
+so running interactive commands is difficult unless they use
+<I>/dev/tty</I>
+
+or equivalent for their interaction.
+Default is none.
+<DT><B>postpluto</B>
+
+<DD>
+shell command to run after starting Pluto
+(e.g., to remove a decrypted copy of the
+<I>ipsec.secrets</I>
+
+file).
+It's run in a very simple way;
+complexities like I/O redirection are best hidden within a script.
+Any output is redirected for logging,
+so running interactive commands is difficult unless they use
+<I>/dev/tty</I>
+
+or equivalent for their interaction.
+Default is none.
+<DT><B>fragicmp</B>
+
+<DD>
+whether a tunnel's need to fragment a packet should be reported
+back with an ICMP message,
+in an attempt to make the sender lower his PMTU estimate;
+acceptable values are
+<B>yes</B>
+
+(the default)
+and
+<B>no</B>.
+
+<DT><B>hidetos</B>
+
+<DD>
+whether a tunnel packet's TOS field should be set to
+<B>0</B>
+
+rather than copied from the user packet inside;
+acceptable values are
+<B>yes</B>
+
+(the default)
+and
+<B>no</B>.
+
+<DT><B>uniqueids</B>
+
+<DD>
+whether a particular participant ID should be kept unique,
+with any new (automatically keyed)
+connection using an ID from a different IP address
+deemed to replace all old ones using that ID;
+acceptable values are
+<B>yes</B>
+
+(the default)
+and
+<B>no</B>.
+
+Participant IDs normally <I>are</I> unique,
+so a new (automatically-keyed) connection using the same ID is
+almost invariably intended to replace an old one.
+<DT><B>overridemtu</B>
+
+<DD>
+value that the MTU of the ipsec<I>n</I> interface(s) should be set to,
+overriding IPsec's (large) default.
+This parameter is needed only in special situations.
+</DL>
+<A NAME="lbAI">&nbsp;</A>
+<H2>IMPLICIT CONNS</H2>
+
+<P>
+
+The system automatically defines several conns to implement
+default policy groups. Each can be overridden by explicitly
+defining a new conn with the same name. If the new conn has <B>auto=ignore</B>,
+the definition is suppressed.
+<P>
+
+Here are the automatically supplied definitions.
+<P>
+
+
+<PRE>
+<B>
+conn clear
+ type=passthrough
+ authby=never
+ left=%defaultroute
+ right=%group
+ auto=route
+
+conn clear-or-private
+ type=passthrough
+ left=%defaultroute
+ leftid=%myid
+ right=%opportunisticgroup
+ failureshunt=passthrough
+ keyingtries=3
+ ikelifetime=1h
+ keylife=1h
+ rekey=no
+ auto=route
+
+conn private-or-clear
+ type=tunnel
+ left=%defaultroute
+ leftid=%myid
+ right=%opportunisticgroup
+ failureshunt=passthrough
+ keyingtries=3
+ ikelifetime=1h
+ keylife=1h
+ rekey=no
+ auto=route
+
+conn private
+ type=tunnel
+ left=%defaultroute
+ leftid=%myid
+ right=%opportunisticgroup
+ failureshunt=drop
+ keyingtries=3
+ ikelifetime=1h
+ keylife=1h
+ rekey=no
+ auto=route
+
+conn block
+ type=reject
+ authby=never
+ left=%defaultroute
+ right=%group
+ auto=route
+
+# default policy
+conn packetdefault
+ type=tunnel
+ left=%defaultroute
+ leftid=%myid
+ left=0.0.0.0/0
+ right=%opportunistic
+ failureshunt=passthrough
+ keyingtries=3
+ ikelifetime=1h
+ keylife=1h
+ rekey=no
+ auto=route
+</B></PRE>
+
+<P>
+
+These conns are <I>not</I> affected by anything in <B>conn %default</B>.
+They will only work if <B>%defaultroute</B> works.
+The <B>leftid</B> will be the interfaces IP address; this
+requires that reverse DNS records be set up properly.
+<P>
+
+The implicit conns are defined after all others. It is
+appropriate and reasonable to use <B>also=private-or-clear</B>
+(for example) in any other opportunistic conn.
+<A NAME="lbAJ">&nbsp;</A>
+<H2>POLICY GROUP FILES</H2>
+
+<P>
+
+The optional files under
+<I>/etc/ipsec.d/policy</I>,
+
+including
+<PRE>
+
+/etc/ipsec.d/policies/clear
+/etc/ipsec.d/policies/clear-or-private
+/etc/ipsec.d/policies/private-or-clear
+/etc/ipsec.d/policies/private
+/etc/ipsec.d/policies/block
+
+</PRE>
+
+may contain policy group configuration information to
+supplement
+<I>ipsec.conf</I>.
+
+Their contents are not security-sensitive.
+<P>
+
+These files are text files.
+Each consists of a list of CIDR blocks, one per line.
+White space followed by # followed by anything to the end of the line
+is a comment and is ignored, as are empty lines.
+<P>
+
+A connection in
+<I>/etc/ipsec.conf</I>
+
+which has
+<B>right=%group</B>
+
+or
+<B>right=%opportunisticgroup</B>
+
+is a policy group connection.
+When a policy group file of the same name is loaded, with
+<P>
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>ipsec auto --rereadgroups</B>
+<P>
+
+or at system start, the connection is instantiated such that each
+CIDR block serves as an instance's
+<B>right</B>
+
+value. The system treats the
+resulting instances as normal connections.
+<P>
+
+For example, given a suitable connection definition
+<B>private</B>,
+
+and the file
+<I>/etc/ipsec.d/policy/private </I>
+
+with an entry 192.0.2.3,
+the system creates a connection instance
+<B>private#192.0.2.3.</B>
+
+This connection inherits all details from
+<B>private</B>,
+
+except that its right client is 192.0.2.3.
+<A NAME="lbAK">&nbsp;</A>
+<H2>DEFAULT POLICY GROUPS</H2>
+
+<P>
+
+The standard FreeS/WAN install includes several policy groups
+which provide a way of classifying possible peers into IPsec security classes:
+<B>private</B>
+
+(talk encrypted only),
+<B>private-or-clear</B>
+
+(prefer encryption),
+<B>clear-or-private</B>
+
+(respond to requests for encryption),
+<B>clear</B>
+
+and
+<B>block</B>.
+
+Implicit policy groups apply to the local host only,
+and are implemented by the
+<B>IMPLICIT CONNECTIONS </B>
+
+described above.
+<A NAME="lbAL">&nbsp;</A>
+<H2>CHOOSING A CONNECTION</H2>
+
+<P>
+
+When choosing a connection to apply to an outbound packet caught with a
+<B>%trap,</B>
+
+the system prefers the one with the most specific eroute that
+includes the packet's source and destination IP addresses.
+Source subnets are examined before destination subnets.
+For initiating, only routed connections are considered. For responding,
+unrouted but added connections are considered.
+<P>
+
+When choosing a connection to use to respond to a negotiation which
+doesn't match an ordinary conn, an opportunistic connection
+may be instantiated. Eventually, its instance will be /32 -&gt; /32, but
+for earlier stages of the negotiation, there will not be enough
+information about the client subnets to complete the instantiation.
+<A NAME="lbAM">&nbsp;</A>
+<H2>FILES</H2>
+
+<PRE>
+/etc/ipsec.conf
+/etc/ipsec.d/policies/clear
+/etc/ipsec.d/policies/clear-or-private
+/etc/ipsec.d/policies/private-or-clear
+/etc/ipsec.d/policies/private
+/etc/ipsec.d/policies/block
+</PRE>
+
+<A NAME="lbAN">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_ttoaddr.8.html">ipsec_ttoaddr</A>(8), <A HREF="ipsec_auto.8.html">ipsec_auto</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8), <A HREF="ipsec_rsasigkey.8.html">ipsec_rsasigkey</A>(8)
+<A NAME="lbAO">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Designed for the FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by Henry Spencer.
+<A NAME="lbAP">&nbsp;</A>
+<H2>BUGS</H2>
+
+<P>
+
+When
+<B>type</B>
+
+or
+<B>failureshunt</B>
+
+is set to
+<B>drop</B>
+
+or
+<B>reject,</B>
+
+FreeS/WAN blocks outbound packets using eroutes, but assumes inbound
+blocking is handled by the firewall. FreeS/WAN offers firewall hooks
+via an ``updown'' script. However, the default
+<B>ipsec _updown</B>
+
+provides no help in controlling a modern firewall.
+<P>
+
+Including attributes of the keying channel
+(authentication methods,
+<B>ikelifetime</B>,
+
+etc.)
+as an attribute of a connection,
+rather than of a participant pair, is dubious and incurs limitations.
+<P>
+
+<I>Ipsec_manual</I>
+
+is not nearly as generous about the syntax of subnets,
+addresses, etc. as the usual FreeS/WAN user interfaces.
+Four-component dotted-decimal must be used for all addresses.
+It
+<I>is</I>
+
+smart enough to translate bit-count netmasks to dotted-decimal form.
+<P>
+
+It would be good to have a line-continuation syntax,
+especially for the very long lines involved in
+RSA signature keys.
+<P>
+
+The ability to specify different identities,
+<B>authby</B>,
+
+and public keys for different automatic-keyed connections
+between the same participants is misleading;
+this doesn't work dependably because the identity of the participants
+is not known early enough.
+This is especially awkward for the ``Road Warrior'' case,
+where the remote IP address is specified as
+<B>0.0.0.0</B>,
+
+and that is considered to be the ``participant'' for such connections.
+<P>
+
+In principle it might be necessary to control MTU on an
+interface-by-interface basis,
+rather than with the single global override that
+<B>overridemtu</B>
+
+provides.
+<P>
+
+A number of features which <I>could</I> be implemented in
+both manual and automatic keying
+actually are not yet implemented for manual keying.
+This is unlikely to be fixed any time soon.
+<P>
+
+If conns are to be added before DNS is available,
+<B>left=</B><I>FQDN</I>,
+<B>leftnextop=</B><I>FQDN</I>,
+and
+<B>leftrsasigkey=%dnsonload</B>
+
+will fail.
+<I><A HREF="ipsec_pluto.8.html">ipsec_pluto</A></I>(8)
+
+does not actually use the public key for our side of a conn but it
+isn't generally known at a add-time which side is ours (Road Warrior
+and Opportunistic conns are currently exceptions).
+<P>
+
+The <B>myid</B> option does not affect explicit <B> ipsec auto --add</B> or <B>ipsec auto --replace</B> commands for implicit conns.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAD">CONN SECTIONS</A><DD>
+<DL>
+<DT><A HREF="#lbAE">CONN PARAMETERS: GENERAL</A><DD>
+<DT><A HREF="#lbAF">CONN PARAMETERS: AUTOMATIC KEYING</A><DD>
+<DT><A HREF="#lbAG">CONN PARAMETERS: MANUAL KEYING</A><DD>
+</DL>
+<DT><A HREF="#lbAH">CONFIG SECTIONS</A><DD>
+<DT><A HREF="#lbAI">IMPLICIT CONNS</A><DD>
+<DT><A HREF="#lbAJ">POLICY GROUP FILES</A><DD>
+<DT><A HREF="#lbAK">DEFAULT POLICY GROUPS</A><DD>
+<DT><A HREF="#lbAL">CHOOSING A CONNECTION</A><DD>
+<DT><A HREF="#lbAM">FILES</A><DD>
+<DT><A HREF="#lbAN">SEE ALSO</A><DD>
+<DT><A HREF="#lbAO">HISTORY</A><DD>
+<DT><A HREF="#lbAP">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec.secrets.5.html b/doc/manpage.d/ipsec.secrets.5.html
new file mode 100644
index 000000000..8abc1f492
--- /dev/null
+++ b/doc/manpage.d/ipsec.secrets.5.html
@@ -0,0 +1,227 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC.SECRETS</TITLE>
+</HEAD><BODY>
+<H1>IPSEC.SECRETS</H1>
+Section: File Formats (5)<BR>Updated: 28 March 1999<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec.secrets - secrets for IKE/IPsec authentication
+<A NAME="lbAC">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The file <I>ipsec.secrets</I> holds a table of secrets.
+These secrets are used by <I><A HREF="ipsec_pluto.8.html">ipsec_pluto</A></I>(8), the FreeS/WAN Internet Key
+Exchange daemon, to authenticate other hosts.
+Currently there are two kinds of secrets: preshared secrets and
+
+RSA private keys.
+<P>
+
+It is vital that these secrets be protected. The file should be owned
+by the super-user,
+and its permissions should be set to block all access by others.
+<P>
+
+The file is a sequence of entries and include directives.
+Here is an example. Each entry or directive must start at the
+left margin, but if it continues beyond a single line, each continuation
+line must be indented.
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+# sample /etc/ipsec.secrets file for 10.1.0.1
+10.1.0.1 10.2.0.1: PSK &quot;secret shared by two hosts&quot;
+
+# an entry may be split across lines,
+# but indentation matters
+<A HREF="http://www.xs4all.nl">www.xs4all.nl</A> @<A HREF="http://www.kremvax.ru">www.kremvax.ru</A>
+&nbsp;&nbsp;&nbsp;&nbsp;10.6.0.1 10.7.0.1 1.8.0.1: PSK &quot;secret shared by 5&quot;
+
+# an RSA private key.
+# note that the lines are too wide for a
+# man page, so ... has been substituted for
+# the truncated part
+@my.com: rsa {
+&nbsp;&nbsp;&nbsp;&nbsp;Modulus:&nbsp;0syXpo/6waam+ZhSs8Lt6jnBzu3C4grtt...
+&nbsp;&nbsp;&nbsp;&nbsp;PublicExponent:&nbsp;0sAw==
+&nbsp;&nbsp;&nbsp;&nbsp;PrivateExponent:&nbsp;0shlGbVR1m8Z+7rhzSyenCaBN...
+&nbsp;&nbsp;&nbsp;&nbsp;Prime1:&nbsp;0s8njV7WTxzVzRz7AP+0OraDxmEAt1BL5l...
+&nbsp;&nbsp;&nbsp;&nbsp;Prime2:&nbsp;0s1LgR7/oUMo9BvfU8yRFNos1s211KX5K0...
+&nbsp;&nbsp;&nbsp;&nbsp;Exponent1:&nbsp;0soaXj85ihM5M2inVf/NfHmtLutVz4r...
+&nbsp;&nbsp;&nbsp;&nbsp;Exponent2:&nbsp;0sjdAL9VFizF+BKU4ohguJFzOd55OG6...
+&nbsp;&nbsp;&nbsp;&nbsp;Coefficient:&nbsp;0sK1LWwgnNrNFGZsS/2GuMBg9nYVZ...
+&nbsp;&nbsp;&nbsp;&nbsp;}
+
+include ipsec.*.secrets # get secrets from other files
+</PRE>
+
+</DL>
+
+<P>
+
+Each entry in the file is a list of indices, followed by a secret.
+The two parts are separated by a colon (<B>:</B>) that is
+followed by whitespace or a newline. For compatability
+with the previous form of this file, if the key part is just a
+double-quoted string the colon may be left out.
+<P>
+
+An index is an IP address, or a Fully Qualified Domain Name, <A HREF="mailto:user@FQDN">user@FQDN</A>,
+<B>%any</B> or <B>%any6</B> (other kinds may come). An IP address may be written
+in the familiar dotted quad form or as a domain name to be looked up
+when the file is loaded
+(or in any of the forms supported by the FreeS/WAN <I><A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A></I>(3)
+routine). In many cases it is a bad idea to use domain names because
+the name server may not be running or may be insecure. To denote a
+Fully Qualified Domain Name (as opposed to an IP address denoted by
+its domain name), precede the name with an at sign (<B>@</B>).
+<P>
+
+Matching IDs with indices is fairly straightforward: they have to be
+equal. In the case of a ``Road Warrior'' connection, if an equal
+match is not found for the Peer's ID, and it is in the form of an IP
+address, an index of <B>%any</B> will match the peer's IP address if IPV4
+and <B>%any6</B> will match a the peer's IP address if IPV6.
+Currently, the obsolete notation <B>0.0.0.0</B> may be used in place of
+<B>%any</B>.
+<P>
+
+An additional complexity
+arises in the case of authentication by preshared secret: the
+responder will need to look up the secret before the Peer's ID payload has
+been decoded, so the ID used will be the IP address.
+<P>
+
+To authenticate a connection between two hosts, the entry that most
+specifically matches the host and peer IDs is used. An entry with no
+index will match any host and peer. More specifically, an entry with one index will
+match a host and peer if the index matches the host's ID (the peer isn't
+considered). Still more specifically, an entry with multiple indices will match a host and
+peer if the host ID and peer ID each match one of the indices. If the key
+is for an asymmetric authentication technique (i.e. a public key
+system such as RSA), an entry with multiple indices will match a host
+and peer even if only the host ID matches an index (it is presumed that the
+multiple indices are all identities of the host).
+It is acceptable for two entries to be the best match as
+long as they agree about the secret or private key.
+<P>
+
+Authentication by preshared secret requires that both systems find the
+identical secret (the secret is not actually transmitted by the IKE
+protocol). If both the host and peer appear in the index list, the
+same entry will be suitable for both systems so verbatim copying
+between systems can be used. This naturally extends to larger groups
+sharing the same secret. Thus multiple-index entries are best for PSK
+authentication.
+<P>
+
+Authentication by RSA Signatures requires that each host have its own private
+key. A host could reasonably use a different private keys
+for different interfaces and for different peers. But it would not
+be normal to share entries between systems. Thus thus no-index and
+one-index forms of entry often make sense for RSA Signature authentication.
+<P>
+
+The key part of an entry may start with a token indicating the kind of
+key. ``RSA'' signifies RSA private key and ``PSK'' signifies
+PreShared Key (case is ignored). For compatability with previous
+forms of this file, PSK is the default.
+<P>
+
+A preshared secret is most conveniently represented as a sequence of
+characters, delimited by the double-quote
+character (<B>&quot;</B>). The sequence cannot contain a newline or
+double-quote. Strictly speaking, the secret is actually the sequence
+of bytes that is used in the file to represent the sequence of
+characters (excluding the delimiters).
+A preshared secret may also be represented, without quotes, in any form supported by
+<I><A HREF="ipsec_ttodata.3.html">ipsec_ttodata</A></I>(3).
+<P>
+
+An RSA private key is a composite of eight generally large numbers. The notation
+used is a brace-enclosed list of field name and value pairs (see the example above).
+A suitable key, in a suitable format, may be generated by <I><A HREF="ipsec_rsasigkey.8.html">ipsec_rsasigkey</A></I>(8).
+The structure is very similar to that used by BIND 8.2.2 or later, but note that
+the numbers must have a ``0s'' prefix if they are in base 64. The order of
+the fields is fixed.
+<P>
+
+The first token an entry must start in
+the first column of its line. Subsequent tokens must be
+separated by whitespace,
+except for a colon token, which only needs to be followed by whitespace.
+A newline is taken as whitespace, but every
+line of an entry after the first must be indented.
+<P>
+
+Whitespace at the end of a line is ignored (except in the 0t
+notation for a key). At the start of line or
+after whitespace, <B>#</B> and the following text up to the end of the
+line is treated as a comment. Within entries, all lines must be
+indented (except for lines with no tokens).
+Outside entries, no line may be indented (this is to make sure that
+the file layout reflects its structure).
+<P>
+
+An include directive causes the contents of the named file to be processed
+before continuing with the current file. The filename is subject to
+``globbing'' as in <I><A HREF="sh.1.html">sh</A></I>(1), so every file with a matching name
+is processed. Includes may be nested to a modest
+depth (10, currently). If the filename doesn't start with a <B>/</B>, the
+directory containing the current file is prepended to the name. The
+include directive is a line that starts with the word <B>include</B>,
+followed by whitespace, followed by the filename (which must not contain
+whitespace).
+<A NAME="lbAD">&nbsp;</A>
+<H2>FILES</H2>
+
+/etc/ipsec.secrets
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+The rest of the FreeS/WAN distribution, in particular
+<I><A HREF="ipsec.conf.5.html">ipsec.conf</A></I>(5),
+<I><A HREF="ipsec.8.html">ipsec</A></I>(8),
+<I><A HREF="ipsec_newhostkey.8.html">ipsec_newhostkey</A></I>(8),
+<I><A HREF="ipsec_rsasigkey.8.html">ipsec_rsasigkey</A></I>(8),
+<I><A HREF="ipsec_showhostkey.8.html">ipsec_showhostkey</A></I>(8),
+<I><A HREF="ipsec_auto.8.html">ipsec_auto</A></I>(8) <B>--rereadsecrets</B>,
+and <I><A HREF="ipsec_pluto.8.html">ipsec_pluto</A></I>(8) <B>--listen</B>,.
+<BR>
+
+BIND 8.2.2 or later, <A HREF="ftp://ftp.isc.org/isc/bind/src/">ftp://ftp.isc.org/isc/bind/src/</A>
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Designed for the FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by D. Hugh Redelmeier.
+<A NAME="lbAG">&nbsp;</A>
+<H2>BUGS</H2>
+
+If an ID is <B>0.0.0.0</B>, it will match <B>%any</B>;
+if it is <B>0::0</B>, it will match <B>%any6</B>.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAD">FILES</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+<DT><A HREF="#lbAG">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec__confread.8.html b/doc/manpage.d/ipsec__confread.8.html
new file mode 100644
index 000000000..ecc120c7e
--- /dev/null
+++ b/doc/manpage.d/ipsec__confread.8.html
@@ -0,0 +1,58 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of _CONFREAD</TITLE>
+</HEAD><BODY>
+<H1>_CONFREAD</H1>
+Section: Maintenance Commands (8)<BR>Updated: 25 Apr 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec _confread - internal routing to parse config file
+<A NAME="lbAC">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>_confread </I>
+
+is an internal script used for parsing /etc/ipsec.conf into a canonical format.
+<A NAME="lbAD">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_conf.8.html">ipsec_conf</A>(8)
+<A NAME="lbAE">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Man page written for the Linux FreeS/WAN project &lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Michael Richardson. Program written by Henry Spencer.
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAD">SEE ALSO</A><DD>
+<DT><A HREF="#lbAE">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec__copyright.8.html b/doc/manpage.d/ipsec__copyright.8.html
new file mode 100644
index 000000000..7f78b3feb
--- /dev/null
+++ b/doc/manpage.d/ipsec__copyright.8.html
@@ -0,0 +1,62 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of _COPYRIGHT</TITLE>
+</HEAD><BODY>
+<H1>_COPYRIGHT</H1>
+Section: Maintenance Commands (8)<BR>Updated: 25 Apr 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec _copyright - prints FreeSWAN copyright
+<A NAME="lbAC">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>_copyright</I>
+
+outputs the FreeSWAN copyright, and version numbers for &quot;ipsec --copyright&quot;
+<A NAME="lbAD">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8)
+<A NAME="lbAE">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Man page written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Michael Richardson. Program written by Henry Spencer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAD">SEE ALSO</A><DD>
+<DT><A HREF="#lbAE">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec__include.8.html b/doc/manpage.d/ipsec__include.8.html
new file mode 100644
index 000000000..d85ee7852
--- /dev/null
+++ b/doc/manpage.d/ipsec__include.8.html
@@ -0,0 +1,67 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of _INCLUDE</TITLE>
+</HEAD><BODY>
+<H1>_INCLUDE</H1>
+Section: Maintenance Commands (8)<BR>Updated: 25 Apr 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec _include - internal script to process config files
+<A NAME="lbAC">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>_include</I>
+
+is used by
+<I>_confread </I>
+
+to process
+<B>include </B>
+
+directives in /etc/ipsec.conf.
+<A NAME="lbAD">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec__confread.8.html">ipsec__confread</A>(8)
+<A NAME="lbAE">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Man page written for the Linux FreeS/WAN project &lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Michael Richardson. Program written by Henry Spencer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAD">SEE ALSO</A><DD>
+<DT><A HREF="#lbAE">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec__keycensor.8.html b/doc/manpage.d/ipsec__keycensor.8.html
new file mode 100644
index 000000000..22e574932
--- /dev/null
+++ b/doc/manpage.d/ipsec__keycensor.8.html
@@ -0,0 +1,64 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of _KEYCENSOR</TITLE>
+</HEAD><BODY>
+<H1>_KEYCENSOR</H1>
+Section: Maintenance Commands (8)<BR>Updated: 25 Apr 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec _keycensor - internal routine to remove sensitive information
+<A NAME="lbAC">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>_keycensor</I>
+
+is used by
+<B>ipsec barf</B>
+
+to process the /etc/ipsec.secrets file, removing private key info.
+<A NAME="lbAD">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_barf.8.html">ipsec_barf</A>(8)
+<A NAME="lbAE">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Man page written for the Linux FreeS/WAN project &lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Michael Richardson. Original program by Henry Spencer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAD">SEE ALSO</A><DD>
+<DT><A HREF="#lbAE">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec__plutoload.8.html b/doc/manpage.d/ipsec__plutoload.8.html
new file mode 100644
index 000000000..2c4968300
--- /dev/null
+++ b/doc/manpage.d/ipsec__plutoload.8.html
@@ -0,0 +1,64 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of _PLUTOLOAD</TITLE>
+</HEAD><BODY>
+<H1>_PLUTOLOAD</H1>
+Section: Maintenance Commands (8)<BR>Updated: 25 Apr 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec _plutoload - internal script to start pluto
+<A NAME="lbAC">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>_plutoload</I>
+
+is called by
+<B>_plutorun</B>
+
+to actually start the pluto executable.
+<A NAME="lbAD">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_setup.8.html">ipsec_setup</A>(8), <A HREF="ipsec__realsetup.8.html">ipsec__realsetup</A>(8), <A HREF="ipsec__plutorun.8.html">ipsec__plutorun</A>(8)
+<A NAME="lbAE">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Man page written for the Linux FreeS/WAN project &lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Michael Richardson. Original program by Henry Spencer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAD">SEE ALSO</A><DD>
+<DT><A HREF="#lbAE">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec__plutorun.8.html b/doc/manpage.d/ipsec__plutorun.8.html
new file mode 100644
index 000000000..1b5a1da11
--- /dev/null
+++ b/doc/manpage.d/ipsec__plutorun.8.html
@@ -0,0 +1,70 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of _PLUTORUN</TITLE>
+</HEAD><BODY>
+<H1>_PLUTORUN</H1>
+Section: Maintenance Commands (8)<BR>Updated: 25 Apr 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec _plutorun - internal script to start pluto
+<A NAME="lbAC">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>_plutorun</I>
+
+is called by
+<B>_realsetup</B>
+
+to configure and bring up
+<B><A HREF="ipsec_pluto.8.html">ipsec_pluto</A>(8).</B>
+
+It calls
+<B>_plutoload</B>
+
+to invoke pluto, and watches to makes sure that pluto is restarted if it fails.
+<A NAME="lbAD">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_setup.8.html">ipsec_setup</A>(8), <A HREF="ipsec__realsetup.8.html">ipsec__realsetup</A>(8), <A HREF="ipsec__plutoload.8.html">ipsec__plutoload</A>(8), <A HREF="ipsec_pluto.8.html">ipsec_pluto</A>(8).
+<A NAME="lbAE">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Man page written for the Linux FreeS/WAN project &lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Michael Richardson. Original program written by Henry Spencer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAD">SEE ALSO</A><DD>
+<DT><A HREF="#lbAE">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec__realsetup.8.html b/doc/manpage.d/ipsec__realsetup.8.html
new file mode 100644
index 000000000..f45bec647
--- /dev/null
+++ b/doc/manpage.d/ipsec__realsetup.8.html
@@ -0,0 +1,68 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of _REALSETUP</TITLE>
+</HEAD><BODY>
+<H1>_REALSETUP</H1>
+Section: Maintenance Commands (8)<BR>Updated: 25 Apr 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec _realsetup - internal routine to start FreeS/WAN.
+<A NAME="lbAC">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>_realsetup</I>
+
+is called by the system init scripts to start the FreeS/WAN
+system. It starts
+<B>KLIPS </B>
+
+(the kernel component) and
+<B>pluto </B>
+
+(the userspace keying component).
+<A NAME="lbAD">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec__klipsstart.8.html">ipsec__klipsstart</A>(8), <A HREF="ipsec__plutorun.8.html">ipsec__plutorun</A>(8).
+<A NAME="lbAE">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Man page written for the Linux FreeS/WAN project &lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Michael Richardson. Original program by Henry Spencer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAD">SEE ALSO</A><DD>
+<DT><A HREF="#lbAE">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec__secretcensor.8.html b/doc/manpage.d/ipsec__secretcensor.8.html
new file mode 100644
index 000000000..6c6ea312d
--- /dev/null
+++ b/doc/manpage.d/ipsec__secretcensor.8.html
@@ -0,0 +1,65 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of _SECRETCENSOR</TITLE>
+</HEAD><BODY>
+<H1>_SECRETCENSOR</H1>
+Section: Maintenance Commands (8)<BR>Updated: 25 Apr 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec _secretcensor - internal routing to sanitize files
+<A NAME="lbAC">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>_secretcensor</I>
+
+is called by
+<B>ipsec barf</B>
+
+to process the /etc/ipsec.secrets file to remove the private key components
+from the file prior to revealing the contents.
+<A NAME="lbAD">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_barf.8.html">ipsec_barf</A>(8).
+<A NAME="lbAE">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Man page written for the Linux FreeS/WAN project &lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Michael Richardson. Original program by Henry Spencer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAD">SEE ALSO</A><DD>
+<DT><A HREF="#lbAE">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec__startklips.8.html b/doc/manpage.d/ipsec__startklips.8.html
new file mode 100644
index 000000000..3ad565e57
--- /dev/null
+++ b/doc/manpage.d/ipsec__startklips.8.html
@@ -0,0 +1,63 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of _STARTKLIPS</TITLE>
+</HEAD><BODY>
+<H1>_STARTKLIPS</H1>
+Section: Maintenance Commands (8)<BR>Updated: 25 Apr 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec _startklips - internal script to bring up kernel components
+<A NAME="lbAC">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>_startklips</I>
+
+brings up the FreeS/WAN kernel component. This involves loading any
+required modules, attaching and configuring the ipsecX pseudo-devices and
+attaching the pseudo-devices to the physical devices.
+<A NAME="lbAD">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A>(8).
+<A NAME="lbAE">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Man page written for the Linux FreeS/WAN project &lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Michael Richardson. Original program by Henry Spencer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAD">SEE ALSO</A><DD>
+<DT><A HREF="#lbAE">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec__updown.8.html b/doc/manpage.d/ipsec__updown.8.html
new file mode 100644
index 000000000..73bf8a343
--- /dev/null
+++ b/doc/manpage.d/ipsec__updown.8.html
@@ -0,0 +1,63 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of _UPDOWN</TITLE>
+</HEAD><BODY>
+<H1>_UPDOWN</H1>
+Section: Maintenance Commands (8)<BR>Updated: 25 Apr 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec _updown - klips manipulation script
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<I>_updown</I>
+
+is invoked by pluto when it has brought up a new connection. This script
+is used to insert the appropriate routing entries for IPsec operation.
+The interface to the script is documented in the pluto man page.
+<A NAME="lbAD">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_pluto.8.html">ipsec_pluto</A>(8).
+<A NAME="lbAE">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Man page written for the Linux FreeS/WAN project &lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Michael Richardson. Original program written by Henry Spencer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">SEE ALSO</A><DD>
+<DT><A HREF="#lbAE">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_addrbytesof.3.html b/doc/manpage.d/ipsec_addrbytesof.3.html
new file mode 100644
index 000000000..ca1f857e7
--- /dev/null
+++ b/doc/manpage.d/ipsec_addrbytesof.3.html
@@ -0,0 +1,232 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_INITADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_INITADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 11 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec initaddr - initialize an ip_address
+<BR>
+
+ipsec addrtypeof - get address type of an ip_address
+<BR>
+
+ipsec addrlenof - get length of address within an ip_address
+<BR>
+
+ipsec addrbytesof - get copy of address within an ip_address
+<BR>
+
+ipsec addrbytesptr - get pointer to address within an ip_address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *initaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int addrtypeof(const ip_address *src);</B>
+
+<BR>
+
+<B>size_t addrlenof(const ip_address *src);</B>
+
+<BR>
+
+<B>size_t addrbytesof(const ip_address *src,</B>
+
+<BR>
+&nbsp;
+<B>unsigned char *dst, size_t dstlen);</B>
+
+<BR>
+
+<B>size_t addrbytesptr(const ip_address *src,</B>
+
+<BR>
+&nbsp;
+<B>const unsigned char **dst);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+library uses an internal type
+<I>ip_address</I>
+
+to contain one of the (currently two) types of IP address.
+These functions provide basic tools for creating and examining this type.
+<P>
+
+<I>Initaddr</I>
+
+initializes a variable
+<I>*dst</I>
+
+of type
+<I>ip_address</I>
+
+from an address
+(in network byte order,
+indicated by a pointer
+<I>src</I>
+
+and a length
+<I>srclen</I>)
+
+and an address family
+<I>af</I>
+
+(typically
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>).
+
+The length must be consistent with the address family.
+<P>
+
+<I>Addrtypeof</I>
+
+returns the address type of an address,
+normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+(The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file arranges to include the necessary headers for these
+names to be known.)
+<P>
+
+<I>Addrlenof</I>
+
+returns the size (in bytes) of the address within an
+<I>ip_address</I>,
+
+to permit storage allocation etc.
+<P>
+
+<I>Addrbytesof</I>
+
+copies the address within the
+<I>ip_address</I>
+
+<I>src</I>
+
+to the buffer indicated by the pointer
+<I>dst</I>
+
+and the length
+<I>dstlen</I>,
+
+and returns the address length (in bytes).
+If the address will not fit,
+as many bytes as will fit are copied;
+the returned length is still the full length.
+It is the caller's responsibility to check the
+returned value to ensure that there was enough room.
+<P>
+
+<I>Addrbytesptr</I>
+
+sets
+<I>*dst</I>
+
+to a pointer to the internal address within the
+<I>ip_address</I>,
+
+and returns the address length (in bytes).
+If
+<I>dst</I>
+
+is
+<B>NULL</B>,
+
+it just returns the address length.
+The pointer points to
+<B>const</B>
+
+to discourage misuse.
+<P>
+
+<I>Initaddr</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<P>
+
+The functions which return
+<I>size_t</I>
+
+return
+<B>0</B>
+
+for a failure.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+An unknown address family is a fatal error for any of these functions
+except
+<I>addrtypeof</I>.
+
+An address-size mismatch is a fatal error for
+<I>initaddr</I>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+<I>Addrtypeof</I>
+
+should probably have been named
+<I>addrfamilyof</I>.
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_addrbytesptr.3.html b/doc/manpage.d/ipsec_addrbytesptr.3.html
new file mode 100644
index 000000000..ca1f857e7
--- /dev/null
+++ b/doc/manpage.d/ipsec_addrbytesptr.3.html
@@ -0,0 +1,232 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_INITADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_INITADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 11 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec initaddr - initialize an ip_address
+<BR>
+
+ipsec addrtypeof - get address type of an ip_address
+<BR>
+
+ipsec addrlenof - get length of address within an ip_address
+<BR>
+
+ipsec addrbytesof - get copy of address within an ip_address
+<BR>
+
+ipsec addrbytesptr - get pointer to address within an ip_address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *initaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int addrtypeof(const ip_address *src);</B>
+
+<BR>
+
+<B>size_t addrlenof(const ip_address *src);</B>
+
+<BR>
+
+<B>size_t addrbytesof(const ip_address *src,</B>
+
+<BR>
+&nbsp;
+<B>unsigned char *dst, size_t dstlen);</B>
+
+<BR>
+
+<B>size_t addrbytesptr(const ip_address *src,</B>
+
+<BR>
+&nbsp;
+<B>const unsigned char **dst);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+library uses an internal type
+<I>ip_address</I>
+
+to contain one of the (currently two) types of IP address.
+These functions provide basic tools for creating and examining this type.
+<P>
+
+<I>Initaddr</I>
+
+initializes a variable
+<I>*dst</I>
+
+of type
+<I>ip_address</I>
+
+from an address
+(in network byte order,
+indicated by a pointer
+<I>src</I>
+
+and a length
+<I>srclen</I>)
+
+and an address family
+<I>af</I>
+
+(typically
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>).
+
+The length must be consistent with the address family.
+<P>
+
+<I>Addrtypeof</I>
+
+returns the address type of an address,
+normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+(The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file arranges to include the necessary headers for these
+names to be known.)
+<P>
+
+<I>Addrlenof</I>
+
+returns the size (in bytes) of the address within an
+<I>ip_address</I>,
+
+to permit storage allocation etc.
+<P>
+
+<I>Addrbytesof</I>
+
+copies the address within the
+<I>ip_address</I>
+
+<I>src</I>
+
+to the buffer indicated by the pointer
+<I>dst</I>
+
+and the length
+<I>dstlen</I>,
+
+and returns the address length (in bytes).
+If the address will not fit,
+as many bytes as will fit are copied;
+the returned length is still the full length.
+It is the caller's responsibility to check the
+returned value to ensure that there was enough room.
+<P>
+
+<I>Addrbytesptr</I>
+
+sets
+<I>*dst</I>
+
+to a pointer to the internal address within the
+<I>ip_address</I>,
+
+and returns the address length (in bytes).
+If
+<I>dst</I>
+
+is
+<B>NULL</B>,
+
+it just returns the address length.
+The pointer points to
+<B>const</B>
+
+to discourage misuse.
+<P>
+
+<I>Initaddr</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<P>
+
+The functions which return
+<I>size_t</I>
+
+return
+<B>0</B>
+
+for a failure.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+An unknown address family is a fatal error for any of these functions
+except
+<I>addrtypeof</I>.
+
+An address-size mismatch is a fatal error for
+<I>initaddr</I>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+<I>Addrtypeof</I>
+
+should probably have been named
+<I>addrfamilyof</I>.
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_addrcmp.3.html b/doc/manpage.d/ipsec_addrcmp.3.html
new file mode 100644
index 000000000..93ac522cd
--- /dev/null
+++ b/doc/manpage.d/ipsec_addrcmp.3.html
@@ -0,0 +1,274 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ANYADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 28 Nov 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec sameaddr - are two addresses the same?
+<BR>
+
+ipsec addrcmp - ordered comparison of addresses
+<BR>
+
+ipsec samesubnet - are two subnets the same?
+<BR>
+
+ipsec addrinsubnet - is an address within a subnet?
+<BR>
+
+ipsec subnetinsubnet - is a subnet within another subnet?
+<BR>
+
+ipsec subnetishost - is a subnet a single host?
+<BR>
+
+ipsec samesaid - are two SA IDs the same?
+<BR>
+
+ipsec sameaddrtype - are two addresses of the same address family?
+<BR>
+
+ipsec samesubnettype - are two subnets of the same address family?
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int sameaddr(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int addrcmp(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int addrinsubnet(const ip_address *a, const ip_subnet *s);</B>
+
+<BR>
+
+<B>int subnetinsubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int subnetishost(const ip_subnet *s);</B>
+
+<BR>
+
+<B>int samesaid(const ip_said *a, const ip_said *b);</B>
+
+<BR>
+
+<B>int sameaddrtype(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnettype(const ip_subnet *a, const ip_subnet *b);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions do various comparisons and tests on the
+<I>ip_address</I>
+
+type and
+<I>ip_subnet</I>
+
+types.
+<P>
+
+<I>Sameaddr</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Addresses of different families are never identical.
+<P>
+
+<I>Addrcmp</I>
+
+returns
+<B>-1</B>,
+
+<B>0</B>,
+
+or
+<B>1</B>
+
+respectively
+if address
+<I>a</I>
+
+is less than, equal to, or greater than
+<I>b</I>.
+
+If they are not of the same address family,
+they are never equal;
+the ordering reported in this case is arbitrary
+(and probably not useful) but consistent.
+<P>
+
+<I>Samesubnet</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Subnets of different address families are never identical.
+<P>
+
+<I>Addrinsubnet</I>
+
+returns
+non-zero
+if address
+<I>a</I>
+
+is within subnet
+<I>s</I>
+
+and
+<B>0</B>
+
+otherwise.
+An address is never within a
+subnet of a different address family.
+<P>
+
+<I>Subnetinsubnet</I>
+
+returns
+non-zero
+if subnet
+<I>a</I>
+
+is a subset of subnet
+<I>b</I>
+
+and
+<B>0</B>
+
+otherwise.
+A subnet is deemed to be a subset of itself.
+A subnet is never a subset of another
+subnet if their address families differ.
+<P>
+
+<I>Subnetishost</I>
+
+returns
+non-zero
+if subnet
+<I>s</I>
+
+is in fact only a single host,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesaid</I>
+
+returns
+non-zero
+if SA IDs
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Sameaddrtype</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesubnettype</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_initaddr.3.html">ipsec_initaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_addrinsubnet.3.html b/doc/manpage.d/ipsec_addrinsubnet.3.html
new file mode 100644
index 000000000..93ac522cd
--- /dev/null
+++ b/doc/manpage.d/ipsec_addrinsubnet.3.html
@@ -0,0 +1,274 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ANYADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 28 Nov 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec sameaddr - are two addresses the same?
+<BR>
+
+ipsec addrcmp - ordered comparison of addresses
+<BR>
+
+ipsec samesubnet - are two subnets the same?
+<BR>
+
+ipsec addrinsubnet - is an address within a subnet?
+<BR>
+
+ipsec subnetinsubnet - is a subnet within another subnet?
+<BR>
+
+ipsec subnetishost - is a subnet a single host?
+<BR>
+
+ipsec samesaid - are two SA IDs the same?
+<BR>
+
+ipsec sameaddrtype - are two addresses of the same address family?
+<BR>
+
+ipsec samesubnettype - are two subnets of the same address family?
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int sameaddr(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int addrcmp(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int addrinsubnet(const ip_address *a, const ip_subnet *s);</B>
+
+<BR>
+
+<B>int subnetinsubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int subnetishost(const ip_subnet *s);</B>
+
+<BR>
+
+<B>int samesaid(const ip_said *a, const ip_said *b);</B>
+
+<BR>
+
+<B>int sameaddrtype(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnettype(const ip_subnet *a, const ip_subnet *b);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions do various comparisons and tests on the
+<I>ip_address</I>
+
+type and
+<I>ip_subnet</I>
+
+types.
+<P>
+
+<I>Sameaddr</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Addresses of different families are never identical.
+<P>
+
+<I>Addrcmp</I>
+
+returns
+<B>-1</B>,
+
+<B>0</B>,
+
+or
+<B>1</B>
+
+respectively
+if address
+<I>a</I>
+
+is less than, equal to, or greater than
+<I>b</I>.
+
+If they are not of the same address family,
+they are never equal;
+the ordering reported in this case is arbitrary
+(and probably not useful) but consistent.
+<P>
+
+<I>Samesubnet</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Subnets of different address families are never identical.
+<P>
+
+<I>Addrinsubnet</I>
+
+returns
+non-zero
+if address
+<I>a</I>
+
+is within subnet
+<I>s</I>
+
+and
+<B>0</B>
+
+otherwise.
+An address is never within a
+subnet of a different address family.
+<P>
+
+<I>Subnetinsubnet</I>
+
+returns
+non-zero
+if subnet
+<I>a</I>
+
+is a subset of subnet
+<I>b</I>
+
+and
+<B>0</B>
+
+otherwise.
+A subnet is deemed to be a subset of itself.
+A subnet is never a subset of another
+subnet if their address families differ.
+<P>
+
+<I>Subnetishost</I>
+
+returns
+non-zero
+if subnet
+<I>s</I>
+
+is in fact only a single host,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesaid</I>
+
+returns
+non-zero
+if SA IDs
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Sameaddrtype</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesubnettype</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_initaddr.3.html">ipsec_initaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_addrlenof.3.html b/doc/manpage.d/ipsec_addrlenof.3.html
new file mode 100644
index 000000000..ca1f857e7
--- /dev/null
+++ b/doc/manpage.d/ipsec_addrlenof.3.html
@@ -0,0 +1,232 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_INITADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_INITADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 11 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec initaddr - initialize an ip_address
+<BR>
+
+ipsec addrtypeof - get address type of an ip_address
+<BR>
+
+ipsec addrlenof - get length of address within an ip_address
+<BR>
+
+ipsec addrbytesof - get copy of address within an ip_address
+<BR>
+
+ipsec addrbytesptr - get pointer to address within an ip_address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *initaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int addrtypeof(const ip_address *src);</B>
+
+<BR>
+
+<B>size_t addrlenof(const ip_address *src);</B>
+
+<BR>
+
+<B>size_t addrbytesof(const ip_address *src,</B>
+
+<BR>
+&nbsp;
+<B>unsigned char *dst, size_t dstlen);</B>
+
+<BR>
+
+<B>size_t addrbytesptr(const ip_address *src,</B>
+
+<BR>
+&nbsp;
+<B>const unsigned char **dst);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+library uses an internal type
+<I>ip_address</I>
+
+to contain one of the (currently two) types of IP address.
+These functions provide basic tools for creating and examining this type.
+<P>
+
+<I>Initaddr</I>
+
+initializes a variable
+<I>*dst</I>
+
+of type
+<I>ip_address</I>
+
+from an address
+(in network byte order,
+indicated by a pointer
+<I>src</I>
+
+and a length
+<I>srclen</I>)
+
+and an address family
+<I>af</I>
+
+(typically
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>).
+
+The length must be consistent with the address family.
+<P>
+
+<I>Addrtypeof</I>
+
+returns the address type of an address,
+normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+(The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file arranges to include the necessary headers for these
+names to be known.)
+<P>
+
+<I>Addrlenof</I>
+
+returns the size (in bytes) of the address within an
+<I>ip_address</I>,
+
+to permit storage allocation etc.
+<P>
+
+<I>Addrbytesof</I>
+
+copies the address within the
+<I>ip_address</I>
+
+<I>src</I>
+
+to the buffer indicated by the pointer
+<I>dst</I>
+
+and the length
+<I>dstlen</I>,
+
+and returns the address length (in bytes).
+If the address will not fit,
+as many bytes as will fit are copied;
+the returned length is still the full length.
+It is the caller's responsibility to check the
+returned value to ensure that there was enough room.
+<P>
+
+<I>Addrbytesptr</I>
+
+sets
+<I>*dst</I>
+
+to a pointer to the internal address within the
+<I>ip_address</I>,
+
+and returns the address length (in bytes).
+If
+<I>dst</I>
+
+is
+<B>NULL</B>,
+
+it just returns the address length.
+The pointer points to
+<B>const</B>
+
+to discourage misuse.
+<P>
+
+<I>Initaddr</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<P>
+
+The functions which return
+<I>size_t</I>
+
+return
+<B>0</B>
+
+for a failure.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+An unknown address family is a fatal error for any of these functions
+except
+<I>addrtypeof</I>.
+
+An address-size mismatch is a fatal error for
+<I>initaddr</I>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+<I>Addrtypeof</I>
+
+should probably have been named
+<I>addrfamilyof</I>.
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_addrtoa.3.html b/doc/manpage.d/ipsec_addrtoa.3.html
new file mode 100644
index 000000000..8f0d765e5
--- /dev/null
+++ b/doc/manpage.d/ipsec_addrtoa.3.html
@@ -0,0 +1,448 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ATOADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ATOADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec atoaddr, addrtoa - convert Internet addresses to and from ASCII
+<BR>
+
+ipsec atosubnet, subnettoa - convert subnet/mask ASCII form to and from addresses
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *atoaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr *addr);</B>
+
+<BR>
+
+<B>size_t addrtoa(struct in_addr addr, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<P>
+<B>const char *atosubnet(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr *addr, struct in_addr *mask);</B>
+
+<BR>
+
+<B>size_t subnettoa(struct in_addr addr, struct in_addr mask,</B>
+
+<BR>
+&nbsp;
+<B>int format, char *dst, size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete; see
+<I><A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A></I>(3)
+
+for their replacements.
+<P>
+
+<I>Atoaddr</I>
+
+converts an ASCII name or dotted-decimal address into a binary address
+(in network byte order).
+<I>Addrtoa</I>
+
+does the reverse conversion, back to an ASCII dotted-decimal address.
+<I>Atosubnet</I>
+
+and
+<I>subnettoa</I>
+
+do likewise for the ``address/mask'' ASCII form used to write a
+specification of a subnet.
+<P>
+
+An address is specified in ASCII as a
+dotted-decimal address (e.g.
+<B>1.2.3.4</B>),
+
+an eight-digit network-order hexadecimal number with the usual C prefix (e.g.
+<B>0x01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>),
+
+an eight-digit host-order hexadecimal number with a
+<B>0h</B>
+
+prefix (e.g.
+<B>0h01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>
+
+on a big-endian host and
+<B>4.3.2.1</B>
+
+on a little-endian host),
+a DNS name to be looked up via
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3),
+
+or an old-style network name to be looked up via
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3).
+
+<P>
+
+A dotted-decimal address may be incomplete, in which case
+ASCII-to-binary conversion implicitly appends
+as many instances of
+<B>.0</B>
+
+as necessary to bring it up to four components.
+The components of a dotted-decimal address are always taken as
+decimal, and leading zeros are ignored.
+For example,
+<B>10</B>
+
+is synonymous with
+<B>10.0.0.0</B>,
+
+and
+<B>128.009.000.032</B>
+
+is synonymous with
+<B>128.9.0.32</B>
+
+(the latter example is verbatim from RFC 1166).
+The result of
+<I>addrtoa</I>
+
+is always complete and does not contain leading zeros.
+<P>
+
+The letters in
+a hexadecimal address may be uppercase or lowercase or any mixture thereof.
+Use of hexadecimal addresses is
+<B>strongly</B>
+
+<B>discouraged</B>;
+
+they are included only to save hassles when dealing with
+the handful of perverted programs which already print
+network addresses in hexadecimal.
+<P>
+
+DNS names may be complete (optionally terminated with a ``.'')
+or incomplete, and are looked up as specified by local system configuration
+(see
+<I><A HREF="resolver.5.html">resolver</A></I>(5)).
+
+The
+<I>h_addr</I>
+
+value returned by
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3)
+
+is used,
+so with current DNS implementations,
+the result when the name corresponds to more than one address is
+difficult to predict.
+Name lookup resorts to
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3)
+
+only if
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3)
+
+fails.
+<P>
+
+A subnet specification is of the form <I>network</I><B>/</B><I>mask</I>.
+The
+<I>network</I>
+
+and
+<I>mask</I>
+
+can be any form acceptable to
+<I>atoaddr</I>.
+
+In addition, the
+<I>mask</I>
+
+can be a decimal integer (leading zeros ignored) giving a bit count,
+in which case
+it stands for a mask with that number of high bits on and all others off
+(e.g.,
+<B>24</B>
+
+means
+<B>255.255.255.0</B>).
+
+In any case, the mask must be contiguous
+(a sequence of high bits on and all remaining low bits off).
+As a special case, the subnet specification
+<B>%default</B>
+
+is a synonym for
+<B>0.0.0.0/0</B>.
+
+<P>
+
+<I>Atosubnet</I>
+
+ANDs the mask with the address before returning,
+so that any non-network bits in the address are turned off
+(e.g.,
+<B>10.1.2.3/24</B>
+
+is synonymous with
+<B>10.1.2.0/24</B>).
+
+<I>Subnettoa</I>
+
+generates the decimal-integer-bit-count
+form of the mask,
+with no leading zeros,
+unless the mask is non-contiguous.
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>atoaddr</I>
+
+and
+<I>atosubnet</I>
+
+specifies the length of the ASCII string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>addrtoa</I>
+
+and
+<I>subnettoa</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines constants,
+<B>ADDRTOA_BUF</B>
+
+and
+<B>SUBNETTOA_BUF</B>,
+
+which are the sizes of buffers just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>addrtoa</I>
+
+and
+<I>subnettoa</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the ASCII character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default,
+and is in fact the only format currently available.
+This parameter is a hedge against future needs.
+<P>
+
+The ASCII-to-binary functions return NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+The binary-to-ASCII functions return
+<B>0</B>
+
+for a failure, and otherwise
+always return the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>atoaddr</I>
+
+are:
+empty input;
+attempt to allocate temporary storage for a very long name failed;
+name lookup failed;
+syntax error in dotted-decimal form;
+dotted-decimal component too large to fit in 8 bits.
+<P>
+
+Fatal errors in
+<I>atosubnet</I>
+
+are:
+no
+<B>/</B>
+
+in
+<I>src</I>;
+
+<I>atoaddr</I>
+
+error in conversion of
+<I>network</I>
+
+or
+<I>mask</I>;
+
+bit-count mask too big;
+mask non-contiguous.
+<P>
+
+Fatal errors in
+<I>addrtoa</I>
+
+and
+<I>subnettoa</I>
+
+are:
+unknown format.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The interpretation of incomplete dotted-decimal addresses
+(e.g.
+<B>10/24</B>
+
+means
+<B>10.0.0.0/24</B>)
+
+differs from that of some older conversion
+functions, e.g. those of
+<I><A HREF="inet.3.html">inet</A></I>(3).
+
+The behavior of the older functions has never been
+particularly consistent or particularly useful.
+<P>
+
+Ignoring leading zeros in dotted-decimal components and bit counts
+is arguably the most useful behavior in this application,
+but it might occasionally cause confusion with the historical use of leading
+zeros to denote octal numbers.
+<P>
+
+It is barely possible that somebody, somewhere,
+might have a legitimate use for non-contiguous subnet masks.
+<P>
+
+<I><A HREF="Getnetbyname.3.html">Getnetbyname</A></I>(3)
+
+is a historical dreg.
+<P>
+
+The restriction of ASCII-to-binary error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The ASCII-to-binary error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = atoaddr( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_addrtosubnet.3.html b/doc/manpage.d/ipsec_addrtosubnet.3.html
new file mode 100644
index 000000000..e442a9100
--- /dev/null
+++ b/doc/manpage.d/ipsec_addrtosubnet.3.html
@@ -0,0 +1,238 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_INITSUBNET</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_INITSUBNET</H1>
+Section: C Library Functions (3)<BR>Updated: 12 March 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec initsubnet - initialize an ip_subnet
+<BR>
+
+ipsec addrtosubnet - initialize a singleton ip_subnet
+<BR>
+
+ipsec subnettypeof - get address type of an ip_subnet
+<BR>
+
+ipsec masktocount - convert subnet mask to bit count
+<BR>
+
+ipsec networkof - get base address of an ip_subnet
+<BR>
+
+ipsec maskof - get subnet mask of an ip_subnet
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *initsubnet(const ip_address *addr,</B>
+
+<BR>
+&nbsp;
+<B>int maskbits, int clash, ip_subnet *dst);</B>
+
+<BR>
+
+<B>const char *addrtosubnet(const ip_address *addr,</B>
+
+<BR>
+&nbsp;
+<B>ip_subnet *dst);</B>
+
+<P>
+<B>int subnettypeof(const ip_subnet *src);</B>
+
+<BR>
+
+<B>int masktocount(const ip_address *src);</B>
+
+<BR>
+
+<B>void networkof(const ip_subnet *src, ip_address *dst);</B>
+
+<BR>
+
+<B>void maskof(const ip_subnet *src, ip_address *dst);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+library uses an internal type
+<I>ip_subnet</I>
+
+to contain a description of an IP subnet
+(base address plus mask).
+These functions provide basic tools for creating and examining this type.
+<P>
+
+<I>Initsubnet</I>
+
+initializes a variable
+<I>*dst</I>
+
+of type
+<I>ip_subnet</I>
+
+from a base address and
+a count of mask bits.
+The
+<I>clash</I>
+
+parameter specifies what to do if the base address includes
+<B>1</B>
+
+bits outside the prefix specified by the mask
+(that is, in the ``host number'' part of the address):
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT>'0'<DD>
+zero out host-number bits
+<DT>'x'<DD>
+non-zero host-number bits are an error
+</DL>
+</DL>
+
+<P>
+
+<I>Initsubnet</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<P>
+
+<I>Addrtosubnet</I>
+
+initializes an
+<I>ip_subnet</I>
+
+variable
+<I>*dst</I>
+
+to a ``singleton subnet'' containing the single address
+<I>*addr</I>.
+
+It returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure.
+<P>
+
+<I>Subnettypeof</I>
+
+returns the address type of a subnet,
+normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+(The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file arranges to include the necessary headers for these
+names to be known.)
+<P>
+
+<I>Masktocount</I>
+
+converts a subnet mask, expressed as an address, to a bit count
+suitable for use with
+<I>initsubnet</I>.
+
+It returns
+<B>-1</B>
+
+for error; see DIAGNOSTICS.
+<P>
+
+<I>Networkof</I>
+
+fills in
+<I>*dst</I>
+
+with the base address of subnet
+<I>src</I>.
+
+<P>
+
+<I>Maskof</I>
+
+fills in
+<I>*dst</I>
+
+with the subnet mask of subnet
+<I>src</I>,
+
+expressed as an address.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_ttosubnet.3.html">ipsec_ttosubnet</A>(3), <A HREF="ipsec_rangetosubnet.3.html">ipsec_rangetosubnet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>initsubnet</I>
+
+are:
+unknown address family;
+unknown
+<I>clash</I>
+
+value;
+impossible mask bit count;
+non-zero host-number bits and
+<I>clash</I>
+
+is
+<B>'x'</B>.
+
+Fatal errors in
+<I>addrtosubnet</I>
+
+are:
+unknown address family.
+Fatal errors in
+<I>masktocount</I>
+
+are:
+unknown address family;
+mask bits not contiguous.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_addrtot.3.html b/doc/manpage.d/ipsec_addrtot.3.html
new file mode 100644
index 000000000..eccb946e6
--- /dev/null
+++ b/doc/manpage.d/ipsec_addrtot.3.html
@@ -0,0 +1,569 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TTOADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TTOADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 28 Sept 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ttoaddr, tnatoaddr, addrtot - convert Internet addresses to and from text
+<BR>
+
+ipsec ttosubnet, subnettot - convert subnet/mask text form to and from addresses
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *ttoaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_address *addr);</B>
+
+<BR>
+
+<B>const char *tnatoaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_address *addr);</B>
+
+<BR>
+
+<B>size_t addrtot(const ip_address *addr, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<P>
+<B>const char *ttosubnet(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_subnet *dst);</B>
+
+<BR>
+
+<B>size_t subnettot(const ip_subnet *sub, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Ttoaddr</I>
+
+converts a text-string name or numeric address into a binary address
+(in network byte order).
+<I>Tnatoaddr</I>
+
+does the same conversion,
+but the only text forms it accepts are
+the ``official'' forms of
+numeric address (dotted-decimal for IPv4, colon-hex for IPv6).
+<I>Addrtot</I>
+
+does the reverse conversion, from binary address back to a text form.
+<I>Ttosubnet</I>
+
+and
+<I>subnettot</I>
+
+do likewise for the ``address/mask'' form used to write a
+specification of a subnet.
+<P>
+
+An IPv4 address is specified in text as a
+dotted-decimal address (e.g.
+<B>1.2.3.4</B>),
+
+an eight-digit network-order hexadecimal number with the usual C prefix (e.g.
+<B>0x01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>),
+
+an eight-digit host-order hexadecimal number with a
+<B>0h</B>
+
+prefix (e.g.
+<B>0h01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>
+
+on a big-endian host and
+<B>4.3.2.1</B>
+
+on a little-endian host),
+a DNS name to be looked up via
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3),
+
+or an old-style network name to be looked up via
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3).
+
+<P>
+
+A dotted-decimal address may be incomplete, in which case
+text-to-binary conversion implicitly appends
+as many instances of
+<B>.0</B>
+
+as necessary to bring it up to four components.
+The components of a dotted-decimal address are always taken as
+decimal, and leading zeros are ignored.
+For example,
+<B>10</B>
+
+is synonymous with
+<B>10.0.0.0</B>,
+
+and
+<B>128.009.000.032</B>
+
+is synonymous with
+<B>128.9.0.32</B>
+
+(the latter example is verbatim from RFC 1166).
+The result of applying
+<I>addrtot</I>
+
+to an IPv4 address is always complete and does not contain leading zeros.
+<P>
+
+Use of hexadecimal addresses is
+<B>strongly</B>
+
+<B>discouraged</B>;
+
+they are included only to save hassles when dealing with
+the handful of perverted programs which already print
+network addresses in hexadecimal.
+<P>
+
+An IPv6 address is specified in text with
+colon-hex notation (e.g.
+<B>0:56:78ab:22:33:44:55:66</B>),
+
+colon-hex with
+<B>::</B>
+
+abbreviating at most one subsequence of multiple zeros (e.g.
+<B>99:ab::54:068</B>,
+
+which is synonymous with
+<B>99:ab:0:0:0:0:54:68</B>),
+
+or a DNS name to be looked up via
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3).
+
+The result of applying
+<I>addrtot</I>
+
+to an IPv6 address will use
+<B>::</B>
+
+abbreviation if possible,
+and will not contain leading zeros.
+<P>
+
+The letters in hexadecimal
+may be uppercase or lowercase or any mixture thereof.
+<P>
+
+DNS names may be complete (optionally terminated with a ``.'')
+or incomplete, and are looked up as specified by local system configuration
+(see
+<I><A HREF="resolver.5.html">resolver</A></I>(5)).
+
+The
+<I>h_addr</I>
+
+value returned by
+<I><A HREF="gethostbyname2.3.html">gethostbyname2</A></I>(3)
+
+is used,
+so with current DNS implementations,
+the result when the name corresponds to more than one address is
+difficult to predict.
+IPv4 name lookup resorts to
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3)
+
+only if
+<I><A HREF="gethostbyname2.3.html">gethostbyname2</A></I>(3)
+
+fails.
+<P>
+
+A subnet specification is of the form <I>network</I><B>/</B><I>mask</I>.
+The
+<I>network</I>
+
+and
+<I>mask</I>
+
+can be any form acceptable to
+<I>ttoaddr</I>.
+
+In addition, and preferably, the
+<I>mask</I>
+
+can be a decimal integer (leading zeros ignored) giving a bit count,
+in which case
+it stands for a mask with that number of high bits on and all others off
+(e.g.,
+<B>24</B>
+
+in IPv4 means
+<B>255.255.255.0</B>).
+
+In any case, the mask must be contiguous
+(a sequence of high bits on and all remaining low bits off).
+As a special case, the subnet specification
+<B>%default</B>
+
+is a synonym for
+<B>0.0.0.0/0</B>
+
+or
+<B>::/0</B>
+
+in IPv4 or IPv6 respectively.
+<P>
+
+<I>Ttosubnet</I>
+
+ANDs the mask with the address before returning,
+so that any non-network bits in the address are turned off
+(e.g.,
+<B>10.1.2.3/24</B>
+
+is synonymous with
+<B>10.1.2.0/24</B>).
+
+<I>Subnettot</I>
+
+always generates the decimal-integer-bit-count
+form of the mask,
+with no leading zeros.
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>ttoaddr</I>
+
+and
+<I>ttosubnet</I>
+
+specifies the length of the text string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>af</I>
+
+parameter of
+<I>ttoaddr</I>
+
+and
+<I>ttosubnet</I>
+
+specifies the address family of interest.
+It should be either
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>addrtot</I>
+
+and
+<I>subnettot</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines constants,
+<B>ADDRTOT_BUF</B>
+
+and
+<B>SUBNETTOT_BUF</B>,
+
+which are the sizes of buffers just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>addrtot</I>
+
+and
+<I>subnettot</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default,
+and is in fact the only format currently available in
+<I>subnettot</I>.
+
+<I>Addrtot</I>
+
+also accepts format values
+<B>'r'</B>
+
+(signifying a text form suitable for DNS reverse lookups,
+e.g.
+<B>4.3.2.1.IN-ADDR.ARPA.</B>
+
+for IPv4 and
+RFC 2874 format for IPv6),
+and
+<B>'R'</B>
+
+(signifying an alternate reverse-lookup form,
+an error for IPv4 and RFC 1886 format for IPv6).
+Reverse-lookup names always end with a ``.''.
+<P>
+
+The text-to-binary functions return NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+The binary-to-text functions return
+<B>0</B>
+
+for a failure, and otherwise
+always return the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>ttoaddr</I>
+
+are:
+empty input;
+unknown address family;
+attempt to allocate temporary storage for a very long name failed;
+name lookup failed;
+syntax error in dotted-decimal or colon-hex form;
+dotted-decimal or colon-hex component too large.
+<P>
+
+Fatal errors in
+<I>ttosubnet</I>
+
+are:
+no
+<B>/</B>
+
+in
+<I>src</I>;
+
+<I>ttoaddr</I>
+
+error in conversion of
+<I>network</I>
+
+or
+<I>mask</I>;
+
+bit-count mask too big;
+mask non-contiguous.
+<P>
+
+Fatal errors in
+<I>addrtot</I>
+
+and
+<I>subnettot</I>
+
+are:
+unknown format.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The interpretation of incomplete dotted-decimal addresses
+(e.g.
+<B>10/24</B>
+
+means
+<B>10.0.0.0/24</B>)
+
+differs from that of some older conversion
+functions, e.g. those of
+<I><A HREF="inet.3.html">inet</A></I>(3).
+
+The behavior of the older functions has never been
+particularly consistent or particularly useful.
+<P>
+
+Ignoring leading zeros in dotted-decimal components and bit counts
+is arguably the most useful behavior in this application,
+but it might occasionally cause confusion with the historical use of leading
+zeros to denote octal numbers.
+<P>
+
+<I>Ttoaddr</I>
+
+does not support the mixed colon-hex-dotted-decimal
+convention used to embed an IPv4 address in an IPv6 address.
+<P>
+
+<I>Addrtot</I>
+
+always uses the
+<B>::</B>
+
+abbreviation (which can appear only once in an address) for the
+<I>first</I>
+
+sequence of multiple zeros in an IPv6 address.
+One can construct addresses (unlikely ones) in which this is suboptimal.
+<P>
+
+<I>Addrtot</I>
+
+<B>'r'</B>
+
+conversion of an IPv6 address uses lowercase hexadecimal,
+not the uppercase used in RFC 2874's examples.
+It takes careful reading of RFCs 2874, 2673, and 2234 to realize
+that lowercase is technically legitimate here,
+and there may be software which botches this
+and hence would have trouble with lowercase hex.
+<P>
+
+Possibly
+<I>subnettot</I>
+
+ought to recognize the
+<B>%default</B>
+
+case and generate that string as its output.
+Currently it doesn't.
+<P>
+
+It is barely possible that somebody, somewhere,
+might have a legitimate use for non-contiguous subnet masks.
+<P>
+
+<I><A HREF="Getnetbyname.3.html">Getnetbyname</A></I>(3)
+
+is a historical dreg.
+<P>
+
+<I>Tnatoaddr</I>
+
+probably should enforce completeness of dotted-decimal addresses.
+<P>
+
+The restriction of text-to-binary error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The text-to-binary error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = ttoaddr( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_addrtypeof.3.html b/doc/manpage.d/ipsec_addrtypeof.3.html
new file mode 100644
index 000000000..ca1f857e7
--- /dev/null
+++ b/doc/manpage.d/ipsec_addrtypeof.3.html
@@ -0,0 +1,232 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_INITADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_INITADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 11 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec initaddr - initialize an ip_address
+<BR>
+
+ipsec addrtypeof - get address type of an ip_address
+<BR>
+
+ipsec addrlenof - get length of address within an ip_address
+<BR>
+
+ipsec addrbytesof - get copy of address within an ip_address
+<BR>
+
+ipsec addrbytesptr - get pointer to address within an ip_address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *initaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int addrtypeof(const ip_address *src);</B>
+
+<BR>
+
+<B>size_t addrlenof(const ip_address *src);</B>
+
+<BR>
+
+<B>size_t addrbytesof(const ip_address *src,</B>
+
+<BR>
+&nbsp;
+<B>unsigned char *dst, size_t dstlen);</B>
+
+<BR>
+
+<B>size_t addrbytesptr(const ip_address *src,</B>
+
+<BR>
+&nbsp;
+<B>const unsigned char **dst);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+library uses an internal type
+<I>ip_address</I>
+
+to contain one of the (currently two) types of IP address.
+These functions provide basic tools for creating and examining this type.
+<P>
+
+<I>Initaddr</I>
+
+initializes a variable
+<I>*dst</I>
+
+of type
+<I>ip_address</I>
+
+from an address
+(in network byte order,
+indicated by a pointer
+<I>src</I>
+
+and a length
+<I>srclen</I>)
+
+and an address family
+<I>af</I>
+
+(typically
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>).
+
+The length must be consistent with the address family.
+<P>
+
+<I>Addrtypeof</I>
+
+returns the address type of an address,
+normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+(The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file arranges to include the necessary headers for these
+names to be known.)
+<P>
+
+<I>Addrlenof</I>
+
+returns the size (in bytes) of the address within an
+<I>ip_address</I>,
+
+to permit storage allocation etc.
+<P>
+
+<I>Addrbytesof</I>
+
+copies the address within the
+<I>ip_address</I>
+
+<I>src</I>
+
+to the buffer indicated by the pointer
+<I>dst</I>
+
+and the length
+<I>dstlen</I>,
+
+and returns the address length (in bytes).
+If the address will not fit,
+as many bytes as will fit are copied;
+the returned length is still the full length.
+It is the caller's responsibility to check the
+returned value to ensure that there was enough room.
+<P>
+
+<I>Addrbytesptr</I>
+
+sets
+<I>*dst</I>
+
+to a pointer to the internal address within the
+<I>ip_address</I>,
+
+and returns the address length (in bytes).
+If
+<I>dst</I>
+
+is
+<B>NULL</B>,
+
+it just returns the address length.
+The pointer points to
+<B>const</B>
+
+to discourage misuse.
+<P>
+
+<I>Initaddr</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<P>
+
+The functions which return
+<I>size_t</I>
+
+return
+<B>0</B>
+
+for a failure.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+An unknown address family is a fatal error for any of these functions
+except
+<I>addrtypeof</I>.
+
+An address-size mismatch is a fatal error for
+<I>initaddr</I>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+<I>Addrtypeof</I>
+
+should probably have been named
+<I>addrfamilyof</I>.
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_anyaddr.3.html b/doc/manpage.d/ipsec_anyaddr.3.html
new file mode 100644
index 000000000..974236005
--- /dev/null
+++ b/doc/manpage.d/ipsec_anyaddr.3.html
@@ -0,0 +1,166 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ANYADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 8 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec anyaddr - get &quot;any&quot; address
+<BR>
+
+ipsec isanyaddr - test address for equality to &quot;any&quot; address
+<BR>
+
+ipsec unspecaddr - get &quot;unspecified&quot; address
+<BR>
+
+ipsec isunspecaddr - test address for equality to &quot;unspecified&quot; address
+<BR>
+
+ipsec loopbackaddr - get loopback address
+<BR>
+
+ipsec isloopbackaddr - test address for equality to loopback address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *anyaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isanyaddr(const ip_address *src);</B>
+
+<BR>
+
+<B>const char *unspecaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isunspecaddr(const ip_address *src);</B>
+
+<BR>
+
+<B>const char *loopbackaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isloopbackaddr(const ip_address *src);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions fill in, and test for, special values of the
+<I>ip_address</I>
+
+type.
+<P>
+
+<I>Anyaddr</I>
+
+fills in the destination
+<I>*dst</I>
+
+with the ``any'' address of address family
+<I>af</I>
+
+(normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>).
+
+The IPv4 ``any'' address is the one embodied in the old
+<B>INADDR_ANY</B>
+
+macro.
+<P>
+
+<I>Isanyaddr</I>
+
+returns
+<B>1</B>
+
+if the
+<I>src</I>
+
+address equals the ``any'' address,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+Similarly,
+<I>unspecaddr</I>
+
+supplies, and
+<I>isunspecaddr</I>
+
+tests for,
+the ``unspecified'' address,
+which may be the same as the ``any'' address.
+<P>
+
+Similarly,
+<I>loopbackaddr</I>
+
+supplies, and
+<I>islookbackaddr</I>
+
+tests for,
+the loopback address.
+<P>
+
+<I>Anyaddr</I>,
+
+<I>unspecaddr</I>,
+
+and
+<I>loopbackaddr</I>
+
+return
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_addrtot.3.html">ipsec_addrtot</A>(3), <A HREF="ipsec_sameaddr.3.html">ipsec_sameaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in the address-supplying functions are:
+unknown address family.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_atoaddr.3.html b/doc/manpage.d/ipsec_atoaddr.3.html
new file mode 100644
index 000000000..8f0d765e5
--- /dev/null
+++ b/doc/manpage.d/ipsec_atoaddr.3.html
@@ -0,0 +1,448 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ATOADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ATOADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec atoaddr, addrtoa - convert Internet addresses to and from ASCII
+<BR>
+
+ipsec atosubnet, subnettoa - convert subnet/mask ASCII form to and from addresses
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *atoaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr *addr);</B>
+
+<BR>
+
+<B>size_t addrtoa(struct in_addr addr, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<P>
+<B>const char *atosubnet(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr *addr, struct in_addr *mask);</B>
+
+<BR>
+
+<B>size_t subnettoa(struct in_addr addr, struct in_addr mask,</B>
+
+<BR>
+&nbsp;
+<B>int format, char *dst, size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete; see
+<I><A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A></I>(3)
+
+for their replacements.
+<P>
+
+<I>Atoaddr</I>
+
+converts an ASCII name or dotted-decimal address into a binary address
+(in network byte order).
+<I>Addrtoa</I>
+
+does the reverse conversion, back to an ASCII dotted-decimal address.
+<I>Atosubnet</I>
+
+and
+<I>subnettoa</I>
+
+do likewise for the ``address/mask'' ASCII form used to write a
+specification of a subnet.
+<P>
+
+An address is specified in ASCII as a
+dotted-decimal address (e.g.
+<B>1.2.3.4</B>),
+
+an eight-digit network-order hexadecimal number with the usual C prefix (e.g.
+<B>0x01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>),
+
+an eight-digit host-order hexadecimal number with a
+<B>0h</B>
+
+prefix (e.g.
+<B>0h01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>
+
+on a big-endian host and
+<B>4.3.2.1</B>
+
+on a little-endian host),
+a DNS name to be looked up via
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3),
+
+or an old-style network name to be looked up via
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3).
+
+<P>
+
+A dotted-decimal address may be incomplete, in which case
+ASCII-to-binary conversion implicitly appends
+as many instances of
+<B>.0</B>
+
+as necessary to bring it up to four components.
+The components of a dotted-decimal address are always taken as
+decimal, and leading zeros are ignored.
+For example,
+<B>10</B>
+
+is synonymous with
+<B>10.0.0.0</B>,
+
+and
+<B>128.009.000.032</B>
+
+is synonymous with
+<B>128.9.0.32</B>
+
+(the latter example is verbatim from RFC 1166).
+The result of
+<I>addrtoa</I>
+
+is always complete and does not contain leading zeros.
+<P>
+
+The letters in
+a hexadecimal address may be uppercase or lowercase or any mixture thereof.
+Use of hexadecimal addresses is
+<B>strongly</B>
+
+<B>discouraged</B>;
+
+they are included only to save hassles when dealing with
+the handful of perverted programs which already print
+network addresses in hexadecimal.
+<P>
+
+DNS names may be complete (optionally terminated with a ``.'')
+or incomplete, and are looked up as specified by local system configuration
+(see
+<I><A HREF="resolver.5.html">resolver</A></I>(5)).
+
+The
+<I>h_addr</I>
+
+value returned by
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3)
+
+is used,
+so with current DNS implementations,
+the result when the name corresponds to more than one address is
+difficult to predict.
+Name lookup resorts to
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3)
+
+only if
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3)
+
+fails.
+<P>
+
+A subnet specification is of the form <I>network</I><B>/</B><I>mask</I>.
+The
+<I>network</I>
+
+and
+<I>mask</I>
+
+can be any form acceptable to
+<I>atoaddr</I>.
+
+In addition, the
+<I>mask</I>
+
+can be a decimal integer (leading zeros ignored) giving a bit count,
+in which case
+it stands for a mask with that number of high bits on and all others off
+(e.g.,
+<B>24</B>
+
+means
+<B>255.255.255.0</B>).
+
+In any case, the mask must be contiguous
+(a sequence of high bits on and all remaining low bits off).
+As a special case, the subnet specification
+<B>%default</B>
+
+is a synonym for
+<B>0.0.0.0/0</B>.
+
+<P>
+
+<I>Atosubnet</I>
+
+ANDs the mask with the address before returning,
+so that any non-network bits in the address are turned off
+(e.g.,
+<B>10.1.2.3/24</B>
+
+is synonymous with
+<B>10.1.2.0/24</B>).
+
+<I>Subnettoa</I>
+
+generates the decimal-integer-bit-count
+form of the mask,
+with no leading zeros,
+unless the mask is non-contiguous.
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>atoaddr</I>
+
+and
+<I>atosubnet</I>
+
+specifies the length of the ASCII string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>addrtoa</I>
+
+and
+<I>subnettoa</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines constants,
+<B>ADDRTOA_BUF</B>
+
+and
+<B>SUBNETTOA_BUF</B>,
+
+which are the sizes of buffers just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>addrtoa</I>
+
+and
+<I>subnettoa</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the ASCII character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default,
+and is in fact the only format currently available.
+This parameter is a hedge against future needs.
+<P>
+
+The ASCII-to-binary functions return NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+The binary-to-ASCII functions return
+<B>0</B>
+
+for a failure, and otherwise
+always return the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>atoaddr</I>
+
+are:
+empty input;
+attempt to allocate temporary storage for a very long name failed;
+name lookup failed;
+syntax error in dotted-decimal form;
+dotted-decimal component too large to fit in 8 bits.
+<P>
+
+Fatal errors in
+<I>atosubnet</I>
+
+are:
+no
+<B>/</B>
+
+in
+<I>src</I>;
+
+<I>atoaddr</I>
+
+error in conversion of
+<I>network</I>
+
+or
+<I>mask</I>;
+
+bit-count mask too big;
+mask non-contiguous.
+<P>
+
+Fatal errors in
+<I>addrtoa</I>
+
+and
+<I>subnettoa</I>
+
+are:
+unknown format.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The interpretation of incomplete dotted-decimal addresses
+(e.g.
+<B>10/24</B>
+
+means
+<B>10.0.0.0/24</B>)
+
+differs from that of some older conversion
+functions, e.g. those of
+<I><A HREF="inet.3.html">inet</A></I>(3).
+
+The behavior of the older functions has never been
+particularly consistent or particularly useful.
+<P>
+
+Ignoring leading zeros in dotted-decimal components and bit counts
+is arguably the most useful behavior in this application,
+but it might occasionally cause confusion with the historical use of leading
+zeros to denote octal numbers.
+<P>
+
+It is barely possible that somebody, somewhere,
+might have a legitimate use for non-contiguous subnet masks.
+<P>
+
+<I><A HREF="Getnetbyname.3.html">Getnetbyname</A></I>(3)
+
+is a historical dreg.
+<P>
+
+The restriction of ASCII-to-binary error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The ASCII-to-binary error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = atoaddr( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_atoasr.3.html b/doc/manpage.d/ipsec_atoasr.3.html
new file mode 100644
index 000000000..7c9e2c4aa
--- /dev/null
+++ b/doc/manpage.d/ipsec_atoasr.3.html
@@ -0,0 +1,294 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ATOASR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ATOASR</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec atoasr - convert ASCII to Internet address, subnet, or range
+<BR>
+
+ipsec rangetoa - convert Internet address range to ASCII
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *atoasr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>char *type, struct in_addr *addrs);</B>
+
+<BR>
+
+<B>size_t rangetoa(struct in_addr *addrs, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete;
+there is no current equivalent,
+because so far they have not proved useful.
+<P>
+
+<I>Atoasr</I>
+
+converts an ASCII address, subnet, or address range
+into a suitable combination of binary addresses
+(in network byte order).
+<I>Rangetoa</I>
+
+converts an address range back into ASCII,
+using dotted-decimal form for the addresses
+(the other reverse conversions are handled by
+<I><A HREF="ipsec_addrtoa.3.html">ipsec_addrtoa</A></I>(3)
+
+and
+<I><A HREF="ipsec_subnettoa.3.html">ipsec_subnettoa</A></I>(3)).
+
+<P>
+
+A single address can be any form acceptable to
+<I><A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A></I>(3):
+
+dotted decimal, DNS name, or hexadecimal number.
+A subnet
+specification uses the form <I>network</I><B>/</B><I>mask</I>
+interpreted by
+<I><A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A></I>(3).
+
+<P>
+
+An address range is two
+<I><A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A></I>(3)
+
+addresses separated by a
+<B>...</B>
+
+delimiter.
+If there are four dots rather than three, the first is taken as
+part of the begin address,
+e.g. for a complete DNS name which ends with
+<B>.</B>
+
+to suppress completion attempts.
+The begin address of a range must be
+less than or equal to the end address.
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>atoasr</I>
+
+specifies the length of the ASCII string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>type</I>
+
+parameter of
+<I>atoasr</I>
+
+must point to a
+<B>char</B>
+
+variable used to record which form was found.
+The
+<I>addrs</I>
+
+parameter must point to a two-element array of
+<B>struct in_addr</B>
+
+which receives the results.
+The values stored into
+<B>*type</B>,
+
+and the corresponding values in the array, are:
+<P>
+
+
+
+<TT>&nbsp;&nbsp;&nbsp;</TT>*typeaddrs[0]addrs[1]<BR>
+<P>
+address<B>'a'</B>address-<BR>
+<BR>
+
+subnet<TT>&nbsp;</TT><B>'s'</B>networkmask<BR>
+<BR>
+
+range<TT>&nbsp;&nbsp;</TT><B>'r'</B>beginend<BR>
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>rangetoa</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines a constant,
+<B>RANGETOA_BUF</B>,
+
+which is the size of a buffer just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>rangetoa</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the ASCII character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default,
+and is in fact the only format currently available.
+This parameter is a hedge against future needs.
+<P>
+
+<I>Atoasr</I>
+
+returns NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<I>Rangetoa</I>
+
+returns
+<B>0</B>
+
+for a failure, and otherwise
+always returns the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A>(3), <A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>atoasr</I>
+
+are:
+empty input;
+error in
+<I><A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A></I>(3)
+
+or
+<I><A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A></I>(3)
+
+during conversion;
+begin address of range exceeds end address.
+<P>
+
+Fatal errors in
+<I>rangetoa</I>
+
+are:
+unknown format.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The restriction of error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = atoasr( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_atosa.3.html b/doc/manpage.d/ipsec_atosa.3.html
new file mode 100644
index 000000000..9e2dc2f61
--- /dev/null
+++ b/doc/manpage.d/ipsec_atosa.3.html
@@ -0,0 +1,347 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ATOSA</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ATOSA</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec atosa, satoa - convert IPsec Security Association IDs to and from ASCII
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *atosa(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>struct sa_id *sa);</B>
+
+<BR>
+
+<B>size_t satoa(struct sa_id sa, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<P>
+<B>struct sa_id {</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr dst;</B>
+
+<BR>
+&nbsp;
+<B>ipsec_spi_t spi;</B>
+
+<BR>
+&nbsp;
+<B>int proto;</B>
+
+<BR>
+
+<B>};</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete; see
+<I><A HREF="ipsec_ttosa.3.html">ipsec_ttosa</A></I>(3)
+
+for their replacements.
+<P>
+
+<I>Atosa</I>
+
+converts an ASCII Security Association (SA) specifier into an
+<B>sa_id</B>
+
+structure (containing
+a destination-host address
+in network byte order,
+an SPI number in network byte order, and
+a protocol code).
+<I>Satoa</I>
+
+does the reverse conversion, back to an ASCII SA specifier.
+<P>
+
+An SA is specified in ASCII with a mail-like syntax, e.g.
+<B><A HREF="mailto:esp507@1.2.3.4">esp507@1.2.3.4</A></B>.
+
+An SA specifier contains
+a protocol prefix (currently
+<B>ah</B>,
+
+<B>esp</B>,
+
+or
+<B>tun</B>),
+
+an unsigned integer SPI number,
+and an IP address.
+The SPI number can be decimal or hexadecimal
+(with
+<B>0x</B>
+
+prefix), as accepted by
+<I><A HREF="ipsec_atoul.3.html">ipsec_atoul</A></I>(3).
+
+The IP address can be any form accepted by
+<I><A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A></I>(3),
+
+e.g. dotted-decimal address or DNS name.
+<P>
+
+As a special case, the SA specifier
+<B>%passthrough</B>
+
+signifies the special SA used to indicate that packets should be
+passed through unaltered.
+(At present, this is a synonym for
+<B><A HREF="mailto:tun0x0@0.0.0.0">tun0x0@0.0.0.0</A></B>,
+
+but that is subject to change without notice.)
+This form is known to both
+<I>atosa</I>
+
+and
+<I>satoa</I>,
+
+so the internal form of
+<B>%passthrough</B>
+
+is never visible.
+<P>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file supplies the
+<B>sa_id</B>
+
+structure, as well as a data type
+<B>ipsec_spi_t</B>
+
+which is an unsigned 32-bit integer.
+(There is no consistency between kernel and user on what such a type
+is called, hence the header hides the differences.)
+<P>
+
+The protocol code uses the same numbers that IP does.
+For user convenience, given the difficulty in acquiring the exact set of
+protocol names used by the kernel,
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+defines the names
+<B>SA_ESP</B>,
+
+<B>SA_AH</B>,
+
+and
+<B>SA_IPIP</B>
+
+to have the same values as the kernel names
+<B>IPPROTO_ESP</B>,
+
+<B>IPPROTO_AH</B>,
+
+and
+<B>IPPROTO_IPIP</B>.
+
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>atosa</I>
+
+specifies the length of the ASCII string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>satoa</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines a constant,
+<B>SATOA_BUF</B>,
+
+which is the size of a buffer just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>satoa</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the ASCII character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default
+(currently
+lowercase protocol prefix, lowercase hexadecimal SPI, dotted-decimal address).
+The value
+<B>d</B>
+
+causes the SPI to be generated in decimal instead.
+<P>
+
+<I>Atosa</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<I>Satoa</I>
+
+returns
+<B>0</B>
+
+for a failure, and otherwise
+always returns the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec_atoul.3.html">ipsec_atoul</A>(3), <A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A>(3), <A HREF="inet.3.html">inet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>atosa</I>
+
+are:
+empty input;
+input too small to be a legal SA specifier;
+no
+<B>@</B>
+
+in input;
+unknown protocol prefix;
+conversion error in
+<I>atoul</I>
+
+or
+<I>atoaddr</I>.
+
+<P>
+
+Fatal errors in
+<I>satoa</I>
+
+are:
+unknown format; unknown protocol code.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The
+<B>tun</B>
+
+protocol code is a FreeS/WANism which may eventually disappear.
+<P>
+
+The restriction of ASCII-to-binary error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The ASCII-to-binary error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = atoaddr( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_atosubnet.3.html b/doc/manpage.d/ipsec_atosubnet.3.html
new file mode 100644
index 000000000..8f0d765e5
--- /dev/null
+++ b/doc/manpage.d/ipsec_atosubnet.3.html
@@ -0,0 +1,448 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ATOADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ATOADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec atoaddr, addrtoa - convert Internet addresses to and from ASCII
+<BR>
+
+ipsec atosubnet, subnettoa - convert subnet/mask ASCII form to and from addresses
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *atoaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr *addr);</B>
+
+<BR>
+
+<B>size_t addrtoa(struct in_addr addr, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<P>
+<B>const char *atosubnet(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr *addr, struct in_addr *mask);</B>
+
+<BR>
+
+<B>size_t subnettoa(struct in_addr addr, struct in_addr mask,</B>
+
+<BR>
+&nbsp;
+<B>int format, char *dst, size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete; see
+<I><A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A></I>(3)
+
+for their replacements.
+<P>
+
+<I>Atoaddr</I>
+
+converts an ASCII name or dotted-decimal address into a binary address
+(in network byte order).
+<I>Addrtoa</I>
+
+does the reverse conversion, back to an ASCII dotted-decimal address.
+<I>Atosubnet</I>
+
+and
+<I>subnettoa</I>
+
+do likewise for the ``address/mask'' ASCII form used to write a
+specification of a subnet.
+<P>
+
+An address is specified in ASCII as a
+dotted-decimal address (e.g.
+<B>1.2.3.4</B>),
+
+an eight-digit network-order hexadecimal number with the usual C prefix (e.g.
+<B>0x01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>),
+
+an eight-digit host-order hexadecimal number with a
+<B>0h</B>
+
+prefix (e.g.
+<B>0h01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>
+
+on a big-endian host and
+<B>4.3.2.1</B>
+
+on a little-endian host),
+a DNS name to be looked up via
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3),
+
+or an old-style network name to be looked up via
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3).
+
+<P>
+
+A dotted-decimal address may be incomplete, in which case
+ASCII-to-binary conversion implicitly appends
+as many instances of
+<B>.0</B>
+
+as necessary to bring it up to four components.
+The components of a dotted-decimal address are always taken as
+decimal, and leading zeros are ignored.
+For example,
+<B>10</B>
+
+is synonymous with
+<B>10.0.0.0</B>,
+
+and
+<B>128.009.000.032</B>
+
+is synonymous with
+<B>128.9.0.32</B>
+
+(the latter example is verbatim from RFC 1166).
+The result of
+<I>addrtoa</I>
+
+is always complete and does not contain leading zeros.
+<P>
+
+The letters in
+a hexadecimal address may be uppercase or lowercase or any mixture thereof.
+Use of hexadecimal addresses is
+<B>strongly</B>
+
+<B>discouraged</B>;
+
+they are included only to save hassles when dealing with
+the handful of perverted programs which already print
+network addresses in hexadecimal.
+<P>
+
+DNS names may be complete (optionally terminated with a ``.'')
+or incomplete, and are looked up as specified by local system configuration
+(see
+<I><A HREF="resolver.5.html">resolver</A></I>(5)).
+
+The
+<I>h_addr</I>
+
+value returned by
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3)
+
+is used,
+so with current DNS implementations,
+the result when the name corresponds to more than one address is
+difficult to predict.
+Name lookup resorts to
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3)
+
+only if
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3)
+
+fails.
+<P>
+
+A subnet specification is of the form <I>network</I><B>/</B><I>mask</I>.
+The
+<I>network</I>
+
+and
+<I>mask</I>
+
+can be any form acceptable to
+<I>atoaddr</I>.
+
+In addition, the
+<I>mask</I>
+
+can be a decimal integer (leading zeros ignored) giving a bit count,
+in which case
+it stands for a mask with that number of high bits on and all others off
+(e.g.,
+<B>24</B>
+
+means
+<B>255.255.255.0</B>).
+
+In any case, the mask must be contiguous
+(a sequence of high bits on and all remaining low bits off).
+As a special case, the subnet specification
+<B>%default</B>
+
+is a synonym for
+<B>0.0.0.0/0</B>.
+
+<P>
+
+<I>Atosubnet</I>
+
+ANDs the mask with the address before returning,
+so that any non-network bits in the address are turned off
+(e.g.,
+<B>10.1.2.3/24</B>
+
+is synonymous with
+<B>10.1.2.0/24</B>).
+
+<I>Subnettoa</I>
+
+generates the decimal-integer-bit-count
+form of the mask,
+with no leading zeros,
+unless the mask is non-contiguous.
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>atoaddr</I>
+
+and
+<I>atosubnet</I>
+
+specifies the length of the ASCII string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>addrtoa</I>
+
+and
+<I>subnettoa</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines constants,
+<B>ADDRTOA_BUF</B>
+
+and
+<B>SUBNETTOA_BUF</B>,
+
+which are the sizes of buffers just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>addrtoa</I>
+
+and
+<I>subnettoa</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the ASCII character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default,
+and is in fact the only format currently available.
+This parameter is a hedge against future needs.
+<P>
+
+The ASCII-to-binary functions return NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+The binary-to-ASCII functions return
+<B>0</B>
+
+for a failure, and otherwise
+always return the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>atoaddr</I>
+
+are:
+empty input;
+attempt to allocate temporary storage for a very long name failed;
+name lookup failed;
+syntax error in dotted-decimal form;
+dotted-decimal component too large to fit in 8 bits.
+<P>
+
+Fatal errors in
+<I>atosubnet</I>
+
+are:
+no
+<B>/</B>
+
+in
+<I>src</I>;
+
+<I>atoaddr</I>
+
+error in conversion of
+<I>network</I>
+
+or
+<I>mask</I>;
+
+bit-count mask too big;
+mask non-contiguous.
+<P>
+
+Fatal errors in
+<I>addrtoa</I>
+
+and
+<I>subnettoa</I>
+
+are:
+unknown format.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The interpretation of incomplete dotted-decimal addresses
+(e.g.
+<B>10/24</B>
+
+means
+<B>10.0.0.0/24</B>)
+
+differs from that of some older conversion
+functions, e.g. those of
+<I><A HREF="inet.3.html">inet</A></I>(3).
+
+The behavior of the older functions has never been
+particularly consistent or particularly useful.
+<P>
+
+Ignoring leading zeros in dotted-decimal components and bit counts
+is arguably the most useful behavior in this application,
+but it might occasionally cause confusion with the historical use of leading
+zeros to denote octal numbers.
+<P>
+
+It is barely possible that somebody, somewhere,
+might have a legitimate use for non-contiguous subnet masks.
+<P>
+
+<I><A HREF="Getnetbyname.3.html">Getnetbyname</A></I>(3)
+
+is a historical dreg.
+<P>
+
+The restriction of ASCII-to-binary error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The ASCII-to-binary error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = atoaddr( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_atoul.3.html b/doc/manpage.d/ipsec_atoul.3.html
new file mode 100644
index 000000000..923a16131
--- /dev/null
+++ b/doc/manpage.d/ipsec_atoul.3.html
@@ -0,0 +1,266 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ATOUL</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ATOUL</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec atoul, ultoa - convert unsigned-long numbers to and from ASCII
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *atoul(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int base, unsigned long *n);</B>
+
+<BR>
+
+<B>size_t ultoa(unsigned long n, int base, char *dst,</B>
+
+<BR>
+&nbsp;
+<B>size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete; see
+<I><A HREF="ipsec_ttoul.3.html">ipsec_ttoul</A></I>(3)
+
+for their replacements.
+<P>
+
+<I>Atoul</I>
+
+converts an ASCII number into a binary
+<B>unsigned long</B>
+
+value.
+<I>Ultoa</I>
+
+does the reverse conversion, back to an ASCII version.
+<P>
+
+Numbers are specified in ASCII as
+decimal (e.g.
+<B>123</B>),
+
+octal with a leading zero (e.g.
+<B>012</B>,
+
+which has value 10),
+or hexadecimal with a leading
+<B>0x</B>
+
+(e.g.
+<B>0x1f</B>,
+
+which has value 31)
+in either upper or lower case.
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>atoul</I>
+
+specifies the length of the ASCII string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>base</I>
+
+parameter of
+<I>atoul</I>
+
+can be
+<B>8</B>,
+
+<B>10</B>,
+
+or
+<B>16</B>,
+
+in which case the number supplied is assumed to be of that form
+(and in the case of
+<B>16</B>,
+
+to lack any
+<B>0x</B>
+
+prefix).
+It can also be
+<B>0</B>,
+
+in which case the number is examined for a leading zero
+or a leading
+<B>0x</B>
+
+to determine its base,
+or
+<B>13</B>
+
+(halfway between 10 and 16),
+which has the same effect as
+<B>0</B>
+
+except that a non-hexadecimal
+number is considered decimal regardless of any leading zero.
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>ultoa</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+<P>
+
+The
+<I>base</I>
+
+parameter of
+<I>ultoa</I>
+
+must be
+<B>8</B>,
+
+<B>10</B>,
+
+or
+<B>16</B>.
+
+<P>
+
+<I>Atoul</I>
+
+returns NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<I>Ultoa</I>
+
+returns the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="atol.3.html">atol</A>(3), <A HREF="strtoul.3.html">strtoul</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>atoul</I>
+
+are:
+empty input;
+unknown
+<I>base</I>;
+
+non-digit character found;
+number too large for an
+<B>unsigned long</B>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+There is no provision for reporting an invalid
+<I>base</I>
+
+parameter given to
+<I>ultoa</I>.
+
+<P>
+
+The restriction of error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The error-reporting convention lends itself to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = atoul( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_auto.8.html b/doc/manpage.d/ipsec_auto.8.html
new file mode 100644
index 000000000..68ca61bdc
--- /dev/null
+++ b/doc/manpage.d/ipsec_auto.8.html
@@ -0,0 +1,416 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_AUTO</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_AUTO</H1>
+Section: Maintenance Commands (8)<BR>Updated: 31 Jan 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec auto - control automatically-keyed IPsec connections
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>auto</B>
+
+[
+<B>--show</B>
+
+] [
+<B>--showonly</B>
+
+] [
+<B>--asynchronous</B>
+
+]
+<BR>
+
+&nbsp;&nbsp;&nbsp;[
+<B>--config</B>
+
+configfile
+] [
+<B>--verbose</B>
+
+]
+<BR>
+
+&nbsp;&nbsp;&nbsp;operation
+connection
+<P>
+<B>ipsec</B>
+
+<B>auto</B>
+
+[
+<B>--show</B>
+
+] [
+<B>--showonly</B>
+
+] operation
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Auto</I>
+
+manipulates automatically-keyed FreeS/WAN IPsec connections,
+setting them up and shutting them down
+based on the information in the IPsec configuration file.
+In the normal usage,
+<I>connection</I>
+
+is the name of a connection specification in the configuration file;
+<I>operation</I>
+
+is
+<B>--add</B>,
+
+<B>--delete</B>,
+
+<B>--replace</B>,
+
+<B>--up</B>,
+
+<B>--down</B>,
+
+<B>--route</B>,
+
+or
+<B>--unroute</B>.
+
+The
+<B>--ready</B>,
+
+<B>--rereadsecrets</B>,
+
+<B>--rereadgroups</B>,
+
+and
+<B>--status</B>
+
+<I>operations</I>
+
+do not take a connection name.
+<I>Auto</I>
+
+generates suitable
+commands and feeds them to a shell for execution.
+<P>
+
+The
+<B>--add</B>
+
+operation adds a connection specification to the internal database
+within
+<I>pluto</I>;
+
+it will fail if
+<I>pluto</I>
+
+already has a specification by that name.
+The
+<B>--delete</B>
+
+operation deletes a connection specification from
+<I>pluto</I>'s
+
+internal database (also tearing down any connections based on it);
+it will fail if the specification does not exist.
+The
+<B>--replace</B>
+
+operation is equivalent to
+<B>--delete</B>
+
+(if there is already a specification by the given name)
+followed by
+<B>--add</B>,
+
+and is a convenience for updating
+<I>pluto</I>'s
+
+internal specification to match an external one.
+(Note that a
+<B>--rereadsecrets</B>
+
+may also be needed.)
+The
+<B>--rereadgroups</B>
+
+operation causes any changes to the policy group files to take effect
+(this is currently a synonym for
+<B>--ready</B>,
+
+but that may change).
+None of the other operations alters the internal database.
+<P>
+
+The
+<B>--up</B>
+
+operation asks
+<I>pluto</I>
+
+to establish a connection based on an entry in its internal database.
+The
+<B>--down</B>
+
+operation tells
+<I>pluto</I>
+
+to tear down such a connection.
+<P>
+
+Normally,
+<I>pluto</I>
+
+establishes a route to the destination specified for a connection as
+part of the
+<B>--up</B>
+
+operation.
+However, the route and only the route can be established with the
+<B>--route</B>
+
+operation.
+Until and unless an actual connection is established,
+this discards any packets sent there,
+which may be preferable to having them sent elsewhere based on a more
+general route (e.g., a default route).
+<P>
+
+Normally,
+<I>pluto</I>'s
+
+route to a destination remains in place when a
+<B>--down</B>
+
+operation is used to take the connection down
+(or if connection setup, or later automatic rekeying, fails).
+This permits establishing a new connection (perhaps using a
+different specification; the route is altered as necessary)
+without having a ``window'' in which packets might go elsewhere
+based on a more general route.
+Such a route can be removed using the
+<B>--unroute</B>
+
+operation
+(and is implicitly removed by
+<B>--delete</B>).
+
+<P>
+
+The
+<B>--ready</B>
+
+operation tells
+<I>pluto</I>
+
+to listen for connection-setup requests from other hosts.
+Doing an
+<B>--up</B>
+
+operation before doing
+<B>--ready</B>
+
+on both ends is futile and will not work,
+although this is now automated as part of IPsec startup and
+should not normally be an issue.
+<P>
+
+The
+<B>--status</B>
+
+operation asks
+<I>pluto</I>
+
+for current connection status.
+The output format is ad-hoc and likely to change.
+<P>
+
+The
+<B>--rereadsecrets</B>
+
+operation tells
+<I>pluto</I>
+
+to re-read the
+<I>/etc/ipsec.secrets</I>
+
+secret-keys file,
+which it normally reads only at startup time.
+(This is currently a synonym for
+<B>--ready</B>,
+
+but that may change.)
+<P>
+
+The
+<B>--show</B>
+
+option turns on the
+<B>-x</B>
+
+option of the shell used to execute the commands,
+so each command is shown as it is executed.
+<P>
+
+The
+<B>--showonly</B>
+
+option causes
+<I>auto</I>
+
+to show the commands it would run, on standard output,
+and not run them.
+<P>
+
+The
+<B>--asynchronous</B>
+
+option, applicable only to the
+<B>up</B>
+
+operation,
+tells
+<I>pluto</I>
+
+to attempt to establish the connection,
+but does not delay to report results.
+This is especially useful to start multiple connections in parallel
+when network links are slow.
+<P>
+
+The
+<B>--verbose</B>
+
+option instructs
+<I>auto</I>
+
+to pass through all output from
+<I><A HREF="ipsec_whack.8.html">ipsec_whack</A></I>(8),
+
+including log output that is normally filtered out as uninteresting.
+<P>
+
+The
+<B>--config</B>
+
+option specifies a non-standard location for the IPsec
+configuration file (default
+<I>/etc/ipsec.conf</I>).
+
+<P>
+
+See
+<I><A HREF="ipsec.conf.5.html">ipsec.conf</A></I>(5)
+
+for details of the configuration file.
+Apart from the basic parameters which specify the endpoints and routing
+of a connection (<B>left</B>
+and
+<B>right</B>,
+
+plus possibly
+<B>leftsubnet</B>,
+
+<B>leftnexthop</B>,
+
+<B>leftfirewall</B>,
+
+their
+<B>right</B>
+
+equivalents,
+and perhaps
+<B>type</B>),
+
+an
+<I>auto</I>
+
+connection almost certainly needs a
+<B>keyingtries</B>
+
+parameter (since the
+<B>keyingtries</B>
+
+default is poorly chosen).
+<A NAME="lbAE">&nbsp;</A>
+<H2>FILES</H2>
+
+
+
+/etc/ipsec.conf<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>default IPSEC configuration file<BR>
+<BR>
+
+/var/run/ipsec.info<TT>&nbsp;&nbsp;&nbsp;</TT><B>%defaultroute</B> information<BR>
+<A NAME="lbAF">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.conf.5.html">ipsec.conf</A>(5), <A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_pluto.8.html">ipsec_pluto</A>(8), <A HREF="ipsec_whack.8.html">ipsec_whack</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8)
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+Although an
+<B>--up</B>
+
+operation does connection setup on both ends,
+<B>--down</B>
+
+tears only one end of the connection down
+(although the orphaned end will eventually time out).
+<P>
+
+There is no support for
+<B>passthrough</B>
+
+connections.
+<P>
+
+A connection description which uses
+<B>%defaultroute</B>
+
+for one of its
+<B>nexthop</B>
+
+parameters but not the other may be falsely
+rejected as erroneous in some circumstances.
+<P>
+
+The exit status of
+<B>--showonly</B>
+
+does not always reflect errors discovered during processing of the request.
+(This is fine for human inspection, but not so good for use in scripts.)
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">FILES</A><DD>
+<DT><A HREF="#lbAF">SEE ALSO</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_barf.8.html b/doc/manpage.d/ipsec_barf.8.html
new file mode 100644
index 000000000..e7b7200e0
--- /dev/null
+++ b/doc/manpage.d/ipsec_barf.8.html
@@ -0,0 +1,150 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_BARF</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_BARF</H1>
+Section: Maintenance Commands (8)<BR>Updated: 17 March 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec barf - spew out collected IPsec debugging information
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>barf</B>
+
+[
+<B>--short</B>
+
+]
+<P>
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Barf</I>
+
+outputs (on standard output) a collection of debugging information
+(contents of files, selections from logs, etc.)
+related to the IPsec encryption/authentication system.
+It is primarily a convenience for remote debugging,
+a single command which packages up (and labels) all information
+that might be relevant to diagnosing a problem in IPsec.
+<P>
+
+<P>
+
+The
+<B>--short</B>
+
+option limits the length of
+the log portion of
+<I>barf</I>'s
+
+output, which can otherwise be extremely voluminous
+if debug logging is turned on.
+<P>
+
+<I>Barf</I>
+
+censors its output,
+replacing keys
+and secrets with brief checksums to avoid revealing sensitive information.
+<P>
+
+Beware that the output of both commands is aimed at humans,
+not programs,
+and the output format is subject to change without warning.
+<P>
+
+<I>Barf</I>
+
+has to figure out which files in
+<I>/var/log</I>
+
+contain the IPsec log messages.
+It looks for KLIPS and general log messages first in
+<I>messages</I>
+
+and
+<I>syslog</I>,
+
+and for Pluto messages first in
+<I>secure</I>,
+
+<I>auth.log</I>,
+
+and
+<I>debug</I>.
+
+In both cases,
+if it does not find what it is looking for in one of those ``likely'' places,
+it will resort to a brute-force search of most (non-compressed) files in
+<I>/var/log</I>.
+
+<A NAME="lbAE">&nbsp;</A>
+<H2>FILES</H2>
+
+<PRE>
+/proc/net/*
+/var/log/*
+/etc/ipsec.conf
+/etc/ipsec.secrets
+</PRE>
+
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by Henry Spencer.
+<A NAME="lbAG">&nbsp;</A>
+<H2>BUGS</H2>
+
+<I>Barf</I>
+
+uses heuristics to try to pick relevant material out of the logs,
+and relevant messages
+which are not labelled with any of the tags that
+<I>barf</I>
+
+looks for will be lost.
+We think we've eliminated the last such case, but one never knows...
+<P>
+
+Finding
+<I>updown</I>
+
+scripts (so they can be included in output) is, in general, difficult.
+<I>Barf</I>
+
+uses a very simple heuristic that is easily fooled.
+<P>
+
+The brute-force search for the right log files can get expensive on
+systems with a lot of clutter in
+<I>/var/log</I>.
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">FILES</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+<DT><A HREF="#lbAG">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_bitstomask.3.html b/doc/manpage.d/ipsec_bitstomask.3.html
new file mode 100644
index 000000000..a67a08d83
--- /dev/null
+++ b/doc/manpage.d/ipsec_bitstomask.3.html
@@ -0,0 +1,122 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_GOODMASK</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_GOODMASK</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec goodmask - is this Internet subnet mask a valid one?
+<BR>
+
+ipsec masktobits - convert Internet subnet mask to bit count
+<BR>
+
+ipsec bitstomask - convert bit count to Internet subnet mask
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int goodmask(struct in_addr mask);</B>
+
+<BR>
+
+<B>int masktobits(struct in_addr mask);</B>
+
+<BR>
+
+<B>struct in_addr bitstomask(int n);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete;
+see
+<I><A HREF="ipsec_masktocount.3.html">ipsec_masktocount</A></I>(3)
+
+for a partial replacement.
+<P>
+
+<I>Goodmask</I>
+
+reports whether the subnet
+<I>mask</I>
+
+is a valid one,
+i.e. consists of a (possibly empty) sequence of
+<B>1</B>s
+
+followed by a (possibly empty) sequence of
+<B>0</B>s.
+
+<I>Masktobits</I>
+
+takes a (valid) subnet mask and returns the number of
+<B>1</B>
+
+bits in it.
+<I>Bitstomask</I>
+
+reverses this,
+returning the subnet mask corresponding to bit count
+<I>n</I>.
+
+<P>
+
+All masks are in network byte order.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+<I>Masktobits</I>
+
+returns
+<B>-1</B>
+
+for an invalid mask.
+<I>Bitstomask</I>
+
+returns an all-zeros mask for a negative or out-of-range
+<I>n</I>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The error-reporting convention of
+<I>bitstomask</I>
+
+is less than ideal;
+zero is sometimes a legitimate mask.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_broadcastof.3.html b/doc/manpage.d/ipsec_broadcastof.3.html
new file mode 100644
index 000000000..57d4a5648
--- /dev/null
+++ b/doc/manpage.d/ipsec_broadcastof.3.html
@@ -0,0 +1,107 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_SUBNETOF</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_SUBNETOF</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec subnetof - given Internet address and subnet mask, return subnet number
+<BR>
+
+ipsec hostof - given Internet address and subnet mask, return host part
+<BR>
+
+ipsec broadcastof - given Internet address and subnet mask, return broadcast address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>struct in_addr subnetof(struct in_addr addr,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr mask);</B>
+
+<BR>
+
+<B>struct in_addr hostof(struct in_addr addr,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr mask);</B>
+
+<BR>
+
+<B>struct in_addr broadcastof(struct in_addr addr,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr mask);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete; see
+<I><A HREF="ipsec_networkof.3.html">ipsec_networkof</A></I>(3)
+
+for their replacements.
+<P>
+
+<I>Subnetof</I>
+
+takes an Internet
+<I>address</I>
+
+and a subnet
+<I>mask</I>
+
+and returns the network part of the address
+(all in network byte order).
+<I>Hostof</I>
+
+similarly returns the host part, and
+<I>broadcastof</I>
+
+returns the broadcast address (all-1s convention) for the network.
+<P>
+
+These functions are provided to hide the Internet bit-munging inside
+an API, in hopes of easing the eventual transition to IPv6.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAG">&nbsp;</A>
+<H2>BUGS</H2>
+
+Calling functions for this is more costly than doing it yourself.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+<DT><A HREF="#lbAG">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_calcgoo.8.html b/doc/manpage.d/ipsec_calcgoo.8.html
new file mode 100644
index 000000000..8379ac6a4
--- /dev/null
+++ b/doc/manpage.d/ipsec_calcgoo.8.html
@@ -0,0 +1,78 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_CALCGOO</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_CALCGOO</H1>
+Section: Maintenance Commands (8)<BR>Updated: 8 June 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec calcgoo - calculate hex value for matching modules and kernels
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>calcgoo</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>calcgoo</I>
+
+accepts the output of
+<B>nm -ao</B>
+
+or
+<B>/proc/ksyms</B>
+
+and extracts a release dependant list of symbols from it. The symbols
+are processed to extract the values assigned during the MODVERSIONS
+process. This process makes sure that Linux modules are only loaded
+on matching kernels.
+
+This routine is used to find an appropriate module to match the currently
+running kernel by _startklips.
+<A NAME="lbAE">&nbsp;</A>
+<H2>FILES</H2>
+
+<PRE>
+/proc/ksyms
+</PRE>
+
+<A NAME="lbAF">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec__startklips.8.html">ipsec__startklips</A>(8), <A HREF="genksyms.8.html">genksyms</A>(8)
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by Michael Richardson.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">FILES</A><DD>
+<DT><A HREF="#lbAF">SEE ALSO</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_copyright_notice.3.html b/doc/manpage.d/ipsec_copyright_notice.3.html
new file mode 100644
index 000000000..c832e01f7
--- /dev/null
+++ b/doc/manpage.d/ipsec_copyright_notice.3.html
@@ -0,0 +1,94 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_VERSION</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_VERSION</H1>
+Section: C Library Functions (3)<BR>Updated: 21 Nov 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ipsec_version_code - get IPsec version code
+<BR>
+
+ipsec ipsec_version_string - get full IPsec version string
+<BR>
+
+ipsec ipsec_copyright_notice - get IPsec copyright notice
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *ipsec_version_code(void);</B>
+
+<BR>
+
+<B>const char *ipsec_version_string(void);</B>
+
+<BR>
+
+<B>const char **ipsec_copyright_notice(void);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions provide information on version numbering and copyright
+of the Linux FreeS/WAN IPsec implementation.
+<P>
+
+<I>Ipsec_version_code</I>
+
+returns a pointer to a string constant
+containing the current IPsec version code,
+such as ``1.92'' or ``snap2001Nov19b''.
+<P>
+
+<I>Ipsec_version_string</I>
+
+returns a pointer to a string constant giving a full version identification,
+consisting of the version code preceded by a prefix identifying the software,
+e.g. ``Linux FreeS/WAN 1.92''.
+<P>
+
+<I>Ipsec_copyright_notice</I>
+
+returns a pointer to a vector of pointers,
+terminated by a
+<B>NULL</B>,
+
+which is the text of a suitable copyright notice.
+Each pointer points to a string constant (possibly empty) which is one line
+of the somewhat-verbose copyright notice.
+The strings are NUL-terminated and do not contain a newline;
+supplying suitable line termination for the output device is
+the caller's responsibility.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_datatot.3.html b/doc/manpage.d/ipsec_datatot.3.html
new file mode 100644
index 000000000..628558001
--- /dev/null
+++ b/doc/manpage.d/ipsec_datatot.3.html
@@ -0,0 +1,439 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TTODATA</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TTODATA</H1>
+Section: C Library Functions (3)<BR>Updated: 16 August 2003<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ttodata, datatot - convert binary data bytes from and to text formats
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *ttodata(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int base, char *dst, size_t dstlen, size_t *lenp);</B>
+
+<BR>
+
+<B>const char *ttodatav(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int base, char *dst, size_t dstlen, size_t *lenp,</B>
+
+<BR>
+&nbsp;
+<B>char *errp, size_t errlen, int flags);</B>
+
+<BR>
+
+<B>size_t datatot(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int format, char *dst, size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Ttodata</I>,
+
+<I>ttodatav</I>,
+
+and
+<I>datatot</I>
+
+convert arbitrary binary data (e.g. encryption or authentication keys)
+from and to more-or-less human-readable text formats.
+<P>
+
+Currently supported formats are hexadecimal, base64, and characters.
+<P>
+
+A hexadecimal text value begins with a
+<B>0x</B>
+
+(or
+<B>0X</B>)
+
+prefix and continues with two-digit groups
+of hexadecimal digits (0-9, and a-f or A-F),
+each group encoding the value of one binary byte, high-order digit first.
+A single
+<B>_</B>
+
+(underscore)
+between consecutive groups is ignored, permitting punctuation to improve
+readability; doing this every eight digits seems about right.
+<P>
+
+A base64 text value begins with a
+<B>0s</B>
+
+(or
+<B>0S</B>)
+
+prefix
+and continues with four-digit groups of base64 digits (A-Z, a-z, 0-9, +, and /),
+each group encoding the value of three binary bytes as described in
+section 6.8 of RFC 2045.
+If
+<B>flags</B>
+
+has the
+<B>TTODATAV_IGNORESPACE</B>
+
+bit on, blanks are ignore (after the prefix).
+Note that the last one or two digits of a base64 group can be
+<B>=</B>
+
+to indicate that fewer than three binary bytes are encoded.
+<P>
+
+A character text value begins with a
+<B>0t</B>
+
+(or
+<B>0T</B>)
+
+prefix
+and continues with text characters, each being the value of one binary byte.
+<P>
+
+All these functions basically copy data from
+<I>src</I>
+
+(whose size is specified by
+<I>srclen</I>)
+
+to
+<I>dst</I>
+
+(whose size is specified by
+<I>dstlen</I>),
+
+doing the conversion en route.
+If the result will not fit in
+<I>dst</I>,
+
+it is truncated;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes of result written to
+<I>dst</I>.
+
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result bytes are written at all.
+<P>
+
+The
+<I>base</I>
+
+parameter of
+<I>ttodata</I>
+
+and
+<I>ttodatav</I>
+
+specifies what format the input is in;
+normally it should be
+<B>0</B>
+
+to signify that this gets figured out from the prefix.
+Values of
+<B>16</B>,
+
+<B>64</B>,
+
+and
+<B>256</B>
+
+respectively signify hexadecimal, base64, and character-text formats
+without prefixes.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>datatot</I>,
+
+a single character used as a type code,
+specifies which text format is wanted.
+The value
+<B>0</B>
+
+(not ASCII
+<B>'0'</B>,
+
+but a zero value) specifies a reasonable default.
+Other currently-supported values are:
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT><B>'x'</B>
+
+<DD>
+continuous lower-case hexadecimal with a
+<B>0x</B>
+
+prefix
+<DT><B>'h'</B>
+
+<DD>
+lower-case hexadecimal with a
+<B>0x</B>
+
+prefix and a
+<B>_</B>
+
+every eight digits
+<DT><B>':'</B>
+
+<DD>
+lower-case hexadecimal with no prefix and a
+<B>:</B>
+
+(colon) every two digits
+<DT><B>16</B>
+
+<DD>
+lower-case hexadecimal with no prefix or
+<B>_</B>
+
+<DT><B>'s'</B>
+
+<DD>
+continuous base64 with a
+<B>0s</B>
+
+prefix
+<DT><B>64</B>
+
+<DD>
+continuous base64 with no prefix
+</DL>
+</DL>
+
+<P>
+
+The default format is currently
+<B>'h'</B>.
+
+<P>
+
+<I>Ttodata</I>
+
+returns NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+On success,
+if and only if
+<I>lenp</I>
+
+is non-NULL,
+<B>*lenp</B>
+
+is set to the number of bytes required to contain the full untruncated result.
+It is the caller's responsibility to check this against
+<I>dstlen</I>
+
+to determine whether he has obtained a complete result.
+The
+<B>*lenp</B>
+
+value is correct even if
+<I>dstlen</I>
+
+is zero, which offers a way to determine how much space would be needed
+before having to allocate any.
+<P>
+
+<I>Ttodatav</I>
+
+is just like
+<I>ttodata</I>
+
+except that in certain cases,
+if
+<I>errp</I>
+
+is non-NULL,
+the buffer pointed to by
+<I>errp</I>
+
+(whose length is given by
+<I>errlen</I>)
+
+is used to hold a more detailed error message.
+The return value is NULL for success,
+and is either
+<I>errp</I>
+
+or a pointer to a string literal for failure.
+If the size of the error-message buffer is
+inadequate for the desired message,
+<I>ttodatav</I>
+
+will fall back on returning a pointer to a literal string instead.
+The
+<I>freeswan.h</I>
+
+header file defines a constant
+<B>TTODATAV_BUF</B>
+
+which is the size of a buffer large enough for worst-case results.
+<P>
+
+The normal return value of
+<I>datatot</I>
+
+is the number of bytes required
+to contain the full untruncated result.
+It is the caller's responsibility to check this against
+<I>dstlen</I>
+
+to determine whether he has obtained a complete result.
+The return value is correct even if
+<I>dstlen</I>
+
+is zero, which offers a way to determine how much space would be needed
+before having to allocate any.
+A return value of
+<B>0</B>
+
+signals a fatal error of some kind
+(see DIAGNOSTICS).
+<P>
+
+A zero value for
+<I>srclen</I>
+
+in
+<I>ttodata</I>
+
+(but not
+<I>datatot</I>!)
+
+is synonymous with
+<B>strlen(src)</B>.
+
+A non-zero
+<I>srclen</I>
+
+in
+<I>ttodata</I>
+
+must not include the terminating NUL.
+<P>
+
+Unless
+<I>dstlen</I>
+
+is zero,
+the result supplied by
+<I>datatot</I>
+
+is always NUL-terminated,
+and its needed-size return value includes space for the terminating NUL.
+<P>
+
+Several obsolete variants of these functions
+(<I>atodata</I>,
+
+<I>datatoa</I>,
+
+<I>atobytes</I>,
+
+and
+<I>bytestoa</I>)
+
+are temporarily also supported.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="sprintf.3.html">sprintf</A>(3), <A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>ttodata</I>
+
+and
+<I>ttodatav</I>
+
+are:
+unknown characters in the input;
+unknown or missing prefix;
+unknown base;
+incomplete digit group;
+non-zero padding in a base64 less-than-three-bytes digit group;
+zero-length input.
+<P>
+
+Fatal errors in
+<I>datatot</I>
+
+are:
+unknown format code;
+zero-length input.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+<I>Datatot</I>
+
+should have a format code to produce character-text output.
+<P>
+
+The
+<B>0s</B>
+
+and
+<B>0t</B>
+
+prefixes are the author's inventions and are not a standard
+of any kind.
+They have been chosen to avoid collisions with existing practice
+(some C implementations use
+<B>0b</B>
+
+for binary)
+and possible confusion with unprefixed hexadecimal.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_eroute.5.html b/doc/manpage.d/ipsec_eroute.5.html
new file mode 100644
index 000000000..158b57015
--- /dev/null
+++ b/doc/manpage.d/ipsec_eroute.5.html
@@ -0,0 +1,370 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_EROUTE</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_EROUTE</H1>
+Section: File Formats (5)<BR>Updated: 20 Sep 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec_eroute - list of existing eroutes
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>eroute</B>
+
+<P>
+
+<B>cat</B>
+
+<B>/proc/net/ipsec_eroute</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>/proc/net/ipsec_eroute</I>
+
+lists the IPSEC extended routing tables,
+which control what (if any) processing is applied
+to non-encrypted packets arriving for IPSEC processing and forwarding.
+At this point it is a read-only file.
+<P>
+
+A table entry consists of:
+<DL COMPACT>
+<DT>+<DD>
+packet count,
+<DT>+<DD>
+source address with mask,
+<DT>+<DD>
+a '-&gt;' separator for visual and automated parsing between src and dst
+<DT>+<DD>
+destination address with mask
+<DT>+<DD>
+a '=&gt;' separator for visual and automated parsing between selection
+criteria and SAID to use
+<DT>+<DD>
+SAID (Security Association IDentifier), comprised of:
+<DT>+<DD>
+protocol
+(<I>proto</I>),
+<DT>+<DD>
+address family
+(<I>af</I>),
+where '.' stands for IPv4 and ':' for IPv6
+<DT>+<DD>
+Security Parameters Index
+(<I>SPI</I>),
+<DT>+<DD>
+effective destination
+(<I>edst</I>),
+where the packet should be forwarded after processing
+(normally the other security gateway)
+together indicate which Security Association should be used to process
+the packet,
+<DT>+<DD>
+source identity text string with no whitespace, in parens,
+<DT>+<DD>
+destination identity text string with no whitespace, in parens
+</DL>
+<P>
+
+Addresses are written as IPv4 dotted quads or IPv6 coloned hex,
+protocol is one of &quot;ah&quot;, &quot;esp&quot;, &quot;comp&quot; or &quot;tun&quot;
+and
+SPIs are prefixed hexadecimal numbers where the prefix '.' is for IPv4 and the prefix ':' is for IPv6
+<P>
+
+SAIDs are written as &quot;<A HREF="mailto:protoafSPI@edst">protoafSPI@edst</A>&quot;. There are also 5
+&quot;magic&quot; SAIDs which have special meaning:
+<DL COMPACT>
+<DT>+<DD>
+<B>%drop</B>
+
+means that matches are to be dropped
+<DT>+<DD>
+<B>%reject</B>
+
+means that matches are to be dropped and an ICMP returned, if
+possible to inform
+<DT>+<DD>
+<B>%trap</B>
+
+means that matches are to trigger an ACQUIRE message to the Key
+Management daemon(s) and a hold eroute will be put in place to
+prevent subsequent packets also triggering ACQUIRE messages.
+<DT>+<DD>
+<B>%hold</B>
+
+means that matches are to stored until the eroute is replaced or
+until that eroute gets reaped
+<DT>+<DD>
+<B>%pass</B>
+
+means that matches are to allowed to pass without IPSEC processing
+<BR>
+
+
+</DL>
+<A NAME="lbAE">&nbsp;</A>
+<H2>EXAMPLES</H2>
+
+<P>
+
+<B>1867 172.31.252.0/24 -&gt; 0.0.0.0/0 =&gt; <A HREF="mailto:tun.130@192.168.43.1">tun.130@192.168.43.1</A> </B>
+
+<BR>
+
+<B> ()<TT>&nbsp;&nbsp;&nbsp;&nbsp;</TT>()</B>
+
+<P>
+
+means that 1,867 packets have been sent to an<BR>
+<B>eroute</B>
+
+that has been set up to protect traffic between the subnet
+<B>172.31.252.0</B>
+
+with a subnet mask of
+<B>24</B>
+
+bits and the default address/mask represented by an address of
+<B>0.0.0.0</B>
+
+with a subnet mask of
+<B>0</B>
+
+bits using the local machine as a security gateway on this end of the
+tunnel and the machine
+<B>192.168.43.1</B>
+
+on the other end of the tunnel with a Security Association IDentifier of
+<B><A HREF="mailto:tun0x130@192.168.43.1">tun0x130@192.168.43.1</A></B>
+
+which means that it is a tunnel mode connection (4, IPPROTO_IPIP) with a
+Security Parameters Index of
+<B>130</B>
+
+in hexadecimal with no identies defined for either end.
+<P>
+
+<B>125 3049:1::/64 -&gt; 0:0/0 =&gt; tun:<A HREF="mailto:130@3058">130@3058</A>:4::5<TT>&nbsp;</TT>()<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>()</B>
+
+<P>
+
+means that 125 packets have been sent to an<BR>
+<B>eroute</B>
+
+that has been set up to protect traffic between the subnet
+<B>3049:1::</B>
+
+with a subnet mask of
+<B>64</B>
+
+bits and the default address/mask represented by an address of
+<B>0:0</B>
+
+with a subnet mask of
+<B>0</B>
+
+bits using the local machine as a security gateway on this end of the
+tunnel and the machine
+<B>3058:4::5</B>
+
+on the other end of the tunnel with a Security Association IDentifier of
+<B>tun:<A HREF="mailto:130@3058">130@3058</A>:4::5</B>
+
+which means that it is a tunnel mode connection with a
+Security Parameters Index of
+<B>130</B>
+
+in hexadecimal with no identies defined for either end.
+<P>
+
+<B>42 192.168.6.0/24 -&gt; 192.168.7.0/24 =&gt; %passthrough</B>
+
+<P>
+
+means that 42 packets have been sent to an
+<B>eroute</B>
+
+that has been set up to pass the traffic from the subnet
+<B>192.168.6.0</B>
+
+with a subnet mask of
+<B>24</B>
+
+bits and to subnet
+<B>192.168.7.0</B>
+
+with a subnet mask of
+<B>24</B>
+
+bits without any IPSEC processing with no identies defined for either end.
+<P>
+
+<B>2112 192.168.8.55/32 -&gt; 192.168.9.47/24 =&gt; %hold<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>(east)<TT>&nbsp;&nbsp;</TT>()</B>
+
+<P>
+
+means that 2112 packets have been sent to an<BR>
+<B>eroute</B>
+
+that has been set up to hold the traffic from the host
+<B>192.168.8.55</B>
+
+and to host
+<B>192.168.9.47</B>
+
+until a key exchange from a Key Management daemon
+succeeds and puts in an SA or fails and puts in a pass
+or drop eroute depending on the default configuration with the local client
+defined as &quot;east&quot; and no identy defined for the remote end.
+<P>
+
+<B>2001 192.168.2.110/32 -&gt; 192.168.2.120/32 =&gt; </B>
+
+<BR>
+
+<B> <A HREF="mailto:esp.e6de@192.168.2.120">esp.e6de@192.168.2.120</A><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>()<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>()</B>
+
+<P>
+
+means that 2001 packets have been sent to an<BR>
+<B>eroute</B>
+
+that has been set up to protect traffic between the host
+<B>192.168.2.110</B>
+
+and the host
+<B>192.168.2.120</B>
+
+using
+<B>192.168.2.110</B>
+
+as a security gateway on this end of the
+connection and the machine
+<B>192.168.2.120</B>
+
+on the other end of the connection with a Security Association IDentifier of
+<B><A HREF="mailto:esp.e6de@192.168.2.120">esp.e6de@192.168.2.120</A></B>
+
+which means that it is a transport mode connection with a Security
+Parameters Index of
+<B>e6de</B>
+
+in hexadecimal using Encapsuation Security Payload protocol (50,
+IPPROTO_ESP) with no identies defined for either end.
+<P>
+
+<B>1984 3049:1::110/128 -&gt; 3049:1::120/128 =&gt; </B>
+
+<BR>
+
+<B> ah:<A HREF="mailto:f5ed@3049">f5ed@3049</A>:1::120<TT>&nbsp;&nbsp;&nbsp;</TT>()<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>()</B>
+
+<P>
+
+means that 1984 packets have been sent to an<BR>
+<B>eroute</B>
+
+that has been set up to authenticate traffic between the host
+<B>3049:1::110</B>
+
+and the host
+<B>3049:1::120</B>
+
+using
+<B>3049:1::110</B>
+
+as a security gateway on this end of the
+connection and the machine
+<B>3049:1::120</B>
+
+on the other end of the connection with a Security Association IDentifier of
+<B>ah:<A HREF="mailto:f5ed@3049">f5ed@3049</A>:1::120</B>
+
+which means that it is a transport mode connection with a Security
+Parameters Index of
+<B>f5ed</B>
+
+in hexadecimal using Authentication Header protocol (51,
+IPPROTO_AH) with no identies defined for either end.
+<A NAME="lbAF">&nbsp;</A>
+<H2>FILES</H2>
+
+/proc/net/ipsec_eroute, /usr/local/bin/ipsec
+<A NAME="lbAG">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8), <A HREF="ipsec_tncfg.5.html">ipsec_tncfg</A>(5), <A HREF="ipsec_spi.5.html">ipsec_spi</A>(5),
+<A HREF="ipsec_spigrp.5.html">ipsec_spigrp</A>(5), <A HREF="ipsec_klipsdebug.5.html">ipsec_klipsdebug</A>(5), <A HREF="ipsec_eroute.8.html">ipsec_eroute</A>(8), <A HREF="ipsec_version.5.html">ipsec_version</A>(5),
+<A HREF="ipsec_pf_key.5.html">ipsec_pf_key</A>(5)
+<A NAME="lbAH">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Richard Guy Briggs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">EXAMPLES</A><DD>
+<DT><A HREF="#lbAF">FILES</A><DD>
+<DT><A HREF="#lbAG">SEE ALSO</A><DD>
+<DT><A HREF="#lbAH">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_eroute.8.html b/doc/manpage.d/ipsec_eroute.8.html
new file mode 100644
index 000000000..7489462d7
--- /dev/null
+++ b/doc/manpage.d/ipsec_eroute.8.html
@@ -0,0 +1,421 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_EROUTE</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_EROUTE</H1>
+Section: Maintenance Commands (8)<BR>Updated: 21 Jun 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec eroute - manipulate IPSEC extended routing tables
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>eroute</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>eroute</B>
+
+<B>--add</B>
+
+<B>--eraf (inet | inet6)</B>
+
+<B>--src</B>
+
+src/srcmaskbits|srcmask
+<B>--dst</B>
+
+dst/dstmaskbits|dstmask
+&lt;SAID&gt;
+<P>
+
+<B>ipsec</B>
+
+<B>eroute</B>
+
+<B>--replace</B>
+
+<B>--eraf (inet | inet6)</B>
+
+<B>--src</B>
+
+src/srcmaskbits|srcmask
+<B>--dst</B>
+
+dst/dstmaskbits|dstmask
+&lt;SAID&gt;
+<P>
+
+<B>ipsec</B>
+
+<B>eroute</B>
+
+<B>--del</B>
+
+<B>--eraf (inet | inet6)</B>
+
+<B>--src</B>
+
+src/srcmaskbits|srcmask
+<B>--dst</B>
+
+dst/dstmaskbits|dstmask
+<P>
+
+<B>ipsec</B>
+
+<B>eroute</B>
+
+<B>--clear</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>eroute</B>
+
+<B>--help</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>eroute</B>
+
+<B>--version</B>
+
+<P>
+
+Where &lt;SAID&gt; is
+<B>--af</B>
+
+(inet | inet6)
+<B>--edst</B>
+
+edst
+<B>--spi</B>
+
+spi
+<B>--proto</B>
+
+proto
+OR
+<B>--said</B>
+
+said
+OR
+<B>--said</B>
+
+<B>(%passthrough | %passthrough4 | %passthrough6)</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Eroute</I>
+
+manages the IPSEC extended routing tables,
+which control what (if any) processing is applied
+to non-encrypted packets arriving for IPSEC processing and forwarding.
+The form with no additional arguments lists the contents of
+/proc/net/ipsec_eroute.
+The
+<B>--add</B>
+
+form adds a table entry, the
+<B>--replace</B>
+
+form replaces a table entry, while the
+<B>--del</B>
+
+form deletes one. The
+<B>--clear</B>
+
+form deletes the entire table.
+<P>
+
+A table entry consists of:
+<DL COMPACT>
+<DT>+<DD>
+source and destination addresses,
+with masks,
+for selection of packets
+<DT>+<DD>
+Security Association IDentifier, comprised of:
+<DT>+<DD>
+protocol
+(<I>proto</I>), indicating (together with the
+effective destination and the security parameters index)
+which Security Association should be used to process the packet
+<DT>+<DD>
+address family
+(<I>af</I>),
+<DT>+<DD>
+Security Parameters Index
+(<I>spi</I>), indicating (together with the
+effective destination and protocol)
+which Security Association should be used to process the packet
+(must be larger than or equal to 0x100)
+<DT>+<DD>
+effective destination
+(<I>edst</I>),
+where the packet should be forwarded after processing
+(normally the other security gateway)
+<DT>+<DD>
+OR
+<DT>+<DD>
+SAID
+(<I>said</I>), indicating
+which Security Association should be used to process the packet
+</DL>
+<P>
+
+Addresses are written as IPv4 dotted quads or IPv6 coloned hex,
+protocol is one of &quot;ah&quot;, &quot;esp&quot;, &quot;comp&quot; or &quot;tun&quot; and SPIs are
+prefixed hexadecimal numbers where '.' represents IPv4 and ':'
+stands for IPv6.
+<P>
+
+SAIDs are written as &quot;<A HREF="mailto:protoafSPI@address">protoafSPI@address</A>&quot;. There are also 5
+&quot;magic&quot; SAIDs which have special meaning:
+<DL COMPACT>
+<DT>+<DD>
+<B>%drop</B>
+
+means that matches are to be dropped
+<DT>+<DD>
+<B>%reject</B>
+
+means that matches are to be dropped and an ICMP returned, if
+possible to inform
+<DT>+<DD>
+<B>%trap</B>
+
+means that matches are to trigger an ACQUIRE message to the Key
+Management daemon(s) and a hold eroute will be put in place to
+prevent subsequent packets also triggering ACQUIRE messages.
+<DT>+<DD>
+<B>%hold</B>
+
+means that matches are to stored until the eroute is replaced or
+until that eroute gets reaped
+<DT>+<DD>
+<B>%pass</B>
+
+means that matches are to allowed to pass without IPSEC processing
+</DL>
+<P>
+
+The format of /proc/net/ipsec_eroute is listed in <A HREF="ipsec_eroute.5.html">ipsec_eroute</A>(5).
+<BR>
+
+
+<A NAME="lbAE">&nbsp;</A>
+<H2>EXAMPLES</H2>
+
+<P>
+
+<B>ipsec eroute --add --eraf inet --src 192.168.0.1/32 \</B>
+
+<BR>
+
+<B> --dst 192.168.2.0/24 --af inet --edst 192.168.0.2 \</B>
+
+<BR>
+
+<B> --spi 0x135 --proto tun</B>
+
+<P>
+
+sets up an
+<B>eroute</B>
+
+on a Security Gateway to protect traffic between the host
+<B>192.168.0.1</B>
+
+and the subnet
+<B>192.168.2.0</B>
+
+with
+<B>24</B>
+
+bits of subnet mask via Security Gateway
+<B>192.168.0.2</B>
+
+using the Security Association with address
+<B>192.168.0.2</B>,
+
+Security Parameters Index
+<B>0x135</B>
+
+and protocol
+<B>tun</B>
+
+(50, IPPROTO_ESP).
+<P>
+
+<B>ipsec eroute --add --eraf inet6 --src 3049:1::1/128 \</B>
+
+<BR>
+
+<B> --dst 3049:2::/64 --af inet6 --edst 3049:1::2 \</B>
+
+<BR>
+
+<B> --spi 0x145 --proto tun</B>
+
+<P>
+
+sets up an
+<B>eroute</B>
+
+on a Security Gateway to protect traffic between the host
+<B>3049:1::1</B>
+
+and the subnet
+<B>3049:2::</B>
+
+with
+<B>64</B>
+
+bits of subnet mask via Security Gateway
+<B>3049:1::2</B>
+
+using the Security Association with address
+<B>3049:1::2</B>,
+
+Security Parameters Index
+<B>0x145</B>
+
+and protocol
+<B>tun</B>
+
+(50, IPPROTO_ESP).
+<P>
+
+<B>ipsec eroute --replace --eraf inet --src company.com/24 \</B>
+
+<BR>
+
+<B> --dst <A HREF="ftp://ftp.ngo.org">ftp.ngo.org</A>/32 --said <A HREF="mailto:tun.135@gw.ngo.org">tun.135@gw.ngo.org</A></B>
+
+<P>
+
+replaces an
+<B>eroute</B>
+
+on a Security Gateway to protect traffic between the subnet
+<B>company.com</B>
+
+with
+<B>24</B>
+
+bits of subnet mask and the host
+<B><A HREF="ftp://ftp.ngo.org">ftp.ngo.org</A></B>
+
+via Security Gateway
+<B>gw.ngo.org</B>
+
+using the Security Association with Security Association ID
+<B><A HREF="mailto:tun0x135@gw.ngo.org">tun0x135@gw.ngo.org</A></B>
+
+<P>
+
+<B>ipsec eroute --del --eraf inet --src company.com/24 \</B>
+
+<BR>
+
+<B> --dst <A HREF="http://www.ietf.org">www.ietf.org</A>/32 --said %passthrough4</B>
+
+<P>
+
+deletes an
+<B>eroute</B>
+
+on a Security Gateway that allowed traffic between the subnet
+<B>company.com</B>
+
+with
+<B>24</B>
+
+bits of subnet mask and the host
+<B><A HREF="http://www.ietf.org">www.ietf.org</A></B>
+
+to pass in the clear, unprocessed.
+<A NAME="lbAF">&nbsp;</A>
+<H2>FILES</H2>
+
+/proc/net/ipsec_eroute, /usr/local/bin/ipsec
+<A NAME="lbAG">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8), <A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A>(8), <A HREF="ipsec_spi.8.html">ipsec_spi</A>(8),
+<A HREF="ipsec_spigrp.8.html">ipsec_spigrp</A>(8), <A HREF="ipsec_klipsdebug.8.html">ipsec_klipsdebug</A>(8), <A HREF="ipsec_eroute.5.html">ipsec_eroute</A>(5)
+<A NAME="lbAH">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Richard Guy Briggs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">EXAMPLES</A><DD>
+<DT><A HREF="#lbAF">FILES</A><DD>
+<DT><A HREF="#lbAG">SEE ALSO</A><DD>
+<DT><A HREF="#lbAH">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_goodmask.3.html b/doc/manpage.d/ipsec_goodmask.3.html
new file mode 100644
index 000000000..a67a08d83
--- /dev/null
+++ b/doc/manpage.d/ipsec_goodmask.3.html
@@ -0,0 +1,122 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_GOODMASK</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_GOODMASK</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec goodmask - is this Internet subnet mask a valid one?
+<BR>
+
+ipsec masktobits - convert Internet subnet mask to bit count
+<BR>
+
+ipsec bitstomask - convert bit count to Internet subnet mask
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int goodmask(struct in_addr mask);</B>
+
+<BR>
+
+<B>int masktobits(struct in_addr mask);</B>
+
+<BR>
+
+<B>struct in_addr bitstomask(int n);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete;
+see
+<I><A HREF="ipsec_masktocount.3.html">ipsec_masktocount</A></I>(3)
+
+for a partial replacement.
+<P>
+
+<I>Goodmask</I>
+
+reports whether the subnet
+<I>mask</I>
+
+is a valid one,
+i.e. consists of a (possibly empty) sequence of
+<B>1</B>s
+
+followed by a (possibly empty) sequence of
+<B>0</B>s.
+
+<I>Masktobits</I>
+
+takes a (valid) subnet mask and returns the number of
+<B>1</B>
+
+bits in it.
+<I>Bitstomask</I>
+
+reverses this,
+returning the subnet mask corresponding to bit count
+<I>n</I>.
+
+<P>
+
+All masks are in network byte order.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+<I>Masktobits</I>
+
+returns
+<B>-1</B>
+
+for an invalid mask.
+<I>Bitstomask</I>
+
+returns an all-zeros mask for a negative or out-of-range
+<I>n</I>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The error-reporting convention of
+<I>bitstomask</I>
+
+is less than ideal;
+zero is sometimes a legitimate mask.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_hostof.3.html b/doc/manpage.d/ipsec_hostof.3.html
new file mode 100644
index 000000000..57d4a5648
--- /dev/null
+++ b/doc/manpage.d/ipsec_hostof.3.html
@@ -0,0 +1,107 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_SUBNETOF</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_SUBNETOF</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec subnetof - given Internet address and subnet mask, return subnet number
+<BR>
+
+ipsec hostof - given Internet address and subnet mask, return host part
+<BR>
+
+ipsec broadcastof - given Internet address and subnet mask, return broadcast address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>struct in_addr subnetof(struct in_addr addr,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr mask);</B>
+
+<BR>
+
+<B>struct in_addr hostof(struct in_addr addr,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr mask);</B>
+
+<BR>
+
+<B>struct in_addr broadcastof(struct in_addr addr,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr mask);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete; see
+<I><A HREF="ipsec_networkof.3.html">ipsec_networkof</A></I>(3)
+
+for their replacements.
+<P>
+
+<I>Subnetof</I>
+
+takes an Internet
+<I>address</I>
+
+and a subnet
+<I>mask</I>
+
+and returns the network part of the address
+(all in network byte order).
+<I>Hostof</I>
+
+similarly returns the host part, and
+<I>broadcastof</I>
+
+returns the broadcast address (all-1s convention) for the network.
+<P>
+
+These functions are provided to hide the Internet bit-munging inside
+an API, in hopes of easing the eventual transition to IPv6.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAG">&nbsp;</A>
+<H2>BUGS</H2>
+
+Calling functions for this is more costly than doing it yourself.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+<DT><A HREF="#lbAG">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_ikeping.8.html b/doc/manpage.d/ipsec_ikeping.8.html
new file mode 100644
index 000000000..03ed961f3
--- /dev/null
+++ b/doc/manpage.d/ipsec_ikeping.8.html
@@ -0,0 +1,137 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_IKEPING</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_IKEPING</H1>
+Section: Maintenance Commands (8)<BR>Updated: 23 Feb 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ikeping - send/receive ISAKMP/IKE echo requests/replies
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>ikeping</B>
+
+[
+<B>--listen</B>
+
+] [
+<B>--verbose</B>
+
+] [
+<B>--wait </B>
+
+time ] [
+<B>--exchangenum </B>
+
+num ] [
+<B>--ikeport </B>
+
+localport ] [
+<B>--ikeaddress </B>
+
+address ] [
+<B>--inet</B>
+
+] [
+<B>--inet6</B>
+
+] destaddr[/dstport] ...
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Ikeping</I>
+
+sends and receives ISAKMP/IKE echo request and echo reply packets. These
+packets are intended for diagnostics purposes, in a manner similar to
+<I><A HREF="ping.8.html">ping</A></I>(8)
+
+does for ICMP echo request/reply packets.
+<P>
+
+At the time of this writing, the ISAKMP echo request/reply exchange is still
+an internet-draft, and is therefore completely non-standard.
+<P>
+
+<I>Ikeping</I>
+
+will bind to the local address given by
+<B>--ikeaddress</B>
+
+and the port number given by
+<B>--ikeport</B>
+
+defaulting to the wildcard address and the ISAKMP port 500. An ISAKMP
+exchange of type 244 (a private use number) is sent to each of the
+address/ports listed on the command line. The exchange number may be
+overridden by the
+<B>--exchangenum </B>
+
+option.
+<P>
+
+<I>Ikeping</I>
+
+then listens for replies, printing them as they are received. Replies
+are of exchange type 245 or the specified exchange number plus 1.
+<I>Ikeping </I>
+
+will keep listening until it either receives as many echo responses as it sent,
+or until the timeout period (10 seconds) has been reached. Receipt of a
+packet will reset the timer. The
+<B>--wait</B>
+
+option can be used to specify a different timeout period.
+<P>
+
+If the
+<B>--listen</B>
+
+option is given, then
+<I>ikeping</I>
+
+will not send any packets. Instead, it will listen for them and reply to
+each request received.
+<A NAME="lbAE">&nbsp;</A>
+<H2>FILES</H2>
+
+no external files
+<A NAME="lbAF">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ping.8.html">ping</A>(8), <A HREF="ipsec_pluto.8.html">ipsec_pluto</A>(8)
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by Michael Richardson.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">FILES</A><DD>
+<DT><A HREF="#lbAF">SEE ALSO</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_initaddr.3.html b/doc/manpage.d/ipsec_initaddr.3.html
new file mode 100644
index 000000000..ca1f857e7
--- /dev/null
+++ b/doc/manpage.d/ipsec_initaddr.3.html
@@ -0,0 +1,232 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_INITADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_INITADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 11 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec initaddr - initialize an ip_address
+<BR>
+
+ipsec addrtypeof - get address type of an ip_address
+<BR>
+
+ipsec addrlenof - get length of address within an ip_address
+<BR>
+
+ipsec addrbytesof - get copy of address within an ip_address
+<BR>
+
+ipsec addrbytesptr - get pointer to address within an ip_address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *initaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int addrtypeof(const ip_address *src);</B>
+
+<BR>
+
+<B>size_t addrlenof(const ip_address *src);</B>
+
+<BR>
+
+<B>size_t addrbytesof(const ip_address *src,</B>
+
+<BR>
+&nbsp;
+<B>unsigned char *dst, size_t dstlen);</B>
+
+<BR>
+
+<B>size_t addrbytesptr(const ip_address *src,</B>
+
+<BR>
+&nbsp;
+<B>const unsigned char **dst);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+library uses an internal type
+<I>ip_address</I>
+
+to contain one of the (currently two) types of IP address.
+These functions provide basic tools for creating and examining this type.
+<P>
+
+<I>Initaddr</I>
+
+initializes a variable
+<I>*dst</I>
+
+of type
+<I>ip_address</I>
+
+from an address
+(in network byte order,
+indicated by a pointer
+<I>src</I>
+
+and a length
+<I>srclen</I>)
+
+and an address family
+<I>af</I>
+
+(typically
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>).
+
+The length must be consistent with the address family.
+<P>
+
+<I>Addrtypeof</I>
+
+returns the address type of an address,
+normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+(The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file arranges to include the necessary headers for these
+names to be known.)
+<P>
+
+<I>Addrlenof</I>
+
+returns the size (in bytes) of the address within an
+<I>ip_address</I>,
+
+to permit storage allocation etc.
+<P>
+
+<I>Addrbytesof</I>
+
+copies the address within the
+<I>ip_address</I>
+
+<I>src</I>
+
+to the buffer indicated by the pointer
+<I>dst</I>
+
+and the length
+<I>dstlen</I>,
+
+and returns the address length (in bytes).
+If the address will not fit,
+as many bytes as will fit are copied;
+the returned length is still the full length.
+It is the caller's responsibility to check the
+returned value to ensure that there was enough room.
+<P>
+
+<I>Addrbytesptr</I>
+
+sets
+<I>*dst</I>
+
+to a pointer to the internal address within the
+<I>ip_address</I>,
+
+and returns the address length (in bytes).
+If
+<I>dst</I>
+
+is
+<B>NULL</B>,
+
+it just returns the address length.
+The pointer points to
+<B>const</B>
+
+to discourage misuse.
+<P>
+
+<I>Initaddr</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<P>
+
+The functions which return
+<I>size_t</I>
+
+return
+<B>0</B>
+
+for a failure.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+An unknown address family is a fatal error for any of these functions
+except
+<I>addrtypeof</I>.
+
+An address-size mismatch is a fatal error for
+<I>initaddr</I>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+<I>Addrtypeof</I>
+
+should probably have been named
+<I>addrfamilyof</I>.
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_initsaid.3.html b/doc/manpage.d/ipsec_initsaid.3.html
new file mode 100644
index 000000000..2ba79a8ac
--- /dev/null
+++ b/doc/manpage.d/ipsec_initsaid.3.html
@@ -0,0 +1,453 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TTOSA</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TTOSA</H1>
+Section: C Library Functions (3)<BR>Updated: 26 Nov 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ttosa, satot - convert IPsec Security Association IDs to and from text
+<BR>
+
+ipsec initsaid - initialize an SA ID
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>typedef struct {</B>
+
+<BR>
+&nbsp;
+<B>ip_address dst;</B>
+
+<BR>
+&nbsp;
+<B>ipsec_spi_t spi;</B>
+
+<BR>
+&nbsp;
+<B>int proto;</B>
+
+<BR>
+
+<B>} ip_said;</B>
+
+<P>
+<B>const char *ttosa(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>ip_said *sa);</B>
+
+<BR>
+
+<B>size_t satot(const ip_said *sa, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<BR>
+
+<B>void initsaid(const ip_address *addr, ipsec_spi_t spi,</B>
+
+<BR>
+&nbsp;
+<B>int proto, ip_said *dst);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Ttosa</I>
+
+converts an ASCII Security Association (SA) specifier into an
+<B>ip_said</B>
+
+structure (containing
+a destination-host address
+in network byte order,
+an SPI number in network byte order, and
+a protocol code).
+<I>Satot</I>
+
+does the reverse conversion, back to a text SA specifier.
+<I>Initsaid</I>
+
+initializes an
+<B>ip_said</B>
+
+from separate items of information.
+<P>
+
+An SA is specified in text with a mail-like syntax, e.g.
+<B><A HREF="mailto:esp.5a7@1.2.3.4">esp.5a7@1.2.3.4</A></B>.
+
+An SA specifier contains
+a protocol prefix (currently
+<B>ah</B>,
+
+<B>esp</B>,
+
+<B>tun</B>,
+
+<B>comp</B>,
+
+or
+<B>int</B>),
+
+a single character indicating the address family
+(<B>.</B>
+
+for IPv4,
+<B>:</B>
+
+for IPv6),
+an unsigned integer SPI number in hexadecimal (with no
+<B>0x</B>
+
+prefix),
+and an IP address.
+The IP address can be any form accepted by
+<I><A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A></I>(3),
+
+e.g. dotted-decimal IPv4 address,
+colon-hex IPv6 address,
+or DNS name.
+<P>
+
+As a special case, the SA specifier
+<B>%passthrough4</B>
+
+or
+<B>%passthrough6</B>
+
+signifies the special SA used to indicate that packets should be
+passed through unaltered.
+(At present, these are synonyms for
+<B><A HREF="mailto:tun.0@0.0.0.0">tun.0@0.0.0.0</A></B>
+
+and
+<B>tun:0@::</B>
+
+respectively,
+but that is subject to change without notice.)
+<B>%passthrough</B>
+
+is a historical synonym for
+<B>%passthrough4</B>.
+
+These forms are known to both
+<I>ttosa</I>
+
+and
+<I>satot</I>,
+
+so the internal representation is never visible.
+<P>
+
+Similarly, the SA specifiers
+<B>%pass</B>,
+
+<B>%drop</B>,
+
+<B>%reject</B>,
+
+<B>%hold</B>,
+
+<B>%trap</B>,
+
+and
+<B>%trapsubnet</B>
+
+signify special ``magic'' SAs used to indicate that packets should be
+passed, dropped, rejected (dropped with ICMP notification),
+held,
+and trapped (sent up to
+<I><A HREF="ipsec_pluto.8.html">ipsec_pluto</A></I>(8),
+
+with either of two forms of
+<B>%hold</B>
+
+automatically installed)
+respectively.
+These forms too are known to both routines,
+so the internal representation of the magic SAs should never be visible.
+<P>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file supplies the
+<B>ip_said</B>
+
+structure, as well as a data type
+<B>ipsec_spi_t</B>
+
+which is an unsigned 32-bit integer.
+(There is no consistency between kernel and user on what such a type
+is called, hence the header hides the differences.)
+<P>
+
+The protocol code uses the same numbers that IP does.
+For user convenience, given the difficulty in acquiring the exact set of
+protocol names used by the kernel,
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+defines the names
+<B>SA_ESP</B>,
+
+<B>SA_AH</B>,
+
+<B>SA_IPIP</B>,
+
+and
+<B>SA_COMP</B>
+
+to have the same values as the kernel names
+<B>IPPROTO_ESP</B>,
+
+<B>IPPROTO_AH</B>,
+
+<B>IPPROTO_IPIP</B>,
+
+and
+<B>IPPROTO_COMP</B>.
+
+<P>
+
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+also defines
+<B>SA_INT</B>
+
+to have the value
+<B>61</B>
+
+(reserved by IANA for ``any host internal protocol'')
+and
+<B>SPI_PASS</B>,
+
+<B>SPI_DROP</B>,
+
+<B>SPI_REJECT</B>,
+
+<B>SPI_HOLD</B>,
+
+and
+<B>SPI_TRAP</B>
+
+to have the values 256-260 (in <I>host</I> byte order) respectively.
+These are used in constructing the magic SAs
+(which always have address
+<B>0.0.0.0</B>).
+
+<P>
+
+If
+<I>satot</I>
+
+encounters an unknown protocol code, e.g. 77,
+it yields output using a prefix
+showing the code numerically, e.g. ``unk77''.
+This form is
+<I>not</I>
+
+recognized by
+<I>ttosa</I>.
+
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>ttosa</I>
+
+specifies the length of the string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>satot</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file defines a constant,
+<B>SATOT_BUF</B>,
+
+which is the size of a buffer just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>satot</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the ASCII character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default
+(currently
+lowercase protocol prefix, lowercase hexadecimal SPI,
+dotted-decimal or colon-hex address).
+The value
+<B>'f'</B>
+
+is similar except that the SPI is padded with
+<B>0</B>s
+
+to a fixed 32-bit width, to ease aligning displayed tables.
+<P>
+
+<I>Ttosa</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<I>Satot</I>
+
+returns
+<B>0</B>
+
+for a failure, and otherwise
+always returns the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<P>
+
+There is also, temporarily, support for some obsolete
+forms of SA specifier which lack the address-family indicator.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec_ttoul.3.html">ipsec_ttoul</A>(3), <A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A>(3), <A HREF="ipsec_samesaid.3.html">ipsec_samesaid</A>(3), <A HREF="inet.3.html">inet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>ttosa</I>
+
+are:
+empty input;
+input too small to be a legal SA specifier;
+no
+<B>@</B>
+
+in input;
+unknown protocol prefix;
+conversion error in
+<I>ttoul</I>
+
+or
+<I>ttoaddr</I>.
+
+<P>
+
+Fatal errors in
+<I>satot</I>
+
+are:
+unknown format.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The restriction of text-to-binary error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The text-to-binary error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = ttosa( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_initsubnet.3.html b/doc/manpage.d/ipsec_initsubnet.3.html
new file mode 100644
index 000000000..e442a9100
--- /dev/null
+++ b/doc/manpage.d/ipsec_initsubnet.3.html
@@ -0,0 +1,238 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_INITSUBNET</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_INITSUBNET</H1>
+Section: C Library Functions (3)<BR>Updated: 12 March 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec initsubnet - initialize an ip_subnet
+<BR>
+
+ipsec addrtosubnet - initialize a singleton ip_subnet
+<BR>
+
+ipsec subnettypeof - get address type of an ip_subnet
+<BR>
+
+ipsec masktocount - convert subnet mask to bit count
+<BR>
+
+ipsec networkof - get base address of an ip_subnet
+<BR>
+
+ipsec maskof - get subnet mask of an ip_subnet
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *initsubnet(const ip_address *addr,</B>
+
+<BR>
+&nbsp;
+<B>int maskbits, int clash, ip_subnet *dst);</B>
+
+<BR>
+
+<B>const char *addrtosubnet(const ip_address *addr,</B>
+
+<BR>
+&nbsp;
+<B>ip_subnet *dst);</B>
+
+<P>
+<B>int subnettypeof(const ip_subnet *src);</B>
+
+<BR>
+
+<B>int masktocount(const ip_address *src);</B>
+
+<BR>
+
+<B>void networkof(const ip_subnet *src, ip_address *dst);</B>
+
+<BR>
+
+<B>void maskof(const ip_subnet *src, ip_address *dst);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+library uses an internal type
+<I>ip_subnet</I>
+
+to contain a description of an IP subnet
+(base address plus mask).
+These functions provide basic tools for creating and examining this type.
+<P>
+
+<I>Initsubnet</I>
+
+initializes a variable
+<I>*dst</I>
+
+of type
+<I>ip_subnet</I>
+
+from a base address and
+a count of mask bits.
+The
+<I>clash</I>
+
+parameter specifies what to do if the base address includes
+<B>1</B>
+
+bits outside the prefix specified by the mask
+(that is, in the ``host number'' part of the address):
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT>'0'<DD>
+zero out host-number bits
+<DT>'x'<DD>
+non-zero host-number bits are an error
+</DL>
+</DL>
+
+<P>
+
+<I>Initsubnet</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<P>
+
+<I>Addrtosubnet</I>
+
+initializes an
+<I>ip_subnet</I>
+
+variable
+<I>*dst</I>
+
+to a ``singleton subnet'' containing the single address
+<I>*addr</I>.
+
+It returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure.
+<P>
+
+<I>Subnettypeof</I>
+
+returns the address type of a subnet,
+normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+(The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file arranges to include the necessary headers for these
+names to be known.)
+<P>
+
+<I>Masktocount</I>
+
+converts a subnet mask, expressed as an address, to a bit count
+suitable for use with
+<I>initsubnet</I>.
+
+It returns
+<B>-1</B>
+
+for error; see DIAGNOSTICS.
+<P>
+
+<I>Networkof</I>
+
+fills in
+<I>*dst</I>
+
+with the base address of subnet
+<I>src</I>.
+
+<P>
+
+<I>Maskof</I>
+
+fills in
+<I>*dst</I>
+
+with the subnet mask of subnet
+<I>src</I>,
+
+expressed as an address.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_ttosubnet.3.html">ipsec_ttosubnet</A>(3), <A HREF="ipsec_rangetosubnet.3.html">ipsec_rangetosubnet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>initsubnet</I>
+
+are:
+unknown address family;
+unknown
+<I>clash</I>
+
+value;
+impossible mask bit count;
+non-zero host-number bits and
+<I>clash</I>
+
+is
+<B>'x'</B>.
+
+Fatal errors in
+<I>addrtosubnet</I>
+
+are:
+unknown address family.
+Fatal errors in
+<I>masktocount</I>
+
+are:
+unknown address family;
+mask bits not contiguous.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_isanyaddr.3.html b/doc/manpage.d/ipsec_isanyaddr.3.html
new file mode 100644
index 000000000..974236005
--- /dev/null
+++ b/doc/manpage.d/ipsec_isanyaddr.3.html
@@ -0,0 +1,166 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ANYADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 8 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec anyaddr - get &quot;any&quot; address
+<BR>
+
+ipsec isanyaddr - test address for equality to &quot;any&quot; address
+<BR>
+
+ipsec unspecaddr - get &quot;unspecified&quot; address
+<BR>
+
+ipsec isunspecaddr - test address for equality to &quot;unspecified&quot; address
+<BR>
+
+ipsec loopbackaddr - get loopback address
+<BR>
+
+ipsec isloopbackaddr - test address for equality to loopback address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *anyaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isanyaddr(const ip_address *src);</B>
+
+<BR>
+
+<B>const char *unspecaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isunspecaddr(const ip_address *src);</B>
+
+<BR>
+
+<B>const char *loopbackaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isloopbackaddr(const ip_address *src);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions fill in, and test for, special values of the
+<I>ip_address</I>
+
+type.
+<P>
+
+<I>Anyaddr</I>
+
+fills in the destination
+<I>*dst</I>
+
+with the ``any'' address of address family
+<I>af</I>
+
+(normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>).
+
+The IPv4 ``any'' address is the one embodied in the old
+<B>INADDR_ANY</B>
+
+macro.
+<P>
+
+<I>Isanyaddr</I>
+
+returns
+<B>1</B>
+
+if the
+<I>src</I>
+
+address equals the ``any'' address,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+Similarly,
+<I>unspecaddr</I>
+
+supplies, and
+<I>isunspecaddr</I>
+
+tests for,
+the ``unspecified'' address,
+which may be the same as the ``any'' address.
+<P>
+
+Similarly,
+<I>loopbackaddr</I>
+
+supplies, and
+<I>islookbackaddr</I>
+
+tests for,
+the loopback address.
+<P>
+
+<I>Anyaddr</I>,
+
+<I>unspecaddr</I>,
+
+and
+<I>loopbackaddr</I>
+
+return
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_addrtot.3.html">ipsec_addrtot</A>(3), <A HREF="ipsec_sameaddr.3.html">ipsec_sameaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in the address-supplying functions are:
+unknown address family.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_isloopbackaddr.3.html b/doc/manpage.d/ipsec_isloopbackaddr.3.html
new file mode 100644
index 000000000..974236005
--- /dev/null
+++ b/doc/manpage.d/ipsec_isloopbackaddr.3.html
@@ -0,0 +1,166 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ANYADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 8 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec anyaddr - get &quot;any&quot; address
+<BR>
+
+ipsec isanyaddr - test address for equality to &quot;any&quot; address
+<BR>
+
+ipsec unspecaddr - get &quot;unspecified&quot; address
+<BR>
+
+ipsec isunspecaddr - test address for equality to &quot;unspecified&quot; address
+<BR>
+
+ipsec loopbackaddr - get loopback address
+<BR>
+
+ipsec isloopbackaddr - test address for equality to loopback address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *anyaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isanyaddr(const ip_address *src);</B>
+
+<BR>
+
+<B>const char *unspecaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isunspecaddr(const ip_address *src);</B>
+
+<BR>
+
+<B>const char *loopbackaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isloopbackaddr(const ip_address *src);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions fill in, and test for, special values of the
+<I>ip_address</I>
+
+type.
+<P>
+
+<I>Anyaddr</I>
+
+fills in the destination
+<I>*dst</I>
+
+with the ``any'' address of address family
+<I>af</I>
+
+(normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>).
+
+The IPv4 ``any'' address is the one embodied in the old
+<B>INADDR_ANY</B>
+
+macro.
+<P>
+
+<I>Isanyaddr</I>
+
+returns
+<B>1</B>
+
+if the
+<I>src</I>
+
+address equals the ``any'' address,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+Similarly,
+<I>unspecaddr</I>
+
+supplies, and
+<I>isunspecaddr</I>
+
+tests for,
+the ``unspecified'' address,
+which may be the same as the ``any'' address.
+<P>
+
+Similarly,
+<I>loopbackaddr</I>
+
+supplies, and
+<I>islookbackaddr</I>
+
+tests for,
+the loopback address.
+<P>
+
+<I>Anyaddr</I>,
+
+<I>unspecaddr</I>,
+
+and
+<I>loopbackaddr</I>
+
+return
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_addrtot.3.html">ipsec_addrtot</A>(3), <A HREF="ipsec_sameaddr.3.html">ipsec_sameaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in the address-supplying functions are:
+unknown address family.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_isunspecaddr.3.html b/doc/manpage.d/ipsec_isunspecaddr.3.html
new file mode 100644
index 000000000..974236005
--- /dev/null
+++ b/doc/manpage.d/ipsec_isunspecaddr.3.html
@@ -0,0 +1,166 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ANYADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 8 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec anyaddr - get &quot;any&quot; address
+<BR>
+
+ipsec isanyaddr - test address for equality to &quot;any&quot; address
+<BR>
+
+ipsec unspecaddr - get &quot;unspecified&quot; address
+<BR>
+
+ipsec isunspecaddr - test address for equality to &quot;unspecified&quot; address
+<BR>
+
+ipsec loopbackaddr - get loopback address
+<BR>
+
+ipsec isloopbackaddr - test address for equality to loopback address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *anyaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isanyaddr(const ip_address *src);</B>
+
+<BR>
+
+<B>const char *unspecaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isunspecaddr(const ip_address *src);</B>
+
+<BR>
+
+<B>const char *loopbackaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isloopbackaddr(const ip_address *src);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions fill in, and test for, special values of the
+<I>ip_address</I>
+
+type.
+<P>
+
+<I>Anyaddr</I>
+
+fills in the destination
+<I>*dst</I>
+
+with the ``any'' address of address family
+<I>af</I>
+
+(normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>).
+
+The IPv4 ``any'' address is the one embodied in the old
+<B>INADDR_ANY</B>
+
+macro.
+<P>
+
+<I>Isanyaddr</I>
+
+returns
+<B>1</B>
+
+if the
+<I>src</I>
+
+address equals the ``any'' address,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+Similarly,
+<I>unspecaddr</I>
+
+supplies, and
+<I>isunspecaddr</I>
+
+tests for,
+the ``unspecified'' address,
+which may be the same as the ``any'' address.
+<P>
+
+Similarly,
+<I>loopbackaddr</I>
+
+supplies, and
+<I>islookbackaddr</I>
+
+tests for,
+the loopback address.
+<P>
+
+<I>Anyaddr</I>,
+
+<I>unspecaddr</I>,
+
+and
+<I>loopbackaddr</I>
+
+return
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_addrtot.3.html">ipsec_addrtot</A>(3), <A HREF="ipsec_sameaddr.3.html">ipsec_sameaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in the address-supplying functions are:
+unknown address family.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:17 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_keyblobtoid.3.html b/doc/manpage.d/ipsec_keyblobtoid.3.html
new file mode 100644
index 000000000..109cfafa7
--- /dev/null
+++ b/doc/manpage.d/ipsec_keyblobtoid.3.html
@@ -0,0 +1,174 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_KEYBLOBTOID</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_KEYBLOBTOID</H1>
+Section: C Library Functions (3)<BR>Updated: 25 March 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec keyblobtoid, splitkeytoid - generate key IDs from RSA keys
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>size_t keyblobtoid(const unsigned char *blob,</B>
+
+<BR>
+&nbsp;
+<B>size_t bloblen, char *dst, size_t dstlen);</B>
+
+<BR>
+
+<B>size_t splitkeytoid(const unsigned char *e, size_t elen,</B>
+
+<BR>
+&nbsp;
+<B>const unsigned char *m, size_t mlen, char *dst,</B>
+
+<BR>
+&nbsp;
+<B>size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Keyblobtoid</I>
+
+and
+<I>splitkeytoid</I>
+
+generate
+key IDs
+from RSA keys,
+for use in messages and reporting,
+writing the result to
+<I>dst</I>.
+
+A
+<I>key ID</I>
+
+is a short ASCII string identifying a key;
+currently it is just the first nine characters of the base64
+encoding of the RFC 2537/3110 ``byte blob'' representation of the key.
+(Beware that no finite key ID can be collision-proof:
+there is always some small chance of two random keys having the
+same ID.)
+<P>
+
+<I>Keyblobtoid</I>
+
+generates a key ID from a key which is already in the form of an
+RFC 2537/3110 binary key
+<I>blob</I>
+
+(encoded exponent length, exponent, modulus).
+<P>
+
+<I>Splitkeytoid</I>
+
+generates a key ID from a key given in the form of a separate
+(binary) exponent
+<I>e</I>
+
+and modulus
+<I>m</I>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of either
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines a constant
+<B>KEYID_BUF</B>
+
+which is the size of a buffer large enough for worst-case results.
+<P>
+
+Both functions return
+<B>0</B>
+
+for a failure, and otherwise
+always return the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+
+With keys generated by
+<I><A HREF="ipsec_rsasigkey.3.html">ipsec_rsasigkey</A></I>(3),
+
+the first two base64 digits are always the same,
+and the third carries only about one bit of information.
+It's worse with keys using longer fixed exponents,
+e.g. the 24-bit exponent that's common in X.509 certificates.
+However, being able to relate key IDs to the full
+base64 text form of keys by eye is sufficiently useful that this
+waste of space seems justifiable.
+The choice of nine digits is a compromise between bulk and
+probability of collision.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+RFC 3110,
+<I>RSA/SHA-1 SIGs and RSA KEYs in the Domain Name System (DNS)</I>,
+Eastlake, 2001
+(superseding the older but better-known RFC 2537).
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors are:
+key too short to supply enough bits to construct a complete key ID
+(almost certainly indicating a garbage key);
+exponent too long for its length to be representable.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_klipsdebug.5.html b/doc/manpage.d/ipsec_klipsdebug.5.html
new file mode 100644
index 000000000..964329256
--- /dev/null
+++ b/doc/manpage.d/ipsec_klipsdebug.5.html
@@ -0,0 +1,229 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_KLIPSDEBUG</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_KLIPSDEBUG</H1>
+Section: File Formats (5)<BR>Updated: 26 Jun 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec_klipsdebug - list KLIPS (kernel IPSEC support) debug features and level
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>klipsdebug</B>
+
+<P>
+
+<B>cat</B>
+
+<B>/proc/net/ipsec_klipsdebug</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>/proc/net/ipsec_klipsdebug</I>
+
+lists flags that control various parts of the debugging output of Klips
+(the kernel portion of FreeS/WAN IPSEC).
+At this point it is a read-only file.
+<P>
+
+A table entry consists of:
+<DL COMPACT>
+<DT>+<DD>
+a KLIPS debug variable
+<DT>+<DD>
+a '=' separator for visual and automated parsing between the variable
+name and its current value
+<DT>+<DD>
+hexadecimal bitmap of variable's flags.
+</DL>
+<P>
+
+The variable names roughly describe the scope of the debugging variable.
+Currently, no flags are documented or individually accessible yet except
+tunnel-xmit.
+
+<P>
+
+The variable names are:
+<DL COMPACT>
+<DT><B>tunnel</B>
+
+<DD>
+tunnelling code
+<DT><B>netlink</B>
+
+<DD>
+userspace communication code (obsolete)
+<DT><B>xform</B>
+
+<DD>
+transform selection and manipulation code
+<DT><B>eroute</B>
+
+<DD>
+eroute table manipulation code
+<DT><B>spi</B>
+
+<DD>
+SA table manipulation code
+<DT><B>radij</B>
+
+<DD>
+radij tree manipulation code
+<DT><B>esp</B>
+
+<DD>
+encryptions transforms code
+<DT><B>ah</B>
+
+<DD>
+authentication transforms code
+<DT><B>rcv</B>
+
+<DD>
+receive code
+<DT><B>ipcomp</B>
+
+<DD>
+ip compression transforms code
+<DT><B>verbose</B>
+
+<DD>
+give even more information, beware this will probably trample the 4k kernel printk buffer giving inaccurate output
+</DL>
+<P>
+
+All KLIPS debug output appears as
+<B>kernel.info</B>
+
+messages to
+<I><A HREF="syslogd.8.html">syslogd</A></I>(8).
+
+Most systems are set up
+to log these messages to
+<I>/var/log/messages</I>.
+
+<P>
+
+<A NAME="lbAE">&nbsp;</A>
+<H2>EXAMPLES</H2>
+
+<P>
+
+<B>debug_tunnel=00000010.</B>
+
+<BR>
+
+<B>debug_netlink=00000000.</B>
+
+<BR>
+
+<B>debug_xform=00000000.</B>
+
+<BR>
+
+<B>debug_eroute=00000000.</B>
+
+<BR>
+
+<B>debug_spi=00000000.</B>
+
+<BR>
+
+<B>debug_radij=00000000.</B>
+
+<BR>
+
+<B>debug_esp=00000000.</B>
+
+<BR>
+
+<B>debug_ah=00000000.</B>
+
+<BR>
+
+<B>debug_rcv=00000000.</B>
+
+<BR>
+
+<B>debug_pfkey=ffffffff.</B>
+
+<P>
+
+means that one
+<B>tunnel</B>
+
+flag has been set (tunnel-xmit),
+full
+<B>pfkey</B>
+
+sockets debugging has been set and everything else is not set.
+<P>
+
+<A NAME="lbAF">&nbsp;</A>
+<H2>FILES</H2>
+
+/proc/net/ipsec_klipsdebug, /usr/local/bin/ipsec
+<A NAME="lbAG">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8), <A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A>(8), <A HREF="ipsec_eroute.8.html">ipsec_eroute</A>(8),
+<A HREF="ipsec_spi.8.html">ipsec_spi</A>(8), <A HREF="ipsec_spigrp.8.html">ipsec_spigrp</A>(8), <A HREF="ipsec_klipsdebug.5.html">ipsec_klipsdebug</A>(5), <A HREF="ipsec_version.5.html">ipsec_version</A>(5),
+<A HREF="ipsec_pf_key.5.html">ipsec_pf_key</A>(5)
+<A NAME="lbAH">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Richard Guy Briggs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">EXAMPLES</A><DD>
+<DT><A HREF="#lbAF">FILES</A><DD>
+<DT><A HREF="#lbAG">SEE ALSO</A><DD>
+<DT><A HREF="#lbAH">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_klipsdebug.8.html b/doc/manpage.d/ipsec_klipsdebug.8.html
new file mode 100644
index 000000000..67b1c3a5d
--- /dev/null
+++ b/doc/manpage.d/ipsec_klipsdebug.8.html
@@ -0,0 +1,264 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_KLIPSDEBUG</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_KLIPSDEBUG</H1>
+Section: Maintenance Commands (8)<BR>Updated: 21 Jun 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec klipsdebug - set KLIPS (kernel IPSEC support) debug features and level
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>klipsdebug</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>klipsdebug</B>
+
+<B>--set</B>
+
+flagname
+<P>
+
+<B>ipsec</B>
+
+<B>klipsdebug</B>
+
+<B>--clear</B>
+
+flagname
+<P>
+
+<B>ipsec</B>
+
+<B>klipsdebug</B>
+
+<B>--all</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>klipsdebug</B>
+
+<B>--none</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>klipsdebug</B>
+
+<B>--help</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>klipsdebug</B>
+
+<B>--version</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Klipsdebug</I>
+
+sets and clears flags that control
+various parts of the debugging output of Klips
+(the kernel portion of FreeS/WAN IPSEC).
+The form with no additional arguments lists the present contents of
+/proc/net/ipsec_klipsdebug.
+The
+<B>--set</B>
+
+form turns the specified flag on,
+while the
+<B>--clear</B>
+
+form turns the specified flag off.
+The
+<B>--all</B>
+
+form
+turns all flags on except verbose, while the
+<B>--none</B>
+
+form turns all flags off.
+<P>
+
+The current flag names are:
+<DL COMPACT>
+<DT><B>tunnel</B>
+
+<DD>
+tunnelling code
+<DT><B>tunnel-xmit</B>
+
+<DD>
+tunnelling transmit only code
+<DT><B>pfkey</B>
+
+<DD>
+userspace communication code
+<DT><B>xform</B>
+
+<DD>
+transform selection and manipulation code
+<DT><B>eroute</B>
+
+<DD>
+eroute table manipulation code
+<DT><B>spi</B>
+
+<DD>
+SA table manipulation code
+<DT><B>radij</B>
+
+<DD>
+radij tree manipulation code
+<DT><B>esp</B>
+
+<DD>
+encryptions transforms code
+<DT><B>ah</B>
+
+<DD>
+authentication transforms code
+<B>rcv</B>
+
+receive code
+<DT><B>ipcomp</B>
+
+<DD>
+ip compression transforms code
+<DT><B>verbose</B>
+
+<DD>
+give even more information, BEWARE:
+a)this will print authentication and encryption keys in the logs
+b)this will probably trample the 4k kernel printk buffer giving inaccurate output
+</DL>
+<P>
+
+All Klips debug output appears as
+<B>kernel.info</B>
+
+messages to
+<I><A HREF="syslogd.8.html">syslogd</A></I>(8).
+
+Most systems are set up
+to log these messages to
+<I>/var/log/messages</I>.
+
+Beware that
+<B>klipsdebug</B>
+
+<B>--all</B>
+
+produces a lot of output and the log file will grow quickly.
+<P>
+
+The file format for /proc/net/ipsec_klipsdebug is discussed in
+<A HREF="ipsec_klipsdebug.5.html">ipsec_klipsdebug</A>(5).
+<A NAME="lbAE">&nbsp;</A>
+<H2>EXAMPLES</H2>
+
+<DL COMPACT>
+<DT><B>klipsdebug --all</B>
+
+<DD>
+turns on all KLIPS debugging except verbose.
+<DT><B>klipsdebug --clear tunnel</B>
+
+<DD>
+turns off only the
+<B>tunnel</B>
+
+debugging messages.
+</DL>
+<P>
+
+<A NAME="lbAF">&nbsp;</A>
+<H2>FILES</H2>
+
+/proc/net/ipsec_klipsdebug, /usr/local/bin/ipsec
+<A NAME="lbAG">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8), <A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A>(8), <A HREF="ipsec_eroute.8.html">ipsec_eroute</A>(8),
+<A HREF="ipsec_spi.8.html">ipsec_spi</A>(8), <A HREF="ipsec_spigrp.8.html">ipsec_spigrp</A>(8), <A HREF="ipsec_klipsdebug.5.html">ipsec_klipsdebug</A>(5)
+<A NAME="lbAH">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Richard Guy Briggs.
+<A NAME="lbAI">&nbsp;</A>
+<H2>BUGS</H2>
+
+It really ought to be possible to set or unset selective combinations
+of flags.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">EXAMPLES</A><DD>
+<DT><A HREF="#lbAF">FILES</A><DD>
+<DT><A HREF="#lbAG">SEE ALSO</A><DD>
+<DT><A HREF="#lbAH">HISTORY</A><DD>
+<DT><A HREF="#lbAI">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_look.8.html b/doc/manpage.d/ipsec_look.8.html
new file mode 100644
index 000000000..ffe07a57c
--- /dev/null
+++ b/doc/manpage.d/ipsec_look.8.html
@@ -0,0 +1,76 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of look</TITLE>
+</HEAD><BODY>
+<H1>look</H1>
+Section: Maintenance Commands (8)<BR>Updated: 25 Apr 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec look - get a quick summary of FreeS/WAN status
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<I>look</I>
+
+is used to get a quick overview of what the status of FreeSWAN is.
+It is equivalent to:
+&nbsp;&nbsp;&nbsp;ipsec eroute
+<P>
+&nbsp;&nbsp;&nbsp;ipsec spigrp
+<P>
+&nbsp;&nbsp;&nbsp;ipsec tncfg
+<P>
+&nbsp;&nbsp;&nbsp;ipsec spi
+<P>
+&nbsp;&nbsp;&nbsp;netstat -rn
+<P>
+<P>
+
+However a bit of processing is done to combine the outputs.
+<A NAME="lbAD">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A>(8), <A HREF="ipsec_spi.8.html">ipsec_spi</A>(8), <A HREF="ipsec_spigrp.8.html">ipsec_spigrp</A>(8), <A HREF="ipsec_eroute.5.html">ipsec_eroute</A>(5),
+<A HREF="netstat.8.html">netstat</A>(8).
+<A NAME="lbAE">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Man page written for the Linux FreeS/WAN project &lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Michael Richardson. Original program written by Henry Spencer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">SEE ALSO</A><DD>
+<DT><A HREF="#lbAE">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_loopbackaddr.3.html b/doc/manpage.d/ipsec_loopbackaddr.3.html
new file mode 100644
index 000000000..92f69d99c
--- /dev/null
+++ b/doc/manpage.d/ipsec_loopbackaddr.3.html
@@ -0,0 +1,166 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ANYADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 8 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec anyaddr - get &quot;any&quot; address
+<BR>
+
+ipsec isanyaddr - test address for equality to &quot;any&quot; address
+<BR>
+
+ipsec unspecaddr - get &quot;unspecified&quot; address
+<BR>
+
+ipsec isunspecaddr - test address for equality to &quot;unspecified&quot; address
+<BR>
+
+ipsec loopbackaddr - get loopback address
+<BR>
+
+ipsec isloopbackaddr - test address for equality to loopback address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *anyaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isanyaddr(const ip_address *src);</B>
+
+<BR>
+
+<B>const char *unspecaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isunspecaddr(const ip_address *src);</B>
+
+<BR>
+
+<B>const char *loopbackaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isloopbackaddr(const ip_address *src);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions fill in, and test for, special values of the
+<I>ip_address</I>
+
+type.
+<P>
+
+<I>Anyaddr</I>
+
+fills in the destination
+<I>*dst</I>
+
+with the ``any'' address of address family
+<I>af</I>
+
+(normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>).
+
+The IPv4 ``any'' address is the one embodied in the old
+<B>INADDR_ANY</B>
+
+macro.
+<P>
+
+<I>Isanyaddr</I>
+
+returns
+<B>1</B>
+
+if the
+<I>src</I>
+
+address equals the ``any'' address,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+Similarly,
+<I>unspecaddr</I>
+
+supplies, and
+<I>isunspecaddr</I>
+
+tests for,
+the ``unspecified'' address,
+which may be the same as the ``any'' address.
+<P>
+
+Similarly,
+<I>loopbackaddr</I>
+
+supplies, and
+<I>islookbackaddr</I>
+
+tests for,
+the loopback address.
+<P>
+
+<I>Anyaddr</I>,
+
+<I>unspecaddr</I>,
+
+and
+<I>loopbackaddr</I>
+
+return
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_addrtot.3.html">ipsec_addrtot</A>(3), <A HREF="ipsec_sameaddr.3.html">ipsec_sameaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in the address-supplying functions are:
+unknown address family.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_lwdnsq.8.html b/doc/manpage.d/ipsec_lwdnsq.8.html
new file mode 100644
index 000000000..1122b188a
--- /dev/null
+++ b/doc/manpage.d/ipsec_lwdnsq.8.html
@@ -0,0 +1,400 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC LWDNSQ</TITLE>
+</HEAD><BODY>
+<H1>IPSEC LWDNSQ</H1>
+Section:  (8)<BR>Updated: <BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+lwdnsq - lookup items in DNS to help pluto (and others)
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<P>
+<PRE>
+<B>ipsec lwdnsq</B> lwdnsq [<B>--prompt</B>] [<B>--serial</B>]
+</PRE>
+
+<P>
+<PRE>
+<B>ipsec lwdnsq</B> lwdnsq [<B>--help</B>]
+</PRE>
+
+<P>
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<P>
+<P>
+
+The <B>ipsec lwdnsq</B> is a helper program that does DNS lookups for other programs. It implements an asynchronous interface on stdin/stdout, with an ASCII driven command language.
+<P>
+<P>
+
+If stdin is a tty or if the <B>--prompt</B> option is given, then it issues a prompt to the user. Otherwise, it is silent, except for results.
+<P>
+<P>
+
+The program will accept multiple queries concurrently, with each result being marked with the ID provided on the output. The IDs are strings.
+<P>
+<P>
+
+If the <B>--serial</B> option is given, then the program will not attempt to execute concurrent queries, but will serialize all input and output.
+<P>
+<A NAME="lbAE">&nbsp;</A>
+<H2>QUERY LANGUAGE</H2>
+
+<P>
+<P>
+
+There are eleven command that the program understands. This is to lookup different types of records in both the forward and reverse maps. Every query includes a queryid, which is returned in the output, on every single line to identify the transaction.
+<P>
+<A NAME="lbAF">&nbsp;</A>
+<H3>KEY queryid FQDN</H3>
+
+<P>
+<P>
+
+This request looks up the KEY resource record for the given <B>FQDN.</B>.
+<P>
+<A NAME="lbAG">&nbsp;</A>
+<H3>KEY4 queryid A.B.C.D</H3>
+
+<P>
+<P>
+
+This request looks up the KEY resource record found in the reverse map for the IP version 4 address <B>A.B.C.D</B>, i.e. it looks up D.C.B.A.in-addr.arpa.
+<P>
+<A NAME="lbAH">&nbsp;</A>
+<H3>KEY6 queryid A:B::C:D</H3>
+
+<P>
+<P>
+
+This request looks up the KEY resource record found in the reverse map for the IPv6 address <B>A:B::C:D</B>, i.e. it looks the 32-nibble long entry in ip6.arpa (and ip6.int).
+<P>
+<A NAME="lbAI">&nbsp;</A>
+<H3>TXT4 queryid A.B.C.D</H3>
+
+<P>
+<P>
+
+This request looks up the TXT resource record found in the reverse map for the IP version 4 address <B>A.B.C.D</B>, i.e. it looks up D.C.B.A.in-addr.arpa.
+<P>
+<A NAME="lbAJ">&nbsp;</A>
+<H3>TXT6 queryid A:B::C:D</H3>
+
+<P>
+<P>
+
+This request looks up the TXT resource record found in the reverse map for the IPv6 address <B>A:B::C:D</B>, i.e. it looks the 32-nibble long entry in ip6.arpa (and ip6.int).
+<P>
+<A NAME="lbAK">&nbsp;</A>
+<H3>KEY queryid FQDN</H3>
+
+<P>
+<P>
+
+This request looks up the IPSECKEY resource record for the given <B>FQDN.</B>. See note about IPSECKEY processing, below.
+<P>
+<A NAME="lbAL">&nbsp;</A>
+<H3>IPSECKEY4 queryid A.B.C.D</H3>
+
+<P>
+<P>
+
+This request looks up the IPSECKEY resource record found in the reverse map for the IP version 4 address <B>A.B.C.D</B>, i.e. it looks up D.C.B.A.in-addr.arpa. See special note about IPSECKEY processing, below.
+<P>
+<A NAME="lbAM">&nbsp;</A>
+<H3>IPSECKEY6 queryid A:B::C:D</H3>
+
+<P>
+<P>
+
+This request looks up the IPSECKEY resource record found in the reverse map for the IPv6 address <B>A:B::C:D</B>, i.e. it looks the 32-nibble long entry in ip6.arpa (and ip6.int). See special note about IPSECKEY processing, below.
+<P>
+<A NAME="lbAN">&nbsp;</A>
+<H3>OE4 queryid A.B.C.D</H3>
+
+<P>
+<P>
+
+This request looks an appropriate record for Opportunistic Encryption for the given IP address. This attempts to look for the delegation record. This may be one of IPSECKEY, KEY, or TXT record. Unless configured otherwise, (see OE4 Directives, below), then a query type of ANY will be used to retrieve all relevant records, and all will be returned.
+<P>
+<A NAME="lbAO">&nbsp;</A>
+<H3>OE6 queryid A:B::C:D</H3>
+
+<P>
+<P>
+
+This request looks an appropriate record for Opportunistic Encryption for the given IPv6 address. This attempts to look for the delegation record. This may be one of IPSECKEY, KEY, or TXT record. Unless configured otherwise, (see OE Directives, below), then a query type of ALL will be used to retrieve all relevant records, and all will be returned. i.e. it looks the 32-nibble long entry in ip6.arpa (and ip6.int).
+<P>
+<A NAME="lbAP">&nbsp;</A>
+<H3>A queryid FQDN</H3>
+
+<P>
+<P>
+
+This request looks up the A (IPv4) resource record for the given <B>FQDN.</B>.
+<P>
+<A NAME="lbAQ">&nbsp;</A>
+<H3>AAAA queryid FQDN</H3>
+
+<P>
+<P>
+
+This request looks up the AAAA (IPv6) resource record for the given <B>FQDN.</B>.
+<P>
+<A NAME="lbAR">&nbsp;</A>
+<H2>REPLIES TO QUERIES</H2>
+
+<P>
+<P>
+
+All replies from the queries are in the following format:
+<P>
+<PRE>
+
+&lt;ID&gt; &lt;TIME&gt; &lt;TTL&gt; &lt;TYPE&gt; &lt;TYPE-SPECIFIC&gt; \n
+
+</PRE>
+
+<BR>&nbsp;&nbsp;
+<P>
+<DL COMPACT>
+<DT><I>ID</I><DD>
+this is the <B>queryid</B> value that was provided in the query. It is repeated on every line to permit the replies to be properly associated with the query. When the response is not ascribable to particular query (such as for a mis-formed query), then the query ID &quot;0&quot; will be used.
+<P>
+<DT><I>TIME</I><DD>
+this is the current time in seconds since epoch.
+<P>
+<DT><I>TTL</I><DD>
+for answers which have a time to live, this is the current value. The answer is valid for this number of seconds. If there is no useful value here, then the number 0 is used.
+<P>
+<DT><I>TYPE</I><DD>
+This is the type of the record that is being returned. The types are described in the next section. The TYPE specific data that follows is specific to the type.
+<BR>&nbsp;
+<P>
+</DL>
+<P>
+
+The replies are limited to 4096 bytes, a value defined as <B>LWDNSQ_RESULT_LEN_MAX</B>. This is defined in <I>freeswan.h</I>.
+<P>
+<P>
+
+All of the replies which include resource records use the standard presentation format (with no line feeds or carriage returns) in their answer.
+<P>
+<A NAME="lbAS">&nbsp;</A>
+<H3>START</H3>
+
+<P>
+<P>
+
+This reply indicates that a query has been received and has been started. It serves as an anchor point for timing, as well as an acknowledgement.
+<P>
+<A NAME="lbAT">&nbsp;</A>
+<H3>DONE</H3>
+
+<P>
+<P>
+
+This reply indicates that a query is entirely over, and no further information from this query will be sent.
+<P>
+<A NAME="lbAU">&nbsp;</A>
+<H3>RETRY</H3>
+
+<P>
+<P>
+
+This reply indicates that a query is entirely over, but that no data was found. The records may exist, but appropriate servers could not be reached.
+<P>
+<A NAME="lbAV">&nbsp;</A>
+<H3>FATAL</H3>
+
+<P>
+<P>
+
+This reply indicates that a query is entirely over, and that no data of the type requested could be found. There were no timeouts, and all servers were available and confirmed non-existances. There may be NXT records returned prior to this.
+<P>
+<A NAME="lbAW">&nbsp;</A>
+<H3>CNAME</H3>
+
+<P>
+<P>
+
+This is an interim reply, and indicates that a CNAME was found (and followed) while performing the query. The value of the CNAME is present in the type specific section.
+<P>
+<A NAME="lbAX">&nbsp;</A>
+<H3>CNAMEFROM</H3>
+
+<P>
+<P>
+
+This is an interim reply, and indicates that a CNAME was found. The original name that was queries for was not the canonical name, and this reply indicates the name that was actually followed.
+<P>
+<A NAME="lbAY">&nbsp;</A>
+<H3>NAME</H3>
+
+<P>
+<P>
+
+This is an interim reply. The original name that was queries for was not the canonical name. This reply indicates the canonical name.
+<P>
+<A NAME="lbAZ">&nbsp;</A>
+<H3>DNSSEC</H3>
+
+<P>
+<P>
+
+This is an interim reply. It is followed either by &quot;OKAY&quot; or &quot;not present. It indicates if DNSSEC was available on the reply.
+<P>
+<A NAME="lbBA">&nbsp;</A>
+<H3>TXT and AD-TXT</H3>
+
+<P>
+<P>
+
+This is an interim reply. If there are TXT resource records in the reply, then each one is presented using this type. If preceeded by AD-, then this record was signed with DNSSEC.
+<P>
+<A NAME="lbBB">&nbsp;</A>
+<H3>A and AD-A</H3>
+
+<P>
+<P>
+
+This is an interim reply. If there are A resource records in the reply, then each one is presented using this type. If preceeded by AD-, then this record was signed with DNSSEC.
+<P>
+<A NAME="lbBC">&nbsp;</A>
+<H3>AAAA and AD-AAAA</H3>
+
+<P>
+<P>
+
+This is an interim reply. If there are AAAA resource records in the reply, then each one is presented using this type. If preceeded by AD-, then this record was signed with DNSSEC.
+<P>
+<A NAME="lbBD">&nbsp;</A>
+<H3>PTR and AD-PTR</H3>
+
+<P>
+<P>
+
+This is an interim reply. If there are PTR resource records in the reply, then each one is presented using this type. If preceeded by AD-, then this record was signed with DNSSEC.
+<P>
+<A NAME="lbBE">&nbsp;</A>
+<H3>KEY and AD-KEY</H3>
+
+<P>
+<P>
+
+This is an interim reply. If there are KEY resource records in the reply, then each one is presented using this type. If preceeded by AD-, then this record was signed with DNSSEC.
+<P>
+<A NAME="lbBF">&nbsp;</A>
+<H3>IPSECKEY and AD-IPSECKEY</H3>
+
+<P>
+<P>
+
+This is an interim reply. If there are IPSEC resource records in the reply, then each one is presented using this type. If preceeded by AD-, then this record was signed with DNSSEC.
+<P>
+<A NAME="lbBG">&nbsp;</A>
+<H2>SPECIAL IPSECKEY PROCESSING</H2>
+
+<P>
+<P>
+
+At the time of this writing, the IPSECKEY resource record is not entirely specified. In particular no resource record number has been assigned. This program assumes that it is resource record number 45. If the file /etc/ipsec.d/lwdnsq.conf exists, and contains a line like
+<P>
+<PRE>
+
+ipseckey_rr=<B>number</B>
+
+</PRE>
+
+<BR>&nbsp;then&nbsp;this&nbsp;number&nbsp;will&nbsp;be&nbsp;used&nbsp;instead.&nbsp;The&nbsp;file&nbsp;is&nbsp;read&nbsp;only&nbsp;once&nbsp;at&nbsp;startup.
+<P>
+<A NAME="lbBH">&nbsp;</A>
+<H2>OE DIRECTIVES</H2>
+
+<P>
+<P>
+
+If the file /etc/ipsec.d/lwdnsq.conf exists, and contains a line like
+<P>
+<PRE>
+
+queryany=false
+
+</PRE>
+
+<BR>&nbsp;then&nbsp;instead&nbsp;of&nbsp;doing&nbsp;an&nbsp;ALL&nbsp;query&nbsp;when&nbsp;looking&nbsp;for&nbsp;OE&nbsp;delegation&nbsp;records,&nbsp;lwdnsq&nbsp;will&nbsp;do&nbsp;a&nbsp;series&nbsp;of&nbsp;queries.&nbsp;It&nbsp;will&nbsp;first&nbsp;look&nbsp;for&nbsp;IPSECKEY,&nbsp;and&nbsp;then&nbsp;TXT&nbsp;record.&nbsp;If&nbsp;it&nbsp;finds&nbsp;neither,&nbsp;it&nbsp;will&nbsp;then&nbsp;look&nbsp;for&nbsp;KEY&nbsp;records&nbsp;of&nbsp;all&nbsp;kinds,&nbsp;although&nbsp;they&nbsp;do&nbsp;not&nbsp;contain&nbsp;delegation&nbsp;information.
+<P>
+<A NAME="lbBI">&nbsp;</A>
+<H2>SPECIAL IPSECKEY PROCESSING</H2>
+
+<P>
+<PRE>
+
+/etc/ipsec.d/lwdnsq.conf
+
+</PRE>
+
+<P>
+<A NAME="lbBJ">&nbsp;</A>
+<H2>AUTHOR</H2>
+
+Michael Richardson &lt;<A HREF="mailto:mcr@sandelman.ottawa.on.ca">mcr@sandelman.ottawa.on.ca</A>&gt;.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">QUERY LANGUAGE</A><DD>
+<DL>
+<DT><A HREF="#lbAF">KEY queryid FQDN</A><DD>
+<DT><A HREF="#lbAG">KEY4 queryid A.B.C.D</A><DD>
+<DT><A HREF="#lbAH">KEY6 queryid A:B::C:D</A><DD>
+<DT><A HREF="#lbAI">TXT4 queryid A.B.C.D</A><DD>
+<DT><A HREF="#lbAJ">TXT6 queryid A:B::C:D</A><DD>
+<DT><A HREF="#lbAK">KEY queryid FQDN</A><DD>
+<DT><A HREF="#lbAL">IPSECKEY4 queryid A.B.C.D</A><DD>
+<DT><A HREF="#lbAM">IPSECKEY6 queryid A:B::C:D</A><DD>
+<DT><A HREF="#lbAN">OE4 queryid A.B.C.D</A><DD>
+<DT><A HREF="#lbAO">OE6 queryid A:B::C:D</A><DD>
+<DT><A HREF="#lbAP">A queryid FQDN</A><DD>
+<DT><A HREF="#lbAQ">AAAA queryid FQDN</A><DD>
+</DL>
+<DT><A HREF="#lbAR">REPLIES TO QUERIES</A><DD>
+<DL>
+<DT><A HREF="#lbAS">START</A><DD>
+<DT><A HREF="#lbAT">DONE</A><DD>
+<DT><A HREF="#lbAU">RETRY</A><DD>
+<DT><A HREF="#lbAV">FATAL</A><DD>
+<DT><A HREF="#lbAW">CNAME</A><DD>
+<DT><A HREF="#lbAX">CNAMEFROM</A><DD>
+<DT><A HREF="#lbAY">NAME</A><DD>
+<DT><A HREF="#lbAZ">DNSSEC</A><DD>
+<DT><A HREF="#lbBA">TXT and AD-TXT</A><DD>
+<DT><A HREF="#lbBB">A and AD-A</A><DD>
+<DT><A HREF="#lbBC">AAAA and AD-AAAA</A><DD>
+<DT><A HREF="#lbBD">PTR and AD-PTR</A><DD>
+<DT><A HREF="#lbBE">KEY and AD-KEY</A><DD>
+<DT><A HREF="#lbBF">IPSECKEY and AD-IPSECKEY</A><DD>
+</DL>
+<DT><A HREF="#lbBG">SPECIAL IPSECKEY PROCESSING</A><DD>
+<DT><A HREF="#lbBH">OE DIRECTIVES</A><DD>
+<DT><A HREF="#lbBI">SPECIAL IPSECKEY PROCESSING</A><DD>
+<DT><A HREF="#lbBJ">AUTHOR</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_mailkey.8.html b/doc/manpage.d/ipsec_mailkey.8.html
new file mode 100644
index 000000000..83a532563
--- /dev/null
+++ b/doc/manpage.d/ipsec_mailkey.8.html
@@ -0,0 +1,97 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_MAILKEY</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_MAILKEY</H1>
+Section: Maintenance Commands (8)<BR>Updated: 21 Feb 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec mailkey - mail DNS records for Opportunistic Encryption
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>mailkey</B>
+
+--me
+<A HREF="mailto:my@address.tld">my@address.tld</A>
+[
+<B>--reverse</B>
+
+1.2.3.4
+] [
+<B>--forward</B>
+
+hostname.domain.tld
+]
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>mailkey</I>
+
+is a meta-program. It generates a script which will attempt to mail the TXT
+records required to enable Opportunistic Encryption (OE).
+<P>
+
+An e-mail address for the domain's DNS administrator is derived from SOA records.
+The mail body and destination address are freely editable in the script.
+<P>
+
+If no administrator can be located, the output file will not be executable.
+<P>
+
+<DL COMPACT>
+<DT><B>--me</B>&nbsp;<I><A HREF="mailto:my@address.tld">my@address.tld</A></I><DD>
+set the Reply-To: address of the mail to be sent.
+<DT><B>--forward</B>&nbsp;<I>hostname.domain.tld</I><DD>
+the domain name to be used for initator-only OE.
+<DT><B>--reverse</B>&nbsp;<I>1.2.3.4</I><DD>
+the IP address to be used for full Opportunistic Encryption.
+</DL>
+<P>
+
+Only one of --forward or --reverse may be specified.
+<A NAME="lbAE">&nbsp;</A>
+<H2>FILES</H2>
+
+<PRE>
+/etc/ipsec.secrets
+</PRE>
+
+<A NAME="lbAF">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec_showhostkey.8.html">ipsec_showhostkey</A>(8), <A HREF="host.8.html">host</A>(8)
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project &lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt; by Sam Sgro.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+May produce indeterminate results when processing non-routable IPs.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">FILES</A><DD>
+<DT><A HREF="#lbAF">SEE ALSO</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_manual.8.html b/doc/manpage.d/ipsec_manual.8.html
new file mode 100644
index 000000000..77134f7d0
--- /dev/null
+++ b/doc/manpage.d/ipsec_manual.8.html
@@ -0,0 +1,414 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_MANUAL</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_MANUAL</H1>
+Section: Maintenance Commands (8)<BR>Updated: 17 July 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec manual - take manually-keyed IPsec connections up and down
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>manual</B>
+
+[
+<B>--show</B>
+
+] [
+<B>--showonly</B>
+
+] [
+<B>--other</B>
+
+]
+<BR>
+
+&nbsp;&nbsp;&nbsp;[
+<B>--iam</B>
+
+address<B>@</B>interface
+
+] [
+<B>--config</B>
+
+configfile
+]
+<BR>
+
+&nbsp;&nbsp;&nbsp;operation connection
+<P>
+<B>ipsec</B>
+
+<B>manual</B>
+
+[
+<I>options</I>
+
+]
+<B>--union</B>
+
+operation part ...
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Manual</I>
+
+manipulates manually-keyed FreeS/WAN IPsec connections,
+setting them up and shutting them down,
+based on the information in the IPsec configuration file.
+In the normal usage,
+<I>connection</I>
+
+is the name of a connection specification in the configuration file;
+<I>operation</I>
+
+is
+<B>--up</B>,
+
+<B>--down</B>,
+
+<B>--route</B>,
+
+or
+<B>--unroute</B>.
+
+<I>Manual</I>
+
+generates setup (<B>--route</B>
+
+or
+<B>--up</B>)
+
+or
+teardown (<B>--down</B>
+
+or
+<B>--unroute</B>)
+
+commands for the connection and feeds them to a shell for execution.
+<P>
+
+The
+<B>--up</B>
+
+operation brings the specified connection up, including establishing a
+suitable route for it if necessary.
+<P>
+
+The
+<B>--route</B>
+
+operation just establishes the route for a connection.
+Unless and until an
+<B>--up</B>
+
+operation is done, packets routed by that route will simply be discarded.
+<P>
+
+The
+<B>--down</B>
+
+operation tears the specified connection down,
+<I>except</I>
+
+that it leaves the route in place.
+Unless and until an
+<B>--unroute</B>
+
+operation is done, packets routed by that route will simply be discarded.
+This permits establishing another connection to the same destination
+without any ``window'' in which packets can pass without encryption.
+<P>
+
+The
+<B>--unroute</B>
+
+operation (and only the
+<B>--unroute</B>
+
+operation) deletes any route established for a connection.
+<P>
+
+In the
+<B>--union</B>
+
+usage, each
+<I>part</I>
+
+is the name of a partial connection specification in the configuration file,
+and the union of all the partial specifications is the
+connection specification used.
+The effect is as if the contents of the partial specifications were
+concatenated together;
+restrictions on duplicate parameters, etc., do apply to the result.
+(The same effect can now be had, more gracefully, using the
+<B>also</B>
+
+parameter in connection descriptions;
+see
+<I><A HREF="ipsec.conf.5.html">ipsec.conf</A></I>(5)
+
+for details.)
+<P>
+
+The
+<B>--show</B>
+
+option turns on the
+<B>-x</B>
+
+option of the shell used to execute the commands,
+so each command is shown as it is executed.
+<P>
+
+The
+<B>--showonly</B>
+
+option causes
+<I>manual</I>
+
+to show the commands it would run, on standard output,
+and not run them.
+<P>
+
+The
+<B>--other</B>
+
+option causes
+<I>manual</I>
+
+to pretend it is the other end of the connection.
+This is probably not useful except in combination with
+<B>--showonly</B>.
+
+<P>
+
+The
+<B>--iam</B>
+
+option causes
+<I>manual</I>
+
+to believe it is running on the host with the specified IP
+<I>address</I>,
+
+and that it should use the specified
+<I>interface</I>
+
+(normally it determines all this automatically,
+based on what IPsec interfaces are up and how they are configured).
+<P>
+
+The
+<B>--config</B>
+
+option specifies a non-standard location for the FreeS/WAN IPsec
+configuration file (default
+<I>/etc/ipsec.conf</I>).
+
+<P>
+
+See
+<I><A HREF="ipsec.conf.5.html">ipsec.conf</A></I>(5)
+
+for details of the configuration file.
+Apart from the basic parameters which specify the endpoints and routing
+of a connection (<B>left</B>
+and
+<B>right</B>,
+
+plus possibly
+<B>leftsubnet</B>,
+
+<B>leftnexthop</B>,
+
+<B>leftfirewall</B>,
+
+their
+<B>right</B>
+
+equivalents,
+and perhaps
+<B>type</B>),
+
+a non-<B>passthrough</B>
+<I>manual</I>
+
+connection needs an
+<B>spi</B>
+
+or
+<B>spibase</B>
+
+parameter and some parameters specifying encryption, authentication, or
+both, most simply
+<B>esp</B>,
+
+<B>espenckey</B>,
+
+and
+<B>espauthkey</B>.
+
+Moderately-secure keys can be obtained from
+<I><A HREF="ipsec_ranbits.8.html">ipsec_ranbits</A></I>(8).
+
+For production use of manually-keyed connections,
+it is strongly recommended that the keys be kept in a separate file
+(with permissions
+<B>rw-------</B>)
+
+using the
+<B>include</B>
+
+and
+<B>also</B>
+
+facilities of the configuration file (see
+<I><A HREF="ipsec.conf.5.html">ipsec.conf</A></I>(5)).
+
+<P>
+
+If an
+<B>spi</B>
+
+parameter is given,
+<I>manual</I>
+
+uses that value as the SPI number for all the SAs
+(which are in separate number spaces anyway).
+If an
+<B>spibase</B>
+
+parameter is given instead,
+<I>manual</I>
+
+assigns SPI values by altering the bottom digit
+of that value;
+SAs going from left to right get even digits starting at 0,
+SAs going from right to left get odd digits starting at 1.
+Either way, it is suggested that manually-keyed connections use
+three-digit SPIs with the first digit non-zero,
+i.e. in the range
+<B>0x100</B>
+
+through
+<B>0xfff</B>;
+
+FreeS/WAN reserves those for manual keying and will not
+attempt to use them for automatic keying (unless requested to,
+presumably by a non-FreeS/WAN other end).
+<A NAME="lbAE">&nbsp;</A>
+<H2>FILES</H2>
+
+
+
+/etc/ipsec.conf<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>default IPsec configuration file<BR>
+<BR>
+
+/var/run/ipsec.info<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><B>%defaultroute</B> information<BR>
+<A NAME="lbAF">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec.conf.5.html">ipsec.conf</A>(5), <A HREF="ipsec_spi.8.html">ipsec_spi</A>(8), <A HREF="ipsec_eroute.8.html">ipsec_eroute</A>(8), <A HREF="ipsec_spigrp.8.html">ipsec_spigrp</A>(8),
+<A HREF="route.8.html">route</A>(8)
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+It's not nearly as generous about the syntax of subnets,
+addresses, etc. as the usual FreeS/WAN user interfaces.
+Four-component dotted-decimal must be used for all addresses.
+It
+<I>is</I>
+
+smart enough to translate bit-count netmasks to dotted-decimal form.
+<P>
+
+If the connection specification for a connection is changed between an
+<B>--up</B>
+
+and the ensuing
+<B>--down</B>,
+
+chaos may ensue.
+<P>
+
+The
+<B>--up</B>
+
+operation is not smart enough to notice whether the connection is already up.
+<P>
+
+<I>Manual</I>
+
+is not smart enough to reject insecure combinations of algorithms,
+e.g. encryption with no authentication at all.
+<P>
+
+Any non-IPsec route to the other end which is replaced by the
+<B>--up</B>
+
+or
+<B>--route</B>
+
+operation will not be re-established by
+<B>--unroute</B>.
+
+Whether this is a feature or a bug depends on your viewpoint.
+<P>
+
+The optional parameters which
+override the automatic
+<B>spibase</B>-based
+
+SPI assignment are a messy area of the code and bugs are likely.
+<P>
+
+``Road warrior'' handling,
+and other special forms of setup which
+require negotiation between the two security gateways,
+inherently cannot be done with
+<I>manual</I>.
+
+<P>
+
+<I>Manual</I>
+
+generally lags behind
+<I>auto</I>
+
+in support of various features,
+even when implementation <I>would</I> be possible.
+For example, currently it does not do IPComp content compression.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">FILES</A><DD>
+<DT><A HREF="#lbAF">SEE ALSO</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_maskof.3.html b/doc/manpage.d/ipsec_maskof.3.html
new file mode 100644
index 000000000..ea0f83f82
--- /dev/null
+++ b/doc/manpage.d/ipsec_maskof.3.html
@@ -0,0 +1,238 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_INITSUBNET</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_INITSUBNET</H1>
+Section: C Library Functions (3)<BR>Updated: 12 March 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec initsubnet - initialize an ip_subnet
+<BR>
+
+ipsec addrtosubnet - initialize a singleton ip_subnet
+<BR>
+
+ipsec subnettypeof - get address type of an ip_subnet
+<BR>
+
+ipsec masktocount - convert subnet mask to bit count
+<BR>
+
+ipsec networkof - get base address of an ip_subnet
+<BR>
+
+ipsec maskof - get subnet mask of an ip_subnet
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *initsubnet(const ip_address *addr,</B>
+
+<BR>
+&nbsp;
+<B>int maskbits, int clash, ip_subnet *dst);</B>
+
+<BR>
+
+<B>const char *addrtosubnet(const ip_address *addr,</B>
+
+<BR>
+&nbsp;
+<B>ip_subnet *dst);</B>
+
+<P>
+<B>int subnettypeof(const ip_subnet *src);</B>
+
+<BR>
+
+<B>int masktocount(const ip_address *src);</B>
+
+<BR>
+
+<B>void networkof(const ip_subnet *src, ip_address *dst);</B>
+
+<BR>
+
+<B>void maskof(const ip_subnet *src, ip_address *dst);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+library uses an internal type
+<I>ip_subnet</I>
+
+to contain a description of an IP subnet
+(base address plus mask).
+These functions provide basic tools for creating and examining this type.
+<P>
+
+<I>Initsubnet</I>
+
+initializes a variable
+<I>*dst</I>
+
+of type
+<I>ip_subnet</I>
+
+from a base address and
+a count of mask bits.
+The
+<I>clash</I>
+
+parameter specifies what to do if the base address includes
+<B>1</B>
+
+bits outside the prefix specified by the mask
+(that is, in the ``host number'' part of the address):
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT>'0'<DD>
+zero out host-number bits
+<DT>'x'<DD>
+non-zero host-number bits are an error
+</DL>
+</DL>
+
+<P>
+
+<I>Initsubnet</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<P>
+
+<I>Addrtosubnet</I>
+
+initializes an
+<I>ip_subnet</I>
+
+variable
+<I>*dst</I>
+
+to a ``singleton subnet'' containing the single address
+<I>*addr</I>.
+
+It returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure.
+<P>
+
+<I>Subnettypeof</I>
+
+returns the address type of a subnet,
+normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+(The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file arranges to include the necessary headers for these
+names to be known.)
+<P>
+
+<I>Masktocount</I>
+
+converts a subnet mask, expressed as an address, to a bit count
+suitable for use with
+<I>initsubnet</I>.
+
+It returns
+<B>-1</B>
+
+for error; see DIAGNOSTICS.
+<P>
+
+<I>Networkof</I>
+
+fills in
+<I>*dst</I>
+
+with the base address of subnet
+<I>src</I>.
+
+<P>
+
+<I>Maskof</I>
+
+fills in
+<I>*dst</I>
+
+with the subnet mask of subnet
+<I>src</I>,
+
+expressed as an address.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_ttosubnet.3.html">ipsec_ttosubnet</A>(3), <A HREF="ipsec_rangetosubnet.3.html">ipsec_rangetosubnet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>initsubnet</I>
+
+are:
+unknown address family;
+unknown
+<I>clash</I>
+
+value;
+impossible mask bit count;
+non-zero host-number bits and
+<I>clash</I>
+
+is
+<B>'x'</B>.
+
+Fatal errors in
+<I>addrtosubnet</I>
+
+are:
+unknown address family.
+Fatal errors in
+<I>masktocount</I>
+
+are:
+unknown address family;
+mask bits not contiguous.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_masktobits.3.html b/doc/manpage.d/ipsec_masktobits.3.html
new file mode 100644
index 000000000..6eccdd8d5
--- /dev/null
+++ b/doc/manpage.d/ipsec_masktobits.3.html
@@ -0,0 +1,122 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_GOODMASK</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_GOODMASK</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec goodmask - is this Internet subnet mask a valid one?
+<BR>
+
+ipsec masktobits - convert Internet subnet mask to bit count
+<BR>
+
+ipsec bitstomask - convert bit count to Internet subnet mask
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int goodmask(struct in_addr mask);</B>
+
+<BR>
+
+<B>int masktobits(struct in_addr mask);</B>
+
+<BR>
+
+<B>struct in_addr bitstomask(int n);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete;
+see
+<I><A HREF="ipsec_masktocount.3.html">ipsec_masktocount</A></I>(3)
+
+for a partial replacement.
+<P>
+
+<I>Goodmask</I>
+
+reports whether the subnet
+<I>mask</I>
+
+is a valid one,
+i.e. consists of a (possibly empty) sequence of
+<B>1</B>s
+
+followed by a (possibly empty) sequence of
+<B>0</B>s.
+
+<I>Masktobits</I>
+
+takes a (valid) subnet mask and returns the number of
+<B>1</B>
+
+bits in it.
+<I>Bitstomask</I>
+
+reverses this,
+returning the subnet mask corresponding to bit count
+<I>n</I>.
+
+<P>
+
+All masks are in network byte order.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+<I>Masktobits</I>
+
+returns
+<B>-1</B>
+
+for an invalid mask.
+<I>Bitstomask</I>
+
+returns an all-zeros mask for a negative or out-of-range
+<I>n</I>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The error-reporting convention of
+<I>bitstomask</I>
+
+is less than ideal;
+zero is sometimes a legitimate mask.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_masktocount.3.html b/doc/manpage.d/ipsec_masktocount.3.html
new file mode 100644
index 000000000..ea0f83f82
--- /dev/null
+++ b/doc/manpage.d/ipsec_masktocount.3.html
@@ -0,0 +1,238 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_INITSUBNET</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_INITSUBNET</H1>
+Section: C Library Functions (3)<BR>Updated: 12 March 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec initsubnet - initialize an ip_subnet
+<BR>
+
+ipsec addrtosubnet - initialize a singleton ip_subnet
+<BR>
+
+ipsec subnettypeof - get address type of an ip_subnet
+<BR>
+
+ipsec masktocount - convert subnet mask to bit count
+<BR>
+
+ipsec networkof - get base address of an ip_subnet
+<BR>
+
+ipsec maskof - get subnet mask of an ip_subnet
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *initsubnet(const ip_address *addr,</B>
+
+<BR>
+&nbsp;
+<B>int maskbits, int clash, ip_subnet *dst);</B>
+
+<BR>
+
+<B>const char *addrtosubnet(const ip_address *addr,</B>
+
+<BR>
+&nbsp;
+<B>ip_subnet *dst);</B>
+
+<P>
+<B>int subnettypeof(const ip_subnet *src);</B>
+
+<BR>
+
+<B>int masktocount(const ip_address *src);</B>
+
+<BR>
+
+<B>void networkof(const ip_subnet *src, ip_address *dst);</B>
+
+<BR>
+
+<B>void maskof(const ip_subnet *src, ip_address *dst);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+library uses an internal type
+<I>ip_subnet</I>
+
+to contain a description of an IP subnet
+(base address plus mask).
+These functions provide basic tools for creating and examining this type.
+<P>
+
+<I>Initsubnet</I>
+
+initializes a variable
+<I>*dst</I>
+
+of type
+<I>ip_subnet</I>
+
+from a base address and
+a count of mask bits.
+The
+<I>clash</I>
+
+parameter specifies what to do if the base address includes
+<B>1</B>
+
+bits outside the prefix specified by the mask
+(that is, in the ``host number'' part of the address):
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT>'0'<DD>
+zero out host-number bits
+<DT>'x'<DD>
+non-zero host-number bits are an error
+</DL>
+</DL>
+
+<P>
+
+<I>Initsubnet</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<P>
+
+<I>Addrtosubnet</I>
+
+initializes an
+<I>ip_subnet</I>
+
+variable
+<I>*dst</I>
+
+to a ``singleton subnet'' containing the single address
+<I>*addr</I>.
+
+It returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure.
+<P>
+
+<I>Subnettypeof</I>
+
+returns the address type of a subnet,
+normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+(The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file arranges to include the necessary headers for these
+names to be known.)
+<P>
+
+<I>Masktocount</I>
+
+converts a subnet mask, expressed as an address, to a bit count
+suitable for use with
+<I>initsubnet</I>.
+
+It returns
+<B>-1</B>
+
+for error; see DIAGNOSTICS.
+<P>
+
+<I>Networkof</I>
+
+fills in
+<I>*dst</I>
+
+with the base address of subnet
+<I>src</I>.
+
+<P>
+
+<I>Maskof</I>
+
+fills in
+<I>*dst</I>
+
+with the subnet mask of subnet
+<I>src</I>,
+
+expressed as an address.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_ttosubnet.3.html">ipsec_ttosubnet</A>(3), <A HREF="ipsec_rangetosubnet.3.html">ipsec_rangetosubnet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>initsubnet</I>
+
+are:
+unknown address family;
+unknown
+<I>clash</I>
+
+value;
+impossible mask bit count;
+non-zero host-number bits and
+<I>clash</I>
+
+is
+<B>'x'</B>.
+
+Fatal errors in
+<I>addrtosubnet</I>
+
+are:
+unknown address family.
+Fatal errors in
+<I>masktocount</I>
+
+are:
+unknown address family;
+mask bits not contiguous.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_networkof.3.html b/doc/manpage.d/ipsec_networkof.3.html
new file mode 100644
index 000000000..ea0f83f82
--- /dev/null
+++ b/doc/manpage.d/ipsec_networkof.3.html
@@ -0,0 +1,238 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_INITSUBNET</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_INITSUBNET</H1>
+Section: C Library Functions (3)<BR>Updated: 12 March 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec initsubnet - initialize an ip_subnet
+<BR>
+
+ipsec addrtosubnet - initialize a singleton ip_subnet
+<BR>
+
+ipsec subnettypeof - get address type of an ip_subnet
+<BR>
+
+ipsec masktocount - convert subnet mask to bit count
+<BR>
+
+ipsec networkof - get base address of an ip_subnet
+<BR>
+
+ipsec maskof - get subnet mask of an ip_subnet
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *initsubnet(const ip_address *addr,</B>
+
+<BR>
+&nbsp;
+<B>int maskbits, int clash, ip_subnet *dst);</B>
+
+<BR>
+
+<B>const char *addrtosubnet(const ip_address *addr,</B>
+
+<BR>
+&nbsp;
+<B>ip_subnet *dst);</B>
+
+<P>
+<B>int subnettypeof(const ip_subnet *src);</B>
+
+<BR>
+
+<B>int masktocount(const ip_address *src);</B>
+
+<BR>
+
+<B>void networkof(const ip_subnet *src, ip_address *dst);</B>
+
+<BR>
+
+<B>void maskof(const ip_subnet *src, ip_address *dst);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+library uses an internal type
+<I>ip_subnet</I>
+
+to contain a description of an IP subnet
+(base address plus mask).
+These functions provide basic tools for creating and examining this type.
+<P>
+
+<I>Initsubnet</I>
+
+initializes a variable
+<I>*dst</I>
+
+of type
+<I>ip_subnet</I>
+
+from a base address and
+a count of mask bits.
+The
+<I>clash</I>
+
+parameter specifies what to do if the base address includes
+<B>1</B>
+
+bits outside the prefix specified by the mask
+(that is, in the ``host number'' part of the address):
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT>'0'<DD>
+zero out host-number bits
+<DT>'x'<DD>
+non-zero host-number bits are an error
+</DL>
+</DL>
+
+<P>
+
+<I>Initsubnet</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<P>
+
+<I>Addrtosubnet</I>
+
+initializes an
+<I>ip_subnet</I>
+
+variable
+<I>*dst</I>
+
+to a ``singleton subnet'' containing the single address
+<I>*addr</I>.
+
+It returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure.
+<P>
+
+<I>Subnettypeof</I>
+
+returns the address type of a subnet,
+normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+(The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file arranges to include the necessary headers for these
+names to be known.)
+<P>
+
+<I>Masktocount</I>
+
+converts a subnet mask, expressed as an address, to a bit count
+suitable for use with
+<I>initsubnet</I>.
+
+It returns
+<B>-1</B>
+
+for error; see DIAGNOSTICS.
+<P>
+
+<I>Networkof</I>
+
+fills in
+<I>*dst</I>
+
+with the base address of subnet
+<I>src</I>.
+
+<P>
+
+<I>Maskof</I>
+
+fills in
+<I>*dst</I>
+
+with the subnet mask of subnet
+<I>src</I>,
+
+expressed as an address.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_ttosubnet.3.html">ipsec_ttosubnet</A>(3), <A HREF="ipsec_rangetosubnet.3.html">ipsec_rangetosubnet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>initsubnet</I>
+
+are:
+unknown address family;
+unknown
+<I>clash</I>
+
+value;
+impossible mask bit count;
+non-zero host-number bits and
+<I>clash</I>
+
+is
+<B>'x'</B>.
+
+Fatal errors in
+<I>addrtosubnet</I>
+
+are:
+unknown address family.
+Fatal errors in
+<I>masktocount</I>
+
+are:
+unknown address family;
+mask bits not contiguous.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_newhostkey.8.html b/doc/manpage.d/ipsec_newhostkey.8.html
new file mode 100644
index 000000000..e6cf302bf
--- /dev/null
+++ b/doc/manpage.d/ipsec_newhostkey.8.html
@@ -0,0 +1,196 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_NEWHOSTKEY</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_NEWHOSTKEY</H1>
+Section: Maintenance Commands (8)<BR>Updated: 4 March 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec newhostkey - generate a new host authentication key
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>newhostkey</B>
+
+<B>--output</B>
+
+filename
+[
+<B>--quiet</B>
+
+]
+<B>\</B>
+
+<BR>
+
+
+[
+<B>--bits</B>
+
+n
+]
+[
+<B>--hostname</B>
+
+host
+]
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Newhostkey</I>
+
+outputs (into
+<I>filename</I>,
+
+which can be `<B>-</B>' for standard output)
+an RSA private key suitable for this host,
+in
+<I>/etc/ipsec.secrets</I>
+
+format
+(see
+<I><A HREF="ipsec.secrets.5.html">ipsec.secrets</A></I>(5)).
+
+Normally,
+<I>newhostkey</I>
+
+invokes
+<I>rsasigkey</I>
+
+(see
+<I><A HREF="ipsec_rsasigkey.8.html">ipsec_rsasigkey</A></I>(8))
+
+with the
+<B>--verbose</B>
+
+option, so a narrative of what is being done appears on standard error.
+<P>
+
+The
+<B>--output</B>
+
+specifier, although it is syntactically an option and can appear at
+any point among the options (it doesn't have to be first),
+is not optional.
+The specified
+<I>filename</I>
+
+is created under umask
+<B>077</B>
+
+if nonexistent;
+if it already exists and is non-empty,
+a warning message about that is sent to standard error,
+and the output is appended to the file.
+<P>
+
+The
+<B>--quiet</B>
+
+option suppresses both the
+<I>rsasigkey</I>
+
+narrative and the existing-file warning message.
+<P>
+
+The
+<B>--bits</B>
+
+option specifies the number of bits in the key;
+the current default is 2192 and we do not recommend use of anything
+shorter unless unusual constraints demand it.
+<P>
+
+The
+<B>--hostname</B>
+
+option is passed through to
+<I>rsasigkey</I>
+
+to tell it what host name to label the output with
+(via its
+<B>--hostname</B>
+
+option).
+<P>
+
+The output format is that of
+<I>rsasigkey</I>,
+
+with bracketing added to complete the
+<I>ipsec.secrets</I>
+
+format.
+In the usual case, where
+<I>ipsec.secrets</I>
+
+contains only the host's own private key,
+the output of
+<I>newhostkey</I>
+
+is sufficient as a complete
+<I>ipsec.secrets</I>
+
+file.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.secrets.5.html">ipsec.secrets</A>(5), <A HREF="ipsec_rsasigkey.8.html">ipsec_rsasigkey</A>(8)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by Henry Spencer.
+<A NAME="lbAG">&nbsp;</A>
+<H2>BUGS</H2>
+
+As with
+<I>rsasigkey</I>,
+
+the run time is difficult to predict,
+since depletion of the system's randomness pool can cause
+arbitrarily long waits for random bits,
+and the prime-number searches can also take unpredictable
+(and potentially large) amounts of CPU time.
+See
+<I><A HREF="ipsec_rsasigkey.8.html">ipsec_rsasigkey</A></I>(8)
+
+for some typical performance numbers.
+<P>
+
+A higher-level tool which could handle the clerical details
+of changing to a new key would be helpful.
+<P>
+
+The requirement for
+<B>--output</B>
+
+is a blemish,
+but private keys are extremely sensitive information
+and unusual precautions seem justified.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+<DT><A HREF="#lbAG">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_optionsfrom.3.html b/doc/manpage.d/ipsec_optionsfrom.3.html
new file mode 100644
index 000000000..05d045e4d
--- /dev/null
+++ b/doc/manpage.d/ipsec_optionsfrom.3.html
@@ -0,0 +1,275 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_OPTIONSFROM</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_OPTIONSFROM</H1>
+Section: C Library Functions (3)<BR>Updated: 16 Oct 1998<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec optionsfrom - read additional ``command-line'' options from file
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *optionsfrom(char *filename, int *argcp,</B>
+
+<BR>
+&nbsp;
+<B>char ***argvp, int optind, FILE *errsto);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Optionsfrom</I>
+
+is called from within a
+<I><A HREF="getopt_long.3.html">getopt_long</A></I>(3)
+
+scan,
+as the result of the appearance of an option (preferably
+<B>--optionsfrom</B>)
+
+to insert additional ``command-line'' arguments
+into the scan immediately after
+the option.
+Typically this would be done to pick up options which are
+security-sensitive and should not be visible to
+<I><A HREF="ps.1.html">ps</A></I>(1)
+
+and similar commands,
+and hence cannot be supplied as part
+of the actual command line or the environment.
+<P>
+
+<I>Optionsfrom</I>
+
+reads the additional arguments from the specified
+<I>filename</I>,
+
+allocates a new argument vector to hold pointers to the existing
+arguments plus the new ones,
+and amends
+<I>argc</I>
+
+and
+<I>argv</I>
+
+(via the pointers
+<I>argcp</I>
+
+and
+<I>argvp</I>,
+
+which must point to the
+<I>argc</I>
+
+and
+<I>argv</I>
+
+being supplied to
+<I><A HREF="getopt_long.3.html">getopt_long</A></I>(3))
+
+accordingly.
+<I>Optind</I>
+
+must be the index, in the original argument vector,
+of the next argument.
+<P>
+
+If
+<I>errsto</I>
+
+is NULL,
+<I>optionsfrom</I>
+
+returns NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+If
+<I>errsto</I>
+
+is non-NULL and an error occurs,
+<I>optionsfrom</I>
+
+prints a suitable complaint onto the
+<I>errsto</I>
+
+descriptor and invokes
+<I>exit</I>
+
+with an exit status of 2;
+this is a convenience for cases where more sophisticated
+responses are not required.
+<P>
+
+The text of existing arguments is not disturbed by
+<I>optionsfrom</I>,
+
+so pointers to them and into them remain valid.
+<P>
+
+The file of additional arguments is an ASCII text file.
+Lines consisting solely of white space,
+and lines beginning with
+<B>#</B>,
+
+are comments and are ignored.
+Otherwise, a line which does not begin with
+<B>-</B>
+
+is taken to be a single argument;
+if it both begins and ends with double-quote (&quot;),
+those quotes are stripped off (note, no other processing is done within
+the line!).
+A line beginning with
+<B>-</B>
+
+is considered to contain multiple arguments separated by white space.
+<P>
+
+Because
+<I>optionsfrom</I>
+
+reads its entire file before the
+<I><A HREF="getopt_long.3.html">getopt_long</A></I>(3)
+
+scan is resumed, an
+<I>optionsfrom</I>
+
+file can contain another
+<B>--optionsfrom</B>
+
+option.
+Obviously, infinite loops are possible here.
+If
+<I>errsto</I>
+
+is non-NULL,
+<I>optionsfrom</I>
+
+considers it an error to be called more than 100 times.
+If
+<I>errsto</I>
+
+is NULL,
+loop detection is up to the caller
+(and the internal loop counter is zeroed out).
+<A NAME="lbAE">&nbsp;</A>
+<H2>EXAMPLE</H2>
+
+A reasonable way to invoke
+<I>optionsfrom</I>
+
+would be like so:
+<P>
+
+<PRE>
+<B>#include &lt;<A HREF="file:/usr/include/getopt.h">getopt.h</A>&gt;
+
+struct option opts[] = {
+ /* ... */
+ &quot;optionsfrom&quot;, 1, NULL, '+',
+ /* ... */
+};
+
+int
+main(argc, argv)
+int argc;
+char *argv[];
+{
+ int opt;
+ extern char *optarg;
+ extern int optind;
+
+ while ((opt = getopt_long(argc, argv, &quot;&quot;, opts, NULL)) != EOF)
+ switch (opt) {
+ /* ... */
+ case '+': /* optionsfrom */
+ optionsfrom(optarg, &amp;argc, &amp;argv, optind, stderr);
+ /* does not return on error */
+ break;
+ /* ... */
+ }
+ /* ... */
+</B></PRE>
+
+<A NAME="lbAF">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="getopt_long.3.html">getopt_long</A>(3)
+<A NAME="lbAG">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Errors in
+<I>optionsfrom</I>
+
+are:
+unable to open file;
+attempt to allocate temporary storage for argument or
+argument vector failed;
+read error in file;
+line too long.
+<A NAME="lbAH">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAI">&nbsp;</A>
+<H2>BUGS</H2>
+
+The double-quote convention is rather simplistic.
+<P>
+
+Line length is currently limited to 1023 bytes,
+and there is no continuation convention.
+<P>
+
+The restriction of error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+<P>
+
+There is a certain element of unwarranted chumminess with
+the insides of
+<I><A HREF="getopt_long.3.html">getopt_long</A></I>(3)
+
+here.
+No non-public interfaces are actually used, but
+<I>optionsfrom</I>
+
+does rely on
+<I><A HREF="getopt_long.3.html">getopt_long</A></I>(3)
+
+being well-behaved in certain ways that are not actually
+promised by the specs.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">EXAMPLE</A><DD>
+<DT><A HREF="#lbAF">SEE ALSO</A><DD>
+<DT><A HREF="#lbAG">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAH">HISTORY</A><DD>
+<DT><A HREF="#lbAI">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_pf_key.5.html b/doc/manpage.d/ipsec_pf_key.5.html
new file mode 100644
index 000000000..420c12900
--- /dev/null
+++ b/doc/manpage.d/ipsec_pf_key.5.html
@@ -0,0 +1,176 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_PF_KEY</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_PF_KEY</H1>
+Section: File Formats (5)<BR>Updated: 29 Jun 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec_pf_key - lists PF_KEY sockets registered with KLIPS
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>cat</B>
+
+<B>/proc/net/pf_key</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>/proc/net/pf_key</I>
+
+is a read-only file which lists the presently open PF_KEY sockets on the
+local system and their parameters.
+<P>
+
+Each line lists one PF_KEY socket.
+A table entry consists of:
+<DL COMPACT>
+<DT>+<DD>
+sock pointer (sock)
+<DT>+<DD>
+PID of the socket owner (pid)
+<DT>+<DD>
+flag to indicate if the socket is dead (d)
+<DT>+<DD>
+socket wait queue (sleep)
+<DT>+<DD>
+socket pointer (socket)
+<DT>+<DD>
+next socket in chain (next)
+<DT>+<DD>
+previous socket in chain (prev)
+<DT>+<DD>
+last socket error (e)
+<DT>+<DD>
+pointer to destruct routine (destruct)
+<DT>+<DD>
+is this a reused socket (r)
+<DT>+<DD>
+has this socket been zapped (z)
+<DT>+<DD>
+socket family to which this socket belongs (fa)
+<DT>+<DD>
+local port number (n)
+<DT>+<DD>
+protocol version number (p)
+<DT>+<DD>
+Receive queue bytes committed (r)
+<DT>+<DD>
+Transmit queue bytes committed (w)
+<DT>+<DD>
+option memory allocations (o)
+<DT>+<DD>
+size of send buffer in bytes (sndbf)
+<DT>+<DD>
+timestamp in seconds (stamp)
+<DT>+<DD>
+socket flags (Flags)
+<DT>+<DD>
+socket type (Type)
+<DT>+<DD>
+connection state (St)
+<B>.SH</B>EXAMPLES
+
+<DT>
+<DD>
+<DT><B>c3b8c140 3553 0 c0599818 c05997fc 0 0 0 0 1 0 15 0 2 0 0 0 65535 0.103232 00000000 00000003 01</B>
+
+<DD>
+</DL>
+<P>
+
+shows that there is one pf_key socket set up that starts at
+<B>c3b8c140</B>,
+
+whose owning process has PID
+<B>3553</B>,
+
+the socket is not dead, its wait queue is at
+<B>c0599818</B>,
+
+whose owning socket is at
+<B>c05997fc</B>,
+
+with no other sockets in the chain, no errors, no destructor, it is a
+reused socket which has not been zapped, from protocol family
+<B>15</B>
+
+(PF_KEY), local port number
+<B>0</B>,
+
+protocol socket version
+<B>2</B>,
+
+no memory allocated to transmit, receive or option queues, a send buffer
+of almost
+<B>64kB</B>,
+
+a timestamp of
+<B>0.103232</B>,
+
+no flags set, type
+<B>3</B>,
+
+in state
+<B>1</B>.
+
+<A NAME="lbAE">&nbsp;</A>
+<H2>FILES</H2>
+
+/proc/net/pf_key
+<A NAME="lbAF">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8), <A HREF="ipsec_eroute.5.html">ipsec_eroute</A>(5), <A HREF="ipsec_spi.5.html">ipsec_spi</A>(5),
+<A HREF="ipsec_spigrp.5.html">ipsec_spigrp</A>(5), <A HREF="ipsec_klipsdebug.5.html">ipsec_klipsdebug</A>(5), <A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A>(8), <A HREF="ipsec_version.5.html">ipsec_version</A>(5)
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Richard Guy Briggs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">FILES</A><DD>
+<DT><A HREF="#lbAF">SEE ALSO</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_pf_key.8.html b/doc/manpage.d/ipsec_pf_key.8.html
new file mode 100644
index 000000000..e40cfb15b
--- /dev/null
+++ b/doc/manpage.d/ipsec_pf_key.8.html
@@ -0,0 +1,122 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_PF_KEY</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_PF_KEY</H1>
+Section: User Commands (1)<BR>Updated: 17 Oct 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+pf_key - shows pfkey messages emitted by the kernel
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>pf_key</B>
+
+<B>--ah</B>
+
+<B>--esp</B>
+
+<B>--ipip</B>
+
+<B>--ipcomp</B>
+
+<B>--daemon </B>
+
+<I>file</I>
+
+<B>hmac-md5-96</B>|<B>hmac-sha1-96</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<B>pf_key</B>
+
+is a program to open a PF_KEY socket and print all messages that are received
+from it. With no options, it will register itself to receive key requests for
+AH, ESP, IPIP and IPCOMP security associations. If given more specific
+options, then it will listen only to those protocols which are listed.
+<P>
+
+If the messages are recognized, the messages will be decoded.
+<P>
+
+If the option
+<B>--daemon</B>
+
+is provided, then after doing the registrations, the program will fork
+into the background. The provided file will be opened and the process ID of
+the background process will be written to it. This option is present to
+present race conditions in regression testing.
+<A NAME="lbAE">&nbsp;</A>
+<H2>EXAMPLES</H2>
+
+<DL COMPACT>
+<DT>
+<DD>
+</DL>
+<A NAME="lbAF">&nbsp;</A>
+<H2>FILES</H2>
+
+/proc/net/pf_key
+<A NAME="lbAG">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="pf_key.5.html">pf_key</A>(5), <A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8), <A HREF="ipsec_eroute.5.html">ipsec_eroute</A>(5), <A HREF="ipsec_spi.5.html">ipsec_spi</A>(5),
+<A HREF="ipsec_spigrp.5.html">ipsec_spigrp</A>(5), <A HREF="ipsec_klipsdebug.5.html">ipsec_klipsdebug</A>(5), <A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A>(8), <A HREF="ipsec_version.5.html">ipsec_version</A>(5)
+<A NAME="lbAH">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Michael Richardson &lt;<A HREF="mailto:mcr@freeswan.org">mcr@freeswan.org</A>&gt;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">EXAMPLES</A><DD>
+<DT><A HREF="#lbAF">FILES</A><DD>
+<DT><A HREF="#lbAG">SEE ALSO</A><DD>
+<DT><A HREF="#lbAH">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_pluto.8.html b/doc/manpage.d/ipsec_pluto.8.html
new file mode 100644
index 000000000..2e2ce4c2f
--- /dev/null
+++ b/doc/manpage.d/ipsec_pluto.8.html
@@ -0,0 +1,1824 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_PLUTO</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_PLUTO</H1>
+Section: Maintenance Commands (8)<BR>Updated: 28 March 1999<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec pluto - IPsec IKE keying daemon
+<BR>
+
+ipsec whack - control interface for IPSEC keying daemon
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+
+
+<DL COMPACT>
+<DT>
+<B>
+<DD>ipsec pluto
+[--help]
+[--version]
+[--optionsfrom&nbsp;</B><I>filename</I>]
+[--nofork]
+[--stderrlog]
+[--noklips]
+[--uniqueids]
+[<B>--interface</B> <I>interfacename</I>]
+[--ikeport&nbsp;<I>portnumber</I>]
+[--ctlbase&nbsp;<I>path</I>]
+[--secretsfile&nbsp;<I>secrets-file</I>]
+[--adns <I>pathname</I>]
+[--lwdnsq <I>pathname</I>]
+[--perpeerlog]
+[--perpeerlogbase&nbsp;<I>dirname</I>]
+[--debug-none]
+[--debug-all]
+[--debug-raw]
+[--debug-crypt]
+[--debug-parsing]
+[--debug-emitting]
+[--debug-control]
+[--debug-lifecycle]
+[--debug-klips]
+[--debug-dns]
+[--debug-oppo]
+[--debug-private]
+<DT>
+<B>
+<DD>ipsec whack
+[--help]
+[--version]
+<DT>
+
+<DD>ipsec whack
+--name&nbsp;</B><I>connection-name</I>
+<BR>
+
+[--id&nbsp;<I>id</I>] [--host&nbsp;<I>ip-address</I>]
+[--ikeport&nbsp;<I>port-number</I>]
+[--nexthop&nbsp;<I>ip-address</I>]
+[--client&nbsp;<I>subnet</I>]
+[--dnskeyondemand]
+[--updown&nbsp;<I>updown</I>]
+<BR>
+
+--to
+<BR>
+
+[--id&nbsp;<I>id</I>]
+[--host&nbsp;<I>ip-address</I>]
+[--ikeport&nbsp;<I>port-number</I>]
+[--nexthop&nbsp;<I>ip-address</I>]
+[--client&nbsp;<I>subnet</I>]
+[--dnskeyondemand]
+[--updown&nbsp;<I>updown</I>]
+<BR>
+
+[--psk]
+[--rsasig]
+[--encrypt]
+[--authenticate]
+[--compress]
+[--tunnel]
+[--pfs]
+[--disablearrivalcheck]
+[--ipv4]
+[--ipv6]
+[--tunnelipv4]
+[--tunnelipv6]
+[--ikelifetime&nbsp;<I>seconds</I>]
+[--ipseclifetime&nbsp;<I>seconds</I>]
+[--rekeymargin&nbsp;<I>seconds</I>]
+[--rekeyfuzz&nbsp;<I>percentage</I>]
+[--keyingtries&nbsp;<I>count</I>]
+[--dontrekey]
+[--delete]
+[--ctlbase&nbsp;<I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+--keyid&nbsp;</B><I>id</I>
+[--addkey]
+[--pubkeyrsa&nbsp;<I>key</I>]
+[--ctlbase&nbsp;<I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+--myid&nbsp;</B><I>id</I>
+<DT>
+<B>
+<DD>ipsec whack
+--listen|--unlisten
+[--ctlbase&nbsp;</B><I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+--route|--unroute
+--name&nbsp;</B><I>connection-name</I>
+[--ctlbase&nbsp;<I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+--initiate|--terminate
+--name&nbsp;</B><I>connection-name</I>
+[--asynchronous]
+[--ctlbase&nbsp;<I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+[--tunnelipv4]
+[--tunnelipv6]
+--oppohere </B><I>ip-address</I>
+--oppothere <I>ip-address</I>
+<DT>
+<B>
+<DD>ipsec whack
+--delete
+--name&nbsp;</B><I>connection-name</I>
+[--ctlbase&nbsp;<I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+--deletestate&nbsp;</B><I>state-number</I>
+[--ctlbase&nbsp;<I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+[--name&nbsp;</B><I>connection-name</I>]
+[--debug-none]
+[--debug-all]
+[--debug-raw]
+[--debug-crypt]
+[--debug-parsing]
+[--debug-emitting]
+[--debug-control]
+[--debug-lifecycle]
+[--debug-klips]
+[--debug-dns]
+[--debug-oppo]
+[--debug-private]
+[--ctlbase&nbsp;<I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+--status
+[--ctlbase&nbsp;</B><I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+--shutdown
+[--ctlbase&nbsp;</B><I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+
+
+
+</DL>
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<B>pluto</B>
+
+is an IKE (``IPsec Key Exchange'') daemon.
+<B>whack</B>
+
+is an auxiliary program to allow requests to be made to a running
+<B>pluto</B>.
+
+<P>
+
+<B>pluto</B>
+
+is used to automatically build shared ``security associations'' on a
+system that has IPsec, the secure IP protocol.
+In other words,
+<B>pluto</B>
+
+can eliminate much of the work of manual keying.
+The actual
+secure transmission of packets is the responsibility of other parts of
+the system (see
+<B>KLIPS</B>,
+
+the companion implementation of IPsec).
+<I><A HREF="ipsec_auto.8.html">ipsec_auto</A></I>(8) provides a more convenient interface to
+<B>pluto</B> and <B>whack</B>.
+<A NAME="lbAE">&nbsp;</A>
+<H3>IKE's Job</H3>
+
+<P>
+
+A <I>Security Association</I> (<I>SA</I>) is an agreement between two network nodes on
+how to process certain traffic between them. This processing involves
+encapsulation, authentication, encryption, or compression.
+<P>
+
+IKE can be deployed on a network node to negotiate Security
+Associations for that node. These IKE implementations can only
+negotiate with other IKE implementations, so IKE must be on each node
+that is to be an endpoint of an IKE-negotiated Security Association.
+No other nodes need to be running IKE.
+<P>
+
+An IKE instance (i.e. an IKE implementation on a particular network
+node) communicates with another IKE instance using UDP IP packets, so
+there must be a route between the nodes in each direction.
+<P>
+
+The negotiation of Security Associations requires a number of choices
+that involve tradeoffs between security, convenience, trust, and
+efficiency. These are policy issues and are normally specified to the
+IKE instance by the system administrator.
+<P>
+
+IKE deals with two kinds of Security Associations. The first part of
+a negotiation between IKE instances is to build an ISAKMP SA. An
+ISAKMP SA is used to protect communication between the two IKEs.
+IPsec SAs can then be built by the IKEs - these are used to carry
+protected IP traffic between the systems.
+<P>
+
+The negotiation of the ISAKMP SA is known as Phase 1. In theory,
+Phase 1 can be accomplished by a couple of different exchange types,
+but we only implement one called Main Mode (we don't implement
+Aggressive Mode).
+<P>
+
+Any negotiation under the protection of an ISAKMP SA, including the
+negotiation of IPsec SAs, is part of Phase 2. The exchange type
+that we use to negotiate an IPsec SA is called Quick Mode.
+<P>
+
+IKE instances must be able to authenticate each other as part of their
+negotiation of an ISAKMP SA. This can be done by several mechanisms
+described in the draft standards.
+<P>
+
+IKE negotiation can be initiated by any instance with any other. If
+both can find an agreeable set of characteristics for a Security
+Association, and both recognize each others authenticity, they can set
+up a Security Association. The standards do not specify what causes
+an IKE instance to initiate a negotiation.
+<P>
+
+In summary, an IKE instance is prepared to automate the management of
+Security Associations in an IPsec environment, but a number of issues
+are considered policy and are left in the system administrator's hands.
+<A NAME="lbAF">&nbsp;</A>
+<H3>Pluto</H3>
+
+<P>
+
+<B>pluto</B> is an implementation of IKE. It runs as a daemon on a network
+node. Currently, this network node must be a LINUX system running the
+<B>KLIPS</B> implementation of IPsec.
+<P>
+
+<B>pluto</B> only implements a subset of IKE. This is enough for it to
+interoperate with other instances of <B>pluto</B>, and many other IKE
+implementations. We are working on implementing more of IKE.
+<P>
+
+The policy for acceptable characteristics for Security Associations is
+mostly hardwired into the code of <B>pluto</B> (spdb.c). Eventually
+this will be moved into a security policy database with reasonable
+expressive power and more convenience.
+<P>
+
+<B>pluto</B> uses shared secrets or RSA signatures to authenticate
+peers with whom it is negotiating.
+<P>
+
+<B>pluto</B> initiates negotiation of a Security Association when it is
+manually prodded: the program <B>whack</B> is run to trigger this.
+It will also initiate a negotiation when <B>KLIPS</B> traps an outbound packet
+for Opportunistic Encryption.
+<P>
+
+<B>pluto</B> implements ISAKMP SAs itself. After it has negotiated the
+characteristics of an IPsec SA, it directs <B>KLIPS</B> to implement it.
+It also invokes a script to adjust any firewall and issue <I><A HREF="route.8.html">route</A></I>(8)
+commands to direct IP packets through <B>KLIPS</B>.
+<P>
+
+When <B>pluto</B> shuts down, it closes all Security Associations.
+<A NAME="lbAG">&nbsp;</A>
+<H3>Before Running Pluto</H3>
+
+<P>
+
+<B>pluto</B> runs as a daemon with userid root. Before running it, a few
+things must be set up.
+<P>
+
+<B>pluto</B> requires <B>KLIPS</B>, the FreeS/WAN implementation of IPsec.
+All of the components of <B>KLIPS</B> and <B>pluto</B> should be installed.
+<P>
+
+<B>pluto</B> supports multiple public networks (that is, networks
+that are considered insecure and thus need to have their traffic
+encrypted or authenticated). It discovers the
+public interfaces to use by looking at all interfaces that are
+configured (the <B>--interface</B> option can be used to limit
+the interfaces considered).
+It does this only when <B>whack</B> tells it to --listen,
+so the interfaces must be configured by then. Each interface with a name of the form
+<B>ipsec</B>[<B>0</B>-<B>9</B>] is taken as a <B>KLIPS</B> virtual public interface.
+Another network interface with the same IP address (there should be only
+one) is taken as the corresponding real public
+interface. <I><A HREF="ifconfig.8.html">ifconfig</A></I>(8) with the <B>-a</B> flag will show
+the name and status of each network interface.
+<P>
+
+<B>pluto</B> requires a database of preshared secrets and RSA private keys.
+This is described in the
+<I><A HREF="ipsec.secrets.5.html">ipsec.secrets</A></I>(5).
+
+<B>pluto</B> is told of RSA public keys via <B>whack</B> commands.
+If the connection is Opportunistic, and no RSA public key is known,
+<B>pluto</B> will attempt to fetch RSA keys using the Domain Name System.
+<A NAME="lbAH">&nbsp;</A>
+<H3>Setting up <B>KLIPS</B> for <B>pluto</B></H3>
+
+<P>
+
+The most basic network topology that <B>pluto</B> supports has two security
+gateways negotiating on behalf of client subnets. The diagram of RGB's
+testbed is a good example (see <I>klips/doc/rgb_setup.txt</I>).
+<P>
+
+The file <I>INSTALL</I> in the base directory of this distribution
+explains how to start setting up the whole system, including <B>KLIPS</B>.
+<P>
+
+Make sure that the security gateways have routes to each other. This
+is usually covered by the default route, but may require issuing
+<I><A HREF="route.8.html">route</A></I>(8)
+
+commands. The route must go through a particular IP
+interface (we will assume it is <I>eth0</I>, but it need not be). The
+interface that connects the security gateway to its client must be a
+different one.
+<P>
+
+It is necessary to issue a
+<I><A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A></I>(8)
+
+command on each gateway. The required command is:
+<P>
+&nbsp;&nbsp;&nbsp;ipsec tncfg --attach&nbsp;--virtual&nbsp;ipsec0 --physical&nbsp;eth0
+<P>
+A command to set up the ipsec0 virtual interface will also need to be
+run. It will have the same parameters as the command used to set up
+the physical interface to which it has just been connected using
+<I><A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A></I>(8).
+
+<A NAME="lbAI">&nbsp;</A>
+<H3>ipsec.secrets file</H3>
+
+<P>
+
+A <B>pluto</B> daemon and another IKE daemon (for example, another instance
+of <B>pluto</B>) must convince each other that they are who they are supposed
+to be before any negotiation can succeed. This authentication is
+accomplished by using either secrets that have been shared beforehand
+(manually) or by using RSA signatures. There are other techniques,
+but they have not been implemented in <B>pluto</B>.
+<P>
+
+The file <I>/etc/ipsec.secrets</I> is used to keep preshared secret keys
+and RSA private keys for
+authentication with other IKE daemons. For debugging, there is an
+argument to the <B>pluto</B> command to use a different file.
+This file is described in
+<I><A HREF="ipsec.secrets.5.html">ipsec.secrets</A></I>(5).
+
+<A NAME="lbAJ">&nbsp;</A>
+<H3>Running Pluto</H3>
+
+<P>
+
+To fire up the daemon, just type <B>pluto</B> (be sure to be running as
+the superuser).
+The default IKE port number is 500, the UDP port assigned by IANA for IKE Daemons.
+<B>pluto</B> must be run by the superuser to be able to use the UDP 500 port.
+<P>
+
+<B>pluto</B> attempts to create a lockfile with the name
+<I>/var/run/pluto.pid</I>. If the lockfile cannot be created,
+<B>pluto</B> exits - this prevents multiple <B>pluto</B>s from
+competing Any ``leftover'' lockfile must be removed before
+<B>pluto</B> will run. <B>pluto</B> writes its pid into this file so
+that scripts can find it. This lock will not function properly if it
+is on an NFS volume (but sharing locks on multiple machines doesn't
+make sense anyway).
+<P>
+
+<B>pluto</B> then forks and the parent exits. This is the conventional
+``daemon fork''. It can make debugging awkward, so there is an option
+to suppress this fork.
+<P>
+
+All logging, including diagnostics, is sent to
+<I><A HREF="syslog.3.html">syslog</A></I>(3)
+
+with facility=authpriv;
+it decides where to put these messages (possibly in /var/log/secure).
+Since this too can make debugging awkward, there is an option to
+steer logging to stderr.
+<P>
+
+If the <B>--perpeerlog</B> option is given, then pluto will open
+a log file per connection. By default, this is in /var/log/pluto/peer,
+in a subdirectory formed by turning all dot (.) [IPv4} or colon (:)
+[IPv6] into slashes (/).
+<P>
+
+The base directory can be changed with the <B>--perpeerlogbase</B>.
+<P>
+
+Once <B>pluto</B> is started, it waits for requests from <B>whack</B>.
+<A NAME="lbAK">&nbsp;</A>
+<H3>Pluto's Internal State</H3>
+
+<P>
+
+To understand how to use <B>pluto</B>, it is helpful to understand a little
+about its internal state. Furthermore, the terminology is needed to decipher
+some of the diagnostic messages.
+<P>
+
+The <I>(potential) connection</I> database describes attributes of a
+connection. These include the IP addresses of the hosts and client
+subnets and the security characteristics desired. <B>pluto</B>
+requires this information (simply called a connection) before it can
+respond to a request to build an SA. Each connection is given a name
+when it is created, and all references are made using this name.
+<P>
+
+During the IKE exchange to build an SA, the information about the
+negotiation is represented in a <I>state object</I>. Each state object
+reflects how far the negotiation has reached. Once the negotiation is
+complete and the SA established, the state object remains to represent
+the SA. When the SA is terminated, the state object is discarded.
+Each State object is given a serial number and this is used to refer
+to the state objects in logged messages.
+<P>
+
+Each state object corresponds to a connection and can be thought of
+as an instantiation of that connection.
+At any particular time, there may be any number of state objects
+corresponding to a particular connection.
+Often there is one representing an ISAKMP SA and another representing
+an IPsec SA.
+<P>
+
+<B>KLIPS</B> hooks into the routing code in a LINUX kernel.
+Traffic to be processed by an IPsec SA must be directed through
+<B>KLIPS</B> by routing commands. Furthermore, the processing to be
+done is specified by <I>ipsec <A HREF="eroute.8.html">eroute</A>(8)</I> commands.
+<B>pluto</B> takes the responsibility of managing both of these special
+kinds of routes.
+<P>
+
+Each connection may be routed, and must be while it has an IPsec SA.
+The connection specifies the characteristics of the route: the
+interface on this machine, the ``gateway'' (the nexthop),
+and the peer's client subnet. Two
+connections may not be simultaneously routed if they are for the same
+peer's client subnet but use different interfaces or gateways
+(<B>pluto</B>'s logic does not reflect any advanced routing capabilities).
+<P>
+
+Each eroute is associated with the state object for an IPsec SA
+because it has the particular characteristics of the SA.
+Two eroutes conflict if they specify the identical local
+and remote clients (unlike for routes, the local clients are
+taken into account).
+<P>
+
+When <B>pluto</B> needs to install a route for a connection,
+it must make sure that no conflicting route is in use. If another
+connection has a conflicting route, that route will be taken down, as long
+as there is no IPsec SA instantiating that connection.
+If there is such an IPsec SA, the attempt to install a route will fail.
+<P>
+
+There is an exception. If <B>pluto</B>, as Responder, needs to install
+a route to a fixed client subnet for a connection, and there is
+already a conflicting route, then the SAs using the route are deleted
+to make room for the new SAs. The rationale is that the new
+connection is probably more current. The need for this usually is a
+product of Road Warrior connections (these are explained later; they
+cannot be used to initiate).
+<P>
+
+When <B>pluto</B> needs to install an eroute for an IPsec SA (for a
+state object), first the state object's connection must be routed (if
+this cannot be done, the eroute and SA will not be installed).
+If a conflicting eroute is already in place for another connection,
+the eroute and SA will not be installed (but note that the routing
+exception mentioned above may have already deleted potentially conflicting SAs).
+If another IPsec
+SA for the same connection already has an eroute, all its outgoing traffic
+is taken over by the new eroute. The incoming traffic will still be
+processed. This characteristic is exploited during rekeying.
+<P>
+
+All of these routing characteristics are expected change when
+<B>KLIPS</B> is modified to use the firewall hooks in the LINUX 2.4.x
+kernel.
+<A NAME="lbAL">&nbsp;</A>
+<H3>Using Whack</H3>
+
+<P>
+
+<B>whack</B> is used to command a running <B>pluto</B>.
+<B>whack</B> uses a UNIX domain socket to speak to <B>pluto</B>
+(by default, <I>/var/pluto.ctl</I>).
+<P>
+
+<B>whack</B> has an intricate argument syntax.
+This syntax allows many different functions to be specified.
+The help form shows the usage or version information.
+The connection form gives <B>pluto</B> a description of a potential connection.
+The public key form informs <B>pluto</B> of the RSA public key for a potential peer.
+The delete form deletes a connection description and all SAs corresponding
+to it.
+The listen form tells <B>pluto</B> to start or stop listening on the public interfaces
+for IKE requests from peers.
+The route form tells <B>pluto</B> to set up routing for a connection;
+the unroute form undoes this.
+The initiate form tells <B>pluto</B> to negotiate an SA corresponding to a connection.
+The terminate form tells <B>pluto</B> to remove all SAs corresponding to a connection,
+including those being negotiated.
+The status form displays the <B>pluto</B>'s internal state.
+The debug form tells <B>pluto</B> to change the selection of debugging output
+``on the fly''. The shutdown form tells
+<B>pluto</B> to shut down, deleting all SAs.
+<P>
+
+Most options are specific to one of the forms, and will be described
+with that form. There are three options that apply to all forms.
+<DL COMPACT>
+<DT><B>--ctlbase</B>&nbsp;<I>path</I><DD>
+<I>path</I>.ctl is used as the UNIX domain socket for talking
+to <B>pluto</B>.
+This option facilitates debugging.
+<DT><B>--optionsfrom</B>&nbsp;<I>filename</I><DD>
+adds the contents of the file to the argument list.
+<DT><B>--label</B>&nbsp;<I>string</I><DD>
+adds the string to all error messages generated by <B>whack</B>.
+</DL>
+<P>
+
+The help form of <B>whack</B> is self-explanatory.
+<DL COMPACT>
+<DT><B>--help</B><DD>
+display the usage message.
+<DT><B>--version</B><DD>
+display the version of <B>whack</B>.
+</DL>
+<P>
+
+The connection form describes a potential connection to <B>pluto</B>.
+<B>pluto</B> needs to know what connections can and should be negotiated.
+When <B>pluto</B> is the initiator, it needs to know what to propose.
+When <B>pluto</B> is the responder, it needs to know enough to decide whether
+is is willing to set up the proposed connection.
+<P>
+
+The description of a potential connection can specify a large number
+of details. Each connection has a unique name. This name will appear
+in a updown shell command, so it should not contain punctuation
+that would make the command ill-formed.
+<DL COMPACT>
+<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
+</DL>
+<P>
+
+The topology of
+a connection is symmetric, so to save space here is half a picture:
+<P>
+&nbsp;&nbsp;&nbsp;client_subnet&lt;--&gt;host:ikeport&lt;--&gt;nexthop&lt;---
+<P>
+A similar trick is used in the flags. The same flag names are used for
+both ends. Those before the <B>--to</B> flag describe the left side
+and those afterwards describe the right side. When <B>pluto</B> attempts
+to use the connection, it decides whether it is the left side or the right
+side of the connection, based on the IP numbers of its interfaces.
+<DL COMPACT>
+<DT><B>--id</B>&nbsp;<I>id</I><DD>
+the identity of the end. Currently, this can be an IP address (specified
+as dotted quad or as a Fully Qualified Domain Name, which will be resolved
+immediately) or as a Fully Qualified Domain Name itself (prefixed by ``@''
+to signify that it should not be resolved), or as <A HREF="mailto:user@FQDN">user@FQDN</A>, or as the
+magic value <B>%myid</B>.
+<B>Pluto</B> only authenticates the identity, and does not use it for
+addressing, so, for example, an IP address need not be the one to which
+packets are to be sent. If the option is absent, the
+identity defaults to the IP address specified by <B>--host</B>.
+<B>%myid</B> allows the identity to be separately specified (by the <B>pluto</B> or <B>whack</B> option <B>--myid</B>
+or by the <B><A HREF="ipsec.conf.5.html">ipsec.conf</A></B>(5) <B>config setup</B> parameter myid).
+Otherwise, <B>pluto</B> tries to guess what <B>%myid</B> should stand for:
+the IP address of <B>%defaultroute</B>, if it is supported by a suitable TXT record in the reverse domain for that IP address,
+or the system's hostname, if it is supported by a suitable TXT record in its forward domain.
+
+<DT><B>--host</B>&nbsp;<I>ip-address</I><DD>
+<DT><B>--host</B>&nbsp;<B>%any</B><DD>
+<DT><B>--host</B>&nbsp;<B>%opportunistic</B><DD>
+the IP address of the end (generally the public interface).
+If <B>pluto</B> is to act as a responder
+for IKE negotiations initiated from unknown IP addresses (the
+``Road Warrior'' case), the
+IP address should be specified as <B>%any</B> (currently,
+the obsolete notation <B>0.0.0.0</B> is also accepted for this).
+If <B>pluto</B> is to opportunistically initiate the connection,
+use <B>%opportunistic</B>
+<DT><B>--ikeport</B>&nbsp;<I>port-number</I><DD>
+the UDP port that IKE listens to on that host. The default is 500.
+(<B>pluto</B> on this machine uses the port specified by its own command
+line argument, so this only affects where <B>pluto</B> sends messages.)
+<DT><B>--nexthop</B>&nbsp;<I>ip-address</I><DD>
+where to route packets for the peer's client (presumably for the peer too,
+but it will not be used for this).
+When <B>pluto</B> installs an IPsec SA, it issues a route command.
+It uses the nexthop as the gateway.
+The default is the peer's IP address (this can be explicitly written as
+<B>%direct</B>; the obsolete notation <B>0.0.0.0</B> is accepted).
+This option is necessary if <B>pluto</B>'s host's interface used for sending
+packets to the peer is neither point-to-point nor directly connected to the
+peer.
+<DT><B>--client</B>&nbsp;<I>subnet</I><DD>
+the subnet for which the IPsec traffic will be destined. If not specified,
+the host will be the client.
+The subnet can be specified in any of the forms supported by <I><A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A></I>(3).
+The general form is <I>address</I>/<I>mask</I>. The <I>address</I> can be either
+a domain name or four decimal numbers (specifying octets) separated by dots.
+The most convenient form of the <I>mask</I> is a decimal integer, specifying
+the number of leading one bits in the mask. So, for example, 10.0.0.0/8
+would specify the class A network ``Net 10''.
+<DT><B>--dnskeyondemand]</B><DD>
+specifies that when an RSA public key is needed to authenticate this
+host, and it isn't already known, fetch it from DNS.
+<DT><B>--updown</B>&nbsp;<I>updown</I><DD>
+specifies an external shell command to be run whenever <B>pluto</B>
+brings up or down a connection.
+The script is used to build a shell command, so it may contain positional
+parameters, but ought not to have punctuation that would cause the
+resulting command to be ill-formed.
+The default is <I>ipsec _updown</I>.
+<DT><B>--to</B><DD>
+separates the specification of the left and right ends of the connection.
+</DL>
+<P>
+
+The potential connection description also specifies characteristics of
+rekeying and security.
+<DL COMPACT>
+<DT><B>--psk</B><DD>
+Propose and allow preshared secret authentication for IKE peers. This authentication
+requires that each side use the same secret. May be combined with <B>--rsasig</B>;
+at least one must be specified.
+<DT><B>--rsasig</B><DD>
+Propose and allow RSA signatures for authentication of IKE peers. This authentication
+requires that each side have have a private key of its own and know the
+public key of its peer. May be combined with <B>--psk</B>;
+at least one must be specified.
+<DT><B>--encrypt</B><DD>
+All proposed or accepted IPsec SAs will include non-null ESP.
+The actual choices of transforms are wired into <B>pluto</B>.
+<DT><B>--authenticate</B><DD>
+All proposed IPsec SAs will include AH.
+All accepted IPsec SAs will include AH or ESP with authentication.
+The actual choices of transforms are wired into <B>pluto</B>.
+Note that this has nothing to do with IKE authentication.
+<DT><B>--compress</B><DD>
+All proposed IPsec SAs will include IPCOMP (compression).
+This will be ignored if KLIPS is not configured with IPCOMP support.
+<DT><B>--tunnel</B><DD>
+the IPsec SA should use tunneling. Implicit if the SA is for clients.
+Must only be used with <B>--authenticate</B> or <B>--encrypt</B>.
+<DT><B>--ipv4</B><DD>
+The host addresses will be interpreted as IPv4 addresses. This is the
+default. Note that for a connection, all host addresses must be of
+the same Address Family (IPv4 and IPv6 use different Address Families).
+<DT><B>--ipv6</B><DD>
+The host addresses (including nexthop) will be interpreted as IPv6 addresses.
+Note that for a connection, all host addresses must be of
+the same Address Family (IPv4 and IPv6 use different Address Families).
+<DT><B>--tunnelipv4</B><DD>
+The client addresses will be interpreted as IPv4 addresses. The default is
+to match what the host will be. This does not imply <B>--tunnel</B> so the
+flag can be safely used when no tunnel is actually specified.
+Note that for a connection, all tunnel addresses must be of the same
+Address Family.
+<DT><B>--tunnelipv6</B><DD>
+The client addresses will be interpreted as IPv6 addresses. The default is
+to match what the host will be. This does not imply <B>--tunnel</B> so the
+flag can be safely used when no tunnel is actually specified.
+Note that for a connection, all tunnel addresses must be of the same
+Address Family.
+<DT><B>--pfs</B><DD>
+There should be Perfect Forward Secrecy - new keying material will
+be generated for each IPsec SA rather than being derived from the ISAKMP
+SA keying material.
+Since the group to be used cannot be negotiated (a dubious feature of the
+standard), <B>pluto</B> will propose the same group that was used during Phase 1.
+We don't implement a stronger form of PFS which would require that the
+ISAKMP SA be deleted after the IPSEC SA is negotiated.
+<DT><B>--disablearrivalcheck</B><DD>
+If the connection is a tunnel, allow packets arriving through the tunnel
+to have any source and destination addresses.
+</DL>
+<P>
+
+If none of the <B>--encrypt</B>, <B>--authenticate</B>, <B>--compress</B>,
+or <B>--pfs</B> flags is given, the initiating the connection will
+only build an ISAKMP SA. For such a connection, client subnets have
+no meaning and must not be specified.
+<P>
+
+More work is needed to allow for flexible policies. Currently
+policy is hardwired in the source file spdb.c. The ISAKMP SAs may use
+Oakley groups MODP1024 and MODP1536; 3DES encryption; SHA1-96
+and MD5-96 authentication. The IPsec SAs may use 3DES and
+MD5-96 or SHA1-96 for ESP, or just MD5-96 or SHA1-96 for AH.
+IPCOMP Compression is always Deflate.
+<DL COMPACT>
+<DT><B>--ikelifetime</B>&nbsp;<I>seconds</I><DD>
+how long <B>pluto</B> will propose that an ISAKMP SA be allowed to live.
+The default is 3600 (one hour) and the maximum is 28800 (8 hours).
+This option will not affect what is accepted.
+<B>pluto</B> will reject proposals that exceed the maximum.
+<DT><B>--ipseclifetime</B>&nbsp;<I>seconds</I><DD>
+how long <B>pluto</B> will propose that an IPsec SA be allowed to live.
+The default is 28800 (eight hours) and the maximum is 86400 (one day).
+This option will not affect what is accepted.
+<B>pluto</B> will reject proposals that exceed the maximum.
+<DT><B>--rekeymargin</B>&nbsp;<I>seconds</I><DD>
+how long before an SA's expiration should <B>pluto</B> try to negotiate
+a replacement SA. This will only happen if <B>pluto</B> was the initiator.
+The default is 540 (nine minutes).
+<DT><B>--rekeyfuzz</B>&nbsp;<I>percentage</I><DD>
+maximum size of random component to add to rekeymargin, expressed as
+a percentage of rekeymargin. <B>pluto</B> will select a delay uniformly
+distributed within this range. By default, the percentage will be 100.
+If greater determinism is desired, specify 0. It may be appropriate
+for the percentage to be much larger than 100.
+<DT><B>--keyingtries</B>&nbsp;<I>count</I><DD>
+how many times <B>pluto</B> should try to negotiate an SA,
+either for the first time or for rekeying.
+A value of 0 is interpreted as a very large number: never give up.
+The default is three.
+<DT><B>--dontrekey</B><DD>
+A misnomer.
+Only rekey a connection if we were the Initiator and there was recent
+traffic on the existing connection.
+This applies to Phase 1 and Phase 2.
+This is currently the only automatic way for a connection to terminate.
+It may be useful with Road Warrior or Opportunistic connections.
+<BR>
+
+Since SA lifetime negotiation is take-it-or-leave it, a Responder
+normally uses the shorter of the negotiated or the configured lifetime.
+This only works because if the lifetime is shorter than negotiated,
+the Responder will rekey in time so that everything works.
+This interacts badly with <B>--dontrekey</B>. In this case,
+the Responder will end up rekeying to rectify a shortfall in an IPsec SA
+lifetime; for an ISAKMP SA, the Responder will accept the negotiated
+lifetime.
+<DT><B>--delete</B><DD>
+when used in the connection form, it causes any previous connection
+with this name to be deleted before this one is added. Unlike a
+normal delete, no diagnostic is produced if there was no previous
+connection to delete. Any routing in place for the connection is undone.
+</DL>
+<P>
+
+The delete form deletes a named connection description and any
+SAs established or negotiations initiated using this connection.
+Any routing in place for the connection is undone.
+<DL COMPACT>
+<DT><B>--delete</B><DD>
+<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
+</DL>
+<P>
+
+The deletestate form deletes the state object with the specified serial number.
+This is useful for selectively deleting instances of connections.
+<DL COMPACT>
+<DT><B>--deletestate</B>&nbsp;<I>state-number</I><DD>
+</DL>
+<P>
+
+The route form of the <B>whack</B> command tells <B>pluto</B> to set up
+routing for a connection.
+Although like a traditional route, it uses an ipsec device as a
+virtual interface.
+Once routing is set up, no packets will be
+sent ``in the clear'' to the peer's client specified in the connection.
+A TRAP shunt eroute will be installed; if outbound traffic is caught,
+Pluto will initiate the connection.
+An explicit <B>whack</B> route is not always needed: if it hasn't been
+done when an IPsec SA is being installed, one will be automatically attempted.
+<P>
+
+When a routing is attempted for a connection, there must not already
+be a routing for a different connection with the same subnet but different
+interface or destination, or if
+there is, it must not be being used by an IPsec SA. Otherwise the
+attempt will fail.
+<DL COMPACT>
+<DT><B>--route</B><DD>
+<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
+</DL>
+<P>
+
+The unroute form of the <B>whack</B> command tells <B>pluto</B> to undo
+a routing. <B>pluto</B> will refuse if an IPsec SA is using the connection.
+If another connection is sharing the same routing, it will be left in place.
+Without a routing, packets will be sent without encryption or authentication.
+<DL COMPACT>
+<DT><B>--unroute</B><DD>
+<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
+</DL>
+<P>
+
+The initiate form tells <B>pluto</B> to initiate a negotiation with another
+<B>pluto</B> (or other IKE daemon) according to the named connection.
+Initiation requires a route that <B>--route</B> would provide;
+if none is in place at the time an IPsec SA is being installed,
+<B>pluto</B> attempts to set one up.
+<DL COMPACT>
+<DT><B>--initiate</B><DD>
+<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
+<DT><B>--asynchronous<DD>
+</DL>
+<P>
+
+The initiate form of the whack</B> command will relay back from
+<B>pluto</B> status information via the UNIX domain socket (unless
+--asynchronous is specified). The status information is meant to
+look a bit like that from <B>FTP</B>. Currently <B>whack</B> simply
+copies this to stderr. When the request is finished (eg. the SAs are
+established or <B>pluto</B> gives up), <B>pluto</B> closes the channel,
+causing <B>whack</B> to terminate.
+<P>
+
+The opportunistic initiate form is mainly used for debugging.
+<DL COMPACT>
+<DT><B>--tunnelipv4</B><DD>
+<DT><B>--tunnelipv6</B><DD>
+<DT><B>--oppohere</B>&nbsp;<I>ip-address</I><DD>
+<DT><B>--oppothere</B>&nbsp;<I>ip-address</I><DD>
+</DL>
+<P>
+
+This will cause <B>pluto</B> to attempt to opportunistically initiate a
+connection from here to the there, even if a previous attempt
+had been made.
+The whack log will show the progress of this attempt.
+<P>
+
+The terminate form tells <B>pluto</B> to delete any SAs that use the specified
+connection and to stop any negotiations in process.
+It does not prevent new negotiations from starting (the delete form
+has this effect).
+<DL COMPACT>
+<DT><B>--terminate</B><DD>
+<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
+</DL>
+<P>
+
+The public key for informs <B>pluto</B> of the RSA public key for a potential peer.
+Private keys must be kept secret, so they are kept in
+<I><A HREF="ipsec.secrets.5.html">ipsec.secrets</A></I>(5).
+
+<DL COMPACT>
+<DT><B>--keyid&nbsp;</B><I>id</I><DD>
+specififies the identity of the peer for which a public key should be used.
+Its form is identical to the identity in the connection.
+If no public key is specified, <B>pluto</B> attempts to find KEY records
+from DNS for the id (if a FQDN) or through reverse lookup (if an IP address).
+Note that there several interesting ways in which this is not secure.
+<DT><B>--addkey</B><DD>
+specifies that the new key is added to the collection; otherwise the
+new key replaces any old ones.
+<DT><B>--pubkeyrsa&nbsp;</B><I>key</I><DD>
+specifies the value of the RSA public key. It is a sequence of bytes
+as described in RFC 2537 ``RSA/MD5 KEYs and SIGs in the Domain Name System (DNS)''.
+It is denoted in a way suitable for <I><A HREF="ipsec_ttodata.3.html">ipsec_ttodata</A></I>(3).
+For example, a base 64 numeral starts with 0s.
+</DL>
+<P>
+
+The listen form tells <B>pluto</B> to start listening for IKE requests
+on its public interfaces. To avoid race conditions, it is normal to
+load the appropriate connections into <B>pluto</B> before allowing it
+to listen. If <B>pluto</B> isn't listening, it is pointless to
+initiate negotiations, so it will refuse requests to do so. Whenever
+the listen form is used, <B>pluto</B> looks for public interfaces and
+will notice when new ones have been added and when old ones have been
+removed. This is also the trigger for <B>pluto</B> to read the
+<I>ipsec.secrets</I> file. So listen may useful more than once.
+<DL COMPACT>
+<DT><B>--listen</B><DD>
+start listening for IKE traffic on public interfaces.
+<DT><B>--unlisten</B><DD>
+stop listening for IKE traffic on public interfaces.
+</DL>
+<P>
+
+The status form will display information about the internal state of
+<B>pluto</B>: information about each potential connection, about
+each state object, and about each shunt that <B>pluto</B> is managing
+without an associated connection.
+<DL COMPACT>
+<DT><B>--status</B><DD>
+</DL>
+<P>
+
+The shutdown form is the proper way to shut down <B>pluto</B>.
+It will tear down the SAs on this machine that <B>pluto</B> has negotiated.
+It does not inform its peers, so the SAs on their machines remain.
+<DL COMPACT>
+<DT><B>--shutdown</B><DD>
+</DL>
+<A NAME="lbAM">&nbsp;</A>
+<H3>Examples</H3>
+
+<P>
+
+It would be normal to start <B>pluto</B> in one of the system initialization
+scripts. It needs to be run by the superuser. Generally, no arguments are needed.
+To run in manually, the superuser can simply type
+<P>
+&nbsp;&nbsp;&nbsp;ipsec pluto
+<P>
+The command will immediately return, but a <B>pluto</B> process will be left
+running, waiting for requests from <B>whack</B> or a peer.
+<P>
+
+Using <B>whack</B>, several potential connections would be described:
+<DL COMPACT>
+<DT>
+
+&nbsp;&nbsp;&nbsp;ipsec whack --name&nbsp;silly
+--host&nbsp;127.0.0.1 --to --host&nbsp;127.0.0.2
+--ikelifetime&nbsp;900 --ipseclifetime&nbsp;800 --keyingtries&nbsp;3
+
+</DL>
+<P>
+
+<DD>Since this silly connection description specifies neither encryption,
+authentication, nor tunneling, it could only be used to establish
+an ISAKMP SA.
+<DL COMPACT>
+<DT>
+
+&nbsp;&nbsp;&nbsp;ipsec whack --name&nbsp;secret --host&nbsp;10.0.0.1 --client&nbsp;10.0.1.0/24
+--to --host&nbsp;10.0.0.2 --client&nbsp;10.0.2.0/24
+--encrypt
+
+</DL>
+<P>
+
+<DD>This is something that must be done on both sides. If the other
+side is <B>pluto</B>, the same <B>whack</B> command could be used on it
+(the command syntax is designed to not distinguish which end is ours).
+<P>
+
+Now that the connections are specified, <B>pluto</B> is ready to handle
+requests and replies via the public interfaces. We must tell it to discover
+those interfaces and start accepting messages from peers:
+<P>
+&nbsp;&nbsp;&nbsp;ipsec whack --listen
+<P>
+
+If we don't immediately wish to bring up a secure connection between
+the two clients, we might wish to prevent insecure traffic.
+The routing form asks <B>pluto</B> to cause the packets sent from
+our client to the peer's client to be routed through the ipsec0
+device; if there is no SA, they will be discarded:
+<P>
+&nbsp;&nbsp;&nbsp;ipsec whack --route secret
+<P>
+
+Finally, we are ready to get <B>pluto</B> to initiate negotiation
+for an IPsec SA (and implicitly, an ISAKMP SA):
+<P>
+&nbsp;&nbsp;&nbsp;ipsec whack --initiate&nbsp;--name&nbsp;secret
+<P>
+A small log of interesting events will appear on standard output
+(other logging is sent to syslog).
+<P>
+
+<B>whack</B> can also be used to terminate <B>pluto</B> cleanly, tearing down
+all SAs that it has negotiated.
+<P>
+&nbsp;&nbsp;&nbsp;ipsec whack --shutdown
+<P>
+Notification of any IPSEC SA deletion, but not ISAKMP SA deletion
+is sent to the peer. Unfortunately, such Notification is not reliable.
+Furthermore, <B>pluto</B> itself ignores Notifications.
+<A NAME="lbAN">&nbsp;</A>
+<H3>The updown command</H3>
+
+<P>
+
+Whenever <B>pluto</B> brings a connection up or down, it invokes
+the updown command. This command is specified using the <B>--updown</B>
+option. This allows for customized control over routing and firewall manipulation.
+<P>
+
+The updown is invoked for five different operations. Each of
+these operations can be for our client subnet or for our host itself.
+<DL COMPACT>
+<DT><B>prepare-host</B> or <B>prepare-client</B><DD>
+is run before bringing up a new connection if no other connection
+with the same clients is up. Generally, this is useful for deleting a
+route that might have been set up before <B>pluto</B> was run or
+perhaps by some agent not known to <B>pluto</B>.
+<DT><B>route-host</B> or <B>route-client</B><DD>
+is run when bringing up a connection for a new peer client subnet
+(even if <B>prepare-host</B> or <B>prepare-client</B> was run). The
+command should install a suitable route. Routing decisions are based
+only on the destination (peer's client) subnet address, unlike eroutes
+which discriminate based on source too.
+<DT><B>unroute-host</B> or <B>unroute-client</B><DD>
+is run when bringing down the last connection for a particular peer
+client subnet. It should undo what the <B>route-host</B> or <B>route-client</B>
+did.
+<DT><B>up-host</B> or <B>up-client</B><DD>
+is run when bringing up a tunnel eroute with a pair of client subnets
+that does not already have a tunnel eroute.
+This command should install firewall rules as appropriate.
+It is generally a good idea to allow IKE messages (UDP port 500)
+travel between the hosts.
+<DT><B>down-host</B> or <B>down-client</B><DD>
+is run when bringing down the eroute for a pair of client subnets.
+This command should delete firewall rules as appropriate. Note that
+there may remain some inbound IPsec SAs with these client subnets.
+</DL>
+<P>
+
+The script is passed a large number of environment variables to specify
+what needs to be done.
+<DL COMPACT>
+<DT><B>PLUTO_VERSION</B><DD>
+indicates what version of this interface is being used. This document
+describes version 1.1. This is upwardly compatible with version 1.0.
+<DT><B>PLUTO_VERB</B><DD>
+specifies the name of the operation to be performed
+(<B>prepare-host</B>,r <B>prepare-client</B>,
+<B>up-host</B>, <B>up-client</B>,
+<B>down-host</B>, or <B>down-client</B>). If the address family for
+security gateway to security gateway communications is IPv6, then
+a suffix of -v6 is added to the verb.
+<DT><B>PLUTO_CONNECTION</B><DD>
+is the name of the connection for which we are routing.
+<DT><B>PLUTO_NEXT_HOP</B><DD>
+is the next hop to which packets bound for the peer must be sent.
+<DT><B>PLUTO_INTERFACE</B><DD>
+is the name of the ipsec interface to be used.
+<DT><B>PLUTO_ME</B><DD>
+is the IP address of our host.
+<DT><B>PLUTO_MY_CLIENT</B><DD>
+is the IP address / count of our client subnet.
+If the client is just the host, this will be the host's own IP address / max
+(where max is 32 for IPv4 and 128 for IPv6).
+<DT><B>PLUTO_MY_CLIENT_NET</B><DD>
+is the IP address of our client net.
+If the client is just the host, this will be the host's own IP address.
+<DT><B>PLUTO_MY_CLIENT_MASK</B><DD>
+is the mask for our client net.
+If the client is just the host, this will be 255.255.255.255.
+<DT><B>PLUTO_PEER</B><DD>
+is the IP address of our peer.
+<DT><B>PLUTO_PEER_CLIENT</B><DD>
+is the IP address / count of the peer's client subnet.
+If the client is just the peer, this will be the peer's own IP address / max
+(where max is 32 for IPv4 and 128 for IPv6).
+<DT><B>PLUTO_PEER_CLIENT_NET</B><DD>
+is the IP address of the peer's client net.
+If the client is just the peer, this will be the peer's own IP address.
+<DT><B>PLUTO_PEER_CLIENT_MASK</B><DD>
+is the mask for the peer's client net.
+If the client is just the peer, this will be 255.255.255.255.
+</DL>
+<P>
+
+All output sent by the script to stderr or stdout is logged. The
+script should return an exit status of 0 if and only if it succeeds.
+<P>
+
+<B>Pluto</B> waits for the script to finish and will not do any other
+processing while it is waiting.
+The script may assume that <B>pluto</B> will not change anything
+while the script runs.
+The script should avoid doing anything that takes much time and it
+should not issue any command that requires processing by <B>pluto</B>.
+Either of these activities could be performed by a background
+subprocess of the script.
+<A NAME="lbAO">&nbsp;</A>
+<H3>Rekeying</H3>
+
+<P>
+
+When an SA that was initiated by <B>pluto</B> has only a bit of
+lifetime left,
+<B>pluto</B> will initiate the creation of a new SA. This applies to
+ISAKMP and IPsec SAs.
+The rekeying will be initiated when the SA's remaining lifetime is
+less than the rekeymargin plus a random percentage, between 0 and
+rekeyfuzz, of the rekeymargin.
+<P>
+
+Similarly, when an SA that was initiated by the peer has only a bit of
+lifetime left, <B>pluto</B> will try to initiate the creation of a
+replacement.
+To give preference to the initiator, this rekeying will only be initiated
+when the SA's remaining lifetime is half of rekeymargin.
+If rekeying is done by the responder, the roles will be reversed: the
+responder for the old SA will be the initiator for the replacement.
+The former initiator might also initiate rekeying, so there may
+be redundant SAs created.
+To avoid these complications, make sure that rekeymargin is generous.
+<P>
+
+One risk of having the former responder initiate is that perhaps
+none of its proposals is acceptable to the former initiator
+(they have not been used in a successful negotiation).
+To reduce the chances of this happening, and to prevent loss of security,
+the policy settings are taken from the old SA (this is the case even if
+the former initiator is initiating).
+These may be stricter than those of the connection.
+<P>
+
+<B>pluto</B> will not rekey an SA if that SA is not the most recent of its
+type (IPsec or ISAKMP) for its potential connection.
+This avoids creating redundant SAs.
+<P>
+
+The random component in the rekeying time (rekeyfuzz) is intended to
+make certain pathological patterns of rekeying unstable. If both
+sides decide to rekey at the same time, twice as many SAs as necessary
+are created. This could become a stable pattern without the
+randomness.
+<P>
+
+Another more important case occurs when a security gateway has SAs
+with many other security gateways. Each of these connections might
+need to be rekeyed at the same time. This would cause a high peek
+requirement for resources (network bandwidth, CPU time, entropy for
+random numbers). The rekeyfuzz can be used to stagger the rekeying
+times.
+<P>
+
+Once a new set of SAs has been negotiated, <B>pluto</B> will never send
+traffic on a superseded one. Traffic will be accepted on an old SA
+until it expires.
+<A NAME="lbAP">&nbsp;</A>
+<H3>Selecting a Connection When Responding: Road Warrior Support</H3>
+
+<P>
+
+When <B>pluto</B> receives an initial Main Mode message, it needs to
+decide which connection this message is for. It picks based solely on
+the source and destination IP addresses of the message. There might
+be several connections with suitable IP addresses, in which case one
+of them is arbitrarily chosen. (The ISAKMP SA proposal contained in
+the message could be taken into account, but it is not.)
+<P>
+
+The ISAKMP SA is negotiated before the parties pass further
+identifying information, so all ISAKMP SA characteristics specified in
+the connection description should be the same for every connection
+with the same two host IP addresses. At the moment, the only
+characteristic that might differ is authentication method.
+<P>
+
+Up to this point,
+all configuring has presumed that the IP addresses
+are known to all parties ahead of time. This will not work
+when either end is mobile (or assigned a dynamic IP address for other
+reasons). We call this situation ``Road Warrior''. It is fairly tricky
+and has some important limitations, most of which are features of
+the IKE protocol.
+<P>
+
+Only the initiator may be mobile:
+the initiator may have an IP number unknown to the responder. When
+the responder doesn't recognize the IP address on the first Main Mode
+packet, it looks for a connection with itself as one end and <B>%any</B>
+as the other.
+If it cannot find one, it refuses to negotiate. If it
+does find one, it creates a temporary connection that is a duplicate
+except with the <B>%any</B> replaced by the source IP address from the
+packet; if there was no identity specified for the peer, the new IP
+address will be used.
+<P>
+
+When <B>pluto</B> is using one of these temporary connections and
+needs to find the preshared secret or RSA private key in <I>ipsec.secrets</I>,
+and and the connection specified no identity for the peer, <B>%any</B>
+is used as its identity. After all, the real IP address was apparently
+unknown to the configuration, so it is unreasonable to require that
+it be used in this table.
+<P>
+
+Part way into the Phase 1 (Main Mode) negotiation using one of these
+temporary connection descriptions, <B>pluto</B> will be receive an
+Identity Payload. At this point, <B>pluto</B> checks for a more
+appropriate connection, one with an identity for the peer that matches
+the payload but which would use the same keys so-far used for
+authentication. If it finds one, it will switch to using this better
+connection (or a temporary derived from this, if it has <B>%any</B>
+for the peer's IP address). It may even turn out that no connection
+matches the newly discovered identity, including the current connection;
+if so, <B>pluto</B> terminates negotiation.
+<P>
+
+Unfortunately, if preshared secret authentication is being used, the
+Identity Payload is encrypted using this secret, so the secret must be
+selected by the responder without knowing this payload. This
+limits there to being at most one preshared secret for all Road Warrior
+systems connecting to a host. RSA Signature authentications does not
+require that the responder know how to select the initiator's public key
+until after the initiator's Identity Payload is decoded (using the
+responder's private key, so that must be preselected).
+<P>
+
+When <B>pluto</B> is responding to a Quick Mode negotiation via one of these
+temporary connection descriptions, it may well find that the subnets
+specified by the initiator don't match those in the temporary
+connection description. If so, it will look for a connection with
+matching subnets, its own host address, a peer address of <B>%any</B>
+and matching identities.
+If it finds one, a new temporary connection is derived from this one
+and used for the Quick Mode negotiation of IPsec SAs. If it does not
+find one, <B>pluto</B> terminates negotiation.
+<P>
+
+Be sure to specify an appropriate nexthop for the responder
+to send a message to the initiator: <B>pluto</B> has no way of guessing
+it (if forwarding isn't required, use an explicit <B>%direct</B> as the nexthop
+and the IP address of the initiator will be filled in; the obsolete
+notation <B>0.0.0.0</B> is still accepted).
+<P>
+
+<B>pluto</B> has no special provision for the initiator side. The current
+(possibly dynamic) IP address and nexthop must be used in defining
+connections. These must be
+properly configured each time the initiator's IP address changes.
+<B>pluto</B> has no mechanism to do this automatically.
+<P>
+
+Although we call this Road Warrior Support, it could also be used to
+support encrypted connections with anonymous initiators. The
+responder's organization could announce the preshared secret that would be used
+with unrecognized initiators and let anyone connect. Of course the initiator's
+identity would not be authenticated.
+<P>
+
+If any Road Warrior connections are supported, <B>pluto</B> cannot
+reject an exchange initiated by an unknown host until it has
+determined that the secret is not shared or the signature is invalid.
+This must await the
+third Main Mode message from the initiator. If no Road Warrior
+connection is supported, the first message from an unknown source
+would be rejected. This has implications for ease of debugging
+configurations and for denial of service attacks.
+<P>
+
+Although a Road Warrior connection must be initiated by the mobile
+side, the other side can and will rekey using the temporary connection
+it has created. If the Road Warrior wishes to be able to disconnect,
+it is probably wise to set <B>--keyingtries</B> to 1 in the
+connection on the non-mobile side to prevent it trying to rekey the
+connection. Unfortunately, there is no mechanism to unroute the
+connection automatically.
+<A NAME="lbAQ">&nbsp;</A>
+<H3>Debugging</H3>
+
+<P>
+
+<B>pluto</B> accepts several optional arguments, useful mostly for debugging.
+Except for <B>--interface</B>, each should appear at most once.
+<DL COMPACT>
+<DT><B>--interface</B> <I>interfacename</I><DD>
+specifies that the named real public network interface should be considered.
+The interface name specified should not be <B>ipsec</B><I>N</I>.
+If the option doesn't appear, all interfaces are considered.
+To specify several interfaces, use the option once for each.
+One use of this option is to specify which interface should be used
+when two or more share the same IP address.
+<DT><B>--ikeport</B> <I>port-number</I><DD>
+changes the UDP port that <B>pluto</B> will use
+(default, specified by IANA: 500)
+<DT><B>--ctlbase</B> <I>path</I><DD>
+basename for control files.
+<I>path</I>.ctl is the socket through which <B>whack</B> communicates with
+<B>pluto</B>.
+<I>path</I>.pid is the lockfile to prevent multiple <B>pluto</B> instances.
+The default is <I>/var/run/pluto</I>).
+<DT><B>--secretsfile</B> <I>file</I><DD>
+specifies the file for authentication secrets
+(default: <I>/etc/ipsec.secrets</I>).
+This name is subject to ``globbing'' as in <I><A HREF="sh.1.html">sh</A></I>(1),
+so every file with a matching name is processed.
+Quoting is generally needed to prevent the shell from doing the globbing.
+<DT><B>--adns</B> <I>pathname</I><DD>
+<DT><B>--lwdnsq</B> <I>pathname</I><DD>
+specifies where to find <B>pluto</B>'s helper program for asynchronous DNS lookup.
+<B>pluto</B> can be built to use one of two helper programs: <B>_pluto_adns</B>
+or <B>lwdnsq</B>. You must use the program for which it was built.
+By default, <B>pluto</B> will look for the program in
+<B>$IPSEC_DIR</B> (if that environment variable is defined) or, failing that,
+in the same directory as <B>pluto</B>.
+<DT><B>--nofork</B><DD>
+disable ``daemon fork'' (default is to fork). In addition, after the
+lock file and control socket are created, print the line ``Pluto
+initialized'' to standard out.
+<DT><B>--noklips</B><DD>
+don't actually implement negotiated IPsec SAs
+<DT><B>--uniqueids</B><DD>
+if this option has been selected, whenever a new ISAKMP SA is
+established, any connection with the same Peer ID but a different
+Peer IP address is unoriented (causing all its SAs to be deleted).
+This helps clean up dangling SAs when a connection is lost and
+then regained at another IP address.
+<DT><B>--stderrlog</B><DD>
+log goes to standard out {default is to use <I><A HREF="syslogd.8.html">syslogd</A></I>(8))
+</DL>
+<P>
+
+For example
+<DL COMPACT>
+<DT>pluto --secretsfile&nbsp;ipsec.secrets --ctlbase&nbsp;pluto.base --ikeport&nbsp;8500 --nofork --noklips --stderrlog<DD>
+</DL>
+<P>
+
+lets one test <B>pluto</B> without using the superuser account.
+<P>
+
+<B>pluto</B> is willing to produce a prodigious amount of debugging
+information. To do so, it must be compiled with -DDEBUG. There are
+several classes of debugging output, and <B>pluto</B> may be directed to
+produce a selection of them. All lines of
+debugging output are prefixed with ``|&nbsp;'' to distinguish them from error
+messages.
+<P>
+
+When <B>pluto</B> is invoked, it may be given arguments to specify
+which classes to output. The current options are:
+<DL COMPACT>
+<DT><B>--debug-raw</B><DD>
+show the raw bytes of messages
+<DT><B>--debug-crypt</B><DD>
+show the encryption and decryption of messages
+<DT><B>--debug-parsing</B><DD>
+show the structure of input messages
+<DT><B>--debug-emitting</B><DD>
+show the structure of output messages
+<DT><B>--debug-control</B><DD>
+show <B>pluto</B>'s decision making
+<DT><B>--debug-lifecycle</B><DD>
+[this option is temporary] log more detail of lifecycle of SAs
+<DT><B>--debug-klips</B><DD>
+show <B>pluto</B>'s interaction with <B>KLIPS</B>
+<DT><B>--debug-dns</B><DD>
+show <B>pluto</B>'s interaction with <B>DNS</B> for KEY and TXT records
+<DT><B>--debug-oppo</B><DD>
+show why <B>pluto</B> didn't find a suitable DNS TXT record to authorize opportunistic initiation
+<DT><B>--debug-all</B><DD>
+all of the above
+<DT><B>--debug-private</B><DD>
+allow debugging output with private keys.
+<DT><B>--debug-none</B><DD>
+none of the above
+</DL>
+<P>
+
+The debug form of the
+<B>whack</B> command will change the selection in a running
+<B>pluto</B>.
+If a connection name is specified, the flags are added whenever
+<B>pluto</B> has identified that it is dealing with that connection.
+Unfortunately, this is often part way into the operation being observed.
+<P>
+
+For example, to start a <B>pluto</B> with a display of the structure of input
+and output:
+<DL COMPACT>
+<DT><DD>
+pluto --debug-emitting --debug-parsing
+</DL>
+<P>
+
+To later change this <B>pluto</B> to only display raw bytes:
+<DL COMPACT>
+<DT><DD>
+whack --debug-raw
+</DL>
+<P>
+
+For testing, SSH's IKE test page is quite useful:
+<DL COMPACT>
+<DT><DD>
+<I><A HREF="http://isakmp-test.ssh.fi/">http://isakmp-test.ssh.fi/</A></I>
+</DL>
+<P>
+
+Hint: ISAKMP SAs are often kept alive by IKEs even after the IPsec SA
+is established. This allows future IPsec SA's to be negotiated
+directly. If one of the IKEs is restarted, the other may try to use
+the ISAKMP SA but the new IKE won't know about it. This can lead to
+much confusion. <B>pluto</B> is not yet smart enough to get out of such a
+mess.
+<A NAME="lbAR">&nbsp;</A>
+<H3>Pluto's Behaviour When Things Go Wrong</H3>
+
+<P>
+
+When <B>pluto</B> doesn't understand or accept a message, it just
+ignores the message. It is not yet capable of communicating the
+problem to the other IKE daemon (in the future it might use
+Notifications to accomplish this in many cases). It does log a diagnostic.
+<P>
+
+When <B>pluto</B> gets no response from a message, it resends the same
+message (a message will be sent at most three times). This is
+appropriate: UDP is unreliable.
+<P>
+
+When pluto gets a message that it has already seen, there are many
+cases when it notices and discards it. This too is appropriate for UDP.
+<P>
+
+Combine these three rules, and you can explain many apparently
+mysterious behaviours. In a <B>pluto</B> log, retrying isn't usually the
+interesting event. The critical thing is either earlier (<B>pluto</B>
+got a message which it didn't like and so ignored, so it was still
+awaiting an acceptable message and got impatient) or on the other
+system (<B>pluto</B> didn't send a reply because it wasn't happy with
+the previous message).
+<A NAME="lbAS">&nbsp;</A>
+<H3>Notes</H3>
+
+<P>
+
+If <B>pluto</B> is compiled without -DKLIPS, it negotiates Security
+Associations but never ask the kernel to put them in place and never
+makes routing changes. This allows <B>pluto</B> to be tested on systems
+without <B>KLIPS</B>, but makes it rather useless.
+<P>
+
+Each IPsec SA is assigned an SPI, a 32-bit number used to refer to the SA.
+The IKE protocol lets the destination of the SA choose the SPI.
+The range 0 to 0xFF is reserved for IANA.
+<B>Pluto</B> also avoids choosing an SPI in the range 0x100 to 0xFFF,
+leaving these SPIs free for manual keying.
+Remember that the peer, if not <B>pluto</B>, may well chose
+SPIs in this range.
+<A NAME="lbAT">&nbsp;</A>
+<H3>Policies</H3>
+
+<P>
+
+This catalogue of policies may be of use when trying to configure
+<B>Pluto</B> and another IKE implementation to interoperate.
+<P>
+
+In Phase 1, only Main Mode is supported. We are not sure that
+Aggressive Mode is secure. For one thing, it does not support
+identity protection. It may allow more severe Denial Of Service
+attacks.
+<P>
+
+No Informational Exchanges are supported. These are optional and
+since their delivery is not assured, they must not matter.
+It is the case that some IKE implementations won't interoperate
+without Informational Exchanges, but we feel they are broken.
+<P>
+
+No Informational Payloads are supported. These are optional, but
+useful. It is of concern that these payloads are not authenticated in
+Phase 1, nor in those Phase 2 messages authenticated with <A HREF="HASH.3.html">HASH</A>(3).
+<DL COMPACT>
+<DT>*<DD>
+Diffie Hellman Groups MODP 1024 and MODP 1536 (2 and 5)
+are supported.
+Group MODP768 (1) is not supported because it is too weak.
+<DT>*<DD>
+Host authetication can be done by RSA Signatures or Pre-Shared
+Secrets.
+<DT>*<DD>
+3DES CBC (Cypher Block Chaining mode) is the only encryption
+supported, both for ISAKMP SAs and IPSEC SAs.
+<DT>*<DD>
+MD5 and SHA1 hashing are supported for packet authentication in both
+kinds of SAs.
+<DT>*<DD>
+The ESP, AH, or AH plus ESP are supported. If, and only if, AH and
+ESP are combined, the ESP need not have its own authentication
+component. The selection is controlled by the --encrypt and
+--authenticate flags.
+<DT>*<DD>
+Each of these may be combined with IPCOMP Deflate compression,
+but only if the potential connection specifies compression and only
+if KLIPS is configured with IPCOMP support.
+<DT>*<DD>
+The IPSEC SAs may be tunnel or transport mode, where appropriate.
+The --tunnel flag controls this when <B>pluto</B> is initiating.
+<DT>*<DD>
+When responding to an ISAKMP SA proposal, the maximum acceptable
+lifetime is eight hours. The default is one hour. There is no
+minimum. The --ikelifetime flag controls this when <B>pluto</B>
+is initiating.
+<DT>*<DD>
+When responding to an IPSEC SA proposal, the maximum acceptable
+lifetime is one day. The default is eight hours. There is no
+minimum. The --ipseclifetime flag controls this when <B>pluto</B>
+is initiating.
+<DT>*<DD>
+PFS is acceptable, and will be proposed if the --pfs flag was
+specified. The DH group proposed will be the same as negotiated for
+Phase 1.
+</DL>
+<A NAME="lbAU">&nbsp;</A>
+<H2>SIGNALS</H2>
+
+<P>
+
+<B>Pluto</B> responds to <B>SIGHUP</B> by issuing a suggestion that ``<B>whack</B>
+--listen'' might have been intended.
+<P>
+
+<B>Pluto</B> exits when it recieves <B>SIGTERM</B>.
+<A NAME="lbAV">&nbsp;</A>
+<H2>EXIT STATUS</H2>
+
+<P>
+
+<B>pluto</B> normally forks a daemon process, so the exit status is
+normally a very preliminary result.
+<DL COMPACT>
+<DT>0<DD>
+means that all is OK so far.
+<DT>1<DD>
+means that something was wrong.
+<DT>10<DD>
+means that the lock file already exists.
+</DL>
+<P>
+
+If <B>whack</B> detects a problem, it will return an exit status of 1.
+If it received progress messages from <B>pluto</B>, it returns as status
+the value of the numeric prefix from the last such message
+that was not a message sent to syslog or a comment
+(but the prefix for success is treated as 0).
+Otherwise, the exit status is 0.
+<A NAME="lbAW">&nbsp;</A>
+<H2>FILES</H2>
+
+<I>/var/run/pluto.pid</I>
+<BR>
+
+<I>/var/run/pluto.ctl</I>
+<BR>
+
+<I>/etc/ipsec.secrets</I>
+<BR>
+
+<I>$IPSEC_LIBDIR/_pluto_adns</I>
+<BR>
+
+<I>$IPSEC_EXECDIR/lwdnsq</I>
+<BR>
+
+<I>/dev/urandom</I>
+<A NAME="lbAX">&nbsp;</A>
+<H2>ENVIRONMENT</H2>
+
+<I>IPSEC_LIBDIR</I>
+<BR>
+
+<I>IPSEC_EXECDIR</I>
+<BR>
+
+<I>IPSECmyid</I>
+<A NAME="lbAY">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<P>
+
+The rest of the FreeS/WAN distribution, in particular <I><A HREF="ipsec.8.html">ipsec</A></I>(8).
+<P>
+
+<I><A HREF="ipsec_auto.8.html">ipsec_auto</A></I>(8) is designed to make using <B>pluto</B> more pleasant.
+Use it!
+<P>
+
+<I><A HREF="ipsec.secrets.5.html">ipsec.secrets</A></I>(5)
+
+describes the format of the secrets file.
+<P>
+
+<I><A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A></I>(3), part of the FreeS/WAN distribution, describes the
+forms that IP addresses may take.
+<I><A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A></I>(3), part of the FreeS/WAN distribution, describes the
+forms that subnet specifications.
+<P>
+
+For more information on IPsec, the mailing list, and the relevant
+documents, see:
+<DL COMPACT>
+<DT><DD>
+
+<I><A HREF="http://www.ietf.cnri.reston.va.us/html.charters/ipsec-charter.html">http://www.ietf.cnri.reston.va.us/html.charters/ipsec-charter.html</A></I>
+
+</DL>
+<P>
+
+At the time of writing, the most relevant IETF RFCs are:
+<DL COMPACT>
+<DT><DD>
+RFC2409 The Internet Key Exchange (IKE)
+<DT><DD>
+RFC2408 Internet Security Association and Key Management Protocol (ISAKMP)
+<DT><DD>
+RFC2407 The Internet IP Security Domain of Interpretation for ISAKMP
+</DL>
+<P>
+
+The FreeS/WAN web site &lt;<A HREF="htp://www.freeswan.org">htp://www.freeswan.org</A>&gt;
+and the mailing lists described there.
+<A NAME="lbAZ">&nbsp;</A>
+<H2>HISTORY</H2>
+
+This code is released under the GPL terms.
+See the accompanying file COPYING-2.0 for more details.
+The GPL does NOT apply to those pieces of code written by others
+which are included in this distribution, except as noted by the
+individual authors.
+<P>
+
+This software was originally written
+for the FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by Angelos D. Keromytis
+(<A HREF="mailto:angelos@dsl.cis.upenn.edu">angelos@dsl.cis.upenn.edu</A>), in May/June 1997, in Athens, Greece.
+Thanks go to John Ioannidis for his help.
+<P>
+
+It is currently (2000)
+being developed and maintained by D. Hugh Redelmeier
+(<A HREF="mailto:hugh@mimosa.com">hugh@mimosa.com</A>), in Canada. The regulations of Greece and Canada
+allow us to make the code freely redistributable.
+<P>
+
+Kai Martius (<A HREF="mailto:admin@imib.med.tu-dresden.de">admin@imib.med.tu-dresden.de</A>) contributed the initial
+version of the code supporting PFS.
+<P>
+
+Richard Guy Briggs &lt;<A HREF="mailto:rgb@conscoop.ottawa.on.ca">rgb@conscoop.ottawa.on.ca</A>&gt; and Peter Onion
+&lt;<A HREF="mailto:ponion@srd.bt.co.uk">ponion@srd.bt.co.uk</A>&gt; added the PFKEY2 support.
+<P>
+
+We gratefully acknowledge that we use parts of Eric Young's <I>libdes</I>
+package; see <I>../libdes/COPYRIGHT</I>.
+<A NAME="lbBA">&nbsp;</A>
+<H2>BUGS</H2>
+
+<B>pluto</B>
+
+is a work-in-progress. It currently has many limitations.
+For example, it ignores notification messages that it receives, and
+it generates only Delete Notifications and those only for IPSEC SAs.
+<P>
+
+<B>pluto</B> does not support the Commit Flag.
+The Commit Flag is a bad feature of the IKE protocol.
+It isn't protected -- neither encrypted nor authenticated.
+A man in the middle could turn it on, leading to DoS.
+We just ignore it, with a warning.
+This should let us interoperate with
+implementations that insist on it, with minor damage.
+<P>
+
+<B>pluto</B> does not check that the SA returned by the Responder
+is actually one that was proposed. It only checks that the SA is
+acceptable. The difference is not large, but can show up in attributes
+such as SA lifetime.
+<P>
+
+There is no good way for a connection to be automatically terminated.
+This is a problem for Road Warrior and Opportunistic connections.
+The <B>--dontrekey</B> option does prevent the SAs from
+being rekeyed on expiry.
+Additonally, if a Road Warrior connection has a client subnet with a fixed IP
+address, a negotiation with that subnet will cause any other
+connection instantiations with that same subnet to be unoriented
+(deleted, in effect).
+See also the --uniqueids option for an extension of this.
+<P>
+
+When <B>pluto</B> sends a message to a peer that has disappeared,
+<B>pluto</B> receives incomplete information from the kernel, so it
+logs the unsatisfactory message ``some IKE message we sent has been
+rejected with ECONNREFUSED (kernel supplied no details)''. John
+Denker suggests that this command is useful for tracking down the
+source of these problems:
+<BR>
+
+<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>tcpdump -i eth0 icmp[0] != 8 and icmp[0] != 0<BR>
+<BR>
+
+Substitute your public interface for eth0 if it is different.
+<P>
+
+The word ``authenticate'' is used for two different features. We must
+authenticate each IKE peer to the other. This is an important task of
+Phase 1. Each packet must be authenticated, both in IKE and in IPsec,
+and the method for IPsec is negotiated as an AH SA or part of an ESP SA.
+Unfortunately, the protocol has no mechanism for authenticating the Phase 2
+identities.
+<P>
+
+Bugs should be reported to the &lt;<A HREF="mailto:users@lists.freeswan.org">users@lists.freeswan.org</A>&gt; mailing list.
+Caution: we cannot accept
+actual code from US residents, or even US citizens living outside the
+US, because that would bring FreeS/WAN under US export law. Some
+other countries cause similar problems. In general, we would prefer
+that you send detailed problem reports rather than code: we want
+FreeS/WAN to be unquestionably freely exportable, which means being
+very careful about where the code comes from, and for a small bug fix,
+that is often more time-consuming than just reinventing the fix
+ourselves.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DL>
+<DT><A HREF="#lbAE">IKE's Job</A><DD>
+<DT><A HREF="#lbAF">Pluto</A><DD>
+<DT><A HREF="#lbAG">Before Running Pluto</A><DD>
+<DT><A HREF="#lbAH">Setting up <B>KLIPS</B> for <B>pluto</B></A><DD>
+<DT><A HREF="#lbAI">ipsec.secrets file</A><DD>
+<DT><A HREF="#lbAJ">Running Pluto</A><DD>
+<DT><A HREF="#lbAK">Pluto's Internal State</A><DD>
+<DT><A HREF="#lbAL">Using Whack</A><DD>
+<DT><A HREF="#lbAM">Examples</A><DD>
+<DT><A HREF="#lbAN">The updown command</A><DD>
+<DT><A HREF="#lbAO">Rekeying</A><DD>
+<DT><A HREF="#lbAP">Selecting a Connection When Responding: Road Warrior Support</A><DD>
+<DT><A HREF="#lbAQ">Debugging</A><DD>
+<DT><A HREF="#lbAR">Pluto's Behaviour When Things Go Wrong</A><DD>
+<DT><A HREF="#lbAS">Notes</A><DD>
+<DT><A HREF="#lbAT">Policies</A><DD>
+</DL>
+<DT><A HREF="#lbAU">SIGNALS</A><DD>
+<DT><A HREF="#lbAV">EXIT STATUS</A><DD>
+<DT><A HREF="#lbAW">FILES</A><DD>
+<DT><A HREF="#lbAX">ENVIRONMENT</A><DD>
+<DT><A HREF="#lbAY">SEE ALSO</A><DD>
+<DT><A HREF="#lbAZ">HISTORY</A><DD>
+<DT><A HREF="#lbBA">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_portof.3.html b/doc/manpage.d/ipsec_portof.3.html
new file mode 100644
index 000000000..3965ca62d
--- /dev/null
+++ b/doc/manpage.d/ipsec_portof.3.html
@@ -0,0 +1,143 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_PORTOF</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_PORTOF</H1>
+Section: C Library Functions (3)<BR>Updated: 8 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec portof - get port field of an ip_address
+<BR>
+
+ipsec setportof - set port field of an ip_address
+<BR>
+
+ipsec sockaddrof - get pointer to internal sockaddr of an ip_address
+<BR>
+
+ipsec sockaddrlenof - get length of internal sockaddr of an ip_address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int portof(const ip_address *src);</B>
+
+<BR>
+
+<B>void setportof(int port, ip_address *dst);</B>
+
+<BR>
+
+<B>struct sockaddr *sockaddrof(ip_address *src);</B>
+
+<BR>
+
+<B>size_t sockaddrlenof(const ip_address *src);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+internal type
+<I>ip_address</I>
+
+contains one of the
+<I>sockaddr</I>
+
+types internally.
+<I>Reliance on this feature is discouraged</I>,
+but it may occasionally be necessary.
+These functions provide low-level tools for this purpose.
+<P>
+
+<I>Portof</I>
+
+and
+<I>setportof</I>
+
+respectively read and write the port-number field of the internal
+<I>sockaddr</I>.
+
+The values are in network byte order.
+<P>
+
+<I>Sockaddrof</I>
+
+returns a pointer to the internal
+<I>sockaddr</I>,
+
+for passing to other functions.
+<P>
+
+<I>Sockaddrlenof</I>
+
+reports the size of the internal
+<I>sockaddr</I>,
+
+for use in storage allocation.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_initaddr.3.html">ipsec_initaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+<I>Portof</I>
+
+returns
+<B>-1</B>,
+
+<I>sockaddrof</I>
+
+returns
+<B>NULL</B>,
+
+and
+<I>sockaddrlenof</I>
+
+returns
+<B>0</B>
+
+if an unknown address family is found within the
+<I>ip_address</I>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+These functions all depend on low-level details of the
+<I>ip_address</I>
+
+type, which are in principle subject to change.
+Avoid using them unless really necessary.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_prng.3.html b/doc/manpage.d/ipsec_prng.3.html
new file mode 100644
index 000000000..27763a2bb
--- /dev/null
+++ b/doc/manpage.d/ipsec_prng.3.html
@@ -0,0 +1,204 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_PRNG</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_PRNG</H1>
+Section: C Library Functions (3)<BR>Updated: 1 April 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec prng_init - initialize IPsec pseudorandom-number generator
+<BR>
+
+ipsec prng_bytes - get bytes from IPsec pseudorandom-number generator
+<BR>
+
+ipsec prng_final - close down IPsec pseudorandom-number generator
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>void prng_init(struct prng *prng,</B>
+
+<BR>
+&nbsp;
+<B>const unsigned char *key, size_t keylen);</B>
+
+<BR>
+
+<B>void prng_bytes(struct prng *prng, char *dst,</B>
+
+<BR>
+&nbsp;
+<B>size_t dstlen);</B>
+
+<BR>
+
+<B>unsigned long prng_count(struct prng *prng);</B>
+
+<BR>
+
+<B>void prng_final(struct prng *prng);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Prng_init</I>
+
+initializes a crypto-quality pseudo-random-number generator from a key;
+<I>prng_bytes</I>
+
+obtains pseudo-random bytes from it;
+<I>prng_count</I>
+
+reports the number of bytes extracted from it to date;
+<I>prng_final</I>
+
+closes it down.
+It is the user's responsibility to initialize a PRNG before using it,
+and not to use it again after it is closed down.
+<P>
+
+<I>Prng_init</I>
+
+initializes,
+or re-initializes,
+the specified
+<I>prng</I>
+
+from the
+<I>key</I>,
+
+whose length is given by
+<I>keylen</I>.
+
+The user must allocate the
+<B>struct prng</B>
+
+pointed to by
+<I>prng</I>.
+
+There is no particular constraint on the length of the key,
+although a key longer than 256 bytes is unnecessary because
+only the first 256 would be used.
+Initialization requires on the order of 3000 integer operations,
+independent of key length.
+<P>
+
+<I>Prng_bytes</I>
+
+obtains
+<I>dstlen</I>
+
+pseudo-random bytes from the PRNG and puts them in
+<I>buf</I>.
+
+This is quite fast,
+on the order of 10 integer operations per byte.
+<P>
+
+<I>Prng_count</I>
+
+reports the number of bytes obtained from the PRNG
+since it was (last) initialized.
+<P>
+
+<I>Prng_final</I>
+
+closes down a PRNG by
+zeroing its internal memory,
+obliterating all trace of the state used to generate its previous output.
+This requires on the order of 250 integer operations.
+<P>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file supplies the definition of the
+<B>prng</B>
+
+structure.
+Examination of its innards is discouraged, as they may change.
+<P>
+
+The PRNG algorithm
+used by these functions is currently identical to that of RC4(TM).
+This algorithm is cryptographically strong,
+sufficiently unpredictable that even a hostile observer will
+have difficulty determining the next byte of output from past history,
+provided it is initialized from a reasonably large key composed of
+highly random bytes (see
+<I><A HREF="random.4.html">random</A></I>(4)).
+
+The usual run of software pseudo-random-number generators
+(e.g.
+<I><A HREF="random.3.html">random</A></I>(3))
+
+are
+<I>not</I>
+
+cryptographically strong.
+<P>
+
+The well-known attacks against RC4(TM),
+e.g. as found in 802.11b's WEP encryption system,
+apply only if multiple PRNGs are initialized with closely-related keys
+(e.g., using a counter appended to a base key).
+If such keys are used, the first few hundred pseudo-random bytes
+from each PRNG should be discarded,
+to give the PRNGs a chance to randomize their innards properly.
+No useful attacks are known if the key is well randomized to begin with.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="random.3.html">random</A>(3), <A HREF="random.4.html">random</A>(4)
+<BR>
+
+Bruce Schneier,
+<I>Applied Cryptography</I>, 2nd ed., 1996, ISBN 0-471-11709-9,
+pp. 397-8.
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAG">&nbsp;</A>
+<H2>BUGS</H2>
+
+If an attempt is made to obtain more than 4e9 bytes
+between initializations,
+the PRNG will continue to work but
+<I>prng_count</I>'s
+
+output will stick at
+<B>4000000000</B>.
+
+Fixing this would require a longer integer type and does
+not seem worth the trouble,
+since you should probably re-initialize before then anyway...
+<P>
+
+``RC4'' is a trademark of RSA Data Security, Inc.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+<DT><A HREF="#lbAG">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_prng_bytes.3.html b/doc/manpage.d/ipsec_prng_bytes.3.html
new file mode 100644
index 000000000..27763a2bb
--- /dev/null
+++ b/doc/manpage.d/ipsec_prng_bytes.3.html
@@ -0,0 +1,204 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_PRNG</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_PRNG</H1>
+Section: C Library Functions (3)<BR>Updated: 1 April 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec prng_init - initialize IPsec pseudorandom-number generator
+<BR>
+
+ipsec prng_bytes - get bytes from IPsec pseudorandom-number generator
+<BR>
+
+ipsec prng_final - close down IPsec pseudorandom-number generator
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>void prng_init(struct prng *prng,</B>
+
+<BR>
+&nbsp;
+<B>const unsigned char *key, size_t keylen);</B>
+
+<BR>
+
+<B>void prng_bytes(struct prng *prng, char *dst,</B>
+
+<BR>
+&nbsp;
+<B>size_t dstlen);</B>
+
+<BR>
+
+<B>unsigned long prng_count(struct prng *prng);</B>
+
+<BR>
+
+<B>void prng_final(struct prng *prng);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Prng_init</I>
+
+initializes a crypto-quality pseudo-random-number generator from a key;
+<I>prng_bytes</I>
+
+obtains pseudo-random bytes from it;
+<I>prng_count</I>
+
+reports the number of bytes extracted from it to date;
+<I>prng_final</I>
+
+closes it down.
+It is the user's responsibility to initialize a PRNG before using it,
+and not to use it again after it is closed down.
+<P>
+
+<I>Prng_init</I>
+
+initializes,
+or re-initializes,
+the specified
+<I>prng</I>
+
+from the
+<I>key</I>,
+
+whose length is given by
+<I>keylen</I>.
+
+The user must allocate the
+<B>struct prng</B>
+
+pointed to by
+<I>prng</I>.
+
+There is no particular constraint on the length of the key,
+although a key longer than 256 bytes is unnecessary because
+only the first 256 would be used.
+Initialization requires on the order of 3000 integer operations,
+independent of key length.
+<P>
+
+<I>Prng_bytes</I>
+
+obtains
+<I>dstlen</I>
+
+pseudo-random bytes from the PRNG and puts them in
+<I>buf</I>.
+
+This is quite fast,
+on the order of 10 integer operations per byte.
+<P>
+
+<I>Prng_count</I>
+
+reports the number of bytes obtained from the PRNG
+since it was (last) initialized.
+<P>
+
+<I>Prng_final</I>
+
+closes down a PRNG by
+zeroing its internal memory,
+obliterating all trace of the state used to generate its previous output.
+This requires on the order of 250 integer operations.
+<P>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file supplies the definition of the
+<B>prng</B>
+
+structure.
+Examination of its innards is discouraged, as they may change.
+<P>
+
+The PRNG algorithm
+used by these functions is currently identical to that of RC4(TM).
+This algorithm is cryptographically strong,
+sufficiently unpredictable that even a hostile observer will
+have difficulty determining the next byte of output from past history,
+provided it is initialized from a reasonably large key composed of
+highly random bytes (see
+<I><A HREF="random.4.html">random</A></I>(4)).
+
+The usual run of software pseudo-random-number generators
+(e.g.
+<I><A HREF="random.3.html">random</A></I>(3))
+
+are
+<I>not</I>
+
+cryptographically strong.
+<P>
+
+The well-known attacks against RC4(TM),
+e.g. as found in 802.11b's WEP encryption system,
+apply only if multiple PRNGs are initialized with closely-related keys
+(e.g., using a counter appended to a base key).
+If such keys are used, the first few hundred pseudo-random bytes
+from each PRNG should be discarded,
+to give the PRNGs a chance to randomize their innards properly.
+No useful attacks are known if the key is well randomized to begin with.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="random.3.html">random</A>(3), <A HREF="random.4.html">random</A>(4)
+<BR>
+
+Bruce Schneier,
+<I>Applied Cryptography</I>, 2nd ed., 1996, ISBN 0-471-11709-9,
+pp. 397-8.
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAG">&nbsp;</A>
+<H2>BUGS</H2>
+
+If an attempt is made to obtain more than 4e9 bytes
+between initializations,
+the PRNG will continue to work but
+<I>prng_count</I>'s
+
+output will stick at
+<B>4000000000</B>.
+
+Fixing this would require a longer integer type and does
+not seem worth the trouble,
+since you should probably re-initialize before then anyway...
+<P>
+
+``RC4'' is a trademark of RSA Data Security, Inc.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+<DT><A HREF="#lbAG">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_prng_final.3.html b/doc/manpage.d/ipsec_prng_final.3.html
new file mode 100644
index 000000000..27763a2bb
--- /dev/null
+++ b/doc/manpage.d/ipsec_prng_final.3.html
@@ -0,0 +1,204 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_PRNG</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_PRNG</H1>
+Section: C Library Functions (3)<BR>Updated: 1 April 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec prng_init - initialize IPsec pseudorandom-number generator
+<BR>
+
+ipsec prng_bytes - get bytes from IPsec pseudorandom-number generator
+<BR>
+
+ipsec prng_final - close down IPsec pseudorandom-number generator
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>void prng_init(struct prng *prng,</B>
+
+<BR>
+&nbsp;
+<B>const unsigned char *key, size_t keylen);</B>
+
+<BR>
+
+<B>void prng_bytes(struct prng *prng, char *dst,</B>
+
+<BR>
+&nbsp;
+<B>size_t dstlen);</B>
+
+<BR>
+
+<B>unsigned long prng_count(struct prng *prng);</B>
+
+<BR>
+
+<B>void prng_final(struct prng *prng);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Prng_init</I>
+
+initializes a crypto-quality pseudo-random-number generator from a key;
+<I>prng_bytes</I>
+
+obtains pseudo-random bytes from it;
+<I>prng_count</I>
+
+reports the number of bytes extracted from it to date;
+<I>prng_final</I>
+
+closes it down.
+It is the user's responsibility to initialize a PRNG before using it,
+and not to use it again after it is closed down.
+<P>
+
+<I>Prng_init</I>
+
+initializes,
+or re-initializes,
+the specified
+<I>prng</I>
+
+from the
+<I>key</I>,
+
+whose length is given by
+<I>keylen</I>.
+
+The user must allocate the
+<B>struct prng</B>
+
+pointed to by
+<I>prng</I>.
+
+There is no particular constraint on the length of the key,
+although a key longer than 256 bytes is unnecessary because
+only the first 256 would be used.
+Initialization requires on the order of 3000 integer operations,
+independent of key length.
+<P>
+
+<I>Prng_bytes</I>
+
+obtains
+<I>dstlen</I>
+
+pseudo-random bytes from the PRNG and puts them in
+<I>buf</I>.
+
+This is quite fast,
+on the order of 10 integer operations per byte.
+<P>
+
+<I>Prng_count</I>
+
+reports the number of bytes obtained from the PRNG
+since it was (last) initialized.
+<P>
+
+<I>Prng_final</I>
+
+closes down a PRNG by
+zeroing its internal memory,
+obliterating all trace of the state used to generate its previous output.
+This requires on the order of 250 integer operations.
+<P>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file supplies the definition of the
+<B>prng</B>
+
+structure.
+Examination of its innards is discouraged, as they may change.
+<P>
+
+The PRNG algorithm
+used by these functions is currently identical to that of RC4(TM).
+This algorithm is cryptographically strong,
+sufficiently unpredictable that even a hostile observer will
+have difficulty determining the next byte of output from past history,
+provided it is initialized from a reasonably large key composed of
+highly random bytes (see
+<I><A HREF="random.4.html">random</A></I>(4)).
+
+The usual run of software pseudo-random-number generators
+(e.g.
+<I><A HREF="random.3.html">random</A></I>(3))
+
+are
+<I>not</I>
+
+cryptographically strong.
+<P>
+
+The well-known attacks against RC4(TM),
+e.g. as found in 802.11b's WEP encryption system,
+apply only if multiple PRNGs are initialized with closely-related keys
+(e.g., using a counter appended to a base key).
+If such keys are used, the first few hundred pseudo-random bytes
+from each PRNG should be discarded,
+to give the PRNGs a chance to randomize their innards properly.
+No useful attacks are known if the key is well randomized to begin with.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="random.3.html">random</A>(3), <A HREF="random.4.html">random</A>(4)
+<BR>
+
+Bruce Schneier,
+<I>Applied Cryptography</I>, 2nd ed., 1996, ISBN 0-471-11709-9,
+pp. 397-8.
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAG">&nbsp;</A>
+<H2>BUGS</H2>
+
+If an attempt is made to obtain more than 4e9 bytes
+between initializations,
+the PRNG will continue to work but
+<I>prng_count</I>'s
+
+output will stick at
+<B>4000000000</B>.
+
+Fixing this would require a longer integer type and does
+not seem worth the trouble,
+since you should probably re-initialize before then anyway...
+<P>
+
+``RC4'' is a trademark of RSA Data Security, Inc.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+<DT><A HREF="#lbAG">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_prng_init.3.html b/doc/manpage.d/ipsec_prng_init.3.html
new file mode 100644
index 000000000..27763a2bb
--- /dev/null
+++ b/doc/manpage.d/ipsec_prng_init.3.html
@@ -0,0 +1,204 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_PRNG</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_PRNG</H1>
+Section: C Library Functions (3)<BR>Updated: 1 April 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec prng_init - initialize IPsec pseudorandom-number generator
+<BR>
+
+ipsec prng_bytes - get bytes from IPsec pseudorandom-number generator
+<BR>
+
+ipsec prng_final - close down IPsec pseudorandom-number generator
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>void prng_init(struct prng *prng,</B>
+
+<BR>
+&nbsp;
+<B>const unsigned char *key, size_t keylen);</B>
+
+<BR>
+
+<B>void prng_bytes(struct prng *prng, char *dst,</B>
+
+<BR>
+&nbsp;
+<B>size_t dstlen);</B>
+
+<BR>
+
+<B>unsigned long prng_count(struct prng *prng);</B>
+
+<BR>
+
+<B>void prng_final(struct prng *prng);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Prng_init</I>
+
+initializes a crypto-quality pseudo-random-number generator from a key;
+<I>prng_bytes</I>
+
+obtains pseudo-random bytes from it;
+<I>prng_count</I>
+
+reports the number of bytes extracted from it to date;
+<I>prng_final</I>
+
+closes it down.
+It is the user's responsibility to initialize a PRNG before using it,
+and not to use it again after it is closed down.
+<P>
+
+<I>Prng_init</I>
+
+initializes,
+or re-initializes,
+the specified
+<I>prng</I>
+
+from the
+<I>key</I>,
+
+whose length is given by
+<I>keylen</I>.
+
+The user must allocate the
+<B>struct prng</B>
+
+pointed to by
+<I>prng</I>.
+
+There is no particular constraint on the length of the key,
+although a key longer than 256 bytes is unnecessary because
+only the first 256 would be used.
+Initialization requires on the order of 3000 integer operations,
+independent of key length.
+<P>
+
+<I>Prng_bytes</I>
+
+obtains
+<I>dstlen</I>
+
+pseudo-random bytes from the PRNG and puts them in
+<I>buf</I>.
+
+This is quite fast,
+on the order of 10 integer operations per byte.
+<P>
+
+<I>Prng_count</I>
+
+reports the number of bytes obtained from the PRNG
+since it was (last) initialized.
+<P>
+
+<I>Prng_final</I>
+
+closes down a PRNG by
+zeroing its internal memory,
+obliterating all trace of the state used to generate its previous output.
+This requires on the order of 250 integer operations.
+<P>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file supplies the definition of the
+<B>prng</B>
+
+structure.
+Examination of its innards is discouraged, as they may change.
+<P>
+
+The PRNG algorithm
+used by these functions is currently identical to that of RC4(TM).
+This algorithm is cryptographically strong,
+sufficiently unpredictable that even a hostile observer will
+have difficulty determining the next byte of output from past history,
+provided it is initialized from a reasonably large key composed of
+highly random bytes (see
+<I><A HREF="random.4.html">random</A></I>(4)).
+
+The usual run of software pseudo-random-number generators
+(e.g.
+<I><A HREF="random.3.html">random</A></I>(3))
+
+are
+<I>not</I>
+
+cryptographically strong.
+<P>
+
+The well-known attacks against RC4(TM),
+e.g. as found in 802.11b's WEP encryption system,
+apply only if multiple PRNGs are initialized with closely-related keys
+(e.g., using a counter appended to a base key).
+If such keys are used, the first few hundred pseudo-random bytes
+from each PRNG should be discarded,
+to give the PRNGs a chance to randomize their innards properly.
+No useful attacks are known if the key is well randomized to begin with.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="random.3.html">random</A>(3), <A HREF="random.4.html">random</A>(4)
+<BR>
+
+Bruce Schneier,
+<I>Applied Cryptography</I>, 2nd ed., 1996, ISBN 0-471-11709-9,
+pp. 397-8.
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAG">&nbsp;</A>
+<H2>BUGS</H2>
+
+If an attempt is made to obtain more than 4e9 bytes
+between initializations,
+the PRNG will continue to work but
+<I>prng_count</I>'s
+
+output will stick at
+<B>4000000000</B>.
+
+Fixing this would require a longer integer type and does
+not seem worth the trouble,
+since you should probably re-initialize before then anyway...
+<P>
+
+``RC4'' is a trademark of RSA Data Security, Inc.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+<DT><A HREF="#lbAG">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_ranbits.8.html b/doc/manpage.d/ipsec_ranbits.8.html
new file mode 100644
index 000000000..036b2a351
--- /dev/null
+++ b/doc/manpage.d/ipsec_ranbits.8.html
@@ -0,0 +1,147 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_RANBITS</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_RANBITS</H1>
+Section: Maintenance Commands (8)<BR>Updated: 22 Aug 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ranbits - generate random bits in ASCII form
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>ranbits</B>
+
+[
+<B>--quick</B>
+
+] [
+<B>--continuous</B>
+
+] [
+<B>--bytes</B>
+
+] nbits
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Ranbits</I>
+
+obtains
+<I>nbits</I>
+
+(rounded up to the nearest byte)
+high-quality random bits from
+<I><A HREF="random.4.html">random</A></I>(4),
+
+and emits them on standard output as an ASCII string.
+The default output format is
+<I><A HREF="datatot.3.html">datatot</A></I>(3)
+
+<B>h</B>
+
+format:
+lowercase hexadecimal with a
+<B>0x</B>
+
+prefix and an underscore every 32 bits.
+<P>
+
+The
+<B>--quick</B>
+
+option produces quick-and-dirty random bits:
+instead of using the high-quality random bits from
+<I>/dev/random</I>,
+
+which may take some time to supply the necessary bits if
+<I>nbits</I>
+
+is large,
+<I>ranbits</I>
+
+uses
+<I>/dev/urandom</I>,
+
+which yields prompt results but lower-quality randomness.
+<P>
+
+The
+<B>--continuous</B>
+
+option uses
+<I><A HREF="datatot.3.html">datatot</A></I>(3)
+
+<B>x</B>
+
+output format, like
+<B>h</B>
+
+but without the underscores.
+<P>
+
+The
+<B>--bytes</B>
+
+option causes
+<I>nbits</I>
+
+to be interpreted as a byte count rather than a bit count.
+<A NAME="lbAE">&nbsp;</A>
+<H2>FILES</H2>
+
+/dev/random, /dev/urandom
+<A NAME="lbAF">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec_datatot.3.html">ipsec_datatot</A>(3), <A HREF="random.4.html">random</A>(4)
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+There is an internal limit on
+<I>nbits</I>,
+
+currently 20000.
+<P>
+
+Without
+<B>--quick</B>,
+
+<I>ranbits</I>'s
+
+run time is difficult to predict.
+A request for a large number of bits,
+at a time when the system's entropy pool is low on randomness,
+may take quite a while to satisfy.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">FILES</A><DD>
+<DT><A HREF="#lbAF">SEE ALSO</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_rangetoa.3.html b/doc/manpage.d/ipsec_rangetoa.3.html
new file mode 100644
index 000000000..3bacd5943
--- /dev/null
+++ b/doc/manpage.d/ipsec_rangetoa.3.html
@@ -0,0 +1,294 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ATOASR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ATOASR</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec atoasr - convert ASCII to Internet address, subnet, or range
+<BR>
+
+ipsec rangetoa - convert Internet address range to ASCII
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *atoasr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>char *type, struct in_addr *addrs);</B>
+
+<BR>
+
+<B>size_t rangetoa(struct in_addr *addrs, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete;
+there is no current equivalent,
+because so far they have not proved useful.
+<P>
+
+<I>Atoasr</I>
+
+converts an ASCII address, subnet, or address range
+into a suitable combination of binary addresses
+(in network byte order).
+<I>Rangetoa</I>
+
+converts an address range back into ASCII,
+using dotted-decimal form for the addresses
+(the other reverse conversions are handled by
+<I><A HREF="ipsec_addrtoa.3.html">ipsec_addrtoa</A></I>(3)
+
+and
+<I><A HREF="ipsec_subnettoa.3.html">ipsec_subnettoa</A></I>(3)).
+
+<P>
+
+A single address can be any form acceptable to
+<I><A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A></I>(3):
+
+dotted decimal, DNS name, or hexadecimal number.
+A subnet
+specification uses the form <I>network</I><B>/</B><I>mask</I>
+interpreted by
+<I><A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A></I>(3).
+
+<P>
+
+An address range is two
+<I><A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A></I>(3)
+
+addresses separated by a
+<B>...</B>
+
+delimiter.
+If there are four dots rather than three, the first is taken as
+part of the begin address,
+e.g. for a complete DNS name which ends with
+<B>.</B>
+
+to suppress completion attempts.
+The begin address of a range must be
+less than or equal to the end address.
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>atoasr</I>
+
+specifies the length of the ASCII string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>type</I>
+
+parameter of
+<I>atoasr</I>
+
+must point to a
+<B>char</B>
+
+variable used to record which form was found.
+The
+<I>addrs</I>
+
+parameter must point to a two-element array of
+<B>struct in_addr</B>
+
+which receives the results.
+The values stored into
+<B>*type</B>,
+
+and the corresponding values in the array, are:
+<P>
+
+
+
+<TT>&nbsp;&nbsp;&nbsp;</TT>*typeaddrs[0]addrs[1]<BR>
+<P>
+address<B>'a'</B>address-<BR>
+<BR>
+
+subnet<TT>&nbsp;</TT><B>'s'</B>networkmask<BR>
+<BR>
+
+range<TT>&nbsp;&nbsp;</TT><B>'r'</B>beginend<BR>
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>rangetoa</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines a constant,
+<B>RANGETOA_BUF</B>,
+
+which is the size of a buffer just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>rangetoa</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the ASCII character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default,
+and is in fact the only format currently available.
+This parameter is a hedge against future needs.
+<P>
+
+<I>Atoasr</I>
+
+returns NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<I>Rangetoa</I>
+
+returns
+<B>0</B>
+
+for a failure, and otherwise
+always returns the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A>(3), <A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>atoasr</I>
+
+are:
+empty input;
+error in
+<I><A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A></I>(3)
+
+or
+<I><A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A></I>(3)
+
+during conversion;
+begin address of range exceeds end address.
+<P>
+
+Fatal errors in
+<I>rangetoa</I>
+
+are:
+unknown format.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The restriction of error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = atoasr( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_rangetosubnet.3.html b/doc/manpage.d/ipsec_rangetosubnet.3.html
new file mode 100644
index 000000000..9e03244ea
--- /dev/null
+++ b/doc/manpage.d/ipsec_rangetosubnet.3.html
@@ -0,0 +1,116 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_RANGETOSUBNET</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_RANGETOSUBNET</H1>
+Section: C Library Functions (3)<BR>Updated: 8 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec rangetosubnet - convert address range to subnet
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *rangetosubnet(const ip_address *start,</B>
+
+<BR>
+&nbsp;
+<B>const ip_address *stop, ip_subnet *dst);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Rangetosubnet</I>
+
+accepts two IP addresses which define an address range,
+from
+<I>start</I>
+
+to
+<I>stop</I>
+
+inclusive,
+and converts this to a subnet if possible.
+The addresses must both be IPv4 or both be IPv6,
+and the address family of the resulting subnet is the same.
+<P>
+
+<I>Rangetosubnet</I>
+
+returns NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec_initsubnet.3.html">ipsec_initsubnet</A>(3), <A HREF="ipsec_ttosubnet.3.html">ipsec_ttosubnet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>rangetosubnet</I>
+
+are:
+mixed address families;
+unknown address family;
+<I>start</I>
+
+and
+<I>stop</I>
+
+do not define a subnet.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The restriction of error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = rangetosubnet( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_rsasigkey.8.html b/doc/manpage.d/ipsec_rsasigkey.8.html
new file mode 100644
index 000000000..3173a9f13
--- /dev/null
+++ b/doc/manpage.d/ipsec_rsasigkey.8.html
@@ -0,0 +1,401 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_RSASIGKEY</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_RSASIGKEY</H1>
+Section: Maintenance Commands (8)<BR>Updated: 22 July 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec rsasigkey - generate RSA signature key
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>rsasigkey</B>
+
+[
+<B>--verbose</B>
+
+] [
+<B>--random</B>
+
+filename
+]
+<B>\</B>
+
+<BR>
+
+&nbsp;&nbsp;&nbsp;[
+<B>--rounds</B>
+
+nr
+] [
+<B>--hostname</B>
+
+host ] [
+<B>--noopt</B>
+
+] nbits
+<BR>
+
+<B>ipsec</B>
+
+<B>rsasigkey</B>
+
+[
+<B>--verbose</B>
+
+] [
+<B>--hostname</B>
+
+host ]
+<B>\</B>
+
+<BR>
+
+&nbsp;&nbsp;&nbsp;
+[
+<B>--noopt</B>
+
+]
+<B>--oldkey</B>
+
+file
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Rsasigkey</I>
+
+generates an RSA public/private key pair,
+suitable for digital signatures,
+of (exactly)
+<I>nbits</I>
+
+bits (that is, two primes each of exactly
+<I>nbits</I>/2
+
+bits,
+and related numbers)
+and emits it on standard output as ASCII (mostly hex) data.
+<I>nbits</I>
+
+must be a multiple of 16.
+<P>
+
+The public exponent is forced to the value
+<B>3</B>,
+
+which has important speed advantages for signature checking.
+Beware that the resulting keys have known weaknesses as encryption keys
+<I>and should not be used for that purpose</I>.
+<P>
+
+The
+<B>--verbose</B>
+
+option makes
+<I>rsasigkey</I>
+
+give a running commentary on standard error.
+By default, it works in silence until it is ready to generate output.
+<P>
+
+The
+<B>--random</B>
+
+option specifies a source for random bits.
+The default is
+<I>/dev/random</I>
+
+(see
+<I><A HREF="random.4.html">random</A></I>(4)).
+
+Normally,
+<I>rsasigkey</I>
+
+reads exactly
+<I>nbits</I>
+
+random bits from the source;
+in extremely-rare circumstances it may need more.
+<P>
+
+The
+<B>--rounds</B>
+
+option specifies the number of rounds to be done by the
+<I>mpz_probab_prime_p</I>
+
+probabilistic primality checker.
+The default, 30, is fairly rigorous and should not normally
+have to be overridden.
+<P>
+
+The
+<B>--hostname</B>
+
+option specifies what host name to use in
+the first line of the output (see below);
+the default is what
+<I><A HREF="gethostname.2.html">gethostname</A></I>(2)
+
+returns.
+<P>
+
+The
+<B>--noopt</B>
+
+option suppresses an optimization of the private key
+(to be precise, setting of the decryption exponent to
+<B>lcm(p-1,q-1)</B>
+
+rather than
+<B>(p-1)*(q-1)</B>)
+
+which speeds up operations on it slightly
+but can cause it to flunk a validity check in old RSA implementations
+(notably, obsolete versions of
+<I><A HREF="ipsec_pluto.8.html">ipsec_pluto</A></I>(8)).
+
+<P>
+
+The
+<B>--oldkey</B>
+
+option specifies that rather than generate a new key,
+<I>rsasigkey</I>
+
+should read an old key from the
+<I>file</I>
+
+(the name
+<B>-</B>
+
+means ``standard input'')
+and use that to generate its output.
+Input lines which do not look like
+<I>rsasigkey</I>
+
+output are silently ignored.
+This permits updating old keys to the current format.
+<P>
+
+The output format looks like this (with long numbers trimmed down
+for clarity):
+<P>
+
+
+<PRE>
+ # RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000
+ # for signatures only, UNSAFE FOR ENCRYPTION
+ #pubkey=0sAQOF8tZ2NZt...Y1P+buFuFn/
+ Modulus: 0xcc2a86fcf440...cf1011abb82d1
+ PublicExponent: 0x03
+ # everything after this point is secret
+ PrivateExponent: 0x881c59fdf8...ab05c8c77d23
+ Prime1: 0xf49fd1f779...46504c7bf3
+ Prime2: 0xd5a9108453...321d43cb2b
+ Exponent1: 0xa31536a4fb...536d98adda7f7
+ Exponent2: 0x8e70b5ad8d...9142168d7dcc7
+ Coefficient: 0xafb761d001...0c13e98d98
+</PRE>
+
+<P>
+
+The first (comment) line,
+indicating the nature and date of the key,
+and giving a host name,
+is used by
+<I><A HREF="ipsec_showhostkey.8.html">ipsec_showhostkey</A></I>(8)
+
+when generating some forms of key output.
+<P>
+
+The commented-out
+<B>pubkey=</B>
+
+line contains the public key---the public exponent and the modulus---combined
+in approximately RFC 2537 format
+(the one deviation is that the combined value is given with a
+<B>0s</B>
+
+prefix, rather than in unadorned base-64),
+suitable for use in the
+<I>ipsec.conf</I>
+
+file.
+<P>
+
+The
+<B>Modulus</B>,
+
+<B>PublicExponent</B>,
+
+and
+<B>PrivateExponent</B>
+
+lines give the basic signing and verification data.
+<P>
+
+The
+<B>Prime1</B>
+
+and
+<B>Prime2</B>
+
+lines give the primes themselves (aka
+<I>p</I>
+
+and
+<I>q</I>),
+
+largest first.
+The
+<B>Exponent1</B>
+
+and
+<B>Exponent2</B>
+
+lines give
+the private exponent mod
+<I>p-1</I>
+
+and
+<I>q-1</I>
+
+respectively.
+The
+<B>Coefficient</B>
+
+line gives the Chinese Remainder Theorem coefficient,
+which is the inverse of
+<I>q</I>,
+
+mod
+<I>p</I>.
+
+These additional numbers (which must all be kept as secret as the
+private exponent) are precomputed aids to rapid signature generation.
+<P>
+
+No attempt is made to break long lines.
+<P>
+
+The US patent on the RSA algorithm expired 20 Sept 2000.
+<A NAME="lbAE">&nbsp;</A>
+<H2>EXAMPLES</H2>
+
+<DL COMPACT>
+<DT><B>ipsec rsasigkey --verbose 2192 &gt;mykey</B>
+
+<DD>
+generates a 2192-bit signature key and puts it in the file
+<I>mykey</I>,
+
+with running commentary on standard error.
+The file contents can be inserted verbatim into a suitable entry in the
+<I>ipsec.secrets</I>
+
+file (see
+<I><A HREF="ipsec.secrets.5.html">ipsec.secrets</A></I>(5)),
+
+and the public key can then be extracted and edited into the
+<I>ipsec.conf</I>
+
+file (see
+<I><A HREF="ipsec.conf.5.html">ipsec.conf</A></I>(5)).
+
+<DT><B>ipsec rsasigkey --verbose --oldkey oldie &gt;latest</B>
+
+<DD>
+takes the old signature key from file
+<I>oldie</I>
+
+and puts a version in the current format into the file
+<I>latest</I>,
+
+with running commentary on standard error.
+</DL>
+<A NAME="lbAF">&nbsp;</A>
+<H2>FILES</H2>
+
+/dev/random
+<A NAME="lbAG">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="random.4.html">random</A>(4), <A HREF="ipsec_showhostkey.8.html">ipsec_showhostkey</A>(8)
+<BR>
+
+<I>Applied Cryptography</I>, 2nd. ed., by Bruce Schneier, Wiley 1996.
+<BR>
+
+RFCs 2537, 2313.
+<BR>
+
+<I>GNU MP, the GNU multiple precision arithmetic library, edition 2.0.2</I>,
+by Torbj Granlund.
+<A NAME="lbAH">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by Henry Spencer.
+<A NAME="lbAI">&nbsp;</A>
+<H2>BUGS</H2>
+
+There is an internal limit on
+<I>nbits</I>,
+
+currently 20000.
+<P>
+
+<I>Rsasigkey</I>'s
+
+run time is difficult to predict,
+since
+<I>/dev/random</I>
+
+output can be arbitrarily delayed if
+the system's entropy pool is low on randomness,
+and the time taken by the search for primes is also somewhat unpredictable.
+A reasonably typical time for a 1024-bit key on a quiet 200MHz Pentium MMX
+with plenty of randomness available is 20 seconds,
+almost all of it in the prime searches.
+Generating a 2192-bit key on the same system usually takes several minutes.
+A 4096-bit key took an hour and a half of CPU time.
+<P>
+
+The
+<B>--oldkey</B>
+
+option does not check its input format as rigorously as it might.
+Corrupted
+<I>rsasigkey</I>
+
+output may confuse it.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">EXAMPLES</A><DD>
+<DT><A HREF="#lbAF">FILES</A><DD>
+<DT><A HREF="#lbAG">SEE ALSO</A><DD>
+<DT><A HREF="#lbAH">HISTORY</A><DD>
+<DT><A HREF="#lbAI">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_sameaddr.3.html b/doc/manpage.d/ipsec_sameaddr.3.html
new file mode 100644
index 000000000..414a0d513
--- /dev/null
+++ b/doc/manpage.d/ipsec_sameaddr.3.html
@@ -0,0 +1,274 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ANYADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 28 Nov 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec sameaddr - are two addresses the same?
+<BR>
+
+ipsec addrcmp - ordered comparison of addresses
+<BR>
+
+ipsec samesubnet - are two subnets the same?
+<BR>
+
+ipsec addrinsubnet - is an address within a subnet?
+<BR>
+
+ipsec subnetinsubnet - is a subnet within another subnet?
+<BR>
+
+ipsec subnetishost - is a subnet a single host?
+<BR>
+
+ipsec samesaid - are two SA IDs the same?
+<BR>
+
+ipsec sameaddrtype - are two addresses of the same address family?
+<BR>
+
+ipsec samesubnettype - are two subnets of the same address family?
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int sameaddr(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int addrcmp(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int addrinsubnet(const ip_address *a, const ip_subnet *s);</B>
+
+<BR>
+
+<B>int subnetinsubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int subnetishost(const ip_subnet *s);</B>
+
+<BR>
+
+<B>int samesaid(const ip_said *a, const ip_said *b);</B>
+
+<BR>
+
+<B>int sameaddrtype(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnettype(const ip_subnet *a, const ip_subnet *b);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions do various comparisons and tests on the
+<I>ip_address</I>
+
+type and
+<I>ip_subnet</I>
+
+types.
+<P>
+
+<I>Sameaddr</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Addresses of different families are never identical.
+<P>
+
+<I>Addrcmp</I>
+
+returns
+<B>-1</B>,
+
+<B>0</B>,
+
+or
+<B>1</B>
+
+respectively
+if address
+<I>a</I>
+
+is less than, equal to, or greater than
+<I>b</I>.
+
+If they are not of the same address family,
+they are never equal;
+the ordering reported in this case is arbitrary
+(and probably not useful) but consistent.
+<P>
+
+<I>Samesubnet</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Subnets of different address families are never identical.
+<P>
+
+<I>Addrinsubnet</I>
+
+returns
+non-zero
+if address
+<I>a</I>
+
+is within subnet
+<I>s</I>
+
+and
+<B>0</B>
+
+otherwise.
+An address is never within a
+subnet of a different address family.
+<P>
+
+<I>Subnetinsubnet</I>
+
+returns
+non-zero
+if subnet
+<I>a</I>
+
+is a subset of subnet
+<I>b</I>
+
+and
+<B>0</B>
+
+otherwise.
+A subnet is deemed to be a subset of itself.
+A subnet is never a subset of another
+subnet if their address families differ.
+<P>
+
+<I>Subnetishost</I>
+
+returns
+non-zero
+if subnet
+<I>s</I>
+
+is in fact only a single host,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesaid</I>
+
+returns
+non-zero
+if SA IDs
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Sameaddrtype</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesubnettype</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_initaddr.3.html">ipsec_initaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_sameaddrtype.3.html b/doc/manpage.d/ipsec_sameaddrtype.3.html
new file mode 100644
index 000000000..414a0d513
--- /dev/null
+++ b/doc/manpage.d/ipsec_sameaddrtype.3.html
@@ -0,0 +1,274 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ANYADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 28 Nov 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec sameaddr - are two addresses the same?
+<BR>
+
+ipsec addrcmp - ordered comparison of addresses
+<BR>
+
+ipsec samesubnet - are two subnets the same?
+<BR>
+
+ipsec addrinsubnet - is an address within a subnet?
+<BR>
+
+ipsec subnetinsubnet - is a subnet within another subnet?
+<BR>
+
+ipsec subnetishost - is a subnet a single host?
+<BR>
+
+ipsec samesaid - are two SA IDs the same?
+<BR>
+
+ipsec sameaddrtype - are two addresses of the same address family?
+<BR>
+
+ipsec samesubnettype - are two subnets of the same address family?
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int sameaddr(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int addrcmp(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int addrinsubnet(const ip_address *a, const ip_subnet *s);</B>
+
+<BR>
+
+<B>int subnetinsubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int subnetishost(const ip_subnet *s);</B>
+
+<BR>
+
+<B>int samesaid(const ip_said *a, const ip_said *b);</B>
+
+<BR>
+
+<B>int sameaddrtype(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnettype(const ip_subnet *a, const ip_subnet *b);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions do various comparisons and tests on the
+<I>ip_address</I>
+
+type and
+<I>ip_subnet</I>
+
+types.
+<P>
+
+<I>Sameaddr</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Addresses of different families are never identical.
+<P>
+
+<I>Addrcmp</I>
+
+returns
+<B>-1</B>,
+
+<B>0</B>,
+
+or
+<B>1</B>
+
+respectively
+if address
+<I>a</I>
+
+is less than, equal to, or greater than
+<I>b</I>.
+
+If they are not of the same address family,
+they are never equal;
+the ordering reported in this case is arbitrary
+(and probably not useful) but consistent.
+<P>
+
+<I>Samesubnet</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Subnets of different address families are never identical.
+<P>
+
+<I>Addrinsubnet</I>
+
+returns
+non-zero
+if address
+<I>a</I>
+
+is within subnet
+<I>s</I>
+
+and
+<B>0</B>
+
+otherwise.
+An address is never within a
+subnet of a different address family.
+<P>
+
+<I>Subnetinsubnet</I>
+
+returns
+non-zero
+if subnet
+<I>a</I>
+
+is a subset of subnet
+<I>b</I>
+
+and
+<B>0</B>
+
+otherwise.
+A subnet is deemed to be a subset of itself.
+A subnet is never a subset of another
+subnet if their address families differ.
+<P>
+
+<I>Subnetishost</I>
+
+returns
+non-zero
+if subnet
+<I>s</I>
+
+is in fact only a single host,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesaid</I>
+
+returns
+non-zero
+if SA IDs
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Sameaddrtype</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesubnettype</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_initaddr.3.html">ipsec_initaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_samesaid.3.html b/doc/manpage.d/ipsec_samesaid.3.html
new file mode 100644
index 000000000..414a0d513
--- /dev/null
+++ b/doc/manpage.d/ipsec_samesaid.3.html
@@ -0,0 +1,274 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ANYADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 28 Nov 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec sameaddr - are two addresses the same?
+<BR>
+
+ipsec addrcmp - ordered comparison of addresses
+<BR>
+
+ipsec samesubnet - are two subnets the same?
+<BR>
+
+ipsec addrinsubnet - is an address within a subnet?
+<BR>
+
+ipsec subnetinsubnet - is a subnet within another subnet?
+<BR>
+
+ipsec subnetishost - is a subnet a single host?
+<BR>
+
+ipsec samesaid - are two SA IDs the same?
+<BR>
+
+ipsec sameaddrtype - are two addresses of the same address family?
+<BR>
+
+ipsec samesubnettype - are two subnets of the same address family?
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int sameaddr(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int addrcmp(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int addrinsubnet(const ip_address *a, const ip_subnet *s);</B>
+
+<BR>
+
+<B>int subnetinsubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int subnetishost(const ip_subnet *s);</B>
+
+<BR>
+
+<B>int samesaid(const ip_said *a, const ip_said *b);</B>
+
+<BR>
+
+<B>int sameaddrtype(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnettype(const ip_subnet *a, const ip_subnet *b);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions do various comparisons and tests on the
+<I>ip_address</I>
+
+type and
+<I>ip_subnet</I>
+
+types.
+<P>
+
+<I>Sameaddr</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Addresses of different families are never identical.
+<P>
+
+<I>Addrcmp</I>
+
+returns
+<B>-1</B>,
+
+<B>0</B>,
+
+or
+<B>1</B>
+
+respectively
+if address
+<I>a</I>
+
+is less than, equal to, or greater than
+<I>b</I>.
+
+If they are not of the same address family,
+they are never equal;
+the ordering reported in this case is arbitrary
+(and probably not useful) but consistent.
+<P>
+
+<I>Samesubnet</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Subnets of different address families are never identical.
+<P>
+
+<I>Addrinsubnet</I>
+
+returns
+non-zero
+if address
+<I>a</I>
+
+is within subnet
+<I>s</I>
+
+and
+<B>0</B>
+
+otherwise.
+An address is never within a
+subnet of a different address family.
+<P>
+
+<I>Subnetinsubnet</I>
+
+returns
+non-zero
+if subnet
+<I>a</I>
+
+is a subset of subnet
+<I>b</I>
+
+and
+<B>0</B>
+
+otherwise.
+A subnet is deemed to be a subset of itself.
+A subnet is never a subset of another
+subnet if their address families differ.
+<P>
+
+<I>Subnetishost</I>
+
+returns
+non-zero
+if subnet
+<I>s</I>
+
+is in fact only a single host,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesaid</I>
+
+returns
+non-zero
+if SA IDs
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Sameaddrtype</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesubnettype</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_initaddr.3.html">ipsec_initaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_samesubnet.3.html b/doc/manpage.d/ipsec_samesubnet.3.html
new file mode 100644
index 000000000..414a0d513
--- /dev/null
+++ b/doc/manpage.d/ipsec_samesubnet.3.html
@@ -0,0 +1,274 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ANYADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 28 Nov 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec sameaddr - are two addresses the same?
+<BR>
+
+ipsec addrcmp - ordered comparison of addresses
+<BR>
+
+ipsec samesubnet - are two subnets the same?
+<BR>
+
+ipsec addrinsubnet - is an address within a subnet?
+<BR>
+
+ipsec subnetinsubnet - is a subnet within another subnet?
+<BR>
+
+ipsec subnetishost - is a subnet a single host?
+<BR>
+
+ipsec samesaid - are two SA IDs the same?
+<BR>
+
+ipsec sameaddrtype - are two addresses of the same address family?
+<BR>
+
+ipsec samesubnettype - are two subnets of the same address family?
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int sameaddr(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int addrcmp(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int addrinsubnet(const ip_address *a, const ip_subnet *s);</B>
+
+<BR>
+
+<B>int subnetinsubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int subnetishost(const ip_subnet *s);</B>
+
+<BR>
+
+<B>int samesaid(const ip_said *a, const ip_said *b);</B>
+
+<BR>
+
+<B>int sameaddrtype(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnettype(const ip_subnet *a, const ip_subnet *b);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions do various comparisons and tests on the
+<I>ip_address</I>
+
+type and
+<I>ip_subnet</I>
+
+types.
+<P>
+
+<I>Sameaddr</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Addresses of different families are never identical.
+<P>
+
+<I>Addrcmp</I>
+
+returns
+<B>-1</B>,
+
+<B>0</B>,
+
+or
+<B>1</B>
+
+respectively
+if address
+<I>a</I>
+
+is less than, equal to, or greater than
+<I>b</I>.
+
+If they are not of the same address family,
+they are never equal;
+the ordering reported in this case is arbitrary
+(and probably not useful) but consistent.
+<P>
+
+<I>Samesubnet</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Subnets of different address families are never identical.
+<P>
+
+<I>Addrinsubnet</I>
+
+returns
+non-zero
+if address
+<I>a</I>
+
+is within subnet
+<I>s</I>
+
+and
+<B>0</B>
+
+otherwise.
+An address is never within a
+subnet of a different address family.
+<P>
+
+<I>Subnetinsubnet</I>
+
+returns
+non-zero
+if subnet
+<I>a</I>
+
+is a subset of subnet
+<I>b</I>
+
+and
+<B>0</B>
+
+otherwise.
+A subnet is deemed to be a subset of itself.
+A subnet is never a subset of another
+subnet if their address families differ.
+<P>
+
+<I>Subnetishost</I>
+
+returns
+non-zero
+if subnet
+<I>s</I>
+
+is in fact only a single host,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesaid</I>
+
+returns
+non-zero
+if SA IDs
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Sameaddrtype</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesubnettype</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_initaddr.3.html">ipsec_initaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_samesubnettype.3.html b/doc/manpage.d/ipsec_samesubnettype.3.html
new file mode 100644
index 000000000..414a0d513
--- /dev/null
+++ b/doc/manpage.d/ipsec_samesubnettype.3.html
@@ -0,0 +1,274 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ANYADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 28 Nov 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec sameaddr - are two addresses the same?
+<BR>
+
+ipsec addrcmp - ordered comparison of addresses
+<BR>
+
+ipsec samesubnet - are two subnets the same?
+<BR>
+
+ipsec addrinsubnet - is an address within a subnet?
+<BR>
+
+ipsec subnetinsubnet - is a subnet within another subnet?
+<BR>
+
+ipsec subnetishost - is a subnet a single host?
+<BR>
+
+ipsec samesaid - are two SA IDs the same?
+<BR>
+
+ipsec sameaddrtype - are two addresses of the same address family?
+<BR>
+
+ipsec samesubnettype - are two subnets of the same address family?
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int sameaddr(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int addrcmp(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int addrinsubnet(const ip_address *a, const ip_subnet *s);</B>
+
+<BR>
+
+<B>int subnetinsubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int subnetishost(const ip_subnet *s);</B>
+
+<BR>
+
+<B>int samesaid(const ip_said *a, const ip_said *b);</B>
+
+<BR>
+
+<B>int sameaddrtype(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnettype(const ip_subnet *a, const ip_subnet *b);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions do various comparisons and tests on the
+<I>ip_address</I>
+
+type and
+<I>ip_subnet</I>
+
+types.
+<P>
+
+<I>Sameaddr</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Addresses of different families are never identical.
+<P>
+
+<I>Addrcmp</I>
+
+returns
+<B>-1</B>,
+
+<B>0</B>,
+
+or
+<B>1</B>
+
+respectively
+if address
+<I>a</I>
+
+is less than, equal to, or greater than
+<I>b</I>.
+
+If they are not of the same address family,
+they are never equal;
+the ordering reported in this case is arbitrary
+(and probably not useful) but consistent.
+<P>
+
+<I>Samesubnet</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Subnets of different address families are never identical.
+<P>
+
+<I>Addrinsubnet</I>
+
+returns
+non-zero
+if address
+<I>a</I>
+
+is within subnet
+<I>s</I>
+
+and
+<B>0</B>
+
+otherwise.
+An address is never within a
+subnet of a different address family.
+<P>
+
+<I>Subnetinsubnet</I>
+
+returns
+non-zero
+if subnet
+<I>a</I>
+
+is a subset of subnet
+<I>b</I>
+
+and
+<B>0</B>
+
+otherwise.
+A subnet is deemed to be a subset of itself.
+A subnet is never a subset of another
+subnet if their address families differ.
+<P>
+
+<I>Subnetishost</I>
+
+returns
+non-zero
+if subnet
+<I>s</I>
+
+is in fact only a single host,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesaid</I>
+
+returns
+non-zero
+if SA IDs
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Sameaddrtype</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesubnettype</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_initaddr.3.html">ipsec_initaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_satoa.3.html b/doc/manpage.d/ipsec_satoa.3.html
new file mode 100644
index 000000000..2b2c7425c
--- /dev/null
+++ b/doc/manpage.d/ipsec_satoa.3.html
@@ -0,0 +1,347 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ATOSA</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ATOSA</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec atosa, satoa - convert IPsec Security Association IDs to and from ASCII
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *atosa(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>struct sa_id *sa);</B>
+
+<BR>
+
+<B>size_t satoa(struct sa_id sa, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<P>
+<B>struct sa_id {</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr dst;</B>
+
+<BR>
+&nbsp;
+<B>ipsec_spi_t spi;</B>
+
+<BR>
+&nbsp;
+<B>int proto;</B>
+
+<BR>
+
+<B>};</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete; see
+<I><A HREF="ipsec_ttosa.3.html">ipsec_ttosa</A></I>(3)
+
+for their replacements.
+<P>
+
+<I>Atosa</I>
+
+converts an ASCII Security Association (SA) specifier into an
+<B>sa_id</B>
+
+structure (containing
+a destination-host address
+in network byte order,
+an SPI number in network byte order, and
+a protocol code).
+<I>Satoa</I>
+
+does the reverse conversion, back to an ASCII SA specifier.
+<P>
+
+An SA is specified in ASCII with a mail-like syntax, e.g.
+<B><A HREF="mailto:esp507@1.2.3.4">esp507@1.2.3.4</A></B>.
+
+An SA specifier contains
+a protocol prefix (currently
+<B>ah</B>,
+
+<B>esp</B>,
+
+or
+<B>tun</B>),
+
+an unsigned integer SPI number,
+and an IP address.
+The SPI number can be decimal or hexadecimal
+(with
+<B>0x</B>
+
+prefix), as accepted by
+<I><A HREF="ipsec_atoul.3.html">ipsec_atoul</A></I>(3).
+
+The IP address can be any form accepted by
+<I><A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A></I>(3),
+
+e.g. dotted-decimal address or DNS name.
+<P>
+
+As a special case, the SA specifier
+<B>%passthrough</B>
+
+signifies the special SA used to indicate that packets should be
+passed through unaltered.
+(At present, this is a synonym for
+<B><A HREF="mailto:tun0x0@0.0.0.0">tun0x0@0.0.0.0</A></B>,
+
+but that is subject to change without notice.)
+This form is known to both
+<I>atosa</I>
+
+and
+<I>satoa</I>,
+
+so the internal form of
+<B>%passthrough</B>
+
+is never visible.
+<P>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file supplies the
+<B>sa_id</B>
+
+structure, as well as a data type
+<B>ipsec_spi_t</B>
+
+which is an unsigned 32-bit integer.
+(There is no consistency between kernel and user on what such a type
+is called, hence the header hides the differences.)
+<P>
+
+The protocol code uses the same numbers that IP does.
+For user convenience, given the difficulty in acquiring the exact set of
+protocol names used by the kernel,
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+defines the names
+<B>SA_ESP</B>,
+
+<B>SA_AH</B>,
+
+and
+<B>SA_IPIP</B>
+
+to have the same values as the kernel names
+<B>IPPROTO_ESP</B>,
+
+<B>IPPROTO_AH</B>,
+
+and
+<B>IPPROTO_IPIP</B>.
+
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>atosa</I>
+
+specifies the length of the ASCII string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>satoa</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines a constant,
+<B>SATOA_BUF</B>,
+
+which is the size of a buffer just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>satoa</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the ASCII character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default
+(currently
+lowercase protocol prefix, lowercase hexadecimal SPI, dotted-decimal address).
+The value
+<B>d</B>
+
+causes the SPI to be generated in decimal instead.
+<P>
+
+<I>Atosa</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<I>Satoa</I>
+
+returns
+<B>0</B>
+
+for a failure, and otherwise
+always returns the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec_atoul.3.html">ipsec_atoul</A>(3), <A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A>(3), <A HREF="inet.3.html">inet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>atosa</I>
+
+are:
+empty input;
+input too small to be a legal SA specifier;
+no
+<B>@</B>
+
+in input;
+unknown protocol prefix;
+conversion error in
+<I>atoul</I>
+
+or
+<I>atoaddr</I>.
+
+<P>
+
+Fatal errors in
+<I>satoa</I>
+
+are:
+unknown format; unknown protocol code.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The
+<B>tun</B>
+
+protocol code is a FreeS/WANism which may eventually disappear.
+<P>
+
+The restriction of ASCII-to-binary error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The ASCII-to-binary error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = atoaddr( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_satot.3.html b/doc/manpage.d/ipsec_satot.3.html
new file mode 100644
index 000000000..1e457fc24
--- /dev/null
+++ b/doc/manpage.d/ipsec_satot.3.html
@@ -0,0 +1,453 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TTOSA</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TTOSA</H1>
+Section: C Library Functions (3)<BR>Updated: 26 Nov 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ttosa, satot - convert IPsec Security Association IDs to and from text
+<BR>
+
+ipsec initsaid - initialize an SA ID
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>typedef struct {</B>
+
+<BR>
+&nbsp;
+<B>ip_address dst;</B>
+
+<BR>
+&nbsp;
+<B>ipsec_spi_t spi;</B>
+
+<BR>
+&nbsp;
+<B>int proto;</B>
+
+<BR>
+
+<B>} ip_said;</B>
+
+<P>
+<B>const char *ttosa(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>ip_said *sa);</B>
+
+<BR>
+
+<B>size_t satot(const ip_said *sa, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<BR>
+
+<B>void initsaid(const ip_address *addr, ipsec_spi_t spi,</B>
+
+<BR>
+&nbsp;
+<B>int proto, ip_said *dst);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Ttosa</I>
+
+converts an ASCII Security Association (SA) specifier into an
+<B>ip_said</B>
+
+structure (containing
+a destination-host address
+in network byte order,
+an SPI number in network byte order, and
+a protocol code).
+<I>Satot</I>
+
+does the reverse conversion, back to a text SA specifier.
+<I>Initsaid</I>
+
+initializes an
+<B>ip_said</B>
+
+from separate items of information.
+<P>
+
+An SA is specified in text with a mail-like syntax, e.g.
+<B><A HREF="mailto:esp.5a7@1.2.3.4">esp.5a7@1.2.3.4</A></B>.
+
+An SA specifier contains
+a protocol prefix (currently
+<B>ah</B>,
+
+<B>esp</B>,
+
+<B>tun</B>,
+
+<B>comp</B>,
+
+or
+<B>int</B>),
+
+a single character indicating the address family
+(<B>.</B>
+
+for IPv4,
+<B>:</B>
+
+for IPv6),
+an unsigned integer SPI number in hexadecimal (with no
+<B>0x</B>
+
+prefix),
+and an IP address.
+The IP address can be any form accepted by
+<I><A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A></I>(3),
+
+e.g. dotted-decimal IPv4 address,
+colon-hex IPv6 address,
+or DNS name.
+<P>
+
+As a special case, the SA specifier
+<B>%passthrough4</B>
+
+or
+<B>%passthrough6</B>
+
+signifies the special SA used to indicate that packets should be
+passed through unaltered.
+(At present, these are synonyms for
+<B><A HREF="mailto:tun.0@0.0.0.0">tun.0@0.0.0.0</A></B>
+
+and
+<B>tun:0@::</B>
+
+respectively,
+but that is subject to change without notice.)
+<B>%passthrough</B>
+
+is a historical synonym for
+<B>%passthrough4</B>.
+
+These forms are known to both
+<I>ttosa</I>
+
+and
+<I>satot</I>,
+
+so the internal representation is never visible.
+<P>
+
+Similarly, the SA specifiers
+<B>%pass</B>,
+
+<B>%drop</B>,
+
+<B>%reject</B>,
+
+<B>%hold</B>,
+
+<B>%trap</B>,
+
+and
+<B>%trapsubnet</B>
+
+signify special ``magic'' SAs used to indicate that packets should be
+passed, dropped, rejected (dropped with ICMP notification),
+held,
+and trapped (sent up to
+<I><A HREF="ipsec_pluto.8.html">ipsec_pluto</A></I>(8),
+
+with either of two forms of
+<B>%hold</B>
+
+automatically installed)
+respectively.
+These forms too are known to both routines,
+so the internal representation of the magic SAs should never be visible.
+<P>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file supplies the
+<B>ip_said</B>
+
+structure, as well as a data type
+<B>ipsec_spi_t</B>
+
+which is an unsigned 32-bit integer.
+(There is no consistency between kernel and user on what such a type
+is called, hence the header hides the differences.)
+<P>
+
+The protocol code uses the same numbers that IP does.
+For user convenience, given the difficulty in acquiring the exact set of
+protocol names used by the kernel,
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+defines the names
+<B>SA_ESP</B>,
+
+<B>SA_AH</B>,
+
+<B>SA_IPIP</B>,
+
+and
+<B>SA_COMP</B>
+
+to have the same values as the kernel names
+<B>IPPROTO_ESP</B>,
+
+<B>IPPROTO_AH</B>,
+
+<B>IPPROTO_IPIP</B>,
+
+and
+<B>IPPROTO_COMP</B>.
+
+<P>
+
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+also defines
+<B>SA_INT</B>
+
+to have the value
+<B>61</B>
+
+(reserved by IANA for ``any host internal protocol'')
+and
+<B>SPI_PASS</B>,
+
+<B>SPI_DROP</B>,
+
+<B>SPI_REJECT</B>,
+
+<B>SPI_HOLD</B>,
+
+and
+<B>SPI_TRAP</B>
+
+to have the values 256-260 (in <I>host</I> byte order) respectively.
+These are used in constructing the magic SAs
+(which always have address
+<B>0.0.0.0</B>).
+
+<P>
+
+If
+<I>satot</I>
+
+encounters an unknown protocol code, e.g. 77,
+it yields output using a prefix
+showing the code numerically, e.g. ``unk77''.
+This form is
+<I>not</I>
+
+recognized by
+<I>ttosa</I>.
+
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>ttosa</I>
+
+specifies the length of the string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>satot</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file defines a constant,
+<B>SATOT_BUF</B>,
+
+which is the size of a buffer just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>satot</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the ASCII character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default
+(currently
+lowercase protocol prefix, lowercase hexadecimal SPI,
+dotted-decimal or colon-hex address).
+The value
+<B>'f'</B>
+
+is similar except that the SPI is padded with
+<B>0</B>s
+
+to a fixed 32-bit width, to ease aligning displayed tables.
+<P>
+
+<I>Ttosa</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<I>Satot</I>
+
+returns
+<B>0</B>
+
+for a failure, and otherwise
+always returns the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<P>
+
+There is also, temporarily, support for some obsolete
+forms of SA specifier which lack the address-family indicator.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec_ttoul.3.html">ipsec_ttoul</A>(3), <A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A>(3), <A HREF="ipsec_samesaid.3.html">ipsec_samesaid</A>(3), <A HREF="inet.3.html">inet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>ttosa</I>
+
+are:
+empty input;
+input too small to be a legal SA specifier;
+no
+<B>@</B>
+
+in input;
+unknown protocol prefix;
+conversion error in
+<I>ttoul</I>
+
+or
+<I>ttoaddr</I>.
+
+<P>
+
+Fatal errors in
+<I>satot</I>
+
+are:
+unknown format.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The restriction of text-to-binary error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The text-to-binary error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = ttosa( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_send-pr.8.html b/doc/manpage.d/ipsec_send-pr.8.html
new file mode 100644
index 000000000..19026543a
--- /dev/null
+++ b/doc/manpage.d/ipsec_send-pr.8.html
@@ -0,0 +1,427 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of SEND-PR</TITLE>
+</HEAD><BODY>
+<H1>SEND-PR</H1>
+Section: User Commands (1)<BR>Updated: xVERSIONx<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec send-pr - send problem report (PR) to a central support site
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec send-pr</B>
+
+[
+<I>site</I>
+
+]
+[
+<B>-f</B>
+
+<I>problem-report</I>
+
+]
+[
+<B>-t</B>
+
+<I>mail-address</I>
+
+]
+<BR>
+
+
+[
+<B>-P</B>
+
+]
+[
+<B>-L</B>
+
+]
+[
+<B>-s</B>
+
+<I>severity</I>
+
+]
+[
+<B>-c</B>
+
+<I>address</I>
+
+]
+<BR>
+
+[
+<B>--request-id</B>
+
+]
+[
+<B>-V</B>
+
+]
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<B>ipsec send-pr</B>
+
+is a tool used to submit
+<I>problem reports </I>
+
+
+(PRs) to a central support site. In most cases the correct
+<I>site</I>
+
+will be the default. This argument indicates the support site which
+is responsible for the category of problem involved. Some sites may
+use a local address as a default.
+<I>site</I>
+
+values are defined by using the
+<B><A HREF="aliases.5.html">aliases</A></B>(5).
+
+<P>
+
+<B>ipsec send-pr</B>
+
+invokes an editor on a problem report template (after trying to fill
+in some fields with reasonable default values). When you exit the
+editor,
+<B>ipsec send-pr </B>
+
+sends the completed form to the
+<I>Problem Report Management System</I>
+
+(<B>GNATS</B>) at a central support site. At the support site, the PR
+is assigned a unique number and is stored in the <B>GNATS</B> database
+according to its category and submitter-id. <B>GNATS</B> automatically
+replies with an acknowledgement, citing the category and the PR
+number.
+<P>
+
+To ensure that a PR is handled promptly, it should contain your (unique)
+<I>submitter-id</I> and one of the available <I>categories</I> to identify the
+problem area. (Use
+<B>`ipsec send-pr -L'</B>
+
+to see a list of categories.)
+<P>
+
+The
+<B>ipsec send-pr</B>
+
+template at your site should already be customized with your
+submitter-id (running `<B>install-sid</B> <I>submitter-id</I>' to
+accomplish this is part of the installation procedures for
+<B>ipsec</B>send-pr<B>).</B>
+
+If this hasn't been done, see your system administrator for your
+submitter-id, or request one from your support site by invoking
+<B>`ipsec send-pr --request-id'.</B>
+
+If your site does not distinguish between different user sites, or if
+you are not affiliated with the support site, use
+<B>`net'</B>
+
+for this field.
+<P>
+
+The more precise your problem description and the more complete your
+information, the faster your support team can solve your problems.
+<A NAME="lbAE">&nbsp;</A>
+<H2>OPTIONS</H2>
+
+<DL COMPACT>
+<DT><B>-f</B><I> problem-report</I>
+
+<DD>
+specify a file (<I>problem-report</I>) which already contains a
+complete problem report.
+<B>ipsec send-pr</B>
+
+sends the contents of the file without invoking the editor. If
+the value for
+<I>problem-report</I>
+
+is
+<B>`-'</B>,
+
+then
+<B>ipsec send-pr</B>
+
+reads from standard input.
+<DT><B>-s</B><I> severity</I>
+
+<DD>
+Give the problem report the severity
+<I>severity</I>.
+
+<DT><B>-t</B><I> mail-address</I>
+
+<DD>
+Change mail address at the support site for problem reports. The
+default
+<I>mail-address</I>
+
+is the address used for the default
+<I>site</I>.
+
+Use the
+<I>site</I>
+
+argument rather than this option in nearly all cases.
+<DT><B>-c</B><I> address</I>
+
+<DD>
+Put
+<I>address</I>
+
+in the
+<B>Cc:</B>
+
+header of the message.
+<DT><B>-P</B>
+
+<DD>
+print the form specified by the environment variable
+<B>PR_FORM </B>
+
+on standard output. If
+<B>PR_FORM</B>
+
+is not set, print the standard blank PR template. No mail is sent.
+<DT><B>-L</B>
+
+<DD>
+print the list of available categories. No mail is sent.
+<DT><B>--request-id</B>
+
+<DD>
+sends mail to the default support site, or
+<I>site</I>
+
+if specified, with a request for your
+<I>submitter-id</I>.
+
+If you are
+not affiliated with
+<I>site</I>,
+
+use a
+<I>submitter-id</I>
+
+of
+<B>net</B>'.
+
+<DT><B>-V</B>
+
+<DD>
+Display the
+<B>ipsec send-pr</B>
+
+version number.
+</DL>
+<P>
+
+Note: use
+<B>ipsec send-pr</B>
+
+to submit problem reports rather than mailing them directly. Using
+both the template and
+<B>ipsec send-pr</B>
+
+itself will help ensure all necessary information will reach the
+support site.
+<A NAME="lbAF">&nbsp;</A>
+<H2>ENVIRONMENT</H2>
+
+The environment variable
+<B>EDITOR</B>
+
+specifies the editor to invoke on the template.
+<BR>
+
+default:
+<B>vi</B>
+
+<P>
+If the environment variable
+<B>PR_FORM</B>
+
+is set, then its value is used as the file name of the template for
+your problem-report editing session. You can use this to start with a
+partially completed form (for example, a form with the identification
+fields already completed).
+<A NAME="lbAG">&nbsp;</A>
+<H2>HOW TO FILL OUT A PROBLEM REPORT</H2>
+
+Problem reports have to be in a particular form so that a program can
+easily manage them. Please remember the following guidelines:
+<DL COMPACT>
+<DT>*<DD>
+describe only
+<B>one problem</B>
+
+with each problem report.
+<DT>*<DD>
+For follow-up mail, use the same subject line as the one in the automatic
+acknowledgent. It consists of category, PR number and the original synopsis
+line. This allows the support site to relate several mail messages to a
+particular PR and to record them automatically.
+<DT>*<DD>
+Please try to be as accurate as possible in the subject and/or synopsis line.
+<DT>*<DD>
+The subject and the synopsis line are not confidential. This is
+because open-bugs lists are compiled from them. Avoid confidential
+information there.
+</DL>
+<P>
+
+See the GNU
+<B>Info </B>
+
+file
+<B>send-pr.info</B>
+
+or the document <I>Reporting Problems With send-pr</I>&nbsp;for detailed
+information on reporting problems
+<A NAME="lbAH">&nbsp;</A>
+<H2>HOW TO SUBMIT TEST CASES, CODE, ETC.</H2>
+
+Submit small code samples with the PR. Contact the support site for
+instructions on submitting larger test cases and problematic source
+code.
+<A NAME="lbAI">&nbsp;</A>
+<H2>FILES</H2>
+
+
+
+/tmp/p$$<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>copy of PR used in editing session<BR>
+<BR>
+
+/tmp/pf$$<TT>&nbsp;&nbsp;&nbsp;</TT>copy of empty PR form, for testing purposes<BR>
+<BR>
+
+/tmp/pbad$$<TT>&nbsp;</TT>file for rejected PRs<BR>
+<BR>
+
+@IPSEC_DIR@/send-pr.confscript to customize send-pr.<BR>
+<A NAME="lbAJ">&nbsp;</A>
+<H2>EMACS USER INTERFACE</H2>
+
+An Emacs user interface for
+<B>send-pr</B>
+
+with completion of field values is part of the
+<B>send-pr</B>
+
+distribution (invoked with
+<B>M-x send-pr</B>).
+
+See the file
+<B>send-pr.info</B>
+
+or the ASCII file
+<B>INSTALL</B>
+
+in the top level directory of the distribution for configuration and
+installation information. The Emacs LISP template file is
+<B>send-pr-el.in</B>
+
+and is installed as
+<B>send-pr.el</B>.
+
+<A NAME="lbAK">&nbsp;</A>
+<H2>INSTALLATION AND CONFIGURATION</H2>
+
+See
+<B>send-pr.info</B>
+
+or
+<B>INSTALL</B>
+
+for installation instructions.
+<A NAME="lbAL">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<I>Reporting Problems Using send-pr</I>
+
+(also installed as the GNU Info file
+<B>send-pr.info</B>).
+
+<P>
+
+<B><A HREF="http://localhost/cgi-bin/man/man2html?l+gnats">gnats</A></B>(l),
+
+<B><A HREF="query-pr.1.html">query-pr</A></B>(1),
+
+<B><A HREF="edit-pr.1.html">edit-pr</A></B>(1),
+
+<B><A HREF="gnats.8.html">gnats</A></B>(8),
+
+<B><A HREF="queue-pr.8.html">queue-pr</A></B>(8),
+
+<B><A HREF="at-pr.8.html">at-pr</A></B>(8),
+
+<B><A HREF="mkcat.8.html">mkcat</A></B>(8),
+
+<B><A HREF="mkdist.8.html">mkdist</A></B>(8).
+
+<A NAME="lbAM">&nbsp;</A>
+<H2>AUTHORS</H2>
+
+Jeffrey Osier, Brendan Kehoe, Jason Merrill, Heinz G. Seidl (Cygnus
+Support)
+<A NAME="lbAN">&nbsp;</A>
+<H2>COPYING</H2>
+
+Copyright (c) 1992, 1993 Free Software Foundation, Inc.
+<P>
+
+Permission is granted to make and distribute verbatim copies of
+this manual provided the copyright notice and this permission notice
+are preserved on all copies.
+<P>
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided that the
+entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+<P>
+
+Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions, except that this permission notice may be included in
+translations approved by the Free Software Foundation instead of in
+the original English.
+<P>
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">OPTIONS</A><DD>
+<DT><A HREF="#lbAF">ENVIRONMENT</A><DD>
+<DT><A HREF="#lbAG">HOW TO FILL OUT A PROBLEM REPORT</A><DD>
+<DT><A HREF="#lbAH">HOW TO SUBMIT TEST CASES, CODE, ETC.</A><DD>
+<DT><A HREF="#lbAI">FILES</A><DD>
+<DT><A HREF="#lbAJ">EMACS USER INTERFACE</A><DD>
+<DT><A HREF="#lbAK">INSTALLATION AND CONFIGURATION</A><DD>
+<DT><A HREF="#lbAL">SEE ALSO</A><DD>
+<DT><A HREF="#lbAM">AUTHORS</A><DD>
+<DT><A HREF="#lbAN">COPYING</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_setportof.3.html b/doc/manpage.d/ipsec_setportof.3.html
new file mode 100644
index 000000000..3965ca62d
--- /dev/null
+++ b/doc/manpage.d/ipsec_setportof.3.html
@@ -0,0 +1,143 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_PORTOF</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_PORTOF</H1>
+Section: C Library Functions (3)<BR>Updated: 8 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec portof - get port field of an ip_address
+<BR>
+
+ipsec setportof - set port field of an ip_address
+<BR>
+
+ipsec sockaddrof - get pointer to internal sockaddr of an ip_address
+<BR>
+
+ipsec sockaddrlenof - get length of internal sockaddr of an ip_address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int portof(const ip_address *src);</B>
+
+<BR>
+
+<B>void setportof(int port, ip_address *dst);</B>
+
+<BR>
+
+<B>struct sockaddr *sockaddrof(ip_address *src);</B>
+
+<BR>
+
+<B>size_t sockaddrlenof(const ip_address *src);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+internal type
+<I>ip_address</I>
+
+contains one of the
+<I>sockaddr</I>
+
+types internally.
+<I>Reliance on this feature is discouraged</I>,
+but it may occasionally be necessary.
+These functions provide low-level tools for this purpose.
+<P>
+
+<I>Portof</I>
+
+and
+<I>setportof</I>
+
+respectively read and write the port-number field of the internal
+<I>sockaddr</I>.
+
+The values are in network byte order.
+<P>
+
+<I>Sockaddrof</I>
+
+returns a pointer to the internal
+<I>sockaddr</I>,
+
+for passing to other functions.
+<P>
+
+<I>Sockaddrlenof</I>
+
+reports the size of the internal
+<I>sockaddr</I>,
+
+for use in storage allocation.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_initaddr.3.html">ipsec_initaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+<I>Portof</I>
+
+returns
+<B>-1</B>,
+
+<I>sockaddrof</I>
+
+returns
+<B>NULL</B>,
+
+and
+<I>sockaddrlenof</I>
+
+returns
+<B>0</B>
+
+if an unknown address family is found within the
+<I>ip_address</I>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+These functions all depend on low-level details of the
+<I>ip_address</I>
+
+type, which are in principle subject to change.
+Avoid using them unless really necessary.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_setup.8.html b/doc/manpage.d/ipsec_setup.8.html
new file mode 100644
index 000000000..7197e2b18
--- /dev/null
+++ b/doc/manpage.d/ipsec_setup.8.html
@@ -0,0 +1,237 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_SETUP</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_SETUP</H1>
+Section: Maintenance Commands (8)<BR>Updated: 23 July 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec setup - control IPsec subsystem
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>setup</B>
+
+[
+<B>--show</B>
+
+|
+<B>--showonly</B>
+
+]
+command
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Setup</I>
+
+controls the FreeS/WAN IPsec subsystem,
+including both the Klips kernel code and the Pluto key-negotiation daemon.
+(It is a synonym for the ``rc'' script for the subsystem;
+the system runs the equivalent of
+<B>ipsec setup start</B>
+
+at boot time,
+and
+<B>ipsec setup stop</B>
+
+at shutdown time, more or less.)
+<P>
+
+The action taken depends on the specific
+<I>command</I>,
+
+and on the contents of the
+<B>config</B>
+
+<B>setup</B>
+
+section of the
+IPsec configuration file (<I>/etc/ipsec.conf</I>,
+
+see
+<I><A HREF="ipsec.conf.5.html">ipsec.conf</A></I>(5)).
+
+Current
+<I>command</I>s
+
+are:
+<DL COMPACT>
+<DT><B>start</B>
+
+<DD>
+start Klips and Pluto,
+including setting up Klips to do crypto operations on the
+interface(s) specified in the configuration file,
+and (if the configuration file so specifies)
+setting up manually-keyed connections and/or
+asking Pluto to negotiate automatically-keyed connections
+to other security gateways
+<DT><B>stop</B>
+
+<DD>
+shut down Klips and Pluto,
+including tearing down all existing crypto connections
+<DT><B>restart</B>
+
+<DD>
+equivalent to
+<B>stop</B>
+
+followed by
+<B>start</B>
+
+<DT><B>status</B>
+
+<DD>
+report the status of the subsystem;
+normally just reports
+<B>IPsec running</B>
+
+and
+<B>pluto pid </B><I>nnn</I>,
+
+or
+<B>IPsec stopped</B>,
+
+and exits with status 0,
+but will go into more detail (and exit with status 1)
+if something strange is found.
+(An ``illicit'' Pluto is one that does not match the process ID in
+Pluto's lock file;
+an ``orphaned'' Pluto is one with no lock file.)
+</DL>
+<P>
+
+The
+<B>stop</B>
+
+operation tries to clean up properly even if assorted accidents
+have occurred,
+e.g. Pluto having died without removing its lock file.
+If
+<B>stop</B>
+
+discovers that the subsystem is (supposedly) not running,
+it will complain,
+but will do its cleanup anyway before exiting with status 1.
+<P>
+
+Although a number of configuration-file parameters influence
+<I>setup</I>'s
+
+operations, the key one is the
+<B>interfaces</B>
+
+parameter, which must be right or chaos will ensue.
+<P>
+
+The
+<B>--show</B>
+
+and
+<B>--showonly</B>
+
+options cause
+<I>setup</I>
+
+to display the shell commands that it would execute.
+<B>--showonly</B>
+
+suppresses their execution.
+Only
+<B>start</B>,
+
+<B>stop</B>,
+
+and
+<B>restart</B>
+
+commands recognize these flags.
+<A NAME="lbAE">&nbsp;</A>
+<H2>FILES</H2>
+
+
+
+/etc/rc.d/init.d/ipsec<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>the script itself<BR>
+<BR>
+
+/etc/init.d/ipsec<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>alternate location for the script<BR>
+<BR>
+
+/etc/ipsec.conf<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>IPsec configuration file<BR>
+<BR>
+
+/proc/sys/net/ipv4/ip_forward<TT>&nbsp;</TT>forwarding control<BR>
+<BR>
+
+/var/run/ipsec.info<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>saved information<BR>
+<BR>
+
+/var/run/pluto.pid<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>Pluto lock file<BR>
+<BR>
+
+/var/run/ipsec_setup.pid<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>IPsec lock file<BR>
+<A NAME="lbAF">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.conf.5.html">ipsec.conf</A>(5), <A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8), <A HREF="ipsec_auto.8.html">ipsec_auto</A>(8), <A HREF="route.8.html">route</A>(8)
+<A NAME="lbAG">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+All output from the commands
+<B>start</B>
+
+and
+<B>stop</B>
+
+goes both to standard
+output and to
+<I><A HREF="syslogd.8.html">syslogd</A></I>(8),
+
+via
+<I><A HREF="logger.1.html">logger</A></I>(1).
+
+Selected additional information is logged only to
+<I><A HREF="syslogd.8.html">syslogd</A></I>(8).
+
+<A NAME="lbAH">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by Henry Spencer.
+<A NAME="lbAI">&nbsp;</A>
+<H2>BUGS</H2>
+
+Old versions of
+<I><A HREF="logger.1.html">logger</A></I>(1)
+
+inject spurious extra newlines onto standard output.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">FILES</A><DD>
+<DT><A HREF="#lbAF">SEE ALSO</A><DD>
+<DT><A HREF="#lbAG">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAH">HISTORY</A><DD>
+<DT><A HREF="#lbAI">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_showdefaults.8.html b/doc/manpage.d/ipsec_showdefaults.8.html
new file mode 100644
index 000000000..e1786dc0a
--- /dev/null
+++ b/doc/manpage.d/ipsec_showdefaults.8.html
@@ -0,0 +1,82 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_SHOWDEFAULTS</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_SHOWDEFAULTS</H1>
+Section: Maintenance Commands (8)<BR>Updated: 23 Jan 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec showdefaults - show %defaultroute defaults
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>showdefaults</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Showdefaults</I>
+
+outputs (on standard output) a terse description of the defaults
+used by the
+<B>%defaultroute</B>
+
+facilities in
+<I><A HREF="ipsec_auto.8.html">ipsec_auto</A></I>(8)
+
+and
+<I><A HREF="ipsec_manual.8.html">ipsec_manual</A></I>(8).
+
+<P>
+
+Beware that the exact output format is subject to change.
+<A NAME="lbAE">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Normal exit status is 0.
+If no defaults are available,
+i.e. the
+<B>interfaces</B>
+
+parameter in
+<B>config setup</B>
+
+is not
+<B>%defaultroute</B>,
+
+produces a message on standard error and exits with status 1.
+<A NAME="lbAF">&nbsp;</A>
+<H2>FILES</H2>
+
+/var/run/ipsec.info
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAF">FILES</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_showhostkey.8.html b/doc/manpage.d/ipsec_showhostkey.8.html
new file mode 100644
index 000000000..90a16d5ee
--- /dev/null
+++ b/doc/manpage.d/ipsec_showhostkey.8.html
@@ -0,0 +1,269 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_SHOWHOSTKEY</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_SHOWHOSTKEY</H1>
+Section: Maintenance Commands (8)<BR>Updated: 5 March 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec showhostkey - show host's authentication key
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>showhostkey</B>
+
+[
+<B>--key</B>
+
+] [
+<B>--left</B>
+
+] [
+<B>--right</B>
+
+] [
+<B>--txt</B>
+
+gateway
+] [
+<B>--dhclient</B>
+
+] [
+<B>--file</B>
+
+secretfile
+] [
+<B>--id</B>
+
+identity
+]
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Showhostkey</I>
+
+outputs (on standard output) a public key suitable for this host,
+in the format specified,
+using the host key information stored in
+<I>/etc/ipsec.secrets</I>.
+
+In general only the super-user can run this command,
+since only he can read
+<I>ipsec.secrets</I>.
+
+<P>
+
+The
+<B>--txt</B>
+
+option causes the output to be in opportunistic-encryption DNS TXT record
+format,
+with the specified
+<I>gateway</I>
+
+value.
+If information about how the key was generated is available,
+that is provided as a DNS-file comment.
+For example,
+<B>--txt 10.11.12.13</B>
+
+might give (with the key data trimmed for clarity):
+<P>
+
+<PRE>
+ ; RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000
+ IN TXT &quot;X-IPsec-Server(10)=10.11.12.13 AQOF8tZ2...+buFuFn/&quot;
+</PRE>
+
+<P>
+
+No name is supplied in the TXT record
+because there are too many possibilities,
+depending on how it will be used.
+If the text string is longer than 255 bytes,
+it is split up into multiple strings (matching the restrictions of
+the DNS TXT binary format).
+If any split is needed, the first split will be at the start of the key:
+this increases the chances that later hand editing will work.
+<P>
+
+The
+<B>--left</B>
+
+and
+<B>--right</B>
+
+options cause the output to be in
+<I><A HREF="ipsec.conf.5.html">ipsec.conf</A></I>(5)
+
+format, as a
+<B>leftrsasigkey</B>
+
+or
+<B>rightrsasigkey</B>
+
+parameter respectively.
+Again, generation information is included if available.
+For example,
+<B>--left</B>
+
+might give (with the key data trimmed down for clarity):
+<P>
+
+<PRE>
+ # RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000
+ leftrsasigkey=0sAQOF8tZ2...+buFuFn/
+</PRE>
+
+<P>
+
+The
+<B>--dhclient</B>
+
+option cause the output to be suitable for inclusion in
+<I><A HREF="dhclient.conf.5.html">dhclient.conf</A></I>(5)
+
+as part of configuring WAVEsec.
+See &lt;<A HREF="http://www.wavesec.org">http://www.wavesec.org</A>&gt;.
+<P>
+
+If
+<B>--key</B>
+
+is specified,
+the output format is the text form of a DNS KEY record;
+the host name is the one included in the key information
+(or, if that is not available,
+the output of
+<B>hostname&nbsp;--fqdn</B>),
+
+with a
+<B>.</B>
+
+appended.
+Again, generation information is included if available.
+For example (with the key data trimmed down for clarity):
+<P>
+
+<PRE>
+ ; RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000
+ xy.example.com. IN KEY 0x4200 4 1 AQOF8tZ2...+buFuFn/
+</PRE>
+
+<P>
+
+Normally, the default key for this host
+(the one with no host identities specified for it) is the one extracted.
+The
+<B>--id</B>
+
+option overrides this,
+causing extraction of the key labeled with the specified
+<I>identity</I>,
+
+if any.
+The specified
+<I>identity</I>
+
+must
+<I>exactly</I>
+
+match the identity in the file;
+in particular, the comparison is case-sensitive.
+<P>
+
+The
+<B>--file</B>
+
+option overrides the default for where the key information should be
+found, and takes it from the specified
+<I>secretfile</I>.
+
+<A NAME="lbAE">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+A complaint about ``no pubkey line found'' indicates that the
+host has a key but it was generated with an old version of FreeS/WAN
+and does not contain the information that
+<I>showhostkey</I>
+
+needs.
+<A NAME="lbAF">&nbsp;</A>
+<H2>FILES</H2>
+
+/etc/ipsec.secrets
+<A NAME="lbAG">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.secrets.5.html">ipsec.secrets</A>(5), <A HREF="ipsec.conf.5.html">ipsec.conf</A>(5), <A HREF="ipsec_rsasigkey.8.html">ipsec_rsasigkey</A>(8)
+<A NAME="lbAH">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by Henry Spencer.
+<A NAME="lbAI">&nbsp;</A>
+<H2>BUGS</H2>
+
+Arguably,
+rather than just reporting the no-IN-KEY-line-found problem,
+<I>showhostkey</I>
+
+should be smart enough to run the existing key through
+<I>rsasigkey</I>
+
+with the
+<B>--oldkey</B>
+
+option, to generate a suitable output line.
+<P>
+
+The need to specify the gateway address (etc.) for
+<B>--txt</B>
+
+is annoying, but there is no good way to determine it automatically.
+<P>
+
+There should be a way to specify the priority value for TXT records;
+currently it is hardwired to
+<B>10</B>.
+
+<P>
+
+The
+<B>--id</B>
+
+option assumes that the
+<I>identity</I>
+
+appears on the same line as the
+<B>:&nbsp;RSA&nbsp;{</B>
+
+that begins the key proper.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAF">FILES</A><DD>
+<DT><A HREF="#lbAG">SEE ALSO</A><DD>
+<DT><A HREF="#lbAH">HISTORY</A><DD>
+<DT><A HREF="#lbAI">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_showpolicy.8.html b/doc/manpage.d/ipsec_showpolicy.8.html
new file mode 100644
index 000000000..470c40879
--- /dev/null
+++ b/doc/manpage.d/ipsec_showpolicy.8.html
@@ -0,0 +1,88 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_SHOWPOLICY</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_SHOWPOLICY</H1>
+Section: Maintenance Commands (8)<BR>Updated: 7 May 2003<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec showpolicy - dump policy of socket found as stdin
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<P>
+
+<B>ipsec</B>
+
+<B>showpolicy</B>
+
+<P>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>showpolicy</I>
+
+calls the
+<I><A HREF="ipsec_policy_lookup.3.html">ipsec_policy_lookup</A></I>(3)
+
+function on the file description which is its stdin.
+<P>
+
+It then dumps the resulting query in a human readable form.
+<P>
+
+This is a test program. One might run it from inetd, via:
+<DL COMPACT>
+<DT>discard stream tcp nowait nobody /usr/local/libexec/ipsec/showpolicy showpolicy<DD>
+</DL>
+<A NAME="lbAE">&nbsp;</A>
+<H2>FILES</H2>
+
+/var/run/ipsecpolicy.ctl
+<A NAME="lbAF">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_policy_query.3.html">ipsec_policy_query</A>(3), <A HREF="ipsec_pluto.8.html">ipsec_pluto</A>(8)
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Michael Richardson
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">FILES</A><DD>
+<DT><A HREF="#lbAF">SEE ALSO</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_sockaddrlenof.3.html b/doc/manpage.d/ipsec_sockaddrlenof.3.html
new file mode 100644
index 000000000..3965ca62d
--- /dev/null
+++ b/doc/manpage.d/ipsec_sockaddrlenof.3.html
@@ -0,0 +1,143 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_PORTOF</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_PORTOF</H1>
+Section: C Library Functions (3)<BR>Updated: 8 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec portof - get port field of an ip_address
+<BR>
+
+ipsec setportof - set port field of an ip_address
+<BR>
+
+ipsec sockaddrof - get pointer to internal sockaddr of an ip_address
+<BR>
+
+ipsec sockaddrlenof - get length of internal sockaddr of an ip_address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int portof(const ip_address *src);</B>
+
+<BR>
+
+<B>void setportof(int port, ip_address *dst);</B>
+
+<BR>
+
+<B>struct sockaddr *sockaddrof(ip_address *src);</B>
+
+<BR>
+
+<B>size_t sockaddrlenof(const ip_address *src);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+internal type
+<I>ip_address</I>
+
+contains one of the
+<I>sockaddr</I>
+
+types internally.
+<I>Reliance on this feature is discouraged</I>,
+but it may occasionally be necessary.
+These functions provide low-level tools for this purpose.
+<P>
+
+<I>Portof</I>
+
+and
+<I>setportof</I>
+
+respectively read and write the port-number field of the internal
+<I>sockaddr</I>.
+
+The values are in network byte order.
+<P>
+
+<I>Sockaddrof</I>
+
+returns a pointer to the internal
+<I>sockaddr</I>,
+
+for passing to other functions.
+<P>
+
+<I>Sockaddrlenof</I>
+
+reports the size of the internal
+<I>sockaddr</I>,
+
+for use in storage allocation.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_initaddr.3.html">ipsec_initaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+<I>Portof</I>
+
+returns
+<B>-1</B>,
+
+<I>sockaddrof</I>
+
+returns
+<B>NULL</B>,
+
+and
+<I>sockaddrlenof</I>
+
+returns
+<B>0</B>
+
+if an unknown address family is found within the
+<I>ip_address</I>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+These functions all depend on low-level details of the
+<I>ip_address</I>
+
+type, which are in principle subject to change.
+Avoid using them unless really necessary.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_sockaddrof.3.html b/doc/manpage.d/ipsec_sockaddrof.3.html
new file mode 100644
index 000000000..3965ca62d
--- /dev/null
+++ b/doc/manpage.d/ipsec_sockaddrof.3.html
@@ -0,0 +1,143 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_PORTOF</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_PORTOF</H1>
+Section: C Library Functions (3)<BR>Updated: 8 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec portof - get port field of an ip_address
+<BR>
+
+ipsec setportof - set port field of an ip_address
+<BR>
+
+ipsec sockaddrof - get pointer to internal sockaddr of an ip_address
+<BR>
+
+ipsec sockaddrlenof - get length of internal sockaddr of an ip_address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int portof(const ip_address *src);</B>
+
+<BR>
+
+<B>void setportof(int port, ip_address *dst);</B>
+
+<BR>
+
+<B>struct sockaddr *sockaddrof(ip_address *src);</B>
+
+<BR>
+
+<B>size_t sockaddrlenof(const ip_address *src);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+internal type
+<I>ip_address</I>
+
+contains one of the
+<I>sockaddr</I>
+
+types internally.
+<I>Reliance on this feature is discouraged</I>,
+but it may occasionally be necessary.
+These functions provide low-level tools for this purpose.
+<P>
+
+<I>Portof</I>
+
+and
+<I>setportof</I>
+
+respectively read and write the port-number field of the internal
+<I>sockaddr</I>.
+
+The values are in network byte order.
+<P>
+
+<I>Sockaddrof</I>
+
+returns a pointer to the internal
+<I>sockaddr</I>,
+
+for passing to other functions.
+<P>
+
+<I>Sockaddrlenof</I>
+
+reports the size of the internal
+<I>sockaddr</I>,
+
+for use in storage allocation.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_initaddr.3.html">ipsec_initaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+<I>Portof</I>
+
+returns
+<B>-1</B>,
+
+<I>sockaddrof</I>
+
+returns
+<B>NULL</B>,
+
+and
+<I>sockaddrlenof</I>
+
+returns
+<B>0</B>
+
+if an unknown address family is found within the
+<I>ip_address</I>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+These functions all depend on low-level details of the
+<I>ip_address</I>
+
+type, which are in principle subject to change.
+Avoid using them unless really necessary.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_spi.5.html b/doc/manpage.d/ipsec_spi.5.html
new file mode 100644
index 000000000..b1cf89033
--- /dev/null
+++ b/doc/manpage.d/ipsec_spi.5.html
@@ -0,0 +1,305 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_SPI</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_SPI</H1>
+Section: File Formats (5)<BR>Updated: 26 Jun 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec_spi - list IPSEC Security Associations
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>spi</B>
+
+<P>
+
+<B>cat</B>
+
+<B>/proc/net/ipsec_spi</B>
+
+<P>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>/proc/net/ipsec_spi</I>
+
+is a read-only file that lists the current IPSEC Security Associations.
+A Security Association (SA) is a transform through which packet contents
+are to be processed before being forwarded. A transform can be an
+IPv4-in-IPv4 or IPv6-in-IPv6 encapsulation, an IPSEC Authentication Header (authentication
+with no encryption), or an IPSEC Encapsulation Security Payload
+(encryption, possibly including authentication).
+<P>
+
+When a packet is passed from a higher networking layer through an IPSEC
+virtual interface, a search in the extended routing table (see
+<I><A HREF="ipsec_eroute.5.html">ipsec_eroute</A></I>(5))
+
+yields
+a IP protocol number
+,
+a Security Parameters Index (SPI)
+and
+an effective destination address
+When an IPSEC packet arrives from the network,
+its ostensible destination, an SPI and an IP protocol
+specified by its outermost IPSEC header are used.
+The destination/SPI/protocol combination is used to select a relevant SA.
+(See
+<I><A HREF="ipsec_spigrp.5.html">ipsec_spigrp</A></I>(5)
+
+for discussion of how multiple transforms are combined.)
+<P>
+
+An
+<I>spi ,</I>
+
+<I>proto, </I>
+
+<I>daddr</I>
+
+and
+<I>address_family</I>
+
+arguments specify an SAID.
+<I>Proto</I>
+
+is an ASCII string, &quot;ah&quot;, &quot;esp&quot;, &quot;comp&quot; or &quot;tun&quot;, specifying the IP protocol.
+<I>Spi</I>
+
+is a number, preceded by '.' indicating hexadecimal and IPv4 or by ':' indicating hexadecimal and IPv6,
+where each hexadecimal digit represents 4 bits,
+between
+<B>0x100</B>
+
+and
+<B>0xffffffff</B>;
+
+values from
+<B>0x0</B>
+
+to
+<B>0xff</B>
+
+are reserved.
+<I>Daddr</I>
+
+is a dotted-decimal IPv4 destination address or a coloned hex IPv6 destination address.
+<P>
+
+An
+<I>SAID</I>
+
+combines the three parameters above, such as: &quot;<A HREF="mailto:tun.101@1.2.3.4">tun.101@1.2.3.4</A>&quot; for IPv4 or &quot;tun:<A HREF="mailto:101@3049">101@3049</A>:1::1&quot; for IPv6
+<P>
+
+A table entry consists of:
+<DL COMPACT>
+<DT>+<DD>
+<B>SAID</B>
+
+<DT>+<DD>
+&lt;transform name (proto,encalg,authalg)&gt;:
+<DT>+<DD>
+direction (dir=)
+<DT>+<DD>
+source address (src=)
+<DT>+<DD>
+source and destination addresses and masks for inner header policy check
+addresses (policy=), as dotted-quads or coloned hex, separated by '-&gt;',
+for IPv4-in-IPv4 or IPv6-in-IPv6 SAs only
+<DT>+<DD>
+initialisation vector length and value (iv_bits=, iv=) if non-zero
+<DT>+<DD>
+out-of-order window size, number of out-of-order errors, sequence
+number, recently received packet bitmask, maximum difference between
+sequence numbers (ooowin=, ooo_errs=, seq=, bit=, max_seq_diff=) if SA
+is AH or ESP and if individual items are non-zero
+<DT>+<DD>
+extra flags (flags=) if any are set
+<DT>+<DD>
+authenticator length in bits (alen=) if non-zero
+<DT>+<DD>
+authentication key length in bits (aklen=) if non-zero
+<DT>+<DD>
+authentication errors (auth_errs=) if non-zero
+<DT>+<DD>
+encryption key length in bits (eklen=) if non-zero
+<DT>+<DD>
+encryption size errors (encr_size_errs=) if non-zero
+<DT>+<DD>
+encryption padding error warnings (encr_pad_errs=) if non-zero
+<DT>+<DD>
+lifetimes legend, c=Current status, s=Soft limit when exceeded will
+initiate rekeying, h=Hard limit will cause termination of SA (life(c,s,h)=)
+<DT>+<DD>
+number of connections to which the SA is allocated (c), that will cause a
+rekey (s), that will cause an expiry (h) (alloc=), if any value is non-zero
+<DT>+<DD>
+number of bytes processesd by this SA (c), that will cause a rekey (s), that
+will cause an expiry (h) (bytes=), if any value is non-zero
+<DT>+<DD>
+time since the SA was added (c), until rekey (s), until expiry (h), in seconds (add=)
+<DT>+<DD>
+time since the SA was first used (c), until rekey (s), until expiry (h), in seconds (used=),
+if any value is non-zero
+<DT>+<DD>
+number of packets processesd by this SA (c), that will cause a rekey (s), that
+will cause an expiry (h) (packets=), if any value is non-zero
+<DT>+<DD>
+time since the last packet was processed, in seconds (idle=), if SA has
+been used
+<DT><DD>
+average compression ratio (ratio=)
+</DL>
+<A NAME="lbAE">&nbsp;</A>
+<H2>EXAMPLES</H2>
+
+<B><A HREF="mailto:tun.12a@192.168.43.1">tun.12a@192.168.43.1</A> IPIP: dir=out src=192.168.43.2</B>
+
+<BR>
+
+<B> life(c,s,h)=bytes(14073,0,0)add(269,0,0)</B>
+
+<BR>
+
+<B> use(149,0,0)packets(14,0,0)</B>
+
+<BR>
+
+<B> idle=23</B>
+
+<P>
+
+is an outbound IPv4-in-IPv4 (protocol 4) tunnel-mode SA set up between machines
+192.168.43.2 and 192.168.43.1 with an SPI of 12a in hexadecimal that has
+passed about 14 kilobytes of traffic in 14 packets since it was created,
+269 seconds ago, first used 149 seconds ago and has been idle for 23
+seconds.
+<P>
+
+<B>esp:<A HREF="mailto:9a35fc02@3049">9a35fc02@3049</A>:1::1 ESP_3DES_HMAC_MD5:</B>
+
+<BR>
+
+<B> dir=in src=<A HREF="mailto:9a35fc02@3049">9a35fc02@3049</A>:1::2</B>
+
+<BR>
+
+<B> ooowin=32 seq=7149 bit=0xffffffff</B>
+
+<BR>
+
+<B> alen=128 aklen=128 eklen=192</B>
+
+<BR>
+
+<B> life(c,s,h)=bytes(1222304,0,0)add(4593,0,0)</B>
+
+<BR>
+
+<B> use(3858,0,0)packets(7149,0,0)</B>
+
+<BR>
+
+<B> idle=23</B>
+
+<P>
+
+is an inbound Encapsulating Security Payload (protocol 50) SA on machine
+3049:1::1 with an SPI of 9a35fc02 that uses 3DES as the encryption
+cipher, HMAC MD5 as the authentication algorithm, an out-of-order
+window of 32 packets, a present sequence number of 7149, every one of
+the last 32 sequence numbers was received, the authenticator length and
+keys is 128 bits, the encryption key is 192 bits (actually 168 for 3DES
+since 1 of 8 bits is a parity bit), has passed 1.2 Mbytes of data in
+7149 packets, was added 4593 seconds ago, first used
+3858 seconds ago and has been idle for 23 seconds.
+<P>
+
+<A NAME="lbAF">&nbsp;</A>
+<H2>FILES</H2>
+
+/proc/net/ipsec_spi, /usr/local/bin/ipsec
+<A NAME="lbAG">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8), <A HREF="ipsec_tncfg.5.html">ipsec_tncfg</A>(5), <A HREF="ipsec_eroute.5.html">ipsec_eroute</A>(5),
+<A HREF="ipsec_spigrp.5.html">ipsec_spigrp</A>(5), <A HREF="ipsec_klipsdebug.5.html">ipsec_klipsdebug</A>(5), <A HREF="ipsec_spi.8.html">ipsec_spi</A>(8), <A HREF="ipsec_version.5.html">ipsec_version</A>(5),
+<A HREF="ipsec_pf_key.5.html">ipsec_pf_key</A>(5)
+<A NAME="lbAH">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Richard Guy Briggs.
+<A NAME="lbAI">&nbsp;</A>
+<H2>BUGS</H2>
+
+The add and use times are awkward, displayed in seconds since machine
+start. It would be better to display them in seconds before now for
+human readability.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">EXAMPLES</A><DD>
+<DT><A HREF="#lbAF">FILES</A><DD>
+<DT><A HREF="#lbAG">SEE ALSO</A><DD>
+<DT><A HREF="#lbAH">HISTORY</A><DD>
+<DT><A HREF="#lbAI">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_spi.8.html b/doc/manpage.d/ipsec_spi.8.html
new file mode 100644
index 000000000..a40d06d9b
--- /dev/null
+++ b/doc/manpage.d/ipsec_spi.8.html
@@ -0,0 +1,790 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_SPI</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_SPI</H1>
+Section: Maintenance Commands (8)<BR>Updated: 23 Oct 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec spi - manage IPSEC Security Associations
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<BR>
+
+Note: In the following,
+<BR>
+
+<B>&lt;SA&gt;</B>
+
+means:
+<B>--af</B>
+
+(inet | inet6)
+<B>--edst</B>
+
+daddr
+<B>--spi</B>
+
+spi
+<B>--proto</B>
+
+proto OR
+<B>--said</B>
+
+said,
+<BR>
+
+<B>&lt;life&gt;</B>
+
+means:
+<B>--life</B>
+
+(soft | hard)-(allocations | bytes | addtime | usetime | packets)=value[,...]
+<P>
+
+<B>ipsec</B>
+
+<B>spi</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>spi</B>
+
+<B>&lt;SA&gt;</B>
+
+<B>--src</B>
+
+src
+<B>--ah</B>
+
+<B>hmac-md5-96</B>|<B>hmac-sha1-96</B>
+
+[
+<B>--replay_window</B>
+
+replayw ]
+[
+<B>&lt;life&gt;</B>
+
+]
+<B>--authkey</B>
+
+akey
+<P>
+
+<B>ipsec</B>
+
+<B>spi</B>
+
+<B>&lt;SA&gt;</B>
+
+<B>--src</B>
+
+src
+<B>--esp</B>
+
+<B>3des</B>
+
+[
+<B>--replay_window</B>
+
+replayw ]
+[
+<B>&lt;life&gt;</B>
+
+]
+<B>--enckey</B>
+
+ekey
+<P>
+
+<B>ipsec</B>
+
+<B>spi</B>
+
+<B>&lt;SA&gt;</B>
+
+<B>--src</B>
+
+src
+<B>--esp</B>
+
+<B>3des-md5-96</B>|<B>3des-sha1-96</B>
+
+[
+<B>--replay_window</B>
+
+replayw ]
+[
+<B>&lt;life&gt;</B>
+
+]
+<B>--enckey</B>
+
+ekey
+<B>--authkey</B>
+
+akey
+<P>
+
+<B>ipsec</B>
+
+<B>spi</B>
+
+<B>&lt;SA&gt;</B>
+
+<B>--src</B>
+
+src
+<B>--comp</B>
+
+<B>deflate</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>spi</B>
+
+<B>&lt;SA&gt;</B>
+
+<B>--ip4</B>
+
+<B>--src</B>
+
+encap-src
+<B>--dst</B>
+
+encap-dst
+<P>
+
+<B>ipsec</B>
+
+<B>spi</B>
+
+<B>&lt;SA&gt;</B>
+
+<B>--ip6</B>
+
+<B>--src</B>
+
+encap-src
+<B>--dst</B>
+
+encap-dst
+<P>
+
+<B>ipsec</B>
+
+<B>spi</B>
+
+<B>&lt;SA&gt;</B>
+
+<B>--del</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>spi</B>
+
+<B>--help</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>spi</B>
+
+<B>--version</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>spi</B>
+
+<B>--clear</B>
+
+<P>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Spi</I>
+
+creates and deletes IPSEC Security Associations.
+A Security Association (SA) is a transform through which packet
+contents are to be processed before being forwarded.
+A transform can be an IPv4-in-IPv4 or an IPv6-in-IPv6 encapsulation,
+an IPSEC Authentication Header (authentication with no encryption),
+or an IPSEC Encapsulation Security Payload (encryption, possibly
+including authentication).
+<P>
+
+When a packet is passed from a higher networking layer
+through an IPSEC virtual interface,
+a search in the extended routing table (see
+<I><A HREF="ipsec_eroute.8.html">ipsec_eroute</A></I>(8))
+
+yields an effective destination address, a
+Security Parameters Index (SPI) and a IP protocol number.
+When an IPSEC packet arrives from the network,
+its ostensible destination, an SPI and an IP protocol
+specified by its outermost IPSEC header are used.
+The destination/SPI/protocol combination is used to select a relevant SA.
+(See
+<I><A HREF="ipsec_spigrp.8.html">ipsec_spigrp</A></I>(8)
+
+for discussion of how multiple transforms are combined.)
+<P>
+
+The
+<I>af</I>,
+
+<I>daddr</I>,
+
+<I>spi</I>
+
+and
+<I>proto</I>
+
+arguments specify the SA to be created or deleted.
+<I>af</I>
+
+is the address family (inet for IPv4, inet6 for IPv6).
+<I>Daddr</I>
+
+is a destination address
+in dotted-decimal notation for IPv4
+or in a coloned hex notation for IPv6.
+<I>Spi</I>
+
+is a number, preceded by '0x' for hexadecimal,
+between
+<B>0x100</B>
+
+and
+<B>0xffffffff</B>;
+
+values from
+<B>0x0</B>
+
+to
+<B>0xff</B>
+
+are reserved.
+<I>Proto</I>
+
+is an ASCII string, &quot;ah&quot;, &quot;esp&quot;, &quot;comp&quot; or &quot;tun&quot;, specifying the IP protocol.
+The protocol must agree with the algorithm selected.
+<P>
+
+Alternatively, the
+<I>said</I>
+
+argument can also specify an SA to be created or deleted.
+<I>Said</I>
+
+combines the three parameters above, such as: &quot;<A HREF="mailto:tun.101@1.2.3.4">tun.101@1.2.3.4</A>&quot; or &quot;tun:101@1:2::3:4&quot;,
+where the address family is specified by &quot;.&quot; for IPv4 and &quot;:&quot; for IPv6. The address
+family indicators substitute the &quot;0x&quot; for hexadecimal.
+<P>
+
+The source address,
+<I>src</I>,
+
+must also be provided for the inbound policy check to
+function. The source address does not need to be included if inbound
+policy checking has been disabled.
+<P>
+
+Keys vectors must be entered as hexadecimal or base64 numbers.
+They should be cryptographically strong random numbers.
+<P>
+
+All hexadecimal numbers are entered as strings of hexadecimal digits
+(0-9 and a-f), without spaces, preceded by '0x', where each hexadecimal
+digit represents 4 bits.
+All base64 numbers are entered as strings of base64 digits
+<BR>&nbsp;(0-9,&nbsp;A-Z,&nbsp;a-z,&nbsp;'+'&nbsp;and&nbsp;'/'),&nbsp;without&nbsp;spaces,&nbsp;preceded&nbsp;by&nbsp;'0s',
+where each hexadecimal digit represents 6 bits and '=' is used for padding.
+<P>
+
+The deletion of an SA which has been grouped will result in the entire chain
+being deleted.
+<P>
+
+The form with no additional arguments lists the contents of
+/proc/net/ipsec_spi. The format of /proc/net/ipsec_spi is discussed in
+<A HREF="ipsec_spi.5.html">ipsec_spi</A>(5).
+<P>
+
+The lifetime severity of
+<B>soft</B>
+
+sets a limit when the key management daemons are asked to rekey the SA.
+The lifetime severity of
+<B>hard</B>
+
+sets a limit when the SA must expire.
+The lifetime type
+<B>allocations</B>
+
+tells the system when to expire the SA because it is being shared by too many
+eroutes (not currently used). The lifetime type of
+<B>bytes</B>
+
+tells the system to expire the SA after a certain number of bytes have been
+processed with that SA. The lifetime type of
+<B>addtime</B>
+
+tells the system to expire the SA a certain number of seconds after the SA was
+installed. The lifetime type of
+<B>usetime</B>
+
+tells the system to expire the SA a certain number of seconds after that SA has
+processed its first packet. The lifetime type of
+<B>packets</B>
+
+tells the system to expire the SA after a certain number of packets have been
+processed with that SA.
+<A NAME="lbAE">&nbsp;</A>
+<H2>OPTIONS</H2>
+
+<DL COMPACT>
+<DT><B>--af</B>
+
+<DD>
+specifies the address family (inet for IPv4, inet6 for IPv6)
+<DT><B>--edst</B>
+
+<DD>
+specifies the effective destination
+<I>daddr</I>
+
+of the Security Association
+<DT><B>--spi</B>
+
+<DD>
+specifies the Security Parameters Index
+<I>spi</I>
+
+of the Security Association
+<DT><B>--proto</B>
+
+<DD>
+specifies the IP protocol
+<I>proto</I>
+
+of the Security Association
+<DT><B>--said</B>
+
+<DD>
+specifies the Security Association in monolithic format
+<DT><B>--ah</B>
+
+<DD>
+add an SA for an IPSEC Authentication Header,
+specified by the following transform identifier
+(<B>hmac-md5-96</B>
+
+or
+<B>hmac-sha1-96</B>)
+
+(RFC2402, obsoletes RFC1826)
+<DT><B>hmac-md5-96</B>
+
+<DD>
+transform following the HMAC and MD5 standards,
+using a 128-bit
+<I>key</I>
+
+to produce a 96-bit authenticator (RFC2403)
+<DT><B>hmac-sha1-96</B>
+
+<DD>
+transform following the HMAC and SHA1 standards,
+using a 160-bit
+<I>key</I>
+
+to produce a 96-bit authenticator (RFC2404)
+<DT><B>--esp</B>
+
+<DD>
+add an SA for an IPSEC Encapsulation Security Payload,
+specified by the following
+transform identifier (<B>3des</B>,
+
+or
+<B>3des-md5-96</B>)
+
+(RFC2406, obsoletes RFC1827)
+<DT><B>3des</B>
+
+<DD>
+encryption transform following the Triple-DES standard in
+Cipher-Block-Chaining mode using a 64-bit
+<I>iv</I>
+
+(internally generated) and a 192-bit 3DES
+<I>ekey</I>
+
+(RFC2451)
+<DT><B>3des-md5-96</B>
+
+<DD>
+encryption transform following the Triple-DES standard in
+Cipher-Block-Chaining mode with authentication provided by
+HMAC and MD5
+(96-bit authenticator),
+using a 64-bit
+<I>iv</I>
+
+(internally generated), a 192-bit 3DES
+<I>ekey</I>
+
+and a 128-bit HMAC-MD5
+<I>akey</I>
+
+(RFC2451, RFC2403)
+<DT><B>3des-sha1-96</B>
+
+<DD>
+encryption transform following the Triple-DES standard in
+Cipher-Block-Chaining mode with authentication provided by
+HMAC and SHA1
+(96-bit authenticator),
+using a 64-bit
+<I>iv</I>
+
+(internally generated), a 192-bit 3DES
+<I>ekey</I>
+
+and a 160-bit HMAC-SHA1
+<I>akey</I>
+
+(RFC2451, RFC2404)
+<DT><B>--replay_window</B> replayw
+
+<DD>
+sets the replay window size; valid values are decimal, 1 to 64
+<DT><B>--life</B> life_param[,life_param]
+
+<DD>
+sets the lifetime expiry; the format of
+<B>life_param</B>
+
+consists of a comma-separated list of lifetime specifications without spaces;
+a lifetime specification is comprised of a severity of
+<B>soft</B> or <B>hard</B>
+
+followed by a '-', followed by a lifetime type of
+<B>allocations</B>, <B>bytes</B>, <B>addtime</B>, <B>usetime</B> or <B>packets</B>
+
+followed by an '=' and finally by a value
+<DT><B>--comp</B>
+
+<DD>
+add an SA for IPSEC IP Compression,
+specified by the following
+transform identifier (<B>deflate</B>)
+
+(RFC2393)
+<DT><B>deflate</B>
+
+<DD>
+compression transform following the patent-free Deflate compression algorithm
+(RFC2394)
+<DT><B>--ip4</B>
+
+<DD>
+add an SA for an IPv4-in-IPv4
+tunnel from
+<I>encap-src</I>
+
+to
+<I>encap-dst</I>
+
+<DT><B>--ip6</B>
+
+<DD>
+add an SA for an IPv6-in-IPv6
+tunnel from
+<I>encap-src</I>
+
+to
+<I>encap-dst</I>
+
+<DT><B>--src</B>
+
+<DD>
+specify the source end of an IP-in-IP tunnel from
+<I>encap-src</I>
+
+to
+<I>encap-dst</I>
+
+and also specifies the source address of the Security Association to be
+used in inbound policy checking and must be the same address
+family as
+<I>af</I>
+
+and
+<I>edst</I>
+
+<DT><B>--dst</B>
+
+<DD>
+specify the destination end of an IP-in-IP tunnel from
+<I>encap-src</I>
+
+to
+<I>encap-dst</I>
+
+<DT><B>--del</B>
+
+<DD>
+delete the specified SA
+<DT><B>--clear</B>
+
+<DD>
+clears the table of
+<B>SA</B>s
+
+<DT><B>--help</B>
+
+<DD>
+display synopsis
+<DT><B>--version</B>
+
+<DD>
+display version information
+</DL>
+<A NAME="lbAF">&nbsp;</A>
+<H2>EXAMPLES</H2>
+
+To keep line lengths down and reduce clutter,
+some of the long keys in these examples have been abbreviated
+by replacing part of their text with
+``<I>...</I>''.
+
+Keys used when the programs are actually run must,
+of course, be the full length required for the particular algorithm.
+<P>
+
+<B>ipsec spi --af inet --edst gw2 --spi 0x125 --proto esp \</B>
+
+<BR>
+
+<B> --src gw1 \</B>
+
+<BR>
+
+<B> --esp 3des-md5-96 \</B>
+
+<BR>
+
+<B>&nbsp;&nbsp;&nbsp;--enckey&nbsp;0x6630</B><I>...</I><B>97ce&nbsp;\</B>
+
+<BR>
+
+<B> --authkey 0x9941</B><I>...</I><B>71df</B>
+
+<P>
+
+sets up an SA from
+<B>gw1</B>
+
+to
+<B>gw2</B>
+
+with an SPI of
+<B>0x125</B>
+
+and protocol
+<B>ESP</B>
+
+(50) using
+<B>3DES</B>
+
+encryption with integral
+<B>MD5-96</B>
+
+authentication transform, using an encryption key of
+<B>0x6630</B><I>...</I><B>97ce</B>
+
+and an authentication key of
+<B>0x9941</B><I>...</I><B>71df</B>
+
+(see note above about abbreviated keys).
+<P>
+
+<B>ipsec spi --af inet6 --edst 3049:9::9000:3100 --spi 0x150 --proto ah \</B>
+
+<BR>
+
+<B> --src 3049:9::9000:3101 \</B>
+
+<BR>
+
+<B> --ah hmac-md5-96 \</B>
+
+<BR>
+
+<B>&nbsp;&nbsp;&nbsp;--authkey&nbsp;0x1234</B><I>...</I><B>2eda&nbsp;\</B>
+
+<P>
+
+sets up an SA from
+<B>3049:9::9000:3101</B>
+
+to
+<B>3049:9::9000:3100</B>
+
+with an SPI of
+<B>0x150</B>
+
+and protocol
+<B>AH</B>
+
+(50) using
+<B>MD5-96</B>
+
+authentication transform, using an authentication key of
+<B>0x1234</B><I>...</I><B>2eda</B>
+
+(see note above about abbreviated keys).
+<P>
+
+<B>ipsec spi --said <A HREF="mailto:tun.987@192.168.100.100">tun.987@192.168.100.100</A> --del </B>
+
+<P>
+
+deletes an SA to
+<B>192.168.100.100</B>
+
+with an SPI of
+<B>0x987</B>
+
+and protocol
+<B>IPv4-in-IPv4</B>
+
+(4).
+<P>
+
+<B>ipsec spi --said tun:<A HREF="mailto:500@3049">500@3049</A>:9::1000:1 --del </B>
+
+<P>
+
+deletes an SA to
+<B>3049:9::1000:1</B>
+
+with an SPI of
+<B>0x500</B>
+
+and protocol
+<B>IPv6-in-IPv6</B>
+
+(4).
+<P>
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>FILES</H2>
+
+/proc/net/ipsec_spi, /usr/local/bin/ipsec
+<A NAME="lbAH">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8), <A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A>(8), <A HREF="ipsec_eroute.8.html">ipsec_eroute</A>(8),
+<A HREF="ipsec_spigrp.8.html">ipsec_spigrp</A>(8), <A HREF="ipsec_klipsdebug.8.html">ipsec_klipsdebug</A>(8), <A HREF="ipsec_spi.5.html">ipsec_spi</A>(5)
+<A NAME="lbAI">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Richard Guy Briggs.
+<A NAME="lbAJ">&nbsp;</A>
+<H2>BUGS</H2>
+
+The syntax is messy and the transform naming needs work.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">OPTIONS</A><DD>
+<DT><A HREF="#lbAF">EXAMPLES</A><DD>
+<DT><A HREF="#lbAG">FILES</A><DD>
+<DT><A HREF="#lbAH">SEE ALSO</A><DD>
+<DT><A HREF="#lbAI">HISTORY</A><DD>
+<DT><A HREF="#lbAJ">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_spigrp.5.html b/doc/manpage.d/ipsec_spigrp.5.html
new file mode 100644
index 000000000..e0efcb73e
--- /dev/null
+++ b/doc/manpage.d/ipsec_spigrp.5.html
@@ -0,0 +1,193 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_SPIGRP</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_SPIGRP</H1>
+Section: File Formats (5)<BR>Updated: 27 Jun 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec_spigrp - list IPSEC Security Association groupings
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>spigrp</B>
+
+<P>
+
+<B>cat</B>
+
+<B>/proc/net/ipsec_spigrp</B>
+
+<P>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>/proc/net/ipsec_spigrp</I>
+
+is a read-only file that lists groups of IPSEC Security Associations
+(SAs).
+<P>
+
+An entry in the IPSEC extended routing table can only point (via an
+SAID) to one SA. If more than one transform must be applied to a given
+type of packet, this can be accomplished by setting up several SAs with
+the same destination address but potentially different SPIs and
+protocols, and grouping them with
+<I><A HREF="ipsec_spigrp.8.html">ipsec_spigrp</A>(8)</I>.
+
+<P>
+
+The SA groups are listed, one line per connection/group, as a sequence
+of SAs to be applied (or that should have been applied, in the case of
+an incoming packet) from inside to outside the packet. An SA is
+identified by its SAID, which consists of protocol (&quot;ah&quot;, &quot;esp&quot;, &quot;comp&quot; or
+&quot;tun&quot;), SPI (with '.' for IPv4 or ':' for IPv6 prefixed hexadecimal number ) and destination address
+(IPv4 dotted quad or IPv6 coloned hex) prefixed by '@', in the format &lt;proto&gt;&lt;af&gt;&lt;spi&gt;@&lt;dest&gt;.
+<A NAME="lbAE">&nbsp;</A>
+<H2>EXAMPLES</H2>
+
+<DL COMPACT>
+<DT><B><A HREF="mailto:tun.3d0@192.168.2.110">tun.3d0@192.168.2.110</A></B>
+
+<DD>
+<B><A HREF="mailto:comp.3d0@192.168.2.110">comp.3d0@192.168.2.110</A></B>
+
+<B><A HREF="mailto:esp.187a101b@192.168.2.110">esp.187a101b@192.168.2.110</A></B>
+
+<B><A HREF="mailto:ah.187a101a@192.168.2.110">ah.187a101a@192.168.2.110</A> </B>
+
+</DL>
+<P>
+
+is a group of 3 SAs, destined for
+<B>192.168.2.110</B>
+
+with an IPv4-in-IPv4 tunnel SA applied first with an SPI of
+<B>3d0</B>
+
+in hexadecimal, followed by a Deflate compression header to compress
+the packet with CPI of
+<B>3d0</B>
+
+in hexadecimal, followed by an Encapsulating Security Payload header to
+encrypt the packet with SPI
+<B>187a101b</B>
+
+in hexadecimal, followed by an Authentication Header to authenticate the
+packet with SPI
+<B>187a101a</B>
+
+in hexadecimal, applied from inside to outside the packet. This could
+be an incoming or outgoing group, depending on the address of the local
+machine.
+<P>
+
+<DL COMPACT>
+<DT><B>tun:<A HREF="mailto:3d0@3049">3d0@3049</A>:1::2</B>
+
+<DD>
+<B>comp:<A HREF="mailto:3d0@3049">3d0@3049</A>:1::2</B>
+
+<B>esp:<A HREF="mailto:187a101b@3049">187a101b@3049</A>:1::2</B>
+
+<B>ah:<A HREF="mailto:187a101a@3049">187a101a@3049</A>:1::2 </B>
+
+</DL>
+<P>
+
+is a group of 3 SAs, destined for
+<B>3049:1::2</B>
+
+with an IPv6-in-IPv6 tunnel SA applied first with an SPI of
+<B>3d0</B>
+
+in hexadecimal, followed by a Deflate compression header to compress
+the packet with CPI of
+<B>3d0</B>
+
+in hexadecimal, followed by an Encapsulating Security Payload header to
+encrypt the packet with SPI
+<B>187a101b</B>
+
+in hexadecimal, followed by an Authentication Header to authenticate the
+packet with SPI
+<B>187a101a</B>
+
+in hexadecimal, applied from inside to outside the packet. This could
+be an incoming or outgoing group, depending on the address of the local
+machine.
+<P>
+
+<A NAME="lbAF">&nbsp;</A>
+<H2>FILES</H2>
+
+/proc/net/ipsec_spigrp, /usr/local/bin/ipsec
+<A NAME="lbAG">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8), <A HREF="ipsec_tncfg.5.html">ipsec_tncfg</A>(5), <A HREF="ipsec_eroute.5.html">ipsec_eroute</A>(5),
+<A HREF="ipsec_spi.5.html">ipsec_spi</A>(5), <A HREF="ipsec_klipsdebug.5.html">ipsec_klipsdebug</A>(5), <A HREF="ipsec_spigrp.8.html">ipsec_spigrp</A>(8), <A HREF="ipsec_version.5.html">ipsec_version</A>(5),
+<A HREF="ipsec_pf_key.5.html">ipsec_pf_key</A>(5)
+<A NAME="lbAH">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Richard Guy Briggs.
+<A NAME="lbAI">&nbsp;</A>
+<H2>BUGS</H2>
+
+:-)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">EXAMPLES</A><DD>
+<DT><A HREF="#lbAF">FILES</A><DD>
+<DT><A HREF="#lbAG">SEE ALSO</A><DD>
+<DT><A HREF="#lbAH">HISTORY</A><DD>
+<DT><A HREF="#lbAI">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_spigrp.8.html b/doc/manpage.d/ipsec_spigrp.8.html
new file mode 100644
index 000000000..2e96c0574
--- /dev/null
+++ b/doc/manpage.d/ipsec_spigrp.8.html
@@ -0,0 +1,280 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_SPIGRP</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_SPIGRP</H1>
+Section: Maintenance Commands (8)<BR>Updated: 21 Jun 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec spigrp - group/ungroup IPSEC Security Associations
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>spigrp</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>spigrp</B>
+
+[
+<B>--label</B>
+
+label ]
+af1 dst1 spi1 proto1 [ af2 dst2 spi2 proto2 [ af3 dst3 spi3 proto3 [ af4 dst4 spi4 proto4 ] ] ]
+<P>
+
+<B>ipsec</B>
+
+<B>spigrp</B>
+
+[
+<B>--label</B>
+
+label ]
+<B>--said</B>
+
+SA1 [ SA2 [ SA3 [ SA4 ] ] ]
+<P>
+
+<B>ipsec</B>
+
+<B>spigrp</B>
+
+<B>--help</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>spigrp</B>
+
+<B>--version</B>
+
+<P>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Spigrp</I>
+
+groups IPSEC Security Associations (SAs) together or ungroups
+previously grouped SAs.
+An entry in the IPSEC extended
+routing table can only point
+(via a destination address, a Security Parameters Index (SPI) and
+a protocol identifier) to one SA.
+If more than one transform must be applied to a given type of packet,
+this can be accomplished by setting up several SAs
+with the same destination address but potentially different SPIs and protocols,
+and grouping them with
+<I>spigrp</I>.
+
+<P>
+
+The SAs to be grouped,
+specified by destination address (DNS name lookup, IPv4 dotted quad or IPv6 coloned hex), SPI
+('0x'-prefixed hexadecimal number) and protocol (&quot;ah&quot;, &quot;esp&quot;, &quot;comp&quot; or &quot;tun&quot;),
+are listed from the inside transform to the
+outside;
+in other words, the transforms are applied in
+the order of the command line and removed in the reverse
+order.
+The resulting SA group is referred to by its first SA (by
+<I>af1</I>,
+
+<I>dst1</I>,
+
+<I>spi1</I>
+
+and
+<I>proto1</I>).
+
+<P>
+
+The --said option indicates that the SA IDs are to be specified as
+one argument each, in the format &lt;proto&gt;&lt;af&gt;&lt;spi&gt;@&lt;dest&gt;. The SA IDs must
+all be specified as separate parameters without the --said option or
+all as monolithic parameters after the --said option.
+<P>
+
+The SAs must already exist and must not already
+be part of a group.
+<P>
+
+If
+<I>spigrp</I>
+
+is invoked with only one SA specification,
+it ungroups the previously-grouped set of SAs containing
+the SA specified.
+<P>
+
+The --label option identifies all responses from that command
+invocation with a user-supplied label, provided as an argument to the
+label option. This can be helpful for debugging one invocation of the
+command out of a large number.
+<P>
+
+The command form with no additional arguments lists the contents of
+/proc/net/ipsec_spigrp. The format of /proc/net/ipsec_spigrp is
+discussed in <A HREF="ipsec_spigrp.5.html">ipsec_spigrp</A>(5).
+<A NAME="lbAE">&nbsp;</A>
+<H2>EXAMPLES</H2>
+
+<DL COMPACT>
+<DT><B>ipsec spigrp inet gw2 0x113 tun inet gw2 0x115 esp inet gw2 0x116 ah</B>
+
+<DD>
+groups 3 SAs together, all destined for
+<B>gw2</B>,
+
+but with an IPv4-in-IPv4 tunnel SA applied first with SPI
+<B>0x113</B>,
+
+then an ESP header to encrypt the packet with SPI
+<B>0x115</B>,
+
+and finally an AH header to authenticate the packet with SPI
+<B>0x116</B>.
+
+</DL>
+<P>
+
+<DL COMPACT>
+<DT><B>ipsec spigrp --said tun.113@gw2 esp.115@gw2 ah.116@gw2 </B>
+
+<DD>
+groups 3 SAs together, all destined for
+<B>gw2</B>,
+
+but with an IPv4-in-IPv4 tunnel SA applied first with SPI
+<B>0x113</B>,
+
+then an ESP header to encrypt the packet with SPI
+<B>0x115</B>,
+
+and finally an AH header to authenticate the packet with SPI
+<B>0x116</B>.
+
+</DL>
+<P>
+
+<DL COMPACT>
+<DT><B>ipsec spigrp --said tun:<A HREF="mailto:233@3049">233@3049</A>:1::1 esp:<A HREF="mailto:235@3049">235@3049</A>:1::1 ah:<A HREF="mailto:236@3049">236@3049</A>:1::1 </B>
+
+<DD>
+groups 3 SAs together, all destined for
+<B>3049:1::1,</B>
+
+but with an IPv6-in-IPv6 tunnel SA applied first with SPI
+<B>0x233</B>,
+
+then an ESP header to encrypt the packet with SPI
+<B>0x235</B>,
+
+and finally an AH header to authenticate the packet with SPI
+<B>0x236</B>.
+
+</DL>
+<P>
+
+<DL COMPACT>
+<DT><B>ipsec spigrp inet6 3049:1::1 0x233 tun inet6 3049:1::1 0x235 esp inet6 3049:1::1 0x236 ah</B>
+
+<DD>
+groups 3 SAs together, all destined for
+<B>3049:1::1,</B>
+
+but with an IPv6-in-IPv6 tunnel SA applied first with SPI
+<B>0x233</B>,
+
+then an ESP header to encrypt the packet with SPI
+<B>0x235</B>,
+
+and finally an AH header to authenticate the packet with SPI
+<B>0x236</B>.
+
+</DL>
+<P>
+
+<A NAME="lbAF">&nbsp;</A>
+<H2>FILES</H2>
+
+/proc/net/ipsec_spigrp, /usr/local/bin/ipsec
+<A NAME="lbAG">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8), <A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A>(8), <A HREF="ipsec_eroute.8.html">ipsec_eroute</A>(8),
+<A HREF="ipsec_spi.8.html">ipsec_spi</A>(8), <A HREF="ipsec_klipsdebug.8.html">ipsec_klipsdebug</A>(8), <A HREF="ipsec_spigrp.5.html">ipsec_spigrp</A>(5)
+<A NAME="lbAH">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Richard Guy Briggs.
+<A NAME="lbAI">&nbsp;</A>
+<H2>BUGS</H2>
+
+Yes, it really is limited to a maximum of four SAs,
+although admittedly it's hard to see why you would need more.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">EXAMPLES</A><DD>
+<DT><A HREF="#lbAF">FILES</A><DD>
+<DT><A HREF="#lbAG">SEE ALSO</A><DD>
+<DT><A HREF="#lbAH">HISTORY</A><DD>
+<DT><A HREF="#lbAI">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_splitkeytoid.3.html b/doc/manpage.d/ipsec_splitkeytoid.3.html
new file mode 100644
index 000000000..109cfafa7
--- /dev/null
+++ b/doc/manpage.d/ipsec_splitkeytoid.3.html
@@ -0,0 +1,174 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_KEYBLOBTOID</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_KEYBLOBTOID</H1>
+Section: C Library Functions (3)<BR>Updated: 25 March 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec keyblobtoid, splitkeytoid - generate key IDs from RSA keys
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>size_t keyblobtoid(const unsigned char *blob,</B>
+
+<BR>
+&nbsp;
+<B>size_t bloblen, char *dst, size_t dstlen);</B>
+
+<BR>
+
+<B>size_t splitkeytoid(const unsigned char *e, size_t elen,</B>
+
+<BR>
+&nbsp;
+<B>const unsigned char *m, size_t mlen, char *dst,</B>
+
+<BR>
+&nbsp;
+<B>size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Keyblobtoid</I>
+
+and
+<I>splitkeytoid</I>
+
+generate
+key IDs
+from RSA keys,
+for use in messages and reporting,
+writing the result to
+<I>dst</I>.
+
+A
+<I>key ID</I>
+
+is a short ASCII string identifying a key;
+currently it is just the first nine characters of the base64
+encoding of the RFC 2537/3110 ``byte blob'' representation of the key.
+(Beware that no finite key ID can be collision-proof:
+there is always some small chance of two random keys having the
+same ID.)
+<P>
+
+<I>Keyblobtoid</I>
+
+generates a key ID from a key which is already in the form of an
+RFC 2537/3110 binary key
+<I>blob</I>
+
+(encoded exponent length, exponent, modulus).
+<P>
+
+<I>Splitkeytoid</I>
+
+generates a key ID from a key given in the form of a separate
+(binary) exponent
+<I>e</I>
+
+and modulus
+<I>m</I>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of either
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines a constant
+<B>KEYID_BUF</B>
+
+which is the size of a buffer large enough for worst-case results.
+<P>
+
+Both functions return
+<B>0</B>
+
+for a failure, and otherwise
+always return the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+
+With keys generated by
+<I><A HREF="ipsec_rsasigkey.3.html">ipsec_rsasigkey</A></I>(3),
+
+the first two base64 digits are always the same,
+and the third carries only about one bit of information.
+It's worse with keys using longer fixed exponents,
+e.g. the 24-bit exponent that's common in X.509 certificates.
+However, being able to relate key IDs to the full
+base64 text form of keys by eye is sufficiently useful that this
+waste of space seems justifiable.
+The choice of nine digits is a compromise between bulk and
+probability of collision.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+RFC 3110,
+<I>RSA/SHA-1 SIGs and RSA KEYs in the Domain Name System (DNS)</I>,
+Eastlake, 2001
+(superseding the older but better-known RFC 2537).
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors are:
+key too short to supply enough bits to construct a complete key ID
+(almost certainly indicating a garbage key);
+exponent too long for its length to be representable.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_subnetinsubnet.3.html b/doc/manpage.d/ipsec_subnetinsubnet.3.html
new file mode 100644
index 000000000..414a0d513
--- /dev/null
+++ b/doc/manpage.d/ipsec_subnetinsubnet.3.html
@@ -0,0 +1,274 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ANYADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 28 Nov 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec sameaddr - are two addresses the same?
+<BR>
+
+ipsec addrcmp - ordered comparison of addresses
+<BR>
+
+ipsec samesubnet - are two subnets the same?
+<BR>
+
+ipsec addrinsubnet - is an address within a subnet?
+<BR>
+
+ipsec subnetinsubnet - is a subnet within another subnet?
+<BR>
+
+ipsec subnetishost - is a subnet a single host?
+<BR>
+
+ipsec samesaid - are two SA IDs the same?
+<BR>
+
+ipsec sameaddrtype - are two addresses of the same address family?
+<BR>
+
+ipsec samesubnettype - are two subnets of the same address family?
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int sameaddr(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int addrcmp(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int addrinsubnet(const ip_address *a, const ip_subnet *s);</B>
+
+<BR>
+
+<B>int subnetinsubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int subnetishost(const ip_subnet *s);</B>
+
+<BR>
+
+<B>int samesaid(const ip_said *a, const ip_said *b);</B>
+
+<BR>
+
+<B>int sameaddrtype(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnettype(const ip_subnet *a, const ip_subnet *b);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions do various comparisons and tests on the
+<I>ip_address</I>
+
+type and
+<I>ip_subnet</I>
+
+types.
+<P>
+
+<I>Sameaddr</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Addresses of different families are never identical.
+<P>
+
+<I>Addrcmp</I>
+
+returns
+<B>-1</B>,
+
+<B>0</B>,
+
+or
+<B>1</B>
+
+respectively
+if address
+<I>a</I>
+
+is less than, equal to, or greater than
+<I>b</I>.
+
+If they are not of the same address family,
+they are never equal;
+the ordering reported in this case is arbitrary
+(and probably not useful) but consistent.
+<P>
+
+<I>Samesubnet</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Subnets of different address families are never identical.
+<P>
+
+<I>Addrinsubnet</I>
+
+returns
+non-zero
+if address
+<I>a</I>
+
+is within subnet
+<I>s</I>
+
+and
+<B>0</B>
+
+otherwise.
+An address is never within a
+subnet of a different address family.
+<P>
+
+<I>Subnetinsubnet</I>
+
+returns
+non-zero
+if subnet
+<I>a</I>
+
+is a subset of subnet
+<I>b</I>
+
+and
+<B>0</B>
+
+otherwise.
+A subnet is deemed to be a subset of itself.
+A subnet is never a subset of another
+subnet if their address families differ.
+<P>
+
+<I>Subnetishost</I>
+
+returns
+non-zero
+if subnet
+<I>s</I>
+
+is in fact only a single host,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesaid</I>
+
+returns
+non-zero
+if SA IDs
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Sameaddrtype</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesubnettype</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_initaddr.3.html">ipsec_initaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_subnetishost.3.html b/doc/manpage.d/ipsec_subnetishost.3.html
new file mode 100644
index 000000000..414a0d513
--- /dev/null
+++ b/doc/manpage.d/ipsec_subnetishost.3.html
@@ -0,0 +1,274 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ANYADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 28 Nov 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec sameaddr - are two addresses the same?
+<BR>
+
+ipsec addrcmp - ordered comparison of addresses
+<BR>
+
+ipsec samesubnet - are two subnets the same?
+<BR>
+
+ipsec addrinsubnet - is an address within a subnet?
+<BR>
+
+ipsec subnetinsubnet - is a subnet within another subnet?
+<BR>
+
+ipsec subnetishost - is a subnet a single host?
+<BR>
+
+ipsec samesaid - are two SA IDs the same?
+<BR>
+
+ipsec sameaddrtype - are two addresses of the same address family?
+<BR>
+
+ipsec samesubnettype - are two subnets of the same address family?
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>int sameaddr(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int addrcmp(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int addrinsubnet(const ip_address *a, const ip_subnet *s);</B>
+
+<BR>
+
+<B>int subnetinsubnet(const ip_subnet *a, const ip_subnet *b);</B>
+
+<BR>
+
+<B>int subnetishost(const ip_subnet *s);</B>
+
+<BR>
+
+<B>int samesaid(const ip_said *a, const ip_said *b);</B>
+
+<BR>
+
+<B>int sameaddrtype(const ip_address *a, const ip_address *b);</B>
+
+<BR>
+
+<B>int samesubnettype(const ip_subnet *a, const ip_subnet *b);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions do various comparisons and tests on the
+<I>ip_address</I>
+
+type and
+<I>ip_subnet</I>
+
+types.
+<P>
+
+<I>Sameaddr</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Addresses of different families are never identical.
+<P>
+
+<I>Addrcmp</I>
+
+returns
+<B>-1</B>,
+
+<B>0</B>,
+
+or
+<B>1</B>
+
+respectively
+if address
+<I>a</I>
+
+is less than, equal to, or greater than
+<I>b</I>.
+
+If they are not of the same address family,
+they are never equal;
+the ordering reported in this case is arbitrary
+(and probably not useful) but consistent.
+<P>
+
+<I>Samesubnet</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+Subnets of different address families are never identical.
+<P>
+
+<I>Addrinsubnet</I>
+
+returns
+non-zero
+if address
+<I>a</I>
+
+is within subnet
+<I>s</I>
+
+and
+<B>0</B>
+
+otherwise.
+An address is never within a
+subnet of a different address family.
+<P>
+
+<I>Subnetinsubnet</I>
+
+returns
+non-zero
+if subnet
+<I>a</I>
+
+is a subset of subnet
+<I>b</I>
+
+and
+<B>0</B>
+
+otherwise.
+A subnet is deemed to be a subset of itself.
+A subnet is never a subset of another
+subnet if their address families differ.
+<P>
+
+<I>Subnetishost</I>
+
+returns
+non-zero
+if subnet
+<I>s</I>
+
+is in fact only a single host,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesaid</I>
+
+returns
+non-zero
+if SA IDs
+<I>a</I>
+
+and
+<I>b</I>
+
+are identical,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Sameaddrtype</I>
+
+returns
+non-zero
+if addresses
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+<I>Samesubnettype</I>
+
+returns
+non-zero
+if subnets
+<I>a</I>
+
+and
+<I>b</I>
+
+are of the same address family,
+and
+<B>0</B>
+
+otherwise.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_initaddr.3.html">ipsec_initaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_subnetof.3.html b/doc/manpage.d/ipsec_subnetof.3.html
new file mode 100644
index 000000000..a185d716b
--- /dev/null
+++ b/doc/manpage.d/ipsec_subnetof.3.html
@@ -0,0 +1,107 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_SUBNETOF</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_SUBNETOF</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec subnetof - given Internet address and subnet mask, return subnet number
+<BR>
+
+ipsec hostof - given Internet address and subnet mask, return host part
+<BR>
+
+ipsec broadcastof - given Internet address and subnet mask, return broadcast address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>struct in_addr subnetof(struct in_addr addr,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr mask);</B>
+
+<BR>
+
+<B>struct in_addr hostof(struct in_addr addr,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr mask);</B>
+
+<BR>
+
+<B>struct in_addr broadcastof(struct in_addr addr,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr mask);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete; see
+<I><A HREF="ipsec_networkof.3.html">ipsec_networkof</A></I>(3)
+
+for their replacements.
+<P>
+
+<I>Subnetof</I>
+
+takes an Internet
+<I>address</I>
+
+and a subnet
+<I>mask</I>
+
+and returns the network part of the address
+(all in network byte order).
+<I>Hostof</I>
+
+similarly returns the host part, and
+<I>broadcastof</I>
+
+returns the broadcast address (all-1s convention) for the network.
+<P>
+
+These functions are provided to hide the Internet bit-munging inside
+an API, in hopes of easing the eventual transition to IPv6.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAG">&nbsp;</A>
+<H2>BUGS</H2>
+
+Calling functions for this is more costly than doing it yourself.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+<DT><A HREF="#lbAG">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_subnettoa.3.html b/doc/manpage.d/ipsec_subnettoa.3.html
new file mode 100644
index 000000000..718fa935a
--- /dev/null
+++ b/doc/manpage.d/ipsec_subnettoa.3.html
@@ -0,0 +1,448 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ATOADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ATOADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec atoaddr, addrtoa - convert Internet addresses to and from ASCII
+<BR>
+
+ipsec atosubnet, subnettoa - convert subnet/mask ASCII form to and from addresses
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *atoaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr *addr);</B>
+
+<BR>
+
+<B>size_t addrtoa(struct in_addr addr, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<P>
+<B>const char *atosubnet(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>struct in_addr *addr, struct in_addr *mask);</B>
+
+<BR>
+
+<B>size_t subnettoa(struct in_addr addr, struct in_addr mask,</B>
+
+<BR>
+&nbsp;
+<B>int format, char *dst, size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete; see
+<I><A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A></I>(3)
+
+for their replacements.
+<P>
+
+<I>Atoaddr</I>
+
+converts an ASCII name or dotted-decimal address into a binary address
+(in network byte order).
+<I>Addrtoa</I>
+
+does the reverse conversion, back to an ASCII dotted-decimal address.
+<I>Atosubnet</I>
+
+and
+<I>subnettoa</I>
+
+do likewise for the ``address/mask'' ASCII form used to write a
+specification of a subnet.
+<P>
+
+An address is specified in ASCII as a
+dotted-decimal address (e.g.
+<B>1.2.3.4</B>),
+
+an eight-digit network-order hexadecimal number with the usual C prefix (e.g.
+<B>0x01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>),
+
+an eight-digit host-order hexadecimal number with a
+<B>0h</B>
+
+prefix (e.g.
+<B>0h01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>
+
+on a big-endian host and
+<B>4.3.2.1</B>
+
+on a little-endian host),
+a DNS name to be looked up via
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3),
+
+or an old-style network name to be looked up via
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3).
+
+<P>
+
+A dotted-decimal address may be incomplete, in which case
+ASCII-to-binary conversion implicitly appends
+as many instances of
+<B>.0</B>
+
+as necessary to bring it up to four components.
+The components of a dotted-decimal address are always taken as
+decimal, and leading zeros are ignored.
+For example,
+<B>10</B>
+
+is synonymous with
+<B>10.0.0.0</B>,
+
+and
+<B>128.009.000.032</B>
+
+is synonymous with
+<B>128.9.0.32</B>
+
+(the latter example is verbatim from RFC 1166).
+The result of
+<I>addrtoa</I>
+
+is always complete and does not contain leading zeros.
+<P>
+
+The letters in
+a hexadecimal address may be uppercase or lowercase or any mixture thereof.
+Use of hexadecimal addresses is
+<B>strongly</B>
+
+<B>discouraged</B>;
+
+they are included only to save hassles when dealing with
+the handful of perverted programs which already print
+network addresses in hexadecimal.
+<P>
+
+DNS names may be complete (optionally terminated with a ``.'')
+or incomplete, and are looked up as specified by local system configuration
+(see
+<I><A HREF="resolver.5.html">resolver</A></I>(5)).
+
+The
+<I>h_addr</I>
+
+value returned by
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3)
+
+is used,
+so with current DNS implementations,
+the result when the name corresponds to more than one address is
+difficult to predict.
+Name lookup resorts to
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3)
+
+only if
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3)
+
+fails.
+<P>
+
+A subnet specification is of the form <I>network</I><B>/</B><I>mask</I>.
+The
+<I>network</I>
+
+and
+<I>mask</I>
+
+can be any form acceptable to
+<I>atoaddr</I>.
+
+In addition, the
+<I>mask</I>
+
+can be a decimal integer (leading zeros ignored) giving a bit count,
+in which case
+it stands for a mask with that number of high bits on and all others off
+(e.g.,
+<B>24</B>
+
+means
+<B>255.255.255.0</B>).
+
+In any case, the mask must be contiguous
+(a sequence of high bits on and all remaining low bits off).
+As a special case, the subnet specification
+<B>%default</B>
+
+is a synonym for
+<B>0.0.0.0/0</B>.
+
+<P>
+
+<I>Atosubnet</I>
+
+ANDs the mask with the address before returning,
+so that any non-network bits in the address are turned off
+(e.g.,
+<B>10.1.2.3/24</B>
+
+is synonymous with
+<B>10.1.2.0/24</B>).
+
+<I>Subnettoa</I>
+
+generates the decimal-integer-bit-count
+form of the mask,
+with no leading zeros,
+unless the mask is non-contiguous.
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>atoaddr</I>
+
+and
+<I>atosubnet</I>
+
+specifies the length of the ASCII string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>addrtoa</I>
+
+and
+<I>subnettoa</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines constants,
+<B>ADDRTOA_BUF</B>
+
+and
+<B>SUBNETTOA_BUF</B>,
+
+which are the sizes of buffers just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>addrtoa</I>
+
+and
+<I>subnettoa</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the ASCII character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default,
+and is in fact the only format currently available.
+This parameter is a hedge against future needs.
+<P>
+
+The ASCII-to-binary functions return NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+The binary-to-ASCII functions return
+<B>0</B>
+
+for a failure, and otherwise
+always return the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>atoaddr</I>
+
+are:
+empty input;
+attempt to allocate temporary storage for a very long name failed;
+name lookup failed;
+syntax error in dotted-decimal form;
+dotted-decimal component too large to fit in 8 bits.
+<P>
+
+Fatal errors in
+<I>atosubnet</I>
+
+are:
+no
+<B>/</B>
+
+in
+<I>src</I>;
+
+<I>atoaddr</I>
+
+error in conversion of
+<I>network</I>
+
+or
+<I>mask</I>;
+
+bit-count mask too big;
+mask non-contiguous.
+<P>
+
+Fatal errors in
+<I>addrtoa</I>
+
+and
+<I>subnettoa</I>
+
+are:
+unknown format.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The interpretation of incomplete dotted-decimal addresses
+(e.g.
+<B>10/24</B>
+
+means
+<B>10.0.0.0/24</B>)
+
+differs from that of some older conversion
+functions, e.g. those of
+<I><A HREF="inet.3.html">inet</A></I>(3).
+
+The behavior of the older functions has never been
+particularly consistent or particularly useful.
+<P>
+
+Ignoring leading zeros in dotted-decimal components and bit counts
+is arguably the most useful behavior in this application,
+but it might occasionally cause confusion with the historical use of leading
+zeros to denote octal numbers.
+<P>
+
+It is barely possible that somebody, somewhere,
+might have a legitimate use for non-contiguous subnet masks.
+<P>
+
+<I><A HREF="Getnetbyname.3.html">Getnetbyname</A></I>(3)
+
+is a historical dreg.
+<P>
+
+The restriction of ASCII-to-binary error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The ASCII-to-binary error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = atoaddr( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_subnettot.3.html b/doc/manpage.d/ipsec_subnettot.3.html
new file mode 100644
index 000000000..199937a35
--- /dev/null
+++ b/doc/manpage.d/ipsec_subnettot.3.html
@@ -0,0 +1,569 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TTOADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TTOADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 28 Sept 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ttoaddr, tnatoaddr, addrtot - convert Internet addresses to and from text
+<BR>
+
+ipsec ttosubnet, subnettot - convert subnet/mask text form to and from addresses
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *ttoaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_address *addr);</B>
+
+<BR>
+
+<B>const char *tnatoaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_address *addr);</B>
+
+<BR>
+
+<B>size_t addrtot(const ip_address *addr, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<P>
+<B>const char *ttosubnet(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_subnet *dst);</B>
+
+<BR>
+
+<B>size_t subnettot(const ip_subnet *sub, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Ttoaddr</I>
+
+converts a text-string name or numeric address into a binary address
+(in network byte order).
+<I>Tnatoaddr</I>
+
+does the same conversion,
+but the only text forms it accepts are
+the ``official'' forms of
+numeric address (dotted-decimal for IPv4, colon-hex for IPv6).
+<I>Addrtot</I>
+
+does the reverse conversion, from binary address back to a text form.
+<I>Ttosubnet</I>
+
+and
+<I>subnettot</I>
+
+do likewise for the ``address/mask'' form used to write a
+specification of a subnet.
+<P>
+
+An IPv4 address is specified in text as a
+dotted-decimal address (e.g.
+<B>1.2.3.4</B>),
+
+an eight-digit network-order hexadecimal number with the usual C prefix (e.g.
+<B>0x01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>),
+
+an eight-digit host-order hexadecimal number with a
+<B>0h</B>
+
+prefix (e.g.
+<B>0h01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>
+
+on a big-endian host and
+<B>4.3.2.1</B>
+
+on a little-endian host),
+a DNS name to be looked up via
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3),
+
+or an old-style network name to be looked up via
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3).
+
+<P>
+
+A dotted-decimal address may be incomplete, in which case
+text-to-binary conversion implicitly appends
+as many instances of
+<B>.0</B>
+
+as necessary to bring it up to four components.
+The components of a dotted-decimal address are always taken as
+decimal, and leading zeros are ignored.
+For example,
+<B>10</B>
+
+is synonymous with
+<B>10.0.0.0</B>,
+
+and
+<B>128.009.000.032</B>
+
+is synonymous with
+<B>128.9.0.32</B>
+
+(the latter example is verbatim from RFC 1166).
+The result of applying
+<I>addrtot</I>
+
+to an IPv4 address is always complete and does not contain leading zeros.
+<P>
+
+Use of hexadecimal addresses is
+<B>strongly</B>
+
+<B>discouraged</B>;
+
+they are included only to save hassles when dealing with
+the handful of perverted programs which already print
+network addresses in hexadecimal.
+<P>
+
+An IPv6 address is specified in text with
+colon-hex notation (e.g.
+<B>0:56:78ab:22:33:44:55:66</B>),
+
+colon-hex with
+<B>::</B>
+
+abbreviating at most one subsequence of multiple zeros (e.g.
+<B>99:ab::54:068</B>,
+
+which is synonymous with
+<B>99:ab:0:0:0:0:54:68</B>),
+
+or a DNS name to be looked up via
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3).
+
+The result of applying
+<I>addrtot</I>
+
+to an IPv6 address will use
+<B>::</B>
+
+abbreviation if possible,
+and will not contain leading zeros.
+<P>
+
+The letters in hexadecimal
+may be uppercase or lowercase or any mixture thereof.
+<P>
+
+DNS names may be complete (optionally terminated with a ``.'')
+or incomplete, and are looked up as specified by local system configuration
+(see
+<I><A HREF="resolver.5.html">resolver</A></I>(5)).
+
+The
+<I>h_addr</I>
+
+value returned by
+<I><A HREF="gethostbyname2.3.html">gethostbyname2</A></I>(3)
+
+is used,
+so with current DNS implementations,
+the result when the name corresponds to more than one address is
+difficult to predict.
+IPv4 name lookup resorts to
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3)
+
+only if
+<I><A HREF="gethostbyname2.3.html">gethostbyname2</A></I>(3)
+
+fails.
+<P>
+
+A subnet specification is of the form <I>network</I><B>/</B><I>mask</I>.
+The
+<I>network</I>
+
+and
+<I>mask</I>
+
+can be any form acceptable to
+<I>ttoaddr</I>.
+
+In addition, and preferably, the
+<I>mask</I>
+
+can be a decimal integer (leading zeros ignored) giving a bit count,
+in which case
+it stands for a mask with that number of high bits on and all others off
+(e.g.,
+<B>24</B>
+
+in IPv4 means
+<B>255.255.255.0</B>).
+
+In any case, the mask must be contiguous
+(a sequence of high bits on and all remaining low bits off).
+As a special case, the subnet specification
+<B>%default</B>
+
+is a synonym for
+<B>0.0.0.0/0</B>
+
+or
+<B>::/0</B>
+
+in IPv4 or IPv6 respectively.
+<P>
+
+<I>Ttosubnet</I>
+
+ANDs the mask with the address before returning,
+so that any non-network bits in the address are turned off
+(e.g.,
+<B>10.1.2.3/24</B>
+
+is synonymous with
+<B>10.1.2.0/24</B>).
+
+<I>Subnettot</I>
+
+always generates the decimal-integer-bit-count
+form of the mask,
+with no leading zeros.
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>ttoaddr</I>
+
+and
+<I>ttosubnet</I>
+
+specifies the length of the text string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>af</I>
+
+parameter of
+<I>ttoaddr</I>
+
+and
+<I>ttosubnet</I>
+
+specifies the address family of interest.
+It should be either
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>addrtot</I>
+
+and
+<I>subnettot</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines constants,
+<B>ADDRTOT_BUF</B>
+
+and
+<B>SUBNETTOT_BUF</B>,
+
+which are the sizes of buffers just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>addrtot</I>
+
+and
+<I>subnettot</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default,
+and is in fact the only format currently available in
+<I>subnettot</I>.
+
+<I>Addrtot</I>
+
+also accepts format values
+<B>'r'</B>
+
+(signifying a text form suitable for DNS reverse lookups,
+e.g.
+<B>4.3.2.1.IN-ADDR.ARPA.</B>
+
+for IPv4 and
+RFC 2874 format for IPv6),
+and
+<B>'R'</B>
+
+(signifying an alternate reverse-lookup form,
+an error for IPv4 and RFC 1886 format for IPv6).
+Reverse-lookup names always end with a ``.''.
+<P>
+
+The text-to-binary functions return NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+The binary-to-text functions return
+<B>0</B>
+
+for a failure, and otherwise
+always return the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>ttoaddr</I>
+
+are:
+empty input;
+unknown address family;
+attempt to allocate temporary storage for a very long name failed;
+name lookup failed;
+syntax error in dotted-decimal or colon-hex form;
+dotted-decimal or colon-hex component too large.
+<P>
+
+Fatal errors in
+<I>ttosubnet</I>
+
+are:
+no
+<B>/</B>
+
+in
+<I>src</I>;
+
+<I>ttoaddr</I>
+
+error in conversion of
+<I>network</I>
+
+or
+<I>mask</I>;
+
+bit-count mask too big;
+mask non-contiguous.
+<P>
+
+Fatal errors in
+<I>addrtot</I>
+
+and
+<I>subnettot</I>
+
+are:
+unknown format.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The interpretation of incomplete dotted-decimal addresses
+(e.g.
+<B>10/24</B>
+
+means
+<B>10.0.0.0/24</B>)
+
+differs from that of some older conversion
+functions, e.g. those of
+<I><A HREF="inet.3.html">inet</A></I>(3).
+
+The behavior of the older functions has never been
+particularly consistent or particularly useful.
+<P>
+
+Ignoring leading zeros in dotted-decimal components and bit counts
+is arguably the most useful behavior in this application,
+but it might occasionally cause confusion with the historical use of leading
+zeros to denote octal numbers.
+<P>
+
+<I>Ttoaddr</I>
+
+does not support the mixed colon-hex-dotted-decimal
+convention used to embed an IPv4 address in an IPv6 address.
+<P>
+
+<I>Addrtot</I>
+
+always uses the
+<B>::</B>
+
+abbreviation (which can appear only once in an address) for the
+<I>first</I>
+
+sequence of multiple zeros in an IPv6 address.
+One can construct addresses (unlikely ones) in which this is suboptimal.
+<P>
+
+<I>Addrtot</I>
+
+<B>'r'</B>
+
+conversion of an IPv6 address uses lowercase hexadecimal,
+not the uppercase used in RFC 2874's examples.
+It takes careful reading of RFCs 2874, 2673, and 2234 to realize
+that lowercase is technically legitimate here,
+and there may be software which botches this
+and hence would have trouble with lowercase hex.
+<P>
+
+Possibly
+<I>subnettot</I>
+
+ought to recognize the
+<B>%default</B>
+
+case and generate that string as its output.
+Currently it doesn't.
+<P>
+
+It is barely possible that somebody, somewhere,
+might have a legitimate use for non-contiguous subnet masks.
+<P>
+
+<I><A HREF="Getnetbyname.3.html">Getnetbyname</A></I>(3)
+
+is a historical dreg.
+<P>
+
+<I>Tnatoaddr</I>
+
+probably should enforce completeness of dotted-decimal addresses.
+<P>
+
+The restriction of text-to-binary error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The text-to-binary error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = ttoaddr( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_subnettypeof.3.html b/doc/manpage.d/ipsec_subnettypeof.3.html
new file mode 100644
index 000000000..ea0f83f82
--- /dev/null
+++ b/doc/manpage.d/ipsec_subnettypeof.3.html
@@ -0,0 +1,238 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_INITSUBNET</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_INITSUBNET</H1>
+Section: C Library Functions (3)<BR>Updated: 12 March 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec initsubnet - initialize an ip_subnet
+<BR>
+
+ipsec addrtosubnet - initialize a singleton ip_subnet
+<BR>
+
+ipsec subnettypeof - get address type of an ip_subnet
+<BR>
+
+ipsec masktocount - convert subnet mask to bit count
+<BR>
+
+ipsec networkof - get base address of an ip_subnet
+<BR>
+
+ipsec maskof - get subnet mask of an ip_subnet
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *initsubnet(const ip_address *addr,</B>
+
+<BR>
+&nbsp;
+<B>int maskbits, int clash, ip_subnet *dst);</B>
+
+<BR>
+
+<B>const char *addrtosubnet(const ip_address *addr,</B>
+
+<BR>
+&nbsp;
+<B>ip_subnet *dst);</B>
+
+<P>
+<B>int subnettypeof(const ip_subnet *src);</B>
+
+<BR>
+
+<B>int masktocount(const ip_address *src);</B>
+
+<BR>
+
+<B>void networkof(const ip_subnet *src, ip_address *dst);</B>
+
+<BR>
+
+<B>void maskof(const ip_subnet *src, ip_address *dst);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+library uses an internal type
+<I>ip_subnet</I>
+
+to contain a description of an IP subnet
+(base address plus mask).
+These functions provide basic tools for creating and examining this type.
+<P>
+
+<I>Initsubnet</I>
+
+initializes a variable
+<I>*dst</I>
+
+of type
+<I>ip_subnet</I>
+
+from a base address and
+a count of mask bits.
+The
+<I>clash</I>
+
+parameter specifies what to do if the base address includes
+<B>1</B>
+
+bits outside the prefix specified by the mask
+(that is, in the ``host number'' part of the address):
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT>'0'<DD>
+zero out host-number bits
+<DT>'x'<DD>
+non-zero host-number bits are an error
+</DL>
+</DL>
+
+<P>
+
+<I>Initsubnet</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<P>
+
+<I>Addrtosubnet</I>
+
+initializes an
+<I>ip_subnet</I>
+
+variable
+<I>*dst</I>
+
+to a ``singleton subnet'' containing the single address
+<I>*addr</I>.
+
+It returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure.
+<P>
+
+<I>Subnettypeof</I>
+
+returns the address type of a subnet,
+normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+(The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file arranges to include the necessary headers for these
+names to be known.)
+<P>
+
+<I>Masktocount</I>
+
+converts a subnet mask, expressed as an address, to a bit count
+suitable for use with
+<I>initsubnet</I>.
+
+It returns
+<B>-1</B>
+
+for error; see DIAGNOSTICS.
+<P>
+
+<I>Networkof</I>
+
+fills in
+<I>*dst</I>
+
+with the base address of subnet
+<I>src</I>.
+
+<P>
+
+<I>Maskof</I>
+
+fills in
+<I>*dst</I>
+
+with the subnet mask of subnet
+<I>src</I>,
+
+expressed as an address.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_ttosubnet.3.html">ipsec_ttosubnet</A>(3), <A HREF="ipsec_rangetosubnet.3.html">ipsec_rangetosubnet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>initsubnet</I>
+
+are:
+unknown address family;
+unknown
+<I>clash</I>
+
+value;
+impossible mask bit count;
+non-zero host-number bits and
+<I>clash</I>
+
+is
+<B>'x'</B>.
+
+Fatal errors in
+<I>addrtosubnet</I>
+
+are:
+unknown address family.
+Fatal errors in
+<I>masktocount</I>
+
+are:
+unknown address family;
+mask bits not contiguous.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_tnatoaddr.3.html b/doc/manpage.d/ipsec_tnatoaddr.3.html
new file mode 100644
index 000000000..199937a35
--- /dev/null
+++ b/doc/manpage.d/ipsec_tnatoaddr.3.html
@@ -0,0 +1,569 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TTOADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TTOADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 28 Sept 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ttoaddr, tnatoaddr, addrtot - convert Internet addresses to and from text
+<BR>
+
+ipsec ttosubnet, subnettot - convert subnet/mask text form to and from addresses
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *ttoaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_address *addr);</B>
+
+<BR>
+
+<B>const char *tnatoaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_address *addr);</B>
+
+<BR>
+
+<B>size_t addrtot(const ip_address *addr, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<P>
+<B>const char *ttosubnet(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_subnet *dst);</B>
+
+<BR>
+
+<B>size_t subnettot(const ip_subnet *sub, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Ttoaddr</I>
+
+converts a text-string name or numeric address into a binary address
+(in network byte order).
+<I>Tnatoaddr</I>
+
+does the same conversion,
+but the only text forms it accepts are
+the ``official'' forms of
+numeric address (dotted-decimal for IPv4, colon-hex for IPv6).
+<I>Addrtot</I>
+
+does the reverse conversion, from binary address back to a text form.
+<I>Ttosubnet</I>
+
+and
+<I>subnettot</I>
+
+do likewise for the ``address/mask'' form used to write a
+specification of a subnet.
+<P>
+
+An IPv4 address is specified in text as a
+dotted-decimal address (e.g.
+<B>1.2.3.4</B>),
+
+an eight-digit network-order hexadecimal number with the usual C prefix (e.g.
+<B>0x01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>),
+
+an eight-digit host-order hexadecimal number with a
+<B>0h</B>
+
+prefix (e.g.
+<B>0h01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>
+
+on a big-endian host and
+<B>4.3.2.1</B>
+
+on a little-endian host),
+a DNS name to be looked up via
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3),
+
+or an old-style network name to be looked up via
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3).
+
+<P>
+
+A dotted-decimal address may be incomplete, in which case
+text-to-binary conversion implicitly appends
+as many instances of
+<B>.0</B>
+
+as necessary to bring it up to four components.
+The components of a dotted-decimal address are always taken as
+decimal, and leading zeros are ignored.
+For example,
+<B>10</B>
+
+is synonymous with
+<B>10.0.0.0</B>,
+
+and
+<B>128.009.000.032</B>
+
+is synonymous with
+<B>128.9.0.32</B>
+
+(the latter example is verbatim from RFC 1166).
+The result of applying
+<I>addrtot</I>
+
+to an IPv4 address is always complete and does not contain leading zeros.
+<P>
+
+Use of hexadecimal addresses is
+<B>strongly</B>
+
+<B>discouraged</B>;
+
+they are included only to save hassles when dealing with
+the handful of perverted programs which already print
+network addresses in hexadecimal.
+<P>
+
+An IPv6 address is specified in text with
+colon-hex notation (e.g.
+<B>0:56:78ab:22:33:44:55:66</B>),
+
+colon-hex with
+<B>::</B>
+
+abbreviating at most one subsequence of multiple zeros (e.g.
+<B>99:ab::54:068</B>,
+
+which is synonymous with
+<B>99:ab:0:0:0:0:54:68</B>),
+
+or a DNS name to be looked up via
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3).
+
+The result of applying
+<I>addrtot</I>
+
+to an IPv6 address will use
+<B>::</B>
+
+abbreviation if possible,
+and will not contain leading zeros.
+<P>
+
+The letters in hexadecimal
+may be uppercase or lowercase or any mixture thereof.
+<P>
+
+DNS names may be complete (optionally terminated with a ``.'')
+or incomplete, and are looked up as specified by local system configuration
+(see
+<I><A HREF="resolver.5.html">resolver</A></I>(5)).
+
+The
+<I>h_addr</I>
+
+value returned by
+<I><A HREF="gethostbyname2.3.html">gethostbyname2</A></I>(3)
+
+is used,
+so with current DNS implementations,
+the result when the name corresponds to more than one address is
+difficult to predict.
+IPv4 name lookup resorts to
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3)
+
+only if
+<I><A HREF="gethostbyname2.3.html">gethostbyname2</A></I>(3)
+
+fails.
+<P>
+
+A subnet specification is of the form <I>network</I><B>/</B><I>mask</I>.
+The
+<I>network</I>
+
+and
+<I>mask</I>
+
+can be any form acceptable to
+<I>ttoaddr</I>.
+
+In addition, and preferably, the
+<I>mask</I>
+
+can be a decimal integer (leading zeros ignored) giving a bit count,
+in which case
+it stands for a mask with that number of high bits on and all others off
+(e.g.,
+<B>24</B>
+
+in IPv4 means
+<B>255.255.255.0</B>).
+
+In any case, the mask must be contiguous
+(a sequence of high bits on and all remaining low bits off).
+As a special case, the subnet specification
+<B>%default</B>
+
+is a synonym for
+<B>0.0.0.0/0</B>
+
+or
+<B>::/0</B>
+
+in IPv4 or IPv6 respectively.
+<P>
+
+<I>Ttosubnet</I>
+
+ANDs the mask with the address before returning,
+so that any non-network bits in the address are turned off
+(e.g.,
+<B>10.1.2.3/24</B>
+
+is synonymous with
+<B>10.1.2.0/24</B>).
+
+<I>Subnettot</I>
+
+always generates the decimal-integer-bit-count
+form of the mask,
+with no leading zeros.
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>ttoaddr</I>
+
+and
+<I>ttosubnet</I>
+
+specifies the length of the text string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>af</I>
+
+parameter of
+<I>ttoaddr</I>
+
+and
+<I>ttosubnet</I>
+
+specifies the address family of interest.
+It should be either
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>addrtot</I>
+
+and
+<I>subnettot</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines constants,
+<B>ADDRTOT_BUF</B>
+
+and
+<B>SUBNETTOT_BUF</B>,
+
+which are the sizes of buffers just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>addrtot</I>
+
+and
+<I>subnettot</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default,
+and is in fact the only format currently available in
+<I>subnettot</I>.
+
+<I>Addrtot</I>
+
+also accepts format values
+<B>'r'</B>
+
+(signifying a text form suitable for DNS reverse lookups,
+e.g.
+<B>4.3.2.1.IN-ADDR.ARPA.</B>
+
+for IPv4 and
+RFC 2874 format for IPv6),
+and
+<B>'R'</B>
+
+(signifying an alternate reverse-lookup form,
+an error for IPv4 and RFC 1886 format for IPv6).
+Reverse-lookup names always end with a ``.''.
+<P>
+
+The text-to-binary functions return NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+The binary-to-text functions return
+<B>0</B>
+
+for a failure, and otherwise
+always return the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>ttoaddr</I>
+
+are:
+empty input;
+unknown address family;
+attempt to allocate temporary storage for a very long name failed;
+name lookup failed;
+syntax error in dotted-decimal or colon-hex form;
+dotted-decimal or colon-hex component too large.
+<P>
+
+Fatal errors in
+<I>ttosubnet</I>
+
+are:
+no
+<B>/</B>
+
+in
+<I>src</I>;
+
+<I>ttoaddr</I>
+
+error in conversion of
+<I>network</I>
+
+or
+<I>mask</I>;
+
+bit-count mask too big;
+mask non-contiguous.
+<P>
+
+Fatal errors in
+<I>addrtot</I>
+
+and
+<I>subnettot</I>
+
+are:
+unknown format.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The interpretation of incomplete dotted-decimal addresses
+(e.g.
+<B>10/24</B>
+
+means
+<B>10.0.0.0/24</B>)
+
+differs from that of some older conversion
+functions, e.g. those of
+<I><A HREF="inet.3.html">inet</A></I>(3).
+
+The behavior of the older functions has never been
+particularly consistent or particularly useful.
+<P>
+
+Ignoring leading zeros in dotted-decimal components and bit counts
+is arguably the most useful behavior in this application,
+but it might occasionally cause confusion with the historical use of leading
+zeros to denote octal numbers.
+<P>
+
+<I>Ttoaddr</I>
+
+does not support the mixed colon-hex-dotted-decimal
+convention used to embed an IPv4 address in an IPv6 address.
+<P>
+
+<I>Addrtot</I>
+
+always uses the
+<B>::</B>
+
+abbreviation (which can appear only once in an address) for the
+<I>first</I>
+
+sequence of multiple zeros in an IPv6 address.
+One can construct addresses (unlikely ones) in which this is suboptimal.
+<P>
+
+<I>Addrtot</I>
+
+<B>'r'</B>
+
+conversion of an IPv6 address uses lowercase hexadecimal,
+not the uppercase used in RFC 2874's examples.
+It takes careful reading of RFCs 2874, 2673, and 2234 to realize
+that lowercase is technically legitimate here,
+and there may be software which botches this
+and hence would have trouble with lowercase hex.
+<P>
+
+Possibly
+<I>subnettot</I>
+
+ought to recognize the
+<B>%default</B>
+
+case and generate that string as its output.
+Currently it doesn't.
+<P>
+
+It is barely possible that somebody, somewhere,
+might have a legitimate use for non-contiguous subnet masks.
+<P>
+
+<I><A HREF="Getnetbyname.3.html">Getnetbyname</A></I>(3)
+
+is a historical dreg.
+<P>
+
+<I>Tnatoaddr</I>
+
+probably should enforce completeness of dotted-decimal addresses.
+<P>
+
+The restriction of text-to-binary error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The text-to-binary error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = ttoaddr( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_tncfg.5.html b/doc/manpage.d/ipsec_tncfg.5.html
new file mode 100644
index 000000000..e4082a28f
--- /dev/null
+++ b/doc/manpage.d/ipsec_tncfg.5.html
@@ -0,0 +1,175 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TNCFG</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TNCFG</H1>
+Section: File Formats (5)<BR>Updated: 27 Jun 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec_tncfg - lists IPSEC virtual interfaces attached to real interfaces
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>tncfg</B>
+
+<P>
+
+<B>cat</B>
+
+<B>/proc/net/ipsec_tncfg</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>/proc/net/ipsec_tncfg</I>
+
+is a read-only file which lists which IPSEC virtual interfaces are
+attached to which real interfaces, through which packets will be
+forwarded once processed by IPSEC.
+<P>
+
+Each line lists one ipsec I/F.
+A table entry consists of:
+<DL COMPACT>
+<DT>+<DD>
+an ipsec virtual I/F name
+<DT>+<DD>
+a visual and machine parsable separator '-&gt;', separating the virtual I/F
+and the physical I/F,
+<DT>+<DD>
+a physical I/F name, to which the ipsec virtual I/F is attached or NULL
+if it is not attached,
+<DT>+<DD>
+the keyword
+<B>mtu=</B>,
+
+<DT>+<DD>
+the MTU of the ipsec virtual I/F,
+<DT>+<DD>
+the automatically adjusted effective MTU for PMTU discovery, in brackets,
+<DT>+<DD>
+a visual and machine parsable separator '-&gt;', separating the virtual I/F
+MTU and the physical I/F MTU,
+<DT>+<DD>
+the MTU of the attached physical I/F.
+<B>.SH</B>EXAMPLES
+
+<DT><B>ipsec2 -&gt; eth3 mtu=16260(1443) -&gt; 1500</B>
+
+<DD>
+</DL>
+<P>
+
+shows that virtual device
+<B>ipsec2</B>
+
+with an MTU of
+<B>16260</B>
+
+is connected to physical device
+<B>eth3</B>
+
+with an MTU of
+<B>1500</B>
+
+and that the effective MTU as a result of PMTU discovery has been
+automatically set to
+<B>1443.</B>
+
+<DL COMPACT>
+<DT><B>ipsec0 -&gt; wvlan0 mtu=1400(16260) -&gt; 1500</B>
+
+<DD>
+</DL>
+<P>
+
+shows that virtual device
+<B>ipsec0</B>
+
+with an MTU of
+<B>1400</B>
+
+is connected to physical device
+<B>wvlan0</B>
+
+with an MTU of
+<B>1500</B>
+
+and no PMTU packets have gotten far enough to bump down the effective MTU
+from its default of 16260.
+<DL COMPACT>
+<DT><B>ipsec3 -&gt; NULL mtu=0(0) -&gt; 0</B>
+
+<DD>
+</DL>
+<P>
+
+shows that virtual device
+<B>ipsec3</B>
+
+is not connected to any physical device.
+<P>
+
+<A NAME="lbAE">&nbsp;</A>
+<H2>FILES</H2>
+
+/proc/net/ipsec_tncfg, /usr/local/bin/ipsec
+<A NAME="lbAF">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8), <A HREF="ipsec_eroute.5.html">ipsec_eroute</A>(5), <A HREF="ipsec_spi.5.html">ipsec_spi</A>(5),
+<A HREF="ipsec_spigrp.5.html">ipsec_spigrp</A>(5), <A HREF="ipsec_klipsdebug.5.html">ipsec_klipsdebug</A>(5), <A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A>(8), <A HREF="ipsec_version.5.html">ipsec_version</A>(5),
+<A HREF="ipsec_pf_key.5.html">ipsec_pf_key</A>(5)
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Richard Guy Briggs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">FILES</A><DD>
+<DT><A HREF="#lbAF">SEE ALSO</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_tncfg.8.html b/doc/manpage.d/ipsec_tncfg.8.html
new file mode 100644
index 000000000..e5965267c
--- /dev/null
+++ b/doc/manpage.d/ipsec_tncfg.8.html
@@ -0,0 +1,195 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TNCFG</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TNCFG</H1>
+Section: Maintenance Commands (8)<BR>Updated: 21 Jun 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec tncfg - associate IPSEC virtual interface with physical interface
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>tncfg</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>tncfg</B>
+
+<B>--attach</B>
+
+<B>--virtual</B>
+
+virtual
+<B>--physical</B>
+
+physical
+<P>
+
+<B>ipsec</B>
+
+<B>tncfg</B>
+
+<B>--detach</B>
+
+<B>--virtual</B>
+
+virtual
+<P>
+
+<B>ipsec</B>
+
+<B>tncfg</B>
+
+<B>--clear</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>tncfg</B>
+
+<B>--version</B>
+
+<P>
+
+<B>ipsec</B>
+
+<B>tncfg</B>
+
+<B>--help</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Tncfg</I>
+
+attaches/detaches IPSEC virtual interfaces to/from
+physical interfaces,
+through which packets will be forwarded once processed by IPSEC.
+<P>
+
+The form with no additional arguments lists the contents of
+/proc/net/ipsec_tncfg. The format of /proc/net/ipsec_tncfg is discussed
+in <A HREF="ipsec_tncfg.5.html">ipsec_tncfg</A>(5).
+The
+<B>--attach</B>
+
+form attaches the
+<I>virtual</I>
+
+interface to the
+<I>physical</I>
+
+one.
+The
+<B>--detach</B>
+
+form detaches the
+<I>virtual</I>
+
+interface from whichever physical interface it is attached to.
+The
+<B>--clear</B>
+
+form clears all the
+<I>virtual</I>
+
+interfaces from whichever physical interfaces they were attached to.
+<P>
+
+Virtual interfaces typically have names like
+<B>ipsec0</B>,
+
+while physical interfaces typically have names like
+<B>eth0</B>
+
+or
+<B>ppp0</B>.
+
+<A NAME="lbAE">&nbsp;</A>
+<H2>EXAMPLES</H2>
+
+<DL COMPACT>
+<DT><B>ipsec tncfg --attach --virtual ipsec0 --physical eth0</B>
+
+<DD>
+attaches the
+<B>ipsec0</B>
+
+virtual device to the
+<B>eth0</B>
+
+physical device.
+</DL>
+<P>
+
+<A NAME="lbAF">&nbsp;</A>
+<H2>FILES</H2>
+
+/proc/net/ipsec_tncfg, /usr/local/bin/ipsec
+<A NAME="lbAG">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8), <A HREF="ipsec_eroute.8.html">ipsec_eroute</A>(8), <A HREF="ipsec_spi.8.html">ipsec_spi</A>(8),
+<A HREF="ipsec_spigrp.8.html">ipsec_spigrp</A>(8), <A HREF="ipsec_klipsdebug.8.html">ipsec_klipsdebug</A>(8), <A HREF="ipsec_tncfg.5.html">ipsec_tncfg</A>(5)
+<A NAME="lbAH">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Richard Guy Briggs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">EXAMPLES</A><DD>
+<DT><A HREF="#lbAF">FILES</A><DD>
+<DT><A HREF="#lbAG">SEE ALSO</A><DD>
+<DT><A HREF="#lbAH">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_trap_count.5.html b/doc/manpage.d/ipsec_trap_count.5.html
new file mode 100644
index 000000000..8da655f77
--- /dev/null
+++ b/doc/manpage.d/ipsec_trap_count.5.html
@@ -0,0 +1,74 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TRAP_COUNT</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TRAP_COUNT</H1>
+Section: File Formats (5)<BR>Updated: 19 Jun 2003<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+trap_count - KLIPS statistic on number of ACQUIREs
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>cat</B>
+
+<B>/proc/net/ipsec/stats/trap_count</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>/proc/net/ipsec/stats/trap_count</I>
+
+is a read-only file. It contains a hexadecimal number which records the
+number of attempts to send PF_ACQUIRE messages. Only those recorded by
+trap_sendcount were actually successfully passed to userland. Note that the
+userland may still have lost them on its own.
+<P>
+
+<A NAME="lbAE">&nbsp;</A>
+<H2>FILES</H2>
+
+/proc/net/ipsec/stats/trap_sendcount
+<A NAME="lbAF">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_pf_key.5.html">ipsec_pf_key</A>(5), <A HREF="trap_sendcount.5.html">trap_sendcount</A>(5), <A HREF="pluto.8.html">pluto</A>(8)
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Michael C. Richardson &lt;<A HREF="mailto:mcr@freeswan.org">mcr@freeswan.org</A>&gt;
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">FILES</A><DD>
+<DT><A HREF="#lbAF">SEE ALSO</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_trap_sendcount.5.html b/doc/manpage.d/ipsec_trap_sendcount.5.html
new file mode 100644
index 000000000..94f56b3a7
--- /dev/null
+++ b/doc/manpage.d/ipsec_trap_sendcount.5.html
@@ -0,0 +1,72 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TRAP_SENDCOUNT</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TRAP_SENDCOUNT</H1>
+Section: File Formats (5)<BR>Updated: 19 Jun 2003<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+trap_sendcount - KLIPS statistic on number of successful ACQUIREs
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>cat</B>
+
+<B>/proc/net/ipsec/stats/trap_sendcount</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>/proc/net/ipsec/stats/trap_sendcount</I>
+
+is a read-only file. It contains a hexadecimal number which records the
+number of successful PF_ACQUIRE messages that were sent.
+<P>
+
+<A NAME="lbAE">&nbsp;</A>
+<H2>FILES</H2>
+
+/proc/net/ipsec/stats/trap_sendcount
+<A NAME="lbAF">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_pf_key.5.html">ipsec_pf_key</A>(5), <A HREF="trap_count.5.html">trap_count</A>(5), <A HREF="pluto.8.html">pluto</A>(8)
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Michael C. Richardson &lt;<A HREF="mailto:mcr@freeswan.org">mcr@freeswan.org</A>&gt;
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">FILES</A><DD>
+<DT><A HREF="#lbAF">SEE ALSO</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_ttoaddr.3.html b/doc/manpage.d/ipsec_ttoaddr.3.html
new file mode 100644
index 000000000..199937a35
--- /dev/null
+++ b/doc/manpage.d/ipsec_ttoaddr.3.html
@@ -0,0 +1,569 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TTOADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TTOADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 28 Sept 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ttoaddr, tnatoaddr, addrtot - convert Internet addresses to and from text
+<BR>
+
+ipsec ttosubnet, subnettot - convert subnet/mask text form to and from addresses
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *ttoaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_address *addr);</B>
+
+<BR>
+
+<B>const char *tnatoaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_address *addr);</B>
+
+<BR>
+
+<B>size_t addrtot(const ip_address *addr, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<P>
+<B>const char *ttosubnet(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_subnet *dst);</B>
+
+<BR>
+
+<B>size_t subnettot(const ip_subnet *sub, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Ttoaddr</I>
+
+converts a text-string name or numeric address into a binary address
+(in network byte order).
+<I>Tnatoaddr</I>
+
+does the same conversion,
+but the only text forms it accepts are
+the ``official'' forms of
+numeric address (dotted-decimal for IPv4, colon-hex for IPv6).
+<I>Addrtot</I>
+
+does the reverse conversion, from binary address back to a text form.
+<I>Ttosubnet</I>
+
+and
+<I>subnettot</I>
+
+do likewise for the ``address/mask'' form used to write a
+specification of a subnet.
+<P>
+
+An IPv4 address is specified in text as a
+dotted-decimal address (e.g.
+<B>1.2.3.4</B>),
+
+an eight-digit network-order hexadecimal number with the usual C prefix (e.g.
+<B>0x01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>),
+
+an eight-digit host-order hexadecimal number with a
+<B>0h</B>
+
+prefix (e.g.
+<B>0h01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>
+
+on a big-endian host and
+<B>4.3.2.1</B>
+
+on a little-endian host),
+a DNS name to be looked up via
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3),
+
+or an old-style network name to be looked up via
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3).
+
+<P>
+
+A dotted-decimal address may be incomplete, in which case
+text-to-binary conversion implicitly appends
+as many instances of
+<B>.0</B>
+
+as necessary to bring it up to four components.
+The components of a dotted-decimal address are always taken as
+decimal, and leading zeros are ignored.
+For example,
+<B>10</B>
+
+is synonymous with
+<B>10.0.0.0</B>,
+
+and
+<B>128.009.000.032</B>
+
+is synonymous with
+<B>128.9.0.32</B>
+
+(the latter example is verbatim from RFC 1166).
+The result of applying
+<I>addrtot</I>
+
+to an IPv4 address is always complete and does not contain leading zeros.
+<P>
+
+Use of hexadecimal addresses is
+<B>strongly</B>
+
+<B>discouraged</B>;
+
+they are included only to save hassles when dealing with
+the handful of perverted programs which already print
+network addresses in hexadecimal.
+<P>
+
+An IPv6 address is specified in text with
+colon-hex notation (e.g.
+<B>0:56:78ab:22:33:44:55:66</B>),
+
+colon-hex with
+<B>::</B>
+
+abbreviating at most one subsequence of multiple zeros (e.g.
+<B>99:ab::54:068</B>,
+
+which is synonymous with
+<B>99:ab:0:0:0:0:54:68</B>),
+
+or a DNS name to be looked up via
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3).
+
+The result of applying
+<I>addrtot</I>
+
+to an IPv6 address will use
+<B>::</B>
+
+abbreviation if possible,
+and will not contain leading zeros.
+<P>
+
+The letters in hexadecimal
+may be uppercase or lowercase or any mixture thereof.
+<P>
+
+DNS names may be complete (optionally terminated with a ``.'')
+or incomplete, and are looked up as specified by local system configuration
+(see
+<I><A HREF="resolver.5.html">resolver</A></I>(5)).
+
+The
+<I>h_addr</I>
+
+value returned by
+<I><A HREF="gethostbyname2.3.html">gethostbyname2</A></I>(3)
+
+is used,
+so with current DNS implementations,
+the result when the name corresponds to more than one address is
+difficult to predict.
+IPv4 name lookup resorts to
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3)
+
+only if
+<I><A HREF="gethostbyname2.3.html">gethostbyname2</A></I>(3)
+
+fails.
+<P>
+
+A subnet specification is of the form <I>network</I><B>/</B><I>mask</I>.
+The
+<I>network</I>
+
+and
+<I>mask</I>
+
+can be any form acceptable to
+<I>ttoaddr</I>.
+
+In addition, and preferably, the
+<I>mask</I>
+
+can be a decimal integer (leading zeros ignored) giving a bit count,
+in which case
+it stands for a mask with that number of high bits on and all others off
+(e.g.,
+<B>24</B>
+
+in IPv4 means
+<B>255.255.255.0</B>).
+
+In any case, the mask must be contiguous
+(a sequence of high bits on and all remaining low bits off).
+As a special case, the subnet specification
+<B>%default</B>
+
+is a synonym for
+<B>0.0.0.0/0</B>
+
+or
+<B>::/0</B>
+
+in IPv4 or IPv6 respectively.
+<P>
+
+<I>Ttosubnet</I>
+
+ANDs the mask with the address before returning,
+so that any non-network bits in the address are turned off
+(e.g.,
+<B>10.1.2.3/24</B>
+
+is synonymous with
+<B>10.1.2.0/24</B>).
+
+<I>Subnettot</I>
+
+always generates the decimal-integer-bit-count
+form of the mask,
+with no leading zeros.
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>ttoaddr</I>
+
+and
+<I>ttosubnet</I>
+
+specifies the length of the text string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>af</I>
+
+parameter of
+<I>ttoaddr</I>
+
+and
+<I>ttosubnet</I>
+
+specifies the address family of interest.
+It should be either
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>addrtot</I>
+
+and
+<I>subnettot</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines constants,
+<B>ADDRTOT_BUF</B>
+
+and
+<B>SUBNETTOT_BUF</B>,
+
+which are the sizes of buffers just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>addrtot</I>
+
+and
+<I>subnettot</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default,
+and is in fact the only format currently available in
+<I>subnettot</I>.
+
+<I>Addrtot</I>
+
+also accepts format values
+<B>'r'</B>
+
+(signifying a text form suitable for DNS reverse lookups,
+e.g.
+<B>4.3.2.1.IN-ADDR.ARPA.</B>
+
+for IPv4 and
+RFC 2874 format for IPv6),
+and
+<B>'R'</B>
+
+(signifying an alternate reverse-lookup form,
+an error for IPv4 and RFC 1886 format for IPv6).
+Reverse-lookup names always end with a ``.''.
+<P>
+
+The text-to-binary functions return NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+The binary-to-text functions return
+<B>0</B>
+
+for a failure, and otherwise
+always return the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>ttoaddr</I>
+
+are:
+empty input;
+unknown address family;
+attempt to allocate temporary storage for a very long name failed;
+name lookup failed;
+syntax error in dotted-decimal or colon-hex form;
+dotted-decimal or colon-hex component too large.
+<P>
+
+Fatal errors in
+<I>ttosubnet</I>
+
+are:
+no
+<B>/</B>
+
+in
+<I>src</I>;
+
+<I>ttoaddr</I>
+
+error in conversion of
+<I>network</I>
+
+or
+<I>mask</I>;
+
+bit-count mask too big;
+mask non-contiguous.
+<P>
+
+Fatal errors in
+<I>addrtot</I>
+
+and
+<I>subnettot</I>
+
+are:
+unknown format.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The interpretation of incomplete dotted-decimal addresses
+(e.g.
+<B>10/24</B>
+
+means
+<B>10.0.0.0/24</B>)
+
+differs from that of some older conversion
+functions, e.g. those of
+<I><A HREF="inet.3.html">inet</A></I>(3).
+
+The behavior of the older functions has never been
+particularly consistent or particularly useful.
+<P>
+
+Ignoring leading zeros in dotted-decimal components and bit counts
+is arguably the most useful behavior in this application,
+but it might occasionally cause confusion with the historical use of leading
+zeros to denote octal numbers.
+<P>
+
+<I>Ttoaddr</I>
+
+does not support the mixed colon-hex-dotted-decimal
+convention used to embed an IPv4 address in an IPv6 address.
+<P>
+
+<I>Addrtot</I>
+
+always uses the
+<B>::</B>
+
+abbreviation (which can appear only once in an address) for the
+<I>first</I>
+
+sequence of multiple zeros in an IPv6 address.
+One can construct addresses (unlikely ones) in which this is suboptimal.
+<P>
+
+<I>Addrtot</I>
+
+<B>'r'</B>
+
+conversion of an IPv6 address uses lowercase hexadecimal,
+not the uppercase used in RFC 2874's examples.
+It takes careful reading of RFCs 2874, 2673, and 2234 to realize
+that lowercase is technically legitimate here,
+and there may be software which botches this
+and hence would have trouble with lowercase hex.
+<P>
+
+Possibly
+<I>subnettot</I>
+
+ought to recognize the
+<B>%default</B>
+
+case and generate that string as its output.
+Currently it doesn't.
+<P>
+
+It is barely possible that somebody, somewhere,
+might have a legitimate use for non-contiguous subnet masks.
+<P>
+
+<I><A HREF="Getnetbyname.3.html">Getnetbyname</A></I>(3)
+
+is a historical dreg.
+<P>
+
+<I>Tnatoaddr</I>
+
+probably should enforce completeness of dotted-decimal addresses.
+<P>
+
+The restriction of text-to-binary error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The text-to-binary error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = ttoaddr( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_ttodata.3.html b/doc/manpage.d/ipsec_ttodata.3.html
new file mode 100644
index 000000000..960392fe0
--- /dev/null
+++ b/doc/manpage.d/ipsec_ttodata.3.html
@@ -0,0 +1,439 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TTODATA</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TTODATA</H1>
+Section: C Library Functions (3)<BR>Updated: 16 August 2003<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ttodata, datatot - convert binary data bytes from and to text formats
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *ttodata(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int base, char *dst, size_t dstlen, size_t *lenp);</B>
+
+<BR>
+
+<B>const char *ttodatav(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int base, char *dst, size_t dstlen, size_t *lenp,</B>
+
+<BR>
+&nbsp;
+<B>char *errp, size_t errlen, int flags);</B>
+
+<BR>
+
+<B>size_t datatot(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int format, char *dst, size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Ttodata</I>,
+
+<I>ttodatav</I>,
+
+and
+<I>datatot</I>
+
+convert arbitrary binary data (e.g. encryption or authentication keys)
+from and to more-or-less human-readable text formats.
+<P>
+
+Currently supported formats are hexadecimal, base64, and characters.
+<P>
+
+A hexadecimal text value begins with a
+<B>0x</B>
+
+(or
+<B>0X</B>)
+
+prefix and continues with two-digit groups
+of hexadecimal digits (0-9, and a-f or A-F),
+each group encoding the value of one binary byte, high-order digit first.
+A single
+<B>_</B>
+
+(underscore)
+between consecutive groups is ignored, permitting punctuation to improve
+readability; doing this every eight digits seems about right.
+<P>
+
+A base64 text value begins with a
+<B>0s</B>
+
+(or
+<B>0S</B>)
+
+prefix
+and continues with four-digit groups of base64 digits (A-Z, a-z, 0-9, +, and /),
+each group encoding the value of three binary bytes as described in
+section 6.8 of RFC 2045.
+If
+<B>flags</B>
+
+has the
+<B>TTODATAV_IGNORESPACE</B>
+
+bit on, blanks are ignore (after the prefix).
+Note that the last one or two digits of a base64 group can be
+<B>=</B>
+
+to indicate that fewer than three binary bytes are encoded.
+<P>
+
+A character text value begins with a
+<B>0t</B>
+
+(or
+<B>0T</B>)
+
+prefix
+and continues with text characters, each being the value of one binary byte.
+<P>
+
+All these functions basically copy data from
+<I>src</I>
+
+(whose size is specified by
+<I>srclen</I>)
+
+to
+<I>dst</I>
+
+(whose size is specified by
+<I>dstlen</I>),
+
+doing the conversion en route.
+If the result will not fit in
+<I>dst</I>,
+
+it is truncated;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes of result written to
+<I>dst</I>.
+
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result bytes are written at all.
+<P>
+
+The
+<I>base</I>
+
+parameter of
+<I>ttodata</I>
+
+and
+<I>ttodatav</I>
+
+specifies what format the input is in;
+normally it should be
+<B>0</B>
+
+to signify that this gets figured out from the prefix.
+Values of
+<B>16</B>,
+
+<B>64</B>,
+
+and
+<B>256</B>
+
+respectively signify hexadecimal, base64, and character-text formats
+without prefixes.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>datatot</I>,
+
+a single character used as a type code,
+specifies which text format is wanted.
+The value
+<B>0</B>
+
+(not ASCII
+<B>'0'</B>,
+
+but a zero value) specifies a reasonable default.
+Other currently-supported values are:
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT><B>'x'</B>
+
+<DD>
+continuous lower-case hexadecimal with a
+<B>0x</B>
+
+prefix
+<DT><B>'h'</B>
+
+<DD>
+lower-case hexadecimal with a
+<B>0x</B>
+
+prefix and a
+<B>_</B>
+
+every eight digits
+<DT><B>':'</B>
+
+<DD>
+lower-case hexadecimal with no prefix and a
+<B>:</B>
+
+(colon) every two digits
+<DT><B>16</B>
+
+<DD>
+lower-case hexadecimal with no prefix or
+<B>_</B>
+
+<DT><B>'s'</B>
+
+<DD>
+continuous base64 with a
+<B>0s</B>
+
+prefix
+<DT><B>64</B>
+
+<DD>
+continuous base64 with no prefix
+</DL>
+</DL>
+
+<P>
+
+The default format is currently
+<B>'h'</B>.
+
+<P>
+
+<I>Ttodata</I>
+
+returns NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+On success,
+if and only if
+<I>lenp</I>
+
+is non-NULL,
+<B>*lenp</B>
+
+is set to the number of bytes required to contain the full untruncated result.
+It is the caller's responsibility to check this against
+<I>dstlen</I>
+
+to determine whether he has obtained a complete result.
+The
+<B>*lenp</B>
+
+value is correct even if
+<I>dstlen</I>
+
+is zero, which offers a way to determine how much space would be needed
+before having to allocate any.
+<P>
+
+<I>Ttodatav</I>
+
+is just like
+<I>ttodata</I>
+
+except that in certain cases,
+if
+<I>errp</I>
+
+is non-NULL,
+the buffer pointed to by
+<I>errp</I>
+
+(whose length is given by
+<I>errlen</I>)
+
+is used to hold a more detailed error message.
+The return value is NULL for success,
+and is either
+<I>errp</I>
+
+or a pointer to a string literal for failure.
+If the size of the error-message buffer is
+inadequate for the desired message,
+<I>ttodatav</I>
+
+will fall back on returning a pointer to a literal string instead.
+The
+<I>freeswan.h</I>
+
+header file defines a constant
+<B>TTODATAV_BUF</B>
+
+which is the size of a buffer large enough for worst-case results.
+<P>
+
+The normal return value of
+<I>datatot</I>
+
+is the number of bytes required
+to contain the full untruncated result.
+It is the caller's responsibility to check this against
+<I>dstlen</I>
+
+to determine whether he has obtained a complete result.
+The return value is correct even if
+<I>dstlen</I>
+
+is zero, which offers a way to determine how much space would be needed
+before having to allocate any.
+A return value of
+<B>0</B>
+
+signals a fatal error of some kind
+(see DIAGNOSTICS).
+<P>
+
+A zero value for
+<I>srclen</I>
+
+in
+<I>ttodata</I>
+
+(but not
+<I>datatot</I>!)
+
+is synonymous with
+<B>strlen(src)</B>.
+
+A non-zero
+<I>srclen</I>
+
+in
+<I>ttodata</I>
+
+must not include the terminating NUL.
+<P>
+
+Unless
+<I>dstlen</I>
+
+is zero,
+the result supplied by
+<I>datatot</I>
+
+is always NUL-terminated,
+and its needed-size return value includes space for the terminating NUL.
+<P>
+
+Several obsolete variants of these functions
+(<I>atodata</I>,
+
+<I>datatoa</I>,
+
+<I>atobytes</I>,
+
+and
+<I>bytestoa</I>)
+
+are temporarily also supported.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="sprintf.3.html">sprintf</A>(3), <A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>ttodata</I>
+
+and
+<I>ttodatav</I>
+
+are:
+unknown characters in the input;
+unknown or missing prefix;
+unknown base;
+incomplete digit group;
+non-zero padding in a base64 less-than-three-bytes digit group;
+zero-length input.
+<P>
+
+Fatal errors in
+<I>datatot</I>
+
+are:
+unknown format code;
+zero-length input.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+<I>Datatot</I>
+
+should have a format code to produce character-text output.
+<P>
+
+The
+<B>0s</B>
+
+and
+<B>0t</B>
+
+prefixes are the author's inventions and are not a standard
+of any kind.
+They have been chosen to avoid collisions with existing practice
+(some C implementations use
+<B>0b</B>
+
+for binary)
+and possible confusion with unprefixed hexadecimal.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_ttosa.3.html b/doc/manpage.d/ipsec_ttosa.3.html
new file mode 100644
index 000000000..1e457fc24
--- /dev/null
+++ b/doc/manpage.d/ipsec_ttosa.3.html
@@ -0,0 +1,453 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TTOSA</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TTOSA</H1>
+Section: C Library Functions (3)<BR>Updated: 26 Nov 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ttosa, satot - convert IPsec Security Association IDs to and from text
+<BR>
+
+ipsec initsaid - initialize an SA ID
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>typedef struct {</B>
+
+<BR>
+&nbsp;
+<B>ip_address dst;</B>
+
+<BR>
+&nbsp;
+<B>ipsec_spi_t spi;</B>
+
+<BR>
+&nbsp;
+<B>int proto;</B>
+
+<BR>
+
+<B>} ip_said;</B>
+
+<P>
+<B>const char *ttosa(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>ip_said *sa);</B>
+
+<BR>
+
+<B>size_t satot(const ip_said *sa, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<BR>
+
+<B>void initsaid(const ip_address *addr, ipsec_spi_t spi,</B>
+
+<BR>
+&nbsp;
+<B>int proto, ip_said *dst);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Ttosa</I>
+
+converts an ASCII Security Association (SA) specifier into an
+<B>ip_said</B>
+
+structure (containing
+a destination-host address
+in network byte order,
+an SPI number in network byte order, and
+a protocol code).
+<I>Satot</I>
+
+does the reverse conversion, back to a text SA specifier.
+<I>Initsaid</I>
+
+initializes an
+<B>ip_said</B>
+
+from separate items of information.
+<P>
+
+An SA is specified in text with a mail-like syntax, e.g.
+<B><A HREF="mailto:esp.5a7@1.2.3.4">esp.5a7@1.2.3.4</A></B>.
+
+An SA specifier contains
+a protocol prefix (currently
+<B>ah</B>,
+
+<B>esp</B>,
+
+<B>tun</B>,
+
+<B>comp</B>,
+
+or
+<B>int</B>),
+
+a single character indicating the address family
+(<B>.</B>
+
+for IPv4,
+<B>:</B>
+
+for IPv6),
+an unsigned integer SPI number in hexadecimal (with no
+<B>0x</B>
+
+prefix),
+and an IP address.
+The IP address can be any form accepted by
+<I><A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A></I>(3),
+
+e.g. dotted-decimal IPv4 address,
+colon-hex IPv6 address,
+or DNS name.
+<P>
+
+As a special case, the SA specifier
+<B>%passthrough4</B>
+
+or
+<B>%passthrough6</B>
+
+signifies the special SA used to indicate that packets should be
+passed through unaltered.
+(At present, these are synonyms for
+<B><A HREF="mailto:tun.0@0.0.0.0">tun.0@0.0.0.0</A></B>
+
+and
+<B>tun:0@::</B>
+
+respectively,
+but that is subject to change without notice.)
+<B>%passthrough</B>
+
+is a historical synonym for
+<B>%passthrough4</B>.
+
+These forms are known to both
+<I>ttosa</I>
+
+and
+<I>satot</I>,
+
+so the internal representation is never visible.
+<P>
+
+Similarly, the SA specifiers
+<B>%pass</B>,
+
+<B>%drop</B>,
+
+<B>%reject</B>,
+
+<B>%hold</B>,
+
+<B>%trap</B>,
+
+and
+<B>%trapsubnet</B>
+
+signify special ``magic'' SAs used to indicate that packets should be
+passed, dropped, rejected (dropped with ICMP notification),
+held,
+and trapped (sent up to
+<I><A HREF="ipsec_pluto.8.html">ipsec_pluto</A></I>(8),
+
+with either of two forms of
+<B>%hold</B>
+
+automatically installed)
+respectively.
+These forms too are known to both routines,
+so the internal representation of the magic SAs should never be visible.
+<P>
+
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file supplies the
+<B>ip_said</B>
+
+structure, as well as a data type
+<B>ipsec_spi_t</B>
+
+which is an unsigned 32-bit integer.
+(There is no consistency between kernel and user on what such a type
+is called, hence the header hides the differences.)
+<P>
+
+The protocol code uses the same numbers that IP does.
+For user convenience, given the difficulty in acquiring the exact set of
+protocol names used by the kernel,
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+defines the names
+<B>SA_ESP</B>,
+
+<B>SA_AH</B>,
+
+<B>SA_IPIP</B>,
+
+and
+<B>SA_COMP</B>
+
+to have the same values as the kernel names
+<B>IPPROTO_ESP</B>,
+
+<B>IPPROTO_AH</B>,
+
+<B>IPPROTO_IPIP</B>,
+
+and
+<B>IPPROTO_COMP</B>.
+
+<P>
+
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+also defines
+<B>SA_INT</B>
+
+to have the value
+<B>61</B>
+
+(reserved by IANA for ``any host internal protocol'')
+and
+<B>SPI_PASS</B>,
+
+<B>SPI_DROP</B>,
+
+<B>SPI_REJECT</B>,
+
+<B>SPI_HOLD</B>,
+
+and
+<B>SPI_TRAP</B>
+
+to have the values 256-260 (in <I>host</I> byte order) respectively.
+These are used in constructing the magic SAs
+(which always have address
+<B>0.0.0.0</B>).
+
+<P>
+
+If
+<I>satot</I>
+
+encounters an unknown protocol code, e.g. 77,
+it yields output using a prefix
+showing the code numerically, e.g. ``unk77''.
+This form is
+<I>not</I>
+
+recognized by
+<I>ttosa</I>.
+
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>ttosa</I>
+
+specifies the length of the string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>satot</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+header file defines a constant,
+<B>SATOT_BUF</B>,
+
+which is the size of a buffer just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>satot</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the ASCII character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default
+(currently
+lowercase protocol prefix, lowercase hexadecimal SPI,
+dotted-decimal or colon-hex address).
+The value
+<B>'f'</B>
+
+is similar except that the SPI is padded with
+<B>0</B>s
+
+to a fixed 32-bit width, to ease aligning displayed tables.
+<P>
+
+<I>Ttosa</I>
+
+returns
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<I>Satot</I>
+
+returns
+<B>0</B>
+
+for a failure, and otherwise
+always returns the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<P>
+
+There is also, temporarily, support for some obsolete
+forms of SA specifier which lack the address-family indicator.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec_ttoul.3.html">ipsec_ttoul</A>(3), <A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A>(3), <A HREF="ipsec_samesaid.3.html">ipsec_samesaid</A>(3), <A HREF="inet.3.html">inet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>ttosa</I>
+
+are:
+empty input;
+input too small to be a legal SA specifier;
+no
+<B>@</B>
+
+in input;
+unknown protocol prefix;
+conversion error in
+<I>ttoul</I>
+
+or
+<I>ttoaddr</I>.
+
+<P>
+
+Fatal errors in
+<I>satot</I>
+
+are:
+unknown format.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The restriction of text-to-binary error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The text-to-binary error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = ttosa( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_ttosubnet.3.html b/doc/manpage.d/ipsec_ttosubnet.3.html
new file mode 100644
index 000000000..199937a35
--- /dev/null
+++ b/doc/manpage.d/ipsec_ttosubnet.3.html
@@ -0,0 +1,569 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TTOADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TTOADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 28 Sept 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ttoaddr, tnatoaddr, addrtot - convert Internet addresses to and from text
+<BR>
+
+ipsec ttosubnet, subnettot - convert subnet/mask text form to and from addresses
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *ttoaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_address *addr);</B>
+
+<BR>
+
+<B>const char *tnatoaddr(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_address *addr);</B>
+
+<BR>
+
+<B>size_t addrtot(const ip_address *addr, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<P>
+<B>const char *ttosubnet(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int af, ip_subnet *dst);</B>
+
+<BR>
+
+<B>size_t subnettot(const ip_subnet *sub, int format,</B>
+
+<BR>
+&nbsp;
+<B>char *dst, size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Ttoaddr</I>
+
+converts a text-string name or numeric address into a binary address
+(in network byte order).
+<I>Tnatoaddr</I>
+
+does the same conversion,
+but the only text forms it accepts are
+the ``official'' forms of
+numeric address (dotted-decimal for IPv4, colon-hex for IPv6).
+<I>Addrtot</I>
+
+does the reverse conversion, from binary address back to a text form.
+<I>Ttosubnet</I>
+
+and
+<I>subnettot</I>
+
+do likewise for the ``address/mask'' form used to write a
+specification of a subnet.
+<P>
+
+An IPv4 address is specified in text as a
+dotted-decimal address (e.g.
+<B>1.2.3.4</B>),
+
+an eight-digit network-order hexadecimal number with the usual C prefix (e.g.
+<B>0x01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>),
+
+an eight-digit host-order hexadecimal number with a
+<B>0h</B>
+
+prefix (e.g.
+<B>0h01020304</B>,
+
+which is synonymous with
+<B>1.2.3.4</B>
+
+on a big-endian host and
+<B>4.3.2.1</B>
+
+on a little-endian host),
+a DNS name to be looked up via
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3),
+
+or an old-style network name to be looked up via
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3).
+
+<P>
+
+A dotted-decimal address may be incomplete, in which case
+text-to-binary conversion implicitly appends
+as many instances of
+<B>.0</B>
+
+as necessary to bring it up to four components.
+The components of a dotted-decimal address are always taken as
+decimal, and leading zeros are ignored.
+For example,
+<B>10</B>
+
+is synonymous with
+<B>10.0.0.0</B>,
+
+and
+<B>128.009.000.032</B>
+
+is synonymous with
+<B>128.9.0.32</B>
+
+(the latter example is verbatim from RFC 1166).
+The result of applying
+<I>addrtot</I>
+
+to an IPv4 address is always complete and does not contain leading zeros.
+<P>
+
+Use of hexadecimal addresses is
+<B>strongly</B>
+
+<B>discouraged</B>;
+
+they are included only to save hassles when dealing with
+the handful of perverted programs which already print
+network addresses in hexadecimal.
+<P>
+
+An IPv6 address is specified in text with
+colon-hex notation (e.g.
+<B>0:56:78ab:22:33:44:55:66</B>),
+
+colon-hex with
+<B>::</B>
+
+abbreviating at most one subsequence of multiple zeros (e.g.
+<B>99:ab::54:068</B>,
+
+which is synonymous with
+<B>99:ab:0:0:0:0:54:68</B>),
+
+or a DNS name to be looked up via
+<I><A HREF="gethostbyname.3.html">gethostbyname</A></I>(3).
+
+The result of applying
+<I>addrtot</I>
+
+to an IPv6 address will use
+<B>::</B>
+
+abbreviation if possible,
+and will not contain leading zeros.
+<P>
+
+The letters in hexadecimal
+may be uppercase or lowercase or any mixture thereof.
+<P>
+
+DNS names may be complete (optionally terminated with a ``.'')
+or incomplete, and are looked up as specified by local system configuration
+(see
+<I><A HREF="resolver.5.html">resolver</A></I>(5)).
+
+The
+<I>h_addr</I>
+
+value returned by
+<I><A HREF="gethostbyname2.3.html">gethostbyname2</A></I>(3)
+
+is used,
+so with current DNS implementations,
+the result when the name corresponds to more than one address is
+difficult to predict.
+IPv4 name lookup resorts to
+<I><A HREF="getnetbyname.3.html">getnetbyname</A></I>(3)
+
+only if
+<I><A HREF="gethostbyname2.3.html">gethostbyname2</A></I>(3)
+
+fails.
+<P>
+
+A subnet specification is of the form <I>network</I><B>/</B><I>mask</I>.
+The
+<I>network</I>
+
+and
+<I>mask</I>
+
+can be any form acceptable to
+<I>ttoaddr</I>.
+
+In addition, and preferably, the
+<I>mask</I>
+
+can be a decimal integer (leading zeros ignored) giving a bit count,
+in which case
+it stands for a mask with that number of high bits on and all others off
+(e.g.,
+<B>24</B>
+
+in IPv4 means
+<B>255.255.255.0</B>).
+
+In any case, the mask must be contiguous
+(a sequence of high bits on and all remaining low bits off).
+As a special case, the subnet specification
+<B>%default</B>
+
+is a synonym for
+<B>0.0.0.0/0</B>
+
+or
+<B>::/0</B>
+
+in IPv4 or IPv6 respectively.
+<P>
+
+<I>Ttosubnet</I>
+
+ANDs the mask with the address before returning,
+so that any non-network bits in the address are turned off
+(e.g.,
+<B>10.1.2.3/24</B>
+
+is synonymous with
+<B>10.1.2.0/24</B>).
+
+<I>Subnettot</I>
+
+always generates the decimal-integer-bit-count
+form of the mask,
+with no leading zeros.
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>ttoaddr</I>
+
+and
+<I>ttosubnet</I>
+
+specifies the length of the text string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>af</I>
+
+parameter of
+<I>ttoaddr</I>
+
+and
+<I>ttosubnet</I>
+
+specifies the address family of interest.
+It should be either
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>.
+
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>addrtot</I>
+
+and
+<I>subnettot</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines constants,
+<B>ADDRTOT_BUF</B>
+
+and
+<B>SUBNETTOT_BUF</B>,
+
+which are the sizes of buffers just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>addrtot</I>
+
+and
+<I>subnettot</I>
+
+specifies what format is to be used for the conversion.
+The value
+<B>0</B>
+
+(not the character
+<B>'0'</B>,
+
+but a zero value)
+specifies a reasonable default,
+and is in fact the only format currently available in
+<I>subnettot</I>.
+
+<I>Addrtot</I>
+
+also accepts format values
+<B>'r'</B>
+
+(signifying a text form suitable for DNS reverse lookups,
+e.g.
+<B>4.3.2.1.IN-ADDR.ARPA.</B>
+
+for IPv4 and
+RFC 2874 format for IPv6),
+and
+<B>'R'</B>
+
+(signifying an alternate reverse-lookup form,
+an error for IPv4 and RFC 1886 format for IPv6).
+Reverse-lookup names always end with a ``.''.
+<P>
+
+The text-to-binary functions return NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+The binary-to-text functions return
+<B>0</B>
+
+for a failure, and otherwise
+always return the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>ttoaddr</I>
+
+are:
+empty input;
+unknown address family;
+attempt to allocate temporary storage for a very long name failed;
+name lookup failed;
+syntax error in dotted-decimal or colon-hex form;
+dotted-decimal or colon-hex component too large.
+<P>
+
+Fatal errors in
+<I>ttosubnet</I>
+
+are:
+no
+<B>/</B>
+
+in
+<I>src</I>;
+
+<I>ttoaddr</I>
+
+error in conversion of
+<I>network</I>
+
+or
+<I>mask</I>;
+
+bit-count mask too big;
+mask non-contiguous.
+<P>
+
+Fatal errors in
+<I>addrtot</I>
+
+and
+<I>subnettot</I>
+
+are:
+unknown format.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+The interpretation of incomplete dotted-decimal addresses
+(e.g.
+<B>10/24</B>
+
+means
+<B>10.0.0.0/24</B>)
+
+differs from that of some older conversion
+functions, e.g. those of
+<I><A HREF="inet.3.html">inet</A></I>(3).
+
+The behavior of the older functions has never been
+particularly consistent or particularly useful.
+<P>
+
+Ignoring leading zeros in dotted-decimal components and bit counts
+is arguably the most useful behavior in this application,
+but it might occasionally cause confusion with the historical use of leading
+zeros to denote octal numbers.
+<P>
+
+<I>Ttoaddr</I>
+
+does not support the mixed colon-hex-dotted-decimal
+convention used to embed an IPv4 address in an IPv6 address.
+<P>
+
+<I>Addrtot</I>
+
+always uses the
+<B>::</B>
+
+abbreviation (which can appear only once in an address) for the
+<I>first</I>
+
+sequence of multiple zeros in an IPv6 address.
+One can construct addresses (unlikely ones) in which this is suboptimal.
+<P>
+
+<I>Addrtot</I>
+
+<B>'r'</B>
+
+conversion of an IPv6 address uses lowercase hexadecimal,
+not the uppercase used in RFC 2874's examples.
+It takes careful reading of RFCs 2874, 2673, and 2234 to realize
+that lowercase is technically legitimate here,
+and there may be software which botches this
+and hence would have trouble with lowercase hex.
+<P>
+
+Possibly
+<I>subnettot</I>
+
+ought to recognize the
+<B>%default</B>
+
+case and generate that string as its output.
+Currently it doesn't.
+<P>
+
+It is barely possible that somebody, somewhere,
+might have a legitimate use for non-contiguous subnet masks.
+<P>
+
+<I><A HREF="Getnetbyname.3.html">Getnetbyname</A></I>(3)
+
+is a historical dreg.
+<P>
+
+<I>Tnatoaddr</I>
+
+probably should enforce completeness of dotted-decimal addresses.
+<P>
+
+The restriction of text-to-binary error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The text-to-binary error-reporting convention lends itself
+to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = ttoaddr( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_ttoul.3.html b/doc/manpage.d/ipsec_ttoul.3.html
new file mode 100644
index 000000000..b722dcc13
--- /dev/null
+++ b/doc/manpage.d/ipsec_ttoul.3.html
@@ -0,0 +1,310 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TTOUL</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TTOUL</H1>
+Section: C Library Functions (3)<BR>Updated: 16 Aug 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ttoul, ultot - convert unsigned-long numbers to and from text
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *ttoul(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int base, unsigned long *n);</B>
+
+<BR>
+
+<B>size_t ultot(unsigned long n, int format, char *dst,</B>
+
+<BR>
+&nbsp;
+<B>size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Ttoul</I>
+
+converts a text-string number into a binary
+<B>unsigned long</B>
+
+value.
+<I>Ultot</I>
+
+does the reverse conversion, back to a text version.
+<P>
+
+Numbers are specified in text as
+decimal (e.g.
+<B>123</B>),
+
+octal with a leading zero (e.g.
+<B>012</B>,
+
+which has value 10),
+or hexadecimal with a leading
+<B>0x</B>
+
+(e.g.
+<B>0x1f</B>,
+
+which has value 31)
+in either upper or lower case.
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>ttoul</I>
+
+specifies the length of the string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>base</I>
+
+parameter of
+<I>ttoul</I>
+
+can be
+<B>8</B>,
+
+<B>10</B>,
+
+or
+<B>16</B>,
+
+in which case the number supplied is assumed to be of that form
+(and in the case of
+<B>16</B>,
+
+to lack any
+<B>0x</B>
+
+prefix).
+It can also be
+<B>0</B>,
+
+in which case the number is examined for a leading zero
+or a leading
+<B>0x</B>
+
+to determine its base.
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>ultot</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines a constant,
+<B>ULTOT_BUF</B>,
+
+which is the size of a buffer just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>ultot</I>
+
+must be one of:
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT><B>'o'</B><DD>
+octal conversion with leading
+<B>0</B>
+
+<DT><B>&nbsp;8</B><DD>
+octal conversion with no leading
+<B>0</B>
+
+<DT><B>'d'</B><DD>
+decimal conversion
+<DT><B>10</B><DD>
+same as
+<B>d</B>
+
+<DT><B>'x'</B><DD>
+hexadecimal conversion, including leading
+<B>0x</B>
+
+<DT><B>16</B><DD>
+hexadecimal conversion with no leading
+<B>0x</B>
+
+<DT><B>17</B><DD>
+like
+<B>16</B>
+
+except padded on left with
+<B>0</B>s
+
+to eight digits (full width of a 32-bit number)
+</DL>
+</DL>
+
+<P>
+
+<I>Ttoul</I>
+
+returns NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<I>Ultot</I>
+
+returns
+<B>0</B>
+
+for a failure, and otherwise
+returns the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL
+(it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred).
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="atol.3.html">atol</A>(3), <A HREF="strtoul.3.html">strtoul</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>ttoul</I>
+
+are:
+empty input;
+unknown
+<I>base</I>;
+
+non-digit character found;
+number too large for an
+<B>unsigned long</B>.
+
+<P>
+
+Fatal errors in
+<I>ultot</I>
+
+are:
+unknown
+<I>format</I>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+Conversion of
+<B>0</B>
+
+with format
+<B>o</B>
+
+yields
+<B>00</B>.
+
+<P>
+
+<I>Ultot</I>
+
+format
+<B>17</B>
+
+is a bit of a kludge.
+<P>
+
+The restriction of error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The error-reporting convention lends itself to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = ttoul( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_ultoa.3.html b/doc/manpage.d/ipsec_ultoa.3.html
new file mode 100644
index 000000000..7669dce52
--- /dev/null
+++ b/doc/manpage.d/ipsec_ultoa.3.html
@@ -0,0 +1,266 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ATOUL</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ATOUL</H1>
+Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec atoul, ultoa - convert unsigned-long numbers to and from ASCII
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *atoul(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int base, unsigned long *n);</B>
+
+<BR>
+
+<B>size_t ultoa(unsigned long n, int base, char *dst,</B>
+
+<BR>
+&nbsp;
+<B>size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions are obsolete; see
+<I><A HREF="ipsec_ttoul.3.html">ipsec_ttoul</A></I>(3)
+
+for their replacements.
+<P>
+
+<I>Atoul</I>
+
+converts an ASCII number into a binary
+<B>unsigned long</B>
+
+value.
+<I>Ultoa</I>
+
+does the reverse conversion, back to an ASCII version.
+<P>
+
+Numbers are specified in ASCII as
+decimal (e.g.
+<B>123</B>),
+
+octal with a leading zero (e.g.
+<B>012</B>,
+
+which has value 10),
+or hexadecimal with a leading
+<B>0x</B>
+
+(e.g.
+<B>0x1f</B>,
+
+which has value 31)
+in either upper or lower case.
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>atoul</I>
+
+specifies the length of the ASCII string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>base</I>
+
+parameter of
+<I>atoul</I>
+
+can be
+<B>8</B>,
+
+<B>10</B>,
+
+or
+<B>16</B>,
+
+in which case the number supplied is assumed to be of that form
+(and in the case of
+<B>16</B>,
+
+to lack any
+<B>0x</B>
+
+prefix).
+It can also be
+<B>0</B>,
+
+in which case the number is examined for a leading zero
+or a leading
+<B>0x</B>
+
+to determine its base,
+or
+<B>13</B>
+
+(halfway between 10 and 16),
+which has the same effect as
+<B>0</B>
+
+except that a non-hexadecimal
+number is considered decimal regardless of any leading zero.
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>ultoa</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+<P>
+
+The
+<I>base</I>
+
+parameter of
+<I>ultoa</I>
+
+must be
+<B>8</B>,
+
+<B>10</B>,
+
+or
+<B>16</B>.
+
+<P>
+
+<I>Atoul</I>
+
+returns NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<I>Ultoa</I>
+
+returns the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL;
+it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="atol.3.html">atol</A>(3), <A HREF="strtoul.3.html">strtoul</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>atoul</I>
+
+are:
+empty input;
+unknown
+<I>base</I>;
+
+non-digit character found;
+number too large for an
+<B>unsigned long</B>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+There is no provision for reporting an invalid
+<I>base</I>
+
+parameter given to
+<I>ultoa</I>.
+
+<P>
+
+The restriction of error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The error-reporting convention lends itself to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = atoul( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_ultot.3.html b/doc/manpage.d/ipsec_ultot.3.html
new file mode 100644
index 000000000..b722dcc13
--- /dev/null
+++ b/doc/manpage.d/ipsec_ultot.3.html
@@ -0,0 +1,310 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_TTOUL</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_TTOUL</H1>
+Section: C Library Functions (3)<BR>Updated: 16 Aug 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ttoul, ultot - convert unsigned-long numbers to and from text
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *ttoul(const char *src, size_t srclen,</B>
+
+<BR>
+&nbsp;
+<B>int base, unsigned long *n);</B>
+
+<BR>
+
+<B>size_t ultot(unsigned long n, int format, char *dst,</B>
+
+<BR>
+&nbsp;
+<B>size_t dstlen);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>Ttoul</I>
+
+converts a text-string number into a binary
+<B>unsigned long</B>
+
+value.
+<I>Ultot</I>
+
+does the reverse conversion, back to a text version.
+<P>
+
+Numbers are specified in text as
+decimal (e.g.
+<B>123</B>),
+
+octal with a leading zero (e.g.
+<B>012</B>,
+
+which has value 10),
+or hexadecimal with a leading
+<B>0x</B>
+
+(e.g.
+<B>0x1f</B>,
+
+which has value 31)
+in either upper or lower case.
+<P>
+
+The
+<I>srclen</I>
+
+parameter of
+<I>ttoul</I>
+
+specifies the length of the string pointed to by
+<I>src</I>;
+
+it is an error for there to be anything else
+(e.g., a terminating NUL) within that length.
+As a convenience for cases where an entire NUL-terminated string is
+to be converted,
+a
+<I>srclen</I>
+
+value of
+<B>0</B>
+
+is taken to mean
+<B>strlen(src)</B>.
+
+<P>
+
+The
+<I>base</I>
+
+parameter of
+<I>ttoul</I>
+
+can be
+<B>8</B>,
+
+<B>10</B>,
+
+or
+<B>16</B>,
+
+in which case the number supplied is assumed to be of that form
+(and in the case of
+<B>16</B>,
+
+to lack any
+<B>0x</B>
+
+prefix).
+It can also be
+<B>0</B>,
+
+in which case the number is examined for a leading zero
+or a leading
+<B>0x</B>
+
+to determine its base.
+<P>
+
+The
+<I>dstlen</I>
+
+parameter of
+<I>ultot</I>
+
+specifies the size of the
+<I>dst</I>
+
+parameter;
+under no circumstances are more than
+<I>dstlen</I>
+
+bytes written to
+<I>dst</I>.
+
+A result which will not fit is truncated.
+<I>Dstlen</I>
+
+can be zero, in which case
+<I>dst</I>
+
+need not be valid and no result is written,
+but the return value is unaffected;
+in all other cases, the (possibly truncated) result is NUL-terminated.
+The
+<I>freeswan.h</I>
+
+header file defines a constant,
+<B>ULTOT_BUF</B>,
+
+which is the size of a buffer just large enough for worst-case results.
+<P>
+
+The
+<I>format</I>
+
+parameter of
+<I>ultot</I>
+
+must be one of:
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT><B>'o'</B><DD>
+octal conversion with leading
+<B>0</B>
+
+<DT><B>&nbsp;8</B><DD>
+octal conversion with no leading
+<B>0</B>
+
+<DT><B>'d'</B><DD>
+decimal conversion
+<DT><B>10</B><DD>
+same as
+<B>d</B>
+
+<DT><B>'x'</B><DD>
+hexadecimal conversion, including leading
+<B>0x</B>
+
+<DT><B>16</B><DD>
+hexadecimal conversion with no leading
+<B>0x</B>
+
+<DT><B>17</B><DD>
+like
+<B>16</B>
+
+except padded on left with
+<B>0</B>s
+
+to eight digits (full width of a 32-bit number)
+</DL>
+</DL>
+
+<P>
+
+<I>Ttoul</I>
+
+returns NULL for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<I>Ultot</I>
+
+returns
+<B>0</B>
+
+for a failure, and otherwise
+returns the size of buffer which would
+be needed to
+accommodate the full conversion result, including terminating NUL
+(it is the caller's responsibility to check this against the size of
+the provided buffer to determine whether truncation has occurred).
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="atol.3.html">atol</A>(3), <A HREF="strtoul.3.html">strtoul</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in
+<I>ttoul</I>
+
+are:
+empty input;
+unknown
+<I>base</I>;
+
+non-digit character found;
+number too large for an
+<B>unsigned long</B>.
+
+<P>
+
+Fatal errors in
+<I>ultot</I>
+
+are:
+unknown
+<I>format</I>.
+
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<A NAME="lbAH">&nbsp;</A>
+<H2>BUGS</H2>
+
+Conversion of
+<B>0</B>
+
+with format
+<B>o</B>
+
+yields
+<B>00</B>.
+
+<P>
+
+<I>Ultot</I>
+
+format
+<B>17</B>
+
+is a bit of a kludge.
+<P>
+
+The restriction of error reports to literal strings
+(so that callers don't need to worry about freeing them or copying them)
+does limit the precision of error reporting.
+<P>
+
+The error-reporting convention lends itself to slightly obscure code,
+because many readers will not think of NULL as signifying success.
+A good way to make it clearer is to write something like:
+<P>
+
+<DL COMPACT><DT><DD>
+<PRE>
+<B>const char *error;</B>
+
+<B>error = ttoul( /* ... */ );</B>
+<B>if (error != NULL) {</B>
+<B> /* something went wrong */</B>
+</PRE>
+
+</DL>
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+<DT><A HREF="#lbAH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_unspecaddr.3.html b/doc/manpage.d/ipsec_unspecaddr.3.html
new file mode 100644
index 000000000..92f69d99c
--- /dev/null
+++ b/doc/manpage.d/ipsec_unspecaddr.3.html
@@ -0,0 +1,166 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_ANYADDR</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_ANYADDR</H1>
+Section: C Library Functions (3)<BR>Updated: 8 Sept 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec anyaddr - get &quot;any&quot; address
+<BR>
+
+ipsec isanyaddr - test address for equality to &quot;any&quot; address
+<BR>
+
+ipsec unspecaddr - get &quot;unspecified&quot; address
+<BR>
+
+ipsec isunspecaddr - test address for equality to &quot;unspecified&quot; address
+<BR>
+
+ipsec loopbackaddr - get loopback address
+<BR>
+
+ipsec isloopbackaddr - test address for equality to loopback address
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *anyaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isanyaddr(const ip_address *src);</B>
+
+<BR>
+
+<B>const char *unspecaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isunspecaddr(const ip_address *src);</B>
+
+<BR>
+
+<B>const char *loopbackaddr(int af, ip_address *dst);</B>
+
+<BR>
+
+<B>int isloopbackaddr(const ip_address *src);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions fill in, and test for, special values of the
+<I>ip_address</I>
+
+type.
+<P>
+
+<I>Anyaddr</I>
+
+fills in the destination
+<I>*dst</I>
+
+with the ``any'' address of address family
+<I>af</I>
+
+(normally
+<B>AF_INET</B>
+
+or
+<B>AF_INET6</B>).
+
+The IPv4 ``any'' address is the one embodied in the old
+<B>INADDR_ANY</B>
+
+macro.
+<P>
+
+<I>Isanyaddr</I>
+
+returns
+<B>1</B>
+
+if the
+<I>src</I>
+
+address equals the ``any'' address,
+and
+<B>0</B>
+
+otherwise.
+<P>
+
+Similarly,
+<I>unspecaddr</I>
+
+supplies, and
+<I>isunspecaddr</I>
+
+tests for,
+the ``unspecified'' address,
+which may be the same as the ``any'' address.
+<P>
+
+Similarly,
+<I>loopbackaddr</I>
+
+supplies, and
+<I>islookbackaddr</I>
+
+tests for,
+the loopback address.
+<P>
+
+<I>Anyaddr</I>,
+
+<I>unspecaddr</I>,
+
+and
+<I>loopbackaddr</I>
+
+return
+<B>NULL</B>
+
+for success and
+a pointer to a string-literal error message for failure;
+see DIAGNOSTICS.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_addrtot.3.html">ipsec_addrtot</A>(3), <A HREF="ipsec_sameaddr.3.html">ipsec_sameaddr</A>(3)
+<A NAME="lbAF">&nbsp;</A>
+<H2>DIAGNOSTICS</H2>
+
+Fatal errors in the address-supplying functions are:
+unknown address family.
+<A NAME="lbAG">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
+<DT><A HREF="#lbAG">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_verify.8.html b/doc/manpage.d/ipsec_verify.8.html
new file mode 100644
index 000000000..09d04894b
--- /dev/null
+++ b/doc/manpage.d/ipsec_verify.8.html
@@ -0,0 +1,107 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_VERIFY</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_VERIFY</H1>
+Section: Maintenance Commands (8)<BR>Updated: 8 June 2002<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec verify - see if FreeSWAN has been installed correctly
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ipsec</B>
+
+<B>verify</B>
+
+[
+<B>--host</B>
+
+&nbsp;name&nbsp;]
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<P>
+
+Invoked without argument,
+<I>verify </I>
+
+examines the local system for a number of common system faults:
+IPsec not in path, no secrets file generated,
+pluto not running, and IPsec support not present in kernel
+(or IPsec module not loaded).
+If two or more interfaces are found, it performs checks relevant on an
+IPsec gateway: whether IP forwarding is allowed, and if so,
+whether MASQ or NAT rules are in play.
+<P>
+
+In addition,
+<I>verify </I>
+
+performs checks relevant to Opportunistic Encryption.
+It looks in forward DNS for a TXT record for the system's hostname, and
+in reverse DNS for a TXT record for the system's IP addresses.
+It checks whether the system has a public IP.
+<P>
+
+The
+<B>--host</B>
+
+option causes
+<B>verify</B>
+
+to look for a TXT record for
+<I>name</I>
+
+in forward and reverse DNS.
+<A NAME="lbAE">&nbsp;</A>
+<H2>FILES</H2>
+
+<PRE>
+/proc/net/ipsec_eroute
+/etc/ipsec.secrets
+</PRE>
+
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by Michael Richardson.
+<A NAME="lbAG">&nbsp;</A>
+<H2>BUGS</H2>
+
+<I>Verify </I>
+
+does not check for
+<B>ipchains</B>
+
+masquerading.
+<P>
+
+<I>Verify</I>
+
+does not look for TXT records for Opportunistic clients behind the system.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">FILES</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+<DT><A HREF="#lbAG">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_version.3.html b/doc/manpage.d/ipsec_version.3.html
new file mode 100644
index 000000000..bcad75a46
--- /dev/null
+++ b/doc/manpage.d/ipsec_version.3.html
@@ -0,0 +1,94 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_VERSION</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_VERSION</H1>
+Section: C Library Functions (3)<BR>Updated: 21 Nov 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ipsec_version_code - get IPsec version code
+<BR>
+
+ipsec ipsec_version_string - get full IPsec version string
+<BR>
+
+ipsec ipsec_copyright_notice - get IPsec copyright notice
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *ipsec_version_code(void);</B>
+
+<BR>
+
+<B>const char *ipsec_version_string(void);</B>
+
+<BR>
+
+<B>const char **ipsec_copyright_notice(void);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions provide information on version numbering and copyright
+of the Linux FreeS/WAN IPsec implementation.
+<P>
+
+<I>Ipsec_version_code</I>
+
+returns a pointer to a string constant
+containing the current IPsec version code,
+such as ``1.92'' or ``snap2001Nov19b''.
+<P>
+
+<I>Ipsec_version_string</I>
+
+returns a pointer to a string constant giving a full version identification,
+consisting of the version code preceded by a prefix identifying the software,
+e.g. ``Linux FreeS/WAN 1.92''.
+<P>
+
+<I>Ipsec_copyright_notice</I>
+
+returns a pointer to a vector of pointers,
+terminated by a
+<B>NULL</B>,
+
+which is the text of a suitable copyright notice.
+Each pointer points to a string constant (possibly empty) which is one line
+of the somewhat-verbose copyright notice.
+The strings are NUL-terminated and do not contain a newline;
+supplying suitable line termination for the output device is
+the caller's responsibility.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_version.5.html b/doc/manpage.d/ipsec_version.5.html
new file mode 100644
index 000000000..89bee0f97
--- /dev/null
+++ b/doc/manpage.d/ipsec_version.5.html
@@ -0,0 +1,103 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_VERSION</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_VERSION</H1>
+Section: File Formats (5)<BR>Updated: 29 Jun 2000<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec_version - lists KLIPS version information
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>cat</B>
+
+<B>/proc/net/ipsec_version</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<I>/proc/net/ipsec_version</I>
+
+is a read-only file which lists the currently running KLIPS version
+information.
+<P>
+
+<A NAME="lbAE">&nbsp;</A>
+<H2>EXAMPLES</H2>
+
+<DL COMPACT>
+<DT><B>FreeS/WAN version: 1.4</B>
+
+<DD>
+</DL>
+<P>
+
+shows that the currently loaded
+<B>KLIPS</B>
+
+is from
+<B>FreeS/WAN 1.4.</B>
+
+<P>
+
+<A NAME="lbAF">&nbsp;</A>
+<H2>FILES</H2>
+
+/proc/net/ipsec_version
+<A NAME="lbAG">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8), <A HREF="ipsec_manual.8.html">ipsec_manual</A>(8), <A HREF="ipsec_eroute.5.html">ipsec_eroute</A>(5), <A HREF="ipsec_spi.5.html">ipsec_spi</A>(5),
+<A HREF="ipsec_spigrp.5.html">ipsec_spigrp</A>(5), <A HREF="ipsec_klipsdebug.5.html">ipsec_klipsdebug</A>(5), <A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A>(8), <A HREF="ipsec_pf_key.5.html">ipsec_pf_key</A>(5)
+<A NAME="lbAH">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the Linux FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org/">http://www.freeswan.org/</A>&gt;
+by Richard Guy Briggs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">EXAMPLES</A><DD>
+<DT><A HREF="#lbAF">FILES</A><DD>
+<DT><A HREF="#lbAG">SEE ALSO</A><DD>
+<DT><A HREF="#lbAH">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_version_code.3.html b/doc/manpage.d/ipsec_version_code.3.html
new file mode 100644
index 000000000..bcad75a46
--- /dev/null
+++ b/doc/manpage.d/ipsec_version_code.3.html
@@ -0,0 +1,94 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_VERSION</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_VERSION</H1>
+Section: C Library Functions (3)<BR>Updated: 21 Nov 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ipsec_version_code - get IPsec version code
+<BR>
+
+ipsec ipsec_version_string - get full IPsec version string
+<BR>
+
+ipsec ipsec_copyright_notice - get IPsec copyright notice
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *ipsec_version_code(void);</B>
+
+<BR>
+
+<B>const char *ipsec_version_string(void);</B>
+
+<BR>
+
+<B>const char **ipsec_copyright_notice(void);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions provide information on version numbering and copyright
+of the Linux FreeS/WAN IPsec implementation.
+<P>
+
+<I>Ipsec_version_code</I>
+
+returns a pointer to a string constant
+containing the current IPsec version code,
+such as ``1.92'' or ``snap2001Nov19b''.
+<P>
+
+<I>Ipsec_version_string</I>
+
+returns a pointer to a string constant giving a full version identification,
+consisting of the version code preceded by a prefix identifying the software,
+e.g. ``Linux FreeS/WAN 1.92''.
+<P>
+
+<I>Ipsec_copyright_notice</I>
+
+returns a pointer to a vector of pointers,
+terminated by a
+<B>NULL</B>,
+
+which is the text of a suitable copyright notice.
+Each pointer points to a string constant (possibly empty) which is one line
+of the somewhat-verbose copyright notice.
+The strings are NUL-terminated and do not contain a newline;
+supplying suitable line termination for the output device is
+the caller's responsibility.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_version_string.3.html b/doc/manpage.d/ipsec_version_string.3.html
new file mode 100644
index 000000000..bcad75a46
--- /dev/null
+++ b/doc/manpage.d/ipsec_version_string.3.html
@@ -0,0 +1,94 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_VERSION</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_VERSION</H1>
+Section: C Library Functions (3)<BR>Updated: 21 Nov 2001<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec ipsec_version_code - get IPsec version code
+<BR>
+
+ipsec ipsec_version_string - get full IPsec version string
+<BR>
+
+ipsec ipsec_copyright_notice - get IPsec copyright notice
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
+
+<P>
+<B>const char *ipsec_version_code(void);</B>
+
+<BR>
+
+<B>const char *ipsec_version_string(void);</B>
+
+<BR>
+
+<B>const char **ipsec_copyright_notice(void);</B>
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+These functions provide information on version numbering and copyright
+of the Linux FreeS/WAN IPsec implementation.
+<P>
+
+<I>Ipsec_version_code</I>
+
+returns a pointer to a string constant
+containing the current IPsec version code,
+such as ``1.92'' or ``snap2001Nov19b''.
+<P>
+
+<I>Ipsec_version_string</I>
+
+returns a pointer to a string constant giving a full version identification,
+consisting of the version code preceded by a prefix identifying the software,
+e.g. ``Linux FreeS/WAN 1.92''.
+<P>
+
+<I>Ipsec_copyright_notice</I>
+
+returns a pointer to a vector of pointers,
+terminated by a
+<B>NULL</B>,
+
+which is the text of a suitable copyright notice.
+Each pointer points to a string constant (possibly empty) which is one line
+of the somewhat-verbose copyright notice.
+The strings are NUL-terminated and do not contain a newline;
+supplying suitable line termination for the output device is
+the caller's responsibility.
+<A NAME="lbAE">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<A HREF="ipsec.8.html">ipsec</A>(8)
+<A NAME="lbAF">&nbsp;</A>
+<H2>HISTORY</H2>
+
+Written for the FreeS/WAN project by Henry Spencer.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">SEE ALSO</A><DD>
+<DT><A HREF="#lbAF">HISTORY</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>
diff --git a/doc/manpage.d/ipsec_whack.8.html b/doc/manpage.d/ipsec_whack.8.html
new file mode 100644
index 000000000..2e2ce4c2f
--- /dev/null
+++ b/doc/manpage.d/ipsec_whack.8.html
@@ -0,0 +1,1824 @@
+Content-type: text/html
+
+<HTML><HEAD><TITLE>Manpage of IPSEC_PLUTO</TITLE>
+</HEAD><BODY>
+<H1>IPSEC_PLUTO</H1>
+Section: Maintenance Commands (8)<BR>Updated: 28 March 1999<BR><A HREF="#index">Index</A>
+<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ipsec pluto - IPsec IKE keying daemon
+<BR>
+
+ipsec whack - control interface for IPSEC keying daemon
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+
+
+<DL COMPACT>
+<DT>
+<B>
+<DD>ipsec pluto
+[--help]
+[--version]
+[--optionsfrom&nbsp;</B><I>filename</I>]
+[--nofork]
+[--stderrlog]
+[--noklips]
+[--uniqueids]
+[<B>--interface</B> <I>interfacename</I>]
+[--ikeport&nbsp;<I>portnumber</I>]
+[--ctlbase&nbsp;<I>path</I>]
+[--secretsfile&nbsp;<I>secrets-file</I>]
+[--adns <I>pathname</I>]
+[--lwdnsq <I>pathname</I>]
+[--perpeerlog]
+[--perpeerlogbase&nbsp;<I>dirname</I>]
+[--debug-none]
+[--debug-all]
+[--debug-raw]
+[--debug-crypt]
+[--debug-parsing]
+[--debug-emitting]
+[--debug-control]
+[--debug-lifecycle]
+[--debug-klips]
+[--debug-dns]
+[--debug-oppo]
+[--debug-private]
+<DT>
+<B>
+<DD>ipsec whack
+[--help]
+[--version]
+<DT>
+
+<DD>ipsec whack
+--name&nbsp;</B><I>connection-name</I>
+<BR>
+
+[--id&nbsp;<I>id</I>] [--host&nbsp;<I>ip-address</I>]
+[--ikeport&nbsp;<I>port-number</I>]
+[--nexthop&nbsp;<I>ip-address</I>]
+[--client&nbsp;<I>subnet</I>]
+[--dnskeyondemand]
+[--updown&nbsp;<I>updown</I>]
+<BR>
+
+--to
+<BR>
+
+[--id&nbsp;<I>id</I>]
+[--host&nbsp;<I>ip-address</I>]
+[--ikeport&nbsp;<I>port-number</I>]
+[--nexthop&nbsp;<I>ip-address</I>]
+[--client&nbsp;<I>subnet</I>]
+[--dnskeyondemand]
+[--updown&nbsp;<I>updown</I>]
+<BR>
+
+[--psk]
+[--rsasig]
+[--encrypt]
+[--authenticate]
+[--compress]
+[--tunnel]
+[--pfs]
+[--disablearrivalcheck]
+[--ipv4]
+[--ipv6]
+[--tunnelipv4]
+[--tunnelipv6]
+[--ikelifetime&nbsp;<I>seconds</I>]
+[--ipseclifetime&nbsp;<I>seconds</I>]
+[--rekeymargin&nbsp;<I>seconds</I>]
+[--rekeyfuzz&nbsp;<I>percentage</I>]
+[--keyingtries&nbsp;<I>count</I>]
+[--dontrekey]
+[--delete]
+[--ctlbase&nbsp;<I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+--keyid&nbsp;</B><I>id</I>
+[--addkey]
+[--pubkeyrsa&nbsp;<I>key</I>]
+[--ctlbase&nbsp;<I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+--myid&nbsp;</B><I>id</I>
+<DT>
+<B>
+<DD>ipsec whack
+--listen|--unlisten
+[--ctlbase&nbsp;</B><I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+--route|--unroute
+--name&nbsp;</B><I>connection-name</I>
+[--ctlbase&nbsp;<I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+--initiate|--terminate
+--name&nbsp;</B><I>connection-name</I>
+[--asynchronous]
+[--ctlbase&nbsp;<I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+[--tunnelipv4]
+[--tunnelipv6]
+--oppohere </B><I>ip-address</I>
+--oppothere <I>ip-address</I>
+<DT>
+<B>
+<DD>ipsec whack
+--delete
+--name&nbsp;</B><I>connection-name</I>
+[--ctlbase&nbsp;<I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+--deletestate&nbsp;</B><I>state-number</I>
+[--ctlbase&nbsp;<I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+[--name&nbsp;</B><I>connection-name</I>]
+[--debug-none]
+[--debug-all]
+[--debug-raw]
+[--debug-crypt]
+[--debug-parsing]
+[--debug-emitting]
+[--debug-control]
+[--debug-lifecycle]
+[--debug-klips]
+[--debug-dns]
+[--debug-oppo]
+[--debug-private]
+[--ctlbase&nbsp;<I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+--status
+[--ctlbase&nbsp;</B><I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+<DT>
+<B>
+<DD>ipsec whack
+--shutdown
+[--ctlbase&nbsp;</B><I>path</I>]
+[--optionsfrom&nbsp;<I>filename</I>]
+[--label&nbsp;<I>string</I>]
+
+
+
+</DL>
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+<B>pluto</B>
+
+is an IKE (``IPsec Key Exchange'') daemon.
+<B>whack</B>
+
+is an auxiliary program to allow requests to be made to a running
+<B>pluto</B>.
+
+<P>
+
+<B>pluto</B>
+
+is used to automatically build shared ``security associations'' on a
+system that has IPsec, the secure IP protocol.
+In other words,
+<B>pluto</B>
+
+can eliminate much of the work of manual keying.
+The actual
+secure transmission of packets is the responsibility of other parts of
+the system (see
+<B>KLIPS</B>,
+
+the companion implementation of IPsec).
+<I><A HREF="ipsec_auto.8.html">ipsec_auto</A></I>(8) provides a more convenient interface to
+<B>pluto</B> and <B>whack</B>.
+<A NAME="lbAE">&nbsp;</A>
+<H3>IKE's Job</H3>
+
+<P>
+
+A <I>Security Association</I> (<I>SA</I>) is an agreement between two network nodes on
+how to process certain traffic between them. This processing involves
+encapsulation, authentication, encryption, or compression.
+<P>
+
+IKE can be deployed on a network node to negotiate Security
+Associations for that node. These IKE implementations can only
+negotiate with other IKE implementations, so IKE must be on each node
+that is to be an endpoint of an IKE-negotiated Security Association.
+No other nodes need to be running IKE.
+<P>
+
+An IKE instance (i.e. an IKE implementation on a particular network
+node) communicates with another IKE instance using UDP IP packets, so
+there must be a route between the nodes in each direction.
+<P>
+
+The negotiation of Security Associations requires a number of choices
+that involve tradeoffs between security, convenience, trust, and
+efficiency. These are policy issues and are normally specified to the
+IKE instance by the system administrator.
+<P>
+
+IKE deals with two kinds of Security Associations. The first part of
+a negotiation between IKE instances is to build an ISAKMP SA. An
+ISAKMP SA is used to protect communication between the two IKEs.
+IPsec SAs can then be built by the IKEs - these are used to carry
+protected IP traffic between the systems.
+<P>
+
+The negotiation of the ISAKMP SA is known as Phase 1. In theory,
+Phase 1 can be accomplished by a couple of different exchange types,
+but we only implement one called Main Mode (we don't implement
+Aggressive Mode).
+<P>
+
+Any negotiation under the protection of an ISAKMP SA, including the
+negotiation of IPsec SAs, is part of Phase 2. The exchange type
+that we use to negotiate an IPsec SA is called Quick Mode.
+<P>
+
+IKE instances must be able to authenticate each other as part of their
+negotiation of an ISAKMP SA. This can be done by several mechanisms
+described in the draft standards.
+<P>
+
+IKE negotiation can be initiated by any instance with any other. If
+both can find an agreeable set of characteristics for a Security
+Association, and both recognize each others authenticity, they can set
+up a Security Association. The standards do not specify what causes
+an IKE instance to initiate a negotiation.
+<P>
+
+In summary, an IKE instance is prepared to automate the management of
+Security Associations in an IPsec environment, but a number of issues
+are considered policy and are left in the system administrator's hands.
+<A NAME="lbAF">&nbsp;</A>
+<H3>Pluto</H3>
+
+<P>
+
+<B>pluto</B> is an implementation of IKE. It runs as a daemon on a network
+node. Currently, this network node must be a LINUX system running the
+<B>KLIPS</B> implementation of IPsec.
+<P>
+
+<B>pluto</B> only implements a subset of IKE. This is enough for it to
+interoperate with other instances of <B>pluto</B>, and many other IKE
+implementations. We are working on implementing more of IKE.
+<P>
+
+The policy for acceptable characteristics for Security Associations is
+mostly hardwired into the code of <B>pluto</B> (spdb.c). Eventually
+this will be moved into a security policy database with reasonable
+expressive power and more convenience.
+<P>
+
+<B>pluto</B> uses shared secrets or RSA signatures to authenticate
+peers with whom it is negotiating.
+<P>
+
+<B>pluto</B> initiates negotiation of a Security Association when it is
+manually prodded: the program <B>whack</B> is run to trigger this.
+It will also initiate a negotiation when <B>KLIPS</B> traps an outbound packet
+for Opportunistic Encryption.
+<P>
+
+<B>pluto</B> implements ISAKMP SAs itself. After it has negotiated the
+characteristics of an IPsec SA, it directs <B>KLIPS</B> to implement it.
+It also invokes a script to adjust any firewall and issue <I><A HREF="route.8.html">route</A></I>(8)
+commands to direct IP packets through <B>KLIPS</B>.
+<P>
+
+When <B>pluto</B> shuts down, it closes all Security Associations.
+<A NAME="lbAG">&nbsp;</A>
+<H3>Before Running Pluto</H3>
+
+<P>
+
+<B>pluto</B> runs as a daemon with userid root. Before running it, a few
+things must be set up.
+<P>
+
+<B>pluto</B> requires <B>KLIPS</B>, the FreeS/WAN implementation of IPsec.
+All of the components of <B>KLIPS</B> and <B>pluto</B> should be installed.
+<P>
+
+<B>pluto</B> supports multiple public networks (that is, networks
+that are considered insecure and thus need to have their traffic
+encrypted or authenticated). It discovers the
+public interfaces to use by looking at all interfaces that are
+configured (the <B>--interface</B> option can be used to limit
+the interfaces considered).
+It does this only when <B>whack</B> tells it to --listen,
+so the interfaces must be configured by then. Each interface with a name of the form
+<B>ipsec</B>[<B>0</B>-<B>9</B>] is taken as a <B>KLIPS</B> virtual public interface.
+Another network interface with the same IP address (there should be only
+one) is taken as the corresponding real public
+interface. <I><A HREF="ifconfig.8.html">ifconfig</A></I>(8) with the <B>-a</B> flag will show
+the name and status of each network interface.
+<P>
+
+<B>pluto</B> requires a database of preshared secrets and RSA private keys.
+This is described in the
+<I><A HREF="ipsec.secrets.5.html">ipsec.secrets</A></I>(5).
+
+<B>pluto</B> is told of RSA public keys via <B>whack</B> commands.
+If the connection is Opportunistic, and no RSA public key is known,
+<B>pluto</B> will attempt to fetch RSA keys using the Domain Name System.
+<A NAME="lbAH">&nbsp;</A>
+<H3>Setting up <B>KLIPS</B> for <B>pluto</B></H3>
+
+<P>
+
+The most basic network topology that <B>pluto</B> supports has two security
+gateways negotiating on behalf of client subnets. The diagram of RGB's
+testbed is a good example (see <I>klips/doc/rgb_setup.txt</I>).
+<P>
+
+The file <I>INSTALL</I> in the base directory of this distribution
+explains how to start setting up the whole system, including <B>KLIPS</B>.
+<P>
+
+Make sure that the security gateways have routes to each other. This
+is usually covered by the default route, but may require issuing
+<I><A HREF="route.8.html">route</A></I>(8)
+
+commands. The route must go through a particular IP
+interface (we will assume it is <I>eth0</I>, but it need not be). The
+interface that connects the security gateway to its client must be a
+different one.
+<P>
+
+It is necessary to issue a
+<I><A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A></I>(8)
+
+command on each gateway. The required command is:
+<P>
+&nbsp;&nbsp;&nbsp;ipsec tncfg --attach&nbsp;--virtual&nbsp;ipsec0 --physical&nbsp;eth0
+<P>
+A command to set up the ipsec0 virtual interface will also need to be
+run. It will have the same parameters as the command used to set up
+the physical interface to which it has just been connected using
+<I><A HREF="ipsec_tncfg.8.html">ipsec_tncfg</A></I>(8).
+
+<A NAME="lbAI">&nbsp;</A>
+<H3>ipsec.secrets file</H3>
+
+<P>
+
+A <B>pluto</B> daemon and another IKE daemon (for example, another instance
+of <B>pluto</B>) must convince each other that they are who they are supposed
+to be before any negotiation can succeed. This authentication is
+accomplished by using either secrets that have been shared beforehand
+(manually) or by using RSA signatures. There are other techniques,
+but they have not been implemented in <B>pluto</B>.
+<P>
+
+The file <I>/etc/ipsec.secrets</I> is used to keep preshared secret keys
+and RSA private keys for
+authentication with other IKE daemons. For debugging, there is an
+argument to the <B>pluto</B> command to use a different file.
+This file is described in
+<I><A HREF="ipsec.secrets.5.html">ipsec.secrets</A></I>(5).
+
+<A NAME="lbAJ">&nbsp;</A>
+<H3>Running Pluto</H3>
+
+<P>
+
+To fire up the daemon, just type <B>pluto</B> (be sure to be running as
+the superuser).
+The default IKE port number is 500, the UDP port assigned by IANA for IKE Daemons.
+<B>pluto</B> must be run by the superuser to be able to use the UDP 500 port.
+<P>
+
+<B>pluto</B> attempts to create a lockfile with the name
+<I>/var/run/pluto.pid</I>. If the lockfile cannot be created,
+<B>pluto</B> exits - this prevents multiple <B>pluto</B>s from
+competing Any ``leftover'' lockfile must be removed before
+<B>pluto</B> will run. <B>pluto</B> writes its pid into this file so
+that scripts can find it. This lock will not function properly if it
+is on an NFS volume (but sharing locks on multiple machines doesn't
+make sense anyway).
+<P>
+
+<B>pluto</B> then forks and the parent exits. This is the conventional
+``daemon fork''. It can make debugging awkward, so there is an option
+to suppress this fork.
+<P>
+
+All logging, including diagnostics, is sent to
+<I><A HREF="syslog.3.html">syslog</A></I>(3)
+
+with facility=authpriv;
+it decides where to put these messages (possibly in /var/log/secure).
+Since this too can make debugging awkward, there is an option to
+steer logging to stderr.
+<P>
+
+If the <B>--perpeerlog</B> option is given, then pluto will open
+a log file per connection. By default, this is in /var/log/pluto/peer,
+in a subdirectory formed by turning all dot (.) [IPv4} or colon (:)
+[IPv6] into slashes (/).
+<P>
+
+The base directory can be changed with the <B>--perpeerlogbase</B>.
+<P>
+
+Once <B>pluto</B> is started, it waits for requests from <B>whack</B>.
+<A NAME="lbAK">&nbsp;</A>
+<H3>Pluto's Internal State</H3>
+
+<P>
+
+To understand how to use <B>pluto</B>, it is helpful to understand a little
+about its internal state. Furthermore, the terminology is needed to decipher
+some of the diagnostic messages.
+<P>
+
+The <I>(potential) connection</I> database describes attributes of a
+connection. These include the IP addresses of the hosts and client
+subnets and the security characteristics desired. <B>pluto</B>
+requires this information (simply called a connection) before it can
+respond to a request to build an SA. Each connection is given a name
+when it is created, and all references are made using this name.
+<P>
+
+During the IKE exchange to build an SA, the information about the
+negotiation is represented in a <I>state object</I>. Each state object
+reflects how far the negotiation has reached. Once the negotiation is
+complete and the SA established, the state object remains to represent
+the SA. When the SA is terminated, the state object is discarded.
+Each State object is given a serial number and this is used to refer
+to the state objects in logged messages.
+<P>
+
+Each state object corresponds to a connection and can be thought of
+as an instantiation of that connection.
+At any particular time, there may be any number of state objects
+corresponding to a particular connection.
+Often there is one representing an ISAKMP SA and another representing
+an IPsec SA.
+<P>
+
+<B>KLIPS</B> hooks into the routing code in a LINUX kernel.
+Traffic to be processed by an IPsec SA must be directed through
+<B>KLIPS</B> by routing commands. Furthermore, the processing to be
+done is specified by <I>ipsec <A HREF="eroute.8.html">eroute</A>(8)</I> commands.
+<B>pluto</B> takes the responsibility of managing both of these special
+kinds of routes.
+<P>
+
+Each connection may be routed, and must be while it has an IPsec SA.
+The connection specifies the characteristics of the route: the
+interface on this machine, the ``gateway'' (the nexthop),
+and the peer's client subnet. Two
+connections may not be simultaneously routed if they are for the same
+peer's client subnet but use different interfaces or gateways
+(<B>pluto</B>'s logic does not reflect any advanced routing capabilities).
+<P>
+
+Each eroute is associated with the state object for an IPsec SA
+because it has the particular characteristics of the SA.
+Two eroutes conflict if they specify the identical local
+and remote clients (unlike for routes, the local clients are
+taken into account).
+<P>
+
+When <B>pluto</B> needs to install a route for a connection,
+it must make sure that no conflicting route is in use. If another
+connection has a conflicting route, that route will be taken down, as long
+as there is no IPsec SA instantiating that connection.
+If there is such an IPsec SA, the attempt to install a route will fail.
+<P>
+
+There is an exception. If <B>pluto</B>, as Responder, needs to install
+a route to a fixed client subnet for a connection, and there is
+already a conflicting route, then the SAs using the route are deleted
+to make room for the new SAs. The rationale is that the new
+connection is probably more current. The need for this usually is a
+product of Road Warrior connections (these are explained later; they
+cannot be used to initiate).
+<P>
+
+When <B>pluto</B> needs to install an eroute for an IPsec SA (for a
+state object), first the state object's connection must be routed (if
+this cannot be done, the eroute and SA will not be installed).
+If a conflicting eroute is already in place for another connection,
+the eroute and SA will not be installed (but note that the routing
+exception mentioned above may have already deleted potentially conflicting SAs).
+If another IPsec
+SA for the same connection already has an eroute, all its outgoing traffic
+is taken over by the new eroute. The incoming traffic will still be
+processed. This characteristic is exploited during rekeying.
+<P>
+
+All of these routing characteristics are expected change when
+<B>KLIPS</B> is modified to use the firewall hooks in the LINUX 2.4.x
+kernel.
+<A NAME="lbAL">&nbsp;</A>
+<H3>Using Whack</H3>
+
+<P>
+
+<B>whack</B> is used to command a running <B>pluto</B>.
+<B>whack</B> uses a UNIX domain socket to speak to <B>pluto</B>
+(by default, <I>/var/pluto.ctl</I>).
+<P>
+
+<B>whack</B> has an intricate argument syntax.
+This syntax allows many different functions to be specified.
+The help form shows the usage or version information.
+The connection form gives <B>pluto</B> a description of a potential connection.
+The public key form informs <B>pluto</B> of the RSA public key for a potential peer.
+The delete form deletes a connection description and all SAs corresponding
+to it.
+The listen form tells <B>pluto</B> to start or stop listening on the public interfaces
+for IKE requests from peers.
+The route form tells <B>pluto</B> to set up routing for a connection;
+the unroute form undoes this.
+The initiate form tells <B>pluto</B> to negotiate an SA corresponding to a connection.
+The terminate form tells <B>pluto</B> to remove all SAs corresponding to a connection,
+including those being negotiated.
+The status form displays the <B>pluto</B>'s internal state.
+The debug form tells <B>pluto</B> to change the selection of debugging output
+``on the fly''. The shutdown form tells
+<B>pluto</B> to shut down, deleting all SAs.
+<P>
+
+Most options are specific to one of the forms, and will be described
+with that form. There are three options that apply to all forms.
+<DL COMPACT>
+<DT><B>--ctlbase</B>&nbsp;<I>path</I><DD>
+<I>path</I>.ctl is used as the UNIX domain socket for talking
+to <B>pluto</B>.
+This option facilitates debugging.
+<DT><B>--optionsfrom</B>&nbsp;<I>filename</I><DD>
+adds the contents of the file to the argument list.
+<DT><B>--label</B>&nbsp;<I>string</I><DD>
+adds the string to all error messages generated by <B>whack</B>.
+</DL>
+<P>
+
+The help form of <B>whack</B> is self-explanatory.
+<DL COMPACT>
+<DT><B>--help</B><DD>
+display the usage message.
+<DT><B>--version</B><DD>
+display the version of <B>whack</B>.
+</DL>
+<P>
+
+The connection form describes a potential connection to <B>pluto</B>.
+<B>pluto</B> needs to know what connections can and should be negotiated.
+When <B>pluto</B> is the initiator, it needs to know what to propose.
+When <B>pluto</B> is the responder, it needs to know enough to decide whether
+is is willing to set up the proposed connection.
+<P>
+
+The description of a potential connection can specify a large number
+of details. Each connection has a unique name. This name will appear
+in a updown shell command, so it should not contain punctuation
+that would make the command ill-formed.
+<DL COMPACT>
+<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
+</DL>
+<P>
+
+The topology of
+a connection is symmetric, so to save space here is half a picture:
+<P>
+&nbsp;&nbsp;&nbsp;client_subnet&lt;--&gt;host:ikeport&lt;--&gt;nexthop&lt;---
+<P>
+A similar trick is used in the flags. The same flag names are used for
+both ends. Those before the <B>--to</B> flag describe the left side
+and those afterwards describe the right side. When <B>pluto</B> attempts
+to use the connection, it decides whether it is the left side or the right
+side of the connection, based on the IP numbers of its interfaces.
+<DL COMPACT>
+<DT><B>--id</B>&nbsp;<I>id</I><DD>
+the identity of the end. Currently, this can be an IP address (specified
+as dotted quad or as a Fully Qualified Domain Name, which will be resolved
+immediately) or as a Fully Qualified Domain Name itself (prefixed by ``@''
+to signify that it should not be resolved), or as <A HREF="mailto:user@FQDN">user@FQDN</A>, or as the
+magic value <B>%myid</B>.
+<B>Pluto</B> only authenticates the identity, and does not use it for
+addressing, so, for example, an IP address need not be the one to which
+packets are to be sent. If the option is absent, the
+identity defaults to the IP address specified by <B>--host</B>.
+<B>%myid</B> allows the identity to be separately specified (by the <B>pluto</B> or <B>whack</B> option <B>--myid</B>
+or by the <B><A HREF="ipsec.conf.5.html">ipsec.conf</A></B>(5) <B>config setup</B> parameter myid).
+Otherwise, <B>pluto</B> tries to guess what <B>%myid</B> should stand for:
+the IP address of <B>%defaultroute</B>, if it is supported by a suitable TXT record in the reverse domain for that IP address,
+or the system's hostname, if it is supported by a suitable TXT record in its forward domain.
+
+<DT><B>--host</B>&nbsp;<I>ip-address</I><DD>
+<DT><B>--host</B>&nbsp;<B>%any</B><DD>
+<DT><B>--host</B>&nbsp;<B>%opportunistic</B><DD>
+the IP address of the end (generally the public interface).
+If <B>pluto</B> is to act as a responder
+for IKE negotiations initiated from unknown IP addresses (the
+``Road Warrior'' case), the
+IP address should be specified as <B>%any</B> (currently,
+the obsolete notation <B>0.0.0.0</B> is also accepted for this).
+If <B>pluto</B> is to opportunistically initiate the connection,
+use <B>%opportunistic</B>
+<DT><B>--ikeport</B>&nbsp;<I>port-number</I><DD>
+the UDP port that IKE listens to on that host. The default is 500.
+(<B>pluto</B> on this machine uses the port specified by its own command
+line argument, so this only affects where <B>pluto</B> sends messages.)
+<DT><B>--nexthop</B>&nbsp;<I>ip-address</I><DD>
+where to route packets for the peer's client (presumably for the peer too,
+but it will not be used for this).
+When <B>pluto</B> installs an IPsec SA, it issues a route command.
+It uses the nexthop as the gateway.
+The default is the peer's IP address (this can be explicitly written as
+<B>%direct</B>; the obsolete notation <B>0.0.0.0</B> is accepted).
+This option is necessary if <B>pluto</B>'s host's interface used for sending
+packets to the peer is neither point-to-point nor directly connected to the
+peer.
+<DT><B>--client</B>&nbsp;<I>subnet</I><DD>
+the subnet for which the IPsec traffic will be destined. If not specified,
+the host will be the client.
+The subnet can be specified in any of the forms supported by <I><A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A></I>(3).
+The general form is <I>address</I>/<I>mask</I>. The <I>address</I> can be either
+a domain name or four decimal numbers (specifying octets) separated by dots.
+The most convenient form of the <I>mask</I> is a decimal integer, specifying
+the number of leading one bits in the mask. So, for example, 10.0.0.0/8
+would specify the class A network ``Net 10''.
+<DT><B>--dnskeyondemand]</B><DD>
+specifies that when an RSA public key is needed to authenticate this
+host, and it isn't already known, fetch it from DNS.
+<DT><B>--updown</B>&nbsp;<I>updown</I><DD>
+specifies an external shell command to be run whenever <B>pluto</B>
+brings up or down a connection.
+The script is used to build a shell command, so it may contain positional
+parameters, but ought not to have punctuation that would cause the
+resulting command to be ill-formed.
+The default is <I>ipsec _updown</I>.
+<DT><B>--to</B><DD>
+separates the specification of the left and right ends of the connection.
+</DL>
+<P>
+
+The potential connection description also specifies characteristics of
+rekeying and security.
+<DL COMPACT>
+<DT><B>--psk</B><DD>
+Propose and allow preshared secret authentication for IKE peers. This authentication
+requires that each side use the same secret. May be combined with <B>--rsasig</B>;
+at least one must be specified.
+<DT><B>--rsasig</B><DD>
+Propose and allow RSA signatures for authentication of IKE peers. This authentication
+requires that each side have have a private key of its own and know the
+public key of its peer. May be combined with <B>--psk</B>;
+at least one must be specified.
+<DT><B>--encrypt</B><DD>
+All proposed or accepted IPsec SAs will include non-null ESP.
+The actual choices of transforms are wired into <B>pluto</B>.
+<DT><B>--authenticate</B><DD>
+All proposed IPsec SAs will include AH.
+All accepted IPsec SAs will include AH or ESP with authentication.
+The actual choices of transforms are wired into <B>pluto</B>.
+Note that this has nothing to do with IKE authentication.
+<DT><B>--compress</B><DD>
+All proposed IPsec SAs will include IPCOMP (compression).
+This will be ignored if KLIPS is not configured with IPCOMP support.
+<DT><B>--tunnel</B><DD>
+the IPsec SA should use tunneling. Implicit if the SA is for clients.
+Must only be used with <B>--authenticate</B> or <B>--encrypt</B>.
+<DT><B>--ipv4</B><DD>
+The host addresses will be interpreted as IPv4 addresses. This is the
+default. Note that for a connection, all host addresses must be of
+the same Address Family (IPv4 and IPv6 use different Address Families).
+<DT><B>--ipv6</B><DD>
+The host addresses (including nexthop) will be interpreted as IPv6 addresses.
+Note that for a connection, all host addresses must be of
+the same Address Family (IPv4 and IPv6 use different Address Families).
+<DT><B>--tunnelipv4</B><DD>
+The client addresses will be interpreted as IPv4 addresses. The default is
+to match what the host will be. This does not imply <B>--tunnel</B> so the
+flag can be safely used when no tunnel is actually specified.
+Note that for a connection, all tunnel addresses must be of the same
+Address Family.
+<DT><B>--tunnelipv6</B><DD>
+The client addresses will be interpreted as IPv6 addresses. The default is
+to match what the host will be. This does not imply <B>--tunnel</B> so the
+flag can be safely used when no tunnel is actually specified.
+Note that for a connection, all tunnel addresses must be of the same
+Address Family.
+<DT><B>--pfs</B><DD>
+There should be Perfect Forward Secrecy - new keying material will
+be generated for each IPsec SA rather than being derived from the ISAKMP
+SA keying material.
+Since the group to be used cannot be negotiated (a dubious feature of the
+standard), <B>pluto</B> will propose the same group that was used during Phase 1.
+We don't implement a stronger form of PFS which would require that the
+ISAKMP SA be deleted after the IPSEC SA is negotiated.
+<DT><B>--disablearrivalcheck</B><DD>
+If the connection is a tunnel, allow packets arriving through the tunnel
+to have any source and destination addresses.
+</DL>
+<P>
+
+If none of the <B>--encrypt</B>, <B>--authenticate</B>, <B>--compress</B>,
+or <B>--pfs</B> flags is given, the initiating the connection will
+only build an ISAKMP SA. For such a connection, client subnets have
+no meaning and must not be specified.
+<P>
+
+More work is needed to allow for flexible policies. Currently
+policy is hardwired in the source file spdb.c. The ISAKMP SAs may use
+Oakley groups MODP1024 and MODP1536; 3DES encryption; SHA1-96
+and MD5-96 authentication. The IPsec SAs may use 3DES and
+MD5-96 or SHA1-96 for ESP, or just MD5-96 or SHA1-96 for AH.
+IPCOMP Compression is always Deflate.
+<DL COMPACT>
+<DT><B>--ikelifetime</B>&nbsp;<I>seconds</I><DD>
+how long <B>pluto</B> will propose that an ISAKMP SA be allowed to live.
+The default is 3600 (one hour) and the maximum is 28800 (8 hours).
+This option will not affect what is accepted.
+<B>pluto</B> will reject proposals that exceed the maximum.
+<DT><B>--ipseclifetime</B>&nbsp;<I>seconds</I><DD>
+how long <B>pluto</B> will propose that an IPsec SA be allowed to live.
+The default is 28800 (eight hours) and the maximum is 86400 (one day).
+This option will not affect what is accepted.
+<B>pluto</B> will reject proposals that exceed the maximum.
+<DT><B>--rekeymargin</B>&nbsp;<I>seconds</I><DD>
+how long before an SA's expiration should <B>pluto</B> try to negotiate
+a replacement SA. This will only happen if <B>pluto</B> was the initiator.
+The default is 540 (nine minutes).
+<DT><B>--rekeyfuzz</B>&nbsp;<I>percentage</I><DD>
+maximum size of random component to add to rekeymargin, expressed as
+a percentage of rekeymargin. <B>pluto</B> will select a delay uniformly
+distributed within this range. By default, the percentage will be 100.
+If greater determinism is desired, specify 0. It may be appropriate
+for the percentage to be much larger than 100.
+<DT><B>--keyingtries</B>&nbsp;<I>count</I><DD>
+how many times <B>pluto</B> should try to negotiate an SA,
+either for the first time or for rekeying.
+A value of 0 is interpreted as a very large number: never give up.
+The default is three.
+<DT><B>--dontrekey</B><DD>
+A misnomer.
+Only rekey a connection if we were the Initiator and there was recent
+traffic on the existing connection.
+This applies to Phase 1 and Phase 2.
+This is currently the only automatic way for a connection to terminate.
+It may be useful with Road Warrior or Opportunistic connections.
+<BR>
+
+Since SA lifetime negotiation is take-it-or-leave it, a Responder
+normally uses the shorter of the negotiated or the configured lifetime.
+This only works because if the lifetime is shorter than negotiated,
+the Responder will rekey in time so that everything works.
+This interacts badly with <B>--dontrekey</B>. In this case,
+the Responder will end up rekeying to rectify a shortfall in an IPsec SA
+lifetime; for an ISAKMP SA, the Responder will accept the negotiated
+lifetime.
+<DT><B>--delete</B><DD>
+when used in the connection form, it causes any previous connection
+with this name to be deleted before this one is added. Unlike a
+normal delete, no diagnostic is produced if there was no previous
+connection to delete. Any routing in place for the connection is undone.
+</DL>
+<P>
+
+The delete form deletes a named connection description and any
+SAs established or negotiations initiated using this connection.
+Any routing in place for the connection is undone.
+<DL COMPACT>
+<DT><B>--delete</B><DD>
+<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
+</DL>
+<P>
+
+The deletestate form deletes the state object with the specified serial number.
+This is useful for selectively deleting instances of connections.
+<DL COMPACT>
+<DT><B>--deletestate</B>&nbsp;<I>state-number</I><DD>
+</DL>
+<P>
+
+The route form of the <B>whack</B> command tells <B>pluto</B> to set up
+routing for a connection.
+Although like a traditional route, it uses an ipsec device as a
+virtual interface.
+Once routing is set up, no packets will be
+sent ``in the clear'' to the peer's client specified in the connection.
+A TRAP shunt eroute will be installed; if outbound traffic is caught,
+Pluto will initiate the connection.
+An explicit <B>whack</B> route is not always needed: if it hasn't been
+done when an IPsec SA is being installed, one will be automatically attempted.
+<P>
+
+When a routing is attempted for a connection, there must not already
+be a routing for a different connection with the same subnet but different
+interface or destination, or if
+there is, it must not be being used by an IPsec SA. Otherwise the
+attempt will fail.
+<DL COMPACT>
+<DT><B>--route</B><DD>
+<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
+</DL>
+<P>
+
+The unroute form of the <B>whack</B> command tells <B>pluto</B> to undo
+a routing. <B>pluto</B> will refuse if an IPsec SA is using the connection.
+If another connection is sharing the same routing, it will be left in place.
+Without a routing, packets will be sent without encryption or authentication.
+<DL COMPACT>
+<DT><B>--unroute</B><DD>
+<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
+</DL>
+<P>
+
+The initiate form tells <B>pluto</B> to initiate a negotiation with another
+<B>pluto</B> (or other IKE daemon) according to the named connection.
+Initiation requires a route that <B>--route</B> would provide;
+if none is in place at the time an IPsec SA is being installed,
+<B>pluto</B> attempts to set one up.
+<DL COMPACT>
+<DT><B>--initiate</B><DD>
+<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
+<DT><B>--asynchronous<DD>
+</DL>
+<P>
+
+The initiate form of the whack</B> command will relay back from
+<B>pluto</B> status information via the UNIX domain socket (unless
+--asynchronous is specified). The status information is meant to
+look a bit like that from <B>FTP</B>. Currently <B>whack</B> simply
+copies this to stderr. When the request is finished (eg. the SAs are
+established or <B>pluto</B> gives up), <B>pluto</B> closes the channel,
+causing <B>whack</B> to terminate.
+<P>
+
+The opportunistic initiate form is mainly used for debugging.
+<DL COMPACT>
+<DT><B>--tunnelipv4</B><DD>
+<DT><B>--tunnelipv6</B><DD>
+<DT><B>--oppohere</B>&nbsp;<I>ip-address</I><DD>
+<DT><B>--oppothere</B>&nbsp;<I>ip-address</I><DD>
+</DL>
+<P>
+
+This will cause <B>pluto</B> to attempt to opportunistically initiate a
+connection from here to the there, even if a previous attempt
+had been made.
+The whack log will show the progress of this attempt.
+<P>
+
+The terminate form tells <B>pluto</B> to delete any SAs that use the specified
+connection and to stop any negotiations in process.
+It does not prevent new negotiations from starting (the delete form
+has this effect).
+<DL COMPACT>
+<DT><B>--terminate</B><DD>
+<DT><B>--name</B>&nbsp;<I>connection-name</I><DD>
+</DL>
+<P>
+
+The public key for informs <B>pluto</B> of the RSA public key for a potential peer.
+Private keys must be kept secret, so they are kept in
+<I><A HREF="ipsec.secrets.5.html">ipsec.secrets</A></I>(5).
+
+<DL COMPACT>
+<DT><B>--keyid&nbsp;</B><I>id</I><DD>
+specififies the identity of the peer for which a public key should be used.
+Its form is identical to the identity in the connection.
+If no public key is specified, <B>pluto</B> attempts to find KEY records
+from DNS for the id (if a FQDN) or through reverse lookup (if an IP address).
+Note that there several interesting ways in which this is not secure.
+<DT><B>--addkey</B><DD>
+specifies that the new key is added to the collection; otherwise the
+new key replaces any old ones.
+<DT><B>--pubkeyrsa&nbsp;</B><I>key</I><DD>
+specifies the value of the RSA public key. It is a sequence of bytes
+as described in RFC 2537 ``RSA/MD5 KEYs and SIGs in the Domain Name System (DNS)''.
+It is denoted in a way suitable for <I><A HREF="ipsec_ttodata.3.html">ipsec_ttodata</A></I>(3).
+For example, a base 64 numeral starts with 0s.
+</DL>
+<P>
+
+The listen form tells <B>pluto</B> to start listening for IKE requests
+on its public interfaces. To avoid race conditions, it is normal to
+load the appropriate connections into <B>pluto</B> before allowing it
+to listen. If <B>pluto</B> isn't listening, it is pointless to
+initiate negotiations, so it will refuse requests to do so. Whenever
+the listen form is used, <B>pluto</B> looks for public interfaces and
+will notice when new ones have been added and when old ones have been
+removed. This is also the trigger for <B>pluto</B> to read the
+<I>ipsec.secrets</I> file. So listen may useful more than once.
+<DL COMPACT>
+<DT><B>--listen</B><DD>
+start listening for IKE traffic on public interfaces.
+<DT><B>--unlisten</B><DD>
+stop listening for IKE traffic on public interfaces.
+</DL>
+<P>
+
+The status form will display information about the internal state of
+<B>pluto</B>: information about each potential connection, about
+each state object, and about each shunt that <B>pluto</B> is managing
+without an associated connection.
+<DL COMPACT>
+<DT><B>--status</B><DD>
+</DL>
+<P>
+
+The shutdown form is the proper way to shut down <B>pluto</B>.
+It will tear down the SAs on this machine that <B>pluto</B> has negotiated.
+It does not inform its peers, so the SAs on their machines remain.
+<DL COMPACT>
+<DT><B>--shutdown</B><DD>
+</DL>
+<A NAME="lbAM">&nbsp;</A>
+<H3>Examples</H3>
+
+<P>
+
+It would be normal to start <B>pluto</B> in one of the system initialization
+scripts. It needs to be run by the superuser. Generally, no arguments are needed.
+To run in manually, the superuser can simply type
+<P>
+&nbsp;&nbsp;&nbsp;ipsec pluto
+<P>
+The command will immediately return, but a <B>pluto</B> process will be left
+running, waiting for requests from <B>whack</B> or a peer.
+<P>
+
+Using <B>whack</B>, several potential connections would be described:
+<DL COMPACT>
+<DT>
+
+&nbsp;&nbsp;&nbsp;ipsec whack --name&nbsp;silly
+--host&nbsp;127.0.0.1 --to --host&nbsp;127.0.0.2
+--ikelifetime&nbsp;900 --ipseclifetime&nbsp;800 --keyingtries&nbsp;3
+
+</DL>
+<P>
+
+<DD>Since this silly connection description specifies neither encryption,
+authentication, nor tunneling, it could only be used to establish
+an ISAKMP SA.
+<DL COMPACT>
+<DT>
+
+&nbsp;&nbsp;&nbsp;ipsec whack --name&nbsp;secret --host&nbsp;10.0.0.1 --client&nbsp;10.0.1.0/24
+--to --host&nbsp;10.0.0.2 --client&nbsp;10.0.2.0/24
+--encrypt
+
+</DL>
+<P>
+
+<DD>This is something that must be done on both sides. If the other
+side is <B>pluto</B>, the same <B>whack</B> command could be used on it
+(the command syntax is designed to not distinguish which end is ours).
+<P>
+
+Now that the connections are specified, <B>pluto</B> is ready to handle
+requests and replies via the public interfaces. We must tell it to discover
+those interfaces and start accepting messages from peers:
+<P>
+&nbsp;&nbsp;&nbsp;ipsec whack --listen
+<P>
+
+If we don't immediately wish to bring up a secure connection between
+the two clients, we might wish to prevent insecure traffic.
+The routing form asks <B>pluto</B> to cause the packets sent from
+our client to the peer's client to be routed through the ipsec0
+device; if there is no SA, they will be discarded:
+<P>
+&nbsp;&nbsp;&nbsp;ipsec whack --route secret
+<P>
+
+Finally, we are ready to get <B>pluto</B> to initiate negotiation
+for an IPsec SA (and implicitly, an ISAKMP SA):
+<P>
+&nbsp;&nbsp;&nbsp;ipsec whack --initiate&nbsp;--name&nbsp;secret
+<P>
+A small log of interesting events will appear on standard output
+(other logging is sent to syslog).
+<P>
+
+<B>whack</B> can also be used to terminate <B>pluto</B> cleanly, tearing down
+all SAs that it has negotiated.
+<P>
+&nbsp;&nbsp;&nbsp;ipsec whack --shutdown
+<P>
+Notification of any IPSEC SA deletion, but not ISAKMP SA deletion
+is sent to the peer. Unfortunately, such Notification is not reliable.
+Furthermore, <B>pluto</B> itself ignores Notifications.
+<A NAME="lbAN">&nbsp;</A>
+<H3>The updown command</H3>
+
+<P>
+
+Whenever <B>pluto</B> brings a connection up or down, it invokes
+the updown command. This command is specified using the <B>--updown</B>
+option. This allows for customized control over routing and firewall manipulation.
+<P>
+
+The updown is invoked for five different operations. Each of
+these operations can be for our client subnet or for our host itself.
+<DL COMPACT>
+<DT><B>prepare-host</B> or <B>prepare-client</B><DD>
+is run before bringing up a new connection if no other connection
+with the same clients is up. Generally, this is useful for deleting a
+route that might have been set up before <B>pluto</B> was run or
+perhaps by some agent not known to <B>pluto</B>.
+<DT><B>route-host</B> or <B>route-client</B><DD>
+is run when bringing up a connection for a new peer client subnet
+(even if <B>prepare-host</B> or <B>prepare-client</B> was run). The
+command should install a suitable route. Routing decisions are based
+only on the destination (peer's client) subnet address, unlike eroutes
+which discriminate based on source too.
+<DT><B>unroute-host</B> or <B>unroute-client</B><DD>
+is run when bringing down the last connection for a particular peer
+client subnet. It should undo what the <B>route-host</B> or <B>route-client</B>
+did.
+<DT><B>up-host</B> or <B>up-client</B><DD>
+is run when bringing up a tunnel eroute with a pair of client subnets
+that does not already have a tunnel eroute.
+This command should install firewall rules as appropriate.
+It is generally a good idea to allow IKE messages (UDP port 500)
+travel between the hosts.
+<DT><B>down-host</B> or <B>down-client</B><DD>
+is run when bringing down the eroute for a pair of client subnets.
+This command should delete firewall rules as appropriate. Note that
+there may remain some inbound IPsec SAs with these client subnets.
+</DL>
+<P>
+
+The script is passed a large number of environment variables to specify
+what needs to be done.
+<DL COMPACT>
+<DT><B>PLUTO_VERSION</B><DD>
+indicates what version of this interface is being used. This document
+describes version 1.1. This is upwardly compatible with version 1.0.
+<DT><B>PLUTO_VERB</B><DD>
+specifies the name of the operation to be performed
+(<B>prepare-host</B>,r <B>prepare-client</B>,
+<B>up-host</B>, <B>up-client</B>,
+<B>down-host</B>, or <B>down-client</B>). If the address family for
+security gateway to security gateway communications is IPv6, then
+a suffix of -v6 is added to the verb.
+<DT><B>PLUTO_CONNECTION</B><DD>
+is the name of the connection for which we are routing.
+<DT><B>PLUTO_NEXT_HOP</B><DD>
+is the next hop to which packets bound for the peer must be sent.
+<DT><B>PLUTO_INTERFACE</B><DD>
+is the name of the ipsec interface to be used.
+<DT><B>PLUTO_ME</B><DD>
+is the IP address of our host.
+<DT><B>PLUTO_MY_CLIENT</B><DD>
+is the IP address / count of our client subnet.
+If the client is just the host, this will be the host's own IP address / max
+(where max is 32 for IPv4 and 128 for IPv6).
+<DT><B>PLUTO_MY_CLIENT_NET</B><DD>
+is the IP address of our client net.
+If the client is just the host, this will be the host's own IP address.
+<DT><B>PLUTO_MY_CLIENT_MASK</B><DD>
+is the mask for our client net.
+If the client is just the host, this will be 255.255.255.255.
+<DT><B>PLUTO_PEER</B><DD>
+is the IP address of our peer.
+<DT><B>PLUTO_PEER_CLIENT</B><DD>
+is the IP address / count of the peer's client subnet.
+If the client is just the peer, this will be the peer's own IP address / max
+(where max is 32 for IPv4 and 128 for IPv6).
+<DT><B>PLUTO_PEER_CLIENT_NET</B><DD>
+is the IP address of the peer's client net.
+If the client is just the peer, this will be the peer's own IP address.
+<DT><B>PLUTO_PEER_CLIENT_MASK</B><DD>
+is the mask for the peer's client net.
+If the client is just the peer, this will be 255.255.255.255.
+</DL>
+<P>
+
+All output sent by the script to stderr or stdout is logged. The
+script should return an exit status of 0 if and only if it succeeds.
+<P>
+
+<B>Pluto</B> waits for the script to finish and will not do any other
+processing while it is waiting.
+The script may assume that <B>pluto</B> will not change anything
+while the script runs.
+The script should avoid doing anything that takes much time and it
+should not issue any command that requires processing by <B>pluto</B>.
+Either of these activities could be performed by a background
+subprocess of the script.
+<A NAME="lbAO">&nbsp;</A>
+<H3>Rekeying</H3>
+
+<P>
+
+When an SA that was initiated by <B>pluto</B> has only a bit of
+lifetime left,
+<B>pluto</B> will initiate the creation of a new SA. This applies to
+ISAKMP and IPsec SAs.
+The rekeying will be initiated when the SA's remaining lifetime is
+less than the rekeymargin plus a random percentage, between 0 and
+rekeyfuzz, of the rekeymargin.
+<P>
+
+Similarly, when an SA that was initiated by the peer has only a bit of
+lifetime left, <B>pluto</B> will try to initiate the creation of a
+replacement.
+To give preference to the initiator, this rekeying will only be initiated
+when the SA's remaining lifetime is half of rekeymargin.
+If rekeying is done by the responder, the roles will be reversed: the
+responder for the old SA will be the initiator for the replacement.
+The former initiator might also initiate rekeying, so there may
+be redundant SAs created.
+To avoid these complications, make sure that rekeymargin is generous.
+<P>
+
+One risk of having the former responder initiate is that perhaps
+none of its proposals is acceptable to the former initiator
+(they have not been used in a successful negotiation).
+To reduce the chances of this happening, and to prevent loss of security,
+the policy settings are taken from the old SA (this is the case even if
+the former initiator is initiating).
+These may be stricter than those of the connection.
+<P>
+
+<B>pluto</B> will not rekey an SA if that SA is not the most recent of its
+type (IPsec or ISAKMP) for its potential connection.
+This avoids creating redundant SAs.
+<P>
+
+The random component in the rekeying time (rekeyfuzz) is intended to
+make certain pathological patterns of rekeying unstable. If both
+sides decide to rekey at the same time, twice as many SAs as necessary
+are created. This could become a stable pattern without the
+randomness.
+<P>
+
+Another more important case occurs when a security gateway has SAs
+with many other security gateways. Each of these connections might
+need to be rekeyed at the same time. This would cause a high peek
+requirement for resources (network bandwidth, CPU time, entropy for
+random numbers). The rekeyfuzz can be used to stagger the rekeying
+times.
+<P>
+
+Once a new set of SAs has been negotiated, <B>pluto</B> will never send
+traffic on a superseded one. Traffic will be accepted on an old SA
+until it expires.
+<A NAME="lbAP">&nbsp;</A>
+<H3>Selecting a Connection When Responding: Road Warrior Support</H3>
+
+<P>
+
+When <B>pluto</B> receives an initial Main Mode message, it needs to
+decide which connection this message is for. It picks based solely on
+the source and destination IP addresses of the message. There might
+be several connections with suitable IP addresses, in which case one
+of them is arbitrarily chosen. (The ISAKMP SA proposal contained in
+the message could be taken into account, but it is not.)
+<P>
+
+The ISAKMP SA is negotiated before the parties pass further
+identifying information, so all ISAKMP SA characteristics specified in
+the connection description should be the same for every connection
+with the same two host IP addresses. At the moment, the only
+characteristic that might differ is authentication method.
+<P>
+
+Up to this point,
+all configuring has presumed that the IP addresses
+are known to all parties ahead of time. This will not work
+when either end is mobile (or assigned a dynamic IP address for other
+reasons). We call this situation ``Road Warrior''. It is fairly tricky
+and has some important limitations, most of which are features of
+the IKE protocol.
+<P>
+
+Only the initiator may be mobile:
+the initiator may have an IP number unknown to the responder. When
+the responder doesn't recognize the IP address on the first Main Mode
+packet, it looks for a connection with itself as one end and <B>%any</B>
+as the other.
+If it cannot find one, it refuses to negotiate. If it
+does find one, it creates a temporary connection that is a duplicate
+except with the <B>%any</B> replaced by the source IP address from the
+packet; if there was no identity specified for the peer, the new IP
+address will be used.
+<P>
+
+When <B>pluto</B> is using one of these temporary connections and
+needs to find the preshared secret or RSA private key in <I>ipsec.secrets</I>,
+and and the connection specified no identity for the peer, <B>%any</B>
+is used as its identity. After all, the real IP address was apparently
+unknown to the configuration, so it is unreasonable to require that
+it be used in this table.
+<P>
+
+Part way into the Phase 1 (Main Mode) negotiation using one of these
+temporary connection descriptions, <B>pluto</B> will be receive an
+Identity Payload. At this point, <B>pluto</B> checks for a more
+appropriate connection, one with an identity for the peer that matches
+the payload but which would use the same keys so-far used for
+authentication. If it finds one, it will switch to using this better
+connection (or a temporary derived from this, if it has <B>%any</B>
+for the peer's IP address). It may even turn out that no connection
+matches the newly discovered identity, including the current connection;
+if so, <B>pluto</B> terminates negotiation.
+<P>
+
+Unfortunately, if preshared secret authentication is being used, the
+Identity Payload is encrypted using this secret, so the secret must be
+selected by the responder without knowing this payload. This
+limits there to being at most one preshared secret for all Road Warrior
+systems connecting to a host. RSA Signature authentications does not
+require that the responder know how to select the initiator's public key
+until after the initiator's Identity Payload is decoded (using the
+responder's private key, so that must be preselected).
+<P>
+
+When <B>pluto</B> is responding to a Quick Mode negotiation via one of these
+temporary connection descriptions, it may well find that the subnets
+specified by the initiator don't match those in the temporary
+connection description. If so, it will look for a connection with
+matching subnets, its own host address, a peer address of <B>%any</B>
+and matching identities.
+If it finds one, a new temporary connection is derived from this one
+and used for the Quick Mode negotiation of IPsec SAs. If it does not
+find one, <B>pluto</B> terminates negotiation.
+<P>
+
+Be sure to specify an appropriate nexthop for the responder
+to send a message to the initiator: <B>pluto</B> has no way of guessing
+it (if forwarding isn't required, use an explicit <B>%direct</B> as the nexthop
+and the IP address of the initiator will be filled in; the obsolete
+notation <B>0.0.0.0</B> is still accepted).
+<P>
+
+<B>pluto</B> has no special provision for the initiator side. The current
+(possibly dynamic) IP address and nexthop must be used in defining
+connections. These must be
+properly configured each time the initiator's IP address changes.
+<B>pluto</B> has no mechanism to do this automatically.
+<P>
+
+Although we call this Road Warrior Support, it could also be used to
+support encrypted connections with anonymous initiators. The
+responder's organization could announce the preshared secret that would be used
+with unrecognized initiators and let anyone connect. Of course the initiator's
+identity would not be authenticated.
+<P>
+
+If any Road Warrior connections are supported, <B>pluto</B> cannot
+reject an exchange initiated by an unknown host until it has
+determined that the secret is not shared or the signature is invalid.
+This must await the
+third Main Mode message from the initiator. If no Road Warrior
+connection is supported, the first message from an unknown source
+would be rejected. This has implications for ease of debugging
+configurations and for denial of service attacks.
+<P>
+
+Although a Road Warrior connection must be initiated by the mobile
+side, the other side can and will rekey using the temporary connection
+it has created. If the Road Warrior wishes to be able to disconnect,
+it is probably wise to set <B>--keyingtries</B> to 1 in the
+connection on the non-mobile side to prevent it trying to rekey the
+connection. Unfortunately, there is no mechanism to unroute the
+connection automatically.
+<A NAME="lbAQ">&nbsp;</A>
+<H3>Debugging</H3>
+
+<P>
+
+<B>pluto</B> accepts several optional arguments, useful mostly for debugging.
+Except for <B>--interface</B>, each should appear at most once.
+<DL COMPACT>
+<DT><B>--interface</B> <I>interfacename</I><DD>
+specifies that the named real public network interface should be considered.
+The interface name specified should not be <B>ipsec</B><I>N</I>.
+If the option doesn't appear, all interfaces are considered.
+To specify several interfaces, use the option once for each.
+One use of this option is to specify which interface should be used
+when two or more share the same IP address.
+<DT><B>--ikeport</B> <I>port-number</I><DD>
+changes the UDP port that <B>pluto</B> will use
+(default, specified by IANA: 500)
+<DT><B>--ctlbase</B> <I>path</I><DD>
+basename for control files.
+<I>path</I>.ctl is the socket through which <B>whack</B> communicates with
+<B>pluto</B>.
+<I>path</I>.pid is the lockfile to prevent multiple <B>pluto</B> instances.
+The default is <I>/var/run/pluto</I>).
+<DT><B>--secretsfile</B> <I>file</I><DD>
+specifies the file for authentication secrets
+(default: <I>/etc/ipsec.secrets</I>).
+This name is subject to ``globbing'' as in <I><A HREF="sh.1.html">sh</A></I>(1),
+so every file with a matching name is processed.
+Quoting is generally needed to prevent the shell from doing the globbing.
+<DT><B>--adns</B> <I>pathname</I><DD>
+<DT><B>--lwdnsq</B> <I>pathname</I><DD>
+specifies where to find <B>pluto</B>'s helper program for asynchronous DNS lookup.
+<B>pluto</B> can be built to use one of two helper programs: <B>_pluto_adns</B>
+or <B>lwdnsq</B>. You must use the program for which it was built.
+By default, <B>pluto</B> will look for the program in
+<B>$IPSEC_DIR</B> (if that environment variable is defined) or, failing that,
+in the same directory as <B>pluto</B>.
+<DT><B>--nofork</B><DD>
+disable ``daemon fork'' (default is to fork). In addition, after the
+lock file and control socket are created, print the line ``Pluto
+initialized'' to standard out.
+<DT><B>--noklips</B><DD>
+don't actually implement negotiated IPsec SAs
+<DT><B>--uniqueids</B><DD>
+if this option has been selected, whenever a new ISAKMP SA is
+established, any connection with the same Peer ID but a different
+Peer IP address is unoriented (causing all its SAs to be deleted).
+This helps clean up dangling SAs when a connection is lost and
+then regained at another IP address.
+<DT><B>--stderrlog</B><DD>
+log goes to standard out {default is to use <I><A HREF="syslogd.8.html">syslogd</A></I>(8))
+</DL>
+<P>
+
+For example
+<DL COMPACT>
+<DT>pluto --secretsfile&nbsp;ipsec.secrets --ctlbase&nbsp;pluto.base --ikeport&nbsp;8500 --nofork --noklips --stderrlog<DD>
+</DL>
+<P>
+
+lets one test <B>pluto</B> without using the superuser account.
+<P>
+
+<B>pluto</B> is willing to produce a prodigious amount of debugging
+information. To do so, it must be compiled with -DDEBUG. There are
+several classes of debugging output, and <B>pluto</B> may be directed to
+produce a selection of them. All lines of
+debugging output are prefixed with ``|&nbsp;'' to distinguish them from error
+messages.
+<P>
+
+When <B>pluto</B> is invoked, it may be given arguments to specify
+which classes to output. The current options are:
+<DL COMPACT>
+<DT><B>--debug-raw</B><DD>
+show the raw bytes of messages
+<DT><B>--debug-crypt</B><DD>
+show the encryption and decryption of messages
+<DT><B>--debug-parsing</B><DD>
+show the structure of input messages
+<DT><B>--debug-emitting</B><DD>
+show the structure of output messages
+<DT><B>--debug-control</B><DD>
+show <B>pluto</B>'s decision making
+<DT><B>--debug-lifecycle</B><DD>
+[this option is temporary] log more detail of lifecycle of SAs
+<DT><B>--debug-klips</B><DD>
+show <B>pluto</B>'s interaction with <B>KLIPS</B>
+<DT><B>--debug-dns</B><DD>
+show <B>pluto</B>'s interaction with <B>DNS</B> for KEY and TXT records
+<DT><B>--debug-oppo</B><DD>
+show why <B>pluto</B> didn't find a suitable DNS TXT record to authorize opportunistic initiation
+<DT><B>--debug-all</B><DD>
+all of the above
+<DT><B>--debug-private</B><DD>
+allow debugging output with private keys.
+<DT><B>--debug-none</B><DD>
+none of the above
+</DL>
+<P>
+
+The debug form of the
+<B>whack</B> command will change the selection in a running
+<B>pluto</B>.
+If a connection name is specified, the flags are added whenever
+<B>pluto</B> has identified that it is dealing with that connection.
+Unfortunately, this is often part way into the operation being observed.
+<P>
+
+For example, to start a <B>pluto</B> with a display of the structure of input
+and output:
+<DL COMPACT>
+<DT><DD>
+pluto --debug-emitting --debug-parsing
+</DL>
+<P>
+
+To later change this <B>pluto</B> to only display raw bytes:
+<DL COMPACT>
+<DT><DD>
+whack --debug-raw
+</DL>
+<P>
+
+For testing, SSH's IKE test page is quite useful:
+<DL COMPACT>
+<DT><DD>
+<I><A HREF="http://isakmp-test.ssh.fi/">http://isakmp-test.ssh.fi/</A></I>
+</DL>
+<P>
+
+Hint: ISAKMP SAs are often kept alive by IKEs even after the IPsec SA
+is established. This allows future IPsec SA's to be negotiated
+directly. If one of the IKEs is restarted, the other may try to use
+the ISAKMP SA but the new IKE won't know about it. This can lead to
+much confusion. <B>pluto</B> is not yet smart enough to get out of such a
+mess.
+<A NAME="lbAR">&nbsp;</A>
+<H3>Pluto's Behaviour When Things Go Wrong</H3>
+
+<P>
+
+When <B>pluto</B> doesn't understand or accept a message, it just
+ignores the message. It is not yet capable of communicating the
+problem to the other IKE daemon (in the future it might use
+Notifications to accomplish this in many cases). It does log a diagnostic.
+<P>
+
+When <B>pluto</B> gets no response from a message, it resends the same
+message (a message will be sent at most three times). This is
+appropriate: UDP is unreliable.
+<P>
+
+When pluto gets a message that it has already seen, there are many
+cases when it notices and discards it. This too is appropriate for UDP.
+<P>
+
+Combine these three rules, and you can explain many apparently
+mysterious behaviours. In a <B>pluto</B> log, retrying isn't usually the
+interesting event. The critical thing is either earlier (<B>pluto</B>
+got a message which it didn't like and so ignored, so it was still
+awaiting an acceptable message and got impatient) or on the other
+system (<B>pluto</B> didn't send a reply because it wasn't happy with
+the previous message).
+<A NAME="lbAS">&nbsp;</A>
+<H3>Notes</H3>
+
+<P>
+
+If <B>pluto</B> is compiled without -DKLIPS, it negotiates Security
+Associations but never ask the kernel to put them in place and never
+makes routing changes. This allows <B>pluto</B> to be tested on systems
+without <B>KLIPS</B>, but makes it rather useless.
+<P>
+
+Each IPsec SA is assigned an SPI, a 32-bit number used to refer to the SA.
+The IKE protocol lets the destination of the SA choose the SPI.
+The range 0 to 0xFF is reserved for IANA.
+<B>Pluto</B> also avoids choosing an SPI in the range 0x100 to 0xFFF,
+leaving these SPIs free for manual keying.
+Remember that the peer, if not <B>pluto</B>, may well chose
+SPIs in this range.
+<A NAME="lbAT">&nbsp;</A>
+<H3>Policies</H3>
+
+<P>
+
+This catalogue of policies may be of use when trying to configure
+<B>Pluto</B> and another IKE implementation to interoperate.
+<P>
+
+In Phase 1, only Main Mode is supported. We are not sure that
+Aggressive Mode is secure. For one thing, it does not support
+identity protection. It may allow more severe Denial Of Service
+attacks.
+<P>
+
+No Informational Exchanges are supported. These are optional and
+since their delivery is not assured, they must not matter.
+It is the case that some IKE implementations won't interoperate
+without Informational Exchanges, but we feel they are broken.
+<P>
+
+No Informational Payloads are supported. These are optional, but
+useful. It is of concern that these payloads are not authenticated in
+Phase 1, nor in those Phase 2 messages authenticated with <A HREF="HASH.3.html">HASH</A>(3).
+<DL COMPACT>
+<DT>*<DD>
+Diffie Hellman Groups MODP 1024 and MODP 1536 (2 and 5)
+are supported.
+Group MODP768 (1) is not supported because it is too weak.
+<DT>*<DD>
+Host authetication can be done by RSA Signatures or Pre-Shared
+Secrets.
+<DT>*<DD>
+3DES CBC (Cypher Block Chaining mode) is the only encryption
+supported, both for ISAKMP SAs and IPSEC SAs.
+<DT>*<DD>
+MD5 and SHA1 hashing are supported for packet authentication in both
+kinds of SAs.
+<DT>*<DD>
+The ESP, AH, or AH plus ESP are supported. If, and only if, AH and
+ESP are combined, the ESP need not have its own authentication
+component. The selection is controlled by the --encrypt and
+--authenticate flags.
+<DT>*<DD>
+Each of these may be combined with IPCOMP Deflate compression,
+but only if the potential connection specifies compression and only
+if KLIPS is configured with IPCOMP support.
+<DT>*<DD>
+The IPSEC SAs may be tunnel or transport mode, where appropriate.
+The --tunnel flag controls this when <B>pluto</B> is initiating.
+<DT>*<DD>
+When responding to an ISAKMP SA proposal, the maximum acceptable
+lifetime is eight hours. The default is one hour. There is no
+minimum. The --ikelifetime flag controls this when <B>pluto</B>
+is initiating.
+<DT>*<DD>
+When responding to an IPSEC SA proposal, the maximum acceptable
+lifetime is one day. The default is eight hours. There is no
+minimum. The --ipseclifetime flag controls this when <B>pluto</B>
+is initiating.
+<DT>*<DD>
+PFS is acceptable, and will be proposed if the --pfs flag was
+specified. The DH group proposed will be the same as negotiated for
+Phase 1.
+</DL>
+<A NAME="lbAU">&nbsp;</A>
+<H2>SIGNALS</H2>
+
+<P>
+
+<B>Pluto</B> responds to <B>SIGHUP</B> by issuing a suggestion that ``<B>whack</B>
+--listen'' might have been intended.
+<P>
+
+<B>Pluto</B> exits when it recieves <B>SIGTERM</B>.
+<A NAME="lbAV">&nbsp;</A>
+<H2>EXIT STATUS</H2>
+
+<P>
+
+<B>pluto</B> normally forks a daemon process, so the exit status is
+normally a very preliminary result.
+<DL COMPACT>
+<DT>0<DD>
+means that all is OK so far.
+<DT>1<DD>
+means that something was wrong.
+<DT>10<DD>
+means that the lock file already exists.
+</DL>
+<P>
+
+If <B>whack</B> detects a problem, it will return an exit status of 1.
+If it received progress messages from <B>pluto</B>, it returns as status
+the value of the numeric prefix from the last such message
+that was not a message sent to syslog or a comment
+(but the prefix for success is treated as 0).
+Otherwise, the exit status is 0.
+<A NAME="lbAW">&nbsp;</A>
+<H2>FILES</H2>
+
+<I>/var/run/pluto.pid</I>
+<BR>
+
+<I>/var/run/pluto.ctl</I>
+<BR>
+
+<I>/etc/ipsec.secrets</I>
+<BR>
+
+<I>$IPSEC_LIBDIR/_pluto_adns</I>
+<BR>
+
+<I>$IPSEC_EXECDIR/lwdnsq</I>
+<BR>
+
+<I>/dev/urandom</I>
+<A NAME="lbAX">&nbsp;</A>
+<H2>ENVIRONMENT</H2>
+
+<I>IPSEC_LIBDIR</I>
+<BR>
+
+<I>IPSEC_EXECDIR</I>
+<BR>
+
+<I>IPSECmyid</I>
+<A NAME="lbAY">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+<P>
+
+The rest of the FreeS/WAN distribution, in particular <I><A HREF="ipsec.8.html">ipsec</A></I>(8).
+<P>
+
+<I><A HREF="ipsec_auto.8.html">ipsec_auto</A></I>(8) is designed to make using <B>pluto</B> more pleasant.
+Use it!
+<P>
+
+<I><A HREF="ipsec.secrets.5.html">ipsec.secrets</A></I>(5)
+
+describes the format of the secrets file.
+<P>
+
+<I><A HREF="ipsec_atoaddr.3.html">ipsec_atoaddr</A></I>(3), part of the FreeS/WAN distribution, describes the
+forms that IP addresses may take.
+<I><A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A></I>(3), part of the FreeS/WAN distribution, describes the
+forms that subnet specifications.
+<P>
+
+For more information on IPsec, the mailing list, and the relevant
+documents, see:
+<DL COMPACT>
+<DT><DD>
+
+<I><A HREF="http://www.ietf.cnri.reston.va.us/html.charters/ipsec-charter.html">http://www.ietf.cnri.reston.va.us/html.charters/ipsec-charter.html</A></I>
+
+</DL>
+<P>
+
+At the time of writing, the most relevant IETF RFCs are:
+<DL COMPACT>
+<DT><DD>
+RFC2409 The Internet Key Exchange (IKE)
+<DT><DD>
+RFC2408 Internet Security Association and Key Management Protocol (ISAKMP)
+<DT><DD>
+RFC2407 The Internet IP Security Domain of Interpretation for ISAKMP
+</DL>
+<P>
+
+The FreeS/WAN web site &lt;<A HREF="htp://www.freeswan.org">htp://www.freeswan.org</A>&gt;
+and the mailing lists described there.
+<A NAME="lbAZ">&nbsp;</A>
+<H2>HISTORY</H2>
+
+This code is released under the GPL terms.
+See the accompanying file COPYING-2.0 for more details.
+The GPL does NOT apply to those pieces of code written by others
+which are included in this distribution, except as noted by the
+individual authors.
+<P>
+
+This software was originally written
+for the FreeS/WAN project
+&lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
+by Angelos D. Keromytis
+(<A HREF="mailto:angelos@dsl.cis.upenn.edu">angelos@dsl.cis.upenn.edu</A>), in May/June 1997, in Athens, Greece.
+Thanks go to John Ioannidis for his help.
+<P>
+
+It is currently (2000)
+being developed and maintained by D. Hugh Redelmeier
+(<A HREF="mailto:hugh@mimosa.com">hugh@mimosa.com</A>), in Canada. The regulations of Greece and Canada
+allow us to make the code freely redistributable.
+<P>
+
+Kai Martius (<A HREF="mailto:admin@imib.med.tu-dresden.de">admin@imib.med.tu-dresden.de</A>) contributed the initial
+version of the code supporting PFS.
+<P>
+
+Richard Guy Briggs &lt;<A HREF="mailto:rgb@conscoop.ottawa.on.ca">rgb@conscoop.ottawa.on.ca</A>&gt; and Peter Onion
+&lt;<A HREF="mailto:ponion@srd.bt.co.uk">ponion@srd.bt.co.uk</A>&gt; added the PFKEY2 support.
+<P>
+
+We gratefully acknowledge that we use parts of Eric Young's <I>libdes</I>
+package; see <I>../libdes/COPYRIGHT</I>.
+<A NAME="lbBA">&nbsp;</A>
+<H2>BUGS</H2>
+
+<B>pluto</B>
+
+is a work-in-progress. It currently has many limitations.
+For example, it ignores notification messages that it receives, and
+it generates only Delete Notifications and those only for IPSEC SAs.
+<P>
+
+<B>pluto</B> does not support the Commit Flag.
+The Commit Flag is a bad feature of the IKE protocol.
+It isn't protected -- neither encrypted nor authenticated.
+A man in the middle could turn it on, leading to DoS.
+We just ignore it, with a warning.
+This should let us interoperate with
+implementations that insist on it, with minor damage.
+<P>
+
+<B>pluto</B> does not check that the SA returned by the Responder
+is actually one that was proposed. It only checks that the SA is
+acceptable. The difference is not large, but can show up in attributes
+such as SA lifetime.
+<P>
+
+There is no good way for a connection to be automatically terminated.
+This is a problem for Road Warrior and Opportunistic connections.
+The <B>--dontrekey</B> option does prevent the SAs from
+being rekeyed on expiry.
+Additonally, if a Road Warrior connection has a client subnet with a fixed IP
+address, a negotiation with that subnet will cause any other
+connection instantiations with that same subnet to be unoriented
+(deleted, in effect).
+See also the --uniqueids option for an extension of this.
+<P>
+
+When <B>pluto</B> sends a message to a peer that has disappeared,
+<B>pluto</B> receives incomplete information from the kernel, so it
+logs the unsatisfactory message ``some IKE message we sent has been
+rejected with ECONNREFUSED (kernel supplied no details)''. John
+Denker suggests that this command is useful for tracking down the
+source of these problems:
+<BR>
+
+<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>tcpdump -i eth0 icmp[0] != 8 and icmp[0] != 0<BR>
+<BR>
+
+Substitute your public interface for eth0 if it is different.
+<P>
+
+The word ``authenticate'' is used for two different features. We must
+authenticate each IKE peer to the other. This is an important task of
+Phase 1. Each packet must be authenticated, both in IKE and in IPsec,
+and the method for IPsec is negotiated as an AH SA or part of an ESP SA.
+Unfortunately, the protocol has no mechanism for authenticating the Phase 2
+identities.
+<P>
+
+Bugs should be reported to the &lt;<A HREF="mailto:users@lists.freeswan.org">users@lists.freeswan.org</A>&gt; mailing list.
+Caution: we cannot accept
+actual code from US residents, or even US citizens living outside the
+US, because that would bring FreeS/WAN under US export law. Some
+other countries cause similar problems. In general, we would prefer
+that you send detailed problem reports rather than code: we want
+FreeS/WAN to be unquestionably freely exportable, which means being
+very careful about where the code comes from, and for a small bug fix,
+that is often more time-consuming than just reinventing the fix
+ourselves.
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DL>
+<DT><A HREF="#lbAE">IKE's Job</A><DD>
+<DT><A HREF="#lbAF">Pluto</A><DD>
+<DT><A HREF="#lbAG">Before Running Pluto</A><DD>
+<DT><A HREF="#lbAH">Setting up <B>KLIPS</B> for <B>pluto</B></A><DD>
+<DT><A HREF="#lbAI">ipsec.secrets file</A><DD>
+<DT><A HREF="#lbAJ">Running Pluto</A><DD>
+<DT><A HREF="#lbAK">Pluto's Internal State</A><DD>
+<DT><A HREF="#lbAL">Using Whack</A><DD>
+<DT><A HREF="#lbAM">Examples</A><DD>
+<DT><A HREF="#lbAN">The updown command</A><DD>
+<DT><A HREF="#lbAO">Rekeying</A><DD>
+<DT><A HREF="#lbAP">Selecting a Connection When Responding: Road Warrior Support</A><DD>
+<DT><A HREF="#lbAQ">Debugging</A><DD>
+<DT><A HREF="#lbAR">Pluto's Behaviour When Things Go Wrong</A><DD>
+<DT><A HREF="#lbAS">Notes</A><DD>
+<DT><A HREF="#lbAT">Policies</A><DD>
+</DL>
+<DT><A HREF="#lbAU">SIGNALS</A><DD>
+<DT><A HREF="#lbAV">EXIT STATUS</A><DD>
+<DT><A HREF="#lbAW">FILES</A><DD>
+<DT><A HREF="#lbAX">ENVIRONMENT</A><DD>
+<DT><A HREF="#lbAY">SEE ALSO</A><DD>
+<DT><A HREF="#lbAZ">HISTORY</A><DD>
+<DT><A HREF="#lbBA">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 21:40:18 GMT, November 11, 2003
+</BODY>
+</HTML>