1
Content-type: text/html
3
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<HTML><HEAD><TITLE>Man page of IPSEC_GOODMASK</TITLE>
6
<H1>IPSEC_GOODMASK</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 goodmask - is this Internet subnet mask a valid one?
17
ipsec masktobits - convert Internet subnet mask to bit count
20
ipsec bitstomask - convert bit count to Internet subnet mask
21
<A NAME="lbAC"> </A>
24
<B>#include <<A HREF="file:///usr/include/freeswan.h">freeswan.h</A>></B>
27
<B>int goodmask(struct in_addr mask);</B>
31
<B>int masktobits(struct in_addr mask);</B>
35
<B>struct in_addr bitstomask(int n);</B>
37
<A NAME="lbAD"> </A>
40
These functions are obsolete;
42
<I><A HREF="/cgi-bin/man/man2html?3+ipsec_masktocount">ipsec_masktocount</A></I>(3)
44
for a partial replacement.
49
reports whether the subnet
53
i.e. consists of a (possibly empty) sequence of
56
followed by a (possibly empty) sequence of
61
takes a (valid) subnet mask and returns the number of
68
returning the subnet mask corresponding to bit count
73
All masks are in network byte order.
74
<A NAME="lbAE"> </A>
77
<A HREF="/cgi-bin/man/man2html?3+inet">inet</A>(3), <A HREF="/cgi-bin/man/man2html?3+ipsec_atosubnet">ipsec_atosubnet</A>(3)
78
<A NAME="lbAF"> </A>
89
returns an all-zeros mask for a negative or out-of-range
92
<A NAME="lbAG"> </A>
95
Written for the FreeS/WAN project by Henry Spencer.
96
<A NAME="lbAH"> </A>
99
The error-reporting convention of
103
zero is sometimes a legitimate mask.
107
<A NAME="index"> </A><H2>Index</H2>
109
<DT><A HREF="#lbAB">NAME</A><DD>
110
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
111
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
112
<DT><A HREF="#lbAE">SEE ALSO</A><DD>
113
<DT><A HREF="#lbAF">DIAGNOSTICS</A><DD>
114
<DT><A HREF="#lbAG">HISTORY</A><DD>
115
<DT><A HREF="#lbAH">BUGS</A><DD>
118
This document was created by
119
<A HREF="/cgi-bin/man/man2html">man2html</A>,
120
using the manual pages.<BR>
121
Time: 10:29:42 GMT, June 17, 2004