1
Content-type: text/html
3
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<HTML><HEAD><TITLE>Man page of IPSEC_SUBNETOF</TITLE>
6
<H1>IPSEC_SUBNETOF</H1>
7
Section: C Library Functions (3)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
8
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
11
<A NAME="lbAB"> </A>
14
ipsec subnetof - given Internet address and subnet mask, return subnet number
17
ipsec hostof - given Internet address and subnet mask, return host part
20
ipsec broadcastof - given Internet address and subnet mask, return broadcast address
21
<A NAME="lbAC"> </A>
24
<B>#include <<A HREF="file:///usr/include/freeswan.h">freeswan.h</A>></B>
27
<B>struct in_addr subnetof(struct in_addr addr,</B>
31
<B>struct in_addr mask);</B>
35
<B>struct in_addr hostof(struct in_addr addr,</B>
39
<B>struct in_addr mask);</B>
43
<B>struct in_addr broadcastof(struct in_addr addr,</B>
47
<B>struct in_addr mask);</B>
49
<A NAME="lbAD"> </A>
52
These functions are obsolete; see
53
<I><A HREF="/cgi-bin/man/man2html?3+ipsec_networkof">ipsec_networkof</A></I>(3)
55
for their replacements.
66
and returns the network part of the address
67
(all in network byte order).
70
similarly returns the host part, and
73
returns the broadcast address (all-1s convention) for the network.
76
These functions are provided to hide the Internet bit-munging inside
77
an API, in hopes of easing the eventual transition to IPv6.
78
<A NAME="lbAE"> </A>
81
<A HREF="/cgi-bin/man/man2html?3+inet">inet</A>(3), <A HREF="/cgi-bin/man/man2html?3+ipsec_atosubnet">ipsec_atosubnet</A>(3)
82
<A NAME="lbAF"> </A>
85
Written for the FreeS/WAN project by Henry Spencer.
86
<A NAME="lbAG"> </A>
89
Calling functions for this is more costly than doing it yourself.
93
<A NAME="index"> </A><H2>Index</H2>
95
<DT><A HREF="#lbAB">NAME</A><DD>
96
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
97
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
98
<DT><A HREF="#lbAE">SEE ALSO</A><DD>
99
<DT><A HREF="#lbAF">HISTORY</A><DD>
100
<DT><A HREF="#lbAG">BUGS</A><DD>
103
This document was created by
104
<A HREF="/cgi-bin/man/man2html">man2html</A>,
105
using the manual pages.<BR>
106
Time: 10:29:43 GMT, June 17, 2004