LPDHCP_PROB callback function (dhcpssdk.h)

The DhcpAddressDelHook function is called by Microsoft DHCP Server when one of the following four defined events occurs:

  • DHCP_PROB_CONFLICT
  • DHCP_PROB_DECLINE
  • DHCP_PROB_RELEASE
  • DHCP_PROB_NACKED
See Remarks for more information on these events. The DhcpAddressDelHook function is implemented by a third-party DLL that registers for notification of significant Microsoft DHCP Server events. The DhcpAddressDelHook function should not block.

Syntax

LPDHCP_PROB LpdhcpProb;

DWORD LpdhcpProb(
  [in] LPBYTE Packet,
  [in] DWORD PacketSize,
  [in] DWORD ControlCode,
  [in] DWORD IpAddress,
  [in] DWORD AltAddress,
  [in] LPVOID Reserved,
  [in] LPVOID PktContext
)
{...}

Parameters

[in] Packet

Buffer for the packet being processed.

[in] PacketSize

Size of the Packet parameter, in bytes.

[in] ControlCode

Specifies the event. See Remarks for control code definitions.

[in] IpAddress

Internet Protocol (IP) address of the socket on which the packet was received. The IP address is in host order.

[in] AltAddress

Internet Protocol (IP) address used to provide additional information about the event. The meaning of AltAddress varies based on the value of ControlCode. See Remarks.

[in] Reserved

Reserve for future use.

[in] PktContext

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 following table defines the four defined events that trigger Microsoft DHCP Server to call the DhcpAddressDelHook function in a third-party DLL.

Control code Description
DHCP_PROB_CONFLICT The address attempted to be offered, as provided in AltAddress, is already in use on the network.
DHCP_PROB_DECLINE The packet was a DECLINE message for the address specified in AltAddress.
DHCP_PROB_RELEASE The packet was a RELEASE message for the address specified in AltAddress.
DHCP_PROB_NACKED The packet was a REQUEST message for the address specified in AltAddress, and the request was declined by Microsoft DHCP Server.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header dhcpssdk.h

See also

DHCP_CALLOUT_TABLE

DhcpNewPktHook