Packet Sniffer SDK DLL Edition

HNPacket :: Properties :: PktSetIncPacketSize

 Previous Next

Sets the size of the packet's data.

Syntax:

DWORD __stdcall PktSetIncPacketSize(HANDLE hPkt, DWORD IncPacketSize);

Return values:

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

Parameters:

hPkt

[in] HNPacket object handle.

IncPacketSize

[in] The size of the incoming packet data.

Description:

Use PktSetIncPacketSize to set the size of the incoming packet data stored in HNPacket object.

PktSetIncPacketSize is intended for setting data size of a packet to be sent for AdpSyncSendEx and AdpAsyncSendEx functions.

This value cannot be greater than MaxPacketSize value, but may be less than PacketSize value.

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.

In OnPacketReceive event handlers this property is duplicated by IncPacketSize parameter for easier access.

See also:MaxPacketSize, PktGetIncPacketSize, PktGetPacketSize, OnPacketReceive