Share via


SubnetMask

Describes the subnet mask to be applied for routing for the IP address. The following table summarizes the attributes of the SubnetMask property.

Attribute Value
Data type Null-terminated Unicode string
Access Read/write
Status Required
Structure CLUSPROP_SZ
Maximum None (but see Maximum Property Size.)
Default NULL

Remarks

The data in the SubnetMask property must be formatted as xxx.xxx.xxx.xxx where xxx represents a decimal number between 0 and 255. The value 255.255.255.255 is not valid.

The CLUSPROP_SZ_DECLARE macro creates a CLUSPROP_SZ structure with an array of the correct size.

Examples

The property value portion of a property list entry for SubnetMask can be set with the following example code.

WCHAR                szSubnetMaskData[] = L"255.255.0.0";
CLUSPROP_SZ_DECLARE( SubnetMaskValue, 
                     sizeof( szSubnetMaskData ) / sizeof( WCHAR ) );

SubnetMaskValue.Syntax.dw = CLUSPROP_SYNTAX_LIST_VALUE_SZ;
SubnetMaskValue.cbLength  = sizeof( szSubnetMaskData );
StringCbCopy( SubnetMaskValue.sz, 
              SubnetMaskValue.cbLength, 
              szSubnetMaskData );

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008 Enterprise, Windows Server 2008 Datacenter

See also

IP Address Private Properties

CLUSPROP_SZ

CLUSPROP_SZ_DECLARE