20 #ifndef __CNAT_CONFIG_H__ 21 #define __CNAT_CONFIG_H__ 29 #define V4_DEF_ICMP_S_TO 60 30 #define V4_DEF_UDP_IS_TO 30 31 #define V4_DEF_UDP_AS_TO 120 32 #define V4_DEF_TCP_IS_TO 120 33 #define V4_DEF_TCP_AS_TO 1800 34 #define V4_DEF_TCP_MSS 1460 35 #define V4_DEF_MAX_PORTS 100 36 #define DEF_RATE_LIMIT PLATFORM_MAX_CORES 37 #define DEF_RATE_LIMIT_CORE 1 38 #define RATE_LIMIT_UDP_CORE 1000 40 #define NAT44_RESERVED_INST_ID 1 41 #define DSLITE_START_ID (NAT44_RESERVED_INST_ID + 1) 42 #define V4_DEF_VRF_MAX_PORTS 0 46 #define V4_DEF_ENABLE 1 47 #define V4_DEF_DISABLE 0 49 #define CNAT_DEF_STATIC_PORT_RANGE 1024 53 #define V4_TCP_MSS_NOT_CONFIGURED_VALUE 0xffff 58 #define CNAT_IPV4_FRAG_TIMEOUT_DEF 2 61 #define MAX_DB_ENTRY_PER_SCAN PLATFORM_MAX_DB_ENTRY_PER_SCAN 63 #define MAX_DB_ENTRY_SELECTED_PER_SCAN PLATFORM_MAX_DB_ENTRY_SELECTED_PER_SCAN 65 #define ICMP_MSG_RATE_LIMIT 3 66 #define V4_CONFIG_DELETE_TO 600 128 #define BIDIR_REFRESH_ENABLE 0x01 129 #define BIDIR_REFRESH_DISABLE 0x02 130 #define FTP_ALG_ENABLE 0x04 131 #define FTP_ALG_DISABLE 0x08 132 #define DEFAULT_NFV9_LOGGING_SERVER_ENABLE 0x10 133 #define DEFAULT_NFV9_LOGGING_SERVER_DISABLE 0x20 144 typedef struct _spp_api_cnat_v4_single_vrf_map_req {
154 u16 vrf_policy_enable;
155 #define TCP_MSS_ENABLE 0x0001 156 #define TCP_MSS_DISABLE 0x0002 157 #define NFV9_LOGGING_ENABLE 0x0004 158 #define NFV9_LOGGING_DISABLE 0x0008 159 #define VRF_MAP_DELETE 0x0010 160 #define VRF_MAP_ADD 0x0020 161 #define BULK_ALLOC_CHANGE 0x0040 164 u32 vrf_nfv9_logging_ipv4_address;
165 u16 vrf_nfv9_logging_udp_port;
166 u16 vrf_nfv9_refresh_rate;
167 u16 vrf_nfv9_timeout_rate;
168 u16 vrf_nfv9_path_mtu;
169 #ifndef NO_BULK_LOGGING 174 typedef struct _spp_api_cnat_v4_single_vrf_map_rc {
184 typedef struct _spp_api_cnat_v4_bulk_vrf_map_resp {
189 u32 num_vrfmap_entries;
198 typedef struct _spp_api_cnat_v4_bulk_policy_knob_resp {
205 u8 udp_init_timeout_rc;
206 u8 udp_act_timeout_rc;
208 u8 tcp_init_timeout_rc;
209 u8 tcp_act_timeout_rc;
239 #define PPTP_INCR(ctr) pptp_cfg.counters.pptp_##ctr++ 240 #define PPTP_DECR(ctr) pptp_cfg.counters.pptp_##ctr-- 255 #define CNAT_PPTP_ENABLE 1 256 #define CNAT_PPTP_DEF_TIMEOUT 60 266 #define CNAT_PPTP_ENABLE_FLAG 0x01 267 #define CNAT_PPTP_TIMEOUT_FLAG 0x02 270 typedef struct _spp_api_cnat_v4_config_pptp_alg_resp {
294 #define V6RD_ENTRY_DELETE 0x00 295 #define IPV4_TUNNEL_SRC_CONFIG 0x04 296 #define TUNNEL_MTU_CONFIG 0x08 297 #define IPV4_PREFIXMASK_LEN_CONFIG 0x10 298 #define IPV4_SUFFIXMASK_LEN_CONFIG 0x20 299 #define TTL_CONFIG 0x40 300 #define TOS_CONFIG 0x80 301 #define V6RD_IPV6_PREFIX_CONFIG 0x100 302 #define V6RD_RESET_DF_BIT_CONFIG 0x200 303 #define V6RD_UNICAST_ADDR_CONFIG 0x400 304 #define V6RD_REASSEMB_CONFIG 0x800 306 #define TTL_ENABLE 0x1 307 #define TOS_ENABLE 0x2 308 #define RESET_DF_BIT 0x4 309 #define REASSEMBLY_ENABLE 0x8 316 typedef struct _spp_api_cnat_v4_single_xlat_config_req {
325 #define XLAT_ENTRY_DELETE 0x0000 326 #define IPV6_SVI_IF_NUM_CONFIG 0x0001 327 #define IPV4_SVI_IF_NUM_CONFIG 0x0002 328 #define IPV4_TO_IPV6_TCP_MSS_CONFIG 0x0004 329 #define IPV6_TO_IPV4_TCP_MSS_CONFIG 0x0008 330 #define IPV6_PREFIX_CONFIG 0x0010 331 #define IPV6_UBIT_ON_CONFIG 0x0020 332 #define IPV6_NON_TRANSLATABLE_PREFIX_MAP_CONFIG 0x0040 333 #define IPV4_TOS_SETTING_CONFIG 0x0080 334 #define IPV6_TOS_SETTING_CONFIG 0x0100 335 #define IPV4_DFBIT_CLEAR_CONFIG 0x0200 336 #define ICMPV6_PTB_MTU_SET_CONFIG 0x0400 337 #define IPV6_NON_TRANSLATABLE_PREFIX_MAP_ALG_CONFIG 0x0800 338 #define CPE_V4_PREFIX_CONFIG 0x1000 339 #define CPE_V6_PREFIX_CONFIG 0x2000 340 #define EXTERNAL_V6_PREFIX_CONFIG 0x4000 341 #define PORT_SHARING_RATIO_CONFIG 0x8000 342 #define CONSECUTIVE_PORTS_CONFIG 0x10000 344 u32 xlat_config_fields_enable;
355 u16 v4_to_v6_tcp_mss;
356 u16 v6_to_v4_tcp_mss;
366 u8 v6_prefix_mask_len;
371 #define UBITS_ON 0x01 372 #define IPV4_DF_BIT_CLEAR 0x02 373 #define ICMPV6_MTU_SET 0x04 374 #define IPV4_TOS_SET_ENABLED 0x08 375 #define IPV6_TC_SET_ENABLED 0x10 377 u8 feature_enable_bits;
379 u8 v4_prefix_mask_len;
381 #define IPV6_NON_TRANSLATABLE_PREFIX_MAP_ALG_HASH 0x1 382 #define IPV6_NON_TRANSLATABLE_PREFIX_MAP_ALG_TTL 0x2 383 #define IPV6_NON_TRANSLATABLE_PREFIX_MAP_ALG_RANDOM 0x3 384 u8 non_translatable_v6_prefix_v4_map_prefix_alg;
401 u32 cpe_domain_v6_prefix[4];
402 u8 cpe_domain_v6_prefix_len;
404 u32 cpe_domain_v4_prefix;
405 u8 cpe_domain_v4_prefix_len;
407 u32 external_domain_v6_prefix[4];
408 u8 external_domain_v6_prefix_len;
410 u8 port_sharing_ratio_bits;
411 u8 consecutive_ports_bits;
418 typedef struct _spp_api_cnat_v4_single_xlat_config_resp {
421 u8 v4_to_v6_tcp_mss_rc;
422 u8 v6_to_v4_tcp_mss_rc;
429 u8 non_translatable_v6_prefix_v4_map_alg_rc;
430 u8 ipv4_dfbit_clear_rc;
431 u8 icmpv6_ptb_mtu_set_rc;
443 typedef struct _spp_api_cnat_v4_bulk_xlat_config_resp {
449 u32 num_xlat_entries;
455 typedef struct _spp_api_v6rd_v4_single_v6rd_config_resp {
461 u8 ipv4masklen_prefix_rc;
462 u8 ipv4masklen_suffix_rc;
474 typedef struct _spp_api_v6rd_v4_bulk_v6rd_config_resp {
478 u32 num_v6rd_entries;
485 typedef struct _spp_api_mape_single_config_req {
494 #define MAPE_ENTRY_DELETE 0x0000 495 #define MAPE_IPV4_SVI_IF_NUM_CONFIG 0x0001 496 #define MAPE_IPV6_SVI_IF_NUM_CONFIG 0x0002 497 #define MAPE_IPV4_TO_IPV6_TCP_MSS_CONFIG 0x0004 498 #define MAPE_IPV6_TO_IPV4_TCP_MSS_CONFIG 0x0008 499 #define MAPE_CPE_V4_PREFIX_CONFIG 0x0010 500 #define MAPE_CPE_V6_PREFIX_CONFIG 0x0020 501 #define MAPE_PORT_SHARING_RATIO_CONFIG 0x0040 502 #define MAPE_CONSECUTIVE_PORTS_CONFIG 0x0080 503 #define MAPE_PATH_MTU 0x0100 504 #define MAPE_TUNNEL_ENDPOINT_V6_CONFIG 0x0200 506 u32 mape_config_fields_enable;
517 u16 v4_to_v6_tcp_mss;
518 u16 v6_to_v4_tcp_mss;
528 u32 cpe_domain_v6_prefix[4];
529 u8 cpe_domain_v6_prefix_len;
534 u32 cpe_domain_v4_prefix;
535 u8 cpe_domain_v4_prefix_len;
540 u32 aftr_tunnel_endpoint_address_v6[4];
541 u8 aftr_tunnel_endpoint_address_v6_len;
546 u8 port_sharing_ratio_bits;
547 u8 consecutive_ports_bits;
555 typedef struct _spp_api_mape_single_config_resp {
558 u8 v4_to_v6_tcp_mss_rc;
559 u8 v6_to_v4_tcp_mss_rc;
564 u8 tunnel_endpoint_prefix_rc;
565 u8 port_sharing_ratio_rc;
566 u8 port_contiguous_rc;
573 typedef struct _spp_api_mape_bulk_config_resp {
577 u32 num_mape_entries;
pptp_ctrl_msg_ctrs_t ctrl_ctrs
u16 udp_init_session_timeout
u16 tcp_initial_setup_timeout
struct _spp_api_v6rd_v4_bulk_v6rd_config_resp spp_api_v6rd_v4_bulk_v6rd_config_resp_t
struct _spp_api_cnat_v4_bulk_vrf_map_resp spp_api_cnat_v4_bulk_vrf_map_resp
u8 address_dependent_filtering
struct _spp_api_cnat_v4_bulk_xlat_config_resp spp_api_cnat_v4_bulk_xlat_config_resp
u8 mapping_refresh_both_direction
struct pptp_ctrl_msg_ctrs_t pptp_ctrl_msg_ctrs_t
u32 cnat_main_db_icmp_rate_limit
struct _spp_api_mape_bulk_config_resp spp_api_mape_bulk_config_resp
u16 cnat_main_db_max_ports_per_user
struct pptp_counters_t pptp_counters_t
u32 cnat_main_db_icmp_rate_limit_core
struct _spp_api_cnat_v4_bulk_policy_knob_resp spp_api_cnat_v4_bulk_policy_knob_resp
struct _spp_api_v6rd_v4_single_v6rd_config_resp spp_api_v6rd_v4_single_v6rd_config_resp_t
u64 pptp_out2in_gre_drops
struct _spp_api_cnat_v4_single_vrf_map_rc spp_api_cnat_v4_single_vrf_map_rc
struct _spp_api_mape_single_config_resp spp_api_mape_single_config_resp
u16 config_delete_timeout
u16 cnat_static_port_range
u64 pptp_in2out_gre_drops
struct cnat_pptp_config_t cnat_pptp_config_t
u16 per_user_icmp_msg_limit
struct _spp_api_cnat_v4_single_vrf_map_req spp_api_cnat_v4_single_vrf_map_req
struct _spp_api_mape_single_config_req spp_api_mape_single_config_req
u32 crc_zero_udp_rate_limit_core
cnat_pptp_config_t pptp_cfg
struct _spp_api_cnat_v4_config_pptp_alg_resp spp_api_cnat_v4_config_pptp_alg_resp_t
struct _spp_api_cnat_v4_single_xlat_config_req spp_api_cnat_v4_single_xlat_config_req
u16 udp_act_session_timeout
struct _spp_api_cnat_v4_single_xlat_config_resp spp_api_cnat_v4_single_xlat_config_resp