OpenNSL API Guide and Reference Manual
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 {
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,
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,
434  opennsl_stat_val_t type,
435  uint64 *value) LIB_DLL_EXPORTED ;
436 
437 /***************************************************************************/
459 extern int opennsl_stat_get32(
460  int unit,
462  opennsl_stat_val_t type,
463  uint32 *value) LIB_DLL_EXPORTED ;
464 
465 /***************************************************************************/
484 extern int opennsl_stat_multi_get(
485  int unit,
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,
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,
541  opennsl_stat_val_t type,
542  uint32 *value) LIB_DLL_EXPORTED ;
543 
544 /***************************************************************************/
565  int unit,
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,
596 
597 #endif /* OPENNSL_HIDE_DISPATCHABLE */
598 
606 /* __doxy_func_body_end__ */
607 
608 #define OPENNSL_STAT_GROUP_MODE_INGRESS 0x00000001
610 typedef enum opennsl_stat_object_e {
614 /* __doxy_func_body_end__ */
615 
617 typedef struct opennsl_stat_value_s {
622 /* __doxy_func_body_end__ */
623 
631 /* __doxy_func_body_end__ */
632 
633 /***************************************************************************/
643 extern void opennsl_stat_value_t_init(
645 
646 #ifndef OPENNSL_HIDE_DISPATCHABLE
647 
648 /***************************************************************************/
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