]> git.ipfire.org Git - thirdparty/strongswan.git/blame - doc/manpage.d/ipsec_subnetof.3.html
- import of strongswan-2.7.0
[thirdparty/strongswan.git] / doc / manpage.d / ipsec_subnetof.3.html
CommitLineData
997358a6
MW
1Content-type: text/html
2
3<HTML><HEAD><TITLE>Manpage of IPSEC_SUBNETOF</TITLE>
4</HEAD><BODY>
5<H1>IPSEC_SUBNETOF</H1>
6Section: C Library Functions (3)<BR>Updated: 11 June 2001<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 subnetof - given Internet address and subnet mask, return subnet number
14<BR>
15
16ipsec hostof - given Internet address and subnet mask, return host part
17<BR>
18
19ipsec broadcastof - given Internet address and subnet mask, return broadcast address
20<A NAME="lbAC">&nbsp;</A>
21<H2>SYNOPSIS</H2>
22
23<B>#include &lt;<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>&gt;</B>
24
25<P>
26<B>struct in_addr subnetof(struct in_addr addr,</B>
27
28<BR>
29&nbsp;
30<B>struct in_addr mask);</B>
31
32<BR>
33
34<B>struct in_addr hostof(struct in_addr addr,</B>
35
36<BR>
37&nbsp;
38<B>struct in_addr mask);</B>
39
40<BR>
41
42<B>struct in_addr broadcastof(struct in_addr addr,</B>
43
44<BR>
45&nbsp;
46<B>struct in_addr mask);</B>
47
48<A NAME="lbAD">&nbsp;</A>
49<H2>DESCRIPTION</H2>
50
51These functions are obsolete; see
52<I><A HREF="ipsec_networkof.3.html">ipsec_networkof</A></I>(3)
53
54for their replacements.
55<P>
56
57<I>Subnetof</I>
58
59takes an Internet
60<I>address</I>
61
62and a subnet
63<I>mask</I>
64
65and returns the network part of the address
66(all in network byte order).
67<I>Hostof</I>
68
69similarly returns the host part, and
70<I>broadcastof</I>
71
72returns the broadcast address (all-1s convention) for the network.
73<P>
74
75These functions are provided to hide the Internet bit-munging inside
76an API, in hopes of easing the eventual transition to IPv6.
77<A NAME="lbAE">&nbsp;</A>
78<H2>SEE ALSO</H2>
79
80<A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A>(3)
81<A NAME="lbAF">&nbsp;</A>
82<H2>HISTORY</H2>
83
84Written for the FreeS/WAN project by Henry Spencer.
85<A NAME="lbAG">&nbsp;</A>
86<H2>BUGS</H2>
87
88Calling functions for this is more costly than doing it yourself.
89<P>
90
91<HR>
92<A NAME="index">&nbsp;</A><H2>Index</H2>
93<DL>
94<DT><A HREF="#lbAB">NAME</A><DD>
95<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
96<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
97<DT><A HREF="#lbAE">SEE ALSO</A><DD>
98<DT><A HREF="#lbAF">HISTORY</A><DD>
99<DT><A HREF="#lbAG">BUGS</A><DD>
100</DL>
101<HR>
102This document was created by
103<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
104using the manual pages.<BR>
105Time: 21:40:18 GMT, November 11, 2003
106</BODY>
107</HTML>