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));
384 u16 ip_length __attribute__((unused));
387 u16 src_port = 0x0a0a;
401 ip_header->
ttl = 0xff;
403 ip_header->
dest_addr = clib_host_to_net_u32(ipv4_addr);
408 udp_header->
src_port = clib_host_to_net_u16(src_port);
409 udp_header->
dest_port = clib_host_to_net_u16(port);
412 clib_host_to_net_u16(pkt_len -
sizeof(
ipv4_header));
429 u16 new_record_length = 0;
430 u16 orig_record_length = 0;
454 clib_host_to_net_u16(new_record_length);
460 if (
PREDICT_TRUE(new_record_length - orig_record_length)) {
473 (new_record_length - orig_record_length);
478 server->
port, nfv9_logging_info);
647 pool_put(cnat_nfv9_logging_info_pool, nfv9_logging_info);
784 &cnat_nfv9_template_info,
785 sizeof(cnat_nfv9_template_info));
813 if(last_record != 0 && last_record != cur_record) {
814 u16 orig_length, new_length;
824 clib_host_to_net_u16(new_length);
829 nfv9_logging_info->
record[last_record] = 0;
872 nfv9_logging_info->
record[cur_record] =
909 clib_host_to_net_u32(vrfmap->
i_vrf_id);
912 clib_host_to_net_u32(vrfmap->
o_vrf_id);
929 nfv9_logging_add_record.
protocol = my_protocol;
945 clib_host_to_net_u32(
973 clib_host_to_net_u32(dslite_entry->
i_vrf_id);
975 clib_host_to_net_u32(dslite_entry->
o_vrf_id);
977 #ifdef DSLITE_USER_IPV4 989 clib_host_to_net_u32(udb->
ipv6[0]);
991 clib_host_to_net_u32(udb->
ipv6[1]);
993 clib_host_to_net_u32(udb->
ipv6[2]);
995 clib_host_to_net_u32(udb->
ipv6[3]);
1010 nfv9_logging_add_record.
protocol = my_protocol;
1027 clib_host_to_net_u32(
1055 clib_host_to_net_u32(dslite_entry->
i_vrf_id);
1057 #ifdef DSLITE_USER_IPV4 1069 clib_host_to_net_u32(udb->
ipv6[0]);
1071 clib_host_to_net_u32(udb->
ipv6[1]);
1073 clib_host_to_net_u32(udb->
ipv6[2]);
1075 clib_host_to_net_u32(udb->
ipv6[3]);
1085 nfv9_logging_del_record.
protocol = my_protocol;
1102 clib_host_to_net_u32(
1106 #ifndef NO_BULK_LOGGING 1111 int bulk_alloc_start_port)
1124 clib_host_to_net_u32(vrfmap->
i_vrf_id);
1126 clib_host_to_net_u32(vrfmap->
o_vrf_id);
1134 clib_host_to_net_u16(bulk_alloc_start_port);
1136 clib_host_to_net_u16(bulk_alloc_start_port + bulk_size -1);
1152 clib_host_to_net_u32(
1162 int bulk_alloc_start_port)
1181 clib_host_to_net_u32(dslite_entry->
i_vrf_id);
1183 clib_host_to_net_u32(dslite_entry->
o_vrf_id);
1185 #ifdef DSLITE_USER_IPV4 1197 clib_host_to_net_u32(udb->
ipv6[0]);
1199 clib_host_to_net_u32(udb->
ipv6[1]);
1201 clib_host_to_net_u32(udb->
ipv6[2]);
1203 clib_host_to_net_u32(udb->
ipv6[3]);
1209 clib_host_to_net_u16(bulk_alloc_start_port);
1211 clib_host_to_net_u16(bulk_alloc_start_port + bulk_size -1);
1226 clib_host_to_net_u32(
1235 int bulk_alloc_start_port)
1253 clib_host_to_net_u32(dslite_entry->
i_vrf_id);
1255 #ifdef DSLITE_USER_IPV4 1260 clib_host_to_net_u32(0);
1264 clib_host_to_net_u32(udb->
ipv6[0]);
1266 clib_host_to_net_u32(udb->
ipv6[1]);
1268 clib_host_to_net_u32(udb->
ipv6[2]);
1270 clib_host_to_net_u32(udb->
ipv6[3]);
1273 clib_host_to_net_u16(bulk_alloc_start_port);
1276 &nfv9_logging_bulk_del_record,
1288 clib_host_to_net_u32(
1311 clib_host_to_net_u32(vrfmap->
i_vrf_id);
1324 nfv9_logging_del_record.
protocol = my_protocol;
1340 clib_host_to_net_u32(
1345 #ifndef NO_BULK_LOGGING 1350 int bulk_alloc_start_port)
1362 clib_host_to_net_u32(vrfmap->
i_vrf_id);
1368 clib_host_to_net_u16(bulk_alloc_start_port);
1384 clib_host_to_net_u32(
1403 #ifndef NO_BULK_LOGGING
1420 if (cnat_nfv9_logging_info_pool ==
NULL) {
1421 vlib_cli_output(vm,
"%s: info_pool pointer is NULL !!!!\n", __func__);
1425 cnat_nfv9_logging_info_pool + vrfmap->nfv9_logging_index;
1441 #ifndef NO_BULK_LOGGING 1442 if(bulk_alloc > 0) {
1478 #ifndef NO_BULK_LOGGING
1494 cnat_nfv9_logging_info_pool + vrfmap->nfv9_logging_index;
1508 #ifndef NO_BULK_LOGGING 1509 if(bulk_alloc > 0) {
1605 nfv9_logging_add_record.
protocol = my_protocol;
1623 clib_host_to_net_u32(
1674 cnat_nfv9_logging_info_pool + nat64_entry_ptr->
logging_index;
1713 dest_v6[0] = nat64_entry_ptr->
v6_prefix[0];
1714 dest_v6[1] = nat64_entry_ptr->
v6_prefix[1];
1715 dest_v6[2] = nat64_entry_ptr->
v6_prefix[2];
1716 dest_v6[3] = nat64_entry_ptr->
v6_prefix[3];
1718 ipv6_addr_ptr = (
u8 *) (&(dest_v6[0]));
1721 *(ipv6_addr_ptr + nat64_entry_ptr->
octet0_position) = *(ipv4_addr_ptr);
1722 *(ipv6_addr_ptr + nat64_entry_ptr->
octet1_position) = *(ipv4_addr_ptr + 1);
1723 *(ipv6_addr_ptr + nat64_entry_ptr->
octet2_position) = *(ipv4_addr_ptr + 2);
1724 *(ipv6_addr_ptr + nat64_entry_ptr->
octet3_position) = *(ipv4_addr_ptr + 3);
1727 clib_host_to_net_u32(dest_v6[0]);
1729 clib_host_to_net_u32(dest_v6[1]);
1731 clib_host_to_net_u32(dest_v6[2]);
1733 clib_host_to_net_u32(dest_v6[3]);
1752 nfv9_logging_add_record.
protocol = my_protocol;
1770 clib_host_to_net_u32(
1850 nfv9_logging_del_record.
protocol = my_protocol;
1868 clib_host_to_net_u32(
1918 cnat_nfv9_logging_info_pool + nat64_entry_ptr->
logging_index;
1949 dest_v6[0] = nat64_entry_ptr->
v6_prefix[0];
1950 dest_v6[1] = nat64_entry_ptr->
v6_prefix[1];
1951 dest_v6[2] = nat64_entry_ptr->
v6_prefix[2];
1952 dest_v6[3] = nat64_entry_ptr->
v6_prefix[3];
1954 ipv6_addr_ptr = (
u8 *) (&(dest_v6[0]));
1957 *(ipv6_addr_ptr + nat64_entry_ptr->
octet0_position) = *(ipv4_addr_ptr);
1958 *(ipv6_addr_ptr + nat64_entry_ptr->
octet1_position) = *(ipv4_addr_ptr + 1);
1959 *(ipv6_addr_ptr + nat64_entry_ptr->
octet2_position) = *(ipv4_addr_ptr + 2);
1960 *(ipv6_addr_ptr + nat64_entry_ptr->
octet3_position) = *(ipv4_addr_ptr + 3);
1963 clib_host_to_net_u32(dest_v6[0]);
1965 clib_host_to_net_u32(dest_v6[1]);
1967 clib_host_to_net_u32(dest_v6[2]);
1969 clib_host_to_net_u32(dest_v6[3]);
1983 nfv9_logging_del_record.
protocol = my_protocol;
2000 clib_host_to_net_u32(
2070 clib_host_to_net_u32(vrfmap->
i_vrf_id);
2072 clib_host_to_net_u32(vrfmap->
o_vrf_id);
2086 clib_host_to_net_u32(db->
dst_ipv4);
2087 nfv9_logging_add_session_record.
dest_port =
2088 clib_host_to_net_u16(db->
dst_port);
2092 nfv9_logging_add_session_record.
dest_port =
2107 nfv9_logging_add_session_record.
protocol = my_protocol;
2110 &nfv9_logging_add_session_record,
2126 clib_host_to_net_u32(
2196 clib_host_to_net_u32(vrfmap->
i_vrf_id);
2207 clib_host_to_net_u32(db->
dst_ipv4);
2208 nfv9_logging_del_session_record.
dest_port =
2209 clib_host_to_net_u16(db->
dst_port);
2213 nfv9_logging_del_session_record.
dest_port =
2225 nfv9_logging_del_session_record.
protocol = my_protocol;
2228 &nfv9_logging_del_session_record,
2243 clib_host_to_net_u32(
2275 #ifndef NO_BULK_LOGGING
2294 cnat_nfv9_logging_info_pool + dslite_entry->nfv9_logging_index;
2305 #ifndef NO_BULK_LOGGING 2306 if(bulk_alloc > 0) {
2308 db, dslite_entry, bulk_alloc);
2339 #ifndef NO_BULK_LOGGING
2356 cnat_nfv9_logging_info_pool + dslite_entry->nfv9_logging_index;
2369 #ifndef NO_BULK_LOGGING 2370 if(bulk_alloc > 0) {
2372 db, dslite_entry, bulk_alloc);
2448 clib_host_to_net_u32(dslite_entry->
i_vrf_id);
2450 clib_host_to_net_u32(dslite_entry->
o_vrf_id);
2456 clib_host_to_net_u32(udb->
ipv6[0]);
2458 clib_host_to_net_u32(udb->
ipv6[1]);
2460 clib_host_to_net_u32(udb->
ipv6[2]);
2462 clib_host_to_net_u32(udb->
ipv6[3]);
2479 clib_host_to_net_u32(db->
dst_ipv4);
2481 clib_host_to_net_u16(db->
dst_port);
2495 nfv9_logging_add_record.
protocol = my_protocol;
2512 clib_host_to_net_u32(
2586 clib_host_to_net_u32(dslite_entry->
i_vrf_id);
2592 clib_host_to_net_u32(udb->
ipv6[0]);
2594 clib_host_to_net_u32(udb->
ipv6[1]);
2596 clib_host_to_net_u32(udb->
ipv6[2]);
2598 clib_host_to_net_u32(udb->
ipv6[3]);
2609 clib_host_to_net_u32(db->
dst_ipv4);
2611 clib_host_to_net_u16(db->
dst_port);
2625 nfv9_logging_add_record.
protocol = my_protocol;
2642 clib_host_to_net_u32(
2671 static inline __attribute__((unused))
2676 pool_foreach (nfv9_logging_info, cnat_nfv9_logging_info_pool, ({
2683 cnat_nfv9_ingress_vrfid_name_mapping_create(nfv9_logging_info);
2684 server->template_sent = TEMPLATE_SENT_FALSE;
2702 for (index = 0; index <
MAX_VRFID; index++) {
2712 nfv9_logging_info,index);
2741 &nfv9_ingress_vrfid_name_record,
2759 clib_host_to_net_u32(
2781 pool_foreach (my_nfv9_logging_info, cnat_nfv9_logging_info_pool, ({
2786 (current_timestamp -
2794 vlib_cli_output(vm,
"\nNFV9_TIMER: queued %p, curr %p",
2795 my_nfv9_logging_info->queued_logging_context,
2796 my_nfv9_logging_info->current_logging_context);
2799 cnat_nfv9_send_pkt_always_success(my_nfv9_logging_info,
2806 if ((my_nfv9_logging_info->queued_logging_context == NULL) &&
2807 (my_nfv9_logging_info->current_logging_context == NULL) &&
2808 ((current_unix_time_in_seconds -
2809 server->last_template_sent_time) >
2810 server->timeout_rate)) {
2811 cnat_nfv9_create_logging_context(my_nfv9_logging_info,
2812 cnat_nfv9_template_add_always);
2813 if (PREDICT_TRUE(my_nfv9_logging_info->current_logging_context
2815 cnat_nfv9_send_pkt(my_nfv9_logging_info);
2831 cnat_nfv9_template_info.
length =
2908 cnat_nfv9_template_info.nat64_add_bib_template_id =
2910 cnat_nfv9_template_info.nat64_add_bib_field_count =
2914 cnat_nfv9_template_info.nat64_add_bib_inside_ipv6_addr_field_type =
2916 cnat_nfv9_template_info.nat64_add_bib_inside_ipv6_addr_field_size =
2919 cnat_nfv9_template_info.nat64_add_bib_outside_ip_addr_field_type =
2921 cnat_nfv9_template_info.nat64_add_bib_outside_ip_addr_field_size =
2924 cnat_nfv9_template_info.nat64_add_bib_inside_ip_port_field_type =
2926 cnat_nfv9_template_info.nat64_add_bib_inside_ip_port_field_size =
2929 cnat_nfv9_template_info.nat64_add_bib_outside_ip_port_field_type =
2931 cnat_nfv9_template_info.nat64_add_bib_outside_ip_port_field_size =
2934 cnat_nfv9_template_info.nat64_add_bib_protocol_field_type =
2936 cnat_nfv9_template_info.nat64_add_bib_protocol_field_size =
2941 cnat_nfv9_template_info.nat64_del_bib_template_id =
2943 cnat_nfv9_template_info.nat64_del_bib_field_count =
2946 cnat_nfv9_template_info.nat64_del_bib_inside_ip_addr_field_type =
2948 cnat_nfv9_template_info.nat64_del_bib_inside_ip_addr_field_size =
2951 cnat_nfv9_template_info.nat64_del_bib_inside_ip_port_field_type =
2953 cnat_nfv9_template_info.nat64_del_bib_inside_ip_port_field_size =
2956 cnat_nfv9_template_info.nat64_del_bib_protocol_field_type =
2958 cnat_nfv9_template_info.nat64_del_bib_protocol_field_size =
2964 cnat_nfv9_template_info.nat64_add_session_template_id =
2966 cnat_nfv9_template_info.nat64_add_session_field_count =
2970 cnat_nfv9_template_info.nat64_add_session_inside_ipv6_src_addr_field_type =
2972 cnat_nfv9_template_info.nat64_add_session_inside_ipv6_src_addr_field_size =
2975 cnat_nfv9_template_info.nat64_add_session_outside_ip_src_addr_field_type =
2977 cnat_nfv9_template_info.nat64_add_session_outside_ip_src_addr_field_size =
2981 cnat_nfv9_template_info.nat64_add_session_inside_ipv6_dst_addr_field_type =
2983 cnat_nfv9_template_info.nat64_add_session_inside_ipv6_dst_addr_field_size =
2987 cnat_nfv9_template_info.nat64_add_session_outside_ip_dst_addr_field_type =
2989 cnat_nfv9_template_info.nat64_add_session_outside_ip_dst_addr_field_size =
2992 cnat_nfv9_template_info.nat64_add_session_inside_ip_src_port_field_type =
2994 cnat_nfv9_template_info.nat64_add_session_inside_ip_src_port_field_size =
2998 cnat_nfv9_template_info.nat64_add_session_outside_ip_src_port_field_type =
3000 cnat_nfv9_template_info.nat64_add_session_outside_ip_src_port_field_size =
3004 cnat_nfv9_template_info.nat64_add_session_ip_dest_port_field_type =
3006 cnat_nfv9_template_info.nat64_add_session_ip_dest_port_field_size =
3009 cnat_nfv9_template_info.nat64_add_session_protocol_field_type =
3011 cnat_nfv9_template_info.nat64_add_session_protocol_field_size =
3017 cnat_nfv9_template_info.nat64_del_session_template_id =
3019 cnat_nfv9_template_info.nat64_del_session_field_count =
3022 cnat_nfv9_template_info.nat64_del_session_inside_ip_src_addr_field_type =
3024 cnat_nfv9_template_info.nat64_del_session_inside_ip_src_addr_field_size =
3027 cnat_nfv9_template_info.nat64_del_session_inside_ip_dst_addr_field_type =
3029 cnat_nfv9_template_info.nat64_del_session_inside_ip_dst_addr_field_size =
3032 cnat_nfv9_template_info.nat64_del_session_inside_ip_src_port_field_type =
3034 cnat_nfv9_template_info.nat64_del_session_inside_ip_src_port_field_size =
3037 cnat_nfv9_template_info.nat64_del_session_inside_ip_dst_port_field_type =
3039 cnat_nfv9_template_info.nat64_del_session_inside_ip_dst_port_field_size =
3042 cnat_nfv9_template_info.nat64_del_session_protocol_field_type =
3044 cnat_nfv9_template_info.nat64_del_session_protocol_field_size =
3141 cnat_nfv9_template_info.add_dslite_template_id =
3143 cnat_nfv9_template_info.add_dslite_field_count =
3146 cnat_nfv9_template_info.add_dslite_inside_vrf_id_field_type =
3148 cnat_nfv9_template_info.add_dslite_inside_vrf_id_field_size =
3151 cnat_nfv9_template_info.add_dslite_outside_vrf_id_field_type =
3153 cnat_nfv9_template_info.add_dslite_outside_vrf_id_field_size =
3156 cnat_nfv9_template_info.add_dslite_inside_ip_addr_field_type =
3158 cnat_nfv9_template_info.add_dslite_inside_ip_addr_field_size =
3161 cnat_nfv9_template_info.add_dslite_inside_ipv6_addr_field_type =
3163 cnat_nfv9_template_info.add_dslite_inside_ipv6_addr_field_size =
3166 cnat_nfv9_template_info.add_dslite_outside_ip_addr_field_type =
3168 cnat_nfv9_template_info.add_dslite_outside_ip_addr_field_size =
3171 cnat_nfv9_template_info.add_dslite_inside_ip_port_field_type =
3173 cnat_nfv9_template_info.add_dslite_inside_ip_port_field_size =
3176 cnat_nfv9_template_info.add_dslite_outside_ip_port_field_type =
3178 cnat_nfv9_template_info.add_dslite_outside_ip_port_field_size =
3181 cnat_nfv9_template_info.add_dslite_protocol_field_type =
3183 cnat_nfv9_template_info.add_dslite_protocol_field_size =
3189 cnat_nfv9_template_info.del_dslite_template_id =
3191 cnat_nfv9_template_info.del_dslite_field_count =
3194 cnat_nfv9_template_info.del_dslite_inside_vrf_id_field_type =
3196 cnat_nfv9_template_info.del_dslite_inside_vrf_id_field_size =
3199 cnat_nfv9_template_info.del_dslite_inside_ip_addr_field_type =
3201 cnat_nfv9_template_info.del_dslite_inside_ip_addr_field_size =
3204 cnat_nfv9_template_info.del_dslite_inside_ipv6_addr_field_type =
3206 cnat_nfv9_template_info.del_dslite_inside_ipv6_addr_field_size =
3209 cnat_nfv9_template_info.del_dslite_inside_ip_port_field_type =
3211 cnat_nfv9_template_info.del_dslite_inside_ip_port_field_size =
3214 cnat_nfv9_template_info.del_dslite_protocol_field_type =
3216 cnat_nfv9_template_info.del_dslite_protocol_field_size =
3223 cnat_nfv9_template_info.add_dslite_session_template_id =
3225 cnat_nfv9_template_info.add_dslite_session_field_count =
3228 cnat_nfv9_template_info.add_dslite_session_inside_vrf_id_field_type =
3230 cnat_nfv9_template_info.add_dslite_session_inside_vrf_id_field_size =
3233 cnat_nfv9_template_info.add_dslite_session_outside_vrf_id_field_type =
3235 cnat_nfv9_template_info.add_dslite_session_outside_vrf_id_field_size =
3238 cnat_nfv9_template_info.add_dslite_session_inside_ip_addr_field_type =
3240 cnat_nfv9_template_info.add_dslite_session_inside_ip_addr_field_size =
3243 cnat_nfv9_template_info.add_dslite_session_inside_ipv6_addr_field_type =
3245 cnat_nfv9_template_info.add_dslite_session_inside_ipv6_addr_field_size =
3248 cnat_nfv9_template_info.add_dslite_session_outside_ip_addr_field_type =
3250 cnat_nfv9_template_info.add_dslite_session_outside_ip_addr_field_size =
3253 cnat_nfv9_template_info.add_dslite_session_inside_ip_port_field_type =
3255 cnat_nfv9_template_info.add_dslite_session_inside_ip_port_field_size =
3258 cnat_nfv9_template_info.add_dslite_session_outside_ip_port_field_type =
3260 cnat_nfv9_template_info.add_dslite_session_outside_ip_port_field_size =
3263 cnat_nfv9_template_info.add_dslite_session_dest_ip_addr_field_type =
3265 cnat_nfv9_template_info.add_dslite_session_dest_ip_addr_field_size =
3268 cnat_nfv9_template_info.add_dslite_session_dest_port_field_type =
3270 cnat_nfv9_template_info.add_dslite_session_dest_port_field_size =
3273 cnat_nfv9_template_info.add_dslite_session_protocol_field_type =
3275 cnat_nfv9_template_info.add_dslite_session_protocol_field_size =
3281 cnat_nfv9_template_info.del_dslite_session_template_id =
3283 cnat_nfv9_template_info.del_dslite_session_field_count =
3286 cnat_nfv9_template_info.del_dslite_session_inside_vrf_id_field_type =
3288 cnat_nfv9_template_info.del_dslite_session_inside_vrf_id_field_size =
3291 cnat_nfv9_template_info.del_dslite_session_inside_ip_addr_field_type =
3293 cnat_nfv9_template_info.del_dslite_session_inside_ip_addr_field_size =
3296 cnat_nfv9_template_info.del_dslite_session_inside_ipv6_addr_field_type =
3298 cnat_nfv9_template_info.del_dslite_session_inside_ipv6_addr_field_size =
3301 cnat_nfv9_template_info.del_dslite_session_inside_ip_port_field_type =
3303 cnat_nfv9_template_info.del_dslite_session_inside_ip_port_field_size =
3306 cnat_nfv9_template_info.del_dslite_session_dest_ip_addr_field_type =
3308 cnat_nfv9_template_info.del_dslite_session_dest_ip_addr_field_size =
3311 cnat_nfv9_template_info.del_dslite_session_dest_port_field_type =
3313 cnat_nfv9_template_info.del_dslite_session_dest_port_field_size =
3316 cnat_nfv9_template_info.del_dslite_session_protocol_field_type =
3318 cnat_nfv9_template_info.del_dslite_session_protocol_field_size =
3322 cnat_nfv9_template_info.bulk_add_template_id =
3324 cnat_nfv9_template_info.bulk_add_field_count =
3327 cnat_nfv9_template_info.bulk_add_inside_vrf_id_field_type =
3329 cnat_nfv9_template_info.bulk_add_inside_vrf_id_field_size =
3332 cnat_nfv9_template_info.bulk_add_outside_vrf_id_field_type =
3334 cnat_nfv9_template_info.bulk_add_outside_vrf_id_field_size =
3337 cnat_nfv9_template_info.bulk_add_inside_ip_addr_field_type =
3339 cnat_nfv9_template_info.bulk_add_inside_ip_addr_field_size =
3342 cnat_nfv9_template_info.bulk_add_outside_ip_addr_field_type =
3344 cnat_nfv9_template_info.bulk_add_outside_ip_addr_field_size =
3347 cnat_nfv9_template_info.bulk_add_outside_start_port_field_type =
3349 cnat_nfv9_template_info.bulk_add_outside_start_port_field_size =
3352 cnat_nfv9_template_info.bulk_add_outside_end_port_field_type =
3354 cnat_nfv9_template_info.bulk_add_outside_end_port_field_size =
3360 cnat_nfv9_template_info.bulk_del_template_id =
3362 cnat_nfv9_template_info.bulk_del_field_count =
3365 cnat_nfv9_template_info.bulk_del_inside_vrf_id_field_type =
3367 cnat_nfv9_template_info.bulk_del_inside_vrf_id_field_size =
3370 cnat_nfv9_template_info.bulk_del_inside_ip_addr_field_type =
3372 cnat_nfv9_template_info.bulk_del_inside_ip_addr_field_size =
3375 cnat_nfv9_template_info.bulk_del_outside_start_port_field_type =
3377 cnat_nfv9_template_info.bulk_del_outside_start_port_field_size =
3383 cnat_nfv9_template_info.bulk_dslite_add_template_id =
3385 cnat_nfv9_template_info.bulk_dslite_add_field_count =
3388 cnat_nfv9_template_info.bulk_dslite_add_inside_vrf_id_field_type =
3390 cnat_nfv9_template_info.bulk_dslite_add_inside_vrf_id_field_size =
3393 cnat_nfv9_template_info.bulk_dslite_add_outside_vrf_id_field_type =
3395 cnat_nfv9_template_info.bulk_dslite_add_outside_vrf_id_field_size =
3398 cnat_nfv9_template_info.bulk_dslite_add_inside_ip_addr_field_type =
3400 cnat_nfv9_template_info.bulk_dslite_add_inside_ip_addr_field_size =
3403 cnat_nfv9_template_info.bulk_dslite_add_inside_ipv6_addr_field_type =
3405 cnat_nfv9_template_info.bulk_dslite_add_inside_ipv6_addr_field_size =
3408 cnat_nfv9_template_info.bulk_dslite_add_outside_ip_addr_field_type =
3410 cnat_nfv9_template_info.bulk_dslite_add_outside_ip_addr_field_size =
3413 cnat_nfv9_template_info.bulk_dslite_add_outside_start_port_field_type =
3415 cnat_nfv9_template_info.bulk_dslite_add_outside_start_port_field_size =
3418 cnat_nfv9_template_info.bulk_dslite_add_outside_end_port_field_type =
3420 cnat_nfv9_template_info.bulk_dslite_add_outside_end_port_field_size =
3427 cnat_nfv9_template_info.bulk_dslite_del_template_id =
3429 cnat_nfv9_template_info.bulk_dslite_del_field_count =
3432 cnat_nfv9_template_info.bulk_dslite_del_inside_vrf_id_field_type =
3434 cnat_nfv9_template_info.bulk_dslite_del_inside_vrf_id_field_size =
3437 cnat_nfv9_template_info.bulk_dslite_del_inside_ip_addr_field_type =
3439 cnat_nfv9_template_info.bulk_dslite_del_inside_ip_addr_field_size =
3442 cnat_nfv9_template_info.bulk_dslite_del_inside_ipv6_addr_field_type =
3444 cnat_nfv9_template_info.bulk_dslite_del_inside_ipv6_addr_field_size =
3447 cnat_nfv9_template_info.bulk_dslite_del_outside_start_port_field_type =
3449 cnat_nfv9_template_info.bulk_dslite_del_outside_start_port_field_size =
3500 pool_get(nfv9_server_info_pool, server);
3504 pool_put(nfv9_server_info_pool, nfv9_server_info_pool + i);
#define foreach_ip_interface_address(lm, a, sw_if_index, loop, body)
#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 void(BVT(clib_bihash)*h, BVT(clib_bihash_value)*v)
#define CNAT_NFV9_NAT64_DEL_SESSION_TEMPLATE_ID
#define CNAT_NFV9_DS_LITE_BULK_ADD_TEMPLATE_ID
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
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
ip_lookup_main_t lookup_main
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
u16 del_inside_ip_addr_field_size
#define CNAT_NFV9_DS_LITE_ADD_SESSION_TEMPLATE_ID
#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
always_inline void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
u16 nat44_session_add_template_id
#define CNAT_NFV9_NAT44_BULK_ADD_FIELD_COUNT
always_inline vlib_main_t * vlib_get_main(void)
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
always_inline void * ip_interface_address_get_address(ip_lookup_main_t *lm, ip_interface_address_t *a)
#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)
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
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
always_inline uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
#define CNAT_NFV9_NAT44_BULK_DEL_FIELD_COUNT
#define CNAT_NFV9_INGRESS_VRF_NAME_FIELD_TYPE
always_inline void * vlib_frame_vector_args(vlib_frame_t *f)
void cnat_nfv9_ingress_vrfid_name_mapping_create(cnat_nfv9_logging_info_t *nfv9_logging_info)
cnat_global_counters_t cnat_global_counters
#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)
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
always_inline u16 ip4_header_checksum(ip4_header_t *i)
#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
static ip4_address_t * ip4_interface_first_address(ip4_main_t *im, u32 sw_if_index)
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
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
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
always_inline f64 vlib_time_now(vlib_main_t *vm)
#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
always_inline vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static void send_vpp3_nfv9_pkt(cnat_nfv9_logging_info_t *nfv9_logging_info)
always_inline u32 vlib_get_buffer_index(vlib_main_t *vm, void *p)
Translate buffer pointer into buffer index.
u16 nat44_session_add_dest_port_field_size
#define CNAT_NFV9_IP_HDR_OFFSET
#define CNAT_NFV9_UDP_HDR_OFFSET
#define NFV9_SERVER_POOL_SIZE
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