3.5.4.8.1.20 DhcpScopeForIpBlockEnumerationParameters

The DhcpScopeForIpBlockEnumerationParameters processing is done when the EnumInputParameters contains data of type DhcpScopeForIpBlockEnumerationParameters. The ObjectType MUST be EnumerationObjectType.DhcpScope. This is used to enumerate all the DHCP scopes that are mapped to a particular IP address block specified as parameter using DhcpScopeForIpBlockEnumerationParameters.ParentIPBlockRecordId. The DhcpScopeForIpBlockEnumerationParameters.AddressFamily is used to determine the simple table within the ADM_DHCPScopesTable compound table on which the processing has to be done.

The following are the steps involved in identifying the rows to be returned as a part of the enumeration:

  1. Get the IP address block for which the scopes are being requested by calling the procedure GetIPBlockFromTable of ADM_IPBlocksTable passing the following as input parameters:

  2. Param_blockId is set to DhcpScopeForIpBlockEnumerationParameters.ParentIPBlockRecordId.

  3. Param_addressFamily is set to DhcpScopeForIpBlockEnumerationParameters.AddressFamily.

  4. Enumerate the ranges in the ADM_IPRangeTable that meet the following criteria:

  5. StartIPAddress is greater than or equal to result.StartIPAddress

  6. EndIPAddress is less than or equal to result.EndIPAddress

  7. PrefixLength is greater than or equal to result.PrefixLength

  8. ParentIPBlockRecordId is not NULL

  9. AddressAssignment is Dynamic

  10. For each of the previously enumerated rows, perform the following steps to get the associated scopes:

  11. Call the procedure GetScopeFromTable in ADM_DHCPScopesTable with the following parameters:

  12. Param_Id is set to the value of ScopeRecordId of the row enumerated.

  13. Param_addressfamily is assigned the value of DhcpScopeForIpBlockEnumerationParameters.AddressFamily.

  14. Add the returned Result_scope to EnumOutputData.