Initial commit of vpp code.
[vpp.git] / vnet / vnet / vcgn / cnat_config.c
1 /* 
2  *------------------------------------------------------------------
3  * cnat_config.c - configuration definitions
4  *
5  * Copyright (c) 2007-2012 Cisco and/or its affiliates.
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at:
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *------------------------------------------------------------------
18  */
19 #include "cnat_config.h"
20 #include "cnat_cli.h"
21 #include "cnat_v4_pptp_alg.h"
22 #include "platform_common.h"
23
24 /* session timeout */
25
26 u16 tcp_initial_setup_timeout = V4_DEF_TCP_IS_TO;     /* sec */ 
27 u16 tcp_active_timeout = V4_DEF_TCP_AS_TO;           /* sec */ 
28 u16 udp_init_session_timeout = V4_DEF_UDP_IS_TO;       /* 30 sec */
29 u16 udp_act_session_timeout = V4_DEF_UDP_AS_TO;       /* 2 min */
30 u16 icmp_session_timeout = V4_DEF_ICMP_S_TO;           /* 60 sec */
31
32 cnat_pptp_config_t  pptp_cfg = 
33     { 
34        .enable  = PPTP_DISABLED,
35        .timeout = PPTP_GRE_TIMEOUT 
36     } ;
37
38 /* This flag is used as indication of timeout related config
39  * changes and hence db needs to be updated
40  */
41 u8  timeout_dirty_flag = 0;
42
43 /* mapping refresh direction, 
44  * 1 inbound and outbound refresh 
45  */
46 u8 mapping_refresh_both_direction = V4_DEF_ENABLE;
47
48 u16 cnat_main_db_max_ports_per_user = V4_DEF_MAX_PORTS;
49
50 u32 cnat_main_db_icmp_rate_limit = DEF_RATE_LIMIT;
51 u32 cnat_main_db_icmp_rate_limit_core = DEF_RATE_LIMIT_CORE;
52 u32 crc_zero_udp_rate_limit_core = RATE_LIMIT_UDP_CORE;
53 u16 cnat_static_port_range = CNAT_DEF_STATIC_PORT_RANGE;
54
55
56 /*
57  * ftp alg enable
58  */
59 u8 ftp_alg_enabled = V4_DEF_DISABLE;
60 u16 rtsp_alg_port_num = 0;
61
62 /*
63  * load balancing debug mode
64  */
65 u8 lb_debug_enable = V4_DEF_DISABLE;
66
67
68 /* good or evil mode 
69  * 0 endpoint-independnet filter, good mode
70  * 1 address depedent filter, evil mode
71  */
72 u8 address_dependent_filtering = V4_DEF_DISABLE;
73
74 u16 per_user_icmp_msg_limit = ICMP_MSG_RATE_LIMIT;
75
76 u16 config_delete_timeout = V4_CONFIG_DELETE_TO;
77