1 Content-type: text/html
3 <HTML><HEAD><TITLE>Manpage of IPSEC_INITADDR</TITLE>
5 <H1>IPSEC_INITADDR</H1>
6 Section: C Library Functions (3)<BR>Updated: 11 Sept 2000<BR><A HREF="#index">Index</A>
7 <A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
10 <A NAME="lbAB"> </A>
13 ipsec initaddr - initialize an ip_address
16 ipsec addrtypeof - get address type of an ip_address
19 ipsec addrlenof - get length of address within an ip_address
22 ipsec addrbytesof - get copy of address within an ip_address
25 ipsec addrbytesptr - get pointer to address within an ip_address
26 <A NAME="lbAC"> </A>
29 <B>#include <<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>></B>
32 <B>const char *initaddr(const char *src, size_t srclen,</B>
36 <B>int af, ip_address *dst);</B>
40 <B>int addrtypeof(const ip_address *src);</B>
44 <B>size_t addrlenof(const ip_address *src);</B>
48 <B>size_t addrbytesof(const ip_address *src, unsigned char *dst,</B>
52 <B>size_t dstlen);</B>
56 <B>size_t addrbytesptr(const ip_address *src,</B>
60 <B>const unsigned char **dst);</B>
62 <A NAME="lbAD"> </A>
66 <B><<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>></B>
68 library uses an internal type
71 to contain one of the (currently two) types of IP address.
72 These functions provide basic tools for creating and examining this type.
77 initializes a variable
84 (in network byte order,
85 indicated by a pointer
100 The length must be consistent with the address family.
105 returns the address type of an address,
113 <B><<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>></B>
115 header file arranges to include the necessary headers for these
121 returns the size (in bytes) of the address within an
124 to permit storage allocation etc.
129 copies the address within the
134 to the buffer indicated by the pointer
140 and returns the address length.
141 If the address will not fit,
142 as many bytes as will fit are copied;
143 the returned length is still the full length.
144 It is the caller's responsibility to check the
145 returned value to ensure that there was enough room.
153 to a pointer to the internal address within the
156 and returns the address length.
163 it just returns the address length.
164 The pointer points to
167 to discourage misuse.
176 a pointer to a string-literal error message for failure;
180 The functions which return
187 <A NAME="lbAE"> </A>
190 <A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_ttoaddr.3.html">ipsec_ttoaddr</A>(3)
191 <A NAME="lbAF"> </A>
194 An unknown address family is a fatal error for any of these functions
198 An address-size mismatch is a fatal error for
201 <A NAME="lbAG"> </A>
204 Written for the FreeS/WAN project by Henry Spencer.
205 <A NAME="lbAH"> </A>
210 should probably have been named
216 <A NAME="index"> </A><H2>Index</H2>
218 <DT><A HREF="#lbAB">NAME</A><DD>
219 <DT><A HREF="#lbAC">SYNOPSIS</A><DD>
220 <DT><A HREF="#lbAD">DESCRIPTION</A><DD>
221 <DT><A HREF="#lbAE">SEE ALSO</A><DD>
222 <DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
223 <DT><A HREF="#lbAG">HISTORY</A><DD>
224 <DT><A HREF="#lbAH">BUGS</A><DD>
227 This document was created by
228 <A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
229 using the manual pages.<BR>
230 Time: 05:09:30 GMT, June 19, 2001