stat.h (2485B)
1 /* 2 * 3 * 4 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 5 * 6 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 7 * 8 * DO NOT EDIT THIS FILE! 9 * This file is auto-generated. 10 * Edits to this file will be lost when it is regenerated. 11 */ 12 13 #ifndef __BCMX_STAT_H__ 14 #define __BCMX_STAT_H__ 15 16 #include <bcm/types.h> 17 #include <bcmx/bcmx.h> 18 #include <bcm/stat.h> 19 20 /* Initialize the Statistics module. */ 21 extern int bcmx_stat_init(void); 22 23 /* Clear the port-based statistics for the indicated device port. */ 24 extern int bcmx_stat_clear( 25 bcmx_lport_t port); 26 27 /* Synchronize software counters with hardware. */ 28 extern int bcmx_stat_sync(void); 29 30 /* Get the specified statistics from the device. */ 31 extern int bcmx_stat_get( 32 bcmx_lport_t port, 33 bcm_stat_val_t type, 34 uint64 *value); 35 36 /* Get the specified statistics from the device. */ 37 extern int bcmx_stat_get32( 38 bcmx_lport_t port, 39 bcm_stat_val_t type, 40 uint32 *value); 41 42 /* Get the specified statistics. */ 43 extern int bcmx_stat_multi_get( 44 bcm_gport_t port, 45 int nstat, 46 bcm_stat_val_t *stat_arr, 47 uint64 *value_arr); 48 49 /* 50 * Get the specified statistics. The 64-bit values may be truncated to 51 * fit. 52 */ 53 extern int bcmx_stat_multi_get32( 54 bcm_gport_t port, 55 int nstat, 56 bcm_stat_val_t *stat_arr, 57 uint32 *value_arr); 58 59 /* Set/get debug counter to count certain packet types. */ 60 extern int bcmx_stat_custom_set( 61 bcmx_lport_t port, 62 bcm_stat_val_t type, 63 uint32 flags); 64 65 /* Set/get debug counter to count certain packet types. */ 66 extern int bcmx_stat_custom_get( 67 bcmx_lport_t port, 68 bcm_stat_val_t type, 69 uint32 *flags); 70 71 /* Add a certain packet type to debug counter to count. */ 72 extern int bcmx_stat_custom_add( 73 bcmx_lport_t port, 74 bcm_stat_val_t type, 75 bcm_custom_stat_trigger_t trigger); 76 77 /* Delete the specified packet type from debug counter. */ 78 extern int bcmx_stat_custom_delete( 79 bcmx_lport_t port, 80 bcm_stat_val_t type, 81 bcm_custom_stat_trigger_t trigger); 82 83 /* Delete all packet types from debug counter. */ 84 extern int bcmx_stat_custom_delete_all( 85 bcmx_lport_t port, 86 bcm_stat_val_t type); 87 88 /* Check if specified packet types is part of debug counter. */ 89 extern int bcmx_stat_custom_check( 90 bcmx_lport_t port, 91 bcm_stat_val_t type, 92 bcm_custom_stat_trigger_t trigger, 93 int *result); 94 95 #endif /* __BCMX_STAT_H__ */