37 #include <arpa/inet.h> 60 #define FIND_MY_VRF_USING_I_VRF_ID \ 61 my_vrfmap_found = 0; \ 62 pool_foreach (my_vrfmap, cnat_map_by_vrf, ({ \ 63 if (my_vrfmap->i_vrf_id == i_vrf_id) { \ 64 my_vrfmap_found = 1; \ 65 my_vrfmap_temp = my_vrfmap; \ 78 s =
format (s,
"VCGN_CLASSIFY: dst %U dst_port %d sw_if_index %d next %d",
89 #define foreach_vcgn_classify_error \ 90 _(PACKETS_RECEIVED, "total packets received") \ 91 _(V4_PACKETS_PROCESSED, "ipv4 packets processed for vCGN") \ 92 _(V4_PACKETS_PUNTED, "ipv4 packets punted") \ 93 _(V6_PACKETS_PUNTED, "ipv6 packets punted") \ 94 _(MPLS_PACKETS_PUNTED, "mpls unicast packets punted") \ 95 _(ETH_PACKETS_PUNTED, "ethernet packets punted") 99 #define _(sym,str) VCGN_CLASSIFY_ERROR_##sym, 106 #define _(sym,string) string, 147 u32 n_left_from, * from, * to_next;
160 while (n_left_from > 0)
165 to_next, n_left_to_next);
168 while (n_left_from >= 4 && n_left_to_next >= 2)
173 u32 sw_if_index0, sw_if_index1;
190 to_next[0] = bi0 = from[0];
191 to_next[1] = bi1 = from[1];
206 em->
counters[node_counter_base_index + VCGN_CLASSIFY_ERROR_PACKETS_RECEIVED] += 2;
228 to_next, n_left_to_next,
229 bi0, bi1, next0, next1);
233 while (n_left_from > 0 && n_left_to_next > 0)
260 if (*etype == clib_host_to_net_u16(ETHERNET_TYPE_VLAN)) {
261 l3_type = (etype + 1);
268 if (*l3_type == clib_host_to_net_u16(ETHERNET_TYPE_IP4)) {
276 counter = VCGN_CLASSIFY_ERROR_V4_PACKETS_PROCESSED;
278 if (protocol_type == 0x11) {
287 }
else if (protocol_type == 0x06) {
296 }
else if (protocol_type == 0x01) {
300 icmp_type = icmp->
type;
323 counter = VCGN_CLASSIFY_ERROR_V4_PACKETS_PUNTED;
337 }
else if (*l3_type == clib_host_to_net_u16(ETHERNET_TYPE_IP6)) {
341 counter = VCGN_CLASSIFY_ERROR_V6_PACKETS_PUNTED;
343 }
else if (*l3_type ==
344 clib_host_to_net_u16(ETHERNET_TYPE_MPLS_UNICAST)) {
348 counter = VCGN_CLASSIFY_ERROR_MPLS_PACKETS_PUNTED;
352 counter = VCGN_CLASSIFY_ERROR_ETH_PACKETS_PUNTED;
355 em->
counters[node_counter_base_index + counter] += 1;
356 em->
counters[node_counter_base_index +
357 VCGN_CLASSIFY_ERROR_PACKETS_RECEIVED] += 1;
361 to_next, n_left_to_next,
373 .name =
"vcgn-classify",
374 .vector_size =
sizeof (
u32),
409 u32 inside_sw_if_index = 1;
410 u32 outside_sw_if_index = 0;
413 inside_sw_if_index + 1,
EMPTY);
415 outside_sw_if_index + 1,
EMPTY);
426 dpdk_set_next_node (DPDK_RX_NEXT_IP4_INPUT,
"vcgn-classify");
474 u32 end_port = 65535;
477 inside_req.start_port = start_port;
478 inside_req.end_port = end_port;
480 if (
unformat(input,
"protocol %s", &proto)) {
481 if (!strncmp((
char *) proto,
"udp", 3)) {
482 inside_req.protocol = 1;
483 }
else if (!strncmp((
char *) proto,
"tcp", 3)) {
484 inside_req.protocol = 2;
486 inside_req.protocol = 3;
488 }
else if (
unformat (input,
"interface %U",
494 }
else if (
unformat (input,
"inside-addr %U",
496 inside_req.ipv4_addr = clib_net_to_host_u32(inside_addr.
as_u32);
497 }
else if (
unformat(input,
"start-port %u", &start_port)) {
498 inside_req.start_port = start_port;
499 }
else if (
unformat(input,
"end-port %u", &end_port)) {
500 inside_req.end_port = end_port;
503 inside_req.vrf_id = inside_sw_if_index;
505 inside_req.all_entries = 0;
508 "end_port %u, vrf 0x%x\n",
510 inside_req.ipv4_addr,
511 inside_req.start_port,
537 u32 end_port = 65535;
541 outside_req.start_port = start_port;
542 outside_req.end_port = end_port;
544 if (
unformat(input,
"protocol %s", &proto)) {
545 if (!strncmp((
char *) proto,
"udp", 3)) {
546 outside_req.protocol = 1;
547 }
else if (!strncmp((
char *) proto,
"tcp", 3)) {
548 outside_req.protocol = 2;
550 outside_req.protocol = 3;
552 }
else if (
unformat (input,
"interface %U",
558 }
else if (
unformat (input,
"outside-addr %U",
560 outside_req.ipv4_addr = clib_net_to_host_u32(outside_addr.
as_u32);
561 }
else if (
unformat(input,
"start-port %u", &start_port)) {
562 outside_req.start_port = start_port;
563 }
else if (
unformat(input,
"end-port %u", &end_port)) {
564 outside_req.end_port = end_port;
567 outside_req.vrf_id = outside_sw_if_index;
571 "end_port %u, vrf 0x%x\n",
572 outside_req.protocol,
573 outside_req.ipv4_addr,
574 outside_req.start_port,
575 outside_req.end_port,
576 outside_sw_if_index);
595 u32 inside_sw_if_index = 1;
596 u32 outside_sw_if_index = ~0;
603 else if (
unformat(input,
"outside %U",
608 if (inside_sw_if_index == ~0 ||
609 outside_sw_if_index == ~0)
613 if (inside_sw_if_index == outside_sw_if_index)
614 return clib_error_return (0,
"inside and outside interfaces can't be the same...");
623 inside_sw_if_index + 1,
EMPTY);
625 outside_sw_if_index + 1,
EMPTY);
659 u32 outside_sw_if_index;
687 map.i_vrf_id = inside_sw_if_index;
688 map.o_vrf_id = outside_sw_if_index;
689 map.i_vrf = inside_sw_if_index;
690 map.o_vrf = outside_sw_if_index;
692 map.start_addr[0] = clib_net_to_host_u32(lo.
as_u32);
693 map.end_addr[0] = clib_net_to_host_u32(hi.
as_u32);
699 if (inside_hw_if_index) {
704 if (outside_hw_if_index) {
722 u32 init_timeout = 0;
725 if (
unformat(input,
"active %u", &act_timeout))
727 else if (
unformat(input,
"init %u", &init_timeout))
744 u32 init_timeout = 0;
747 if (
unformat(input,
"active %u", &act_timeout))
749 else if (
unformat(input,
"init %u", &init_timeout))
769 if (
unformat(input,
"%u", &timeout))
791 if (
unformat(input,
"%s", &protocol))
815 if (port != 0 && port > 65535) {
840 if (port != 0 && port > 65535) {
864 u16 max_length_minus_max_record_size;
868 max_length_minus_max_record_size = path_mtu -
877 return max_length_minus_max_record_size;
899 (server->
port == new_server_info->
port)) {
901 #ifdef DEBUG_NF_SERVER_CONFIG 903 printf(
"\n Server match for %x and port %d\n",
907 goto adjust_refresh_rate;
910 #ifdef DEBUG_NF_SERVER_CONFIG 912 printf(
"\n Server change from %x, %d to %x, %d" 922 #ifdef DEBUG_NF_SERVER_CONFIG 940 (server->
port == new_server_info->
port)) {
942 nfv9_info->server_index = server - nfv9_server_info_pool;
944 #ifdef DEBUG_NF_SERVER_CONFIG
945 if(my_instance_number == 1) {
946 printf(
"Re-using server %x, %d Ref count %d\n",
947 server->ipv4_address, server->port, server->ref_count);
959 server->ref_count = 1;
961 #ifdef DEBUG_NF_SERVER_CONFIG 963 printf(
"Create new server for at %d %x and port %d\n",
964 nfv9_info->server_index,
965 new_server_info->ipv4_address, new_server_info->port);
972 if(server->refresh_rate >
973 new_server_info->refresh_rate) {
974 server->refresh_rate =
975 new_server_info->refresh_rate;
976 #ifdef DEBUG_NF_SERVER_CONFIG 978 printf(
"Reset refresh rate to %d\n",
979 server->refresh_rate);
984 if(server->timeout_rate >
985 new_server_info->timeout_rate) {
986 server->timeout_rate =
987 new_server_info->timeout_rate;
988 #ifdef DEBUG_NF_SERVER_CONFIG 990 printf(
"Reset timeout rate to %d\n",
991 server->timeout_rate);
1008 u32 refresh_rate = 0;
1033 ip_addr = clib_net_to_host_u32(server_addr.
as_u32);
1034 else if (
unformat(input,
"port %u", &port))
1036 else if (
unformat(input,
"refresh-rate %u", &refresh_rate))
1038 else if (
unformat(input,
"timeout %u", &timeout))
1040 else if (
unformat(input,
"pmtu %u", &pmtu))
1051 i_vrf = inside_sw_if_index;
1052 i_vrf_id = inside_sw_if_index;
1056 "timeout %u, pmtu %u enable %u\n",
1057 ip_addr, port, refresh_rate,
1058 timeout, pmtu, enable);
1060 if (refresh_rate == 0) refresh_rate = 500;
1061 if (timeout == 0) timeout = 30;
1063 nfv9_conf.enable = enable;
1064 nfv9_conf.ipv4_address = ip_addr;
1065 nfv9_conf.i_vrf_id = inside_sw_if_index;
1066 nfv9_conf.i_vrf = inside_sw_if_index;
1067 nfv9_conf.port = port;
1068 nfv9_conf.refresh_rate = refresh_rate;
1069 nfv9_conf.timeout_rate = timeout;
1070 nfv9_conf.path_mtu = pmtu;
1071 nfv9_conf.nfv9_global_collector = 0;
1072 nfv9_conf.session_logging = 0;
1079 if (nfv9_conf.nfv9_global_collector) {
1088 if (my_nfv9_logging_info->
i_vrf_id == i_vrf_id) {
1089 nfv9_server_info_t *server = nfv9_server_info_pool +
1090 my_nfv9_logging_info->server_index;
1091 if((server->ipv4_address == (nfv9_conf.ipv4_address)) && (server->port == (nfv9_conf.port))) {
1093 my_nfv9_logging_info_tmp = my_nfv9_logging_info;
1100 if ((nfv9_conf.ipv4_address == 0) ||
1101 (nfv9_conf.port == 0)) {
1103 "Add NFv9 ivrf %d Logging Invalid values [IPv4 0x%x, PORT %d]\n",
1105 (nfv9_conf.ipv4_address),
1110 if (nfv9_conf.enable) {
1111 if ((nfv9_conf.ipv4_address == 0) ||
1112 (nfv9_conf.port == 0)) {
1115 "NFV9_logging i_vrf %d, Invalid [v4_addr 0x%x port %d]\n",
1117 (nfv9_conf.ipv4_address),
1125 nfv9_conf.ipv4_address;
1126 new_server_info.
port =
1129 (nfv9_conf.refresh_rate);
1134 60*(nfv9_conf.timeout_rate);
1135 if (found && my_nfv9_logging_info) {
1139 my_nfv9_logging_info->max_length_minus_max_record_size =
1141 ((nfv9_conf.path_mtu)));
1144 memset(my_nfv9_logging_info, 0,
sizeof(*my_nfv9_logging_info));
1145 my_nfv9_logging_info->server_index =
EMPTY;
1146 my_nfv9_logging_info->nfv9_logging_next_index =
EMPTY;
1151 my_nfv9_logging_info->current_logging_context =
NULL;
1152 my_nfv9_logging_info->queued_logging_context =
NULL;
1154 my_nfv9_logging_info->f =
NULL;
1155 my_nfv9_logging_info->to_next =
NULL;
1157 my_nfv9_logging_info->ip4_input_node_index = output_node->index;
1158 printf(
"ip4_input_node_index %d\n", my_nfv9_logging_info->ip4_input_node_index);
1160 my_nfv9_logging_info->i_vrf = i_vrf;
1161 my_nfv9_logging_info->i_vrf_id = i_vrf_id;
1162 my_nfv9_logging_info->max_length_minus_max_record_size =
1164 nfv9_conf.path_mtu);
1171 my_nfv9_logging_info->logging_policy = nfv9_conf.session_logging;
1173 if (nfv9_conf.nfv9_global_collector) {
1178 if (my_vrfmap->nfv9_logging_index ==
EMPTY) {
1179 my_vrfmap->nfv9_logging_index =
1180 cnat_nfv9_global_info.cnat_nfv9_global_collector_index;
1184 u32 my_vrfmap_found = 0;
1187 my_vrfmap = my_vrfmap_temp;
1188 if (my_vrfmap_found) {
1189 if(my_vrfmap->nfv9_logging_index ==
EMPTY) {
1190 my_vrfmap->nfv9_logging_index =
1205 my_nfv9_logging_info->
logging_policy = nfv9_conf.session_logging;
1206 if (nfv9_conf.nfv9_global_collector) {
1209 if (my_vrfmap->nfv9_logging_index ==
1211 my_vrfmap->nf_logging_policy = nfv9_conf.session_logging;
1219 u32 my_vrfmap_found = 0;
1220 my_vrfmap_temp =
NULL;
1222 my_vrfmap = my_vrfmap_temp;
1223 if (my_vrfmap_found) {
1230 u8 nfv9_logging_policy = 0;
1231 u32 my_vrfmap_found = 0;
1232 my_vrfmap_temp =
NULL;
1234 my_vrfmap = my_vrfmap_temp;
1235 if (my_vrfmap_found) {
1236 u32 index_curr = my_vrfmap->nfv9_logging_index;
1238 while(index_curr !=
EMPTY) {
1240 nfv9_logging_policy = nfv9_logging_policy || my_nfv9_logging_info_temp->
logging_policy;
1243 my_vrfmap->nf_logging_policy = nfv9_logging_policy;
1263 my_nfv9_logging_info = my_nfv9_logging_info_tmp;
1270 if (my_vrfmap->nfv9_logging_index ==
1272 my_vrfmap->nfv9_logging_index = EMPTY;
1278 u32 my_vrfmap_found = 0;
1279 my_vrfmap_temp =
NULL;
1281 my_vrfmap = my_vrfmap_temp;
1282 if (my_vrfmap_found) {
1286 if (my_nfv9_logging_info->queued_logging_context ||
1287 my_nfv9_logging_info->current_logging_context) {
1294 my_nfv9_logging_info->deleted = 1;
1300 if(index == my_vrfmap->nfv9_logging_index) {
1309 u32 index_curr = my_vrfmap->nfv9_logging_index;
1311 while(index_curr !=
EMPTY) {
1312 index_prev = index_curr;
1313 index_curr = (cnat_nfv9_logging_info_pool + index_curr)->nfv9_logging_next_index;
1314 if(index == index_curr)
1316 (cnat_nfv9_logging_info_pool + index_prev)->nfv9_logging_next_index = (cnat_nfv9_logging_info_pool + index_curr)->nfv9_logging_next_index;
1322 pool_put(cnat_nfv9_logging_info_pool, my_nfv9_logging_info);
1336 vlib_cli_output(vm,
"Add NFv9 Logging Failed (2) Non Existent vrf %d\n",
1340 u8 nfv9_logging_policy = 0;
1341 u32 my_vrfmap_found = 0;
1342 my_vrfmap_temp =
NULL;
1344 my_vrfmap = my_vrfmap_temp;
1345 if (my_vrfmap_found) {
1346 u32 index_curr = my_vrfmap->nfv9_logging_index;
1348 while(index_curr !=
EMPTY) {
1350 nfv9_logging_policy = nfv9_logging_policy || my_nfv9_logging_info_temp->
logging_policy;
1353 my_vrfmap->nf_logging_policy = nfv9_logging_policy;
1363 .path =
"set vcgn map",
1364 .short_help =
"set vcgn map <lo-address> [- <hi-address>]",
1369 .path =
"set vcgn inside",
1370 .short_help =
"set vcgn inside <inside intfc> outside <outside intfc>",
1375 .path =
"set vcgn tcp timeout",
1376 .short_help =
"set vcgn tcp timeout active <1-65535> init <1-65535>",
1381 .path =
"set vcgn udp timeout",
1382 .short_help =
"set vcgn udp timeout active <1-65535> init <1-65535>",
1387 .path =
"set vcgn icmp timeout",
1388 .short_help =
"set vcgn icmp timeout <1-65535>",
1393 .path =
"set vcgn default timeout",
1394 .short_help =
"set vcgn default timeout protocol <tcp/udp/icmp>",
1399 .path =
"set vcgn dynamic port start",
1400 .short_help =
"set vcgn dynamic port start <1-65535>",
1405 .path =
"set vcgn port limit",
1406 .short_help =
"set vcgn port limit <1-65535>",
1411 .path =
"set vcgn nfv9",
1412 .short_help =
"set vcgn nfv9 [del] inside <interface> " 1413 "server <ip-addr> port <port> [refresh-rate <n>] " 1414 "[timeout <n>] [pmtu <n>]",
1421 .path =
"show vcgn config",
1422 .short_help =
"show vcgn config",
1427 .path =
"show vcgn statistics",
1428 .short_help =
"show vcgn statistics",
1433 .path =
"show vcgn inside-translation",
1434 .short_help =
"show vcgn inside-translation protocol <tcp/udp/icmp> " 1435 "interface <inside-if> inside-addr <ip-addr> " 1436 "[start-port <n>] [end-port <n>]",
1441 .path =
"show vcgn outside-translation",
1442 .short_help =
"show vcgn outside-translation protocol <tcp/udp/icmp> " 1443 "interface <outside-if> outside-addr <ip-addr> " 1444 "[start-port <n>] [end-port <n>]",
1505 int from_early_init)
u32 * inside_sw_if_index_table
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
Release pointer to next frame vector data.
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)
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
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)
Fixed length block allocator.
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
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
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
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 pg_node_t * pg_get_node(uword node_index)
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)
Iterate through pool.
#define VLIB_INIT_FUNCTION(x)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
clib_error_t * cnat_db_scanner_init(vlib_main_t *vm)
#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)
u32 * outside_sw_if_index_table
#define vlib_call_init_function(vm, x)
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
#define pool_put(P, E)
Free an object E in pool P.
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)
Finish enqueueing two buffers forward in the graph.
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
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)
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
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
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
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)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
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 void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static clib_error_t * show_vcgn_outside_translation_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#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
static vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
Get vlib node by index.
#define clib_error_return(e, args...)
#define NFV9_DEF_PATH_MTU
#define CNAT_NFV9_DATAFLOW_RECORD_HEADER_LENGTH
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header, unspecified alignment)
#define CLIB_CACHE_LINE_BYTES
vlib_init_function_t *_vlib_init_function_vcgn_init **Also collects global variable pointers passed from the vpp engine *clib_error_t * vlib_plugin_register(vlib_main_t *vm, vnet_plugin_handoff_t *h, int from_early_init)
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)
static 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