1 Content-type: text/html
3 <HTML><HEAD><TITLE>Manpage of IPSEC_SUBNETOF</TITLE>
5 <H1>IPSEC_SUBNETOF</H1>
6 Section: 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>
10 <A NAME="lbAB"> </A>
13 ipsec subnetof - given Internet address and subnet mask, return subnet number
16 ipsec hostof - given Internet address and subnet mask, return host part
19 ipsec broadcastof - given Internet address and subnet mask, return broadcast address
20 <A NAME="lbAC"> </A>
23 <B>#include <<A HREF="file:/usr/include/freeswan.h">freeswan.h</A>></B>
26 <B>struct in_addr subnetof(struct in_addr addr,</B>
30 <B>struct in_addr mask);</B>
34 <B>struct in_addr hostof(struct in_addr addr,</B>
38 <B>struct in_addr mask);</B>
42 <B>struct in_addr broadcastof(struct in_addr addr,</B>
46 <B>struct in_addr mask);</B>
48 <A NAME="lbAD"> </A>
51 These functions are obsolete; see
52 <I><A HREF="ipsec_networkof.3.html">ipsec_networkof</A></I>(3)
54 for their replacements.
65 and returns the network part of the address
66 (all in network byte order).
69 similarly returns the host part, and
72 returns the broadcast address (all-1s convention) for the network.
75 These functions are provided to hide the Internet bit-munging inside
76 an API, in hopes of easing the eventual transition to IPv6.
77 <A NAME="lbAE"> </A>
80 <A HREF="inet.3.html">inet</A>(3), <A HREF="ipsec_atosubnet.3.html">ipsec_atosubnet</A>(3)
81 <A NAME="lbAF"> </A>
84 Written for the FreeS/WAN project by Henry Spencer.
85 <A NAME="lbAG"> </A>
88 Calling functions for this is more costly than doing it yourself.
92 <A NAME="index"> </A><H2>Index</H2>
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>
102 This document was created by
103 <A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
104 using the manual pages.<BR>
105 Time: 05:09:31 GMT, June 19, 2001