ipsec: Use the new tunnel API types to add flow label and TTL copy
[vpp.git] / src / vnet / ipfix-export / flow_report.c
index da91a7c..a831c3c 100644 (file)
@@ -17,6 +17,7 @@
  */
 #include <vnet/ipfix-export/flow_report.h>
 #include <vnet/api_errno.h>
+#include <vnet/udp/udp.h>
 
 flow_report_main_t flow_report_main;
 
@@ -121,7 +122,7 @@ send_template_packet (flow_report_main_t * frm,
   /* Initialize the buffer */
   VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0);
 
-  ASSERT (vec_len (fr->rewrite) < VLIB_BUFFER_DATA_SIZE);
+  ASSERT (vec_len (fr->rewrite) < vlib_buffer_get_default_data_size (vm));
 
   clib_memcpy_fast (b0->data, fr->rewrite, vec_len (fr->rewrite));
   b0->current_data = 0;
@@ -500,7 +501,8 @@ set_ipfix_exporter_command_fn (vlib_main_t * vm,
     {
       if (unformat (input, "collector %U", unformat_ip4_address, &collector))
        ;
-      else if (unformat (input, "port %u", &collector_port))
+      else if (unformat (input, "port %U", unformat_udp_port,
+                        &collector_port))
        ;
       else if (unformat (input, "src %U", unformat_ip4_address, &src))
        ;
@@ -569,7 +571,7 @@ VLIB_CLI_COMMAND (set_ipfix_exporter_command, static) = {
                   "collector <ip4-address> [port <port>] "
                   "src <ip4-address> [fib-id <fib-id>] "
                   "[path-mtu <path-mtu>] "
-                  "[template-interval <template-interval>]",
+                  "[template-interval <template-interval>] "
                   "[udp-checksum]",
     .function = set_ipfix_exporter_command_fn,
 };
@@ -607,7 +609,7 @@ flow_report_init (vlib_main_t * vm)
   return 0;
 }
 
-VLIB_INIT_FUNCTION (flow_report_init)
+VLIB_INIT_FUNCTION (flow_report_init);
 /*
  * fd.io coding-style-patch-verification: ON
  *