20 #ifndef __DSLITE_DEFS_H__ 21 #define __DSLITE_DEFS_H__ 24 #include "spp_platform_common.h" 34 #define SWAP_IPV6_ADDR(ipv6_hdr, dslite_entry_ptr) \ 35 ipv6_hdr->dst_addr[0] = ipv6_hdr->src_addr[0]; \ 36 ipv6_hdr->dst_addr[1] = ipv6_hdr->src_addr[1]; \ 37 ipv6_hdr->dst_addr[2] = ipv6_hdr->src_addr[2]; \ 38 ipv6_hdr->dst_addr[3] = ipv6_hdr->src_addr[3]; \ 39 ipv6_hdr->src_addr[0] = spp_host_to_net_byte_order_32(dslite_entry_ptr->AFTR_v6_address[0]); \ 40 ipv6_hdr->src_addr[1] = spp_host_to_net_byte_order_32(dslite_entry_ptr->AFTR_v6_address[1]); \ 41 ipv6_hdr->src_addr[2] = spp_host_to_net_byte_order_32(dslite_entry_ptr->AFTR_v6_address[2]); \ 42 ipv6_hdr->src_addr[3] = spp_host_to_net_byte_order_32(dslite_entry_ptr->AFTR_v6_address[3]); 44 #define DSLITE_SET_TX_PKT_TYPE(type) { \ 45 ctx->ru.tx.packet_type = type; \ 48 #define DSLITE_INC_STATS_V4(PTR, COUNTER, IPV4_SRC_ADDR) { \ 52 #define DSLITE_INC_STATS_V6(PTR, COUNTER, IPV6_DEST_ADDR) { \ 57 #define DSLITE_INVALID_UIDX 0xffff 58 #define DSLITE_INVALID_VRFID 0xffffffff 60 #define DSLITE_VRF_MASK 0x3fff 61 #define DSLITE_MAX_VRFMAP_ENTRIES (DSLITE_VRF_MASK + 1) 63 #define DSLITE_VRFMAP_ENTRY_INVALID 0xffff 65 #define DSLITE_V6_PREFIX_MASK_MIN 16 66 #define DSLITE_V6_PREFIX_MASK_MAX 96 67 #define DSLITE_V6_PREFIX_MASK_MULTIPLE 8 69 #define DSLITE_TUNNEL_MTU_MIN 1280 70 #define DSLITE_TUNNEL_MTU_MAX 9216 72 #define DSLITE_TUNNEL_TTL_MIN 0 73 #define DSLITE_TUNNEL_TTL_MAX 255 75 #define DSLITE_TUNNEL_TOS_MIN 0 76 #define DSLITE_TUNNEL_TOS_MAX 255 78 #define DSLITE_V4_MASK_MAX 32 81 #define DSLITE_AFTR_IPV4_ADDR 0xC0000001 83 #define DSLITE_MAX_TAP_RG_ENTRIES 2 84 #define DSLITE_MAX_DSLITE_ENTRIES (256) 85 #define DSLITE_MAX_DSLITE_ID (DSLITE_MAX_DSLITE_ENTRIES-1) 87 #define DSLITE_INDEX_OFFSET 1 89 #define DSLITE_INVALID_DSLITE_ID (0) 91 #define DSLITE_TABLE_ENTRY_DELETED 0 92 #define DSLITE_TABLE_ENTRY_ACTIVE 1 93 #define DSLITE_TABLE_ENTRY_DORMANT 2 94 #define DSLITE_TABLE_ENTRY_INVALID_UIDB 3 125 #define DSLITE_IPV4_TOS_OVERRIDE_FLAG 0x00000001 126 #define DSLITE_IPV6_TOS_OVERRIDE_FLAG 0x00000002 127 #define DSLITE_IPV4_TTL_OVERRIDE_FLAG 0x00000004 128 #define DSLITE_IPV6_TTL_OVERRIDE_FLAG 0x00000008 129 #define DSLITE_IPV6_FRAG_REASSEMB_ENG 0x00000010 130 #define DSLITE_FTP_ALG_ENABLE 0x00000020 131 #define DSLITE_RTSP_ALG_ENABLE 0x00000040 132 #define DSLITE_NETFLOW_ENABLE 0x00000080 133 #define DSLITE_SYSLOG_ENABLE 0x00000100 159 #define DSLITE_BIDIR_REFRESH 1 185 #define DSLITE_ADD_UIDB_INDEX_DSLITE_ID_MAPPING(uidb_index, dslite_id) \ 186 *(cgse_uidb_index_cgse_id_mapping_ptr + uidb_index) = dslite_id; 314 #define CMD_GENERATE_PTB 0x1 315 #define CMD_GENERATE_TTL 0x2 333 #define STAT_PORT_RANGE_FROM_INST_PTR(inst) ((inst)->cnat_static_port_range)
u64 v6_to_v4_icmp_error_unsupported_type_drop_count
dslite_v6_to_v4_icmp_qry_counter_t v64_icmp_counters
u64 v6_to_v4_icmp_qry_output_count
u32 in2out_drops_port_limit_exceeded
u64 v6_to_v4_tcp_output_count
u64 v4_to_v6_tcp_no_entry
u64 v4_to_v6_icmp_throttle_count
u64 v6_to_v4_icmp_error_xlated_count
u64 v6_icmp_error_input_count
u64 v6_to_v4_aftr_v4_echo_reply_count
u64 v6_to_v4_admin_prohib_icmp_count
u64 dslite_sec_check_failed
u16 cnat_main_db_max_ports_per_user
u32 out2in_forwarding_rate
u16 udp_init_session_timeout
u32 pool_address_totally_free
u16 udp_act_session_timeout
dslite_v6_to_v4_udp_counter_t v64_udp_counters
dslite_v4_to_v6_udp_counter_t v46_udp_counters
u64 v6_to_v4_icmp_err_throttled_count
dslite_counters_t counters
dslite_global_counters_t dslite_global_counters
dslite_table_entry_t * dslite_table_db_ptr
bulk_alloc_size_t bulk_size
void dslite_clear_counters(u16 dslite_id)
u64 dslite_input_tunnel_pkt
u64 v6_to_v4_udp_output_count
u64 v6_to_v4_icmp_qry_input_count
u64 v4_to_v6_icmp_error_input_count
u64 v6_to_v4_icmp_qry_nat_error
u64 v6_to_v4_icmp_throttle_count
u16 cnat_static_port_range
u64 v4_to_v6_tcp_input_count
u64 v4_to_v6_icmp_qry_no_nat_entry
u64 v4_to_v6_udp_no_entry
dslite_v6_icmp_error_counter_t dslite_v6_icmp_err_counters
dslite_v4_to_v6_icmp_qry_counter_t v46_icmp_counters
u64 v4_to_v6_ttl_gen_count
dslite_v4_to_v6_icmp_error_counter_t v46_icmp_error_counters
u64 v4_to_v6_udp_output_count
u64 v6_to_v4_invalid_uidb_drop_count
u64 v6_to_v4_icmp_error_input_count
u64 v6_to_v4_udp_input_count
dslite_v6_to_v4_tcp_counter_t v64_tcp_counters
u32 translation_create_rate
cnat_portmap_v2_t * portmap_list
u16 tcp_initial_setup_timeout
u64 v4_to_v6_icmp_error_no_nat_entry
u64 v4_to_v6_icmp_qry_output_count
u64 v4_to_v6_icmp_qry_input_count
u32 in2out_drops_resource_depletion
u64 v4_to_v6_icmp_error_output_count
u32 no_translation_entry_drops
u32 dslite_data_path_debug_level
u32 dslite_defrag_debug_level
u64 v6_to_v4_ttl_gen_count
void dslite_clear_per_RG_counters()
u32 in2out_drops_system_limit_reached
u64 v6_to_v4_tcp_nat_error
u64 drops_sessiondb_limit_exceeded
dslite_v6_to_v4_icmp_error_counter_t v64_icmp_error_counters
u32 dslite_config_debug_level
dslite_counters_t dslite_all_counters[DSLITE_MAX_DSLITE_ENTRIES]
#define DSLITE_MAX_DSLITE_ENTRIES
u64 v6_AFTR_echo_reply_count
u32 ds_lite_config_debug_level
u64 v4_to_v6_invalid_uidb_drop_count
dslite_v4_to_v6_tcp_counter_t v46_tcp_counters
u64 v4_to_v6_tcp_output_count
dslite_icmp_gen_counter_t dslite_icmp_gen_counters
u32 translation_delete_rate
u64 v4_to_v6_aftr_v4_echo_reply_count
dslite_timeout_info_t timeout_info
u64 v4_to_v6_ptb_gen_count
u32 in2out_forwarding_rate
u64 v6_to_v4_icmp_error_output_count
void dslite_show_config(void)
u64 v4_to_v6_frag_invalid_uidb_drop_count
u64 v6_to_v4_icmp_error_no_db_entry_count
u64 v4_to_v6_udp_input_count
u8 mapping_refresh_both_direction
u64 v6_to_v4_icmp_error_nat_error
dslite_common_counter_t dslite_common_counters
u64 v6_to_v4_tcp_input_count
u64 v6_to_v4_udp_nat_error