3.2.4.96 R_DhcpV4FailoverDeleteScopeFromRelationship (Opnum 95)
The R_DhcpV4FailoverDeleteScopeFromRelationship method is used to delete one or more scopes from an existing failover relationship.
-
DWORD R_DhcpV4FailoverDeleteScopeFromRelationship( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in] LPDHCP_FAILOVER_RELATIONSHIP pRelationship );
ServerIpAddress: The IP address/host name of the DHCP server. This parameter is unused.
pRelationship: This is a pointer to a type DHCP_FAILOVER_RELATIONSHIP structure (section 2.2.1.2.98) that contains information about the failover relationship from which scopes as specified in pScopes member of pRelationship.parameter are to be deleted.
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 20123, or any generic failure.
-
Return value/code
Description
0x00000000
ERROR_SUCCESS
The call was successful.
0x00004E25
ERROR_DHCP_SUBNET_NOT_PRESENT
IPv4 scope doesn't exist on the DHCPv4 server.
0x00004E92
ERROR_DHCP_FO_RELATIONSHIP_DOES_NOT_EXIST
Failover relationship doesn't exist.
0x00004E94
ERROR_DHCP_FO_SCOPE_NOT_IN_RELATIONSHIP
IPv4 subnet is not part of the failover relationship.
0x00004EA5
ERROR_DHCP_FO_SCOPE_SYNC_IN_PROGRESS
Failover relationship is being re-integrated with the failover partner server.
The opnum field value for this method is 95.
When processing this call, the DHCP server MUST do the following:
Return ERROR_INVALID_PARAMETER if any of the following are true:
pRelationship parameter is NULL.
relationshipName member of pRelationship parameter is NULL.
pScopes member of pRelationship parameter is NULL.
NumElements member of pScopes member as pointed by pRelationship parameter is 0.
Validate whether this method is authorized for read/write access as specified in section 3.5.5. If not, return ERROR_ACCESS_DENIED.
Iterate through the DHCPv4ScopesList ADM element on the DHCPv4 server and if any of the IPv4 subnet addresses in the pScopes member of pRelationship parameter doesn't have a corresponding DHCPv4ScopesList.DHCPv4Scope ADM element on the DHCPv4 server, return ERROR_DHCP_SUBNET_NOT_PRESENT.
For any of the IPv4 subnet addresses passed in pScopes member of pRelationship parameter, if the corresponding DHCPv4Scope.DHCPv4IpRange ADM element is of type DhcpIpRangesBootpOnly enumeration value (section 2.2.1.2.38), return ERROR_INVALID_PARAMETER.
If there are no elements in DHCPv4FailoverRelationshipList ADM element, return ERROR_FILE_NOT_FOUND.
Iterate through the server ADM element DHCPv4FailoverRelationshipList, and retrieve the DHCPv4FailoverRelationship ADM element corresponding to relationshipName member of pRelationship parameter. If the corresponding ADM element DHCPv4FailoverRelationship is not found, return ERROR_DHCP_FO_RELATIONSHIP_DOES_NOT_EXIST.
If any of the IPv4 subnet addresses passed in pScopes member of pRelationship parameter is not configured on the retrieved DHCPv4FailoverRelationship ADM element, return ERROR_DHCP_FO_SCOPE_NOT_IN_RELATIONSHIP, or, if the relationship is re-integrating with the partner server, return ERROR_DHCP_FO_SCOPE_SYNC_IN_PROGRESS. Otherwise, remove all the IPv4 subnets addresses in the pScopes member of pRelationship parameter from the retrieved DHCPv4FailoverRelationship ADM element's pScope member.
For each of the input IPv4 subnet addresses passed in pScopes member in pRelationship parameter, iterate through the DHCPv4ScopesList ADM element and retrieve the corresponding DHCPv4Scope ADM element and set DHCPv4Scope.IsFailover ADM element to FALSE.
Return ERROR_SUCCESS.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].