Skip to content

Latest commit

 

History

History
201 lines (169 loc) · 5.09 KB

nf-dhcpsapi-dhcpaddsubnetelementv4.md

File metadata and controls

201 lines (169 loc) · 5.09 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.DhcpAddSubnetElementV4
DhcpAddSubnetElementV4 function (dhcpsapi.h)
Adds an element describing a feature or aspect of the subnet to the subnet entry in the DHCP database. This function extends DhcpAddSubnetElement by incorporating subnet elements that consider client type.
DhcpAddSubnetElementV4
DhcpAddSubnetElementV4 function [DHCP]
dhcp.dhcpaddsubnetelementv4
dhcpsapi/DhcpAddSubnetElementV4
dhcp\dhcpaddsubnetelementv4.htm
DHCP
97ffcafd-a74e-49ed-9e68-043b62a9017a
12/05/2018
DhcpAddSubnetElementV4, DhcpAddSubnetElementV4 function [DHCP], dhcp.dhcpaddsubnetelementv4, dhcpsapi/DhcpAddSubnetElementV4
dhcpsapi.h
Windows
None supported
Windows Server 2008 R2 [desktop apps only]
Dhcpsapi.lib
Dhcpsapi.dll
Windows
19H1
DhcpAddSubnetElementV4
dhcpsapi/DhcpAddSubnetElementV4
c++
APIRef
kbSyntax
DllExport
Dhcpsapi.dll
DhcpAddSubnetElementV4

DhcpAddSubnetElementV4 function

-description

The DhcpAddSubnetElementV4 function adds an element describing a feature or aspect of the subnet to the subnet entry in the DHCP database. This function extends DhcpAddSubnetElement by incorporating subnet elements that consider client type.

Note  This function is not available in Windows previous to Windows NT 4.0 Service Pack 1.
 

-parameters

-param ServerIpAddress [in]

Pointer to a Unicode string that contains the IP address of the subnet DHCP server.

-param SubnetAddress [in]

DHCP_IP_ADDRESS structure that contains the IP address of the subnet.

-param AddElementInfo [in]

DHCP_SUBNET_ELEMENT_DATA_V4 structure that contains the element data to add to the subnet. The V4 structure adds support for differentiation between DHCP and BOOTP clients.

-returns

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

Return code Description
ERROR_DHCP_JET_ERROR
An error occurred while accessing the DHCP server database.
ERROR_DHCP_SUBNET_NOT_PRESENT
The specified IPv4 subnet does not exist.
ERROR_DHCP_OPTION_NOT_PRESENT
The specified option definition does not exist in the DHCP server database.
ERROR_DHCP_INVALID_RANGE
The specified IPv4 address range either overlaps an existing range or is not valid.
ERROR_DHCP_IPRANGE_CONV_ILLEGAL
Conversion of a scope to a DHCPv4-only scope or to a BOOTP-only scope is not allowed when DHCPv4 and BOOTP clients are present in the scope to convert. Manually delete either the DHCPv4 or the BOOTP clients from the scope, as appropriate for the type of scope being created.
ERROR_DHCP_IPRANGE_EXISTS
The specified IPv4 address range already exists.
ERROR_DHCP_MSCOPE_RANGE_TOO_SMALL
The multicast scope range must allow for at least 256 IPv4 addresses.
ERROR_DHCP_NOT_RESERVED_CLIENT
The specified DHCPv4 client is not an IPv4 reserverdclient.
ERROR_DHCP_RESERVEDIP_EXISTS
The specified IPv4 address or hardware address is in use by another DHCPv4 client.
ERROR_DHCP_ADDRESS
The specified address is not available.

-see-also

DHCP_SUBNET_ELEMENT_DATA_V4

DhcpAddSubnetElement

DhcpAddSubnetElementV5