3.3.4.30 GetBlockHierarchyForRangeId

This operation can be used to retrieve the address block hierarchy for an address block to which a specified range maps to.

 <wsdl:operation name="GetBlockHierarchyForRangeId">
   <wsdl:input wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/GetBlockHierarchyForRangeId" message="ipam:IIpamServer_GetBlockHierarchyForRangeId_InputMessage" />
   <wsdl:output wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/GetBlockHierarchyForRangeIdResponse" message="ipam:IIpamServer_GetBlockHierarchyForRangeId_OutputMessage" />
 </wsdl:operation>

Upon receiving the IIpamServer_GetBlockHierarchyForRangeId_InputMessage request message, the server performs the following processing steps. Upon successful completion of the steps specified below, the server MUST respond with the IIpamServer_GetBlockHierarchyForRangeId_OutputMessage message. In the event of a failure, an appropriate SOAP fault MUST be sent to the client as specified in section 2.2.2.1.

  1. Get the address range corresponding to the GetBlockHierarchyForRangeId.rangeId by calling the procedure GetIPRangeFromTable passing the following parameters:

    • Set Param_id to GetBlockHierarchyForRangeId.rangeId.

    • Set Param_addressfamily to GetBlockHierarchyForRangeId.addressFamily.

  2. Initialize GetBlockHierarchyForRangeIdResponse.GetBlockHierarchyForRangeIdResult to null.

  3. If result.ParentIPBlockId is not 0, call the procedure GetIPBlockFromTable by passing the following values as input parameters:

    • Param_blockId is set to result.ParentIPBlockId.

    • Param_addressfamily is set to GetBlockHierarchyForRangeId.addressFamily.

  4. If result is not null, perform the following steps:

    1. Enumerate the rows in ADM_IPBlocksTable which meet all the following condition:

      • StartIPAddress <= result.StartIPAddress

      • EndIPAddress >= result.EndIPAddress

      • PrefixLength <= result.PrefixLength

    2. Arrange the resulting rows in ascending order of StartIPAddress, EndIPAddress and PrefixLength.

    3. Retrieve the IPBlock data for all the rows using their RecordId and using the GetIPBlockFromTable procedure of ADM_IPBlocksTable.

    4. The collection of IPBlock data hence obtained will become the block hierarchy for the address block to which the specified address range maps to. Assign this collection of IPBlock data to GetBlockHierarchyForRangeIdResponse.GetBlockHierarchyForRangeIdResult.