3.2.4.126 R_DhcpV4FailoverGetAddressStatus (Opnum 125)

The R_DhcpV4FailoverGetAddressStatus method queries the current address status for an address belonging to a subnet that is part of a failover relationship on the DHCP server.

 DWORD R_DhcpV4FailoverGetAddressStatus(
     [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
     [in] DHCP_IP_ADDRESS SubnetAddress,
     [out] LPDWORD pStatus
 );

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

SubnetAddress: This is of type DHCP_IP_ADDRESS (section 2.2.1.2.1) and identifies the IPv4 address the status of which is to be queried.

pStatus: The out parameter, which represents the status of the address in the failover relationship.

Return Values: A 32-bit unsigned integer value that indicates return status. A return value of ERROR_SUCCESS (0x00000000) indicates that the operation was completed successfully. Otherwise, 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 to any generic failure.

Return value/code

Description

0x00000000

ERROR_SUCCESS

The call completed successfully.

0x00000057

ERROR_INVALID_PARAMETER

An invalid parameter is specified in the Address parameter.

0x00004E94

ERROR_DHCP_FO_SCOPE_NOT_IN_RELATIONSHIP

The subnet associated with the address is not part of a failover relationship.

The opnum field value for this method is 125.

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

  • Validate that this method is authorized for read access as specified in section 3.5.5. If not, return the error ERROR_ACCESS_DENIED.

  • Search for the subnet associated with the given address. If no subnet is found, return ERROR_INVALID_PARAMETER.

  • Validate that the subnet for the given address belongs to a failover relationship. If it does not, return ERROR_DHCP_FO_SCOPE_NOT_IN_RELATIONSHIP.

  • Set the value of the pStatus field depending on the address state. The following table shows the list of possible values.

    Value

    Description

    0

    The address is owned by the primary server

    1

    The address is owned by the secondary server.

    2

    The address is excluded for allocation.

    3

    The address is reserved for allocation.

  • Return ERROR_SUCCESS.

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