36 #include <arpa/inet.h> 58 #define FIND_MY_VRF_USING_I_VRF_ID \ 59 my_vrfmap_found = 0; \ 60 pool_foreach (my_vrfmap, cnat_map_by_vrf, ({ \ 61 if (my_vrfmap->i_vrf_id == i_vrf_id) { \ 62 my_vrfmap_found = 1; \ 63 my_vrfmap_temp = my_vrfmap; \ 76 s =
format (s,
"VCGN_CLASSIFY: dst %U dst_port %d sw_if_index %d next %d",
87 #define foreach_vcgn_classify_error \ 88 _(PACKETS_RECEIVED, "total packets received") \ 89 _(V4_PACKETS_PROCESSED, "ipv4 packets processed for vCGN") \ 90 _(V4_PACKETS_PUNTED, "ipv4 packets punted") \ 91 _(V6_PACKETS_PUNTED, "ipv6 packets punted") \ 92 _(MPLS_PACKETS_PUNTED, "mpls unicast packets punted") \ 93 _(ETH_PACKETS_PUNTED, "ethernet packets punted") 97 #define _(sym,str) VCGN_CLASSIFY_ERROR_##sym, 104 #define _(sym,string) string, 145 u32 n_left_from, * from, * to_next;
158 while (n_left_from > 0)
163 to_next, n_left_to_next);
166 while (n_left_from >= 4 && n_left_to_next >= 2)
171 u32 sw_if_index0, sw_if_index1;
188 to_next[0] = bi0 = from[0];
189 to_next[1] = bi1 = from[1];
204 em->
counters[node_counter_base_index + VCGN_CLASSIFY_ERROR_PACKETS_RECEIVED] += 2;
226 to_next, n_left_to_next,
227 bi0, bi1, next0, next1);
231 while (n_left_from > 0 && n_left_to_next > 0)
258 if (*etype == clib_host_to_net_u16(ETHERNET_TYPE_VLAN)) {
259 l3_type = (etype + 1);
266 if (*l3_type == clib_host_to_net_u16(ETHERNET_TYPE_IP4)) {
274 counter = VCGN_CLASSIFY_ERROR_V4_PACKETS_PROCESSED;
276 if (protocol_type == 0x11) {
282 }
else if (protocol_type == 0x06) {
288 }
else if (protocol_type == 0x01) {
292 icmp_type = icmp->
type;
311 counter = VCGN_CLASSIFY_ERROR_V4_PACKETS_PUNTED;
325 }
else if (*l3_type == clib_host_to_net_u16(ETHERNET_TYPE_IP6)) {
329 counter = VCGN_CLASSIFY_ERROR_V6_PACKETS_PUNTED;
331 }
else if (*l3_type ==
332 clib_host_to_net_u16(ETHERNET_TYPE_MPLS_UNICAST)) {
336 counter = VCGN_CLASSIFY_ERROR_MPLS_PACKETS_PUNTED;
340 counter = VCGN_CLASSIFY_ERROR_ETH_PACKETS_PUNTED;
343 em->
counters[node_counter_base_index + counter] += 1;
344 em->
counters[node_counter_base_index +
345 VCGN_CLASSIFY_ERROR_PACKETS_RECEIVED] += 1;
349 to_next, n_left_to_next,
361 .name =
"vcgn-classify",
362 .vector_size =
sizeof (
u32),
451 u32 end_port = 65535;
453 inside_req.start_port = start_port;
454 inside_req.end_port = end_port;
456 if (
unformat(input,
"protocol %s", &proto)) {
457 if (!strncmp((
char *) proto,
"udp", 3)) {
458 inside_req.protocol = 1;
459 }
else if (!strncmp((
char *) proto,
"tcp", 3)) {
460 inside_req.protocol = 2;
462 inside_req.protocol = 3;
464 }
else if (
unformat (input,
"inside-addr %U",
466 inside_req.ipv4_addr = clib_net_to_host_u32(inside_addr.
as_u32);
467 }
else if (
unformat(input,
"start-port %u", &start_port)) {
468 inside_req.start_port = start_port;
469 }
else if (
unformat(input,
"end-port %u", &end_port)) {
470 inside_req.end_port = end_port;
475 inside_req.all_entries = 0;
478 "end_port %u, vrf 0x%x\n",
480 inside_req.ipv4_addr,
481 inside_req.start_port,
506 u32 end_port = 65535;
508 outside_req.start_port = start_port;
509 outside_req.end_port = end_port;
511 if (
unformat(input,
"protocol %s", &proto)) {
512 if (!strncmp((
char *) proto,
"udp", 3)) {
513 outside_req.protocol = 1;
514 }
else if (!strncmp((
char *) proto,
"tcp", 3)) {
515 outside_req.protocol = 2;
517 outside_req.protocol = 3;
519 }
else if (
unformat (input,
"outside-addr %U",
521 outside_req.ipv4_addr = clib_net_to_host_u32(outside_addr.
as_u32);
522 }
else if (
unformat(input,
"start-port %u", &start_port)) {
523 outside_req.start_port = start_port;
524 }
else if (
unformat(input,
"end-port %u", &end_port)) {
525 outside_req.end_port = end_port;
532 "end_port %u, vrf 0x%x\n",
533 outside_req.protocol,
534 outside_req.ipv4_addr,
535 outside_req.start_port,
536 outside_req.end_port,
556 u32 inside_sw_if_index = 1;
557 u32 outside_sw_if_index = ~0;
564 else if (
unformat(input,
"outside %U",
569 if (inside_sw_if_index == ~0 ||
570 outside_sw_if_index == ~0)
574 if (inside_sw_if_index == outside_sw_if_index)
575 return clib_error_return (0,
"inside and outside interfaces can't be the same...");
616 map.start_addr[0] = clib_net_to_host_u32(lo.
as_u32);
617 map.end_addr[0] = clib_net_to_host_u32(hi.
as_u32);
626 if (inside_hw_if_index) {
631 if (outside_hw_if_index) {
649 u32 init_timeout = 0;
652 if (
unformat(input,
"active %u", &act_timeout))
654 else if (
unformat(input,
"init %u", &init_timeout))
671 u32 init_timeout = 0;
674 if (
unformat(input,
"active %u", &act_timeout))
676 else if (
unformat(input,
"init %u", &init_timeout))
696 if (
unformat(input,
"%u", &timeout))
718 if (
unformat(input,
"%s", &protocol))
742 if (port != 0 && port > 65535) {
767 if (port != 0 && port > 65535) {
791 u16 max_length_minus_max_record_size;
795 max_length_minus_max_record_size = path_mtu -
804 return max_length_minus_max_record_size;
826 (server->
port == new_server_info->
port)) {
828 #ifdef DEBUG_NF_SERVER_CONFIG 830 printf(
"\n Server match for %x and port %d\n",
834 goto adjust_refresh_rate;
837 #ifdef DEBUG_NF_SERVER_CONFIG 839 printf(
"\n Server change from %x, %d to %x, %d" 849 #ifdef DEBUG_NF_SERVER_CONFIG 867 (server->
port == new_server_info->
port)) {
869 nfv9_info->server_index = server - nfv9_server_info_pool;
871 #ifdef DEBUG_NF_SERVER_CONFIG
872 if(my_instance_number == 1) {
873 printf(
"Re-using server %x, %d Ref count %d\n",
874 server->ipv4_address, server->port, server->ref_count);
886 server->ref_count = 1;
888 #ifdef DEBUG_NF_SERVER_CONFIG 890 printf(
"Create new server for at %d %x and port %d\n",
891 nfv9_info->server_index,
892 new_server_info->ipv4_address, new_server_info->port);
899 if(server->refresh_rate >
900 new_server_info->refresh_rate) {
901 server->refresh_rate =
902 new_server_info->refresh_rate;
903 #ifdef DEBUG_NF_SERVER_CONFIG 905 printf(
"Reset refresh rate to %d\n",
906 server->refresh_rate);
911 if(server->timeout_rate >
912 new_server_info->timeout_rate) {
913 server->timeout_rate =
914 new_server_info->timeout_rate;
915 #ifdef DEBUG_NF_SERVER_CONFIG 917 printf(
"Reset timeout rate to %d\n",
918 server->timeout_rate);
935 u32 refresh_rate = 0;
959 ip_addr = clib_net_to_host_u32(server_addr.
as_u32);
960 else if (
unformat(input,
"port %u", &port))
962 else if (
unformat(input,
"refresh-rate %u", &refresh_rate))
964 else if (
unformat(input,
"timeout %u", &timeout))
966 else if (
unformat(input,
"pmtu %u", &pmtu))
976 "timeout %u, pmtu %u enable %u\n",
977 ip_addr, port, refresh_rate,
978 timeout, pmtu, enable);
980 if (refresh_rate == 0) refresh_rate = 500;
981 if (timeout == 0) timeout = 30;
983 nfv9_conf.enable = enable;
984 nfv9_conf.ipv4_address = ip_addr;
987 nfv9_conf.port = port;
988 nfv9_conf.refresh_rate = refresh_rate;
989 nfv9_conf.timeout_rate = timeout;
990 nfv9_conf.path_mtu = pmtu;
991 nfv9_conf.nfv9_global_collector = 0;
992 nfv9_conf.session_logging = 0;
999 if (nfv9_conf.nfv9_global_collector) {
1008 if (my_nfv9_logging_info->
i_vrf_id == i_vrf_id) {
1009 nfv9_server_info_t *server = nfv9_server_info_pool +
1010 my_nfv9_logging_info->server_index;
1011 if((server->ipv4_address == (nfv9_conf.ipv4_address)) && (server->port == (nfv9_conf.port))) {
1013 my_nfv9_logging_info_tmp = my_nfv9_logging_info;
1020 if ((nfv9_conf.ipv4_address == 0) ||
1021 (nfv9_conf.port == 0)) {
1023 "Add NFv9 ivrf %d Logging Invalid values [IPv4 0x%x, PORT %d]\n",
1025 (nfv9_conf.ipv4_address),
1030 if (nfv9_conf.enable) {
1031 if ((nfv9_conf.ipv4_address == 0) ||
1032 (nfv9_conf.port == 0)) {
1035 "NFV9_logging i_vrf %d, Invalid [v4_addr 0x%x port %d]\n",
1037 (nfv9_conf.ipv4_address),
1045 nfv9_conf.ipv4_address;
1046 new_server_info.
port =
1049 (nfv9_conf.refresh_rate);
1054 60*(nfv9_conf.timeout_rate);
1055 if (found && my_nfv9_logging_info) {
1059 my_nfv9_logging_info->max_length_minus_max_record_size =
1061 ((nfv9_conf.path_mtu)));
1064 memset(my_nfv9_logging_info, 0,
sizeof(*my_nfv9_logging_info));
1065 my_nfv9_logging_info->server_index =
EMPTY;
1066 my_nfv9_logging_info->nfv9_logging_next_index =
EMPTY;
1071 my_nfv9_logging_info->current_logging_context =
NULL;
1072 my_nfv9_logging_info->queued_logging_context =
NULL;
1074 my_nfv9_logging_info->f =
NULL;
1075 my_nfv9_logging_info->to_next =
NULL;
1077 my_nfv9_logging_info->ip4_input_node_index = output_node->index;
1078 printf(
"ip4_input_node_index %d\n", my_nfv9_logging_info->ip4_input_node_index);
1080 my_nfv9_logging_info->i_vrf = i_vrf;
1081 my_nfv9_logging_info->i_vrf_id = i_vrf_id;
1082 my_nfv9_logging_info->max_length_minus_max_record_size =
1084 nfv9_conf.path_mtu);
1091 my_nfv9_logging_info->logging_policy = nfv9_conf.session_logging;
1093 if (nfv9_conf.nfv9_global_collector) {
1098 if (my_vrfmap->nfv9_logging_index ==
EMPTY) {
1099 my_vrfmap->nfv9_logging_index =
1100 cnat_nfv9_global_info.cnat_nfv9_global_collector_index;
1104 u32 my_vrfmap_found = 0;
1107 my_vrfmap = my_vrfmap_temp;
1108 if (my_vrfmap_found) {
1109 if(my_vrfmap->nfv9_logging_index ==
EMPTY) {
1110 my_vrfmap->nfv9_logging_index =
1125 my_nfv9_logging_info->
logging_policy = nfv9_conf.session_logging;
1126 if (nfv9_conf.nfv9_global_collector) {
1129 if (my_vrfmap->nfv9_logging_index ==
1131 my_vrfmap->nf_logging_policy = nfv9_conf.session_logging;
1139 u32 my_vrfmap_found = 0;
1140 my_vrfmap_temp =
NULL;
1142 my_vrfmap = my_vrfmap_temp;
1143 if (my_vrfmap_found) {
1150 u8 nfv9_logging_policy = 0;
1151 u32 my_vrfmap_found = 0;
1152 my_vrfmap_temp =
NULL;
1154 my_vrfmap = my_vrfmap_temp;
1155 if (my_vrfmap_found) {
1156 u32 index_curr = my_vrfmap->nfv9_logging_index;
1158 while(index_curr !=
EMPTY) {
1160 nfv9_logging_policy = nfv9_logging_policy || my_nfv9_logging_info_temp->
logging_policy;
1163 my_vrfmap->nf_logging_policy = nfv9_logging_policy;
1183 my_nfv9_logging_info = my_nfv9_logging_info_tmp;
1190 if (my_vrfmap->nfv9_logging_index ==
1192 my_vrfmap->nfv9_logging_index = EMPTY;
1198 u32 my_vrfmap_found = 0;
1199 my_vrfmap_temp =
NULL;
1201 my_vrfmap = my_vrfmap_temp;
1202 if (my_vrfmap_found) {
1206 if (my_nfv9_logging_info->queued_logging_context ||
1207 my_nfv9_logging_info->current_logging_context) {
1214 my_nfv9_logging_info->deleted = 1;
1220 if(index == my_vrfmap->nfv9_logging_index) {
1229 u32 index_curr = my_vrfmap->nfv9_logging_index;
1231 while(index_curr !=
EMPTY) {
1232 index_prev = index_curr;
1233 index_curr = (cnat_nfv9_logging_info_pool + index_curr)->nfv9_logging_next_index;
1234 if(index == index_curr)
1236 (cnat_nfv9_logging_info_pool + index_prev)->nfv9_logging_next_index = (cnat_nfv9_logging_info_pool + index_curr)->nfv9_logging_next_index;
1242 pool_put(cnat_nfv9_logging_info_pool, my_nfv9_logging_info);
1256 vlib_cli_output(vm,
"Add NFv9 Logging Failed (2) Non Existent vrf %d\n",
1260 u8 nfv9_logging_policy = 0;
1261 u32 my_vrfmap_found = 0;
1262 my_vrfmap_temp =
NULL;
1264 my_vrfmap = my_vrfmap_temp;
1265 if (my_vrfmap_found) {
1266 u32 index_curr = my_vrfmap->nfv9_logging_index;
1268 while(index_curr !=
EMPTY) {
1270 nfv9_logging_policy = nfv9_logging_policy || my_nfv9_logging_info_temp->
logging_policy;
1273 my_vrfmap->nf_logging_policy = nfv9_logging_policy;
1283 .path =
"set vcgn map",
1284 .short_help =
"set vcgn map <lo-address> [- <hi-address>]",
1289 .path =
"set vcgn inside",
1290 .short_help =
"set vcgn inside <inside intfc> outside <outside intfc>",
1295 .path =
"set vcgn tcp timeout",
1296 .short_help =
"set vcgn tcp timeout active <1-65535> init <1-65535>",
1301 .path =
"set vcgn udp timeout",
1302 .short_help =
"set vcgn udp timeout active <1-65535> init <1-65535>",
1307 .path =
"set vcgn icmp timeout",
1308 .short_help =
"set vcgn icmp timeout <1-65535>",
1313 .path =
"set vcgn default timeout",
1314 .short_help =
"set vcgn default timeout protocol <tcp/udp/icmp>",
1319 .path =
"set vcgn dynamic port start",
1320 .short_help =
"set vcgn dynamic port start <1-65535>",
1325 .path =
"set vcgn port limit",
1326 .short_help =
"set vcgn port limit <1-65535>",
1331 .path =
"set vcgn nfv9",
1332 .short_help =
"set vcgn nfv9 [del] server <ip-addr> port <port> [refresh-rate <n>] [timeout <n>] [pmtu <n>]",
1339 .path =
"show vcgn config",
1340 .short_help =
"show vcgn config",
1345 .path =
"show vcgn statistics",
1346 .short_help =
"show vcgn statistics",
1351 .path =
"show vcgn inside-translation",
1352 .short_help =
"show vcgn inside-translation protocol <tcp/udp/icmp> " 1353 "inside-addr <ip-addr> [start-port <n>] [end-port <n>]",
1358 .path =
"show vcgn outside-translation",
1359 .short_help =
"show vcgn outside-translation protocol <tcp/udp/icmp> " 1360 "outside-addr <ip-addr> [start-port <n>] [end-port <n>]",
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
cnat_nfv9_global_info_t cnat_nfv9_global_info
static clib_error_t * set_vcgn_dynamic_port_start_range_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
sll srl srl sll sra u16x4 i
static clib_error_t * set_vcgn_udp_timeout_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static u16 nfv9_get_max_length_minus_max_record_size(u16 path_mtu)
void cnat_scanner_db_process_turn_on(vlib_main_t *vm)
always_inline pg_node_t * pg_get_node(uword node_index)
always_inline vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static clib_error_t * set_vcgn_icmp_timeout_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
int vnet_hw_interface_rx_redirect_to_node(vnet_main_t *vnm, u32 hw_if_index, u32 node_index)
u16 cnat_static_port_range
static clib_error_t * vcgn_init(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)
struct _vlib_node_registration vlib_node_registration_t
unformat_function_t unformat_vnet_sw_interface
#define CNAT_NFV9_MIN_RECORD_SIZE
u16 udp_init_session_timeout
static uword vcgn_classify_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static clib_error_t * set_vcgn_map_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u32 cnat_nfv9_global_collector_index
always_inline void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static void nfv9_init_pkt_sent_data(cnat_nfv9_logging_info_t *nfv9_info)
static u16 nfv9_get_server_instance(cnat_nfv9_logging_info_t *nfv9_info, nfv9_server_info_t *new_server_info)
static clib_error_t * set_vcgn_tcp_timeout_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u16 cnat_main_db_max_ports_per_user
vnet_main_t * vnet_get_main(void)
#define pool_foreach(VAR, POOL, BODY)
#define VLIB_INIT_FUNCTION(x)
clib_error_t * cnat_db_scanner_init(vlib_main_t *vm)
void dpdk_set_next_node(dpdk_rx_next_t, char *)
#define FIND_MY_VRF_USING_I_VRF_ID
static clib_error_t * set_vcgn_protocol_default_timeout_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
void cnat_nat44_set_protocol_timeout_value(u16 active, u16 init, u8 *proto, u8 reset, vlib_main_t *vm)
#define vlib_call_init_function(vm, x)
always_inline void * vlib_frame_vector_args(vlib_frame_t *f)
void cnat_nat44_handle_show_stats(vlib_main_t *vm)
#define CNAT_MAX_VRFMAP_ENTRIES
void cnat_nfv9_logging_init()
vlib_error_main_t error_main
nfv9_server_info_t * nfv9_server_info_pool
u16 vrf_map_array[CNAT_MAX_VRFMAP_ENTRIES]
struct _spp_api_cnat_v4_config_nfv9_logging spp_api_cnat_v4_config_nfv9_logging_t
static char * vcgn_classify_error_strings[]
#define vlib_validate_buffer_enqueue_x2(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, next0, next1)
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static clib_error_t * set_vcgn_nfv9_logging_cofig_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vcgn_classify_main_t vcgn_classify_main
void cnat_nat44_handle_show_config(vlib_main_t *vm)
#define CLIB_PREFETCH(addr, size, type)
u32 pkts_since_last_template
void cnat_db_v2_init(void)
vlib_node_registration_t vcgn_classify_node
(constructor) VLIB_REGISTER_NODE (vcgn_classify_node)
#define clib_memcpy(a, b, c)
always_inline vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
static u8 * format_swap_trace(u8 *s, va_list *args)
static clib_error_t * show_vcgn_config_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
unformat_function_t * unformat_edit
struct _spp_api_cnat_v4_show_outside_entry_req spp_api_cnat_v4_show_outside_entry_req_t
struct _spp_api_cnat_v4_add_vrf_map spp_api_cnat_v4_add_vrf_map_t
static void nfv9_delete_server_info(cnat_nfv9_logging_info_t *nfv9_info)
#define VLIB_CLI_COMMAND(x,...)
u16 tcp_initial_setup_timeout
struct _spp_api_cnat_v4_show_inside_entry_req spp_api_cnat_v4_show_inside_entry_req_t
#define VLIB_NODE_FLAG_TRACE
#define foreach_vcgn_classify_error
void cnat_v4_show_outside_entry_req_t_handler(spp_api_cnat_v4_show_outside_entry_req_t *mp, vlib_main_t *vm)
cnat_nfv9_logging_info_t * cnat_nfv9_logging_info_pool
u32 last_template_sent_time
#define VRF_MAP_ENTRY_EMPTY
#define VLIB_BUFFER_IS_TRACED
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
cnat_vrfmap_t * cnat_map_by_vrf
static clib_error_t * show_vcgn_stats_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
always_inline void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
u16 udp_act_session_timeout
void cnat_nat44_add_vrf_map_t_handler(spp_api_cnat_v4_add_vrf_map_t *mp, vlib_main_t *vm)
static clib_error_t * show_vcgn_outside_translation_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
always_inline void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
#define VLIB_REGISTER_NODE(x,...)
clib_error_t * vcgn_classify_init(vlib_main_t *vm)
u32 nfv9_logging_next_index
#define clib_error_return(e, args...)
#define NFV9_DEF_PATH_MTU
#define CNAT_NFV9_DATAFLOW_RECORD_HEADER_LENGTH
#define CLIB_CACHE_LINE_BYTES
static clib_error_t * set_vcgn_inside_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u32 flags
buffer flags: VLIB_BUFFER_IS_TRACED: trace this buffer.
static clib_error_t * set_vcgn_port_limit_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * show_vcgn_inside_translation_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
always_inline vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
#define CNAT_TRANSLATION_ENTRY_DYNAMIC
#define CNAT_NFV9_MAX_SINGLE_RECORD_LENGTH