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

« back to all changes in this revision

Viewing changes to doc/manpage.d/ipsec_addrlenof.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_INITADDR</TITLE>
5
 
</HEAD><BODY>
6
 
<H1>IPSEC_INITADDR</H1>
7
 
Section: C Library Functions (3)<BR>Updated: 11 Sept 2000<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 initaddr - initialize an ip_address
15
 
<BR>
16
 
 
17
 
ipsec addrtypeof - get address type of an ip_address
18
 
<BR>
19
 
 
20
 
ipsec addrlenof - get length of address within an ip_address
21
 
<BR>
22
 
 
23
 
ipsec addrbytesof - get copy of address within an ip_address
24
 
<BR>
25
 
 
26
 
ipsec addrbytesptr - get pointer to address within an ip_address
27
 
<A NAME="lbAC">&nbsp;</A>
28
 
<H2>SYNOPSIS</H2>
29
 
 
30
 
<B>#include &lt;<A HREF="file:///usr/include/freeswan.h">freeswan.h</A>&gt;</B>
31
 
 
32
 
<P>
33
 
<B>const char *initaddr(const char *src, size_t srclen,</B>
34
 
 
35
 
<BR>
36
 
&nbsp;
37
 
<B>int af, ip_address *dst);</B>
38
 
 
39
 
<BR>
40
 
 
41
 
<B>int addrtypeof(const ip_address *src);</B>
42
 
 
43
 
<BR>
44
 
 
45
 
<B>size_t addrlenof(const ip_address *src);</B>
46
 
 
47
 
<BR>
48
 
 
49
 
<B>size_t addrbytesof(const ip_address *src,</B>
50
 
 
51
 
<BR>
52
 
&nbsp;
53
 
<B>unsigned char *dst, size_t dstlen);</B>
54
 
 
55
 
<BR>
56
 
 
57
 
<B>size_t addrbytesptr(const ip_address *src,</B>
58
 
 
59
 
<BR>
60
 
&nbsp;
61
 
<B>const unsigned char **dst);</B>
62
 
 
63
 
<A NAME="lbAD">&nbsp;</A>
64
 
<H2>DESCRIPTION</H2>
65
 
 
66
 
The
67
 
<B>&lt;<A HREF="file:///usr/include/freeswan.h">freeswan.h</A>&gt;</B>
68
 
 
69
 
library uses an internal type
70
 
<I>ip_address</I>
71
 
 
72
 
to contain one of the (currently two) types of IP address.
73
 
These functions provide basic tools for creating and examining this type.
74
 
<P>
75
 
 
76
 
<I>Initaddr</I>
77
 
 
78
 
initializes a variable
79
 
<I>*dst</I>
80
 
 
81
 
of type
82
 
<I>ip_address</I>
83
 
 
84
 
from an address
85
 
(in network byte order,
86
 
indicated by a pointer
87
 
<I>src</I>
88
 
 
89
 
and a length
90
 
<I>srclen</I>)
91
 
 
92
 
and an address family
93
 
<I>af</I>
94
 
 
95
 
(typically
96
 
<B>AF_INET</B>
97
 
 
98
 
or
99
 
<B>AF_INET6</B>).
100
 
 
101
 
The length must be consistent with the address family.
102
 
<P>
103
 
 
104
 
<I>Addrtypeof</I>
105
 
 
106
 
returns the address type of an address,
107
 
normally
108
 
<B>AF_INET</B>
109
 
 
110
 
or
111
 
<B>AF_INET6</B>.
112
 
 
113
 
(The
114
 
<B>&lt;<A HREF="file:///usr/include/freeswan.h">freeswan.h</A>&gt;</B>
115
 
 
116
 
header file arranges to include the necessary headers for these
117
 
names to be known.)
118
 
<P>
119
 
 
120
 
<I>Addrlenof</I>
121
 
 
122
 
returns the size (in bytes) of the address within an
123
 
<I>ip_address</I>,
124
 
 
125
 
to permit storage allocation etc.
126
 
<P>
127
 
 
128
 
<I>Addrbytesof</I>
129
 
 
130
 
copies the address within the
131
 
<I>ip_address</I>
132
 
 
133
 
<I>src</I>
134
 
 
135
 
to the buffer indicated by the pointer
136
 
<I>dst</I>
137
 
 
138
 
and the length
139
 
<I>dstlen</I>,
140
 
 
141
 
and returns the address length (in bytes).
142
 
If the address will not fit,
143
 
as many bytes as will fit are copied;
144
 
the returned length is still the full length.
145
 
It is the caller's responsibility to check the
146
 
returned value to ensure that there was enough room.
147
 
<P>
148
 
 
149
 
<I>Addrbytesptr</I>
150
 
 
151
 
sets
152
 
<I>*dst</I>
153
 
 
154
 
to a pointer to the internal address within the
155
 
<I>ip_address</I>,
156
 
 
157
 
and returns the address length (in bytes).
158
 
If
159
 
<I>dst</I>
160
 
 
161
 
is
162
 
<B>NULL</B>,
163
 
 
164
 
it just returns the address length.
165
 
The pointer points to
166
 
<B>const</B>
167
 
 
168
 
to discourage misuse.
169
 
<P>
170
 
 
171
 
<I>Initaddr</I>
172
 
 
173
 
returns
174
 
<B>NULL</B>
175
 
 
176
 
for success and
177
 
a pointer to a string-literal error message for failure;
178
 
see DIAGNOSTICS.
179
 
<P>
180
 
 
181
 
The functions which return
182
 
<I>size_t</I>
183
 
 
184
 
return
185
 
<B>0</B>
186
 
 
187
 
for a failure.
188
 
<A NAME="lbAE">&nbsp;</A>
189
 
<H2>SEE ALSO</H2>
190
 
 
191
 
<A HREF="/cgi-bin/man/man2html?3+inet">inet</A>(3), <A HREF="/cgi-bin/man/man2html?3+ipsec_ttoaddr">ipsec_ttoaddr</A>(3)
192
 
<A NAME="lbAF">&nbsp;</A>
193
 
<H2>DIAGNOSTICS</H2>
194
 
 
195
 
An unknown address family is a fatal error for any of these functions
196
 
except
197
 
<I>addrtypeof</I>.
198
 
 
199
 
An address-size mismatch is a fatal error for
200
 
<I>initaddr</I>.
201
 
 
202
 
<A NAME="lbAG">&nbsp;</A>
203
 
<H2>HISTORY</H2>
204
 
 
205
 
Written for the FreeS/WAN project by Henry Spencer.
206
 
<A NAME="lbAH">&nbsp;</A>
207
 
<H2>BUGS</H2>
208
 
 
209
 
<I>Addrtypeof</I>
210
 
 
211
 
should probably have been named
212
 
<I>addrfamilyof</I>.
213
 
 
214
 
<P>
215
 
 
216
 
<HR>
217
 
<A NAME="index">&nbsp;</A><H2>Index</H2>
218
 
<DL>
219
 
<DT><A HREF="#lbAB">NAME</A><DD>
220
 
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
221
 
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
222
 
<DT><A HREF="#lbAE">SEE ALSO</A><DD>
223
 
<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
224
 
<DT><A HREF="#lbAG">HISTORY</A><DD>
225
 
<DT><A HREF="#lbAH">BUGS</A><DD>
226
 
</DL>
227
 
<HR>
228
 
This document was created by
229
 
<A HREF="/cgi-bin/man/man2html">man2html</A>,
230
 
using the manual pages.<BR>
231
 
Time: 10:29:41 GMT, June 17, 2004
232
 
</BODY>
233
 
</HTML>