ixIsValidNetMask
ixIsValidNetMask - determines if a mask is valid
SYNOPSIS
ixIsValidNetMask mask
DESCRIPTION
This command detemines whether a mask is valid; that is, a set of contigous high-order bits set, followed by a contiguous set of 0's.
ARGUMENTS
mask
The network mask to be checked.
RETURNS
0
The mask is invalid.
1
The mask is valid.
EXAMPLES
package require IxTclHal
set mask1 255.255.255.0
set mask2 0.255.0.0
if {[ixIsValidNetMask $mask1] == 0} {
ixPuts "$mask1 is not a valid mask"
}
if {[ixIsValidNetMask $mask2] == 0} {
ixPuts "$mask2 is not a valid mask"
}