Validating IP Address Variables

Programatically, IP address attributes support four extended properties: IP_MASK, SUBNET, ALLOW_32_BIT_MASK, and ALLOW_ANY_VALID_IP. The state of the first two largely defines Open Manage Network Manager’s responses.

IP_MASK -- Determines whether Open Manage Network Manager accepts an IP address OR a subnet/subnet mask. The value accepted is an IP address attribute when false, subnet/subnet mask when true.

SUBNET -- This property determines whether a subnet value must be provided or not, and controls display of the subnet portion of the widget. Valid subnet values are 1-31.

By default, when both of the above are false, the attribute only accepts valid IPv4 addresses. For example:

If IP_MASK is false and SUBNET is true then Open Manage Network Manager accepts any valid IP address with a subnet specified. The address must be an IP within the specified subnet. For example, is a valid entry whereas is invalid since it represents the subnet id, not an actual address within the subnet.

If IP_MASK is true and SUBNET is false, then Open Manage Network Manager accepts one of the 32 valid subnet masks. The widget displays pick list for user to choose from. For example

If IP_MASK is true and SUBNET is true, then Open Manage Network Manager accepts a subnet id (the first IP address within a subnet). For example, with as the first address within the subnet spanning to Entering an IP address within the subnet, say, the attribute would convert that to

ALLOW_32_BIT_MASK -- Valid subnet values are between 1 and 31. To extend this to support a 32-bit subnet, which is essentially a single IP address (, set the ALLOW_32_BIT_MASK property.

ALLOW_ANY_VALID_IP -- To accept either an IP address, IP address and subnet or subnet, then IP_MASK remains false, SUBNET is true. With the ALLOW_ANY_VALID_IP true, the subnet field is optional and Open Manage Network Manager disables any requirement that a subnet id be specified. Basically the only validation is that a valid IP address is entered. For example, in this configuration,, and would all be valid.