3.1.1.1.1.2.1 GetIPRangeFromTable

The GetIPRangeFromTable procedure can be used to retrieve the address range information in either IPv4Range or IPv6Range form, based on whether it is being invoked against the IPv4-specific table or IPv6-specific table, respectively.

This procedure takes the following input parameters:

Param_id: A 64-bit signed integer specifying the record identifier of the IP address range for which the IPRange is being requested.

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.

This procedure returns the following value as output parameter.

result: This is of type IPRange. If Param_addressfamily is InterNetwork, this is IPv4Range, and if the addressfamily is InterNetworkV6, this is IPv6Range.

The following processing steps are performed against the data store:

  1. Look-up the row in ADM_IPRangeTable with RecordId equal to Param_id. If the row is not present, set result to NULL and return.

  2. If the addressfamily is InterNetwork, initialize result to IPv4Range. The rest of the processing rules are performed on IPv4-specific tables of any compound table referenced. If the addressfamily is InterNetworkV6, initialize result to IPv6Range. The rest of the processing rules are performed on IPv6-specific tables of any compound table referenced.

  3. Set the Param_id to IPRange.RecordId of the result.

  4. Copy the RangeDetails of the row into result.

  5. If IPRange.ScopeRecordId is not 0, call GetScopeInformationForRange of ADM_DHCPScopesTable with the Param_range is initialized with result.

  6. Call GetCustomFieldValues procedure of ADM_CustomFieldValuesAssociationTable passing the following parameters:

    1. Param_ObjectType is set to EnumerationObjectType.IPRange.

    2. Param_addressfamily is passed as-is.

    3. Param_ObjectRecordId is set to Param_id.

  7. Assign Result_CustomFieldValueList to result.CustomFieldValues.

  8. Assign Result_CustomFieldPartialValueList to result.PartialCustomFieldValues.

  9. Call GetMultivaluedPropertiesForRange of ADM_IPRangeMultivaluedPropertiesTable with Param_rangeId set to Param_id. Param_addressfamily is passed as-is.

  10. Process the output Param_resultRangeMultiValuedProperties to set values for the following IPRange properties:

    • DNSServers

    • WINSServers (populated only if Param_addressfamily is equal to AddressFamily.InterNetwork).

    • Gateways

    • VIPs

    • VIPRanges

    • DNSSuffixes

    • ReservedIPs

    • ReservedIPRanges

  11. Call GetAccessScopeForObjectIdAndType of ADM_AccessScopeAssociationTable passing the following parameters:

    1. Param_objectId is set to Param_id.

    2. Param_objectType is set to IpamObjectType.IPv4Range if addressfamily is InterNetwork or IpamObjectType.IPv6Range if addressfamily is InterNetworkV6.

    3. Param_accessScopeId.

    4. Param_objectInheritanceStatus.

    5. Param_inheritanceId.

  12. Assign Param_accessScopeId to result.AccessScopeId.

  13. Assign Param_objectInheritanceStatus to result.IsInheritedAccessScope.

  14. Call GetAddressSpaceById procedure of ADM_AddressSpaceTable assigning AddressSpaceRecordId to Param_AddressSpaceId. Process the output Result_AddressSpace from the procedure as mentioned following:

    1. If Result_AddressSpace.AddressSpaceType is CustomerAddressSpace, then assign Result_AddressSpace.Name to result.CustomerAddressSpaceName and assign Result_AddressSpace.ProviderAddressSpaceName to result.ProviderAddressSpaceName.

    2. If Result_AddressSpace.AddressSpaceType is ProviderAddressSpace, then assign Result_AddressSpace.Name to result.ProviderAddressSpaceName.

  15. Return result as output of the procedure.