openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

niv.c (1435B)


      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  * All Rights Reserved.$
      7  *
      8  * NIV initializers
      9  */
     10 #if defined(INCLUDE_L3)
     11 
     12 #include <sal/core/libc.h>
     13  
     14 #include <bcm/niv.h>
     15 
     16 /* 
     17  * Function:
     18  *      bcm_niv_port_t_init
     19  * Purpose:
     20  *      Initialize the NIV port struct
     21  * Parameters: 
     22  *      niv_port - Pointer to the struct to be init'ed
     23  */
     24 void
     25 bcm_niv_port_t_init(bcm_niv_port_t *niv_port)
     26 {   
     27     if (niv_port != NULL) {
     28         sal_memset(niv_port, 0, sizeof(*niv_port));
     29     }
     30     return;
     31 }
     32 
     33 /* 
     34  * Function:
     35  *      bcm_niv_forward_t_init
     36  * Purpose:
     37  *      Initialize the NIV forward entry struct
     38  * Parameters: 
     39  *      iv_fwd_entry - Pointer to the struct to be init'ed
     40  */
     41 void
     42 bcm_niv_forward_t_init(bcm_niv_forward_t *iv_fwd_entry)
     43 {   
     44     if (iv_fwd_entry != NULL) {
     45         sal_memset(iv_fwd_entry, 0, sizeof(*iv_fwd_entry));
     46     }
     47     return;
     48 }
     49 
     50 /* 
     51  * Function:
     52  *      bcm_niv_egress_t_init
     53  * Purpose:
     54  *      Initialize the NIV egress object struct
     55  * Parameters: 
     56  *      niv_egress - Pointer to the struct to be init'ed
     57  */
     58 void
     59 bcm_niv_egress_t_init(bcm_niv_egress_t *niv_egress)
     60 {   
     61     if (niv_egress != NULL) {
     62         sal_memset(niv_egress, 0, sizeof(*niv_egress));
     63     }
     64     return;
     65 }
     66 
     67 #else
     68 int _bcm_niv_not_empty;
     69 #endif  /* INCLUDE_L3 */
     70