39 #define CNAT_NFV9_DEBUG_CODE 2 40 #if CNAT_NFV9_DEBUG_CODE > 3 42 #define NFV9_COND if ((my_instance_number != 0) && (my_instance_number != 15)) 44 #define NFV9_DEBUG_PRINTF1(a) NFV9_COND printf(a); 45 #define NFV9_DEBUG_PRINTF2(a, b) NFV9_COND printf(a, b); 46 #define NFV9_DEBUG_PRINTF3(a, b, c) NFV9_COND printf(a, b, c); 47 #define NFV9_DEBUG_PRINTF4(a, b, c, d) NFV9_COND printf(a, b, c, d); 51 #define NFV9_DEBUG_PRINTF1(a) 52 #define NFV9_DEBUG_PRINTF2(a, b) 53 #define NFV9_DEBUG_PRINTF3(a, b, c) 54 #define NFV9_DEBUG_PRINTF4(a, b, c, d) 67 #define CNAT_NFV9_OPTION_TEMPLATE cnat_nfv9_template_info.cnat_nfv9_option_template 76 #ifndef NO_BULK_LOGGING 94 #define NFV9_SERVER_POOL_SIZE 16 106 return cnat_curr_time;
126 pool_foreach (my_nfv9_logging_info, cnat_nfv9_logging_info_pool, ({
136 if(logging_index ==
EMPTY) {
141 log_info = cnat_nfv9_logging_info_pool + logging_index;
152 server->ref_count, server->refresh_rate,
153 server->timeout_rate);
167 u32 next_nfv9_template_data_index = 0xffff;
168 u32 next_data_flow_index = 0xffff;
169 u32 next_data_record = 0xffff;
170 u32 data_record_size = 0;
177 (value2 == 1) ?
"CURRENT" :
"QUEUED",
182 nfv9_logging_info->
i_vrf,
189 vlib_cli_output(vm,
"\nlast_template_sent time 0x%x, pkts_since_last_template %d",
193 vlib_cli_output(vm,
"\npkt_len %d, add_rec_len %d, del_rec_len %d, total_rec_count %d",
203 vlib_cli_output(vm,
"\ncurr_logging_ctx 0x%p, timestamp 0x%x, queued_logging_ctx 0x%p",
208 vlib_cli_output(vm,
"\nnfv9_hdr 0x%p, tmpl_hdr 0x%p, dataflow_hdr 0x%p",
244 next_nfv9_template_data_index = i + 4;
246 next_data_flow_index =
i;
250 next_data_flow_index =
i;
254 if (i == next_nfv9_template_data_index) {
256 }
else if (i == next_data_flow_index) {
257 if (*(pkt_ptr + i) == 0x01) {
258 if (*(pkt_ptr + i + 1) == 0x00) {
259 data_record_size = 21;
260 next_data_record = i + 4;
261 next_data_flow_index = i + *(pkt_ptr + i + 3) +
262 *(pkt_ptr + i + 2)*0x100;
263 vlib_cli_output(vm,
"\nADD_RECORD (total %d): next_data_flow_index (%d->%d)\n", (next_data_flow_index - i), i, next_data_flow_index);
264 }
else if (*(pkt_ptr + i + 1) == 0x01) {
265 data_record_size = 11;
266 next_data_record = i + 4;
267 next_data_flow_index = i + *(pkt_ptr + i + 3) +
268 *(pkt_ptr + i + 2)*0x100;
269 vlib_cli_output(vm,
"\nDEL_RECORD (total %d) : next_data_flow_index (%d->%d)\n", (next_data_flow_index - i), i, next_data_flow_index);
270 }
else if (*(pkt_ptr + i + 1) == 0x09) {
271 data_record_size = 20;
272 next_data_record = i + 4;
273 next_data_flow_index = i + *(pkt_ptr + i + 3) +
274 *(pkt_ptr + i + 2)*0x100;
275 vlib_cli_output(vm,
"\nBULK_ADD_RECORD (total %d) : next_data_flow_index (%d->%d)\n", (next_data_flow_index - i), i, next_data_flow_index);
276 }
else if (*(pkt_ptr + i + 1) == 0x0a) {
277 data_record_size = 10;
278 next_data_record = i + 4;
279 next_data_flow_index = i + *(pkt_ptr + i + 3) +
280 *(pkt_ptr + i + 2)*0x100;
281 vlib_cli_output(vm,
"\nBULK_DEL_RECORD (total %d) : next_data_flow_index (%d->%d)\n", (next_data_flow_index - i), i, next_data_flow_index);
285 }
else if (i == next_data_record) {
287 next_data_record += data_record_size;
293 c1 = (c3 >> 4) & 0xf;
297 ((c1 <= 9) ? (c1 +
'0') : (c1 - 10 +
'a')),
298 ((c2 <= 9) ? (c2 +
'0') : (c2 - 10 +
'a')));
319 return (addr1 - addr2);
337 tmp = (tmp + pad_value) & (~pad_value);
356 return ((record_length + pad_value) & (~pad_value));
366 u16 ip_length __attribute__((unused));
369 u16 src_port = 0x0a0a;
383 ip_header->
ttl = 0xff;
385 ip_header->
dest_addr = clib_host_to_net_u32(ipv4_addr);
390 udp_header->
src_port = clib_host_to_net_u16(src_port);
391 udp_header->
dest_port = clib_host_to_net_u16(port);
394 clib_host_to_net_u16(pkt_len -
sizeof(
ipv4_header));
411 u16 new_record_length = 0;
412 u16 orig_record_length = 0;
436 clib_host_to_net_u16(new_record_length);
442 if (
PREDICT_TRUE(new_record_length - orig_record_length)) {
455 (new_record_length - orig_record_length);
460 server->
port, nfv9_logging_info);
629 pool_put(cnat_nfv9_logging_info_pool, nfv9_logging_info);
766 &cnat_nfv9_template_info,
767 sizeof(cnat_nfv9_template_info));
795 if(last_record != 0 && last_record != cur_record) {
796 u16 orig_length, new_length;
806 clib_host_to_net_u16(new_length);
811 nfv9_logging_info->
record[last_record] = 0;
854 nfv9_logging_info->
record[cur_record] =
891 clib_host_to_net_u32(vrfmap->
i_vrf_id);
894 clib_host_to_net_u32(vrfmap->
o_vrf_id);
911 nfv9_logging_add_record.
protocol = my_protocol;
927 clib_host_to_net_u32(
955 clib_host_to_net_u32(dslite_entry->
i_vrf_id);
957 clib_host_to_net_u32(dslite_entry->
o_vrf_id);
959 #ifdef DSLITE_USER_IPV4 971 clib_host_to_net_u32(udb->
ipv6[0]);
973 clib_host_to_net_u32(udb->
ipv6[1]);
975 clib_host_to_net_u32(udb->
ipv6[2]);
977 clib_host_to_net_u32(udb->
ipv6[3]);
992 nfv9_logging_add_record.
protocol = my_protocol;
1009 clib_host_to_net_u32(
1037 clib_host_to_net_u32(dslite_entry->
i_vrf_id);
1039 #ifdef DSLITE_USER_IPV4 1051 clib_host_to_net_u32(udb->
ipv6[0]);
1053 clib_host_to_net_u32(udb->
ipv6[1]);
1055 clib_host_to_net_u32(udb->
ipv6[2]);
1057 clib_host_to_net_u32(udb->
ipv6[3]);
1067 nfv9_logging_del_record.
protocol = my_protocol;
1084 clib_host_to_net_u32(
1088 #ifndef NO_BULK_LOGGING 1093 int bulk_alloc_start_port)
1106 clib_host_to_net_u32(vrfmap->
i_vrf_id);
1108 clib_host_to_net_u32(vrfmap->
o_vrf_id);
1116 clib_host_to_net_u16(bulk_alloc_start_port);
1118 clib_host_to_net_u16(bulk_alloc_start_port + bulk_size -1);
1134 clib_host_to_net_u32(
1144 int bulk_alloc_start_port)
1163 clib_host_to_net_u32(dslite_entry->
i_vrf_id);
1165 clib_host_to_net_u32(dslite_entry->
o_vrf_id);
1167 #ifdef DSLITE_USER_IPV4 1179 clib_host_to_net_u32(udb->
ipv6[0]);
1181 clib_host_to_net_u32(udb->
ipv6[1]);
1183 clib_host_to_net_u32(udb->
ipv6[2]);
1185 clib_host_to_net_u32(udb->
ipv6[3]);
1191 clib_host_to_net_u16(bulk_alloc_start_port);
1193 clib_host_to_net_u16(bulk_alloc_start_port + bulk_size -1);
1208 clib_host_to_net_u32(
1217 int bulk_alloc_start_port)
1235 clib_host_to_net_u32(dslite_entry->
i_vrf_id);
1237 #ifdef DSLITE_USER_IPV4 1242 clib_host_to_net_u32(0);
1246 clib_host_to_net_u32(udb->
ipv6[0]);
1248 clib_host_to_net_u32(udb->
ipv6[1]);
1250 clib_host_to_net_u32(udb->
ipv6[2]);
1252 clib_host_to_net_u32(udb->
ipv6[3]);
1255 clib_host_to_net_u16(bulk_alloc_start_port);
1258 &nfv9_logging_bulk_del_record,
1270 clib_host_to_net_u32(
1293 clib_host_to_net_u32(vrfmap->
i_vrf_id);
1306 nfv9_logging_del_record.
protocol = my_protocol;
1322 clib_host_to_net_u32(
1327 #ifndef NO_BULK_LOGGING 1332 int bulk_alloc_start_port)
1344 clib_host_to_net_u32(vrfmap->
i_vrf_id);
1350 clib_host_to_net_u16(bulk_alloc_start_port);
1366 clib_host_to_net_u32(
1385 #ifndef NO_BULK_LOGGING
1402 if (cnat_nfv9_logging_info_pool ==
NULL) {
1403 vlib_cli_output(vm,
"%s: info_pool pointer is NULL !!!!\n", __func__);
1407 cnat_nfv9_logging_info_pool + vrfmap->nfv9_logging_index;
1423 #ifndef NO_BULK_LOGGING 1424 if(bulk_alloc > 0) {
1460 #ifndef NO_BULK_LOGGING
1476 cnat_nfv9_logging_info_pool + vrfmap->nfv9_logging_index;
1490 #ifndef NO_BULK_LOGGING 1491 if(bulk_alloc > 0) {
1587 nfv9_logging_add_record.
protocol = my_protocol;
1605 clib_host_to_net_u32(
1656 cnat_nfv9_logging_info_pool + nat64_entry_ptr->
logging_index;
1695 dest_v6[0] = nat64_entry_ptr->
v6_prefix[0];
1696 dest_v6[1] = nat64_entry_ptr->
v6_prefix[1];
1697 dest_v6[2] = nat64_entry_ptr->
v6_prefix[2];
1698 dest_v6[3] = nat64_entry_ptr->
v6_prefix[3];
1700 ipv6_addr_ptr = (
u8 *) (&(dest_v6[0]));
1703 *(ipv6_addr_ptr + nat64_entry_ptr->
octet0_position) = *(ipv4_addr_ptr);
1704 *(ipv6_addr_ptr + nat64_entry_ptr->
octet1_position) = *(ipv4_addr_ptr + 1);
1705 *(ipv6_addr_ptr + nat64_entry_ptr->
octet2_position) = *(ipv4_addr_ptr + 2);
1706 *(ipv6_addr_ptr + nat64_entry_ptr->
octet3_position) = *(ipv4_addr_ptr + 3);
1709 clib_host_to_net_u32(dest_v6[0]);
1711 clib_host_to_net_u32(dest_v6[1]);
1713 clib_host_to_net_u32(dest_v6[2]);
1715 clib_host_to_net_u32(dest_v6[3]);
1734 nfv9_logging_add_record.
protocol = my_protocol;
1752 clib_host_to_net_u32(
1832 nfv9_logging_del_record.
protocol = my_protocol;
1850 clib_host_to_net_u32(
1900 cnat_nfv9_logging_info_pool + nat64_entry_ptr->
logging_index;
1931 dest_v6[0] = nat64_entry_ptr->
v6_prefix[0];
1932 dest_v6[1] = nat64_entry_ptr->
v6_prefix[1];
1933 dest_v6[2] = nat64_entry_ptr->
v6_prefix[2];
1934 dest_v6[3] = nat64_entry_ptr->
v6_prefix[3];
1936 ipv6_addr_ptr = (
u8 *) (&(dest_v6[0]));
1939 *(ipv6_addr_ptr + nat64_entry_ptr->
octet0_position) = *(ipv4_addr_ptr);
1940 *(ipv6_addr_ptr + nat64_entry_ptr->
octet1_position) = *(ipv4_addr_ptr + 1);
1941 *(ipv6_addr_ptr + nat64_entry_ptr->
octet2_position) = *(ipv4_addr_ptr + 2);
1942 *(ipv6_addr_ptr + nat64_entry_ptr->
octet3_position) = *(ipv4_addr_ptr + 3);
1945 clib_host_to_net_u32(dest_v6[0]);
1947 clib_host_to_net_u32(dest_v6[1]);
1949 clib_host_to_net_u32(dest_v6[2]);
1951 clib_host_to_net_u32(dest_v6[3]);
1965 nfv9_logging_del_record.
protocol = my_protocol;
1982 clib_host_to_net_u32(
2052 clib_host_to_net_u32(vrfmap->
i_vrf_id);
2054 clib_host_to_net_u32(vrfmap->
o_vrf_id);
2068 clib_host_to_net_u32(db->
dst_ipv4);
2069 nfv9_logging_add_session_record.
dest_port =
2070 clib_host_to_net_u16(db->
dst_port);
2074 nfv9_logging_add_session_record.
dest_port =
2089 nfv9_logging_add_session_record.
protocol = my_protocol;
2092 &nfv9_logging_add_session_record,
2108 clib_host_to_net_u32(
2178 clib_host_to_net_u32(vrfmap->
i_vrf_id);
2189 clib_host_to_net_u32(db->
dst_ipv4);
2190 nfv9_logging_del_session_record.
dest_port =
2191 clib_host_to_net_u16(db->
dst_port);
2195 nfv9_logging_del_session_record.
dest_port =
2207 nfv9_logging_del_session_record.
protocol = my_protocol;
2210 &nfv9_logging_del_session_record,
2225 clib_host_to_net_u32(
2257 #ifndef NO_BULK_LOGGING
2276 cnat_nfv9_logging_info_pool + dslite_entry->nfv9_logging_index;
2287 #ifndef NO_BULK_LOGGING 2288 if(bulk_alloc > 0) {
2290 db, dslite_entry, bulk_alloc);
2321 #ifndef NO_BULK_LOGGING
2338 cnat_nfv9_logging_info_pool + dslite_entry->nfv9_logging_index;
2351 #ifndef NO_BULK_LOGGING 2352 if(bulk_alloc > 0) {
2354 db, dslite_entry, bulk_alloc);
2430 clib_host_to_net_u32(dslite_entry->
i_vrf_id);
2432 clib_host_to_net_u32(dslite_entry->
o_vrf_id);
2438 clib_host_to_net_u32(udb->
ipv6[0]);
2440 clib_host_to_net_u32(udb->
ipv6[1]);
2442 clib_host_to_net_u32(udb->
ipv6[2]);
2444 clib_host_to_net_u32(udb->
ipv6[3]);
2461 clib_host_to_net_u32(db->
dst_ipv4);
2463 clib_host_to_net_u16(db->
dst_port);
2477 nfv9_logging_add_record.
protocol = my_protocol;
2494 clib_host_to_net_u32(
2568 clib_host_to_net_u32(dslite_entry->
i_vrf_id);
2574 clib_host_to_net_u32(udb->
ipv6[0]);
2576 clib_host_to_net_u32(udb->
ipv6[1]);
2578 clib_host_to_net_u32(udb->
ipv6[2]);
2580 clib_host_to_net_u32(udb->
ipv6[3]);
2591 clib_host_to_net_u32(db->
dst_ipv4);
2593 clib_host_to_net_u16(db->
dst_port);
2607 nfv9_logging_add_record.
protocol = my_protocol;
2624 clib_host_to_net_u32(
2653 static inline __attribute__((unused))
2658 pool_foreach (nfv9_logging_info, cnat_nfv9_logging_info_pool, ({
2665 cnat_nfv9_ingress_vrfid_name_mapping_create(nfv9_logging_info);
2666 server->template_sent = TEMPLATE_SENT_FALSE;
2684 for (index = 0; index <
MAX_VRFID; index++) {
2694 nfv9_logging_info,index);
2723 &nfv9_ingress_vrfid_name_record,
2741 clib_host_to_net_u32(
2763 pool_foreach (my_nfv9_logging_info, cnat_nfv9_logging_info_pool, ({
2768 (current_timestamp -
2776 vlib_cli_output(vm,
"\nNFV9_TIMER: queued %p, curr %p",
2777 my_nfv9_logging_info->queued_logging_context,
2778 my_nfv9_logging_info->current_logging_context);
2781 cnat_nfv9_send_pkt_always_success(my_nfv9_logging_info,
2788 if ((my_nfv9_logging_info->queued_logging_context == NULL) &&
2789 (my_nfv9_logging_info->current_logging_context == NULL) &&
2790 ((current_unix_time_in_seconds -
2791 server->last_template_sent_time) >
2792 server->timeout_rate)) {
2793 cnat_nfv9_create_logging_context(my_nfv9_logging_info,
2794 cnat_nfv9_template_add_always);
2795 if (PREDICT_TRUE(my_nfv9_logging_info->current_logging_context
2797 cnat_nfv9_send_pkt(my_nfv9_logging_info);
2813 cnat_nfv9_template_info.
length =
2890 cnat_nfv9_template_info.nat64_add_bib_template_id =
2892 cnat_nfv9_template_info.nat64_add_bib_field_count =
2896 cnat_nfv9_template_info.nat64_add_bib_inside_ipv6_addr_field_type =
2898 cnat_nfv9_template_info.nat64_add_bib_inside_ipv6_addr_field_size =
2901 cnat_nfv9_template_info.nat64_add_bib_outside_ip_addr_field_type =
2903 cnat_nfv9_template_info.nat64_add_bib_outside_ip_addr_field_size =
2906 cnat_nfv9_template_info.nat64_add_bib_inside_ip_port_field_type =
2908 cnat_nfv9_template_info.nat64_add_bib_inside_ip_port_field_size =
2911 cnat_nfv9_template_info.nat64_add_bib_outside_ip_port_field_type =
2913 cnat_nfv9_template_info.nat64_add_bib_outside_ip_port_field_size =
2916 cnat_nfv9_template_info.nat64_add_bib_protocol_field_type =
2918 cnat_nfv9_template_info.nat64_add_bib_protocol_field_size =
2923 cnat_nfv9_template_info.nat64_del_bib_template_id =
2925 cnat_nfv9_template_info.nat64_del_bib_field_count =
2928 cnat_nfv9_template_info.nat64_del_bib_inside_ip_addr_field_type =
2930 cnat_nfv9_template_info.nat64_del_bib_inside_ip_addr_field_size =
2933 cnat_nfv9_template_info.nat64_del_bib_inside_ip_port_field_type =
2935 cnat_nfv9_template_info.nat64_del_bib_inside_ip_port_field_size =
2938 cnat_nfv9_template_info.nat64_del_bib_protocol_field_type =
2940 cnat_nfv9_template_info.nat64_del_bib_protocol_field_size =
2946 cnat_nfv9_template_info.nat64_add_session_template_id =
2948 cnat_nfv9_template_info.nat64_add_session_field_count =
2952 cnat_nfv9_template_info.nat64_add_session_inside_ipv6_src_addr_field_type =
2954 cnat_nfv9_template_info.nat64_add_session_inside_ipv6_src_addr_field_size =
2957 cnat_nfv9_template_info.nat64_add_session_outside_ip_src_addr_field_type =
2959 cnat_nfv9_template_info.nat64_add_session_outside_ip_src_addr_field_size =
2963 cnat_nfv9_template_info.nat64_add_session_inside_ipv6_dst_addr_field_type =
2965 cnat_nfv9_template_info.nat64_add_session_inside_ipv6_dst_addr_field_size =
2969 cnat_nfv9_template_info.nat64_add_session_outside_ip_dst_addr_field_type =
2971 cnat_nfv9_template_info.nat64_add_session_outside_ip_dst_addr_field_size =
2974 cnat_nfv9_template_info.nat64_add_session_inside_ip_src_port_field_type =
2976 cnat_nfv9_template_info.nat64_add_session_inside_ip_src_port_field_size =
2980 cnat_nfv9_template_info.nat64_add_session_outside_ip_src_port_field_type =
2982 cnat_nfv9_template_info.nat64_add_session_outside_ip_src_port_field_size =
2986 cnat_nfv9_template_info.nat64_add_session_ip_dest_port_field_type =
2988 cnat_nfv9_template_info.nat64_add_session_ip_dest_port_field_size =
2991 cnat_nfv9_template_info.nat64_add_session_protocol_field_type =
2993 cnat_nfv9_template_info.nat64_add_session_protocol_field_size =
2999 cnat_nfv9_template_info.nat64_del_session_template_id =
3001 cnat_nfv9_template_info.nat64_del_session_field_count =
3004 cnat_nfv9_template_info.nat64_del_session_inside_ip_src_addr_field_type =
3006 cnat_nfv9_template_info.nat64_del_session_inside_ip_src_addr_field_size =
3009 cnat_nfv9_template_info.nat64_del_session_inside_ip_dst_addr_field_type =
3011 cnat_nfv9_template_info.nat64_del_session_inside_ip_dst_addr_field_size =
3014 cnat_nfv9_template_info.nat64_del_session_inside_ip_src_port_field_type =
3016 cnat_nfv9_template_info.nat64_del_session_inside_ip_src_port_field_size =
3019 cnat_nfv9_template_info.nat64_del_session_inside_ip_dst_port_field_type =
3021 cnat_nfv9_template_info.nat64_del_session_inside_ip_dst_port_field_size =
3024 cnat_nfv9_template_info.nat64_del_session_protocol_field_type =
3026 cnat_nfv9_template_info.nat64_del_session_protocol_field_size =
3123 cnat_nfv9_template_info.add_dslite_template_id =
3125 cnat_nfv9_template_info.add_dslite_field_count =
3128 cnat_nfv9_template_info.add_dslite_inside_vrf_id_field_type =
3130 cnat_nfv9_template_info.add_dslite_inside_vrf_id_field_size =
3133 cnat_nfv9_template_info.add_dslite_outside_vrf_id_field_type =
3135 cnat_nfv9_template_info.add_dslite_outside_vrf_id_field_size =
3138 cnat_nfv9_template_info.add_dslite_inside_ip_addr_field_type =
3140 cnat_nfv9_template_info.add_dslite_inside_ip_addr_field_size =
3143 cnat_nfv9_template_info.add_dslite_inside_ipv6_addr_field_type =
3145 cnat_nfv9_template_info.add_dslite_inside_ipv6_addr_field_size =
3148 cnat_nfv9_template_info.add_dslite_outside_ip_addr_field_type =
3150 cnat_nfv9_template_info.add_dslite_outside_ip_addr_field_size =
3153 cnat_nfv9_template_info.add_dslite_inside_ip_port_field_type =
3155 cnat_nfv9_template_info.add_dslite_inside_ip_port_field_size =
3158 cnat_nfv9_template_info.add_dslite_outside_ip_port_field_type =
3160 cnat_nfv9_template_info.add_dslite_outside_ip_port_field_size =
3163 cnat_nfv9_template_info.add_dslite_protocol_field_type =
3165 cnat_nfv9_template_info.add_dslite_protocol_field_size =
3171 cnat_nfv9_template_info.del_dslite_template_id =
3173 cnat_nfv9_template_info.del_dslite_field_count =
3176 cnat_nfv9_template_info.del_dslite_inside_vrf_id_field_type =
3178 cnat_nfv9_template_info.del_dslite_inside_vrf_id_field_size =
3181 cnat_nfv9_template_info.del_dslite_inside_ip_addr_field_type =
3183 cnat_nfv9_template_info.del_dslite_inside_ip_addr_field_size =
3186 cnat_nfv9_template_info.del_dslite_inside_ipv6_addr_field_type =
3188 cnat_nfv9_template_info.del_dslite_inside_ipv6_addr_field_size =
3191 cnat_nfv9_template_info.del_dslite_inside_ip_port_field_type =
3193 cnat_nfv9_template_info.del_dslite_inside_ip_port_field_size =
3196 cnat_nfv9_template_info.del_dslite_protocol_field_type =
3198 cnat_nfv9_template_info.del_dslite_protocol_field_size =
3205 cnat_nfv9_template_info.add_dslite_session_template_id =
3207 cnat_nfv9_template_info.add_dslite_session_field_count =
3210 cnat_nfv9_template_info.add_dslite_session_inside_vrf_id_field_type =
3212 cnat_nfv9_template_info.add_dslite_session_inside_vrf_id_field_size =
3215 cnat_nfv9_template_info.add_dslite_session_outside_vrf_id_field_type =
3217 cnat_nfv9_template_info.add_dslite_session_outside_vrf_id_field_size =
3220 cnat_nfv9_template_info.add_dslite_session_inside_ip_addr_field_type =
3222 cnat_nfv9_template_info.add_dslite_session_inside_ip_addr_field_size =
3225 cnat_nfv9_template_info.add_dslite_session_inside_ipv6_addr_field_type =
3227 cnat_nfv9_template_info.add_dslite_session_inside_ipv6_addr_field_size =
3230 cnat_nfv9_template_info.add_dslite_session_outside_ip_addr_field_type =
3232 cnat_nfv9_template_info.add_dslite_session_outside_ip_addr_field_size =
3235 cnat_nfv9_template_info.add_dslite_session_inside_ip_port_field_type =
3237 cnat_nfv9_template_info.add_dslite_session_inside_ip_port_field_size =
3240 cnat_nfv9_template_info.add_dslite_session_outside_ip_port_field_type =
3242 cnat_nfv9_template_info.add_dslite_session_outside_ip_port_field_size =
3245 cnat_nfv9_template_info.add_dslite_session_dest_ip_addr_field_type =
3247 cnat_nfv9_template_info.add_dslite_session_dest_ip_addr_field_size =
3250 cnat_nfv9_template_info.add_dslite_session_dest_port_field_type =
3252 cnat_nfv9_template_info.add_dslite_session_dest_port_field_size =
3255 cnat_nfv9_template_info.add_dslite_session_protocol_field_type =
3257 cnat_nfv9_template_info.add_dslite_session_protocol_field_size =
3263 cnat_nfv9_template_info.del_dslite_session_template_id =
3265 cnat_nfv9_template_info.del_dslite_session_field_count =
3268 cnat_nfv9_template_info.del_dslite_session_inside_vrf_id_field_type =
3270 cnat_nfv9_template_info.del_dslite_session_inside_vrf_id_field_size =
3273 cnat_nfv9_template_info.del_dslite_session_inside_ip_addr_field_type =
3275 cnat_nfv9_template_info.del_dslite_session_inside_ip_addr_field_size =
3278 cnat_nfv9_template_info.del_dslite_session_inside_ipv6_addr_field_type =
3280 cnat_nfv9_template_info.del_dslite_session_inside_ipv6_addr_field_size =
3283 cnat_nfv9_template_info.del_dslite_session_inside_ip_port_field_type =
3285 cnat_nfv9_template_info.del_dslite_session_inside_ip_port_field_size =
3288 cnat_nfv9_template_info.del_dslite_session_dest_ip_addr_field_type =
3290 cnat_nfv9_template_info.del_dslite_session_dest_ip_addr_field_size =
3293 cnat_nfv9_template_info.del_dslite_session_dest_port_field_type =
3295 cnat_nfv9_template_info.del_dslite_session_dest_port_field_size =
3298 cnat_nfv9_template_info.del_dslite_session_protocol_field_type =
3300 cnat_nfv9_template_info.del_dslite_session_protocol_field_size =
3304 cnat_nfv9_template_info.bulk_add_template_id =
3306 cnat_nfv9_template_info.bulk_add_field_count =
3309 cnat_nfv9_template_info.bulk_add_inside_vrf_id_field_type =
3311 cnat_nfv9_template_info.bulk_add_inside_vrf_id_field_size =
3314 cnat_nfv9_template_info.bulk_add_outside_vrf_id_field_type =
3316 cnat_nfv9_template_info.bulk_add_outside_vrf_id_field_size =
3319 cnat_nfv9_template_info.bulk_add_inside_ip_addr_field_type =
3321 cnat_nfv9_template_info.bulk_add_inside_ip_addr_field_size =
3324 cnat_nfv9_template_info.bulk_add_outside_ip_addr_field_type =
3326 cnat_nfv9_template_info.bulk_add_outside_ip_addr_field_size =
3329 cnat_nfv9_template_info.bulk_add_outside_start_port_field_type =
3331 cnat_nfv9_template_info.bulk_add_outside_start_port_field_size =
3334 cnat_nfv9_template_info.bulk_add_outside_end_port_field_type =
3336 cnat_nfv9_template_info.bulk_add_outside_end_port_field_size =
3342 cnat_nfv9_template_info.bulk_del_template_id =
3344 cnat_nfv9_template_info.bulk_del_field_count =
3347 cnat_nfv9_template_info.bulk_del_inside_vrf_id_field_type =
3349 cnat_nfv9_template_info.bulk_del_inside_vrf_id_field_size =
3352 cnat_nfv9_template_info.bulk_del_inside_ip_addr_field_type =
3354 cnat_nfv9_template_info.bulk_del_inside_ip_addr_field_size =
3357 cnat_nfv9_template_info.bulk_del_outside_start_port_field_type =
3359 cnat_nfv9_template_info.bulk_del_outside_start_port_field_size =
3365 cnat_nfv9_template_info.bulk_dslite_add_template_id =
3367 cnat_nfv9_template_info.bulk_dslite_add_field_count =
3370 cnat_nfv9_template_info.bulk_dslite_add_inside_vrf_id_field_type =
3372 cnat_nfv9_template_info.bulk_dslite_add_inside_vrf_id_field_size =
3375 cnat_nfv9_template_info.bulk_dslite_add_outside_vrf_id_field_type =
3377 cnat_nfv9_template_info.bulk_dslite_add_outside_vrf_id_field_size =
3380 cnat_nfv9_template_info.bulk_dslite_add_inside_ip_addr_field_type =
3382 cnat_nfv9_template_info.bulk_dslite_add_inside_ip_addr_field_size =
3385 cnat_nfv9_template_info.bulk_dslite_add_inside_ipv6_addr_field_type =
3387 cnat_nfv9_template_info.bulk_dslite_add_inside_ipv6_addr_field_size =
3390 cnat_nfv9_template_info.bulk_dslite_add_outside_ip_addr_field_type =
3392 cnat_nfv9_template_info.bulk_dslite_add_outside_ip_addr_field_size =
3395 cnat_nfv9_template_info.bulk_dslite_add_outside_start_port_field_type =
3397 cnat_nfv9_template_info.bulk_dslite_add_outside_start_port_field_size =
3400 cnat_nfv9_template_info.bulk_dslite_add_outside_end_port_field_type =
3402 cnat_nfv9_template_info.bulk_dslite_add_outside_end_port_field_size =
3409 cnat_nfv9_template_info.bulk_dslite_del_template_id =
3411 cnat_nfv9_template_info.bulk_dslite_del_field_count =
3414 cnat_nfv9_template_info.bulk_dslite_del_inside_vrf_id_field_type =
3416 cnat_nfv9_template_info.bulk_dslite_del_inside_vrf_id_field_size =
3419 cnat_nfv9_template_info.bulk_dslite_del_inside_ip_addr_field_type =
3421 cnat_nfv9_template_info.bulk_dslite_del_inside_ip_addr_field_size =
3424 cnat_nfv9_template_info.bulk_dslite_del_inside_ipv6_addr_field_type =
3426 cnat_nfv9_template_info.bulk_dslite_del_inside_ipv6_addr_field_size =
3429 cnat_nfv9_template_info.bulk_dslite_del_outside_start_port_field_type =
3431 cnat_nfv9_template_info.bulk_dslite_del_outside_start_port_field_size =
3482 pool_get(nfv9_server_info_pool, server);
3486 pool_put(nfv9_server_info_pool, nfv9_server_info_pool + i);
#define CNAT_NFV9_DS_LITE_ADD_SESSION_RECORD_LENGTH
u32 inside_v6_src_addr[4]
u16 add_inside_vrf_id_field_type
#define cnat_nfv9_get_sys_up_time_in_ms
u16 add_outside_ip_addr_field_type
cnat_nfv9_global_info_t cnat_nfv9_global_info
static void cnat_nfv9_ds_lite_insert_add_record(cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry)
u16 del_protocol_field_size
u32 inside_v6_src_addr[4]
void cnat_nfv9_ds_lite_log_session_delete(cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry, cnat_session_entry_t *sdb)
#define CNAT_NFV9_NAT44_DEL_SESSION_FIELD_COUNT
sll srl srl sll sra u16x4 i
#define CNAT_NFV9_BULK_ADD_RECORD_LENGTH
void cnat_handle_sys_time_change(time_t current_unix_time)
u32 inside_v6_src_addr[4]
#define CNAT_NFV9_OUTSIDE_IP_ADDR_FIELD_SIZE
u16 add_outside_vrf_id_field_size
u32 inside_v6_src_addr[4]
static void cnat_nfv9_ds_lite_insert_del_record(cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry)
u16 nat44_session_del_dest_port_field_size
void cnat_nfv9_bib_mapping_create(nat64_bib_entry_t *db, nat64_table_entry_t *nat64_entry)
#define CNAT_NFV9_TEMPLATE_FLOWSET_ID
cnat_nfv9_template_add_flag_t
u16 nat44_session_del_inside_ip_port_field_type
u16 nat44_session_del_dest_ip_addr_field_type
#define CNAT_NFV9_NAT64_ADD_BIB_FIELD_COUNT
#define CNAT_NFV9_INSIDE_DST_PORT_FIELD_SIZE
#define CNAT_NFV9_OPTION_TEMPLATE_FLOWSET_ID
static vlib_main_t * vlib_get_main(void)
#define CNAT_NFV9_NAT64_DEL_SESSION_TEMPLATE_ID
#define CNAT_NFV9_DS_LITE_BULK_ADD_TEMPLATE_ID
#define pool_alloc(P, N)
Allocate N more free elements to pool (unspecified alignment).
u16 nat44_session_del_template_id
#define CNAT_NFV9_TEMPLATE_OFFSET
u16 record_length[MAX_RECORDS]
u32 inside_v6_src_addr[4]
u16 nat44_session_add_protocol_field_type
#define CNAT_NFV9_NAT64_DEL_BIB_TEMPLATE_ID
ip4_address_t * ip4_interface_first_address(ip4_main_t *im, u32 sw_if_index, ip_interface_address_t **result_ia)
static f64 vlib_time_now(vlib_main_t *vm)
static void cnat_nfv9_ds_lite_insert_bulk_del_record(cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry, int bulk_alloc_start_port)
void cnat_nfv9_ds_lite_mapping_delete(cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry, int bulk_alloc)
nfv9_header_t * nfv9_header
u16 add_protocol_field_type
void nfv9_params_show(u32 logging_index)
u16 nat44_session_del_inside_ip_addr_field_type
static void cnat_nfv9_send_pkt(cnat_nfv9_logging_info_t *nfv9_logging_info)
#define CNAT_NFV9_NAT44_BULK_DEL_TEMPLATE_ID
#define CNAT_NFV9_ADD_FIELD_COUNT
u16 add_inside_ip_addr_field_type
#define CNAT_NFV9_HDR_OFFSET
#define CNAT_NFV9_INGRESS_VRF_NAME_FIELD_SIZE
u16 del_protocol_field_type
nfv9_dataflow_record_header_t * dataflow_header
u16 outside_ip_port_start
u16 nat44_session_add_dest_port_field_type
#define CNAT_NFV9_DS_LITE_DEL_SESSION_RECORD_LENGTH
#define CNAT_NFV9_DESTINATION_IP_ADDR_FIELD_SIZE
#define CNAT_NFV9_NAT44_DEL_SESSION_TEMPLATE_ID
#define CNAT_NFV9_INSIDE_VRFID_FIELD_SIZE
#define CNAT_NFV9_NAT44_ADD_SESSION_RECORD_LENGTH
#define CNAT_NFV9_DS_LITE_ADD_FIELD_COUNT
u16 nat44_session_del_inside_ip_port_field_size
void handle_pending_nfv9_pkts()
#define CNAT_NFV9_NAT44_DEL_SESSION_RECORD_LENGTH
void cnat_nfv9_nat44_log_session_create(cnat_main_db_entry_t *db, cnat_session_entry_t *sdb, cnat_vrfmap_t *vrfmap)
#define CNAT_NFV9_INSIDE_VRFID_FIELD_TYPE
static void cnat_nfv9_insert_del_record(cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, cnat_vrfmap_t *vrfmap)
u16 nat44_session_add_outside_vrf_id_field_type
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
u16 del_inside_ip_addr_field_size
#define CNAT_NFV9_DS_LITE_ADD_SESSION_TEMPLATE_ID
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
#define CNAT_NFV9_INSIDE_IPV6_DST_ADDR_FIELD_SIZE
#define CNAT_NFV9_OUTSIDE_IP_PORT_START_FIELD_SIZE
#define CNAT_NFV9_DS_LITE_ADD_SESSION_FIELD_COUNT
u32 cnat_nfv9_global_collector_index
u16 nat44_session_add_template_id
#define CNAT_NFV9_NAT44_BULK_ADD_FIELD_COUNT
nat64_v4_key_t v4_out_key
#define CNAT_NFV9_VERSION_NUMBER
u16 nat44_session_add_outside_ip_port_field_type
#define CNAT_NFV9_INGRESS_VRF_ID_NAME_OPTION_LEN
#define CNAT_NFV9_DS_LITE_DEL_RECORD_LENGTH
u32 inside_v6_src_addr[4]
u16 add_inside_ip_port_field_type
u16 nat44_session_add_outside_ip_port_field_size
u16 nat44_session_add_dest_ip_addr_field_size
u16 del_inside_ip_port_field_size
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
u32 inside_v6_src_addr[4]
vlib_buffer_t * queued_logging_context
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
void cnat_nfv9_session_mapping_create(nat64_bib_entry_t *bdb, nat64_session_entry_t *sdb, nat64_table_entry_t *nat64_entry_ptr)
u16 nat44_session_add_inside_vrf_id_field_size
#define CNAT_NFV9_NAT64_ADD_SESSION_TEMPLATE_ID
#define CNAT_NFV9_NAT64_DEL_SESSION_FIELD_COUNT
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
u16 add_outside_ip_port_field_size
u16 outside_ip_port_start
#define CNAT_NFV9_OPTION_TEMPLATE_LENGTH
#define CNAT_NFV9_PROTOCOL_FIELD_TYPE
u16 nat44_session_del_dest_port_field_type
static void handle_vrfid_name_mapping(void)
#define CNAT_NFV9_NAT64_DEL_BIB_FIELD_COUNT
u16 max_length_minus_max_record_size
#define CNAT_NFV9_NAT44_BULK_DEL_FIELD_COUNT
#define CNAT_NFV9_INGRESS_VRF_NAME_FIELD_TYPE
void cnat_nfv9_ingress_vrfid_name_mapping_create(cnat_nfv9_logging_info_t *nfv9_logging_info)
cnat_global_counters_t cnat_global_counters
static u32 vlib_get_buffer_index(vlib_main_t *vm, void *p)
Translate buffer pointer into buffer index.
#define CNAT_NFV9_INSIDE_DST_PORT_FIELD_TYPE
u16 nat44_session_del_inside_vrf_id_field_type
u16 cnat_nfv9_disp_node_index
#define CNAT_NFV9_INSIDE_IPV6_SRC_ADDR_FIELD_SIZE
u16 nat44_session_del_protocol_field_type
u16 add_inside_ip_addr_field_size
static void cnat_nfv9_insert_bulk_add_record(cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, cnat_vrfmap_t *vrfmap, int bulk_alloc_start_port)
u32 cnat_get_sys_up_time_in_ms(void)
cnat_nfv9_template_t cnat_nfv9_template_info
#define CNAT_NFV9_DEL_RECORD_LENGTH
void cnat_nfv9_logging_init()
#define CNAT_NFV9_ADD_RECORD_LENGTH
u16 current_length
Nbytes between current data and the end of this buffer.
u16 nat44_session_del_dest_ip_addr_field_size
static u8 * cnat_nfv9_add_end_of_record_padding(u8 *data_ptr)
u16 del_inside_ip_port_field_type
static int cnat_nfv9_pad_added_to_an_addr(u8 *new_addr, u8 *org_addr)
void cnat_nfv9_session_mapping_delete(nat64_bib_entry_t *bdb, nat64_session_entry_t *sdb, nat64_table_entry_t *nat64_entry_ptr)
#define CNAT_NFV9_NAT44_ADD_SESSION_FIELD_COUNT
void cnat_nfv9_record_create(cnat_nfv9_logging_info_t *nfv9_logging_info, u16 cur_record)
u32 current_logging_context_timestamp
u16 nat44_session_add_inside_ip_port_field_type
#define CNAT_NFV9_NAT44_ADD_SESSION_TEMPLATE_ID
#define CNAT_NFV9_DS_LITE_DEL_FIELD_COUNT
nfv9_server_info_t * nfv9_server_info_pool
#define NFV9_VRF_NAME_LEN
void cnat_nfv9_ds_lite_log_session_create(cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry, cnat_session_entry_t *sdb)
static void cnat_nfv9_ds_lite_insert_bulk_add_record(cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry, int bulk_alloc_start_port)
#define pool_put(P, E)
Free an object E in pool P.
static void cnat_nfv9_insert_ingress_vrfid_name_record(cnat_nfv9_logging_info_t *nfv9_logging_info, u16 index)
void cnat_nfv9_handle_sys_time_change(time_t current_unix_time)
#define CACHE_ALLOC_NO_LOG_REQUIRED
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
u16 nat44_session_add_field_count
u16 nat44_session_add_outside_ip_addr_field_size
#define CNAT_NFV9_NAT64_DEL_SESSION_RECORD_LENGTH
#define CNAT_NFV9_INSIDE_IP_PORT_FIELD_SIZE
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
#define CNAT_NFV9_DS_LITE_BULK_DEL_FIELD_COUNT
void cnat_nfv9_log_mapping_delete(cnat_main_db_entry_t *db, cnat_vrfmap_t *vrfmap, int bulk_alloc)
#define CNAT_NFV9_OPTION_TEMPLATE
#define CNAT_NFV9_OUTSIDE_IP_DST_ADDR_FIELD_TYPE
cnat_user_db_entry_t * cnat_user_db
#define CNAT_NFV9_INSIDE_IP_ADDR_FIELD_TYPE
#define CNAT_NFV9_NAT64_ADD_BIB_RECORD_LENGTH
#define CNAT_NFV9_NAT64_ADD_BIB_TEMPLATE_ID
void cnat_nfv9_nat44_log_session_delete(cnat_main_db_entry_t *db, cnat_session_entry_t *sdb, cnat_vrfmap_t *vrfmap)
#define CNAT_NFV9_OUTSIDE_IP_PORT_FIELD_TYPE
static void cnat_nfv9_insert_bulk_del_record(cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, cnat_vrfmap_t *vrfmap, int bulk_alloc_start_port)
u16 nat44_session_add_inside_ip_addr_field_type
u16 add_protocol_field_size
#define CNAT_NFV9_DS_LITE_DEL_TEMPLATE_ID
static void cnat_nfv9_send_pkt_always_success(cnat_nfv9_logging_info_t *nfv9_logging_info, vlib_node_t *output_node)
u32 pkts_since_last_template
static void cnat_nfv9_create_logging_context(cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_nfv9_template_add_flag_t template_flag)
#define clib_memcpy(a, b, c)
u16 add_outside_vrf_id_field_type
u32 inside_v6_dest_addr[4]
u32 inside_v6_src_addr[4]
#define CNAT_NFV9_OUTSIDE_IP_PORT_END_FIELD_TYPE
u16 outside_ip_port_start
#define CNAT_NFV9_OUTSIDE_IP_ADDR_FIELD_TYPE
u16 nat44_session_add_dest_ip_addr_field_type
#define BULKSIZE_FROM_VRFMAP(vrfmap)
void cnat_dump_time_change_logs(void)
#define CNAT_NFV9_DS_LITE_BULK_DEL_TEMPLATE_ID
static void cnat_nfv9_fill_nfv9_ip_header(cnat_nfv9_logging_info_t *nfv9_logging_info)
u16 nat44_session_add_inside_vrf_id_field_type
#define CNAT_NFV9_INGRESS_VRFID_NAME_RECORD_LENGTH
cnat_ingress_vrfid_name_entry vrfid_name_map[MAX_VRFID]
#define CNAT_NFV9_INSIDE_IPV6_SRC_ADDR_FIELD_TYPE
#define CNAT_NFV9_OUTSIDE_IP_DST_ADDR_FIELD_SIZE
u16 nat44_session_del_protocol_field_size
u16 del_inside_vrf_id_field_size
#define CNAT_NFV9_NAT64_ADD_SESSION_FIELD_COUNT
#define CNAT_NFV9_OUTSIDE_IP_PORT_END_FIELD_SIZE
#define CNAT_NFV9_DS_LITE_ADD_RECORD_LENGTH
cnat_nfv9_template_t * nfv9_template_header
u16 nat44_session_add_outside_vrf_id_field_size
void fill_ip_n_udp_hdr(u32 ipv4_addr, u16 port, cnat_nfv9_logging_info_t *nfv9_logging_info)
u16 nat44_session_del_field_count
#define CNAT_NFV9_DS_LITE_BULK_ADD_FIELD_COUNT
#define CNAT_NFV9_ADD_TEMPLATE_ID
u16 nat44_session_del_inside_ip_addr_field_size
u16 nat44_session_add_inside_ip_port_field_size
u32 vlib_buffer_alloc(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Allocate buffers into supplied array.
#define CNAT_NFV9_DESTINATION_IP_ADDR_FIELD_TYPE
#define CNAT_NFV9_DEL_FIELD_COUNT
u16 outside_ip_port_start
void cnat_nfv9_log_mapping_create(cnat_main_db_entry_t *db, cnat_vrfmap_t *vrfmap, int bulk_alloc)
void cnat_nfv9_bib_mapping_delete(nat64_bib_entry_t *db, nat64_table_entry_t *nat64_entry)
cnat_nfv9_logging_info_t * cnat_nfv9_logging_info_pool
u32 last_template_sent_time
#define CNAT_NFV9_DS_LITE_ADD_TEMPLATE_ID
nat64_v4_key_t v4_dest_key
#define CNAT_NFV9_INSIDE_IPV6_DST_ADDR_FIELD_TYPE
#define CNAT_NFV9_INSIDE_IP_ADDR_FIELD_SIZE
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
void cnat_nfv9_dump_logging_context(u32 value1, cnat_nfv9_logging_info_t *nfv9_logging_info, u32 value2)
#define CNAT_NFV9_BULK_DEL_RECORD_LENGTH
#define CNAT_NFV9_NAT64_DEL_BIB_RECORD_LENGTH
u16 cnat_template_id[MAX_RECORDS]
#define CNAT_NFV9_OUTSIDE_VRFID_FIELD_TYPE
#define CNAT_NFV9_TEMPLATE_LENGTH
u32 inside_v6_src_addr[4]
#define CNAT_NFV9_OUTSIDE_IP_PORT_START_FIELD_TYPE
u32 inside_v6_dest_addr[4]
#define CNAT_NFV9_OUTSIDE_VRFID_FIELD_SIZE
u16 nat44_session_add_outside_ip_addr_field_type
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
u32 inside_v6_src_addr[4]
u16 add_inside_ip_port_field_size
#define CNAT_NFV9_DS_LITE_DEL_SESSION_TEMPLATE_ID
static void cnat_nfv9_send_queued_pkt(cnat_nfv9_logging_info_t *nfv9_logging_info)
u16 add_outside_ip_addr_field_size
#define CNAT_NFV9_PROTOCOL_FIELD_SIZE
#define CNAT_NFV9_OUTSIDE_IP_PORT_FIELD_SIZE
u16 add_outside_ip_port_field_type
#define CNAT_NFV9_INGRESS_VRF_ID_NAME_TEMPLATE_ID
ip4_main_t ip4_main
Global ip4 main structure.
static u16 cnat_nfv9_pad_end_of_record_length(u16 record_length)
u16 del_inside_vrf_id_field_type
vlib_buffer_t * current_logging_context
void cnat_nfv9_ds_lite_mapping_create(cnat_main_db_entry_t *db, dslite_table_entry_t *dslite_entry, int bulk_alloc)
u16 del_inside_ip_addr_field_type
u64 nfv9_logging_context_creation_deferred_count
u16 nat44_session_add_protocol_field_size
#define CNAT_NFV9_DS_LITE_BULK_DEL_RECORD_LENGTH
u16 nat44_session_del_inside_vrf_id_field_size
u8 ingress_vrf_name[NFV9_VRF_NAME_LEN]
#define CNAT_NFV9_INSIDE_IP_PORT_FIELD_TYPE
static void cnat_nfv9_insert_add_record(cnat_nfv9_logging_info_t *nfv9_logging_info, cnat_main_db_entry_t *db, cnat_vrfmap_t *vrfmap)
static void cnat_nfv9_template_init(void)
#define CNAT_NFV9_DS_LITE_BULK_ADD_RECORD_LENGTH
#define CNAT_NFV9_DATAFLOW_RECORD_HEADER_LENGTH
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
void cnat_nfv9_update_sys_time_change()
#define CNAT_NFV9_DEL_TEMPLATE_ID
#define CNAT_NFV9_DS_LITE_DEL_SESSION_FIELD_COUNT
#define CNAT_NFV9_NAT44_BULK_ADD_TEMPLATE_ID
static void send_vpp3_nfv9_pkt(cnat_nfv9_logging_info_t *nfv9_logging_info)
u16 nat44_session_add_dest_port_field_size
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
#define CNAT_NFV9_IP_HDR_OFFSET
#define CNAT_NFV9_UDP_HDR_OFFSET
#define NFV9_SERVER_POOL_SIZE
static u16 ip4_header_checksum(ip4_header_t *i)
u16 add_inside_vrf_id_field_size
#define CNAT_NFV9_NAT64_ADD_SESSION_RECORD_LENGTH
#define cnat_nfv9_get_unix_time_in_seconds
u16 nat44_session_add_inside_ip_addr_field_size
cnat_nfv9_logging_info_t cnat_default_nfv9_logging_info