The IPRangeAllForBlockEnumerationParameter processing is done when the EnumInputParameters contains data of type IPRangeAllForBlockEnumerationParameter. The ObjectType MUST be EnumerationObjectType.IPRange. This is used to enumerate address ranges mapped to a certain block given by IPRangeAllForBlockEnumerationParameter.ParentBlockRecordId. The IPRangeAllForBlockEnumerationParameter.AddressFamily is used to determine the simple table within the IP address range compound table on which the processing has to be done.
The following are the steps involved in identifying the rows to be returned as a part of the enumeration:
Get the IPBlock corresponding to IPRangeAllForBlockEnumerationParameter.ParentBlockRecordId that is an identifier for a valid block in the ADM_IPBlocksTable. This is done by calling the GetIPBlockFromTable procedure of the ADM_IPBlocksTable passing the IPRangeAllForBlockEnumerationParameter.ParentBlockRecordId as Param_blockId and IPRangeAllForBlockEnumerationParameter.AddressFamily as Param_addressfamily. Store the result in specifiedBlock.
If the specifiedBlock is NULL, the ParentBlockRecordId is an invalid block and return an appropriate SOAP fault as specified in section 126.96.36.199.
The range enumeration for a block is composed of the ranges that map at a particular block as well as all the blocks that are under the specified block. In order to enumerate all the ranges that belong to the block specified as well as the blocks that are below the specified block, get all the rows in the ADM_IPRangeTable that meet the following criteria:
StartIPAddress >= specifiedBlock.StartIPAddress
EndIPAddress <= specifiedBlock.EndIPAddress
PrefixLength >= specifiedBlock.PrefixLength
ParentIPBlockRecordId is not 0
For each of the previously enumerated rows, get the IPRange by calling the procedure GetIPRangeFromTable passing the record identifier of the row as Param_id input parameter and the IPRangeAllForBlockEnumerationParameter.AddressFamily as the Param_addressfamily input parameter.
Add the range information returned as result to EnumOutputData collection.