3.2.4.84 R_DhcpDeleteFilterV4 (Opnum 83)

The R_DhcpDeleteFilterV4 method is used to delete a link-layer address/pattern from allow list or deny list. This method is also used to delete an exemption of a hardware type from filtering. However, hardware type 1 (Ethernet 10 Mb) cannot be exempted, and this method cannot be used to delete them.

 DWORD R_DhcpDeleteFilterV4(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in] DHCP_ADDR_PATTERN* DeleteFilterInfo
 );

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

DeleteFilterInfo: This is a pointer to a DHCP_ADDR_PATTERN (section 2.2.1.2.89) that contains link-layer address/pattern information to be deleted from the database, from the allow or deny lists. It can also contain hardware type information to be deleted from the database, from the allow list.

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.

0x00004E7F

ERROR_DHCP_LINKLAYER_ADDRESS_DOES_NOT_EXIST

Address or Address pattern is not contained in any of the list.

0x00000057

ERROR_INVALID_PARAMETER

Invalid input - address/pattern

0x00004E86

ERROR_DHCP_UNDEFINED_HARDWARE_ADDRESS_TYPE

Hardware type not present in the exemption list.

The opnum field value for this method is 83.

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

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

  • If DeleteFilterInfo is NULL, return ERROR_INVALID_PARAMETER.

  • If the MatchHWType field of DeleteFilterInfo is FALSE, return ERROR_INVALID_PARAMETER.

  • An exemption for hardware types other than hardware type 1 (Ethernet 10 Mb) can be deleted if the AddrPatt member of the DeleteFilterInfo parameter contains an HWType value other than 1 and the value of the IsWildCard member of DeleteFilterInfo is TRUE, the hardware type specified by ListType is allowed, and the value of the Length member is 0. For any other value of IsWildCard or Length, return ERROR_INVALID_PARAMETER.

  • If the AddrPatt member specified in DeleteFilterInfo contains an HWType value of 1, the value of the IsWildCard member of DeleteFilterInfo is FALSE, and the Length value is not equal to 6, return ERROR_INVALID_PARAMETER.

  • If the AddrPatt member specified in DeleteFilterInfo contains an HWType value of 1, the value of the IsWildCard member of AddFilterInfo is TRUE, and the Length value is greater than 5 or less than 1, return ERROR_INVALID_PARAMETER.

  • Iterate through the server ADM element DHCPv4FiltersList and if there is no DHCPv4Filter entry that has a AddrPatt.Pattern field matching the  AddrPatt.Pattern field of DeleteFilterInfo input parameter and the AddrPatt.HwType field matches the AddrPatt.HwType field of DeleteFilterInfo input parameter, then return ERROR_DHCP_LINKLAYER_ADDRESS_DOES_NOT_EXIST. Else, delete the DHCPv4Filter entry from the DHCPv4FiltersList.

  • If the AddrPatt.HwType field of the DeleteFilterInfo input parameter is not equal to 1 and there is no DHCPv4Filter entry that has a AddrPatt.HwType field matching the AddrPatt.HwType field of DeleteFilterInfo input parameter, return ERROR_DHCP_UNDEFINED_HARDWARE_ADDRESS_TYPE. Else, delete the DHCPv4Filter entry from the DHCPv4FiltersList.

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