Packet Sniffer SDK DLL Edition

HNAdapter :: Methods :: AdpUpdateAdapterStatistics

 Previous Next

Updates the network adapter statistics synchronously.

Syntax:

DWORD __stdcall AdpUpdateAdapterStatistics(HANDLE hAdp);

Parameters:

hAdp

[in] HNAdapter object handle.

Return values:

HNERR_OKAdapter 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 AdpUpdateAdapterStatistics function to update network adapter statistics created by the operation system.

To obtain corresponding values use the following functions: AdpGetTranWithoutErr, AdpGetRecvWithoutErr, AdpGetTranWithErr, AdpGetRecvWithErr, AdpGetMissed.

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, AdpGetTranWithoutErr, AdpGetRecvWithoutErr, AdpGetTranWithErr, AdpGetRecvWithErr, AdpGetMissed