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

vxlan.c (1501B)


      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  * VXLAN initializers
      8  */
      9 
     10 #if defined(INCLUDE_L3)
     11 
     12 #include <sal/core/libc.h>
     13  
     14 #include <bcm/vxlan.h>
     15 
     16 /* 
     17  * Function:
     18  *      bcm_vxlan_port_t_init
     19  * Purpose:
     20  *      Initialize VXLAN  port struct
     21  * Parameters: 
     22  *      vxlan_port - Pointer to the struct to be init'ed
     23  */
     24 void
     25 bcm_vxlan_port_t_init(bcm_vxlan_port_t *vxlan_port)
     26 {   
     27     if (vxlan_port != NULL) {
     28         sal_memset(vxlan_port, 0, sizeof(*vxlan_port));
     29         vxlan_port->vnid = 0xffffffff;
     30     }
     31     return;
     32 }
     33 
     34 /* 
     35  * Function:
     36  *      bcm_vxlan_vpn_config_t_init
     37  * Purpose:
     38  *      Initialize VXLAN  vpn config struct
     39  * Parameters: 
     40  *      vxlan_vpn - Pointer to the struct to be init'ed
     41  */
     42 void
     43 bcm_vxlan_vpn_config_t_init(bcm_vxlan_vpn_config_t *vxlan_vpn)
     44 {
     45     if (vxlan_vpn != NULL) {
     46         sal_memset(vxlan_vpn, 0, sizeof(*vxlan_vpn));
     47     }
     48     return;
     49 }
     50 
     51 /* 
     52  * Function:
     53  *      bcm_vxlan_network_domain_config_t_init
     54  * Purpose:
     55  *      Initialize VXLAN  network domain config struct
     56  * Parameters: 
     57  *      config - Pointer to the struct to be init'ed
     58  */
     59 void
     60 bcm_vxlan_network_domain_config_t_init(bcm_vxlan_network_domain_config_t *config)
     61 {
     62     if (config != NULL) {
     63         sal_memset(config, 0, sizeof(*config));
     64     }
     65     return;
     66 }
     67 
     68 
     69 #else
     70 int _bcm_vxlan_not_empty;
     71 #endif  /* INCLUDE_L3 */
     72 
     73