DhcpPktSendHook callback function
The DhcpPktSendHook function is called by Microsoft DHCP Server directly before Microsoft DHCP Server sends a response to a client. Registering for notification of DhcpPktSendHook enables third-party developers to alter the response of the Microsoft DHCP Server by manipulation of the packet pointers. The DhcpPktSendHook is implemented by a third-party DLL that registers for notification of significant Microsoft DHCP Server events.
The DhcpPktSendHook function should not block.
Syntax
DWORD CALLBACK DhcpPktSendHook(
_Inout_ LPBYTE *Packet,
_Inout_ DWORD *PacketSize,
_In_ DWORD ControlCode,
_In_ DWORD IpAddress,
_In_ LPVOID Reserved,
_In_ LPVOID PktContext
);
Parameters
Packet [in, out]
Pointer to a buffer, 4Kb in size, that contains the packet to be sent by Microsoft DHCP Server.Note Writing to this buffer directly is not recommended.
PacketSize [in, out]
Pointer to the size of the Packet parameter, in bytes.ControlCode [in]
Control code for the packet being sent. The only acceptable value in this version of the DHCP Server API is DHCP_SEND_PACKET.IpAddress [in]
Internet Protocol (IP) address of the socket on which the packet was received. The IP address is in host order.Reserved [in]
Reserved for future use.PktContext [in]
Context identifying the packet, as provided in the PktContext parameter of a previous DhcpNewPktHook function call.
Return value
Return values are defined by the application providing the callback.
Remarks
The DhcpPktSendHook function should not block.
Requirements
Minimum supported client |
None supported |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
Dhcpssdk.h |