Jump to main content

##

# 1.2.5.2.53 TCPIP_MAC_StatisticsGet Function

## C

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

## Description

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

## Precondtions

TCPIP_MAC_Initialize() should have been called. TCPIP_MAC_Open() should have been called to obtain a valid handle.

## Parameters

Parameters | Description
--- | ---
hMac | Handle identifying the MAC driver client.
pRxStatistics | Pointer to a TCPIP_MAC_RX_STATISTICS that will receive the current RX statistics counters. Can be NULL if not needed.
pTxStatistics | Pointer to a TCPIP_MAC_TX_STATISTICS that will receive the current TX statistics counters. Can be NULL 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.

## Remarks

The reported values are info only and change dynamically.