The MapIPRangeToBlock procedure identifies the specific address block that an IPRange can map to. The input parameter is as follows.
Param_range: The range to be mapped to a block.
There are no output parameters but on completion of the procedure, the range.IPBlockId is set to the record identifier of the block that a range maps to. If the range does not map to a block, the range.IPBlockId is set to zero.
The processing steps are as follows:
Get the address block mapping for the range by the following steps.
Call the GetParentBlockIdForRange of ADM_IPBlocksTable with the following parameters:
Param_StartIPAddress is assigned the value of the Param.range.StartIPAddress.
Param_EndIPAddress is assigned the value of the Param.range.EndIPAddress.
Param_PrefixLength is assigned the value of the Param.range.PrefixLength.
Param_AddressSpaceId is assigned the value of Param.range.AddressSpaceId.
Param_RecordIdToExclude to be excluded is set to 0.
Assign the resulting Result_MappingBlockRecordId to Param_range.IPBlockId.