TianoCore EDK2 master
Loading...
Searching...
No Matches
Statistics.c File Reference
#include "Snp.h"

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI SnpUndi32Statistics (IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN Reset, IN OUT UINTN *StatisticsSize OPTIONAL, IN OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL)
 

Detailed Description

Implementation of collecting the statistics on a network interface.

Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Statistics.c.

Function Documentation

◆ SnpUndi32Statistics()

EFI_STATUS EFIAPI SnpUndi32Statistics ( IN EFI_SIMPLE_NETWORK_PROTOCOL This,
IN BOOLEAN  Reset,
IN OUT UINTN *StatisticsSize  OPTIONAL,
IN OUT EFI_NETWORK_STATISTICS *StatisticsTable  OPTIONAL 
)

Resets or collects the statistics on a network interface.

This function resets or collects the statistics on a network interface. If the size of the statistics table specified by StatisticsSize is not big enough for all the statistics that are collected by the network interface, then a partial buffer of statistics is returned in StatisticsTable, StatisticsSize is set to the size required to collect all the available statistics, and EFI_BUFFER_TOO_SMALL is returned. If StatisticsSize is big enough for all the statistics, then StatisticsTable will be filled, StatisticsSize will be set to the size of the returned StatisticsTable structure, and EFI_SUCCESS is returned. If the driver has not been initialized, EFI_DEVICE_ERROR will be returned. If Reset is FALSE, and both StatisticsSize and StatisticsTable are NULL, then no operations will be performed, and EFI_SUCCESS will be returned. If Reset is TRUE, then all of the supported statistics counters on this network interface will be reset to zero.

Parameters
ThisA pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.
ResetSet to TRUE to reset the statistics for the network interface.
StatisticsSizeOn input the size, in bytes, of StatisticsTable. On output the size, in bytes, of the resulting table of statistics.
StatisticsTableA pointer to the EFI_NETWORK_STATISTICS structure that contains the statistics. Type EFI_NETWORK_STATISTICS is defined in "Related Definitions" below.
Return values
EFI_SUCCESSThe requested operation succeeded.
EFI_NOT_STARTEDThe Simple Network Protocol interface has not been started by calling Start().
EFI_BUFFER_TOO_SMALLStatisticsSize is not NULL and StatisticsTable is NULL. The current buffer size that is needed to hold all the statistics is returned in StatisticsSize.
EFI_BUFFER_TOO_SMALLStatisticsSize is not NULL and StatisticsTable is not NULL. The current buffer size that is needed to hold all the statistics is returned in StatisticsSize. A partial set of statistics is returned in StatisticsTable.
EFI_INVALID_PARAMETERStatisticsSize is NULL and StatisticsTable is not NULL.
EFI_DEVICE_ERRORThe Simple Network Protocol interface has not been initialized by calling Initialize().
EFI_DEVICE_ERRORAn error was encountered collecting statistics from the NIC.
EFI_UNSUPPORTEDThe NIC does not support collecting statistics from the network interface.

Definition at line 60 of file Statistics.c.