- import of strongswan-2.7.0

- applied patch for charon
This commit is contained in:
Martin Willi
2006-04-28 07:14:48 +00:00
parent 52923c9acb
commit 997358a6c4
2043 changed files with 346842 additions and 0 deletions
+215
View File
@@ -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>
File diff suppressed because it is too large Load Diff
+227
View File
@@ -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>
+58
View File
@@ -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>
+62
View File
@@ -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>
+67
View File
@@ -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>
+64
View File
@@ -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>
+64
View File
@@ -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>
+70
View File
@@ -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>
+68
View File
@@ -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>
+65
View File
@@ -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>
+63
View File
@@ -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>
+63
View File
@@ -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>
+232
View File
@@ -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>
+232
View File
@@ -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>
+274
View File
@@ -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>
+274
View File
@@ -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>
+232
View File
@@ -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>
+448
View File
@@ -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>
+238
View File
@@ -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>
+569
View File
@@ -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>
+232
View File
@@ -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>
+166
View File
@@ -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>
+448
View File
@@ -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>
+294
View File
@@ -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>
+347
View File
@@ -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:[email protected]">[email protected]</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:[email protected]">[email protected]</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>
+448
View File
@@ -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>
+266
View File
@@ -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>
+416
View File
@@ -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>
+150
View File
@@ -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>
+122
View File
@@ -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>
+107
View File
@@ -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>
+78
View File
@@ -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>
@@ -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>
+439
View File
@@ -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>
+370
View File
@@ -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:[email protected]">[email protected]</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:[email protected]">[email protected]</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:[email protected]">[email protected]</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:[email protected]">[email protected]</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>
+421
View File
@@ -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:[email protected]">[email protected]</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:[email protected]">[email protected]</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>
+122
View File
@@ -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>
+107
View File
@@ -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>
+137
View File
@@ -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>
+232
View File
@@ -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>
+453
View File
@@ -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:[email protected]">[email protected]</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:[email protected]">[email protected]</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>
+238
View File
@@ -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>
+166
View File
@@ -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>
+166
View File
@@ -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>
+166
View File
@@ -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>
+174
View File
@@ -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>
+229
View File
@@ -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>
+264
View File
@@ -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>
+76
View File
@@ -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>
+166
View File
@@ -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>
+400
View File
@@ -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:[email protected]">[email protected]</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>
+97
View File
@@ -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:[email protected]">[email protected]</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:[email protected]">[email protected]</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>
+414
View File
@@ -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>
+238
View File
@@ -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>
+122
View File
@@ -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>
+238
View File
@@ -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>
+238
View File
@@ -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>
+196
View File
@@ -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>
+275
View File
@@ -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>
+176
View File
@@ -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>
+122
View File
@@ -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:[email protected]">[email protected]</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>
File diff suppressed because it is too large Load Diff
+143
View File
@@ -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>
+204
View File
@@ -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>
+204
View File
@@ -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>
+204
View File
@@ -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>
+204
View File
@@ -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>
+147
View File
@@ -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>
+294
View File
@@ -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>
+116
View File
@@ -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>
+401
View File
@@ -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>
+274
View File
@@ -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>
+274
View File
@@ -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>
+274
View File
@@ -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>
+274
View File
@@ -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>
+274
View File
@@ -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>
+347
View File
@@ -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:[email protected]">[email protected]</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:[email protected]">[email protected]</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>
+453
View File
@@ -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:[email protected]">[email protected]</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:[email protected]">[email protected]</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>
+427
View File
@@ -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>
+143
View File
@@ -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>
+237
View File
@@ -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>
+82
View File
@@ -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>
+269
View File
@@ -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>
+88
View File
@@ -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>
+143
View File
@@ -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>
+143
View File
@@ -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>
+305
View File
@@ -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:[email protected]">[email protected]</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:[email protected]">[email protected]</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>
+790
View File
@@ -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:[email protected]">[email protected]</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:[email protected]">[email protected]</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>
+193
View File
@@ -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:[email protected]">[email protected]</A></B>
<DD>
<B><A HREF="mailto:[email protected]">[email protected]</A></B>
<B><A HREF="mailto:[email protected]">[email protected]</A></B>
<B><A HREF="mailto:[email protected]">[email protected]</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>
+280
View File
@@ -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>
+174
View File
@@ -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>
+274
View File
@@ -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>
+274
View File
@@ -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>
+107
View File
@@ -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>
+448
View File
@@ -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>
+569
View File
@@ -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>
+238
View File
@@ -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>
+569
View File
@@ -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>
+175
View File
@@ -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>

Some files were not shown because too many files have changed in this diff Show More