3.2.4.81 R_DhcpGetSubnetDelayOffer (Opnum 80)

The R_DhcpGetSubnetDelayOffer method retrieves the time delay setting from the DHCPv4 server, which is used in responding to a DHCPDISCOVER message [RFC2131] for a specific scope.

 DWORD R_DhcpGetSubnetDelayOffer(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in] DHCP_IP_ADDRESS SubnetAddress,
   [out] USHORT* TimeDelayInMilliseconds
 );

ServerIpAddress: The IP address/host name of the DHCP server. This parameter is unused.

SubnetAddress: This is of type DHCP_IP_ADDRESS (section 2.2.1.2.1), which contains the IPv4 subnet ID for which the subnet delay time is set.

TimeDelayInMilliseconds: This is a pointer of the type USHORT, which provides the value of the time delay in milliseconds set for a specific scope.

Return Values: A 32-bit unsigned integer value that indicates return status. A return value ERROR_SUCCESS (0x00000000) indicates that the operation was completed successfully; else it contains a Win32 error code, as specified in [MS-ERREF]. This error code value can correspond to a DHCP-specific failure, which takes a value between 20000 and 20099, or any generic failure.

Return value/code

Description

0x00000000

ERROR_SUCCESS

The call was successful.

0x00004E25

ERROR_DHCP_SUBNET_NOT_PRESENT

The specified subnet is not defined on the DHCP server.

The opnum field value for this method is 80.

When processing this call, the DHCP server MUST do the following:

  • Validate whether this method is authorized for read access per section 3.5.4. If not, return error ERROR_ACCESS_DENIED.

  • Retrieve the DHCPv4Scope entry that has the subnet ID equal to SubnetAddress from the server ADM element DHCPv4ScopesList.

  • If the DHCPv4Scope entry that has the subnet ID equal to SubnetAddress is not found, return ERROR_DHCP_SUBNET_NOT_PRESENT.

  • Retrieve the ADM element DHCPv4Scope.DelayOffer and return it to the caller.

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].