<div class="content" name="DHCP_SUBNET_ELEMENT_DATA_V4" uuid="76963288-4666-4dc8-b649-77fd7032bdf7"><p>The <b>DHCP_SUBNET_ELEMENT_DATA_V4</b> structure defines the
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 elements for the subnet. This structure is an extension of the <a href="5ce2002b-fd0c-4776-805a-e87546616581" data-linktype="relative-path">DHCP_SUBNET_ELEMENT_DATA (section 2.2.1.2.33)</a>
structure and is used in the method <a href="429f7260-b473-4f0f-be5f-f07d05cfc0b2" data-linktype="relative-path">R_DhcpAddSubnetElementV4 (section 3.1.4.30)</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_V4 {
     DHCP_SUBNET_ELEMENT_TYPE ElementType;
     [switch_is(ELEMENT_MASK(ElementType)), switch_type(DHCP_SUBNET_ELEMENT_TYPE)]
     union _DHCP_SUBNET_ELEMENT_UNION_V4 {
         [case(DhcpIpRanges)] DHCP_IP_RANGE *IpRange;
         [case(DhcpSecondaryHosts)]  DHCP_HOST_INFO *SecondaryHost;
         [case(DhcpReservedIps)] DHCP_IP_RESERVATION_V4 *ReservedIp;
         [case(DhcpExcludedIpRanges)] DHCP_IP_RANGE *ExcludeIpRange;
         [case(DhcpIpUsedClusters)] DHCP_IP_CLUSTER *IpUsedCluster;
     } Element;
  } DHCP_SUBNET_ELEMENT_DATA_V4, *LPDHCP_SUBNET_ELEMENT_DATA_V4;
</pre></div>
</dd></dl><p><b>ElementType:</b>  This is of type <a href="c2ff4890-adad-4906-bb96-d9417f24545a" data-linktype="relative-path">DHCP_SUBNET_ELEMENT_TYPE (section 2.2.1.1.7)</a>
enumeration, defining the set of possible IPv4 subnet element types. This value
defines which of the values is chosen from the subsequent union, the <b>Element</b>
member.</p><p><b>Element:</b>  Element is a union of
different types of IPv4 subnet elements. The value of the union is dependent on
the previous field, <i>ElementType</i>.</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>
structure, 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 DHCPv4 server.</td>
 </tr><tr>
  <td>DhcpIpRangesDhcpOnly 5</td>
  <td>The configuration parameter is an IP range of a DHCPv4 scope configured on the DHCPv4 server that MUST be used only for assignment of addresses to DHCPv4 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 DHCPv4 server that can be used for assignment of addresses to both DHCPv4 and BOOTP.</td>
 </tr><tr>
  <td>DhcpIpRangesBootpOnly 7</td>
  <td>The configuration parameter is an IP range of a DHCPv4 scope configured on the DHCPv4 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 <a href="51e16f4a-cb1d-400a-85c7-defe4cba1609" data-linktype="relative-path">DHCP_HOST_INFO (section 2.2.1.2.7)</a>
structure and is not used. If the ElementType value mandates that the <b>SecondaryHost</b>
element is to be used in any method, the method will return
ERROR_CALL_NOT_IMPLEMENTED or ERROR_NOT_SUPPORTED, as specified in the processing
rules of methods that use the DHCP_SUBNET_ELEMENT_DATA_V4 structure.</p><p><b>ReservedIp:</b>  This is of type <a href="e78d3149-d39a-49bf-b84c-a1cff572a3aa" data-linktype="relative-path">DHCP_IP_RESERVATION_V4 (section 2.2.1.2.32)</a>
structure, containing the IPv4 reservation.</p><p><b>ExcludeIpRange:</b>  This is of type <b>DHCP_IP_RANGE</b>
structure, containing the IPv4 exclusion range.</p><p><b>IpUsedCluster:</b>  This is of type <a href="53387878-4f14-4606-b0f2-726fcb088d5f" data-linktype="relative-path">DHCP_IP_CLUSTER (section 2.2.1.2.88)</a>
structure 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>