3.1.1.1.4.2.6 AdjustChildIPBlocks
The AdjustChildIPBlocks procedure can be used to update the child blocks for a given IP address block. The address block for which the child blocks are to be calculated and updated are specified by using the following input parameters:
Param_BlockRecordId: The RecordId of the block for which the child blocks are to be calculated.
Param_ParentBlockRecordId: The ParentIPBlockRecordId of the block for which the child blocks are to be calculated.
Param_StartIPAddress: The StartIPAddress of the block for which the child blocks are to be calculated.
Param_EndIPAddress: The EndIPAddress of the block for which the child blocks are to be calculated.
Param_AddressSpaceRecordId: The AddressSpaceRecordId of the block for which the child block need to be adjusted. If this parameter is not specified while calling this procedure, the default value that is considered is 1, which maps to Default Provider Address Space.
Param_PrefixLength: The PrefixLength of the block for which the child blocks are to be calculated.
Param_AddressCategory: The AddressCategory of the block for which the child blocks are to be calculated.
This procedure updates the ParentIPBlockRecordId for the child blocks for the specified block. There is no output from this procedure.
The following are the steps involved. 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:
Enumerate the rows that meet the following conditions and set their ParentIPBlockRecordId to Param_BlockRecordId:
If Param_BlockRecordId is specified, the RecordId of the row is not equal to Param_BlockRecordId.
ParentIPBlockRecordId of the row is equal to the Param_ParentBlockRecordId.
StartIPAddress of the row is greater than or equal to the Param_StartIPAddress.
EndIPAddress of the row is greater than or equal to the Param_EndIPAddress.
Param_AddressSpaceRecordId is equal to AddressSpaceRecordId of the block entry in the table.
PrefixLength of the row is greater than or equal to the Param_PrefixLength.
AddressCategory of the row is equal to Param_AddressCategory.