3.1.1.1.22.2.1 GetRangeUtilization

This procedure is used to retrieve the address utilization trend information. The following are the input parameters to this procedure.

Param_id: This is a 64-bit unsigned integer specifying the record identifier of the range for which the utilization needs to be computed.

Param_addressfamily: The address family of the range for which the utilization is being requested.

Param_utilizationType: This is of type IPUtilizationType specifying the type of utilization data that is being requested.

Param_startDate: The start date of the period for which the utilization trend is being requested.

Param_endDate: The end date of the period for which the utilization trend is being requested.

The following is the output result of the procedure.

result: This is modeled on the IPCumulativeUtilization to provide a series of data points that specify the utilization data at various points in time.

The steps involved are as follows.

  1. Get the IPRange corresponding to the Param_id specified by invoking the GetIPRangeFromTable procedure of ADM_IPRangeTable by passing the Param_id and Param_addressfamily as input parameters.

  2. Based on the Param_utilizationType, adjust the Param_startDate and Param_endDate so that it reflects the duration requested appropriately, so that if the Param_utilizationType is IPUtilizationType.OneDay, choose the Param_startDate and Param_endDate to be that of the last 24 hours. Similarly, if the Param_utilizationType is IPUtilizationType.OneYear, choose the Param_startDate and Param_endDate to be that of the last one-year period. If the Param_utilizationType is IPUtilizationType.Current, the specified Param_startDate and Param_endDate are used appropriately.

  3. Enumerate the rows in the ADM_IPv4AddressUtilizationTable that are between the Param_startDate and Param_endDate and have the specified StartIPAddress, EndIPAddress, and PrefixLength.

  4. Divide the time between Param_startDate and Param_endDate into 12 time periods and compute the utilization of the address ranges within those time period in an implementation-specific manner. These 12 time periods will be used to form 12 rows of IPUtilization type and the average utilization is specified in the form of IPUtilization.TotalAvailableAddresses, IPUtilization.TotalAssignedAddresses, and IPUtilization.TotalUtilizedAddresses. Assign the 12 IPUtilization instances to IPCumulativeUtilization.IpUtilization.

  5. Return the IPCumulativeUtilization instance created above.