multicast.h (2386B)
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-2020 Broadcom Inc. All rights reserved. 5 */ 6 7 #ifndef _BCM_INT_DPP_MULTICAST_H 8 #define _BCM_INT_DPP_MULTICAST_H 9 10 #include <sal/types.h> 11 #include <bcm/types.h> 12 #include <bcm/vlan.h> 13 #include <soc/dpp/TMC/tmc_api_multicast_egress.h> 14 15 #define _BCM_PETRA_MULTICAST_TM_TYPE (0) 16 17 18 19 /* Types */ 20 typedef enum 21 { 22 /* 23 * Multicast ingress type 24 */ 25 BCM_DPP_MULTICAST_TYPE_INGRESS_ONLY=0, 26 BCM_DPP_MULTICAST_TYPE_INGRESS = 0, 27 /* 28 * Multicast egress type 29 */ 30 BCM_DPP_MULTICAST_TYPE_EGRESS_ONLY=1, 31 BCM_DPP_MULTICAST_TYPE_EGRESS = 1, 32 /* 33 * Multicast ingress & egress 34 */ 35 BCM_DPP_MULTICAST_TYPE_INGRESS_AND_EGRESS=2, 36 /* 37 * Multicast nof types 38 */ 39 BCM_DPP_MULTICAST_NOF_TYPES=3 40 }BCM_DPP_MULTICAST_TYPE; 41 42 43 /* 44 * Function: 45 * _bcm_petra_multicast_group_to_id 46 * Purpose: 47 * Convert a BCM-Multicast ID to Soc_petra-Multicast ID 48 * Parameters: 49 * group (IN) BCM Multicast 50 * multicast_id (OUT) Soc_petra Multicast ID 51 */ 52 int 53 _bcm_petra_multicast_group_to_id(bcm_multicast_t group, SOC_TMC_MULT_ID *multicast_id); 54 55 56 int 57 _bcm_petra_multicast_group_from_id(bcm_multicast_t *group, int type, SOC_TMC_MULT_ID multicast_id); 58 59 60 61 /* 62 * Function: 63 * _bcm_petra_multicast_ingress_group_exists, _bcm_petra_multicast_egress_group_exists 64 * Purpose: 65 * Check if given multicast ingress/egress group id is open, returning no errors if possible. 66 * Parameters: 67 * soc_sand_dev_id (IN) Deivce id 68 * multicast_id_ndx (IN) Soc_petra Multicast ID. 69 * is_open (OUT) is multicast group opened 70 */ 71 int 72 _bcm_petra_multicast_ingress_group_exists(int unit, SOC_TMC_MULT_ID multicast_id_ndx, uint8 *is_open); 73 74 /* 75 * Function: 76 * _bcm_petra_multicast_is_group_exist 77 * Purpose: 78 * Check if given multicast group id is existed or not according to expected_open. 79 * Parameters: 80 * soc_sand_dev_id (IN) Deivce id 81 * type (IN) group type. 82 * multicast_id_ndx (IN) Soc_petra Multicast ID. 83 * expected_open (IN) Expected multicast group status. 84 */ 85 int 86 _bcm_petra_multicast_is_group_exist(int unit,BCM_DPP_MULTICAST_TYPE type,SOC_TMC_MULT_ID multicast_id_ndx,uint8 expected_open); 87 88 #endif /* !_BCM_INT_DPP_VLAN_H */