3.1.1.1.34.2.5 GetUnmappedSubnets

The GetUnmappedSubnets procedure retrieves a collection of subnets that are not mapped to any parent IPBlock.

The following are the input parameters to this procedure:

Param_VirtualizationType: This is of type IPVirtualizationType.

Param_addressfamily: This is of type AddressFamily and it can be either InterNetwork or InterNetworkV6. The value InterNetwork specifies the processing to be done on the IPv4-specific simple tables for any compound table involved during the processing. The value InterNetworkV6 specifies the processing to be done on IPv6-specific simple tables for any compound table involved during the processing.

The following is the output parameter from this procedure.

Result_Subnets: A collection of records of type IPSubnet.

The following processing steps are done against the data store:

  1. Look-up all the rows in the appropriate simple table of ADM_IPBlocksTable corresponding to Param_addressFamily that have AddressSpaceRecordId is equal to 1 (representing Default Provider Address Space) and Is_Subnet is set to 1. If no such row is present, set result to NULL and return.

  2. If rows are present in the ADM_IPBlocksTable, for each row, look up the corresponding row in ADM_SubnetTable and process as follows:

    1. If VirtualizationType of row is same as Param_VirtualizationType, call the GetSubnetById procedure of ADM_SubnetTable passing the following parameters:

      1.  RecordId as Param_SubnetId.

      2. Param_addressFamily set as Param_addressFamily.

    2. Add Result_Subnet to the Result_Subnets collection.

  3. Return Result_Subnets from the procedure.