DHCP_OPTION_DATA_ELEMENT structure (dhcpsapi.h)
The DHCP_OPTION_DATA_ELEMENT structure defines a data element present (either singly or as a member of an array) within a DHCP_OPTION_DATA structure.
Syntax
typedef struct _DHCP_OPTION_DATA_ELEMENT {
DHCP_OPTION_DATA_TYPE OptionType;
#if ...
union {
BYTE ByteOption;
WORD WordOption;
DWORD DWordOption;
DWORD_DWORD DWordDWordOption;
DHCP_IP_ADDRESS IpAddressOption;
LPWSTR StringDataOption;
DHCP_BINARY_DATA BinaryDataOption;
DHCP_BINARY_DATA EncapsulatedDataOption;
LPWSTR Ipv6AddressDataOption;
} Element;
#if ...
_DHCP_OPTION_ELEMENT_UNION _DHCP_OPTION_ELEMENT_UNION;
#else
union {
BYTE ByteOption;
WORD WordOption;
DWORD DWordOption;
DWORD_DWORD DWordDWordOption;
DHCP_IP_ADDRESS IpAddressOption;
LPWSTR StringDataOption;
DHCP_BINARY_DATA BinaryDataOption;
DHCP_BINARY_DATA EncapsulatedDataOption;
LPWSTR Ipv6AddressDataOption;
} Element;
#endif
#else
_DHCP_OPTION_ELEMENT_UNION _DHCP_OPTION_ELEMENT_UNION;
#endif
} DHCP_OPTION_DATA_ELEMENT, *LPDHCP_OPTION_DATA_ELEMENT;
Members
OptionType
A DHCP_OPTION_DATA_TYPE enumeration value that indicates the type of data that is present in the subsequent field, Element.
Element
Element.ByteOption
Specifies the data as a BYTE value. This field will be present if the OptionType is DhcpByteOption.
Element.WordOption
Specifies the data as a WORD value. This field will be present if the OptionType is DhcpWordOption.
Element.DWordOption
Specifies the data as a DWORD value. This field will be present if the OptionType is DhcpDWordOption.
Element.DWordDWordOption
Specifies the data as a DWORD_DWORD value. This field will be present if the OptionType is DhcpDWordDWordOption.
Element.IpAddressOption
Specifies the data as a DHCP_IP_ADDRESS (DWORD) value. This field will be present if the OptionType is IpAddressOption.
Element.StringDataOption
Specifies the data as a Unicode string value. This field will be present if the OptionType is DhcpStringDataOption.
Element.BinaryDataOption
Specifies the data as a DHCP_BINARY_DATA structure. This field will be present if the OptionType is DhcpBinaryDataOption.
Element.EncapsulatedDataOption
Specifies the data as encapsulated within a DHCP_BINARY_DATA structure. The application must know the format of the opaque data capsule in order to read it from the Data field of DHCP_BINARY_DATA. This field will be present if the OptionType is DhcpEncapsulatedDataOption.
Element.Ipv6AddressDataOption
Specifies the data as a Unicode string value. This field will be present if the OptionType is DhcpIpv6AddressOption.
_DHCP_OPTION_ELEMENT_UNION
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Header | dhcpsapi.h |