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:
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.
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.
Set the Param_id to IPRange.RecordId of the result.
Copy the RangeDetails of the row into result.
If IPRange.ScopeRecordId is not 0, call GetScopeInformationForRange of ADM_DHCPScopesTable with the Param_range is initialized with result.
Call GetCustomFieldValues procedure of ADM_CustomFieldValuesAssociationTable passing the following parameters:
Param_ObjectType is set to EnumerationObjectType.IPRange.
Param_addressfamily is passed as-is.
Param_ObjectRecordId is set to Param_id.
Assign Result_CustomFieldValueList to result.CustomFieldValues.
Assign Result_CustomFieldPartialValueList to result.PartialCustomFieldValues.
Call GetMultivaluedPropertiesForRange of ADM_IPRangeMultivaluedPropertiesTable with Param_rangeId set to Param_id. Param_addressfamily is passed as-is.
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
Call GetAccessScopeForObjectIdAndType of ADM_AccessScopeAssociationTable passing the following parameters:
Param_objectId is set to Param_id.
Param_objectType is set to IpamObjectType.IPv4Range if addressfamily is InterNetwork or IpamObjectType.IPv6Range if addressfamily is InterNetworkV6.
Param_accessScopeId.
Param_objectInheritanceStatus.
Param_inheritanceId.
Assign Param_accessScopeId to result.AccessScopeId.
Assign Param_objectInheritanceStatus to result.IsInheritedAccessScope.
Call GetAddressSpaceById procedure of ADM_AddressSpaceTable assigning AddressSpaceRecordId to Param_AddressSpaceId. Process the output Result_AddressSpace from the procedure as mentioned following:
If Result_AddressSpace.AddressSpaceType is CustomerAddressSpace, then assign Result_AddressSpace.Name to result.CustomerAddressSpaceName and assign Result_AddressSpace.ProviderAddressSpaceName to result.ProviderAddressSpaceName.
If Result_AddressSpace.AddressSpaceType is ProviderAddressSpace, then assign Result_AddressSpace.Name to result.ProviderAddressSpaceName.
Return result as output of the procedure.