Packet Sniffer SDK DLL Edition

HNLBAdapter :: Methods :: LbAdpUpdateUserStatistics

 Previous Next

Updates the user-settable filter statistics synchronously.

Syntax:

DWORD __stdcall LbAdpUpdateUserStatistics(HANDLE hLbAdp);

Parameters:

hLbAdp

[in] HNLBAdapter object handle.

Return values:

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

Description:

After Loopback adapter has been opened successfully by LbAdpOpenAdapter function, you can use LbAdpUpdateUserStatistics 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.

LbAdpGetRecvCount function returns the number of packets, received by the internal driver from OS, while LbAdpGetProcessCount 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 Loopback adapter in the HNLBAdapter component aren't defined (contain garbage).
This function may be used in the Ethernet emulation mode only (see HNLBAdapter.EthEmulation[Get/Set]).
See also:HNLBAdapter, LbAdpOpenAdapter, LbAdpGetRecvCount, LbAdpGetProcessCount, LbAdpGetRejectCount, OnPacketReceive