FD.io VPP  v17.01-9-ge7dcee4
Vector Packet Processing
cnat_cli.h File Reference
+ Include dependency graph for cnat_cli.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CNAT_TRUE   1
 
#define CNAT_FALSE   0
 
#define CNAT_DEBUG_NONE   (0)
 
#define CNAT_DEBUG_GLOBAL_ERR   (1 << 0)
 
#define CNAT_DEBUG_DROP_TCP   (1 << 0)
 
#define CNAT_DEBUG_DROP_UDP   (1 << 1)
 
#define CNAT_DEBUG_DROP_ICMP   (1 << 2)
 
#define CNAT_DEBUG_ERR_TCP   (1 << 3)
 
#define CNAT_DEBUG_ERR_UDP   (1 << 4)
 
#define CNAT_DEBUG_ERR_ICMP   (1 << 5)
 
#define CNAT_DEBUG_ERR_ALG   (1 << 6)
 
#define CNAT_DEBUG_GLOBAL_ALL   (1 << 7)
 
#define CNAT_DEBUG_FTP_ALG   (1 << 8)
 
#define CNAT_DEBUG_ALL   0x1FF /*all of above*/
 
#define CNAT_DEBUG_ERR_ALL   0x38
 
#define CNAT_DB_CLEAR_SPECIFIC   (0)
 
#define CNAT_DB_CLEAR_ALL   (1 << 0)
 
#define CNAT_DB_CLEAR_VRF   (1 << 1)
 
#define CNAT_DB_CLEAR_ADDR   (1 << 2)
 
#define CNAT_DB_CLEAR_PROTO   (1 << 3)
 
#define CNAT_DB_CLEAR_PORT   (1 << 4)
 
#define MAX_UIDX   0x3fff /*the max svi app uidb index */
 
#define ADDR_MASK_PER_CORE   PLATFORM_ADDR_MASK_PER_CORE
 
#define ADDR_MASK_PER_CORE_PER_PARTITION   PLATFORM_ADDR_MASK_PER_CORE_PER_PARTITION
 
#define MAX_CORES   PLATFORM_MAX_CORES
 
#define MAX_CORES_PER_PARTITION   PLATFORM_MAX_CORES_PER_PARTITION
 
#define CNAT_MAX_ADDR_POOL_SIZE   PLATFORM_CNAT_MAX_ADDR_POOL_SIZE
 
#define CNAT_MAX_ADDR_POOL_SIZE_PER_CORE   (CNAT_MAX_ADDR_POOL_SIZE / MAX_CORES_PER_PARTITION)
 
#define BOUNDARY_VALUE   256
 
#define BOUNDARY_VALUE_MASK   0xff
 
#define NUM_ADDR_IN_RANGE(range, value, instance)   ((range / value) + ((instance % MAX_CORES_PER_PARTITION) < (range%value) ? 1 : 0))
 
#define MIN_NFV9_PATH_MTU   100
 

Enumerations

enum  cnat_errno_t {
  CNAT_SUCCESS = 0, CNAT_NO_CONFIG, CNAT_NO_VRF_RUN, CNAT_NO_POOL_ANY,
  CNAT_NO_PORT_ANY, CNAT_NO_PORT_FROM_BULK, CNAT_NO_PRE_ALLOCATED_BULK_PORTS, CNAT_BAD_INUSE_ANY,
  CNAT_NOT_FOUND_ANY, CNAT_INV_PORT_DIRECT, CNAT_DEL_PORT_DIRECT, CNAT_BAD_INUSE_DIRECT,
  CNAT_NOT_FOUND_DIRECT, CNAT_OUT_LIMIT, CNAT_MAIN_DB_LIMIT, CNAT_USER_DB_LIMIT,
  CNAT_NOT_STATIC_PORT, CNAT_BAD_STATIC_PORT_REQ, CNAT_NOT_THIS_CORE, CNAT_ERR_PARSER,
  CNAT_ERR_INVALID_MSG_ID, CNAT_ERR_INVALID_MSG_SIZE, CNAT_ERR_INVALID_PAYLOAD_SIZE, CNAT_ERR_BAD_TCP_UDP_PORT,
  CNAT_ERR_BULK_SINGLE_FAILURE, CNAT_ERR_XLAT_ID_INVALID, CNAT_ERR_XLAT_V6_PREFIX_INVALID, CNAT_ERR_XLAT_V4_PREFIX_INVALID,
  CNAT_ERR_XLAT_TCP_MSS_INVALID, CNAT_ERR_6RD_ID_INVALID, CNAT_ERR_6RD_V4_TUNNEL_SRC_INVALID, CNAT_ERR_6RD_V6_PREFIX_INVALID,
  CNAT_ERR_6RD_V6_BR_UNICAST_INVALID, CNAT_ERR_6RD_V4_PREFIX_MASK_LEN_INVALID, CNAT_ERR_6RD_V4_SUFFIX_MASK_LEN_INVALID, CNAT_ERR_6RD_V4_COMBO_MASK_LEN_INVALID,
  CNAT_ERR_6RD_TUNNEL_MTU_INVALID, CNAT_ERR_6RD_TUNNEL_TTL_INVALID, CNAT_ERR_6RD_TUNNEL_TOS_INVALID, CNAT_ERR_NAT64_NO_VRF_RUN,
  CNAT_ERR_NAT64_ID_INVALID, CNAT_ERR_NAT64_V6_PREFIX_INVALID, CNAT_ERR_NAT64_V4_PREFIX_INVALID, CNAT_ERR_NAT64_TCP_MSS_INVALID,
  CNAT_ERR_NO_SESSION_DB, CNAT_ERR_MAPE_ID_INVALID, CNAT_ERR_MAX
}
 
enum  cnat_debug_variable_value {
  CNAT_DEBUG_FLAGS_DUMP = 0, CNAT_DEBUG_FLAG_UDP_INSIDE_CHECKSUM_DISABLE, CNAT_DEBUG_FLAG_UDP_OUTSIDE_CHECKSUM_DISABLE, CNAT_DEBUG_FLAG_UDP_OUTSIDE_PKT_DUMP_ENABLE,
  CNAT_DEBUG_FLAG_UDP_INSIDE_PKT_DUMP_ENABLE, CNAT_DEBUG_FLAG_ICMP_PKT_DUMP_ENABLE, CNAT_DEBUG_FLAG_FRAG_PKT_DUMP_ENABLE, CNAT_DEBUG_FLAG_CONFIG_DEBUG_ENABLE,
  CNAT_DEBUG_FLAG_GLOBAL_DEBUG_ALL_ENABLE, CNAT_DEBUG_FLAG_SUMMARY_STATS_DEBUG_ENABLE, CNAT_DEBUG_FLAG_SHOW_DEBUG_ENABLE, CNAT_DEBUG_FLAG_XLAT_CONFIG_DEBUG_ENABLE,
  CNAT_DEBUG_FLAG_XLAT_DATA_PATH_DEBUG_ENABLE, CNAT_DEBUG_FLAG_TCP_LOGGING_ENABLE, CNAT_DEBUG_FLAG_NFV9_LOGGING_DUMP_ENABLE, CNAT_DEBUG_FLAG_SYSLOG_LOGGING_DUMP_ENABLE,
  CNAT_DEBUG_SET_STATIC_PORT_RANGE, CNAT_DEBUG_FLAG_V6RD_DATA_PATH_DEBUG_ENABLE, CNAT_DEBUG_FLAG_V6RD_CONFIG_DEBUG_ENABLE, CNAT_DEBUG_FLAG_V6RD_DEFRAG_DEBUG_ENABLE,
  CNAT_DEBUG_FLAG_NAT64_CONFIG_DEBUG_ENABLE, CNAT_DEBUG_FLAG_NAT64_DATA_PATH_DEBUG_ENABLE, CNAT_DEBUG_FLAG_DSLITE_DP_ENABLE, CNAT_DEBUG_FLAG_DSLITE_CONFIG_DEBUG_ENABLE,
  CNAT_DEBUG_FLAG_CONFIG_PPTP_ENABLE = 24, CNAT_DEBUG_FLAG_CONFIG_PCP_ENABLE = 25, CNAT_DEBUG_FLAG_MAPE_CONFIG_DEBUG_ENABLE, CNAT_DEBUG_FLAG_MAPE_DATA_PATH_DEBUG_ENABLE,
  CNAT_DEBUG_FLAG_MAX
}
 

Functions

void cnat_nat44_add_vrf_map_t_handler (spp_api_cnat_v4_add_vrf_map_t *mp, vlib_main_t *vm)
 
void cnat_nat44_handle_show_stats (vlib_main_t *vm)
 
void cnat_nat44_handle_show_config (vlib_main_t *vm)
 
void cnat_nat44_set_protocol_timeout_value (u16 active, u16 init, u8 *proto, u8 reset, vlib_main_t *vm)
 
void cnat_v4_show_inside_entry_req_t_handler (spp_api_cnat_v4_show_inside_entry_req_t *mp, vlib_main_t *vm)
 

Variables

u32 global_debug_flag
 
u16 debug_i_vrf
 
u32 debug_i_flag
 
u32 debug_i_addr_start
 
u32 debug_i_addr_end
 
u16 debug_o_vrf
 
u32 debug_o_flag
 
u32 debug_o_addr_start
 
u32 debug_o_addr_end
 
u32 tcp_logging_enable_flag
 
u32 nfv9_logging_debug_flag
 
u32 udp_inside_checksum_disable
 
u32 udp_outside_checksum_disable
 
u32 udp_inside_packet_dump_enable
 
u32 udp_outside_packet_dump_enable
 
u32 icmp_debug_flag
 
u32 frag_debug_flag
 
u32 summary_stats_debug_flag
 
u32 config_debug_level
 
u32 show_debug_level
 

Macro Definition Documentation

#define ADDR_MASK_PER_CORE   PLATFORM_ADDR_MASK_PER_CORE

Definition at line 112 of file cnat_cli.h.

#define ADDR_MASK_PER_CORE_PER_PARTITION   PLATFORM_ADDR_MASK_PER_CORE_PER_PARTITION

Definition at line 113 of file cnat_cli.h.

#define BOUNDARY_VALUE   256

Definition at line 126 of file cnat_cli.h.

#define BOUNDARY_VALUE_MASK   0xff

Definition at line 128 of file cnat_cli.h.

#define CNAT_DB_CLEAR_ADDR   (1 << 2)

Definition at line 105 of file cnat_cli.h.

#define CNAT_DB_CLEAR_ALL   (1 << 0)

Definition at line 103 of file cnat_cli.h.

#define CNAT_DB_CLEAR_PORT   (1 << 4)

Definition at line 107 of file cnat_cli.h.

#define CNAT_DB_CLEAR_PROTO   (1 << 3)

Definition at line 106 of file cnat_cli.h.

#define CNAT_DB_CLEAR_SPECIFIC   (0)

Definition at line 102 of file cnat_cli.h.

#define CNAT_DB_CLEAR_VRF   (1 << 1)

Definition at line 104 of file cnat_cli.h.

#define CNAT_DEBUG_ALL   0x1FF /*all of above*/

Definition at line 99 of file cnat_cli.h.

#define CNAT_DEBUG_DROP_ICMP   (1 << 2)

Definition at line 89 of file cnat_cli.h.

#define CNAT_DEBUG_DROP_TCP   (1 << 0)

Definition at line 87 of file cnat_cli.h.

#define CNAT_DEBUG_DROP_UDP   (1 << 1)

Definition at line 88 of file cnat_cli.h.

#define CNAT_DEBUG_ERR_ALG   (1 << 6)

Definition at line 93 of file cnat_cli.h.

#define CNAT_DEBUG_ERR_ALL   0x38

Definition at line 100 of file cnat_cli.h.

#define CNAT_DEBUG_ERR_ICMP   (1 << 5)

Definition at line 92 of file cnat_cli.h.

#define CNAT_DEBUG_ERR_TCP   (1 << 3)

Definition at line 90 of file cnat_cli.h.

#define CNAT_DEBUG_ERR_UDP   (1 << 4)

Definition at line 91 of file cnat_cli.h.

#define CNAT_DEBUG_FTP_ALG   (1 << 8)

Definition at line 95 of file cnat_cli.h.

#define CNAT_DEBUG_GLOBAL_ALL   (1 << 7)

Definition at line 94 of file cnat_cli.h.

#define CNAT_DEBUG_GLOBAL_ERR   (1 << 0)

Definition at line 86 of file cnat_cli.h.

#define CNAT_DEBUG_NONE   (0)

Definition at line 85 of file cnat_cli.h.

#define CNAT_FALSE   0

Definition at line 82 of file cnat_cli.h.

#define CNAT_MAX_ADDR_POOL_SIZE   PLATFORM_CNAT_MAX_ADDR_POOL_SIZE

Definition at line 122 of file cnat_cli.h.

#define CNAT_MAX_ADDR_POOL_SIZE_PER_CORE   (CNAT_MAX_ADDR_POOL_SIZE / MAX_CORES_PER_PARTITION)

Definition at line 123 of file cnat_cli.h.

#define CNAT_TRUE   1

Definition at line 81 of file cnat_cli.h.

#define MAX_CORES   PLATFORM_MAX_CORES

Definition at line 116 of file cnat_cli.h.

#define MAX_CORES_PER_PARTITION   PLATFORM_MAX_CORES_PER_PARTITION

Definition at line 117 of file cnat_cli.h.

#define MAX_UIDX   0x3fff /*the max svi app uidb index */

Definition at line 110 of file cnat_cli.h.

#define MIN_NFV9_PATH_MTU   100

Definition at line 168 of file cnat_cli.h.

#define NUM_ADDR_IN_RANGE (   range,
  value,
  instance 
)    ((range / value) + ((instance % MAX_CORES_PER_PARTITION) < (range%value) ? 1 : 0))

Definition at line 130 of file cnat_cli.h.

Enumeration Type Documentation

Enumerator
CNAT_DEBUG_FLAGS_DUMP 
CNAT_DEBUG_FLAG_UDP_INSIDE_CHECKSUM_DISABLE 
CNAT_DEBUG_FLAG_UDP_OUTSIDE_CHECKSUM_DISABLE 
CNAT_DEBUG_FLAG_UDP_OUTSIDE_PKT_DUMP_ENABLE 
CNAT_DEBUG_FLAG_UDP_INSIDE_PKT_DUMP_ENABLE 
CNAT_DEBUG_FLAG_ICMP_PKT_DUMP_ENABLE 
CNAT_DEBUG_FLAG_FRAG_PKT_DUMP_ENABLE 
CNAT_DEBUG_FLAG_CONFIG_DEBUG_ENABLE 
CNAT_DEBUG_FLAG_GLOBAL_DEBUG_ALL_ENABLE 
CNAT_DEBUG_FLAG_SUMMARY_STATS_DEBUG_ENABLE 
CNAT_DEBUG_FLAG_SHOW_DEBUG_ENABLE 
CNAT_DEBUG_FLAG_XLAT_CONFIG_DEBUG_ENABLE 
CNAT_DEBUG_FLAG_XLAT_DATA_PATH_DEBUG_ENABLE 
CNAT_DEBUG_FLAG_TCP_LOGGING_ENABLE 
CNAT_DEBUG_FLAG_NFV9_LOGGING_DUMP_ENABLE 
CNAT_DEBUG_FLAG_SYSLOG_LOGGING_DUMP_ENABLE 
CNAT_DEBUG_SET_STATIC_PORT_RANGE 
CNAT_DEBUG_FLAG_V6RD_DATA_PATH_DEBUG_ENABLE 
CNAT_DEBUG_FLAG_V6RD_CONFIG_DEBUG_ENABLE 
CNAT_DEBUG_FLAG_V6RD_DEFRAG_DEBUG_ENABLE 
CNAT_DEBUG_FLAG_NAT64_CONFIG_DEBUG_ENABLE 
CNAT_DEBUG_FLAG_NAT64_DATA_PATH_DEBUG_ENABLE 
CNAT_DEBUG_FLAG_DSLITE_DP_ENABLE 
CNAT_DEBUG_FLAG_DSLITE_CONFIG_DEBUG_ENABLE 
CNAT_DEBUG_FLAG_CONFIG_PPTP_ENABLE 
CNAT_DEBUG_FLAG_CONFIG_PCP_ENABLE 
CNAT_DEBUG_FLAG_MAPE_CONFIG_DEBUG_ENABLE 
CNAT_DEBUG_FLAG_MAPE_DATA_PATH_DEBUG_ENABLE 
CNAT_DEBUG_FLAG_MAX 

Definition at line 133 of file cnat_cli.h.

Enumerator
CNAT_SUCCESS 
CNAT_NO_CONFIG 
CNAT_NO_VRF_RUN 
CNAT_NO_POOL_ANY 
CNAT_NO_PORT_ANY 
CNAT_NO_PORT_FROM_BULK 
CNAT_NO_PRE_ALLOCATED_BULK_PORTS 
CNAT_BAD_INUSE_ANY 
CNAT_NOT_FOUND_ANY 
CNAT_INV_PORT_DIRECT 
CNAT_DEL_PORT_DIRECT 
CNAT_BAD_INUSE_DIRECT 
CNAT_NOT_FOUND_DIRECT 
CNAT_OUT_LIMIT 
CNAT_MAIN_DB_LIMIT 
CNAT_USER_DB_LIMIT 
CNAT_NOT_STATIC_PORT 
CNAT_BAD_STATIC_PORT_REQ 
CNAT_NOT_THIS_CORE 
CNAT_ERR_PARSER 
CNAT_ERR_INVALID_MSG_ID 
CNAT_ERR_INVALID_MSG_SIZE 
CNAT_ERR_INVALID_PAYLOAD_SIZE 
CNAT_ERR_BAD_TCP_UDP_PORT 
CNAT_ERR_BULK_SINGLE_FAILURE 
CNAT_ERR_XLAT_ID_INVALID 
CNAT_ERR_XLAT_V6_PREFIX_INVALID 
CNAT_ERR_XLAT_V4_PREFIX_INVALID 
CNAT_ERR_XLAT_TCP_MSS_INVALID 
CNAT_ERR_6RD_ID_INVALID 
CNAT_ERR_6RD_V4_TUNNEL_SRC_INVALID 
CNAT_ERR_6RD_V6_PREFIX_INVALID 
CNAT_ERR_6RD_V6_BR_UNICAST_INVALID 
CNAT_ERR_6RD_V4_PREFIX_MASK_LEN_INVALID 
CNAT_ERR_6RD_V4_SUFFIX_MASK_LEN_INVALID 
CNAT_ERR_6RD_V4_COMBO_MASK_LEN_INVALID 
CNAT_ERR_6RD_TUNNEL_MTU_INVALID 
CNAT_ERR_6RD_TUNNEL_TTL_INVALID 
CNAT_ERR_6RD_TUNNEL_TOS_INVALID 
CNAT_ERR_NAT64_NO_VRF_RUN 
CNAT_ERR_NAT64_ID_INVALID 
CNAT_ERR_NAT64_V6_PREFIX_INVALID 
CNAT_ERR_NAT64_V4_PREFIX_INVALID 
CNAT_ERR_NAT64_TCP_MSS_INVALID 
CNAT_ERR_NO_SESSION_DB 
CNAT_ERR_MAPE_ID_INVALID 
CNAT_ERR_MAX 

Definition at line 26 of file cnat_cli.h.

Function Documentation

void cnat_nat44_add_vrf_map_t_handler ( spp_api_cnat_v4_add_vrf_map_t mp,
vlib_main_t vm 
)

Definition at line 157 of file cnat_cli_handler.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_nat44_handle_show_config ( vlib_main_t vm)

Definition at line 318 of file cnat_cli_handler.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_nat44_handle_show_stats ( vlib_main_t vm)

Definition at line 264 of file cnat_cli_handler.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_nat44_set_protocol_timeout_value ( u16  active,
u16  init,
u8 proto,
u8  reset,
vlib_main_t vm 
)

Definition at line 240 of file cnat_cli_handler.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cnat_v4_show_inside_entry_req_t_handler ( spp_api_cnat_v4_show_inside_entry_req_t mp,
vlib_main_t vm 
)

Definition at line 489 of file cnat_cli_handler.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

u32 config_debug_level

Definition at line 54 of file cnat_debug_msg_handler.c.

u32 debug_i_addr_end

Definition at line 29 of file cnat_debug_msg_handler.c.

u32 debug_i_addr_start

Definition at line 28 of file cnat_debug_msg_handler.c.

u32 debug_i_flag

Definition at line 27 of file cnat_debug_msg_handler.c.

u16 debug_i_vrf

Definition at line 26 of file cnat_debug_msg_handler.c.

u32 debug_o_addr_end

Definition at line 34 of file cnat_debug_msg_handler.c.

u32 debug_o_addr_start

Definition at line 33 of file cnat_debug_msg_handler.c.

u32 debug_o_flag

Definition at line 32 of file cnat_debug_msg_handler.c.

u16 debug_o_vrf

Definition at line 31 of file cnat_debug_msg_handler.c.

u32 frag_debug_flag

Definition at line 44 of file cnat_debug_msg_handler.c.

u32 global_debug_flag

Definition at line 25 of file cnat_debug_msg_handler.c.

u32 icmp_debug_flag

Definition at line 43 of file cnat_debug_msg_handler.c.

u32 nfv9_logging_debug_flag

Definition at line 46 of file cnat_debug_msg_handler.c.

u32 show_debug_level

Definition at line 44 of file cnat_cli_handler.c.

u32 summary_stats_debug_flag

Definition at line 49 of file cnat_debug_msg_handler.c.

u32 tcp_logging_enable_flag

Definition at line 41 of file cnat_debug_msg_handler.c.

u32 udp_inside_checksum_disable

Definition at line 36 of file cnat_debug_msg_handler.c.

u32 udp_inside_packet_dump_enable

Definition at line 38 of file cnat_debug_msg_handler.c.

u32 udp_outside_checksum_disable

Definition at line 37 of file cnat_debug_msg_handler.c.

u32 udp_outside_packet_dump_enable

Definition at line 39 of file cnat_debug_msg_handler.c.