span: add tx functionality and support for multiple mirror ports
[vpp.git] / vpp / vpp-api / custom_dump.c
index db5ea64..82195f6 100644 (file)
@@ -2,7 +2,7 @@
  *------------------------------------------------------------------
  * custom_dump.c - pretty-print API messages for replay
  *
- * Copyright (c) 2014 Cisco and/or its affiliates.
+ * Copyright (c) 2014-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:
@@ -20,7 +20,7 @@
 #include <vnet/vnet.h>
 #include <vnet/ip/ip.h>
 #include <vnet/unix/tuntap.h>
-#include <vnet/mpls-gre/mpls.h>
+#include <vnet/mpls/mpls.h>
 #include <vnet/dhcp/proxy.h>
 #include <vnet/dhcpv6/proxy.h>
 #include <vnet/l2tp/l2tp.h>
 #include <vnet/classify/policer_classify.h>
 #include <vnet/policer/xlate.h>
 #include <vnet/policer/policer.h>
+#include <vnet/classify/flow_classify.h>
 #include <vlib/vlib.h>
 #include <vlib/unix/unix.h>
 #include <vlibapi/api.h>
 #include <vlibmemory/api.h>
+#include <vnet/lisp-cp/lisp_types.h>
 
 #include <stats/stats.h>
 #include <oam/oam.h>
@@ -145,6 +147,21 @@ static void *vl_api_sw_interface_set_table_t_print
   FINISH;
 }
 
+static void *vl_api_sw_interface_set_mpls_enable_t_print
+  (vl_api_sw_interface_set_mpls_enable_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: sw_interface_set_mpls_enable ");
+
+  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+
+  if (mp->enable == 0)
+    s = format (s, "disable");
+
+  FINISH;
+}
+
 static void *vl_api_sw_interface_set_vpath_t_print
   (vl_api_sw_interface_set_vpath_t * mp, void *handle)
 {
@@ -155,9 +172,29 @@ static void *vl_api_sw_interface_set_vpath_t_print
   s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
 
   if (mp->enable)
-    s = format (s, "vPath enable ");
+    s = format (s, "enable ");
+  else
+    s = format (s, "disable ");
+
+  FINISH;
+}
+
+static void *vl_api_sw_interface_set_vxlan_bypass_t_print
+  (vl_api_sw_interface_set_vxlan_bypass_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: sw_interface_set_vxlan_bypass ");
+
+  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+
+  if (mp->is_ipv6)
+    s = format (s, "ip6");
+
+  if (mp->enable)
+    s = format (s, "enable ");
   else
-    s = format (s, "vPath disable ");
+    s = format (s, "disable ");
 
   FINISH;
 }
@@ -201,6 +238,56 @@ static void *vl_api_sw_interface_set_l2_bridge_t_print
   FINISH;
 }
 
+static void *vl_api_sw_interface_set_dpdk_hqos_pipe_t_print
+  (vl_api_sw_interface_set_dpdk_hqos_pipe_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: sw_interface_set_dpdk_hqos_pipe ");
+
+  s = format (s, "sw_if_index %u ", ntohl (mp->sw_if_index));
+
+  s = format (s, "subport %u  pipe %u  profile %u ",
+             ntohl (mp->subport), ntohl (mp->pipe), ntohl (mp->profile));
+
+  FINISH;
+}
+
+static void *vl_api_sw_interface_set_dpdk_hqos_subport_t_print
+  (vl_api_sw_interface_set_dpdk_hqos_subport_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: sw_interface_set_dpdk_hqos_subport ");
+
+  s = format (s, "sw_if_index %u ", ntohl (mp->sw_if_index));
+
+  s =
+    format (s,
+           "subport %u  rate %u  bkt_size %u  tc0 %u tc1 %u tc2 %u tc3 %u period %u",
+           ntohl (mp->subport), ntohl (mp->tb_rate), ntohl (mp->tb_size),
+           ntohl (mp->tc_rate[0]), ntohl (mp->tc_rate[1]),
+           ntohl (mp->tc_rate[2]), ntohl (mp->tc_rate[3]),
+           ntohl (mp->tc_period));
+
+  FINISH;
+}
+
+static void *vl_api_sw_interface_set_dpdk_hqos_tctbl_t_print
+  (vl_api_sw_interface_set_dpdk_hqos_tctbl_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: sw_interface_set_dpdk_hqos_tctbl ");
+
+  s = format (s, "sw_if_index %u ", ntohl (mp->sw_if_index));
+
+  s = format (s, "entry %u  tc %u  queue %u",
+             ntohl (mp->entry), ntohl (mp->tc), ntohl (mp->queue));
+
+  FINISH;
+}
+
 static void *vl_api_bridge_domain_add_del_t_print
   (vl_api_bridge_domain_add_del_t * mp, void *handle)
 {
@@ -345,7 +432,8 @@ static void *vl_api_tap_connect_t_print
   s = format (s, "tapname %s ", mp->tap_name);
   if (mp->use_random_mac)
     s = format (s, "random-mac ");
-
+  if (mp->tag[0])
+    s = format (s, "tag %s ", mp->tag);
   if (memcmp (mp->mac_address, null_mac, 6))
     s = format (s, "mac %U ", format_ethernet_address, mp->mac_address);
 
@@ -426,15 +514,12 @@ static void *vl_api_ip_add_del_route_t_print
        s = format (s, "via %U ", format_ip4_address, mp->next_hop_address);
     }
 
-  if (mp->vrf_id != 0)
-    s = format (s, "vrf %d ", ntohl (mp->vrf_id));
+  if (mp->table_id != 0)
+    s = format (s, "vrf %d ", ntohl (mp->table_id));
 
   if (mp->create_vrf_if_needed)
     s = format (s, "create-vrf ");
 
-  if (mp->resolve_attempts != 0)
-    s = format (s, "resolve-attempts %d ", ntohl (mp->resolve_attempts));
-
   if (mp->next_hop_weight != 1)
     s = format (s, "weight %d ", mp->next_hop_weight);
 
@@ -447,8 +532,8 @@ static void *vl_api_ip_add_del_route_t_print
   if (mp->is_multipath)
     s = format (s, "multipath ");
 
-  if (mp->lookup_in_vrf)
-    s = format (s, "lookup-in-vrf %d ", ntohl (mp->lookup_in_vrf));
+  if (mp->next_hop_table_id)
+    s = format (s, "lookup-in-vrf %d ", ntohl (mp->next_hop_table_id));
 
   FINISH;
 }
@@ -486,128 +571,25 @@ static void *vl_api_proxy_arp_intfc_enable_disable_t_print
   FINISH;
 }
 
-static void *vl_api_mpls_add_del_decap_t_print
-  (vl_api_mpls_add_del_decap_t * mp, void *handle)
-{
-  u8 *s;
-
-  s = format (0, "SCRIPT: mpls_add_del_decap ");
-
-  s = format (s, "rx_vrf_id %d ", ntohl (mp->rx_vrf_id));
-
-  s = format (s, "tx_vrf_id %d ", ntohl (mp->tx_vrf_id));
-
-  s = format (s, "label %d ", ntohl (mp->label));
-
-  s = format (s, "next-index %d ", ntohl (mp->next_index));
-
-  if (mp->s_bit == 0)
-    s = format (s, "s-bit-clear ");
-
-  if (mp->is_add == 0)
-    s = format (s, "del ");
-
-  FINISH;
-}
-
-static void *vl_api_mpls_add_del_encap_t_print
-  (vl_api_mpls_add_del_encap_t * mp, void *handle)
-{
-  u8 *s;
-  int i;
-
-  s = format (0, "SCRIPT: mpls_add_del_encap ");
-
-  s = format (s, "vrf_id %d ", ntohl (mp->vrf_id));
-
-  s = format (s, "dst %U ", format_ip4_address, mp->dst_address);
-
-  for (i = 0; i < mp->nlabels; i++)
-    s = format (s, "label %d ", ntohl (mp->labels[i]));
-
-  if (mp->is_add == 0)
-    s = format (s, "del ");
-
-  FINISH;
-}
-
-static void *vl_api_mpls_gre_add_del_tunnel_t_print
-  (vl_api_mpls_gre_add_del_tunnel_t * mp, void *handle)
-{
-  u8 *s;
-
-  s = format (0, "SCRIPT: mpls_gre_add_del_tunnel ");
-
-  s = format (s, "src %U ", format_ip4_address, mp->src_address);
-
-  s = format (s, "dst %U ", format_ip4_address, mp->dst_address);
-
-  s = format (s, "adj %U/%d ", format_ip4_address,
-             (ip4_address_t *) mp->intfc_address, mp->intfc_address_length);
-
-  s = format (s, "inner-vrf_id %d ", ntohl (mp->inner_vrf_id));
-
-  s = format (s, "outer-vrf_id %d ", ntohl (mp->outer_vrf_id));
-
-  if (mp->is_add == 0)
-    s = format (s, "del ");
-
-  if (mp->l2_only)
-    s = format (s, "l2-only ");
-
-  FINISH;
-}
-
-static void *vl_api_mpls_ethernet_add_del_tunnel_t_print
-  (vl_api_mpls_ethernet_add_del_tunnel_t * mp, void *handle)
-{
-  u8 *s;
-
-  s = format (0, "SCRIPT: mpls_ethernet_add_del_tunnel ");
-
-  s = format (s, "tx_sw_if_index %d ", ntohl (mp->tx_sw_if_index));
-
-  s = format (s, "dst %U", format_ethernet_address, mp->dst_mac_address);
-
-  s = format (s, "adj %U/%d ", format_ip4_address,
-             (ip4_address_t *) mp->adj_address, mp->adj_address_length);
-
-  s = format (s, "vrf_id %d ", ntohl (mp->vrf_id));
-
-  if (mp->l2_only)
-    s = format (s, "l2-only ");
-
-  if (mp->is_add == 0)
-    s = format (s, "del ");
-
-  FINISH;
-}
-
-static void *vl_api_mpls_ethernet_add_del_tunnel_2_t_print
-  (vl_api_mpls_ethernet_add_del_tunnel_2_t * mp, void *handle)
+static void *vl_api_mpls_tunnel_add_del_t_print
+  (vl_api_mpls_tunnel_add_del_t * mp, void *handle)
 {
   u8 *s;
 
-  s = format (0, "SCRIPT: mpls_ethernet_add_del_tunnel_2 ");
-
-  s = format (s, "adj %U/%d ", format_ip4_address,
-             (ip4_address_t *) mp->adj_address, mp->adj_address_length);
-
-  s = format (s, "next-hop %U ", format_ip4_address,
-             (ip4_address_t *) mp->next_hop_ip4_address_in_outer_vrf);
+  s = format (0, "SCRIPT: mpls_tunnel_add_del ");
 
-  s = format (s, "inner_vrf_id %d ", ntohl (mp->inner_vrf_id));
+  if (mp->mt_next_hop_sw_if_index)
+    s = format (s, "sw_if_index %d ", ntohl (mp->mt_next_hop_sw_if_index));
 
-  s = format (s, "outer_vrf_id %d ", ntohl (mp->outer_vrf_id));
-
-  s = format (s, "resolve-if-needed %d ", mp->resolve_if_needed);
-
-  s = format (s, "resolve-attempts %d ", ntohl (mp->resolve_attempts));
+  if (mp->mt_next_hop_proto_is_ip4)
+    s = format (s, "%U ", format_ip4_address, mp->mt_next_hop);
+  else
+    s = format (s, "%U ", format_ip6_address, mp->mt_next_hop);
 
-  if (mp->l2_only)
+  if (mp->mt_l2_only)
     s = format (s, "l2-only ");
 
-  if (mp->is_add == 0)
+  if (mp->mt_is_add == 0)
     s = format (s, "del ");
 
   FINISH;
@@ -728,6 +710,16 @@ static void *vl_api_create_subif_t_print
   foreach_create_subif_bit;
 #undef _
 
+  FINISH;
+}
+
+static void *vl_api_delete_subif_t_print
+  (vl_api_delete_subif_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: delete_subif ");
+  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
 
   FINISH;
 }
@@ -1197,6 +1189,10 @@ static void *vl_api_classify_add_del_table_t_print
       s = format (s, "match %d ", ntohl (mp->match_n_vectors));
       s = format (s, "next-table %d ", ntohl (mp->next_table_index));
       s = format (s, "miss-next %d ", ntohl (mp->miss_next_index));
+      s = format (s, "current-data-flag %d ", ntohl (mp->current_data_flag));
+      if (mp->current_data_flag)
+       s = format (s, "current-data-offset %d ",
+                   ntohl (mp->current_data_offset));
       s = format (s, "mask hex ");
       for (i = 0; i < ntohl (mp->match_n_vectors) * sizeof (u32x4); i++)
        s = format (s, "%02x", mp->mask[i]);
@@ -1218,6 +1214,9 @@ static void *vl_api_classify_add_del_session_t_print
   s = format (s, "hit_next_index %d ", ntohl (mp->hit_next_index));
   s = format (s, "opaque_index %d ", ntohl (mp->opaque_index));
   s = format (s, "advance %d ", ntohl (mp->advance));
+  s = format (s, "action %d ", mp->action);
+  if (mp->action)
+    s = format (s, "metadata %d ", ntohl (mp->metadata));
   if (mp->is_add == 0)
     s = format (s, "del ");
 
@@ -1264,6 +1263,7 @@ static void *vl_api_classify_set_interface_l2_tables_t_print
   s = format (s, "ip4-table %d ", ntohl (mp->ip4_table_index));
   s = format (s, "ip6-table %d ", ntohl (mp->ip6_table_index));
   s = format (s, "other-table %d ", ntohl (mp->other_table_index));
+  s = format (s, "is-input %d ", mp->is_input);
 
   FINISH;
 }
@@ -1377,23 +1377,22 @@ static void *vl_api_vxlan_add_del_tunnel_t_print
   (vl_api_vxlan_add_del_tunnel_t * mp, void *handle)
 {
   u8 *s;
-
   s = format (0, "SCRIPT: vxlan_add_del_tunnel ");
 
-  if (mp->is_ipv6)
-    {
-      s = format (s, "src %U ", format_ip6_address,
-                 (ip6_address_t *) mp->src_address);
-      s = format (s, "dst %U ", format_ip6_address,
-                 (ip6_address_t *) mp->dst_address);
-    }
-  else
-    {
-      s = format (s, "src %U ", format_ip4_address,
-                 (ip4_address_t *) mp->src_address);
-      s = format (s, "dst %U ", format_ip4_address,
-                 (ip4_address_t *) mp->dst_address);
-    }
+  ip46_address_t src, dst;
+
+  ip46_from_addr_buf (mp->is_ipv6, mp->dst_address, &dst);
+  ip46_from_addr_buf (mp->is_ipv6, mp->src_address, &src);
+
+  u8 is_grp = ip46_address_is_multicast (&dst);
+  char *dst_name = is_grp ? "group" : "dst";
+
+  s = format (s, "src %U ", format_ip46_address, &src, IP46_TYPE_ANY);
+  s = format (s, "%s %U ", dst_name, format_ip46_address,
+             &dst, IP46_TYPE_ANY);
+
+  if (is_grp)
+    s = format (s, "mcast_sw_if_index %d ", ntohl (mp->mcast_sw_if_index));
 
   if (mp->encap_vrf_id)
     s = format (s, "encap-vrf-id %d ", ntohl (mp->encap_vrf_id));
@@ -1402,6 +1401,9 @@ static void *vl_api_vxlan_add_del_tunnel_t_print
 
   s = format (s, "vni %d ", ntohl (mp->vni));
 
+  if (mp->is_add == 0)
+    s = format (s, "del ");
+
   if (mp->is_add == 0)
     s = format (s, "del ");
 
@@ -1435,6 +1437,9 @@ static void *vl_api_gre_add_del_tunnel_t_print
              (ip46_address_t *) & (mp->src_address),
              mp->is_ipv6 ? IP46_TYPE_IP6 : IP46_TYPE_IP4);
 
+  if (mp->teb)
+    s = format (s, "teb ");
+
   if (mp->outer_fib_id)
     s = format (s, "outer-fib-id %d ", ntohl (mp->outer_fib_id));
 
@@ -1510,6 +1515,8 @@ static void *vl_api_create_vhost_user_if_t_print
     s = format (s, "server ");
   if (mp->renumber)
     s = format (s, "renumber %d ", ntohl (mp->custom_dev_instance));
+  if (mp->tag[0])
+    s = format (s, "tag %s", mp->tag);
 
   FINISH;
 }
@@ -1610,6 +1617,16 @@ static void *vl_api_cli_request_t_print
   FINISH;
 }
 
+static void *vl_api_cli_inband_t_print
+  (vl_api_cli_inband_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: cli_inband ");
+
+  FINISH;
+}
+
 static void *vl_api_memclnt_create_t_print
   (vl_api_memclnt_create_t * mp, void *handle)
 {
@@ -1698,6 +1715,20 @@ static void *vl_api_want_ip4_arp_events_t_print
   FINISH;
 }
 
+static void *vl_api_want_ip6_nd_events_t_print
+  (vl_api_want_ip6_nd_events_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: want_ip6_nd_events ");
+  s = format (s, "pid %d address %U ", mp->pid,
+             format_ip6_address, mp->address);
+  if (mp->enable_disable == 0)
+    s = format (s, "del ");
+
+  FINISH;
+}
+
 static void *vl_api_input_acl_set_interface_t_print
   (vl_api_input_acl_set_interface_t * mp, void *handle)
 {
@@ -1968,46 +1999,44 @@ static void *vl_api_sw_interface_clear_stats_t_print
   FINISH;
 }
 
-static void *vl_api_mpls_gre_tunnel_dump_t_print
-  (vl_api_mpls_gre_tunnel_dump_t * mp, void *handle)
+static void *vl_api_mpls_tunnel_dump_t_print
+  (vl_api_mpls_tunnel_dump_t * mp, void *handle)
 {
   u8 *s;
 
-  s = format (0, "SCRIPT: mpls_gre_tunnel_dump ");
+  s = format (0, "SCRIPT: mpls_tunnel_dump ");
 
   s = format (s, "tunnel_index %d ", ntohl (mp->tunnel_index));
 
   FINISH;
 }
 
-static void *vl_api_mpls_eth_tunnel_dump_t_print
-  (vl_api_mpls_eth_tunnel_dump_t * mp, void *handle)
+static void *vl_api_mpls_fib_dump_t_print
+  (vl_api_mpls_fib_dump_t * mp, void *handle)
 {
   u8 *s;
 
-  s = format (0, "SCRIPT: mpls_eth_tunnel_dump ");
-
-  s = format (s, "tunnel_index %d ", ntohl (mp->tunnel_index));
+  s = format (0, "SCRIPT: mpls_fib_decap_dump ");
 
   FINISH;
 }
 
-static void *vl_api_mpls_fib_encap_dump_t_print
-  (vl_api_mpls_fib_encap_dump_t * mp, void *handle)
+static void *vl_api_ip_fib_dump_t_print
+  (vl_api_ip_fib_dump_t * mp, void *handle)
 {
   u8 *s;
 
-  s = format (0, "SCRIPT: mpls_fib_encap_dump ");
+  s = format (0, "SCRIPT: ip_fib_dump ");
 
   FINISH;
 }
 
-static void *vl_api_mpls_fib_decap_dump_t_print
-  (vl_api_mpls_fib_decap_dump_t * mp, void *handle)
+static void *vl_api_ip6_fib_dump_t_print
+  (vl_api_ip6_fib_dump_t * mp, void *handle)
 {
   u8 *s;
 
-  s = format (0, "SCRIPT: mpls_fib_decap_dump ");
+  s = format (0, "SCRIPT: ip6_fib_dump ");
 
   FINISH;
 }
@@ -2058,12 +2087,12 @@ static void *vl_api_classify_session_dump_t_print
   FINISH;
 }
 
-static void *vl_api_ipfix_enable_t_print
-  (vl_api_ipfix_enable_t * mp, void *handle)
+static void *vl_api_set_ipfix_exporter_t_print
+  (vl_api_set_ipfix_exporter_t * mp, void *handle)
 {
   u8 *s;
 
-  s = format (0, "SCRIPT: ipfix_enable ");
+  s = format (0, "SCRIPT: set_ipfix_exporter ");
 
   s = format (s, "collector-address %U ", format_ip4_address,
              (ip4_address_t *) mp->collector_address);
@@ -2073,16 +2102,104 @@ static void *vl_api_ipfix_enable_t_print
   s = format (s, "vrf-id %d ", ntohl (mp->vrf_id));
   s = format (s, "path-mtu %d ", ntohl (mp->path_mtu));
   s = format (s, "template-interval %d ", ntohl (mp->template_interval));
+  s = format (s, "udp-checksum %d ", mp->udp_checksum);
+
+  FINISH;
+}
+
+static void *vl_api_ipfix_exporter_dump_t_print
+  (vl_api_ipfix_exporter_dump_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: ipfix_exporter_dump ");
+
+  FINISH;
+}
+
+static void *vl_api_set_ipfix_classify_stream_t_print
+  (vl_api_set_ipfix_classify_stream_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: set_ipfix_classify_stream ");
+
+  s = format (s, "domain-id %d ", ntohl (mp->domain_id));
+  s = format (s, "src-port %d ", ntohs (mp->src_port));
+
+  FINISH;
+}
+
+static void *vl_api_ipfix_classify_stream_dump_t_print
+  (vl_api_ipfix_classify_stream_dump_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: ipfix_classify_stream_dump ");
+
+  FINISH;
+}
+
+static void *vl_api_ipfix_classify_table_add_del_t_print
+  (vl_api_ipfix_classify_table_add_del_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: ipfix_classify_table_add_del ");
+
+  s = format (s, "table-id %d ", ntohl (mp->table_id));
+  s = format (s, "ip-version %d ", mp->ip_version);
+  s = format (s, "transport-protocol %d ", mp->transport_protocol);
+
+  FINISH;
+}
+
+static void *vl_api_ipfix_classify_table_dump_t_print
+  (vl_api_ipfix_classify_table_dump_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: ipfix_classify_table_dump ");
+
+  FINISH;
+}
+
+static void *vl_api_sw_interface_span_enable_disable_t_print
+  (vl_api_sw_interface_span_enable_disable_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: sw_interface_span_enable_disable ");
+  s = format (s, "src_sw_if_index %u ", ntohl (mp->sw_if_index_from));
+  s = format (s, "dst_sw_if_index %u ", ntohl (mp->sw_if_index_to));
+
+  switch (mp->state)
+    {
+    case 0:
+      s = format (s, "disable ");
+      break;
+    case 1:
+      s = format (s, "rx ");
+      break;
+    case 2:
+      s = format (s, "tx ");
+      break;
+    case 3:
+    default:
+      s = format (s, "both ");
+      break;
+    }
 
   FINISH;
 }
 
-static void *vl_api_ipfix_dump_t_print
-  (vl_api_ipfix_dump_t * mp, void *handle)
+static void *
+vl_api_sw_interface_span_dump_t_print (vl_api_sw_interface_span_dump_t * mp,
+                                      void *handle)
 {
   u8 *s;
 
-  s = format (0, "SCRIPT: ipfix_dump ");
+  s = format (0, "SCRIPT: sw_interface_span_dump ");
 
   FINISH;
 }
@@ -2254,24 +2371,6 @@ format_lisp_flat_eid (u8 * s, va_list * args)
   return 0;
 }
 
-static u8 *
-format_lisp_eid_vat (u8 * s, va_list * args)
-{
-  u32 type = va_arg (*args, u32);
-  u8 *eid = va_arg (*args, u8 *);
-  u32 eid_len = va_arg (*args, u32);
-  u8 *seid = va_arg (*args, u8 *);
-  u32 seid_len = va_arg (*args, u32);
-  u32 is_src_dst = va_arg (*args, u32);
-
-  if (is_src_dst)
-    s = format (s, "%U|", format_lisp_flat_eid, type, seid, seid_len);
-
-  s = format (s, "%U", format_lisp_flat_eid, type, eid, eid_len);
-
-  return s;
-}
-
 /** Used for transferring locators via VPP API */
 typedef CLIB_PACKED (struct
                     {
@@ -2314,11 +2413,16 @@ static void *vl_api_lisp_add_del_remote_mapping_t_print
   s = format (s, "%s ", mp->is_add ? "add" : "del");
   s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni));
 
-  s = format (s, "deid %U ", format_lisp_eid_vat,
-             mp->eid_type, mp->eid, mp->eid_len, mp->seid, mp->seid_len,
-             mp->is_src_dst);
+  s = format (s, "eid %U ", format_lisp_flat_eid,
+             mp->eid_type, mp->eid, mp->eid_len);
+
+  if (mp->is_src_dst)
+    {
+      s = format (s, "seid %U ", format_lisp_flat_eid,
+                 mp->eid_type, mp->seid, mp->seid_len);
+    }
 
-  rloc_num = mp->rloc_num;
+  rloc_num = clib_net_to_host_u32 (mp->rloc_num);
 
   if (0 == rloc_num)
     s = format (s, "action %d", mp->action);
@@ -2341,9 +2445,9 @@ static void *vl_api_lisp_add_del_adjacency_t_print
 
   s = format (s, "%s ", mp->is_add ? "add" : "del");
   s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni));
-  s = format (s, "deid %U seid %U ",
-             format_lisp_flat_eid, mp->eid_type, mp->deid, mp->deid_len,
-             format_lisp_flat_eid, mp->eid_type, mp->seid, mp->seid_len);
+  s = format (s, "reid %U leid %U ",
+             format_lisp_flat_eid, mp->eid_type, mp->reid, mp->reid_len,
+             format_lisp_flat_eid, mp->eid_type, mp->leid, mp->leid_len);
 
   FINISH;
 }
@@ -2394,6 +2498,12 @@ static void *vl_api_lisp_add_del_local_eid_t_print
   s = format (s, "eid %U ", format_lisp_flat_eid, mp->eid_type, mp->eid,
              mp->prefix_len);
   s = format (s, "locator-set %s ", mp->locator_set_name);
+  if (*mp->key)
+    {
+      u32 key_id = mp->key_id;
+      s = format (s, "key-id %U", format_hmac_key_id, key_id);
+      s = format (s, "secret-key %s", mp->key);
+    }
   FINISH;
 }
 
@@ -2470,7 +2580,7 @@ static void *vl_api_lisp_add_del_locator_set_t_print
 
   s = format (s, "locator-set %s ", mp->locator_set_name);
 
-  loc_num = mp->locator_num;
+  loc_num = clib_net_to_host_u32 (mp->locator_num);
   locs = (ls_locator_t *) mp->locators;
 
   for (i = 0; i < loc_num; i++)
@@ -2502,8 +2612,45 @@ static void *vl_api_lisp_locator_set_dump_t_print
   u8 *s;
 
   s = format (0, "SCRIPT: lisp_locator_set_dump ");
+  if (mp->filter == 1)
+    s = format (s, "local");
+  else if (mp->filter == 2)
+    s = format (s, "remote");
+
+  FINISH;
+}
+
+static void *vl_api_lisp_locator_dump_t_print
+  (vl_api_lisp_locator_dump_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: lisp_locator_dump ");
+  if (mp->is_index_set)
+    s = format (s, "ls_index %d", clib_net_to_host_u32 (mp->ls_index));
+  else
+    s = format (s, "ls_name %s", mp->ls_name);
+
+  FINISH;
+}
 
-  /* not possible to reconstruct original VAT command */
+static void *vl_api_lisp_map_request_mode_t_print
+  (vl_api_lisp_map_request_mode_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: lisp_map_request_mode ");
+
+  switch (mp->mode)
+    {
+    case 0:
+      s = format (s, "dst-only");
+      break;
+    case 1:
+      s = format (s, "src-dst");
+    default:
+      break;
+    }
 
   FINISH;
 }
@@ -2534,6 +2681,60 @@ static void *vl_api_lisp_eid_table_dump_t_print
   FINISH;
 }
 
+static void *vl_api_lisp_rloc_probe_enable_disable_t_print
+  (vl_api_lisp_rloc_probe_enable_disable_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: lisp_rloc_probe_enable_disable ");
+  if (mp->is_enabled)
+    s = format (s, "enable");
+  else
+    s = format (s, "disable");
+
+  FINISH;
+}
+
+static void *vl_api_lisp_map_register_enable_disable_t_print
+  (vl_api_lisp_map_register_enable_disable_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: lisp_map_register_enable_disable ");
+  if (mp->is_enabled)
+    s = format (s, "enable");
+  else
+    s = format (s, "disable");
+
+  FINISH;
+}
+
+static void *vl_api_lisp_adjacencies_get_t_print
+  (vl_api_lisp_adjacencies_get_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: lisp_adjacencies_get ");
+  s = format (s, "vni %d", clib_net_to_host_u32 (mp->vni));
+
+  FINISH;
+}
+
+static void *vl_api_lisp_eid_table_map_dump_t_print
+  (vl_api_lisp_eid_table_map_dump_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: lisp_eid_table_map_dump ");
+
+  if (mp->is_l2)
+    s = format (s, "l2");
+  else
+    s = format (s, "l3");
+
+  FINISH;
+}
+
 static void *vl_api_ipsec_gre_add_del_tunnel_t_print
   (vl_api_ipsec_gre_add_del_tunnel_t * mp, void *handle)
 {
@@ -2570,9 +2771,183 @@ static void *vl_api_ipsec_gre_tunnel_dump_t_print
   FINISH;
 }
 
+static void *vl_api_l2_interface_pbb_tag_rewrite_t_print
+  (vl_api_l2_interface_pbb_tag_rewrite_t * mp, void *handle)
+{
+  u8 *s;
+  u32 vtr_op = ntohl (mp->vtr_op);
+
+  s = format (0, "SCRIPT: l2_interface_pbb_tag_rewrite ");
+
+  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+  s = format (s, "vtr_op %d ", vtr_op);
+  if (vtr_op != L2_VTR_DISABLED && vtr_op != L2_VTR_POP_2)
+    {
+      if (vtr_op == L2_VTR_TRANSLATE_2_2)
+       s = format (s, "%d ", ntohs (mp->outer_tag));
+      s = format (s, "dmac %U ", format_ethernet_address, &mp->b_dmac);
+      s = format (s, "smac %U ", format_ethernet_address, &mp->b_smac);
+      s = format (s, "sid %d ", ntohl (mp->i_sid));
+      s = format (s, "vlanid %d ", ntohs (mp->b_vlanid));
+    }
+
+  FINISH;
+}
+
+static void *vl_api_flow_classify_set_interface_t_print
+  (vl_api_flow_classify_set_interface_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: flow_classify_set_interface ");
+  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+  if (mp->ip4_table_index != ~0)
+    s = format (s, "ip4-table %d ", ntohl (mp->ip4_table_index));
+  if (mp->ip6_table_index != ~0)
+    s = format (s, "ip6-table %d ", ntohl (mp->ip6_table_index));
+  if (mp->is_add == 0)
+    s = format (s, "del ");
+
+  FINISH;
+}
+
+static void *
+vl_api_punt_t_print (vl_api_punt_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: punt ");
+
+  if (mp->ipv != (u8) ~ 0)
+    s = format (s, "ip %d ", mp->ipv);
+
+  s = format (s, "protocol %d ", mp->l4_protocol);
+
+  if (mp->l4_port != (u16) ~ 0)
+    s = format (s, "port %d ", ntohs (mp->l4_port));
+
+  if (!mp->is_add)
+    s = format (s, "del ");
+
+  FINISH;
+}
+
+static void *vl_api_flow_classify_dump_t_print
+  (vl_api_flow_classify_dump_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: flow_classify_dump ");
+  switch (mp->type)
+    {
+    case FLOW_CLASSIFY_TABLE_IP4:
+      s = format (s, "type ip4 ");
+      break;
+    case FLOW_CLASSIFY_TABLE_IP6:
+      s = format (s, "type ip6 ");
+      break;
+    default:
+      break;
+    }
+
+  FINISH;
+}
+
+static void *vl_api_get_first_msg_id_t_print
+  (vl_api_get_first_msg_id_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: get_first_msg_id %s ", mp->name);
+
+  FINISH;
+}
+
+static void *vl_api_ioam_enable_t_print
+  (vl_api_ioam_enable_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: ioam_enable ");
+
+  if (mp->trace_enable)
+    s = format (s, "trace enabled");
+
+  if (mp->pot_enable)
+    s = format (s, "POT enabled");
+
+  if (mp->seqno)
+    s = format (s, "Seqno enabled");
+
+  if (mp->analyse)
+    s = format (s, "Analyse enabled");
+
+  FINISH;
+}
+
+static void *vl_api_ioam_disable_t_print
+  (vl_api_ioam_disable_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: ioam_disable ");
+  s = format (s, "trace disabled");
+  s = format (s, "POT disabled");
+  s = format (s, "Seqno disabled");
+  s = format (s, "Analyse disabled");
+
+  FINISH;
+}
+
+static void *vl_api_feature_enable_disable_t_print
+  (vl_api_feature_enable_disable_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: feature_enable_disable ");
+  s = format (s, "arc_name %s ", mp->arc_name);
+  s = format (s, "feature_name %s ", mp->feature_name);
+  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+  if (!mp->enable)
+    s = format (s, "disable");
+
+  FINISH;
+}
+
+static void *vl_api_sw_interface_tag_add_del_t_print
+  (vl_api_sw_interface_tag_add_del_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: sw_interface_tag_add_del ");
+  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+  if (mp->is_add)
+    s = format (s, "tag %s ", mp->tag);
+  else
+    s = format (s, "del ");
+
+  FINISH;
+}
+
+static void *vl_api_sw_interface_set_mtu_t_print
+  (vl_api_sw_interface_set_mtu_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: sw_interface_set_mtu ");
+  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+  s = format (s, "tag %d ", ntohs (mp->mtu));
+
+  FINISH;
+}
+
 #define foreach_custom_print_no_arg_function                            \
-_(lisp_eid_table_map_dump)                                              \
+_(lisp_eid_table_vni_dump)                                              \
 _(lisp_map_resolver_dump)                                               \
+_(lisp_map_server_dump)                                                 \
+_(show_lisp_rloc_probe_state)                                           \
+_(show_lisp_map_register_state)                                         \
+_(show_lisp_map_request_mode)                                           \
 _(lisp_gpe_tunnel_dump)
 
 #define _(f)                                                            \
@@ -2590,7 +2965,9 @@ _(CREATE_LOOPBACK, create_loopback)                                     \
 _(SW_INTERFACE_SET_FLAGS, sw_interface_set_flags)                       \
 _(SW_INTERFACE_ADD_DEL_ADDRESS, sw_interface_add_del_address)           \
 _(SW_INTERFACE_SET_TABLE, sw_interface_set_table)                       \
+_(SW_INTERFACE_SET_MPLS_ENABLE, sw_interface_set_mpls_enable)           \
 _(SW_INTERFACE_SET_VPATH, sw_interface_set_vpath)                       \
+_(SW_INTERFACE_SET_VXLAN_BYPASS, sw_interface_set_vxlan_bypass)         \
 _(TAP_CONNECT, tap_connect)                                             \
 _(TAP_MODIFY, tap_modify)                                               \
 _(TAP_DELETE, tap_delete)                                               \
@@ -2598,11 +2975,7 @@ _(SW_INTERFACE_TAP_DUMP, sw_interface_tap_dump)                         \
 _(IP_ADD_DEL_ROUTE, ip_add_del_route)                                   \
 _(PROXY_ARP_ADD_DEL, proxy_arp_add_del)                                 \
 _(PROXY_ARP_INTFC_ENABLE_DISABLE, proxy_arp_intfc_enable_disable)       \
-_(MPLS_ADD_DEL_DECAP, mpls_add_del_decap)                               \
-_(MPLS_ADD_DEL_ENCAP, mpls_add_del_encap)                               \
-_(MPLS_GRE_ADD_DEL_TUNNEL, mpls_gre_add_del_tunnel)                     \
-_(MPLS_ETHERNET_ADD_DEL_TUNNEL, mpls_ethernet_add_del_tunnel)          \
-_(MPLS_ETHERNET_ADD_DEL_TUNNEL_2, mpls_ethernet_add_del_tunnel_2)      \
+_(MPLS_TUNNEL_ADD_DEL, mpls_tunnel_add_del)                            \
 _(SW_INTERFACE_SET_UNNUMBERED, sw_interface_set_unnumbered)             \
 _(IP_NEIGHBOR_ADD_DEL, ip_neighbor_add_del)                             \
 _(RESET_VRF, reset_vrf)                                                 \
@@ -2629,6 +3002,9 @@ _(BRIDGE_FLAGS, bridge_flags)                                           \
 _(CLASSIFY_ADD_DEL_TABLE, classify_add_del_table)                      \
 _(CLASSIFY_ADD_DEL_SESSION, classify_add_del_session)                  \
 _(SW_INTERFACE_SET_L2_BRIDGE, sw_interface_set_l2_bridge)              \
+_(SW_INTERFACE_SET_DPDK_HQOS_PIPE, sw_interface_set_dpdk_hqos_pipe)     \
+_(SW_INTERFACE_SET_DPDK_HQOS_SUBPORT, sw_interface_set_dpdk_hqos_subport)\
+_(SW_INTERFACE_SET_DPDK_HQOS_TCTBL, sw_interface_set_dpdk_hqos_tctbl)   \
 _(BRIDGE_DOMAIN_ADD_DEL, bridge_domain_add_del)                         \
 _(BRIDGE_DOMAIN_DUMP, bridge_domain_dump)                               \
 _(CLASSIFY_SET_INTERFACE_IP_TABLE, classify_set_interface_ip_table)    \
@@ -2655,6 +3031,7 @@ _(SW_INTERFACE_DUMP, sw_interface_dump)                                   \
 _(CONTROL_PING, control_ping)                                          \
 _(WANT_INTERFACE_EVENTS, want_interface_events)                                \
 _(CLI_REQUEST, cli_request)                                            \
+_(CLI_INBAND, cli_inband)                                              \
 _(MEMCLNT_CREATE, memclnt_create)                                      \
 _(SW_INTERFACE_VHOST_USER_DUMP, sw_interface_vhost_user_dump)           \
 _(SHOW_VERSION, show_version)                                           \
@@ -2663,6 +3040,7 @@ _(VXLAN_GPE_ADD_DEL_TUNNEL, vxlan_gpe_add_del_tunnel)                     \
 _(VXLAN_GPE_TUNNEL_DUMP, vxlan_gpe_tunnel_dump)                         \
 _(INTERFACE_NAME_RENUMBER, interface_name_renumber)                    \
 _(WANT_IP4_ARP_EVENTS, want_ip4_arp_events)                             \
+_(WANT_IP6_ND_EVENTS, want_ip6_nd_events)                               \
 _(INPUT_ACL_SET_INTERFACE, input_acl_set_interface)                     \
 _(IP_ADDRESS_DUMP, ip_address_dump)                                     \
 _(IP_DUMP, ip_dump)                                                     \
@@ -2673,16 +3051,20 @@ _(COP_WHITELIST_ENABLE_DISABLE, cop_whitelist_enable_disable)           \
 _(AF_PACKET_CREATE, af_packet_create)                                  \
 _(AF_PACKET_DELETE, af_packet_delete)                                  \
 _(SW_INTERFACE_CLEAR_STATS, sw_interface_clear_stats)                   \
-_(MPLS_GRE_TUNNEL_DUMP, mpls_gre_tunnel_dump)                           \
-_(MPLS_ETH_TUNNEL_DUMP, mpls_eth_tunnel_dump)                           \
-_(MPLS_FIB_ENCAP_DUMP, mpls_fib_encap_dump)                             \
-_(MPLS_FIB_DECAP_DUMP, mpls_fib_decap_dump)                             \
+_(MPLS_FIB_DUMP, mpls_fib_dump)                                         \
+_(MPLS_TUNNEL_DUMP, mpls_tunnel_dump)                                   \
 _(CLASSIFY_TABLE_IDS,classify_table_ids)                                \
 _(CLASSIFY_TABLE_BY_INTERFACE, classify_table_by_interface)             \
 _(CLASSIFY_TABLE_INFO,classify_table_info)                              \
 _(CLASSIFY_SESSION_DUMP,classify_session_dump)                          \
-_(IPFIX_ENABLE,ipfix_enable)                                            \
-_(IPFIX_DUMP,ipfix_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)                 \
+_(SW_INTERFACE_SPAN_ENABLE_DISABLE, sw_interface_span_enable_disable)   \
+_(SW_INTERFACE_SPAN_DUMP, sw_interface_span_dump)                       \
 _(GET_NEXT_INDEX, get_next_index)                                       \
 _(PG_CREATE_INTERFACE,pg_create_interface)                              \
 _(PG_CAPTURE, pg_capture)                                               \
@@ -2699,6 +3081,8 @@ _(LISP_ENABLE_DISABLE, lisp_enable_disable)                             \
 _(LISP_GPE_ENABLE_DISABLE, lisp_gpe_enable_disable)                     \
 _(LISP_GPE_ADD_DEL_IFACE, lisp_gpe_add_del_iface)                       \
 _(LISP_PITR_SET_LOCATOR_SET, lisp_pitr_set_locator_set)                 \
+_(LISP_MAP_REQUEST_MODE, lisp_map_request_mode)                         \
+_(SHOW_LISP_MAP_REQUEST_MODE, show_lisp_map_request_mode)               \
 _(LISP_ADD_DEL_REMOTE_MAPPING, lisp_add_del_remote_mapping)             \
 _(LISP_ADD_DEL_ADJACENCY, lisp_add_del_adjacency)                       \
 _(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS,                                   \
@@ -2711,12 +3095,32 @@ _(LISP_ADD_DEL_MAP_RESOLVER, lisp_add_del_map_resolver)                 \
 _(LISP_ADD_DEL_LOCATOR, lisp_add_del_locator)                           \
 _(LISP_EID_TABLE_DUMP, lisp_eid_table_dump)                             \
 _(LISP_EID_TABLE_MAP_DUMP, lisp_eid_table_map_dump)                     \
+_(LISP_EID_TABLE_VNI_DUMP, lisp_eid_table_vni_dump)                     \
 _(LISP_GPE_TUNNEL_DUMP, lisp_gpe_tunnel_dump)                           \
 _(LISP_MAP_RESOLVER_DUMP, lisp_map_resolver_dump)                       \
+_(LISP_MAP_SERVER_DUMP, lisp_map_server_dump)                           \
 _(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump)                         \
-_(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump)                         \
+_(LISP_LOCATOR_DUMP, lisp_locator_dump)                                 \
+_(LISP_ADJACENCIES_GET, lisp_adjacencies_get)                           \
+_(SHOW_LISP_RLOC_PROBE_STATE, show_lisp_rloc_probe_state)               \
+_(SHOW_LISP_MAP_REGISTER_STATE, show_lisp_map_register_state)           \
+_(LISP_RLOC_PROBE_ENABLE_DISABLE, lisp_rloc_probe_enable_disable)       \
+_(LISP_MAP_REGISTER_ENABLE_DISABLE, lisp_map_register_enable_disable)   \
 _(IPSEC_GRE_ADD_DEL_TUNNEL, ipsec_gre_add_del_tunnel)                   \
-_(IPSEC_GRE_TUNNEL_DUMP, ipsec_gre_tunnel_dump)
+_(IPSEC_GRE_TUNNEL_DUMP, ipsec_gre_tunnel_dump)                         \
+_(DELETE_SUBIF, delete_subif)                                           \
+_(L2_INTERFACE_PBB_TAG_REWRITE, l2_interface_pbb_tag_rewrite)           \
+_(PUNT, punt)                                                           \
+_(FLOW_CLASSIFY_SET_INTERFACE, flow_classify_set_interface)             \
+_(FLOW_CLASSIFY_DUMP, flow_classify_dump)                              \
+_(GET_FIRST_MSG_ID, get_first_msg_id)                                   \
+_(IOAM_ENABLE, ioam_enable)                                             \
+_(IOAM_DISABLE, ioam_disable)                                           \
+_(IP_FIB_DUMP, ip_fib_dump)                                             \
+_(IP6_FIB_DUMP, ip6_fib_dump)                                           \
+_(FEATURE_ENABLE_DISABLE, feature_enable_disable)                      \
+_(SW_INTERFACE_TAG_ADD_DEL, sw_interface_tag_add_del)                  \
+_(SW_INTERFACE_SET_MTU, sw_interface_set_mtu)
   void
 vl_msg_api_custom_dump_configure (api_main_t * am)
 {