]> git.ipfire.org Git - thirdparty/strongswan.git/blame - doc/manpage.d/ipsec_sockaddrof.3.html
- import of strongswan-2.7.0
[thirdparty/strongswan.git] / doc / manpage.d / ipsec_sockaddrof.3.html
CommitLineData
997358a6
MW
1Content-type: text/html
2
3<HTML><HEAD><TITLE>Manpage of IPSEC_PORTOF</TITLE>
4</HEAD><BODY>
5<H1>IPSEC_PORTOF</H1>
6Section: C Library Functions (3)<BR>Updated: 8 Sept 2000<BR><A HREF="#index">Index</A>
7<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
8
9
10<A NAME="lbAB">&nbsp;</A>
11<H2>NAME</H2>
12
13ipsec portof - get port field of an ip_address
14<BR>
15
16ipsec setportof - set port field of an ip_address
17<BR>
18
19ipsec sockaddrof - get pointer to internal sockaddr of an ip_address
20<BR>
21
22ipsec sockaddrlenof - get length of internal sockaddr of an ip_address
23<A NAME="lbAC">&nbsp;</A>
24<H2>SYNOPSIS</H2>
25
26<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
27
28<P>
29<B>int portof(const ip_address *src);</B>
30
31<BR>
32
33<B>void setportof(int port, ip_address *dst);</B>
34
35<BR>
36
37<B>struct sockaddr *sockaddrof(ip_address *src);</B>
38
39<BR>
40
41<B>size_t sockaddrlenof(const ip_address *src);</B>
42
43<A NAME="lbAD">&nbsp;</A>
44<H2>DESCRIPTION</H2>
45
46The
47<B>&lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
48
49internal type
50<I>ip_address</I>
51
52contains one of the
53<I>sockaddr</I>
54
55types internally.
56<I>Reliance on this feature is discouraged</I>,
57but it may occasionally be necessary.
58These functions provide low-level tools for this purpose.
59<P>
60
61<I>Portof</I>
62
63and
64<I>setportof</I>
65
66respectively read and write the port-number field of the internal
67<I>sockaddr</I>.
68
69The values are in network byte order.
70<P>
71
72<I>Sockaddrof</I>
73
74returns a pointer to the internal
75<I>sockaddr</I>,
76
77for passing to other functions.
78<P>
79
80<I>Sockaddrlenof</I>
81
82reports the size of the internal
83<I>sockaddr</I>,
84
85for use in storage allocation.
86<A NAME="lbAE">&nbsp;</A>
87<H2>SEE ALSO</H2>
88
89<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_initaddr.3.html">ipsec_initaddr</A>(3)
90<A NAME="lbAF">&nbsp;</A>
91<H2>DIAGNOSTICS</H2>
92
93<I>Portof</I>
94
95returns
96<B>-1</B>,
97
98<I>sockaddrof</I>
99
100returns
101<B>NULL</B>,
102
103and
104<I>sockaddrlenof</I>
105
106returns
107<B>0</B>
108
109if an unknown address family is found within the
110<I>ip_address</I>.
111
112<A NAME="lbAG">&nbsp;</A>
113<H2>HISTORY</H2>
114
115Written for the FreeS/WAN project by Henry Spencer.
116<A NAME="lbAH">&nbsp;</A>
117<H2>BUGS</H2>
118
119These functions all depend on low-level details of the
120<I>ip_address</I>
121
122type, which are in principle subject to change.
123Avoid using them unless really necessary.
124<P>
125
126<HR>
127<A NAME="index">&nbsp;</A><H2>Index</H2>
128<DL>
129<DT><A HREF="#lbAB">NAME</A><DD>
130<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
131<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
132<DT><A HREF="#lbAE">SEE ALSO</A><DD>
133<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
134<DT><A HREF="#lbAG">HISTORY</A><DD>
135<DT><A HREF="#lbAH">BUGS</A><DD>
136</DL>
137<HR>
138This document was created by
139<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
140using the manual pages.<BR>
141Time: 21:40:18 GMT, November 11, 2003
142</BODY>
143</HTML>