3.1.1.1.1.2.3 MapIPRangeToBlock

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:

  1. Call the GetParentBlockIdForRange of ADM_IPBlocksTable with the following parameters:

    1. Param_StartIPAddress is assigned the value of the Param.range.StartIPAddress.

    2. Param_EndIPAddress is assigned the value of the Param.range.EndIPAddress.

    3. Param_PrefixLength is assigned the value of the Param.range.PrefixLength.

    4. Param_AddressSpaceId is assigned the value of Param.range.AddressSpaceId.

    5. Param_RecordIdToExclude to be excluded is set to 0.

  2. Assign the resulting Result_MappingBlockRecordId to Param_range.IPBlockId.