goodmask man page on SuSE

Man page or keyword search:  
man Server   14857 pages
apropos Keyword Search (all sections)
Output format
SuSE logo
[printable version]

IPSEC_GOODMASK(3)					     IPSEC_GOODMASK(3)

NAME
       ipsec goodmask - is this Internet subnet mask a valid one?
       ipsec masktobits - convert Internet subnet mask to bit count
       ipsec bitstomask - convert bit count to Internet subnet mask

SYNOPSIS
       #include <freeswan.h>

       int goodmask(struct in_addr mask);
       int masktobits(struct in_addr mask);
       struct in_addr bitstomask(int n);

DESCRIPTION
       These  functions	 are  obsolete; see ipsec_masktocount(3) for a partial
       replacement.

       Goodmask reports whether the subnet mask is a valid one, i.e.  consists
       of  a  (possibly	 empty)	 sequence of 1s followed by a (possibly empty)
       sequence of 0s.	Masktobits takes a (valid) subnet mask and returns the
       number of 1 bits in it.	Bitstomask reverses this, returning the subnet
       mask corresponding to bit count n.

       All masks are in network byte order.

SEE ALSO
       inet(3), ipsec_atosubnet(3)

DIAGNOSTICS
       Masktobits returns -1 for an invalid mask.  Bitstomask returns an  all-
       zeros mask for a negative or out-of-range n.

HISTORY
       Written for the FreeS/WAN project by Henry Spencer.

BUGS
       The  error-reporting  convention of bitstomask is less than ideal; zero
       is sometimes a legitimate mask.

				 11 June 2001		     IPSEC_GOODMASK(3)
[top]

List of man pages available for SuSE

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net