<div class="content" name="DHCP_SUBNET_ELEMENT_DATA" uuid="5ce2002b-fd0c-4776-805a-e87546616581"><p>The <b>DHCP_SUBNET_ELEMENT_DATA</b> structure defines the
elements of an IPv4 <a href="a9d6a415-4de6-4058-befe-ca2e42764485#gt_4e525014-9425-4eb0-9141-61189c4f04f9" data-linktype="relative-path">reservation</a>,
IPv4 <a href="a9d6a415-4de6-4058-befe-ca2e42764485#gt_64d30865-9640-4009-a80a-861966749767" data-linktype="relative-path">exclusion range</a>, or
IPv4 range for the subnet. This structure is used in methods <b>R_DhcpAddSubnetElement</b> (section <a href="d9fde2eb-da3d-48ad-9f4a-2d5e575b5a0b" data-linktype="relative-path">3.1.4.5</a>) and <b>R_DhcpRemoveSubnetElement</b> (section <a href="e7116394-305d-4733-8885-d7ef96eafa6a" data-linktype="relative-path">3.1.4.7</a>).</p><dl>
<dd>
<div><pre> #define ELEMENT_MASK(E) ((((E) &lt;= DhcpIpRangesBootpOnly) \
     &amp;&amp; (DhcpIpRangesDhcpOnly &lt;= (E)))?(0):(E))
 typedef struct _DHCP_SUBNET_ELEMENT_DATA {
     DHCP_SUBNET_ELEMENT_TYPE ElementType;
     [switch_is(ELEMENT_MASK(ElementType)), switch_type(DHCP_SUBNET_ELEMENT_TYPE)]
     union _DHCP_SUBNET_ELEMENT_UNION {
         [case(DhcpIpRanges)] DHCP_IP_RANGE *IpRange;
         [case(DhcpSecondaryHosts)] DHCP_HOST_INFO *SecondaryHost;
         [case(DhcpReservedIps)] DHCP_IP_RESERVATION *ReservedIp;
         [case(DhcpExcludedIpRanges)] DHCP_IP_RANGE *ExcludeIpRange;
         [case(DhcpIpUsedClusters)] DHCP_IP_CLUSTER *IpUsedCluster;
     } Element;
 } DHCP_SUBNET_ELEMENT_DATA, *LPDHCP_SUBNET_ELEMENT_DATA;
</pre></div>
</dd></dl><p><b>ElementType:</b>  This is of type
DHCP_SUBNET_ELEMENT_TYPE (section<b> </b><a href="c2ff4890-adad-4906-bb96-d9417f24545a" data-linktype="relative-path">2.2.1.1.7</a>) enumeration,
defining the set of possible subnet element types. This value defines which of
the values is chosen from the subsequent union <b>Element</b> member.</p><p><b>Element:</b>  <b>Element</b> is a union
of subnet elements. The value of the union is dependent on the previous field
the <b>ElementType</b> member.</p><p><b>ELEMENT_MASK:</b> A macro that causes Element to
assume the type <b>DHCP_IP_RANGE*</b> for the ElementType values
DhcpIpRangesDhcpOnly, DhcpIpRangesDhcpBootp, and DhcpIpRangesBootpOnly.</p><p><b>IpRange:</b>  This is of type <a href="29a03b34-249e-4bd8-a118-e708dadbf22b" data-linktype="relative-path">DHCP_IP_RANGE (section 2.2.1.2.31)</a>,
containing the IPv4 range for the IPv4 subnet. This contains the range for the
following valid enumeration values.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>DHCP_SUBNET_ELEMENT_TYPE</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>DhcpIpRanges 0</td>
  <td>The configuration parameter is the IP range of a DHCPv4 scope configured on the DHCP server.</td>
 </tr><tr>
  <td>DhcpIpRangesDhcpOnly 5</td>
  <td>The configuration parameter is an IP range of a DHCPv4 scope configured on the DHCP server that MUST be used only for assignment of addresses to DHCP clients on the subnet. The IP addresses from this range MUST NOT be assigned to BOOTP clients ([RFC2132]).</td>
 </tr><tr>
  <td>DhcpIpRangesDhcpBootp 6</td>
  <td>The configuration parameter is an IP range of a DHCPv4 scope configured on the DHCP server that can be used for assignment of addresses to both DHCP and BOOTP.</td>
 </tr><tr>
  <td>DhcpIpRangesBootpOnly 7</td>
  <td>The configuration parameter is an IP range of a DHCPv4 scope configured on the DHCP server that MUST be used only for assignment of IPv4 addresses to BOOTP clients.</td>
 </tr></tbody></table>
</dd></dl><p><b>SecondaryHost:</b>  This is of type <b>DHCP_HOST_INFO</b> (section<b> </b><a href="51e16f4a-cb1d-400a-85c7-defe4cba1609" data-linktype="relative-path">2.2.1.2.7</a>) and is not
used. If the ElementType value mandates that the <b>SecondaryHost</b> element
is to be used in any method, that method will return ERROR_CALL_NOT_IMPLEMENTED
or ERROR_NOT_SUPPORTED, as specified in the processing rules of methods that
use the <b>DHCP_SUBNET_ELEMENT_DATA</b> structure.</p><p><b>ReservedIp:</b>  This is of type <b>DHCP_IP_RESERVATION</b> (section<b> </b><a href="ad3c18e8-8a7a-49ef-8a8f-16c3f157ac7c" data-linktype="relative-path">2.2.1.2.10</a>), containing
the IPv4 reservation.</p><p><b>ExcludeIpRange:</b>  This is of type <b>DHCP_IP_RANGE</b>,
containing the IPv4 exclusion range.</p><p><b>IpUsedCluster:</b>  This is of type <b>DHCP_IP_CLUSTER</b> (section <a href="53387878-4f14-4606-b0f2-726fcb088d5f" data-linktype="relative-path">2.2.1.2.88</a>) and is not
used. If the <b>ElementType</b> member mandates this element to be used in any
method, the method will return ERROR_INVALID_PARAMETER.</p></div>