3.1.1.1.12.2.2 GetScopeFromTable

This procedure can be used to retrieve the scope information in the form of DhcpScopeV4 or DhcpScopeV6, based on whether it is being invoked against the IPv4-specific table or IPv6-specific table. The procedure takes the following input parameters.

Param_Id: A 64-bit signed integer specifying the record identifier of the DHCP scope instance for which the DhcpScope data 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_scope: This is of DhcpScope. If the Param_addressfamily is Internet, this will be DhcpScopeV4, and if the Param_addressfamily is InternetV6, this will be DhcpScopeV6 type.

The following are the steps performed against the IPAM data store.

  1. Lookup the row in the ADM_DHCPScopesTable with RecordId equal Param_Id. If the row is not present, set Result_scope to null and return.

  2. If the Param_addressfamily is Internet, initialize Result_scope to DhcpScopeV4. If the Param_addressfamily is InternetV6, initialize Result_scope to DhcpScopeV6.

    1. Set Result_scope.RecordId to RecordId.

    2. Set Result_scope.ParentDhcpServerRecordId to DHCPServerRecordId.

    3. Copy ScopeDetails of the row to Result_scope.

    4. Call the procedure GetDhcpOptions of ADM_DhcpOptionsTable with the following parameters:

      • Param_OptionOwnerType is set to DhcpOptionOwnerType.Scope.

      • Param_scopeId is set to Result_scope.RecordId.

      • Param_serverId is set to Result_scope.ParentDhcpServerRecordId.

      • Assign the Result_optionCollection to Result_scope.Options.