Share via


3.5.4.8.1.81 DhcpScopeObjectSpecificEnumerationParameters

The DhcpScopeObjectSpecificEnumerationParameters processing is done when the EnumInputParameters contains data of type DhcpScopeObjectSpecificEnumerationParameters. The ObjectType MUST be EnumerationObjectType.DhcpScope. This is used to enumerate all the DHCP scopes that are mapped to specified DHCP Reservations or DHCP Policies specified as parameters using DhcpScopeObjectSpecificEnumerationParameters.RecordIds. The DhcpScopeObjectSpecificEnumerationParameters.AddressFamily is used to determine the simple table within the ADM_DHCPScopesTable compound table on which it is processed.

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

  1. If DhcpScopeObjectSpecificEnumerationParameters.IpamObjectTypeForEnumeration is equal to IpamObjectType.DHCPReservationV4 or is equal to IpamObjectType.DHCPReservationV6, get the DHCP Reservations for which the scopes are being requested by doing the following processing:

  2. Iterate on all the elements of the list of reservation record ids specified by DhcpScopeObjectSpecificEnumerationParameters.RecordIds, each id is specified as ReservationRecordId. If the DhcpScopeObjectSpecificEnumerationParameters.RecordIds list is NULL or is empty, then enumerate all the rows of ADM_DHCPReservationTable and perform the folowing operations on all the rows.

  3. Call the procedure GetDhcpReservation of ADM_DHCPReservationTable passing the following as input parameters:

  4. Param_addressfamily is set to DhcpScopeForIpBlockEnumerationParameters.AddressFamily.

  5. Param_Id is set to ReservationRecordId.

  6. Call the procedure GetScopeFromTable of ADM_DHCPScopesTable passing the following as input parameters:

  7. Param_addressfamily is set to DhcpScopeForIpBlockEnumerationParameters.AddressFamily.

  8. Param_reservationId is set to Result_Reservation.ScopeRecordId.

  9. Add the returned Result_scope to EnumOutputData.

  10. If DhcpScopeObjectSpecificEnumerationParameters.IpamObjectTypeForEnumeration is equal to IpamObjectType.DHCPPolicyV4 and DhcpScopeObjectSpecificEnumerationParameters.AddressFamily is equal to AddressFamily.Internetwork, get the DHCP Policies for which the scopes are being requested by doing the following processing: 

  11. Iterate on all the elements of the list of policy record ids specified by DhcpScopeObjectSpecificEnumerationParameters.RecordIds, each id specified as PolicyRecordId. If the DhcpScopeObjectSpecificEnumerationParameters.RecordIds list is NULL or is empty, then enumerate all the rows of ADM_DHCPReservationTable and perform the following operations on all the rows.

  12. Call the procedure GetPolicyById of ADM_DhcpPolicyTable passing input parameter Param_PolicyId set to PolicyRecordId.

  13. Call the procedure GetScopeFromTable of ADM_DHCPScopesTable passing the following as input parameters:

  14. Param_addressfamily is set to DhcpScopeForIpBlockEnumerationParameters.AddressFamily.

  15. Param_reservationId is set to Result_Policy.Scope.

  16. Add the returned Result_scope to EnumOutputData.