3.1.1.1.17.2.2 GetUserClassFromServer

The GetUserClassFromServer procedure can be used to retrieve a specific DhcpUserClass in the form of either DhcpUserClassV4 or DhcpUserClassV6, based on whether the procedure is invoked against the IPv4-specific or IPv6-specific table, respectively.

It takes the following as input parameters:

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.

Param_serverRecordId: The record identifier of the DHCP Server instance from which the user class information is to be retrieved.

Param_userClassRecordId: The record identifier of the user class instance that is being requested.

The following is the output of this procedure.

Result_userClass: This will be of type DhcpUserClassV4 if the Param_addressfamily is InterNetwork. Otherwise, if the Param_addressfamily is InterNetworkV6, this will be of type DhcpUserClassV6.

The following are the processing steps involved:

  1. Look up the server entry in ADM_DHCPServersTable having RecordId equal to Param_serverRecordId.

  2. If the entry is not found, set Result_userClass to NULL and return.

  3. Look up the UserClasses of the server row for the user class with RecordId value being Param_userClassRecordId.

  4. If the entry is not found, set Result_userClass to NULL and return.

  5. If Param_addressfamily is InterNetwork, initialize Result_userClass to DhcpUserClassV4. If Param_addressfamily is InterNetworkV6, initialize Result_userClass to DhcpUserClassV6.

  6. Copy the user class details to Result_userClass.

  7. Return Result_userClass as the output parameter of the procedure.