Packet Sniffer SDK DLL Edition

HNQueue :: Properties :: QueSetOrderingById

 Previous Next

Set packets ordering by ID flag.

Syntax:

BOOL __stdcall QueSetOrderingById(HANDLE hQue, BOOL OrderingById);

Parameters:

hQue

[in] HNQueue object handle.

OrderingById

[in] Packets ordering by ID flag value.

Return values:

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

Description:

Due to the Windows kernel asynchronous nature and multithreaded traffic processing in PSSDK, the captured packets order may significantly differ from the real one.

To allow your application to get captured packets in the real order (e.g., it is absolutely important for TCP session reconstruction) there is the PktGetId function in the PSSDK.

Since version 3.1 you can use HNQueue.OrderingById property instead of ordering packets by PacketID in your application by using of PktGetId.

Use QueSetOrderingById to get he ordering packets by ID flag status. TRUE means that the HNQueue object will sort packets by HNPacket.Id in the packets queue internal thread when the OnPacketReceive event occurs. To check this flag status please use QueGetOrderingById function.

Packets ordering works only in the internal queue thread context, so if you need captured packets to be sorted, you should set this flag before QueStart function call, i.e. before the packets queue is created.
See also:HNQueue, QueGetOrderingById, QueStart, OnPacketReceive, HNPacket, PktGetId