Skip to main content

Windows Dev Center

PxeDhcpv6GetVendorOptionValue function

Retrieves option values from the OPTION_VENDOR_OPTS (17) field of a DHCPv6 packet.

Syntax


DWORD PXEAPI PxeDhcpv6GetVendorOptionValue(
  _In_      PVOID pPacket,
  _In_      ULONG uPacketLen,
  _In_      DWORD dwEnterpriseNumber,
  _In_      WORD  wOption,
  _In_      ULONG uInstance,
  _Out_opt_ PWORD pwOptionLen,
  _Out_opt_ PVOID *ppOptionValue
);

Parameters

pPacket [in]

Pointer to a reply packet allocated with the PxePacketAllocate function.

uPacketLen [in]

Length of the packet pointed to by the pReplyPacket parameter.

dwEnterpriseNumber [in]

An Enterprise Number assigned to the vendor of the option by the Internet Assigned Numbers Authority (IANA).

For more information about assigned Enterprise Numbers, developers should refer to the Dynamic Host Configuration Protocol for IPv6 ( RFC 3315) maintained by The Internet Engineering Task Force (IETF).

wOption [in]

Option whose value will be retrieved.

uInstance [in]

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

pwOptionLen [out, optional]

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

ppOptionValue [out, optional]

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/valueDescription
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 DHCP 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

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

WdsPxe.h

Library

WdsPxe.lib

DLL

WdsPxe.dll

See also

Windows Deployment Services Server Functions
PxeDhcpv6GetOptionValue
PxePacketAllocate