Packet Sniffer SDK DLL Edition

Events :: OnUdpPacketReceive

 Previous Next

Fires when an application receives or sends UDP data.

Syntax:

void __stdcall OnUdpPacketReceive(DWORD_PTR Param, DWORD_PTR ThParam, HANDLE hLBHosts, DWORD Direction, 
                                  DWORD Pid, HANDLE hPacket, LPVOID pData, DWORD DataLength);

Parameters:

Param

[in] OnUdpPacketReceive event handler parameter. May be set by the LbAdpSetOnUdpPacketRecv function call.

ThParam

[in] User defined thread parameter (see HNFN_THREADBEGIN).

hLBHosts

[in] HNLBHosts object handle to which the packet belongs to.

Direction

[in] The direction of the operation (values are defined by HNLBDirection enumeration).

Pid

[in] PID of the process, which has sent or received this packet.

hPacket

[in] HNPacket object handle.

pData

[in] A pointer to the packet data (see HNPacket.PacketData [Get]).

DataLength

[in] Packet size (see also HNPacket.IncPacketSize [Get/Set]).

Description:

Use this event handler to make necessary actions at the moment of sending or receiving UDP data by an application. OnUdpPacketReceive event handler is called by HNLBAdapter component when an application sends or receives data (e.g. using Sendto or WSASendTo sockets functions).

See also:HNLBAdapter, LbAdpSetOnUdpPacketRecv, HNFN_THREADBEGIN, HNLBHosts, HNLBDirection, HNPacket, PktGetPacketData, PktGetIncPacketSize, PktSetIncPacketSize