Query: ipsec_bitstomask
OS: centos
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
IPSEC_GOODMASK(3) Library Functions Manual IPSEC_GOODMASK(3)NAMEipsec_goodmask, ipsec_masktobits, ipsec_bitstomask - check if Internet subnet mask is valid, convert Internet subnet mask to bit count, convert bit count to Internet subnet maskSYNOPSIS#include <libreswan.h> int goodmask(struct in_addr mask); int masktobits(struct in_addr mask); struct in_addr bitstomask(int n);DESCRIPTIONThese 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 ALSOinet(3), ipsec_atosubnet(3)DIAGNOSTICSMasktobits returns -1 for an invalid mask. Bitstomask returns an all-zeros mask for a negative or out-of-range n.HISTORYWritten for the FreeS/WAN project by Henry Spencer.BUGSThe error-reporting convention of bitstomask is less than ideal; zero is sometimes a legitimate mask. 11 June 2001 IPSEC_GOODMASK(3)
Related Man Pages |
---|
ipsec_subnetof(3) - centos |
ipsec_bitstomask(3) - debian |
ipsec_subnetof(3) - debian |
ipsec_hostof(3) - centos |
ipsec_masktobits(3) - centos |
Similar Topics in the Unix Linux Community |
---|
Sun 5.8 IFCONFIG INFo |
changing the subnet mask permanently |
How do I figure out the subnet? |
Get all ip address from subnet mask |
Nim client with different subnet to Master |