1.6.3.13 DRV_G3ADP_MAC_StatisticsGet Function

C

TCPIP_MAC_RES DRV_G3ADP_MAC_StatisticsGet(DRV_HANDLE hMac, TCPIP_MAC_RX_STATISTICS* pRxStatistics, TCPIP_MAC_TX_STATISTICS* pTxStatistics);

Summary

Gets the current G3 ADP MAC statistics.

Description

This function will get the current value of the statistic counters maintained by the G3 ADP MAC driver.

Precondition

DRV_G3ADP_MAC_Initialize must have been called to set up the driver. DRV_G3ADP_MAC_Open() should have been called to obtain a valid handle.

Parameters

ParamDescription
hMacHandle identifying the MAC driver client
pRxStatisticsPointer to a TCPIP_MAC_RX_STATISTICS that will receive the current RX statistics counters. Can be 0 if not needed.
pTxStatisticsPointer to a TCPIP_MAC_TX_STATISTICS that will receive the current TX statistics counters. Can be 0 if not needed.

Returns

  • TCPIP_MAC_RES_OK if all processing went on OK.

  • TCPIP_MAC_RES_OP_ERR error code if function not supported by the driver.

Example

    TCPIP_MAC_RX_STATISTICS rxStatistics;
    TCPIP_MAC_TX_STATISTICS txStatistics;

    TCPIP_MAC_RES res = DRV_G3ADP_MAC_StatisticsGet(pNetIf->hIfMac, &rxStatistics, &txStatistics);

Remarks

  • The reported values are info only and change dynamically.