Packet Sniffer SDK DLL Edition

HNPacket :: Properties :: PktGetPacketData

 Previous Next

Returns the pointer to the packet data.

Syntax:

LPVOID __stdcall PktGetPacketData(HANDLE hPkt);

Parameters:

hPkt

[in] HNPacket object handle.

Return values:

If the function succeeds the return value will be the pointer to the packet data, otherwise it will be NULL.

Description:

Use PktGetPacketData to get the pointer to the packet data so that to analyze the received packet data or create new raw packet. Data buffer size is defined by MaxPacketSize[Get] value.

On packet receiveing/sending data size is defined by IncPacketSize[Get/Set] value.

In OnPacketReceive packet handlers PacketData property is duplicated by pPacketData in parameter for easier access.

See also:PktGetMaxPacketSize, PktGetPacketSize, PktSetPacketSize, PktGetIncPacketSize, PktSetIncPacketSize, OnPacketReceive