knet.c (962B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * File: knet.c 8 * Purpose: Manages common KNET functions 9 */ 10 11 #include <sal/core/libc.h> 12 13 #include <bcm/knet.h> 14 15 /* 16 * Function: 17 * bcm_knet_netif_t_init 18 * Purpose: 19 * Initialize the bcm_knet_netif_t structure. 20 * Parameters: 21 * netif - Pointer to the struct to be init'ed 22 */ 23 24 void 25 bcm_knet_netif_t_init(bcm_knet_netif_t *netif) 26 { 27 if (netif != NULL) { 28 sal_memset(netif, 0, sizeof(*netif)); 29 } 30 } 31 32 /* 33 * Function: 34 * bcm_knet_filter_t_init 35 * Purpose: 36 * Initialize the bcm_knet_filter_t structure. 37 * Parameters: 38 * filter - Pointer to the struct to be init'ed 39 */ 40 41 void 42 bcm_knet_filter_t_init(bcm_knet_filter_t *filter) 43 { 44 if (filter != NULL) { 45 sal_memset(filter, 0, sizeof(*filter)); 46 } 47 }