Packet Sniffer SDK DLL Edition

HNAdapter :: Methods :: AdpUpdateUserStatistics

 Previous Next

Updates the user-settable filter statistics synchronously.

Syntax:

DWORD __stdcall AdpUpdateUserStatistics(HANDLE hAdp);

Parameters:

hAdp

[in] HNAdapter object handle.

Return values:

HNERR_OKUser-settable filter statistics has been updated successfully.
HNERR_ADAPTER_NOT_OPENEDNetwork adapter has not been opened, see AdpOpenAdapter.
HNERR_ADAPTER_REQ_ERRAn internal driver request error.
HNERR_INVALID_HANDLEhAdp parameter is not the HNAdapter object handle.

Description:

After the network adapter has been opened successfully by AdpOpenAdapter function, you can use AdpUpdateUserStatistics function 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.

AdpGetRecvCount function returns the number of packets, received by the internal driver from OS, while AdpGetProcessCount function 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 function 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, AdpOpenAdapter, AdpGetRecvCount, AdpGetProcessCount, AdpGetRejectCount, OnPacketReceive