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

« back to all changes in this revision

Viewing changes to doc/manpage.d/ipsec_maskof.3.html

  • 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
 
Content-type: text/html
2
 
 
3
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
 
<HTML><HEAD><TITLE>Man page of IPSEC_INITSUBNET</TITLE>
5
 
</HEAD><BODY>
6
 
<H1>IPSEC_INITSUBNET</H1>
7
 
Section: C Library Functions (3)<BR>Updated: 12 March 2002<BR><A HREF="#index">Index</A>
8
 
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
9
 
 
10
 
 
11
 
<A NAME="lbAB">&nbsp;</A>
12
 
<H2>NAME</H2>
13
 
 
14
 
ipsec initsubnet - initialize an ip_subnet
15
 
<BR>
16
 
 
17
 
ipsec addrtosubnet - initialize a singleton ip_subnet
18
 
<BR>
19
 
 
20
 
ipsec subnettypeof - get address type of an ip_subnet
21
 
<BR>
22
 
 
23
 
ipsec masktocount - convert subnet mask to bit count
24
 
<BR>
25
 
 
26
 
ipsec networkof - get base address of an ip_subnet
27
 
<BR>
28
 
 
29
 
ipsec maskof - get subnet mask of an ip_subnet
30
 
<A NAME="lbAC">&nbsp;</A>
31
 
<H2>SYNOPSIS</H2>
32
 
 
33
 
<B>#include &lt;<A HREF="file:///usr/include/freeswan.h">freeswan.h</A>&gt;</B>
34
 
 
35
 
<P>
36
 
<B>const char *initsubnet(const ip_address *addr,</B>
37
 
 
38
 
<BR>
39
 
&nbsp;
40
 
<B>int maskbits, int clash, ip_subnet *dst);</B>
41
 
 
42
 
<BR>
43
 
 
44
 
<B>const char *addrtosubnet(const ip_address *addr,</B>
45
 
 
46
 
<BR>
47
 
&nbsp;
48
 
<B>ip_subnet *dst);</B>
49
 
 
50
 
<P>
51
 
<B>int subnettypeof(const ip_subnet *src);</B>
52
 
 
53
 
<BR>
54
 
 
55
 
<B>int masktocount(const ip_address *src);</B>
56
 
 
57
 
<BR>
58
 
 
59
 
<B>void networkof(const ip_subnet *src, ip_address *dst);</B>
60
 
 
61
 
<BR>
62
 
 
63
 
<B>void maskof(const ip_subnet *src, ip_address *dst);</B>
64
 
 
65
 
<A NAME="lbAD">&nbsp;</A>
66
 
<H2>DESCRIPTION</H2>
67
 
 
68
 
The
69
 
<B>&lt;<A HREF="file:///usr/include/freeswan.h">freeswan.h</A>&gt;</B>
70
 
 
71
 
library uses an internal type
72
 
<I>ip_subnet</I>
73
 
 
74
 
to contain a description of an IP subnet
75
 
(base address plus mask).
76
 
These functions provide basic tools for creating and examining this type.
77
 
<P>
78
 
 
79
 
<I>Initsubnet</I>
80
 
 
81
 
initializes a variable
82
 
<I>*dst</I>
83
 
 
84
 
of type
85
 
<I>ip_subnet</I>
86
 
 
87
 
from a base address and
88
 
a count of mask bits.
89
 
The
90
 
<I>clash</I>
91
 
 
92
 
parameter specifies what to do if the base address includes
93
 
<B>1</B>
94
 
 
95
 
bits outside the prefix specified by the mask
96
 
(that is, in the ``host number'' part of the address):
97
 
<DL COMPACT><DT><DD>
98
 
<DL COMPACT>
99
 
<DT>'0'<DD>
100
 
zero out host-number bits
101
 
<DT>'x'<DD>
102
 
non-zero host-number bits are an error
103
 
</DL>
104
 
</DL>
105
 
 
106
 
<P>
107
 
 
108
 
<I>Initsubnet</I>
109
 
 
110
 
returns
111
 
<B>NULL</B>
112
 
 
113
 
for success and
114
 
a pointer to a string-literal error message for failure;
115
 
see DIAGNOSTICS.
116
 
<P>
117
 
 
118
 
<I>Addrtosubnet</I>
119
 
 
120
 
initializes an
121
 
<I>ip_subnet</I>
122
 
 
123
 
variable
124
 
<I>*dst</I>
125
 
 
126
 
to a ``singleton subnet'' containing the single address
127
 
<I>*addr</I>.
128
 
 
129
 
It returns
130
 
<B>NULL</B>
131
 
 
132
 
for success and
133
 
a pointer to a string-literal error message for failure.
134
 
<P>
135
 
 
136
 
<I>Subnettypeof</I>
137
 
 
138
 
returns the address type of a subnet,
139
 
normally
140
 
<B>AF_INET</B>
141
 
 
142
 
or
143
 
<B>AF_INET6</B>.
144
 
 
145
 
(The
146
 
<B>&lt;<A HREF="file:///usr/include/freeswan.h">freeswan.h</A>&gt;</B>
147
 
 
148
 
header file arranges to include the necessary headers for these
149
 
names to be known.)
150
 
<P>
151
 
 
152
 
<I>Masktocount</I>
153
 
 
154
 
converts a subnet mask, expressed as an address, to a bit count
155
 
suitable for use with
156
 
<I>initsubnet</I>.
157
 
 
158
 
It returns
159
 
<B>-1</B>
160
 
 
161
 
for error; see DIAGNOSTICS.
162
 
<P>
163
 
 
164
 
<I>Networkof</I>
165
 
 
166
 
fills in
167
 
<I>*dst</I>
168
 
 
169
 
with the base address of subnet
170
 
<I>src</I>.
171
 
 
172
 
<P>
173
 
 
174
 
<I>Maskof</I>
175
 
 
176
 
fills in
177
 
<I>*dst</I>
178
 
 
179
 
with the subnet mask of subnet
180
 
<I>src</I>,
181
 
 
182
 
expressed as an address.
183
 
<A NAME="lbAE">&nbsp;</A>
184
 
<H2>SEE ALSO</H2>
185
 
 
186
 
<A HREF="/cgi-bin/man/man2html?3+inet">inet</A>(3), <A HREF="/cgi-bin/man/man2html?3+ipsec_ttosubnet">ipsec_ttosubnet</A>(3), <A HREF="/cgi-bin/man/man2html?3+ipsec_rangetosubnet">ipsec_rangetosubnet</A>(3)
187
 
<A NAME="lbAF">&nbsp;</A>
188
 
<H2>DIAGNOSTICS</H2>
189
 
 
190
 
Fatal errors in
191
 
<I>initsubnet</I>
192
 
 
193
 
are:
194
 
unknown address family;
195
 
unknown
196
 
<I>clash</I>
197
 
 
198
 
value;
199
 
impossible mask bit count;
200
 
non-zero host-number bits and
201
 
<I>clash</I>
202
 
 
203
 
is
204
 
<B>'x'</B>.
205
 
 
206
 
Fatal errors in
207
 
<I>addrtosubnet</I>
208
 
 
209
 
are:
210
 
unknown address family.
211
 
Fatal errors in
212
 
<I>masktocount</I>
213
 
 
214
 
are:
215
 
unknown address family;
216
 
mask bits not contiguous.
217
 
<A NAME="lbAG">&nbsp;</A>
218
 
<H2>HISTORY</H2>
219
 
 
220
 
Written for the FreeS/WAN project by Henry Spencer.
221
 
<P>
222
 
 
223
 
<HR>
224
 
<A NAME="index">&nbsp;</A><H2>Index</H2>
225
 
<DL>
226
 
<DT><A HREF="#lbAB">NAME</A><DD>
227
 
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
228
 
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
229
 
<DT><A HREF="#lbAE">SEE ALSO</A><DD>
230
 
<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
231
 
<DT><A HREF="#lbAG">HISTORY</A><DD>
232
 
</DL>
233
 
<HR>
234
 
This document was created by
235
 
<A HREF="/cgi-bin/man/man2html">man2html</A>,
236
 
using the manual pages.<BR>
237
 
Time: 10:29:42 GMT, June 17, 2004
238
 
</BODY>
239
 
</HTML>