openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

collector.c (1433B)


      1 /*
      2  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      3  * 
      4  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      5  */
      6 #include <shared/bslenum.h>
      7 #include <shared/bsl.h>
      8 
      9 #include <soc/defs.h>
     10 #include <soc/drv.h>
     11 
     12 #include <bcm/error.h>
     13 #include <bcm/collector.h>
     14 
     15 /* Initialize a collector information structure. */
     16 void bcm_collector_info_t_init(bcm_collector_info_t *collector_info)
     17 {
     18     sal_memset(collector_info, 0, sizeof(bcm_collector_info_t));
     19 }
     20 
     21 /* Initialize a collector export profile information structure. */
     22 void bcm_collector_export_profile_t_init(bcm_collector_export_profile_t *export_profile_info)
     23 {
     24     sal_memset(export_profile_info, 0, sizeof(bcm_collector_export_profile_t));
     25     /* 
     26      * Value 0 is valid from now onwards for export interval. 
     27      * So update to a new invalid value. 
     28      */
     29     export_profile_info->export_interval = BCM_COLLECTOR_EXPORT_INTERVAL_INVALID;
     30 }
     31 
     32 /* Initialize a collector callback options structure. */
     33 void bcm_collector_callback_options_t_init(
     34     bcm_collector_callback_options_t *callback_options)
     35 {
     36     sal_memset(callback_options, 0, sizeof(bcm_collector_callback_options_t));
     37 }
     38 
     39 /* Initialize a export record structure. */
     40 void bcm_collector_export_record_t_init(
     41     bcm_collector_export_record_t *record)
     42 {
     43     sal_memset(record, 0, sizeof(bcm_collector_export_record_t));
     44 }
     45 
     46