Windows Dev Center

Expand Minimize

DhcpEnumFilterV4 function

The DhcpEnumFilterV4 function enumerates all of the filter records from the DHCP server's allow or deny list.

Syntax


DWORD WINAPI DhcpEnumFilterV4(
  _In_    DHCP_CONST WCHAR        *ServerIpAddress,
  _Inout_ LPDHCP_ADDR_PATTERN     ResumeHandle,
  _In_    DWORD                   PreferredMaximum,
  _In_    DHCP_FILTER_LIST_TYPE   ListType,
  _Out_   LPDHCP_FILTER_ENUM_INFO *EnumFilterInfo,
  _Out_   DWORD                   *ElementsRead,
  _Out_   DWORD                   *ElementsTotal
);

Parameters

ServerIpAddress [in]

Pointer to a Unicode string that specifies the IP address or hostname of the DHCP server.

ResumeHandle [in, out]

Pointer to a DHCP_ADDR_PATTERN structure that identifies the enumeration operation. Initially this parameter must be set to zero (0), with a successful call returning the address/pattern value used for subsequent enumeration requests.

PreferredMaximum [in]

A DWORD value that specifies the preferred maximum number of bytes to return. If the number of remaining unenumerated filter information size is less than this value, then all the filters configured on the particular list on the DHCP server are returned. The maximum value for this is 64 (kilobytes), and the minimum value is 1 (kilobyte).

ListType [in]

A DHCP_FILTER_LIST_TYPE that specifies the list of filters to be enumerated.

EnumFilterInfo [out]

Pointer to the address of an array of DHCP_FILTER_ENUM_INFO structures that contain the returned link-layer filter information configured on the DHCP server.

ElementsRead [out]

Pointer to a DWORD value that specifies the number of link-layer filter entries returned in EnumFilterInfo.

ElementsTotal [out]

Pointer to a DWORD value that specifies the number of link-layer filter entries defined on the DHCP server that have not yet been enumerated.

Return value

This function returns ERROR_SUCCESS upon a successful call. Otherwise, it returns one of the DHCP Server Management API Error Codes.

Return codeDescription
ERROR_ACCESS_DENIED

This call was performed by a client who is not a member of the "DHCP Administrators" security group.

ERROR_DHCP_JET_ERROR

An error occurred while accessing the DHCP server's database.

ERROR_MORE_DATA

There are no more elements available for enumeration.

ERROR_NO_MORE_ITEMS

There are no more elements left to enumerate.

 

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Dhcpsapi.h

Library

Dhcpsapi.lib

DLL

Dhcpsapi.dll

See also

DHCP_FILTER_LIST_TYPE
DHCP_FILTER_ENUM_INFO

 

 

Community Additions

ADD
Show:
© 2015 Microsoft