PxeDhcpv6GetOptionValue function (wdspxe.h)

Retrieves an option value from a DHCPv6 packet.

Syntax

DWORD PXEAPI PxeDhcpv6GetOptionValue(
  [in]            PVOID pPacket,
  [in]            ULONG uPacketLen,
  [in]            ULONG uInstance,
  [in]            WORD  wOption,
  [out, optional] PWORD pwOptionLen,
  [out, optional] PVOID *ppOptionValue
);

Parameters

[in] pPacket

Pointer to a reply packet allocated with the PxePacketAllocate function.

[in] uPacketLen

Length of the packet pointed to by the pReplyPacket parameter.

[in] uInstance

One-based index that specifies which instance of the wOption parameter to retrieve.

[in] wOption

Option whose value will be retrieved.

[out, optional] pwOptionLen

Address of WORD which will receive the length of the option value.

[out, optional] ppOptionValue

Address of PVOID which will receive the address of the option value inside the packet.

Return value

Common return values are listed in the following table. For all other failures, an appropriate Windows error code is returned.

Return code/value Description
ERROR_SUCCESS
0 (0x0)
The option was found and a pointer to the value was returned.
ERROR_FILE_NOT_FOUND
2 (0x2)
The option was not located.
ERROR_INVALID_DATA
13 (0xD)
The packet is not a valid DHCPv6 packet. This test is not as thorough as the tests used by the PxeDhcpv6IsValid function; only the packet length and magic cookie are verified.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header wdspxe.h
Library WdsPxe.lib
DLL WdsPxe.dll

See also

PxeDhcpv6AppendOption

PxeDhcpv6GetVendorOptionValue

PxeDhcpv6IsValid

PxePacketAllocate

Windows Deployment Services Server Functions