diff --git a/src/vnet.am b/src/vnet.am
index 660efcf..c751c10 100644
--- a/src/vnet.am
+++ b/src/vnet.am
@@ -707,12 +707,16 @@
 # IPFIX / netflow v10
 ########################################
 libvnet_la_SOURCES +=				\
- vnet/flow/flow_report.c
+ vnet/flow/flow_report.c			\
+ vnet/flow/flow_api.c
 
 nobase_include_HEADERS +=			\
  vnet/flow/flow_report.h			\
  vnet/flow/ipfix_info_elements.h		\
- vnet/flow/ipfix_packet.h
+ vnet/flow/ipfix_packet.h			\
+ vnet/flow/flow.api.h
+
+API_FILES += vnet/flow/flow.api
 
 ########################################
 # IPFIX classify code
diff --git a/src/vnet/flow/flow.api b/src/vnet/flow/flow.api
new file mode 100644
index 0000000..0e0f99b
--- /dev/null
+++ b/src/vnet/flow/flow.api
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2015-2016 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/** \brief Configure IPFIX exporter process request
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param collector_address - address of IPFIX collector
+    @param collector_port - port of IPFIX collector
+    @param src_address - address of IPFIX exporter
+    @param vrf_id - VRF / fib table ID
+    @param path_mtu - Path MTU between exporter and collector
+    @param template_interval - number of seconds after which to resend template
+    @param udp_checksum - UDP checksum calculation enable flag
+*/
+define set_ipfix_exporter
+{
+  u32 client_index;
+  u32 context;
+  u8 collector_address[16];
+  u16 collector_port;
+  u8 src_address[16];
+  u32 vrf_id;
+  u32 path_mtu;
+  u32 template_interval;
+  u8 udp_checksum;
+};
+
+/** \brief Reply to IPFIX exporter configure request
+    @param context - sender context which was passed in the request
+*/
+define set_ipfix_exporter_reply
+{
+  u32 context;
+  i32 retval;
+};
+
+/** \brief IPFIX exporter dump request
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+*/
+define ipfix_exporter_dump
+{
+  u32 client_index;
+  u32 context;
+};
+
+/** \brief Reply to IPFIX exporter dump request
+    @param context - sender context which was passed in the request
+    @param collector_address - address of IPFIX collector
+    @param collector_port - port of IPFIX collector
+    @param src_address - address of IPFIX exporter
+    @param fib_index - fib table index
+    @param path_mtu - Path MTU between exporter and collector
+    @param template_interval - number of seconds after which to resend template
+    @param udp_checksum - UDP checksum calculation enable flag
+*/
+define ipfix_exporter_details
+{
+  u32 context;
+  u8 collector_address[16];
+  u16 collector_port;
+  u8 src_address[16];
+  u32 vrf_id;
+  u32 path_mtu;
+  u32 template_interval;
+  u8 udp_checksum;
+};
+
+/** \brief IPFIX classify stream configure request
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param domain_id - domain ID reported in IPFIX messages for classify stream
+    @param src_port - source port of UDP session for classify stream
+*/
+define set_ipfix_classify_stream {
+    u32 client_index;
+    u32 context;
+    u32 domain_id;
+    u16 src_port;
+};
+
+/** \brief IPFIX classify stream configure response
+    @param context - sender context, to match reply w/ request
+    @param retval - return value for request
+*/
+define set_ipfix_classify_stream_reply {
+    u32 context;
+    i32 retval;
+};
+
+/** \brief IPFIX classify stream dump request
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+*/
+define ipfix_classify_stream_dump {
+    u32 client_index;
+    u32 context;
+};
+
+/** \brief Reply to IPFIX classify stream dump request
+    @param context - sender context, to match reply w/ request
+    @param domain_id - domain ID reported in IPFIX messages for classify stream
+    @param src_port - source port of UDP session for classify stream
+*/
+define ipfix_classify_stream_details {
+    u32 context;
+    u32 domain_id;
+    u16 src_port;
+};
+
+/** \brief IPFIX add or delete classifier table request
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param table_id - classifier table ID
+    @param ip_version - version of IP used in the classifier table
+    @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
+*/
+define ipfix_classify_table_add_del {
+    u32 client_index;
+    u32 context;
+    u32 table_id;
+    u8 ip_version;
+    u8 transport_protocol;
+    u8 is_add;
+};
+
+/** \brief IPFIX add classifier table response
+    @param context - sender context which was passed in the request
+*/
+define ipfix_classify_table_add_del_reply {
+    u32 context;
+    i32 retval;
+};
+
+/** \brief IPFIX classify tables dump request
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+*/
+define ipfix_classify_table_dump {
+    u32 client_index;
+    u32 context;
+};
+
+/** \brief Reply to IPFIX classify tables dump request
+    @param context - sender context, to match reply w/ request
+    @param table_id - classifier table ID
+    @param ip_version - version of IP used in the classifier table
+    @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
+*/
+define ipfix_classify_table_details {
+    u32 context;
+    u32 table_id;
+    u8 ip_version;
+    u8 transport_protocol;
+};
+
+/*
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */
diff --git a/src/vnet/flow/flow_api.c b/src/vnet/flow/flow_api.c
new file mode 100644
index 0000000..b975dda
--- /dev/null
+++ b/src/vnet/flow/flow_api.c
@@ -0,0 +1,397 @@
+/*
+ *------------------------------------------------------------------
+ * flow_api.c - flow api
+ *
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#include <vnet/vnet.h>
+#include <vlibmemory/api.h>
+
+#include <vnet/interface.h>
+#include <vnet/api_errno.h>
+
+#include <vnet/fib/fib_table.h>
+#include <vnet/flow/flow_report.h>
+#include <vnet/flow/flow_report_classify.h>
+
+#include <vnet/vnet_msg_enum.h>
+
+#define vl_typedefs		/* define message structures */
+#include <vnet/vnet_all_api_h.h>
+#undef vl_typedefs
+
+#define vl_endianfun		/* define message structures */
+#include <vnet/vnet_all_api_h.h>
+#undef vl_endianfun
+
+/* instantiate all the print functions we know about */
+#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
+#define vl_printfun
+#include <vnet/vnet_all_api_h.h>
+#undef vl_printfun
+
+#include <vlibapi/api_helper_macros.h>
+
+#define foreach_vpe_api_msg                                             \
+_(SET_IPFIX_EXPORTER, set_ipfix_exporter)                               \
+_(IPFIX_EXPORTER_DUMP, ipfix_exporter_dump)                             \
+_(SET_IPFIX_CLASSIFY_STREAM, set_ipfix_classify_stream)                 \
+_(IPFIX_CLASSIFY_STREAM_DUMP, ipfix_classify_stream_dump)               \
+_(IPFIX_CLASSIFY_TABLE_ADD_DEL, ipfix_classify_table_add_del)           \
+_(IPFIX_CLASSIFY_TABLE_DUMP, ipfix_classify_table_dump)
+
+static void
+vl_api_set_ipfix_exporter_t_handler (vl_api_set_ipfix_exporter_t * mp)
+{
+  vlib_main_t *vm = vlib_get_main ();
+  flow_report_main_t *frm = &flow_report_main;
+  vl_api_set_ipfix_exporter_reply_t *rmp;
+  ip4_address_t collector, src;
+  u16 collector_port = UDP_DST_PORT_ipfix;
+  u32 path_mtu;
+  u32 template_interval;
+  u8 udp_checksum;
+  u32 fib_id;
+  u32 fib_index = ~0;
+  int rv = 0;
+
+  memcpy (collector.data, mp->collector_address, sizeof (collector.data));
+  collector_port = ntohs (mp->collector_port);
+  if (collector_port == (u16) ~ 0)
+    collector_port = UDP_DST_PORT_ipfix;
+  memcpy (src.data, mp->src_address, sizeof (src.data));
+  fib_id = ntohl (mp->vrf_id);
+
+  ip4_main_t *im = &ip4_main;
+  if (fib_id == ~0)
+    {
+      fib_index = ~0;
+    }
+  else
+    {
+      uword *p = hash_get (im->fib_index_by_table_id, fib_id);
+      if (!p)
+	{
+	  rv = VNET_API_ERROR_NO_SUCH_FIB;
+	  goto out;
+	}
+      fib_index = p[0];
+    }
+
+  path_mtu = ntohl (mp->path_mtu);
+  if (path_mtu == ~0)
+    path_mtu = 512;		// RFC 7011 section 10.3.3.
+  template_interval = ntohl (mp->template_interval);
+  if (template_interval == ~0)
+    template_interval = 20;
+  udp_checksum = mp->udp_checksum;
+
+  if (collector.as_u32 == 0)
+    {
+      rv = VNET_API_ERROR_INVALID_VALUE;
+      goto out;
+    }
+
+  if (src.as_u32 == 0)
+    {
+      rv = VNET_API_ERROR_INVALID_VALUE;
+      goto out;
+    }
+
+  if (path_mtu > 1450 /* vpp does not support fragmentation */ )
+    {
+      rv = VNET_API_ERROR_INVALID_VALUE;
+      goto out;
+    }
+
+  if (path_mtu < 68)
+    {
+      rv = VNET_API_ERROR_INVALID_VALUE;
+      goto out;
+    }
+
+  /* Reset report streams if we are reconfiguring IP addresses */
+  if (frm->ipfix_collector.as_u32 != collector.as_u32 ||
+      frm->src_address.as_u32 != src.as_u32 ||
+      frm->collector_port != collector_port)
+    vnet_flow_reports_reset (frm);
+
+  frm->ipfix_collector.as_u32 = collector.as_u32;
+  frm->collector_port = collector_port;
+  frm->src_address.as_u32 = src.as_u32;
+  frm->fib_index = fib_index;
+  frm->path_mtu = path_mtu;
+  frm->template_interval = template_interval;
+  frm->udp_checksum = udp_checksum;
+
+  /* Turn on the flow reporting process */
+  vlib_process_signal_event (vm, flow_report_process_node.index, 1, 0);
+
+out:
+  REPLY_MACRO (VL_API_SET_IPFIX_EXPORTER_REPLY);
+}
+
+static void
+vl_api_ipfix_exporter_dump_t_handler (vl_api_ipfix_exporter_dump_t * mp)
+{
+  flow_report_main_t *frm = &flow_report_main;
+  unix_shared_memory_queue_t *q;
+  vl_api_ipfix_exporter_details_t *rmp;
+  ip4_main_t *im = &ip4_main;
+  u32 vrf_id;
+
+  q = vl_api_client_index_to_input_queue (mp->client_index);
+  if (!q)
+    return;
+
+  rmp = vl_msg_api_alloc (sizeof (*rmp));
+  memset (rmp, 0, sizeof (*rmp));
+  rmp->_vl_msg_id = ntohs (VL_API_IPFIX_EXPORTER_DETAILS);
+  rmp->context = mp->context;
+  memcpy (rmp->collector_address, frm->ipfix_collector.data,
+	  sizeof (frm->ipfix_collector.data));
+  rmp->collector_port = htons (frm->collector_port);
+  memcpy (rmp->src_address, frm->src_address.data,
+	  sizeof (frm->src_address.data));
+  if (frm->fib_index == ~0)
+    vrf_id = ~0;
+  else
+    vrf_id = im->fibs[frm->fib_index].ft_table_id;
+  rmp->vrf_id = htonl (vrf_id);
+  rmp->path_mtu = htonl (frm->path_mtu);
+  rmp->template_interval = htonl (frm->template_interval);
+  rmp->udp_checksum = (frm->udp_checksum != 0);
+
+  vl_msg_api_send_shmem (q, (u8 *) & rmp);
+}
+
+static void
+  vl_api_set_ipfix_classify_stream_t_handler
+  (vl_api_set_ipfix_classify_stream_t * mp)
+{
+  vl_api_set_ipfix_classify_stream_reply_t *rmp;
+  flow_report_classify_main_t *fcm = &flow_report_classify_main;
+  flow_report_main_t *frm = &flow_report_main;
+  u32 domain_id = 0;
+  u32 src_port = UDP_DST_PORT_ipfix;
+  int rv = 0;
+
+  domain_id = ntohl (mp->domain_id);
+  src_port = ntohs (mp->src_port);
+
+  if (fcm->src_port != 0 &&
+      (fcm->domain_id != domain_id || fcm->src_port != (u16) src_port))
+    {
+      int rv = vnet_stream_change (frm, fcm->domain_id, fcm->src_port,
+				   domain_id, (u16) src_port);
+      ASSERT (rv == 0);
+    }
+
+  fcm->domain_id = domain_id;
+  fcm->src_port = (u16) src_port;
+
+  REPLY_MACRO (VL_API_SET_IPFIX_CLASSIFY_STREAM_REPLY);
+}
+
+static void
+  vl_api_ipfix_classify_stream_dump_t_handler
+  (vl_api_ipfix_classify_stream_dump_t * mp)
+{
+  flow_report_classify_main_t *fcm = &flow_report_classify_main;
+  unix_shared_memory_queue_t *q;
+  vl_api_ipfix_classify_stream_details_t *rmp;
+
+  q = vl_api_client_index_to_input_queue (mp->client_index);
+  if (!q)
+    return;
+
+  rmp = vl_msg_api_alloc (sizeof (*rmp));
+  memset (rmp, 0, sizeof (*rmp));
+  rmp->_vl_msg_id = ntohs (VL_API_IPFIX_CLASSIFY_STREAM_DETAILS);
+  rmp->context = mp->context;
+  rmp->domain_id = htonl (fcm->domain_id);
+  rmp->src_port = htons (fcm->src_port);
+
+  vl_msg_api_send_shmem (q, (u8 *) & rmp);
+}
+
+static void
+  vl_api_ipfix_classify_table_add_del_t_handler
+  (vl_api_ipfix_classify_table_add_del_t * mp)
+{
+  vl_api_ipfix_classify_table_add_del_reply_t *rmp;
+  flow_report_classify_main_t *fcm = &flow_report_classify_main;
+  flow_report_main_t *frm = &flow_report_main;
+  vnet_flow_report_add_del_args_t args;
+  ipfix_classify_table_t *table;
+  int is_add;
+  u32 classify_table_index;
+  u8 ip_version;
+  u8 transport_protocol;
+  int rv = 0;
+
+  classify_table_index = ntohl (mp->table_id);
+  ip_version = mp->ip_version;
+  transport_protocol = mp->transport_protocol;
+  is_add = mp->is_add;
+
+  if (fcm->src_port == 0)
+    {
+      /* call set_ipfix_classify_stream first */
+      rv = VNET_API_ERROR_UNSPECIFIED;
+      goto out;
+    }
+
+  memset (&args, 0, sizeof (args));
+
+  table = 0;
+  int i;
+  for (i = 0; i < vec_len (fcm->tables); i++)
+    if (ipfix_classify_table_index_valid (i))
+      if (fcm->tables[i].classify_table_index == classify_table_index)
+	{
+	  table = &fcm->tables[i];
+	  break;
+	}
+
+  if (is_add)
+    {
+      if (table)
+	{
+	  rv = VNET_API_ERROR_VALUE_EXIST;
+	  goto out;
+	}
+      table = ipfix_classify_add_table ();
+      table->classify_table_index = classify_table_index;
+    }
+  else
+    {
+      if (!table)
+	{
+	  rv = VNET_API_ERROR_NO_SUCH_ENTRY;
+	  goto out;
+	}
+    }
+
+  table->ip_version = ip_version;
+  table->transport_protocol = transport_protocol;
+
+  args.opaque.as_uword = table - fcm->tables;
+  args.rewrite_callback = ipfix_classify_template_rewrite;
+  args.flow_data_callback = ipfix_classify_send_flows;
+  args.is_add = is_add;
+  args.domain_id = fcm->domain_id;
+  args.src_port = fcm->src_port;
+
+  rv = vnet_flow_report_add_del (frm, &args);
+
+  /* If deleting, or add failed */
+  if (is_add == 0 || (rv && is_add))
+    ipfix_classify_delete_table (table - fcm->tables);
+
+out:
+  REPLY_MACRO (VL_API_SET_IPFIX_CLASSIFY_STREAM_REPLY);
+}
+
+static void
+send_ipfix_classify_table_details (u32 table_index,
+				   unix_shared_memory_queue_t * q,
+				   u32 context)
+{
+  flow_report_classify_main_t *fcm = &flow_report_classify_main;
+  vl_api_ipfix_classify_table_details_t *mp;
+
+  ipfix_classify_table_t *table = &fcm->tables[table_index];
+
+  mp = vl_msg_api_alloc (sizeof (*mp));
+  memset (mp, 0, sizeof (*mp));
+  mp->_vl_msg_id = ntohs (VL_API_IPFIX_CLASSIFY_TABLE_DETAILS);
+  mp->context = context;
+  mp->table_id = htonl (table->classify_table_index);
+  mp->ip_version = table->ip_version;
+  mp->transport_protocol = table->transport_protocol;
+
+  vl_msg_api_send_shmem (q, (u8 *) & mp);
+}
+
+static void
+  vl_api_ipfix_classify_table_dump_t_handler
+  (vl_api_ipfix_classify_table_dump_t * mp)
+{
+  flow_report_classify_main_t *fcm = &flow_report_classify_main;
+  unix_shared_memory_queue_t *q;
+  u32 i;
+
+  q = vl_api_client_index_to_input_queue (mp->client_index);
+  if (!q)
+    return;
+
+  for (i = 0; i < vec_len (fcm->tables); i++)
+    if (ipfix_classify_table_index_valid (i))
+      send_ipfix_classify_table_details (i, q, mp->context);
+}
+
+/*
+ * flow_api_hookup
+ * Add vpe's API message handlers to the table.
+ * vlib has alread mapped shared memory and
+ * added the client registration handlers.
+ * See .../vlib-api/vlibmemory/memclnt_vlib.c:memclnt_process()
+ */
+#define vl_msg_name_crc_list
+#include <vnet/vnet_all_api_h.h>
+#undef vl_msg_name_crc_list
+
+static void
+setup_message_id_table (api_main_t * am)
+{
+#define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id);
+  foreach_vl_msg_name_crc_flow;
+#undef _
+}
+
+static clib_error_t *
+flow_api_hookup (vlib_main_t * vm)
+{
+  api_main_t *am = &api_main;
+
+#define _(N,n)                                                  \
+    vl_msg_api_set_handlers(VL_API_##N, #n,                     \
+                           vl_api_##n##_t_handler,              \
+                           vl_noop_handler,                     \
+                           vl_api_##n##_t_endian,               \
+                           vl_api_##n##_t_print,                \
+                           sizeof(vl_api_##n##_t), 1);
+  foreach_vpe_api_msg;
+#undef _
+
+  /*
+   * Set up the (msg_name, crc, message-id) table
+   */
+  setup_message_id_table (am);
+
+  return 0;
+}
+
+VLIB_API_INIT_FUNCTION (flow_api_hookup);
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */
diff --git a/src/vnet/vnet_all_api_h.h b/src/vnet/vnet_all_api_h.h
index c778965..d76eee5 100644
--- a/src/vnet/vnet_all_api_h.h
+++ b/src/vnet/vnet_all_api_h.h
@@ -53,6 +53,7 @@
 #include <vnet/mpls/mpls.api.h>
 #include <vnet/sr/sr.api.h>
 #include <vnet/classify/classify.api.h>
+#include <vnet/flow/flow.api.h>
 
 /*
  * fd.io coding-style-patch-verification: ON
diff --git a/src/vpp/api/api.c b/src/vpp/api/api.c
index 6e7e9c1..9f6f260 100644
--- a/src/vpp/api/api.c
+++ b/src/vpp/api/api.c
@@ -72,8 +72,6 @@
 #include <vnet/ip/ip6_hop_by_hop.h>
 #include <vnet/ip/ip_source_and_port_range_check.h>
 #include <vnet/policer/policer.h>
-#include <vnet/flow/flow_report.h>
-#include <vnet/flow/flow_report_classify.h>
 #include <vnet/ip/punt.h>
 #include <vnet/feature/feature.h>
 
@@ -160,12 +158,6 @@
 _(IOAM_DISABLE, ioam_disable)                                           \
 _(POLICER_ADD_DEL, policer_add_del)                                     \
 _(POLICER_DUMP, policer_dump)                                           \
-_(SET_IPFIX_EXPORTER, set_ipfix_exporter)                               \
-_(IPFIX_EXPORTER_DUMP, ipfix_exporter_dump)                             \
-_(SET_IPFIX_CLASSIFY_STREAM, set_ipfix_classify_stream)                 \
-_(IPFIX_CLASSIFY_STREAM_DUMP, ipfix_classify_stream_dump)               \
-_(IPFIX_CLASSIFY_TABLE_ADD_DEL, ipfix_classify_table_add_del)           \
-_(IPFIX_CLASSIFY_TABLE_DUMP, ipfix_classify_table_dump)                 \
 _(GET_NEXT_INDEX, get_next_index)                                       \
 _(PG_CREATE_INTERFACE, pg_create_interface)                             \
 _(PG_CAPTURE, pg_capture)                                               \
@@ -2423,297 +2415,6 @@
 
 
 static void
-vl_api_set_ipfix_exporter_t_handler (vl_api_set_ipfix_exporter_t * mp)
-{
-  vlib_main_t *vm = vlib_get_main ();
-  flow_report_main_t *frm = &flow_report_main;
-  vl_api_set_ipfix_exporter_reply_t *rmp;
-  ip4_address_t collector, src;
-  u16 collector_port = UDP_DST_PORT_ipfix;
-  u32 path_mtu;
-  u32 template_interval;
-  u8 udp_checksum;
-  u32 fib_id;
-  u32 fib_index = ~0;
-  int rv = 0;
-
-  memcpy (collector.data, mp->collector_address, sizeof (collector.data));
-  collector_port = ntohs (mp->collector_port);
-  if (collector_port == (u16) ~ 0)
-    collector_port = UDP_DST_PORT_ipfix;
-  memcpy (src.data, mp->src_address, sizeof (src.data));
-  fib_id = ntohl (mp->vrf_id);
-
-  ip4_main_t *im = &ip4_main;
-  if (fib_id == ~0)
-    {
-      fib_index = ~0;
-    }
-  else
-    {
-      uword *p = hash_get (im->fib_index_by_table_id, fib_id);
-      if (!p)
-	{
-	  rv = VNET_API_ERROR_NO_SUCH_FIB;
-	  goto out;
-	}
-      fib_index = p[0];
-    }
-
-  path_mtu = ntohl (mp->path_mtu);
-  if (path_mtu == ~0)
-    path_mtu = 512;		// RFC 7011 section 10.3.3.
-  template_interval = ntohl (mp->template_interval);
-  if (template_interval == ~0)
-    template_interval = 20;
-  udp_checksum = mp->udp_checksum;
-
-  if (collector.as_u32 == 0)
-    {
-      rv = VNET_API_ERROR_INVALID_VALUE;
-      goto out;
-    }
-
-  if (src.as_u32 == 0)
-    {
-      rv = VNET_API_ERROR_INVALID_VALUE;
-      goto out;
-    }
-
-  if (path_mtu > 1450 /* vpp does not support fragmentation */ )
-    {
-      rv = VNET_API_ERROR_INVALID_VALUE;
-      goto out;
-    }
-
-  if (path_mtu < 68)
-    {
-      rv = VNET_API_ERROR_INVALID_VALUE;
-      goto out;
-    }
-
-  /* Reset report streams if we are reconfiguring IP addresses */
-  if (frm->ipfix_collector.as_u32 != collector.as_u32 ||
-      frm->src_address.as_u32 != src.as_u32 ||
-      frm->collector_port != collector_port)
-    vnet_flow_reports_reset (frm);
-
-  frm->ipfix_collector.as_u32 = collector.as_u32;
-  frm->collector_port = collector_port;
-  frm->src_address.as_u32 = src.as_u32;
-  frm->fib_index = fib_index;
-  frm->path_mtu = path_mtu;
-  frm->template_interval = template_interval;
-  frm->udp_checksum = udp_checksum;
-
-  /* Turn on the flow reporting process */
-  vlib_process_signal_event (vm, flow_report_process_node.index, 1, 0);
-
-out:
-  REPLY_MACRO (VL_API_SET_IPFIX_EXPORTER_REPLY);
-}
-
-static void
-vl_api_ipfix_exporter_dump_t_handler (vl_api_ipfix_exporter_dump_t * mp)
-{
-  flow_report_main_t *frm = &flow_report_main;
-  unix_shared_memory_queue_t *q;
-  vl_api_ipfix_exporter_details_t *rmp;
-  ip4_main_t *im = &ip4_main;
-  u32 vrf_id;
-
-  q = vl_api_client_index_to_input_queue (mp->client_index);
-  if (!q)
-    return;
-
-  rmp = vl_msg_api_alloc (sizeof (*rmp));
-  memset (rmp, 0, sizeof (*rmp));
-  rmp->_vl_msg_id = ntohs (VL_API_IPFIX_EXPORTER_DETAILS);
-  rmp->context = mp->context;
-  memcpy (rmp->collector_address, frm->ipfix_collector.data,
-	  sizeof (frm->ipfix_collector.data));
-  rmp->collector_port = htons (frm->collector_port);
-  memcpy (rmp->src_address, frm->src_address.data,
-	  sizeof (frm->src_address.data));
-  if (frm->fib_index == ~0)
-    vrf_id = ~0;
-  else
-    vrf_id = im->fibs[frm->fib_index].ft_table_id;
-  rmp->vrf_id = htonl (vrf_id);
-  rmp->path_mtu = htonl (frm->path_mtu);
-  rmp->template_interval = htonl (frm->template_interval);
-  rmp->udp_checksum = (frm->udp_checksum != 0);
-
-  vl_msg_api_send_shmem (q, (u8 *) & rmp);
-}
-
-static void
-  vl_api_set_ipfix_classify_stream_t_handler
-  (vl_api_set_ipfix_classify_stream_t * mp)
-{
-  vl_api_set_ipfix_classify_stream_reply_t *rmp;
-  flow_report_classify_main_t *fcm = &flow_report_classify_main;
-  flow_report_main_t *frm = &flow_report_main;
-  u32 domain_id = 0;
-  u32 src_port = UDP_DST_PORT_ipfix;
-  int rv = 0;
-
-  domain_id = ntohl (mp->domain_id);
-  src_port = ntohs (mp->src_port);
-
-  if (fcm->src_port != 0 &&
-      (fcm->domain_id != domain_id || fcm->src_port != (u16) src_port))
-    {
-      int rv = vnet_stream_change (frm, fcm->domain_id, fcm->src_port,
-				   domain_id, (u16) src_port);
-      ASSERT (rv == 0);
-    }
-
-  fcm->domain_id = domain_id;
-  fcm->src_port = (u16) src_port;
-
-  REPLY_MACRO (VL_API_SET_IPFIX_CLASSIFY_STREAM_REPLY);
-}
-
-static void
-  vl_api_ipfix_classify_stream_dump_t_handler
-  (vl_api_ipfix_classify_stream_dump_t * mp)
-{
-  flow_report_classify_main_t *fcm = &flow_report_classify_main;
-  unix_shared_memory_queue_t *q;
-  vl_api_ipfix_classify_stream_details_t *rmp;
-
-  q = vl_api_client_index_to_input_queue (mp->client_index);
-  if (!q)
-    return;
-
-  rmp = vl_msg_api_alloc (sizeof (*rmp));
-  memset (rmp, 0, sizeof (*rmp));
-  rmp->_vl_msg_id = ntohs (VL_API_IPFIX_CLASSIFY_STREAM_DETAILS);
-  rmp->context = mp->context;
-  rmp->domain_id = htonl (fcm->domain_id);
-  rmp->src_port = htons (fcm->src_port);
-
-  vl_msg_api_send_shmem (q, (u8 *) & rmp);
-}
-
-static void
-  vl_api_ipfix_classify_table_add_del_t_handler
-  (vl_api_ipfix_classify_table_add_del_t * mp)
-{
-  vl_api_ipfix_classify_table_add_del_reply_t *rmp;
-  flow_report_classify_main_t *fcm = &flow_report_classify_main;
-  flow_report_main_t *frm = &flow_report_main;
-  vnet_flow_report_add_del_args_t args;
-  ipfix_classify_table_t *table;
-  int is_add;
-  u32 classify_table_index;
-  u8 ip_version;
-  u8 transport_protocol;
-  int rv = 0;
-
-  classify_table_index = ntohl (mp->table_id);
-  ip_version = mp->ip_version;
-  transport_protocol = mp->transport_protocol;
-  is_add = mp->is_add;
-
-  if (fcm->src_port == 0)
-    {
-      /* call set_ipfix_classify_stream first */
-      rv = VNET_API_ERROR_UNSPECIFIED;
-      goto out;
-    }
-
-  memset (&args, 0, sizeof (args));
-
-  table = 0;
-  int i;
-  for (i = 0; i < vec_len (fcm->tables); i++)
-    if (ipfix_classify_table_index_valid (i))
-      if (fcm->tables[i].classify_table_index == classify_table_index)
-	{
-	  table = &fcm->tables[i];
-	  break;
-	}
-
-  if (is_add)
-    {
-      if (table)
-	{
-	  rv = VNET_API_ERROR_VALUE_EXIST;
-	  goto out;
-	}
-      table = ipfix_classify_add_table ();
-      table->classify_table_index = classify_table_index;
-    }
-  else
-    {
-      if (!table)
-	{
-	  rv = VNET_API_ERROR_NO_SUCH_ENTRY;
-	  goto out;
-	}
-    }
-
-  table->ip_version = ip_version;
-  table->transport_protocol = transport_protocol;
-
-  args.opaque.as_uword = table - fcm->tables;
-  args.rewrite_callback = ipfix_classify_template_rewrite;
-  args.flow_data_callback = ipfix_classify_send_flows;
-  args.is_add = is_add;
-  args.domain_id = fcm->domain_id;
-  args.src_port = fcm->src_port;
-
-  rv = vnet_flow_report_add_del (frm, &args);
-
-  /* If deleting, or add failed */
-  if (is_add == 0 || (rv && is_add))
-    ipfix_classify_delete_table (table - fcm->tables);
-
-out:
-  REPLY_MACRO (VL_API_SET_IPFIX_CLASSIFY_STREAM_REPLY);
-}
-
-static void
-send_ipfix_classify_table_details (u32 table_index,
-				   unix_shared_memory_queue_t * q,
-				   u32 context)
-{
-  flow_report_classify_main_t *fcm = &flow_report_classify_main;
-  vl_api_ipfix_classify_table_details_t *mp;
-
-  ipfix_classify_table_t *table = &fcm->tables[table_index];
-
-  mp = vl_msg_api_alloc (sizeof (*mp));
-  memset (mp, 0, sizeof (*mp));
-  mp->_vl_msg_id = ntohs (VL_API_IPFIX_CLASSIFY_TABLE_DETAILS);
-  mp->context = context;
-  mp->table_id = htonl (table->classify_table_index);
-  mp->ip_version = table->ip_version;
-  mp->transport_protocol = table->transport_protocol;
-
-  vl_msg_api_send_shmem (q, (u8 *) & mp);
-}
-
-static void
-  vl_api_ipfix_classify_table_dump_t_handler
-  (vl_api_ipfix_classify_table_dump_t * mp)
-{
-  flow_report_classify_main_t *fcm = &flow_report_classify_main;
-  unix_shared_memory_queue_t *q;
-  u32 i;
-
-  q = vl_api_client_index_to_input_queue (mp->client_index);
-  if (!q)
-    return;
-
-  for (i = 0; i < vec_len (fcm->tables); i++)
-    if (ipfix_classify_table_index_valid (i))
-      send_ipfix_classify_table_details (i, q, mp->context);
-}
-
-static void
 vl_api_pg_create_interface_t_handler (vl_api_pg_create_interface_t * mp)
 {
   vl_api_pg_create_interface_reply_t *rmp;
diff --git a/src/vpp/api/vpe.api b/src/vpp/api/vpe.api
index a9b34d1..f32ba67 100644
--- a/src/vpp/api/vpe.api
+++ b/src/vpp/api/vpe.api
@@ -42,6 +42,7 @@
  * SR APIs: see .../src/vnet/sr/{sr.api, sr_api.c}
  * DPDK APIs: see ... /src/vnet/devices/dpdk/{dpdk.api, dpdk_api.c}
  * CLASSIFY APIs: see ... /src/vnet/classify/{classify.api, classify_api.c}
+ * FLOW APIs: see ... /src/vnet/flow/{flow.api, flow_api.c}
  */
 
 /** \brief Create a new subinterface with the given vlan id
@@ -1389,159 +1390,6 @@
   u64 last_update_time;
 };
 
-/** \brief Configure IPFIX exporter process request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param collector_address - address of IPFIX collector
-    @param collector_port - port of IPFIX collector
-    @param src_address - address of IPFIX exporter
-    @param vrf_id - VRF / fib table ID
-    @param path_mtu - Path MTU between exporter and collector
-    @param template_interval - number of seconds after which to resend template
-    @param udp_checksum - UDP checksum calculation enable flag
-*/
-define set_ipfix_exporter
-{
-  u32 client_index;
-  u32 context;
-  u8 collector_address[16];
-  u16 collector_port;
-  u8 src_address[16];
-  u32 vrf_id;
-  u32 path_mtu;
-  u32 template_interval;
-  u8 udp_checksum;
-};
-
-/** \brief Reply to IPFIX exporter configure request
-    @param context - sender context which was passed in the request
-*/
-define set_ipfix_exporter_reply
-{
-  u32 context;
-  i32 retval;
-};
-
-/** \brief IPFIX exporter dump request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-*/
-define ipfix_exporter_dump
-{
-  u32 client_index;
-  u32 context;
-};
-
-/** \brief Reply to IPFIX exporter dump request
-    @param context - sender context which was passed in the request
-    @param collector_address - address of IPFIX collector
-    @param collector_port - port of IPFIX collector
-    @param src_address - address of IPFIX exporter
-    @param fib_index - fib table index
-    @param path_mtu - Path MTU between exporter and collector
-    @param template_interval - number of seconds after which to resend template
-    @param udp_checksum - UDP checksum calculation enable flag
-*/
-define ipfix_exporter_details
-{
-  u32 context;
-  u8 collector_address[16];
-  u16 collector_port;
-  u8 src_address[16];
-  u32 vrf_id;
-  u32 path_mtu;
-  u32 template_interval;
-  u8 udp_checksum;
-};
-
-/** \brief IPFIX classify stream configure request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param domain_id - domain ID reported in IPFIX messages for classify stream
-    @param src_port - source port of UDP session for classify stream
-*/
-define set_ipfix_classify_stream {
-    u32 client_index;
-    u32 context;
-    u32 domain_id;
-    u16 src_port;
-};
-
-/** \brief IPFIX classify stream configure response
-    @param context - sender context, to match reply w/ request
-    @param retval - return value for request
-*/
-define set_ipfix_classify_stream_reply {
-    u32 context;
-    i32 retval;
-};
-
-/** \brief IPFIX classify stream dump request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-*/
-define ipfix_classify_stream_dump {
-    u32 client_index;
-    u32 context;
-};
-
-/** \brief Reply to IPFIX classify stream dump request
-    @param context - sender context, to match reply w/ request
-    @param domain_id - domain ID reported in IPFIX messages for classify stream
-    @param src_port - source port of UDP session for classify stream
-*/
-define ipfix_classify_stream_details {
-    u32 context;
-    u32 domain_id;
-    u16 src_port;
-};
-
-/** \brief IPFIX add or delete classifier table request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param table_id - classifier table ID
-    @param ip_version - version of IP used in the classifier table
-    @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
-*/
-define ipfix_classify_table_add_del {
-    u32 client_index;
-    u32 context;
-    u32 table_id;
-    u8 ip_version;
-    u8 transport_protocol;
-    u8 is_add;
-};
-
-/** \brief IPFIX add classifier table response
-    @param context - sender context which was passed in the request
-*/
-define ipfix_classify_table_add_del_reply {
-    u32 context;
-    i32 retval;
-};
-
-/** \brief IPFIX classify tables dump request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-*/
-define ipfix_classify_table_dump {
-    u32 client_index;
-    u32 context;
-};
-
-/** \brief Reply to IPFIX classify tables dump request
-    @param context - sender context, to match reply w/ request
-    @param table_id - classifier table ID
-    @param ip_version - version of IP used in the classifier table
-    @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
-*/
-define ipfix_classify_table_details {
-    u32 context;
-    u32 table_id;
-    u8 ip_version;
-    u8 transport_protocol;
-};
-
 /** \brief Query relative index via node names
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
