OpenNSL API Guide and Reference Manual
Welcome
OpenNSL Documentation
API Reference
Files
File List
Globals
include
opennsl
stat.h
Go to the documentation of this file.
1
4
/*****************************************************************************
5
*
6
* (C) Copyright Broadcom Corporation 2013-2016
7
*
8
* Licensed under the Apache License, Version 2.0 (the "License");
9
* you may not use this file except in compliance with the License.
10
*
11
* You may obtain a copy of the License at
12
* http://www.apache.org/licenses/LICENSE-2.0
13
*
14
* Unless required by applicable law or agreed to in writing, software
15
* distributed under the License is distributed on an "AS IS" BASIS,
16
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
* See the License for the specific language governing permissions and
18
* limitations under the License.
19
*
20
***************************************************************************/
24
#ifndef __OPENNSL_STAT_H__
25
#define __OPENNSL_STAT_H__
26
27
#include <
opennsl/types.h
>
28
47
typedef
enum
opennsl_stat_val_e
{
48
opennsl_spl_snmpIfInOctets
= 0,
49
opennsl_spl_snmpIfInUcastPkts
= 1,
50
opennsl_spl_snmpIfInNUcastPkts
= 2,
51
opennsl_spl_snmpIfInDiscards
= 3,
52
opennsl_spl_snmpIfInErrors
= 4,
53
opennsl_spl_snmpIfInUnknownProtos
= 5,
54
opennsl_spl_snmpIfOutOctets
= 6,
55
opennsl_spl_snmpIfOutUcastPkts
= 7,
56
opennsl_spl_snmpIfOutNUcastPkts
= 8,
57
opennsl_spl_snmpIfOutDiscards
= 9,
58
opennsl_spl_snmpIfOutErrors
= 10,
59
opennsl_spl_snmpIfOutQLen
= 11,
60
opennsl_spl_snmpIpInReceives
= 12,
61
opennsl_spl_snmpIpInHdrErrors
= 13,
62
opennsl_spl_snmpIpForwDatagrams
= 14,
63
opennsl_spl_snmpIpInDiscards
= 15,
64
opennsl_spl_snmpDot1dBasePortDelayExceededDiscards
= 16,
65
opennsl_spl_snmpDot1dBasePortMtuExceededDiscards
= 17,
66
opennsl_spl_snmpDot1dTpPortInFrames
= 18,
67
opennsl_spl_snmpDot1dTpPortOutFrames
= 19,
68
opennsl_spl_snmpDot1dPortInDiscards
= 20,
69
opennsl_spl_snmpEtherStatsDropEvents
= 21,
70
opennsl_spl_snmpEtherStatsMulticastPkts
= 22,
71
opennsl_spl_snmpEtherStatsBroadcastPkts
= 23,
72
opennsl_spl_snmpEtherStatsUndersizePkts
= 24,
73
opennsl_spl_snmpEtherStatsFragments
= 25,
74
opennsl_spl_snmpEtherStatsPkts64Octets
= 26,
75
opennsl_spl_snmpEtherStatsPkts65to127Octets
= 27,
76
opennsl_spl_snmpEtherStatsPkts128to255Octets
= 28,
77
opennsl_spl_snmpEtherStatsPkts256to511Octets
= 29,
78
opennsl_spl_snmpEtherStatsPkts512to1023Octets
= 30,
79
opennsl_spl_snmpEtherStatsPkts1024to1518Octets
= 31,
80
opennsl_spl_snmpEtherStatsOversizePkts
= 32,
81
opennsl_spl_snmpEtherRxOversizePkts
= 33,
83
opennsl_spl_snmpEtherTxOversizePkts
= 34,
85
opennsl_spl_snmpEtherStatsJabbers
= 35,
86
opennsl_spl_snmpEtherStatsOctets
= 36,
87
opennsl_spl_snmpEtherStatsPkts
= 37,
88
opennsl_spl_snmpEtherStatsCollisions
= 38,
89
opennsl_spl_snmpEtherStatsCRCAlignErrors
= 39,
90
opennsl_spl_snmpEtherStatsTXNoErrors
= 40,
91
opennsl_spl_snmpEtherStatsRXNoErrors
= 41,
92
opennsl_spl_snmpDot3StatsAlignmentErrors
= 42,
93
opennsl_spl_snmpDot3StatsFCSErrors
= 43,
94
opennsl_spl_snmpDot3StatsSingleCollisionFrames
= 44,
95
opennsl_spl_snmpDot3StatsMultipleCollisionFrames
= 45,
96
opennsl_spl_snmpDot3StatsSQETTestErrors
= 46,
97
opennsl_spl_snmpDot3StatsDeferredTransmissions
= 47,
98
opennsl_spl_snmpDot3StatsLateCollisions
= 48,
99
opennsl_spl_snmpDot3StatsExcessiveCollisions
= 49,
100
opennsl_spl_snmpDot3StatsInternalMacTransmitErrors
= 50,
101
opennsl_spl_snmpDot3StatsCarrierSenseErrors
= 51,
102
opennsl_spl_snmpDot3StatsFrameTooLongs
= 52,
103
opennsl_spl_snmpDot3StatsInternalMacReceiveErrors
= 53,
104
opennsl_spl_snmpDot3StatsSymbolErrors
= 54,
105
opennsl_spl_snmpDot3ControlInUnknownOpcodes
= 55,
106
opennsl_spl_snmpDot3InPauseFrames
= 56,
107
opennsl_spl_snmpDot3OutPauseFrames
= 57,
108
opennsl_spl_snmpIfHCInOctets
= 58,
109
opennsl_spl_snmpIfHCInUcastPkts
= 59,
110
opennsl_spl_snmpIfHCInMulticastPkts
= 60,
111
opennsl_spl_snmpIfHCInBroadcastPkts
= 61,
112
opennsl_spl_snmpIfHCOutOctets
= 62,
113
opennsl_spl_snmpIfHCOutUcastPkts
= 63,
114
opennsl_spl_snmpIfHCOutMulticastPkts
= 64,
115
opennsl_spl_snmpIfHCOutBroadcastPckts
= 65,
116
opennsl_spl_snmpIpv6IfStatsInReceives
= 66,
117
opennsl_spl_snmpIpv6IfStatsInHdrErrors
= 67,
118
opennsl_spl_snmpIpv6IfStatsInAddrErrors
= 68,
119
opennsl_spl_snmpIpv6IfStatsInDiscards
= 69,
120
opennsl_spl_snmpIpv6IfStatsOutForwDatagrams
= 70,
121
opennsl_spl_snmpIpv6IfStatsOutDiscards
= 71,
122
opennsl_spl_snmpIpv6IfStatsInMcastPkts
= 72,
123
opennsl_spl_snmpIpv6IfStatsOutMcastPkts
= 73,
124
opennsl_spl_snmpIfInBroadcastPkts
= 74,
125
opennsl_spl_snmpIfInMulticastPkts
= 75,
126
opennsl_spl_snmpIfOutBroadcastPkts
= 76,
127
opennsl_spl_snmpIfOutMulticastPkts
= 77,
128
opennsl_spl_snmpIeee8021PfcRequests
= 78,
129
opennsl_spl_snmpIeee8021PfcIndications
= 79,
130
snmpOpenNSLReceivedUndersizePkts
= 80,
131
snmpOpenNSLTransmittedUndersizePkts
= 81,
132
snmpOpenNSLIPMCBridgedPckts
= 82,
133
snmpOpenNSLIPMCRoutedPckts
= 83,
134
snmpOpenNSLIPMCInDroppedPckts
= 84,
135
snmpOpenNSLIPMCOutDroppedPckts
= 85,
136
snmpOpenNSLEtherStatsPkts1519to1522Octets
= 86,
137
snmpOpenNSLEtherStatsPkts1522to2047Octets
= 87,
138
snmpOpenNSLEtherStatsPkts2048to4095Octets
= 88,
139
snmpOpenNSLEtherStatsPkts4095to9216Octets
= 89,
140
snmpOpenNSLReceivedPkts64Octets
= 90,
141
snmpOpenNSLReceivedPkts65to127Octets
= 91,
142
snmpOpenNSLReceivedPkts128to255Octets
= 92,
143
snmpOpenNSLReceivedPkts256to511Octets
= 93,
144
snmpOpenNSLReceivedPkts512to1023Octets
= 94,
145
snmpOpenNSLReceivedPkts1024to1518Octets
= 95,
146
snmpOpenNSLReceivedPkts1519to2047Octets
= 96,
147
snmpOpenNSLReceivedPkts2048to4095Octets
= 97,
148
snmpOpenNSLReceivedPkts4095to9216Octets
= 98,
149
snmpOpenNSLTransmittedPkts64Octets
= 99,
150
snmpOpenNSLTransmittedPkts65to127Octets
= 100,
151
snmpOpenNSLTransmittedPkts128to255Octets
= 101,
152
snmpOpenNSLTransmittedPkts256to511Octets
= 102,
153
snmpOpenNSLTransmittedPkts512to1023Octets
= 103,
154
snmpOpenNSLTransmittedPkts1024to1518Octets
= 104,
155
snmpOpenNSLTransmittedPkts1519to2047Octets
= 105,
156
snmpOpenNSLTransmittedPkts2048to4095Octets
= 106,
157
snmpOpenNSLTransmittedPkts4095to9216Octets
= 107,
158
snmpOpenNSLTxControlCells
= 108,
160
snmpOpenNSLTxDataCells
= 109,
162
snmpOpenNSLTxDataBytes
= 110,
164
snmpOpenNSLRxCrcErrors
= 111,
166
snmpOpenNSLRxFecCorrectable
= 112,
168
snmpOpenNSLRxBecCrcErrors
= 113,
170
snmpOpenNSLRxDisparityErrors
= 114,
172
snmpOpenNSLRxControlCells
= 115,
174
snmpOpenNSLRxDataCells
= 116,
176
snmpOpenNSLRxDataBytes
= 117,
178
snmpOpenNSLRxDroppedRetransmittedControl
= 118,
180
snmpOpenNSLTxBecRetransmit
= 119,
182
snmpOpenNSLRxBecRetransmit
= 120,
184
snmpOpenNSLTxAsynFifoRate
= 121,
186
snmpOpenNSLRxAsynFifoRate
= 122,
188
snmpOpenNSLRxFecUncorrectable
= 123,
190
snmpOpenNSLRxBecRxFault
= 124,
192
snmpOpenNSLRxCodeErrors
= 125,
194
snmpOpenNSLRxRsFecBitError
= 126,
196
snmpOpenNSLRxRsFecSymbolError
= 127,
198
snmpOpenNSLRxLlfcPrimary
= 128,
200
snmpOpenNSLRxLlfcSecondary
= 129,
202
snmpOpenNSLCustomReceive0
= 130,
203
snmpOpenNSLCustomReceive1
= 131,
204
snmpOpenNSLCustomReceive2
= 132,
205
snmpOpenNSLCustomReceive3
= 133,
206
snmpOpenNSLCustomReceive4
= 134,
207
snmpOpenNSLCustomReceive5
= 135,
208
snmpOpenNSLCustomReceive6
= 136,
209
snmpOpenNSLCustomReceive7
= 137,
210
snmpOpenNSLCustomReceive8
= 138,
211
snmpOpenNSLCustomTransmit0
= 139,
212
snmpOpenNSLCustomTransmit1
= 140,
213
snmpOpenNSLCustomTransmit2
= 141,
214
snmpOpenNSLCustomTransmit3
= 142,
215
snmpOpenNSLCustomTransmit4
= 143,
216
snmpOpenNSLCustomTransmit5
= 144,
217
snmpOpenNSLCustomTransmit6
= 145,
218
snmpOpenNSLCustomTransmit7
= 146,
219
snmpOpenNSLCustomTransmit8
= 147,
220
snmpOpenNSLCustomTransmit9
= 148,
221
snmpOpenNSLCustomTransmit10
= 149,
222
snmpOpenNSLCustomTransmit11
= 150,
223
snmpOpenNSLCustomTransmit12
= 151,
224
snmpOpenNSLCustomTransmit13
= 152,
225
snmpOpenNSLCustomTransmit14
= 153,
226
opennsl_spl_snmpDot3StatsInRangeLengthError
= 154,
227
opennsl_spl_snmpDot3OmpEmulationCRC8Errors
= 155,
228
opennsl_spl_snmpDot3MpcpRxGate
= 156,
229
opennsl_spl_snmpDot3MpcpRxRegister
= 157,
230
opennsl_spl_snmpDot3MpcpTxRegRequest
= 158,
231
opennsl_spl_snmpDot3MpcpTxRegAck
= 159,
232
opennsl_spl_snmpDot3MpcpTxReport
= 160,
233
opennsl_spl_snmpDot3EponFecCorrectedBlocks
= 161,
234
opennsl_spl_snmpDot3EponFecUncorrectableBlocks
= 162,
235
snmpOpenNSLPonInDroppedOctets
= 163,
236
snmpOpenNSLPonOutDroppedOctets
= 164,
237
snmpOpenNSLPonInDelayedOctets
= 165,
238
snmpOpenNSLPonOutDelayedOctets
= 166,
239
snmpOpenNSLPonInDelayedHundredUs
= 167,
240
snmpOpenNSLPonOutDelayedHundredUs
= 168,
241
snmpOpenNSLPonInFrameErrors
= 169,
242
snmpOpenNSLPonInOamFrames
= 170,
243
snmpOpenNSLPonOutOamFrames
= 171,
244
snmpOpenNSLPonOutUnusedOctets
= 172,
245
snmpOpenNSLEtherStatsPkts9217to16383Octets
= 173,
246
snmpOpenNSLReceivedPkts9217to16383Octets
= 174,
247
snmpOpenNSLTransmittedPkts9217to16383Octets
= 175,
248
snmpOpenNSLRxVlanTagFrame
= 176,
249
snmpOpenNSLRxDoubleVlanTagFrame
= 177,
250
snmpOpenNSLTxVlanTagFrame
= 178,
251
snmpOpenNSLTxDoubleVlanTagFrame
= 179,
252
snmpOpenNSLRxPFCControlFrame
= 180,
253
snmpOpenNSLTxPFCControlFrame
= 181,
254
snmpOpenNSLRxPFCFrameXonPriority0
= 182,
256
snmpOpenNSLRxPFCFrameXonPriority1
= 183,
258
snmpOpenNSLRxPFCFrameXonPriority2
= 184,
260
snmpOpenNSLRxPFCFrameXonPriority3
= 185,
262
snmpOpenNSLRxPFCFrameXonPriority4
= 186,
264
snmpOpenNSLRxPFCFrameXonPriority5
= 187,
266
snmpOpenNSLRxPFCFrameXonPriority6
= 188,
268
snmpOpenNSLRxPFCFrameXonPriority7
= 189,
270
snmpOpenNSLRxPFCFramePriority0
= 190,
271
snmpOpenNSLRxPFCFramePriority1
= 191,
272
snmpOpenNSLRxPFCFramePriority2
= 192,
273
snmpOpenNSLRxPFCFramePriority3
= 193,
274
snmpOpenNSLRxPFCFramePriority4
= 194,
275
snmpOpenNSLRxPFCFramePriority5
= 195,
276
snmpOpenNSLRxPFCFramePriority6
= 196,
277
snmpOpenNSLRxPFCFramePriority7
= 197,
278
snmpOpenNSLTxPFCFramePriority0
= 198,
279
snmpOpenNSLTxPFCFramePriority1
= 199,
280
snmpOpenNSLTxPFCFramePriority2
= 200,
281
snmpOpenNSLTxPFCFramePriority3
= 201,
282
snmpOpenNSLTxPFCFramePriority4
= 202,
283
snmpOpenNSLTxPFCFramePriority5
= 203,
284
snmpOpenNSLTxPFCFramePriority6
= 204,
285
snmpOpenNSLTxPFCFramePriority7
= 205,
286
opennsl_spl_snmpFcmPortClass3RxFrames
= 206,
287
opennsl_spl_snmpFcmPortClass3TxFrames
= 207,
288
opennsl_spl_snmpFcmPortClass3Discards
= 208,
289
opennsl_spl_snmpFcmPortClass2RxFrames
= 209,
290
opennsl_spl_snmpFcmPortClass2TxFrames
= 210,
291
opennsl_spl_snmpFcmPortClass2Discards
= 211,
292
opennsl_spl_snmpFcmPortInvalidCRCs
= 212,
293
opennsl_spl_snmpFcmPortDelimiterErrors
= 213,
294
snmpOpenNSLSampleIngressPkts
= 214,
297
snmpOpenNSLSampleIngressSnapshotPkts
= 215,
300
snmpOpenNSLSampleIngressSampledPkts
= 216,
302
snmpOpenNSLSampleFlexPkts
= 217,
306
snmpOpenNSLSampleFlexSnapshotPkts
= 218,
311
snmpOpenNSLSampleFlexSampledPkts
= 219,
315
snmpOpenNSLEgressProtectionDataDrop
= 220,
317
snmpOpenNSLTxE2ECCControlFrames
= 221,
322
snmpOpenNSLE2EHOLDropPkts
= 222,
325
opennsl_spl_snmpEtherStatsTxCRCAlignErrors
= 223,
326
opennsl_spl_snmpEtherStatsTxJabbers
= 224,
327
snmpOpenNSLMacMergeTxFrag
= 225,
329
snmpOpenNSLMacMergeTxVerifyFrame
= 226,
331
snmpOpenNSLMacMergeTxReplyFrame
= 227,
332
snmpOpenNSLMacMergeRxFrameAssErrors
= 228,
334
snmpOpenNSLMacMergeRxFrameSmdErrors
= 229,
338
snmpOpenNSLMacMergeRxFrameAss
= 230,
340
snmpOpenNSLMacMergeRxFrag
= 231,
342
snmpOpenNSLMacMergeRxVerifyFrame
= 232,
343
snmpOpenNSLMacMergeRxReplyFrame
= 233,
344
snmpOpenNSLMacMergeRxFinalFragSizeError
= 234,
347
snmpOpenNSLMacMergeRxFragSizeError
= 235,
349
snmpOpenNSLMacMergeRxDiscard
= 236,
351
snmpOpenNSLMacMergeHoldCount
= 237,
353
snmpOpenNSLRxBipErrorCount
= 238,
354
opennsl_spl_snmpValCount
= 239
355
}
opennsl_stat_val_t
;
356
/* __doxy_func_body_end__ */
357
358
#ifndef OPENNSL_HIDE_DISPATCHABLE
359
360
/***************************************************************************/
370
extern
int
opennsl_stat_init
(
371
int
unit)
LIB_DLL_EXPORTED
;
372
373
#endif
/* OPENNSL_HIDE_DISPATCHABLE */
374
375
#ifndef OPENNSL_HIDE_DISPATCHABLE
376
377
/***************************************************************************/
388
extern
int
opennsl_stat_clear
(
389
int
unit,
390
opennsl_port_t
port
)
LIB_DLL_EXPORTED
;
391
392
/***************************************************************************/
406
extern
int
opennsl_stat_sync
(
407
int
unit)
LIB_DLL_EXPORTED
;
408
409
/***************************************************************************/
431
extern
int
opennsl_stat_get
(
432
int
unit,
433
opennsl_port_t
port
,
434
opennsl_stat_val_t
type,
435
uint64
*value)
LIB_DLL_EXPORTED
;
436
437
/***************************************************************************/
459
extern
int
opennsl_stat_get32
(
460
int
unit,
461
opennsl_port_t
port
,
462
opennsl_stat_val_t
type,
463
uint32
*value)
LIB_DLL_EXPORTED
;
464
465
/***************************************************************************/
484
extern
int
opennsl_stat_multi_get
(
485
int
unit,
486
opennsl_port_t
port
,
487
int
nstat,
488
opennsl_stat_val_t
*stat_arr,
489
uint64
*value_arr)
LIB_DLL_EXPORTED
;
490
491
/***************************************************************************/
510
extern
int
opennsl_stat_multi_get32
(
511
int
unit,
512
opennsl_port_t
port
,
513
int
nstat,
514
opennsl_stat_val_t
*stat_arr,
515
uint32
*value_arr)
LIB_DLL_EXPORTED
;
516
517
/***************************************************************************/
538
extern
int
opennsl_stat_sync_get32
(
539
int
unit,
540
opennsl_port_t
port
,
541
opennsl_stat_val_t
type,
542
uint32
*value)
LIB_DLL_EXPORTED
;
543
544
/***************************************************************************/
564
extern
int
opennsl_stat_sync_multi_get32
(
565
int
unit,
566
opennsl_port_t
port
,
567
int
nstat,
568
opennsl_stat_val_t
*stat_arr,
569
uint32
*value_arr)
LIB_DLL_EXPORTED
;
570
571
#endif
/* OPENNSL_HIDE_DISPATCHABLE */
572
573
#ifndef OPENNSL_HIDE_DISPATCHABLE
574
575
/***************************************************************************/
592
extern
int
opennsl_stat_clear_single
(
593
int
unit,
594
opennsl_port_t
port
,
595
opennsl_stat_val_t
type)
LIB_DLL_EXPORTED
;
596
597
#endif
/* OPENNSL_HIDE_DISPATCHABLE */
598
600
typedef
enum
opennsl_stat_group_mode_attr_pkt_type_e
{
601
opennslStatGroupModeAttrPktTypeKnownL3UC
= 14,
602
opennslStatGroupModeAttrPktTypeUnknownL3UC
= 15,
603
opennslStatGroupModeAttrPktTypeKnownIPMC
= 16,
604
opennslStatGroupModeAttrPktTypeUnknownIPMC
= 17,
605
}
opennsl_stat_group_mode_attr_pkt_type_t
;
606
/* __doxy_func_body_end__ */
607
608
#define OPENNSL_STAT_GROUP_MODE_INGRESS 0x00000001
610
typedef enum opennsl_stat_object_e {
611
opennslStatObjectIngL3Intf
= 4,
612
opennslStatObjectEgrL3Intf
= 13,
613
}
opennsl_stat_object_t
;
614
/* __doxy_func_body_end__ */
615
617
typedef
struct
opennsl_stat_value_s
{
618
uint32
packets
;
619
uint64
bytes
;
620
uint64
packets64
;
621
}
opennsl_stat_value_t
;
622
/* __doxy_func_body_end__ */
623
625
typedef
enum
opennsl_stat_group_mode_e
{
626
opennslStatGroupModeSingle
= 0,
628
opennslStatGroupModeTrafficType
= 1,
630
}
opennsl_stat_group_mode_t
;
631
/* __doxy_func_body_end__ */
632
633
/***************************************************************************/
643
extern
void
opennsl_stat_value_t_init
(
644
opennsl_stat_value_t
*stat_value)
LIB_DLL_EXPORTED
;
645
646
#ifndef OPENNSL_HIDE_DISPATCHABLE
647
648
/***************************************************************************/
658
extern
int
opennsl_stat_group_mode_id_destroy
(
659
int
unit,
660
uint32
mode_id)
LIB_DLL_EXPORTED
;
661
662
#endif
/* OPENNSL_HIDE_DISPATCHABLE */
663
664
#ifndef OPENNSL_HIDE_DISPATCHABLE
665
666
/***************************************************************************/
688
extern
int
opennsl_stat_group_create
(
689
int
unit,
690
opennsl_stat_object_t
object
,
691
opennsl_stat_group_mode_t
group_mode,
692
uint32
*stat_counter_id,
693
uint32
*num_entries)
LIB_DLL_EXPORTED
;
694
695
/***************************************************************************/
708
extern
int
opennsl_stat_group_destroy
(
709
int
unit,
710
uint32
stat_counter_id)
LIB_DLL_EXPORTED
;
711
712
#endif
/* OPENNSL_HIDE_DISPATCHABLE */
713
714
#define OPENNSL_STAT_LIF_COUNTING_PROFILE_NONE -1
716
#include <opennsl/statX.h>
717
#endif
/* __OPENNSL_STAT_H__ */
718
© 2016-17 by Broadcom Limited. All rights reserved.