Packet Sniffer SDK VCL Edition

HNAdapter :: Methods :: UpdateUserStatistics

 Previous Next

Updates the user-settable filter statistics synchronously.

Syntax:

function UpdateUserStatistics: DWORD;

Return values:

HNERR_OKUser-settable filter statistics has been updated successfully.
HNERR_ADAPTER_NOT_OPENEDNetwork adapter has not been opened, see OpenAdapter.
HNERR_ADAPTER_REQ_ERRAn internal driver request error.

Description:

After the network adapter has been opened successfully by OpenAdapter method, you can use UpdateUserStatistics method to update user-settable filter statistics collected by the internal driver.

Using these statistics, you can estimate the speed of the captured packets processing in your application.

Get_RecvCount method returns the number of packets, received by the internal driver from OS, while Get_ProcessCount method returns the number of packets, transferred to the application, which directly depends on the speed of your processing the captured packets using OnPacketReceive event handler.

If this method fails, the values of internal counters of the network adapter in the HNAdapter component aren't defined (contain garbage).
See also:Packets processing diagram, HNAdapter, OpenAdapter, Get_RecvCount, Get_ProcessCount, Get_RejectCount, OnPacketReceive