Packet Sniffer SDK DLL Edition

HNPacket :: Properties :: PktSetPacketSize

 Previous Next

Sets the actual size of the packet.

Syntax:

DWORD __stdcall PktSetPacketSize(HANDLE hPkt, DWORD PacketSize);

Return values:

If the function succeeds the return value will be the PacketSize parameter value.

Parameters:

hPkt

[in] HNPacket object handle.

PacketSize

[in] Packet size.

Description:

Use PktSetPacketSize to set the real value of a received packet size.

This function may be useful if you have your own source of packets to be generated as HNPacket objects. For example, can read packets from a CAP file, and then pack their data in HNPacket objects, and then try to assemble TCP sessions using HNTcpManager.

See also:IncPacketSize, PktGetPacketSize, AdpSyncSendEx, AdpAsyncSendEx, BPF instructions