collector_int.h (2078B)
1 /*! \file collector.h 2 * 3 * Collector header file. 4 * This file contains the management for Collector. 5 */ 6 /* 7 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 8 * 9 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 10 */ 11 #ifndef BCMINT_LTSW_COLLECTOR_INT_H 12 #define BCMINT_LTSW_COLLECTOR_INT_H 13 14 #include <shr/shr_bitop.h> 15 #include <bcm/collector.h> 16 #include <bcm_int/ltsw/collector.h> 17 /****************************************************************************** 18 * Defines 19 */ 20 21 22 /*! Maximum ID of export profile logical table.*/ 23 #define _EXPORT_PROFILE_ID_MAX 32 24 25 /*! Total number of IPV4 and IPV6 collector IDs.*/ 26 #define _COLLECTOR_ID_MAX 64 27 28 /*! Maximum ID of collector ID per transport type.*/ 29 #define _COLLECTOR_ID_MAX_PER_TYPE 32 30 31 /****************************************************************************** 32 * LTSW field structures 33 */ 34 35 /* 36 * Typedef: 37 * bcmint_export_profile_id_bmp_s 38 * Purpose: 39 * Entry bit map to track allocation of export profile ids. 40 */ 41 typedef struct bcmint_export_profile_info_s{ 42 SHR_BITDCL *export_profile_id_bmp; 43 int *ref_count; 44 } bcmint_export_profile_info_t; 45 46 47 /* 48 * Typedef: 49 * bcmint_collector_id_info_s 50 * Purpose: 51 * Book keeping information to track allocation of collector ids. 52 */ 53 typedef struct bcmint_collector_id_info_s{ 54 /*! Mapping of Internal ID : Transport type.*/ 55 SHR_BITDCL *ipv4_id_bitmap; 56 SHR_BITDCL *ipv6_id_bitmap; 57 SHR_BITDCL *externel_id_bitmap; 58 /*! Two dimensional array mapping [ID][TYPE] */ 59 int *id_to_type_map; 60 int *ref_count; 61 bcm_ltsw_collector_export_app_t *user; 62 }bcmint_collector_id_info_t; 63 64 /* Collector Info Structure */ 65 typedef struct bcmint_collector_bookkeeping_info_s { 66 67 /*! Bitmap of allocated export profile id. */ 68 bcmint_export_profile_info_t export_profile_info; 69 70 /*! Bitmap of allocated collector id and their type. */ 71 bcmint_collector_id_info_t collector_info; 72 73 }bcmint_collector_bookkeeping_info_t; 74 75 #endif /* BCMINT_LTSW_COLLECTOR_INT_H */