IPMaskToText

(Engine-Level Function)

Description: Extracts an IP mask from MaskSet and converts it to text, returning the new text value.
Returns: Text
Usage: Script Only.
Function Groups: Network and Workstation
Related to: CheckIPMask | MakeIPMask
Format: IPMaskToText(MaskSet [,MaskSetIndex])
Parameters:  

MaskSet

Required. A "maskset", generated by one ore more calls to MakeIPMask

MaskSetIndex

Optional numeric. Specifies the index into MaskSet to use, in the case where MaskSet has more than one mask and you want a mask other than the first one. Often obtained from a call to CheckIPMask. Defaults to zero.
Comments:

For advanced use only.

The returned text value will be the most generalized (canonicalized) representation of the IP address.

If the MaskSet index being converted has a mask other than all 1s, a canonicalized CIDR representation will be returned.

In conjunction with MakeIPMask(), this allows you to validate and convert an arbitrary IP address string to the most canonicalized representation. For example:

Example:

    CanonicalizedIP = IPMaskToText(MakeIPMask(Invalid, InputString))