mcast.h (2607B)
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_MCAST_H__ 14 #define __BCMX_MCAST_H__ 15 16 #include <bcm/types.h> 17 #include <bcmx/bcmx.h> 18 #include <bcmx/lplist.h> 19 #include <bcm/mcast.h> 20 21 /* Device-independent L2 multicast address. */ 22 typedef struct bcmx_mcast_addr_s { 23 bcm_mac_t mac; /* 802.3 MAC address. */ 24 bcm_vlan_t vid; /* VLAN identifier. */ 25 bcm_cos_t cos_dst; /* COS based on destination address. */ 26 bcmx_lplist_t ports; /* Port list. */ 27 bcmx_lplist_t untag_ports; /* Untagged port bitmap. */ 28 uint32 l2mc_index; /* XGS: L2MC index. */ 29 } bcmx_mcast_addr_t; 30 31 /* Initialize bcmx_mcast_addr_t and allocate port lists. */ 32 extern void bcmx_mcast_addr_t_init( 33 bcmx_mcast_addr_t *mcaddr, 34 bcm_mac_t mac, 35 bcm_vlan_t vid); 36 37 /* Backward compatibility. */ 38 #define bcmx_mcast_addr_init bcmx_mcast_addr_t_init 39 40 /* Deallocate port lists in bcmx_mcast_addr_t. */ 41 extern void bcmx_mcast_addr_t_free( 42 bcmx_mcast_addr_t *mcaddr); 43 44 /* Backward compatibility. */ 45 #define bcmx_mcast_addr_free bcmx_mcast_addr_t_free 46 47 /* Initialize the L2 multicast module. */ 48 extern int bcmx_mcast_init(void); 49 50 /* Add/Remove an entry in the multicast table. */ 51 extern int bcmx_mcast_addr_add( 52 bcmx_mcast_addr_t *mcaddr); 53 54 /* Add/Remove an entry in the multicast table. */ 55 extern int bcmx_mcast_addr_remove( 56 bcm_mac_t mac, 57 bcm_vlan_t vid); 58 59 /* 60 * Get untagged and tagged membership port bit maps for a Multicast 61 * group. 62 */ 63 extern int bcmx_mcast_port_get( 64 bcm_mac_t mac, 65 bcm_vlan_t vid, 66 bcmx_mcast_addr_t *mcaddr); 67 68 /* Add a given port to the membership of a given multicast group. */ 69 extern int bcmx_mcast_join( 70 bcm_mac_t mac, 71 bcm_vlan_t vid, 72 bcmx_lport_t port, 73 bcmx_mcast_addr_t *mcaddr, 74 bcmx_lplist_t *allrtr); 75 76 /* Remove a given port from the membership of a given multicast group. */ 77 extern int bcmx_mcast_leave( 78 bcm_mac_t mac, 79 bcm_vlan_t vid, 80 bcmx_lport_t port); 81 82 /* Add/Remove ports to/from an existing entry in the multicast table. */ 83 extern int bcmx_mcast_port_remove( 84 bcmx_mcast_addr_t *mcaddr); 85 86 /* Add/Remove ports to/from an existing entry in the multicast table. */ 87 extern int bcmx_mcast_port_add( 88 bcmx_mcast_addr_t *mcaddr); 89 90 #endif /* __BCMX_MCAST_H__ */