3.1.1.1.17.2.4 GetOptionDefinitionFromServer

The GetOptionDefinitionFromServer procedure can be used to retrieve a specific DhcpOptionDefinition in the form of either DhcpOptionDefinitionV4 or DhcpOptionDefinitionV6, 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 vendor class information is to be retrieved.

Param_optionDefinitionId: The record identifier of the option definition instance that is being requested.

The following is the output of this procedure.

Result_optionDefinition: This will be of type DhcpOptionDefinitionV4 if the Param_addressfamily is InterNetwork. Otherwise, if the Param_addressfamily is InterNetworkV6, this will be of type DhcpOptionDefinitionV6.

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_optionDefinition to NULL and return.

  3. Look up the OptionDefinitions of the server row for the user class with RecordId value being Param_optionDefinitionId.

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

  5. If Param_addressfamily is InterNetwork, initialize Result_optionDefinition to DhcpOptionDefinitionV4. If Param_addressfamily is InterNetworkV6, initialize Result_optionDefinition to DhcpOptionDefinitionV6.

  6. Copy the option definition details to Result_optionDefinition.

  7. If VendorClassRecordId is also set, call the procedure GetVendorClassFromServer passing the following parameters:

    1. Param_addressfamily

    2. VendorClassRecordId as Param_vendorClassRecordId

    3. Param_serverRecordId

  8. Set Result_vendorClass received to Result_optionDefinition.VendorClass.

  9. Return Result_optionDefinition as the output parameter of the procedure.