~ubuntu-branches/ubuntu/hardy/openswan/hardy-updates

« back to all changes in this revision

Viewing changes to lib/libopenswan/rangetosubnet.3.xml

  • Committer: Bazaar Package Importer
  • Author(s): Rene Mayrhofer
  • Date: 2005-01-27 16:10:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050127161011-idgybmyz3vwhpfiq
Tags: 2.3.0-2
Urgency HIGH due to security issue and problems with build-deps in sarge.
* Fix the security issue. Please see
  http://www.idefense.com/application/poi/display?id=190&
      type=vulnerabilities&flashstatus=false
  for more details. Thanks to Martin Schulze for informing me about
  this issue.
  Closes: #292458: Openswan XAUTH/PAM Buffer Overflow Vulnerability
* Added a Build-Dependency to lynx.
  Closes: #291143: openswan: FTBFS: Missing build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="ISO-8859-1"?>
 
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
 
3
                   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
 
4
<!-- lifted from troff+man by doclifter -->
 
5
<refentry>
 
6
<refmeta>
 
7
<refentrytitle>IPSEC_RANGETOSUBNET</refentrytitle>
 
8
<manvolnum>3</manvolnum>
 
9
<refmiscinfo class='date'>8 Sept 2000</refmiscinfo>
 
10
</refmeta>
 
11
<refnamediv id='name'>
 
12
<refname>ipsec rangetosubnet</refname>
 
13
<refpurpose>convert address range to subnet</refpurpose>
 
14
</refnamediv>
 
15
<!-- body begins here -->
 
16
<refsynopsisdiv id='synopsis'>
 
17
<funcsynopsis>
 
18
<funcsynopsisinfo>
 
19
#include &lt;freeswan.h&gt;
 
20
 
 
21
</funcsynopsisinfo>
 
22
<funcprototype>
 
23
<funcdef>const char *<function>rangetosubnet</function></funcdef>
 
24
    <paramdef>const ip_address * <parameter>start</parameter></paramdef>
 
25
    <paramdef>const ip_address * <parameter>stop</parameter></paramdef>
 
26
    <paramdef>ip_subnet * <parameter>dst</parameter></paramdef>
 
27
</funcprototype>
 
28
</funcsynopsis>
 
29
</refsynopsisdiv>
 
30
 
 
31
 
 
32
<refsect1 id='description'><title>DESCRIPTION</title>
 
33
<para><emphasis remap='I'>Rangetosubnet</emphasis>
 
34
accepts two IP addresses which define an address range,
 
35
from
 
36
<varname role='parameter'>start</varname>
 
37
to
 
38
<varname role='parameter'>stop</varname>
 
39
inclusive,
 
40
and converts this to a subnet if possible.
 
41
The addresses must both be IPv4 or both be IPv6,
 
42
and the address family of the resulting subnet is the same.</para>
 
43
 
 
44
<para><emphasis remap='I'>Rangetosubnet</emphasis>
 
45
returns NULL for success and
 
46
a pointer to a string-literal error message for failure;
 
47
see DIAGNOSTICS.</para>
 
48
</refsect1>
 
49
 
 
50
<refsect1 id='see_also'><title>SEE ALSO</title>
 
51
<para><citerefentry><refentrytitle>ipsec_initsubnet</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>ipsec_ttosubnet</refentrytitle><manvolnum>3</manvolnum></citerefentry></para>
 
52
</refsect1>
 
53
 
 
54
<refsect1 id='diagnostics'><title>DIAGNOSTICS</title>
 
55
<para>Fatal errors in
 
56
<function>rangetosubnet</function>
 
57
are:
 
58
mixed address families;
 
59
unknown address family;
 
60
<varname role='parameter'>start</varname>
 
61
and
 
62
<varname role='parameter'>stop</varname>
 
63
do not define a subnet.</para>
 
64
</refsect1>
 
65
 
 
66
<refsect1 id='history'><title>HISTORY</title>
 
67
<para>Written for the FreeS/WAN project by Henry Spencer.</para>
 
68
</refsect1>
 
69
 
 
70
<refsect1 id='bugs'><title>BUGS</title>
 
71
<para>The restriction of error reports to literal strings
 
72
(so that callers don't need to worry about freeing them or copying them)
 
73
does limit the precision of error reporting.</para>
 
74
 
 
75
<para>The error-reporting convention lends itself
 
76
to slightly obscure code,
 
77
because many readers will not think of NULL as signifying success.
 
78
A good way to make it clearer is to write something like:</para>
 
79
 
 
80
<!-- .RS -->
 
81
<literallayout remap='.nf'>
 
82
<emphasis remap='B'>const char *error;</emphasis>
 
83
 
 
84
<emphasis remap='B'>error = rangetosubnet( /* ... */ );</emphasis>
 
85
<emphasis remap='B'>if (error != NULL) {</emphasis>
 
86
<emphasis remap='B'>        /* something went wrong */</emphasis>
 
87
</literallayout> <!-- .fi -->
 
88
</refsect1>
 
89
</refentry>
 
90