mcast.c (990B)
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-2019 Broadcom Inc. All rights reserved. 7 * 8 * Common Multicast Initializers 9 */ 10 11 12 #include <sal/core/libc.h> 13 14 #include <soc/drv.h> 15 #include <soc/feature.h> 16 #include <soc/mem.h> 17 #include <soc/debug.h> 18 19 #include <bcm/error.h> 20 #include <bcm/mcast.h> 21 #include <bcm/vlan.h> 22 #include <bcm/debug.h> 23 24 /* 25 * Function: 26 * bcm_mcast_addr_t_init 27 * Description: 28 * Initialize a bcm_mcast_addr_t to a specified MAC address and VLAN, 29 * while zeroing all other fields. 30 * Parameters: 31 * mcaddr - Pointer to bcm_mcast_addr_t 32 * Returns: 33 * Nothing. 34 */ 35 36 void 37 bcm_mcast_addr_t_init(bcm_mcast_addr_t *mcaddr, 38 sal_mac_addr_t mac, bcm_vlan_t vid) 39 { 40 if (NULL != mcaddr) { 41 sal_memset(mcaddr, 0, sizeof (*mcaddr)); 42 sal_memcpy(mcaddr->mac, mac, sizeof (sal_mac_addr_t)); 43 mcaddr->vid = vid; 44 } 45 return; 46 } 47