3.1.1.1.1.2.1 GetIPRangeFromTable

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

This procedure takes the following as input parameters:

Param_id: A 64-bit unsigned 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 Internet or InternetV6. The value Internet is used to specify the processing to be done on the IPv4-specific simple tables for any compound table involved during the processing. The value InternetV6 is used to specify 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 the Param_addressfamily is Internet, this will be IPv4Range, and if the addressfamily is InternetV6, this will be IPv6Range.

The following steps are the processing done by this procedure against the data store.

  1. Look-up the row in the 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 Internet, initialize result to IPv4Range. The rest of the processing rules will be performed on IPv4-specific tables of any compound table referenced. If the addressfamily is InternetV6, initialize result to IPv6Range. The rest of the processing rules will be performed on IPv6-specific tables of any compound table referenced.

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

    2. Copy the RangeDetails of the row into result.

    3. If IPRange.ScopeRecordId is not 0,

      1. Call GetScopeInformationForRange of ADM_DHCPScopesTable with the following parameters.

      2. Param_range is initialized with result.

      3. 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.

      4. Assign Result_CustomFieldValueList to result.CustomFieldValues.

      5. Assign Result_CustomFieldPartialValueList to result.PartialCustomFieldValues.

    4. Return result as output of the procedure.