2.2.1.2.23 DHCP_OPTION_DATA_ELEMENT
The DHCP_OPTION_DATA_ELEMENT structure contains the type of the option and its data value. This is used within a DHCP_OPTION_DATA (section 2.2.1.2.24) structure.
-
typedef struct _DHCP_OPTION_DATA_ELEMENT { DHCP_OPTION_DATA_TYPE OptionType; [switch_is(OptionType), switch_type(DHCP_OPTION_DATA_TYPE)] union _DHCP_OPTION_ELEMENT_UNION { [case(DhcpByteOption)] BYTE ByteOption; [case(DhcpWordOption)] WORD WordOption; [case(DhcpDWordOption)] DWORD DWordOption; [case(DhcpDWordDWordOption)] DWORD_DWORD DWordDWordOption; [case(DhcpIpAddressOption)] DHCP_IP_ADDRESS IpAddressOption; [case(DhcpStringDataOption)] LPWSTR StringDataOption; [case(DhcpBinaryDataOption)] DHCP_BINARY_DATA BinaryDataOption; [case(DhcpEncapsulatedDataOption)] DHCP_BINARY_DATA EncapsulatedDataOption; [case(DhcpIpv6AddressOption)] LPWSTR Ipv6AddressDataOption; } Element; } DHCP_OPTION_DATA_ELEMENT, *LPDHCP_OPTION_DATA_ELEMENT;
OptionType: This is of type DHCP_OPTION_DATA_TYPE (section 2.2.1.1.10) enumeration value, indicating the option value that is present in the subsequent field, Element.
Element: This is a union that can contain one of the following values chosen based on the value of OptionType.
ByteOption: Specifies the data as a BYTE value. This field is present if the OptionType is DhcpByteOption.
WordOption: Specifies the data as a WORD value. This field is present if the OptionType is DhcpWordOption.
DWordOption: Specifies the data as a DWORD value. This field is present if the OptionType is DhcpDWordOption.
DWordDWordOption: Specifies the data as a DWORD_DWORD (section 2.2.1.2.22) value. This field is present if the OptionType is DhcpDWordDWordOption.
IpAddressOption: Specifies the data as a DHCP_IP_ADDRESS (section 2.2.1.2.1) value. This field is present if the OptionType is IpAddressOption.
StringDataOption: Specifies the data as LPWSTR, a pointer to a Unicode string value. This field is present if the OptionType is DhcpStringDataOption.
BinaryDataOption: Specifies the data as a DHCP_BINARY_DATA (section 2.2.1.2.9) structure. This field is present if the OptionType is DhcpBinaryDataOption.
EncapsulatedDataOption: Specifies the data as encapsulated within a DHCP_BINARY_DATA structure. The application MUST recognize the format of the opaque data capsule in order to read it from the Data field of DHCP_BINARY_DATA. This field is present if the OptionType is DhcpEncapsulatedDataOption.
Ipv6AddressDataOption: Specifies the data as LPWSTR, a pointer to a Unicode string value. This field is present if the OptionType is DhcpIpv6AddressOption.