3.2.4.74 R_DhcpDeleteClientInfoV6 (Opnum 73)
The R_DhcpDeleteClientInfoV6 method deletes the specified DHCPv6 client address lease record from the DHCPv6 server database.
-
DWORD R_DhcpDeleteClientInfoV6( [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress, [in, ref] LPDHCP_SEARCH_INFO_V6 ClientInfo );
ServerIpAddress: The IP address/host name of the DHCP server. This parameter is unused.
ClientInfo: This is a pointer to a structure DHCP_SEARCH_INFO_V6 (section 2.2.1.2.69) that defines the key to be used to search the DHCPv6 client lease record that needs to be deleted on the DHCPv6 server.
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.
0x00004E2D
ERROR_DHCP_JET_ERROR
An error occurred while accessing the DHCP server database or the client entry is not present in the database.
0x00004E36
ERROR_DHCP_RESERVEDIP_EXISTS
There exists a reservation for the leased address.
The opnum field value for this method is 73.
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 the error ERROR_ACCESS_DENIED.
If SearchType is not Dhcpv6ClientIpAddress, return ERROR_INVALID_PARAMETER.
If the ClientInfo corresponds to a DHCPv6ClientInfo object that corresponds to an entry in DHCPv6Scope.DHCPv6ReservationList, return ERROR_DHCP_RESERVEDIP_EXITS.<70>
If the DHCPv6 client lease address state as specified in DHCPv6Scope.DHCPv6ClientInfoList.DHCPv6ClientInfo.DHCPv6ClientInfoAddressState has DHCPV6_ADDRESS_BIT_BOTH_REC and DHCPV6_ADDRESS_BIT_CLEANUP (section 3.1.1.32) set to 1, then delete both AAAA and PTR resource records by sending the message for DNS PTR and AAAA ([RFC3596] section 2) resource record deletion ([RFC1035] sections 3.3 and 4.1, and [RFC2136] sections 2.5 and 3.4) with the data shown in the table that follows. If the DHCPv6 client lease address state as specified in DHCPv6Scope.DHCPv6ClientInfoList.DHCPv6ClientInfo.DHCPv6ClientInfoAddressState has DHCPV6_ADDRESS_BIT_CLEANUP set to 1 and DHCPV6_ADDRESS_BIT_BOTH_REC (section 3.1.1.32) set to 0, then delete PTR resource record by sending the message for DNS PTR resource record deletion ([RFC1035] sections 3.3 and 4.1, and [RFC2136] sections 2.5 and 3.4) with the data shown in the table that follows. The message for deletion of the DNS PTR record is sent to the DNS server(s) configured as the DNS server option (option 23) value ([RFC3646] section 3) in DHCPv6Scope.DHCPv6ScopeOptValuesList. If the DNS server option value is not found in DHCPv6Scope.DHCPv6ScopeOptValuesList, then the message for deletion of the DNS resource record is sent to the DNS server(s) configured as DNS server option value in DHCPv6ServerOptValueList. If the DNS server option value is also not found in DHCPv6ServerOptValueList, then the message for deletion of the DNS resource record is sent to the DNS server configured on the network interface(s) of the DHCP server.
The DNS message is sent to the DNS server by using the transport specified in [RFC1035] section 4.2.
The DNS AAAA resource record is populated with the following information for a delete message:
DNS Fields
Values
NAME ([RFC1035] sections 3.3 and 4.1, [RFC2136] section 2, and [RFC3596])
If the ClientInfo parameter has SearchType as Dhcpv6ClientIpAddress, then obtain the client name from the DHCPv6ClientInfo ADM element to populate this field.
The DNS PTR resource record is populated with the following information for delete message:
DNS Fields
Values
NAME ([RFC1035] sections 3.3 and 4.1, [RFC2136] section 2.5, and [RFC3596])
The IPv6 address in the ClientIpAddress field of the ClientInfo parameter is used to populate this field.
Delete the DHCPv6ClientInfo object from DHCPv6ClientInfoList.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].