3.2.4.80 R_DhcpSetSubnetDelayOffer (Opnum 79)

The R_DhcpSetSubnetDelayOffer method sets/modifies the time delay setting on the DHCPv4 server, which is used in responding to a DHCPDISCOVER message [RFC2131]. This setting is configured for a specific scope.

 DWORD R_DhcpSetSubnetDelayOffer(
     [in, unique, string]  DHCP_SRV_HANDLE ServerIpAddress,
     [in]    DHCP_IP_ADDRESS SubnetAddress,
     [in]    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 of type USHORT and contains the value of the time delay in milliseconds, set for a specific scope.

Value (milliseconds)

Description

0

Minimum Delay (default)

1000

Maximum Delay

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.

0x00004E7C

ERROR_DHCP_INVALID_DELAY

The specified delay value is invalid, it is greater than the maximum delay of 1000 milliseconds.

The opnum field value for this method is 79.

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

  • Validate if this method is authorized for read/write access per section 3.5.5. If not, return error ERROR_ACCESS_DENIED.

  • If the time delay value in TimeDelayInMilliseconds is greater than the DHCP_MAX_DELAY, return ERROR_DHCP_INVALID_DELAY.

    FLAG

    VALUE

    DHCP_MAX_DELAY

    1000 milliseconds

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

  • Set/Modify the DHCPv4Scope.DelayOffer with the TimeDelayInMilliseconds input parameter.

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