1 .TH IPSEC_GOODMASK 3 "11 June 2001"
2 .\" RCSID $Id: goodmask.3,v 1.5 2001/06/11 23:08:00 henry Exp $
4 ipsec goodmask \- is this Internet subnet mask a valid one?
6 ipsec masktobits \- convert Internet subnet mask to bit count
8 ipsec bitstomask \- convert bit count to Internet subnet mask
10 .B "#include <freeswan.h>
12 .B "int goodmask(struct in_addr mask);"
14 .B "int masktobits(struct in_addr mask);"
16 .B "struct in_addr bitstomask(int n);"
18 These functions are obsolete;
20 .IR ipsec_masktocount (3)
21 for a partial replacement.
24 reports whether the subnet
27 i.e. consists of a (possibly empty) sequence of
29 followed by a (possibly empty) sequence of
32 takes a (valid) subnet mask and returns the number of
37 returning the subnet mask corresponding to bit count
40 All masks are in network byte order.
42 inet(3), ipsec_atosubnet(3)
49 returns an all-zeros mask for a negative or out-of-range
52 Written for the FreeS/WAN project by Henry Spencer.
54 The error-reporting convention of
57 zero is sometimes a legitimate mask.