3.1.1.1.1.2.5 AdjustChildRangesForBlock

The AdjustChildRangesForBlock procedure identifies the ranges appropriate for the specified block and changes their ParentIPBlockRecordId to the RecordId of the block for which the mapping is being calculated. The block information for which the range mapping is to be calculated is specified using the following input parameters:

Param_BlockRecordId: The RecordId of the block for which the children ranges are to be calculated.

Param_ParentBlockRecordId: The ParentIPBlockRecordId of the block for which the children ranges are to be calculated.

Param_StartIPAddress: The StartIPAddress of the block for which the children ranges are to be calculated.

Param_EndIPAddress: The EndIPAddress of the block for which the children ranges are to be calculated.

Param_AddressSpaceRecordId: This is a 64-bit signed integer that specifies the RecordId of the AddressSpace of the IPBlock.

Param_PrefixLength: The PrefixLength of the block for which the children ranges are to be calculated.

Param_AddressCategory: The AddressCategory of the block for which the children ranges are to be calculated.

There is no output value for this procedure. The procedure updates the eligible child ranges for the specified block and updates their ParentIPBlockRecordId to the specified Param_BlockRecordId value.

The following processing steps are performed. If the address family of Param_StartIPAddress and Param_EndIPAddress is InterNetwork, the rest of the processing is done against the IPv4-specific table. Otherwise, the rest of the processing is done against the IPv6-specific table:

  1. If Param_ParentBlockRecordId is not specified, call the procedure MapUnmappedRangesToBlock in ADM_IPRangeTable passing Param_BlockRecordId, Param_StartIPAddress, Param_EndIPAddress, Param_AddressSpaceRecordId, Param_PrefixLength, and Param_AddressCategory as parameters.

  2. If Param_ParentBlockRecordId is specified, update the ParentIPBlockRecordId of the rows in ADM_IPRangeTable that meet the following conditions:

    • IPBlockId of the row is equal to Param_ParentBlockRecordId.

    • StartIPAddress of the row is greater than or equal to Param_StartIPAddress.

    • EndIPAddress of the row is greater than or equal to Param_EndIPAddress.

    • AddressSpaceRecordId of the row is equal to Param_AddressSpaceRecordId.

    • PrefixLength of the row is greater than or equal to Param_PrefixLength.

    • AddressCategory of the row is greater than or equal to Param_AddressCategory.