Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Initializes a response packet as a DHCP reply packet.
Syntax
DWORD PXEAPI PxeDhcpInitialize(
[in] PVOID pRecvPacket,
[in] ULONG uRecvPacketLen,
[in, out] PVOID pReplyPacket,
[in] ULONG uMaxReplyPacketLen,
[out] PULONG puReplyPacketLen
);
Parameters
[in] pRecvPacket
Address of a valid DHCP packet received from the client in the PxeProviderRecvRequest callback.
[in] uRecvPacketLen
Length of the packet pointed to by the pRecvPacket parameter.
[in, out] pReplyPacket
Pointer to a reply packet allocated with the PxePacketAllocate function.
[in] uMaxReplyPacketLen
Allocated length of the packet pointed to by the pReplyPacket parameter.
[out] puReplyPacketLen
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 field | Initialized 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
| Requirement | Value |
|---|---|
| Minimum supported client | None supported |
| Minimum supported server | Windows Server 2008, Windows Server 2003 with SP2 [desktop apps only] |
| Target Platform | Windows |
| Header | wdspxe.h |
| Library | WdsPxe.lib |
| DLL | WdsPxe.dll |