Export (0) Print
Expand All

PxeDhcpInitialize function

Initializes a response packet as a DHCP reply packet.

Syntax


DWORD PXEAPI PxeDhcpInitialize(
  _In_     PVOID pRecvPacket,
  _In_     ULONG uRecvPacketLen,
  _Inout_  PVOID pReplyPacket,
  _In_     ULONG uMaxReplyPacketLen,
  _Out_    PULONG puReplyPacketLen
);

Parameters

pRecvPacket [in]

Address of a valid DHCP packet received from the client in the PxeProviderRecvRequest callback.

uRecvPacketLen [in]

Length of the packet pointed to by the pRecvPacket parameter.

pReplyPacket [in, out]

Pointer to a reply packet allocated with the PxePacketAllocate function.

uMaxReplyPacketLen [in]

Allocated length of the packet pointed to by the pReplyPacket parameter.

puReplyPacketLen [out]

Address of a ULONG that on successful completion will receive the length of the packet pointed to by the pReplyPacket parameter.

Return value

If the function succeeds, the return value is ERROR_SUCCESS.

Remarks

Providers use this function to initialize a reply packet based on the packet received from the client. The reply packet is initialized as follows.

DHCP fieldInitialized value
Operation (op)2 (BOOTP Reply)
Hardware Address Type (htype)Copied from pRecvPacket
Hardware Address Length (hlen)Copied from pRecvPacket
Hardware Address (chaddr)Copied from pRecvPacket
Transaction ID (xid)Copied from pRecvPacket
Seconds Since Boot (secs)Copied from pRecvPacket
Client IP Address (ciaddr)Copied from pRecvPacket
Your IP Address (yiaddr)Copied from pRecvPacket
Server IP Address (siaddr)Copied from pRecvPacket
Relay Agent IP Address (giaddr)Copied from pRecvPacket
Magic Cookie (first 4 octets of vend)Copied from pRecvPacket

 

All other fields are initialized to zero.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008, Windows Server 2003 with SP2 [desktop apps only]

Header

WdsPxe.h

Library

WdsPxe.lib

DLL

WdsPxe.dll

See also

Windows Deployment Services Server Functions
PxePacketAllocate
PxeProviderRecvRequest

 

 

Community Additions

ADD
Show:
© 2014 Microsoft