3.1.1.1.13.2.3 GetScopesForServer
The GetScopesForServer procedure is used to retrieve all the DHCP scopes that are mapped to a specific DHCP server.
The following are the input parameters to this procedure:
Param_serverId: A 64-bit signed integer specifying the record identifier of the DHCP server instance for which the DhcpScope’s data is being requested.
Param_addressfamily: This is of type AddressFamily and it can be either InterNetwork or InterNetworkV6. The value InterNetwork 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 InterNetworkV6 is used to specify the processing to be done on IPv6-specific simple tables for any compound table involved during the processing.
The following is the output parameter from this procedure.
Result_Scopes: This is a collection of the DHCP scope information in the form of DhcpScopeV4 or DhcpScopeV6 corresponding to the Param_addressfamily specified in the input parameter. If the Param_addressfamily is InterNetwork, the procedure returns a collection of DhcpScopeV4 instances and if it is InterNetworkV6, the procedure returns a collection of DhcpScopeV6 instances.
The following are the steps performed:
Enumerate all the rows in table of ADM_DhcpScopesTable having DhcpServerRecordId equal to Param_serverId.
Initialize Result_Scopes.
If the rows are not found, return NULL. Otherwise initialize Result_Scopes to a collection of DhcpScopeV4 if the Param_addressfamily is InterNetwork and DhcpScopeV6 if the Param_addressfamily is InterNetworkV6.
For each row that has been found, call the GetScopeFromTable procedure of ADM_DhcpScopesTable passing the following parameters:
RecordId is assigned to Param_id.
Param_addressfamily is assigned to Param_addressfamily.
Process the output Result_scope and add it to the collection Result_Scopes.
Return Result_Scopes as the output of the procedure.