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

nat.c (1645B)


      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  * File:    nat.c
      9  * Purpose: Common NAT API
     10  */
     11 
     12 #include <soc/defs.h>
     13 
     14 #include <sal/core/libc.h>
     15 
     16 #include <soc/drv.h>
     17 #include <soc/mem.h>
     18 #include <soc/util.h>
     19 #include <soc/debug.h>
     20 
     21 #include <bcm/nat.h>
     22 #include <bcm/error.h>
     23 #include <bcm/debug.h>
     24 #include <bcm/types.h>
     25 
     26 
     27 #ifdef INCLUDE_L3
     28 /*
     29  * Function:
     30  *  bcm_l3_nat_egress_t_init
     31  * Description:
     32  *  Initialize an egress NAT structure
     33  * Parameters:
     34  *  nat_info -    [IN/OUT] pointer to NAT structure
     35  * Returns:
     36  *	NONE
     37  */
     38 void 
     39 bcm_l3_nat_egress_t_init(bcm_l3_nat_egress_t *nat_info) 
     40 {
     41     if (NULL != nat_info) {
     42         sal_memset(nat_info, 0, sizeof (*nat_info));
     43     }
     44     return;
     45 }
     46 
     47 /*
     48  * Function:
     49  *  bcm_l3_nat_ingress_t_init
     50  * Description:
     51  *  Initialize an ingress NAT structure
     52  * Parameters:
     53  *  nat_info -    [IN/OUT] pointer to ingress NAT structure
     54  * Returns:
     55  *	NONE
     56  */
     57 void 
     58 bcm_l3_nat_ingress_t_init(bcm_l3_nat_ingress_t *nat_info) 
     59 {
     60     if (NULL != nat_info) {
     61         sal_memset(nat_info, 0, sizeof (*nat_info));
     62     }
     63     return;
     64 }
     65 /*
     66  * Function:
     67  *  bcm_l3_large_nat_egress_t_init
     68  * Description:
     69  *  Initialize an egress Large Scale NAT structure
     70  * Parameters:
     71  *  nat_info -    [IN/OUT] pointer to NAT structure
     72  * Returns:
     73  *	NONE
     74  */
     75 void 
     76 bcm_l3_large_nat_egress_t_init(bcm_l3_large_nat_egress_t *nat_info) 
     77 {
     78     if (NULL != nat_info) {
     79         sal_memset(nat_info, 0, sizeof (*nat_info));
     80     }
     81     return;
     82 }
     83 #endif /* INCLUDE_L3 */