OpenNSL API Guide and Reference Manual
Data Structures | Macros | Typedefs | Enumerations | Functions
stat.h File Reference
#include <opennsl/types.h>
#include <opennsl/statX.h>

Go to the source code of this file.

Data Structures

struct  opennsl_stat_value_s
 Counter Statistics Values. More...
 

Macros

#define OPENNSL_STAT_GROUP_MODE_INGRESS   0x00000001
 Stat Group Mode Ingress.
 
#define OPENNSL_STAT_LIF_COUNTING_PROFILE_NONE   -1
 An indicator for a LIF to be uncounted.
 

Typedefs

typedef enum
opennsl_stat_group_mode_attr_pkt_type_e 
opennsl_stat_group_mode_attr_pkt_type_t
 Packet type related flex attributes values.
 
typedef enum
opennsl_stat_group_mode_e 
opennsl_stat_group_mode_t
 Statistics Group Modes.
 
typedef enum opennsl_stat_object_e opennsl_stat_object_t
 Ingress and Egress Statistics Accounting Objects.
 
typedef enum opennsl_stat_val_e opennsl_stat_val_t
 Statistics counters.
 
typedef struct opennsl_stat_value_s opennsl_stat_value_t
 Counter Statistics Values.
 

Enumerations

enum  opennsl_stat_group_mode_attr_pkt_type_e {
  opennslStatGroupModeAttrPktTypeKnownL3UC = 14,
  opennslStatGroupModeAttrPktTypeUnknownL3UC = 15,
  opennslStatGroupModeAttrPktTypeKnownIPMC = 16,
  opennslStatGroupModeAttrPktTypeUnknownIPMC = 17
}
 Packet type related flex attributes values. More...
 
enum  opennsl_stat_group_mode_e {
  opennslStatGroupModeSingle = 0,
  opennslStatGroupModeTrafficType = 1
}
 Statistics Group Modes. More...
 
enum  opennsl_stat_object_e {
  opennslStatObjectIngL3Intf = 4,
  opennslStatObjectEgrL3Intf = 13
}
 Ingress and Egress Statistics Accounting Objects. More...
 
enum  opennsl_stat_val_e {
  opennsl_spl_snmpIfInOctets = 0,
  opennsl_spl_snmpIfInUcastPkts = 1,
  opennsl_spl_snmpIfInNUcastPkts = 2,
  opennsl_spl_snmpIfInDiscards = 3,
  opennsl_spl_snmpIfInErrors = 4,
  opennsl_spl_snmpIfInUnknownProtos = 5,
  opennsl_spl_snmpIfOutOctets = 6,
  opennsl_spl_snmpIfOutUcastPkts = 7,
  opennsl_spl_snmpIfOutNUcastPkts = 8,
  opennsl_spl_snmpIfOutDiscards = 9,
  opennsl_spl_snmpIfOutErrors = 10,
  opennsl_spl_snmpIfOutQLen = 11,
  opennsl_spl_snmpIpInReceives = 12,
  opennsl_spl_snmpIpInHdrErrors = 13,
  opennsl_spl_snmpIpForwDatagrams = 14,
  opennsl_spl_snmpIpInDiscards = 15,
  opennsl_spl_snmpDot1dBasePortDelayExceededDiscards = 16,
  opennsl_spl_snmpDot1dBasePortMtuExceededDiscards = 17,
  opennsl_spl_snmpDot1dTpPortInFrames = 18,
  opennsl_spl_snmpDot1dTpPortOutFrames = 19,
  opennsl_spl_snmpDot1dPortInDiscards = 20,
  opennsl_spl_snmpEtherStatsDropEvents = 21,
  opennsl_spl_snmpEtherStatsMulticastPkts = 22,
  opennsl_spl_snmpEtherStatsBroadcastPkts = 23,
  opennsl_spl_snmpEtherStatsUndersizePkts = 24,
  opennsl_spl_snmpEtherStatsFragments = 25,
  opennsl_spl_snmpEtherStatsPkts64Octets = 26,
  opennsl_spl_snmpEtherStatsPkts65to127Octets = 27,
  opennsl_spl_snmpEtherStatsPkts128to255Octets = 28,
  opennsl_spl_snmpEtherStatsPkts256to511Octets = 29,
  opennsl_spl_snmpEtherStatsPkts512to1023Octets = 30,
  opennsl_spl_snmpEtherStatsPkts1024to1518Octets = 31,
  opennsl_spl_snmpEtherStatsOversizePkts = 32,
  opennsl_spl_snmpEtherRxOversizePkts = 33,
  opennsl_spl_snmpEtherTxOversizePkts = 34,
  opennsl_spl_snmpEtherStatsJabbers = 35,
  opennsl_spl_snmpEtherStatsOctets = 36,
  opennsl_spl_snmpEtherStatsPkts = 37,
  opennsl_spl_snmpEtherStatsCollisions = 38,
  opennsl_spl_snmpEtherStatsCRCAlignErrors = 39,
  opennsl_spl_snmpEtherStatsTXNoErrors = 40,
  opennsl_spl_snmpEtherStatsRXNoErrors = 41,
  opennsl_spl_snmpDot3StatsAlignmentErrors = 42,
  opennsl_spl_snmpDot3StatsFCSErrors = 43,
  opennsl_spl_snmpDot3StatsSingleCollisionFrames = 44,
  opennsl_spl_snmpDot3StatsMultipleCollisionFrames = 45,
  opennsl_spl_snmpDot3StatsSQETTestErrors = 46,
  opennsl_spl_snmpDot3StatsDeferredTransmissions = 47,
  opennsl_spl_snmpDot3StatsLateCollisions = 48,
  opennsl_spl_snmpDot3StatsExcessiveCollisions = 49,
  opennsl_spl_snmpDot3StatsInternalMacTransmitErrors = 50,
  opennsl_spl_snmpDot3StatsCarrierSenseErrors = 51,
  opennsl_spl_snmpDot3StatsFrameTooLongs = 52,
  opennsl_spl_snmpDot3StatsInternalMacReceiveErrors = 53,
  opennsl_spl_snmpDot3StatsSymbolErrors = 54,
  opennsl_spl_snmpDot3ControlInUnknownOpcodes = 55,
  opennsl_spl_snmpDot3InPauseFrames = 56,
  opennsl_spl_snmpDot3OutPauseFrames = 57,
  opennsl_spl_snmpIfHCInOctets = 58,
  opennsl_spl_snmpIfHCInUcastPkts = 59,
  opennsl_spl_snmpIfHCInMulticastPkts = 60,
  opennsl_spl_snmpIfHCInBroadcastPkts = 61,
  opennsl_spl_snmpIfHCOutOctets = 62,
  opennsl_spl_snmpIfHCOutUcastPkts = 63,
  opennsl_spl_snmpIfHCOutMulticastPkts = 64,
  opennsl_spl_snmpIfHCOutBroadcastPckts = 65,
  opennsl_spl_snmpIpv6IfStatsInReceives = 66,
  opennsl_spl_snmpIpv6IfStatsInHdrErrors = 67,
  opennsl_spl_snmpIpv6IfStatsInAddrErrors = 68,
  opennsl_spl_snmpIpv6IfStatsInDiscards = 69,
  opennsl_spl_snmpIpv6IfStatsOutForwDatagrams = 70,
  opennsl_spl_snmpIpv6IfStatsOutDiscards = 71,
  opennsl_spl_snmpIpv6IfStatsInMcastPkts = 72,
  opennsl_spl_snmpIpv6IfStatsOutMcastPkts = 73,
  opennsl_spl_snmpIfInBroadcastPkts = 74,
  opennsl_spl_snmpIfInMulticastPkts = 75,
  opennsl_spl_snmpIfOutBroadcastPkts = 76,
  opennsl_spl_snmpIfOutMulticastPkts = 77,
  opennsl_spl_snmpIeee8021PfcRequests = 78,
  opennsl_spl_snmpIeee8021PfcIndications = 79,
  snmpOpenNSLReceivedUndersizePkts = 80,
  snmpOpenNSLTransmittedUndersizePkts = 81,
  snmpOpenNSLIPMCBridgedPckts = 82,
  snmpOpenNSLIPMCRoutedPckts = 83,
  snmpOpenNSLIPMCInDroppedPckts = 84,
  snmpOpenNSLIPMCOutDroppedPckts = 85,
  snmpOpenNSLEtherStatsPkts1519to1522Octets = 86,
  snmpOpenNSLEtherStatsPkts1522to2047Octets = 87,
  snmpOpenNSLEtherStatsPkts2048to4095Octets = 88,
  snmpOpenNSLEtherStatsPkts4095to9216Octets = 89,
  snmpOpenNSLReceivedPkts64Octets = 90,
  snmpOpenNSLReceivedPkts65to127Octets = 91,
  snmpOpenNSLReceivedPkts128to255Octets = 92,
  snmpOpenNSLReceivedPkts256to511Octets = 93,
  snmpOpenNSLReceivedPkts512to1023Octets = 94,
  snmpOpenNSLReceivedPkts1024to1518Octets = 95,
  snmpOpenNSLReceivedPkts1519to2047Octets = 96,
  snmpOpenNSLReceivedPkts2048to4095Octets = 97,
  snmpOpenNSLReceivedPkts4095to9216Octets = 98,
  snmpOpenNSLTransmittedPkts64Octets = 99,
  snmpOpenNSLTransmittedPkts65to127Octets = 100,
  snmpOpenNSLTransmittedPkts128to255Octets = 101,
  snmpOpenNSLTransmittedPkts256to511Octets = 102,
  snmpOpenNSLTransmittedPkts512to1023Octets = 103,
  snmpOpenNSLTransmittedPkts1024to1518Octets = 104,
  snmpOpenNSLTransmittedPkts1519to2047Octets = 105,
  snmpOpenNSLTransmittedPkts2048to4095Octets = 106,
  snmpOpenNSLTransmittedPkts4095to9216Octets = 107,
  snmpOpenNSLTxControlCells = 108,
  snmpOpenNSLTxDataCells = 109,
  snmpOpenNSLTxDataBytes = 110,
  snmpOpenNSLRxCrcErrors = 111,
  snmpOpenNSLRxFecCorrectable = 112,
  snmpOpenNSLRxBecCrcErrors = 113,
  snmpOpenNSLRxDisparityErrors = 114,
  snmpOpenNSLRxControlCells = 115,
  snmpOpenNSLRxDataCells = 116,
  snmpOpenNSLRxDataBytes = 117,
  snmpOpenNSLRxDroppedRetransmittedControl = 118,
  snmpOpenNSLTxBecRetransmit = 119,
  snmpOpenNSLRxBecRetransmit = 120,
  snmpOpenNSLTxAsynFifoRate = 121,
  snmpOpenNSLRxAsynFifoRate = 122,
  snmpOpenNSLRxFecUncorrectable = 123,
  snmpOpenNSLRxBecRxFault = 124,
  snmpOpenNSLRxCodeErrors = 125,
  snmpOpenNSLRxRsFecBitError = 126,
  snmpOpenNSLRxRsFecSymbolError = 127,
  snmpOpenNSLRxLlfcPrimary = 128,
  snmpOpenNSLRxLlfcSecondary = 129,
  snmpOpenNSLCustomReceive0 = 130,
  snmpOpenNSLCustomReceive1 = 131,
  snmpOpenNSLCustomReceive2 = 132,
  snmpOpenNSLCustomReceive3 = 133,
  snmpOpenNSLCustomReceive4 = 134,
  snmpOpenNSLCustomReceive5 = 135,
  snmpOpenNSLCustomReceive6 = 136,
  snmpOpenNSLCustomReceive7 = 137,
  snmpOpenNSLCustomReceive8 = 138,
  snmpOpenNSLCustomTransmit0 = 139,
  snmpOpenNSLCustomTransmit1 = 140,
  snmpOpenNSLCustomTransmit2 = 141,
  snmpOpenNSLCustomTransmit3 = 142,
  snmpOpenNSLCustomTransmit4 = 143,
  snmpOpenNSLCustomTransmit5 = 144,
  snmpOpenNSLCustomTransmit6 = 145,
  snmpOpenNSLCustomTransmit7 = 146,
  snmpOpenNSLCustomTransmit8 = 147,
  snmpOpenNSLCustomTransmit9 = 148,
  snmpOpenNSLCustomTransmit10 = 149,
  snmpOpenNSLCustomTransmit11 = 150,
  snmpOpenNSLCustomTransmit12 = 151,
  snmpOpenNSLCustomTransmit13 = 152,
  snmpOpenNSLCustomTransmit14 = 153,
  opennsl_spl_snmpDot3StatsInRangeLengthError = 154,
  opennsl_spl_snmpDot3OmpEmulationCRC8Errors = 155,
  opennsl_spl_snmpDot3MpcpRxGate = 156,
  opennsl_spl_snmpDot3MpcpRxRegister = 157,
  opennsl_spl_snmpDot3MpcpTxRegRequest = 158,
  opennsl_spl_snmpDot3MpcpTxRegAck = 159,
  opennsl_spl_snmpDot3MpcpTxReport = 160,
  opennsl_spl_snmpDot3EponFecCorrectedBlocks = 161,
  opennsl_spl_snmpDot3EponFecUncorrectableBlocks = 162,
  snmpOpenNSLPonInDroppedOctets = 163,
  snmpOpenNSLPonOutDroppedOctets = 164,
  snmpOpenNSLPonInDelayedOctets = 165,
  snmpOpenNSLPonOutDelayedOctets = 166,
  snmpOpenNSLPonInDelayedHundredUs = 167,
  snmpOpenNSLPonOutDelayedHundredUs = 168,
  snmpOpenNSLPonInFrameErrors = 169,
  snmpOpenNSLPonInOamFrames = 170,
  snmpOpenNSLPonOutOamFrames = 171,
  snmpOpenNSLPonOutUnusedOctets = 172,
  snmpOpenNSLEtherStatsPkts9217to16383Octets = 173,
  snmpOpenNSLReceivedPkts9217to16383Octets = 174,
  snmpOpenNSLTransmittedPkts9217to16383Octets = 175,
  snmpOpenNSLRxVlanTagFrame = 176,
  snmpOpenNSLRxDoubleVlanTagFrame = 177,
  snmpOpenNSLTxVlanTagFrame = 178,
  snmpOpenNSLTxDoubleVlanTagFrame = 179,
  snmpOpenNSLRxPFCControlFrame = 180,
  snmpOpenNSLTxPFCControlFrame = 181,
  snmpOpenNSLRxPFCFrameXonPriority0 = 182,
  snmpOpenNSLRxPFCFrameXonPriority1 = 183,
  snmpOpenNSLRxPFCFrameXonPriority2 = 184,
  snmpOpenNSLRxPFCFrameXonPriority3 = 185,
  snmpOpenNSLRxPFCFrameXonPriority4 = 186,
  snmpOpenNSLRxPFCFrameXonPriority5 = 187,
  snmpOpenNSLRxPFCFrameXonPriority6 = 188,
  snmpOpenNSLRxPFCFrameXonPriority7 = 189,
  snmpOpenNSLRxPFCFramePriority0 = 190,
  snmpOpenNSLRxPFCFramePriority1 = 191,
  snmpOpenNSLRxPFCFramePriority2 = 192,
  snmpOpenNSLRxPFCFramePriority3 = 193,
  snmpOpenNSLRxPFCFramePriority4 = 194,
  snmpOpenNSLRxPFCFramePriority5 = 195,
  snmpOpenNSLRxPFCFramePriority6 = 196,
  snmpOpenNSLRxPFCFramePriority7 = 197,
  snmpOpenNSLTxPFCFramePriority0 = 198,
  snmpOpenNSLTxPFCFramePriority1 = 199,
  snmpOpenNSLTxPFCFramePriority2 = 200,
  snmpOpenNSLTxPFCFramePriority3 = 201,
  snmpOpenNSLTxPFCFramePriority4 = 202,
  snmpOpenNSLTxPFCFramePriority5 = 203,
  snmpOpenNSLTxPFCFramePriority6 = 204,
  snmpOpenNSLTxPFCFramePriority7 = 205,
  opennsl_spl_snmpFcmPortClass3RxFrames = 206,
  opennsl_spl_snmpFcmPortClass3TxFrames = 207,
  opennsl_spl_snmpFcmPortClass3Discards = 208,
  opennsl_spl_snmpFcmPortClass2RxFrames = 209,
  opennsl_spl_snmpFcmPortClass2TxFrames = 210,
  opennsl_spl_snmpFcmPortClass2Discards = 211,
  opennsl_spl_snmpFcmPortInvalidCRCs = 212,
  opennsl_spl_snmpFcmPortDelimiterErrors = 213,
  snmpOpenNSLSampleIngressPkts = 214,
  snmpOpenNSLSampleIngressSnapshotPkts = 215,
  snmpOpenNSLSampleIngressSampledPkts = 216,
  snmpOpenNSLSampleFlexPkts = 217,
  snmpOpenNSLSampleFlexSnapshotPkts = 218,
  snmpOpenNSLSampleFlexSampledPkts = 219,
  snmpOpenNSLEgressProtectionDataDrop = 220,
  snmpOpenNSLTxE2ECCControlFrames = 221,
  snmpOpenNSLE2EHOLDropPkts = 222,
  opennsl_spl_snmpEtherStatsTxCRCAlignErrors = 223,
  opennsl_spl_snmpEtherStatsTxJabbers = 224,
  snmpOpenNSLMacMergeTxFrag = 225,
  snmpOpenNSLMacMergeTxVerifyFrame = 226,
  snmpOpenNSLMacMergeTxReplyFrame = 227,
  snmpOpenNSLMacMergeRxFrameAssErrors = 228,
  snmpOpenNSLMacMergeRxFrameSmdErrors = 229,
  snmpOpenNSLMacMergeRxFrameAss = 230,
  snmpOpenNSLMacMergeRxFrag = 231,
  snmpOpenNSLMacMergeRxVerifyFrame = 232,
  snmpOpenNSLMacMergeRxReplyFrame = 233,
  snmpOpenNSLMacMergeRxFinalFragSizeError = 234,
  snmpOpenNSLMacMergeRxFragSizeError = 235,
  snmpOpenNSLMacMergeRxDiscard = 236,
  snmpOpenNSLMacMergeHoldCount = 237,
  snmpOpenNSLRxBipErrorCount = 238,
  opennsl_spl_snmpValCount = 239
}
 Statistics counters. More...
 

Functions

int opennsl_stat_clear (int unit, opennsl_port_t port) LIB_DLL_EXPORTED
 Clear the port-based statistics for the indicated device port.
 
int opennsl_stat_clear_single (int unit, opennsl_port_t port, opennsl_stat_val_t type) LIB_DLL_EXPORTED
 Clear specific statistics for a port from the device.
 
int opennsl_stat_get (int unit, opennsl_port_t port, opennsl_stat_val_t type, uint64 *value) LIB_DLL_EXPORTED
 Get the specified statistics from the device.
 
int opennsl_stat_get32 (int unit, opennsl_port_t port, opennsl_stat_val_t type, uint32 *value) LIB_DLL_EXPORTED
 Get the specified statistics from the device.
 
int opennsl_stat_group_create (int unit, opennsl_stat_object_t object, opennsl_stat_group_mode_t group_mode, uint32 *stat_counter_id, uint32 *num_entries) LIB_DLL_EXPORTED
 Create Counter Entries group for given accounting object.
 
int opennsl_stat_group_destroy (int unit, uint32 stat_counter_id) LIB_DLL_EXPORTED
 Destroy counter Entries group.
 
int opennsl_stat_group_mode_id_destroy (int unit, uint32 mode_id) LIB_DLL_EXPORTED
 Destroys Customized Group mode.
 
int opennsl_stat_init (int unit) LIB_DLL_EXPORTED
 Initialize the OPENNSL statistics module.
 
int opennsl_stat_multi_get (int unit, opennsl_port_t port, int nstat, opennsl_stat_val_t *stat_arr, uint64 *value_arr) LIB_DLL_EXPORTED
 Get the specified statistics from the device.
 
int opennsl_stat_multi_get32 (int unit, opennsl_port_t port, int nstat, opennsl_stat_val_t *stat_arr, uint32 *value_arr) LIB_DLL_EXPORTED
 Get the specified statistics from the device.
 
int opennsl_stat_sync (int unit) LIB_DLL_EXPORTED
 Synchronize software counters with hardware.
 
int opennsl_stat_sync_get32 (int unit, opennsl_port_t port, opennsl_stat_val_t type, uint32 *value) LIB_DLL_EXPORTED
 Force an immediate counter update and get statistics for a specified device.
 
int opennsl_stat_sync_multi_get32 (int unit, opennsl_port_t port, int nstat, opennsl_stat_val_t *stat_arr, uint32 *value_arr) LIB_DLL_EXPORTED
 Force an immediate counter update and get a set of statistics for a specified device.
 
void opennsl_stat_value_t_init (opennsl_stat_value_t *stat_value) LIB_DLL_EXPORTED
 Initialize a opennsl_stat_value_t data structure.