Skip to content

Latest commit

 

History

History
149 lines (110 loc) · 5.1 KB

nf-dhcpsapi-dhcpenumsubnetclientsv5.md

File metadata and controls

149 lines (110 loc) · 5.1 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:dhcpsapi.DhcpEnumSubnetClientsV5
DhcpEnumSubnetClientsV5 function (dhcpsapi.h)
Returns an enumerated list of clients with served IP addresses in the specified subnet.
DhcpEnumSubnetClientsV5
DhcpEnumSubnetClientsV5 function [DHCP]
dhcp.dhcpenumsubnetclientsv5
dhcpsapi/DhcpEnumSubnetClientsV5
dhcp\dhcpenumsubnetclientsv5.htm
DHCP
34be1d6d-10d5-4025-abc6-29857417e081
12/05/2018
DhcpEnumSubnetClientsV5, DhcpEnumSubnetClientsV5 function [DHCP], dhcp.dhcpenumsubnetclientsv5, dhcpsapi/DhcpEnumSubnetClientsV5
dhcpsapi.h
Windows
None supported
Windows Server 2008 R2 [desktop apps only]
Dhcpsapi.lib
Dhcpsapi.dll
Windows
19H1
DhcpEnumSubnetClientsV5
dhcpsapi/DhcpEnumSubnetClientsV5
c++
APIRef
kbSyntax
DllExport
Dhcpsapi.dll
DhcpEnumSubnetClientsV5

DhcpEnumSubnetClientsV5 function

-description

The DhcpEnumSubnetClientsV5 function returns an enumerated list of clients with served IP addresses in the specified subnet. This function extends the features provided in the DhcpEnumSubnetClients function by returning a list of DHCP_CLIENT_INFO_V5 structures that contain the specific client type (DHCP and/or BOOTP) and the IP address state.

-parameters

-param ServerIpAddress [in]

A UNICODE string that specifies the IP address or hostname of the DHCP server.

-param SubnetAddress [in]

A value containing the IP address of the subnet gateway. If this parameter is set to 0, then the DHCP clients for all IPv4 subnets defined on the DHCP server are returned.

-param ResumeHandle [in, out]

A pointer to a handle that identifies the enumeration operation. Initially, this value should be zero, with a successful call returning the handle value used for subsequent enumeration requests. For example, if PreferredMaximum is set to 1000 bytes, and 2000 bytes worth of subnet client information structures are stored on the server, the resume handle can be used after the first 1000 bytes are retrieved to obtain the next 1000 on a subsequent call, and so forth.

-param PreferredMaximum [in]

The preferred maximum number of bytes of subnet client information structures to return. If the number of remaining unenumerated options (in bytes) is less than this value, then that amount will be returned.

-param ClientInfo [out]

A pointer to a DHCP_CLIENT_INFO_ARRAY_V5 structure containing information on the clients served under this specific subnet. If no clients are available, this field will be null.

-param ClientsRead [out]

A pointer to a value that specifies the number of clients returned in ClientInfo.

-param ClientsTotal [out]

A pointer to a value that specifies the total number of clients for the specified subnet stored on the DHCP server.

-returns

The DhcpEnumSubnetClientsV5 function returns ERROR_SUCCESS upon success.

On error, the function returns one of the DHCP Server Management API Error Codes.

Return code Description
ERROR_ACCESS_DENIED
The 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 still un-enumerated client lease records on the DHCP server for the provided IPv4 subnet. Please call this function again with the returned resume handle to obtain more of them.

-remarks

The caller of this function must release the memory used by the DHCP_CLIENT_INFO_ARRAY_V5 structure returned in buffer pointed to by the ClientInfo parameter when the information is no longer needed.

-see-also

DHCP_CLIENT_INFO_ARRAY_V5

DHCP_IP_ADDRESS

DHCP_RESUME_HANDLE

DhcpEnumSubnetClients