api: use string type for strings in memclnt.api
[vpp.git] / src / vpp / api / custom_dump.c
index e9175d6..403d434 100644 (file)
@@ -21,6 +21,7 @@
 #include <vnet/ip/ip.h>
 #include <vnet/ip/ip_neighbor.h>
 #include <vnet/ip/ip_types_api.h>
+#include <vnet/fib/fib_api.h>
 #include <vnet/unix/tuntap.h>
 #include <vnet/mpls/mpls.h>
 #include <vnet/dhcp/dhcp_proxy.h>
@@ -111,7 +112,7 @@ static void *vl_api_sw_interface_set_flags_t_print
 
   s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
 
-  if (mp->admin_up_down)
+  if (ntohl (mp->flags) & IF_STATUS_API_FLAG_ADMIN_UP)
     s = format (s, "admin-up ");
   else
     s = format (s, "admin-down ");
@@ -119,7 +120,8 @@ static void *vl_api_sw_interface_set_flags_t_print
   FINISH;
 }
 
-static void *vl_api_sw_interface_set_rx_placement_t_print
+__clib_unused
+  static void *vl_api_sw_interface_set_rx_placement_t_print
   (vl_api_sw_interface_set_rx_placement_t * mp, void *handle)
 {
   u8 *s;
@@ -158,12 +160,12 @@ static void *vl_api_sw_interface_event_t_print
 
   s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
 
-  if (mp->admin_up_down)
+  if (ntohl (mp->flags) & IF_STATUS_API_FLAG_ADMIN_UP)
     s = format (s, "admin-up ");
   else
     s = format (s, "admin-down ");
 
-  if (mp->link_up_down)
+  if (ntohl (mp->flags) & IF_STATUS_API_FLAG_LINK_UP)
     s = format (s, "link-up");
   else
     s = format (s, "link-down");
@@ -178,17 +180,18 @@ static void *vl_api_sw_interface_add_del_address_t_print
   (vl_api_sw_interface_add_del_address_t * mp, void *handle)
 {
   u8 *s;
+  ip46_address_t address;
 
   s = format (0, "SCRIPT: sw_interface_add_del_address ");
 
   s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
 
-  if (mp->is_ipv6)
+  if (ip_address_decode (&mp->prefix.address, &address) == IP46_TYPE_IP6)
     s = format (s, "%U/%d ", format_ip6_address,
-               (ip6_address_t *) mp->address, mp->address_length);
+               (ip6_address_t *) & address.ip6, mp->prefix.len);
   else
     s = format (s, "%U/%d ", format_ip4_address,
-               (ip4_address_t *) mp->address, mp->address_length);
+               (ip4_address_t *) & address.ip4, mp->prefix.len);
 
   if (mp->is_add == 0)
     s = format (s, "del ");
@@ -507,10 +510,10 @@ static void *vl_api_bd_ip_mac_add_del_t_print
   u8 *s;
 
   s = format (0, "SCRIPT: bd_ip_mac_add_del ");
-  s = format (s, "bd_id %d ", ntohl (mp->bd_id));
+  s = format (s, "bd_id %d ", ntohl (mp->entry.bd_id));
 
-  s = format (s, "%U ", format_vl_api_address, &mp->ip);
-  s = format (s, "%U ", format_vl_api_mac_address, &mp->mac);
+  s = format (s, "%U ", format_vl_api_address, &mp->entry.ip);
+  s = format (s, "%U ", format_vl_api_mac_address, &mp->entry.mac);
   if (mp->is_add == 0)
     s = format (s, "del ");
 
@@ -528,7 +531,8 @@ static void *vl_api_bd_ip_mac_flush_t_print
   FINISH;
 }
 
-static void *vl_api_bd_ip_mac_dump_t_print
+__clib_unused
+  static void *vl_api_bd_ip_mac_dump_t_print
   (vl_api_bd_ip_mac_dump_t * mp, void *handle)
 {
   u8 *s;
@@ -574,6 +578,10 @@ static void *vl_api_tap_create_v2_t_print
     s = format (s, "tx-ring-size %u ", ntohs (mp->tx_ring_sz));
   if (mp->rx_ring_sz)
     s = format (s, "rx-ring-size %u ", ntohs (mp->rx_ring_sz));
+  if (mp->host_mtu_set)
+    s = format (s, "host-mtu-size %u ", ntohl (mp->host_mtu_size));
+  if (ntohl (mp->tap_flags) & 0x1)
+    s = format (s, "gso-enabled");
   FINISH;
 }
 
@@ -598,7 +606,8 @@ static void *vl_api_sw_interface_tap_v2_dump_t_print
   FINISH;
 }
 
-static void *vl_api_virtio_pci_create_t_print
+__clib_unused
+  static void *vl_api_virtio_pci_create_t_print
   (vl_api_virtio_pci_create_t * mp, void *handle)
 {
   u8 *s;
@@ -618,7 +627,8 @@ static void *vl_api_virtio_pci_create_t_print
   FINISH;
 }
 
-static void *vl_api_virtio_pci_delete_t_print
+__clib_unused
+  static void *vl_api_virtio_pci_delete_t_print
   (vl_api_virtio_pci_delete_t * mp, void *handle)
 {
   u8 *s;
@@ -629,7 +639,8 @@ static void *vl_api_virtio_pci_delete_t_print
   FINISH;
 }
 
-static void *vl_api_sw_interface_virtio_pci_dump_t_print
+__clib_unused
+  static void *vl_api_sw_interface_virtio_pci_dump_t_print
   (vl_api_sw_interface_virtio_pci_dump_t * mp, void *handle)
 {
   u8 *s;
@@ -655,6 +666,8 @@ static void *vl_api_bond_create_t_print
     s = format (s, "mode %U ", format_bond_mode, mp->mode);
   if (mp->lb)
     s = format (s, "lb %U ", format_bond_load_balance, mp->lb);
+  if (mp->numa_only)
+    s = format (s, "numa-only is set in lacp mode");
   if (mp->id != ~0)
     s = format (s, "id %u ", ntohl (mp->id));
   FINISH;
@@ -677,8 +690,8 @@ static void *vl_api_bond_enslave_t_print
   u8 *s;
 
   s = format (0, "SCRIPT: bond_enslave ");
-  s = format (s, "bond_sw_if_index %u ", mp->bond_sw_if_index);
-  s = format (s, "sw_if_index %u ", mp->sw_if_index);
+  s = format (s, "bond_sw_if_index %u ", ntohl (mp->bond_sw_if_index));
+  s = format (s, "sw_if_index %u ", ntohl (mp->sw_if_index));
   if (mp->is_passive)
     s = format (s, "passive ");
   if (mp->is_long_timeout)
@@ -719,62 +732,19 @@ static void *vl_api_sw_interface_slave_dump_t_print
   FINISH;
 }
 
-static void *vl_api_ip_add_del_route_t_print
-  (vl_api_ip_add_del_route_t * mp, void *handle)
+static void *vl_api_ip_route_add_del_t_print
+  (vl_api_ip_route_add_del_t * mp, void *handle)
 {
-  u8 *s;
+  u8 *s, p;
 
-  s = format (0, "SCRIPT: ip_add_del_route ");
+  s = format (0, "SCRIPT: ip_route_add_del ");
   if (mp->is_add == 0)
     s = format (s, "del ");
 
-  if (mp->is_ipv6)
-    s = format (s, "%U/%d ", format_ip6_address, mp->dst_address,
-               mp->dst_address_length);
-  else
-    s = format (s, "%U/%d ", format_ip4_address, mp->dst_address,
-               mp->dst_address_length);
-
-  if (mp->table_id != 0)
-    s = format (s, "vrf %d ", ntohl (mp->table_id));
-
-  if (mp->is_local)
-    s = format (s, "local ");
-  else if (mp->is_drop)
-    s = format (s, "drop ");
-  else if (mp->is_classify)
-    s = format (s, "classify %d", ntohl (mp->classify_table_index));
-  else if (mp->next_hop_via_label != htonl (MPLS_LABEL_INVALID))
-    s = format (s, "via via_label %d ", ntohl (mp->next_hop_via_label));
-  else
-    {
-      if (mp->is_ipv6)
-       s = format (s, "via %U ", format_ip6_address, mp->next_hop_address);
-      else
-       s = format (s, "via %U ", format_ip4_address, mp->next_hop_address);
-      if (mp->next_hop_sw_if_index != ~0)
-       s = format (s, "sw_if_index %d ", ntohl (mp->next_hop_sw_if_index));
+  s = format (s, "%U", format_vl_api_prefix, &mp->route.prefix);
 
-    }
-
-  if (mp->next_hop_weight != 1)
-    s = format (s, "weight %d ", (u32) mp->next_hop_weight);
-
-  if (mp->is_multipath)
-    s = format (s, "multipath ");
-
-  if (mp->next_hop_table_id)
-    s = format (s, "lookup-in-vrf %d ", ntohl (mp->next_hop_table_id));
-
-  if (mp->next_hop_n_out_labels)
-    {
-      u8 i;
-      for (i = 0; i < mp->next_hop_n_out_labels; i++)
-       {
-         s = format (s, "out-label %d ",
-                     ntohl (mp->next_hop_out_label_stack[i].label));
-       }
-    }
+  for (p = 0; p < mp->route.n_paths; p++)
+    s = format (s, " [%U]", format_vl_api_fib_path, &mp->route.paths[p]);
 
   FINISH;
 }
@@ -782,7 +752,7 @@ static void *vl_api_ip_add_del_route_t_print
 static void *vl_api_mpls_route_add_del_t_print
   (vl_api_mpls_route_add_del_t * mp, void *handle)
 {
-  u8 *s;
+  u8 *s, p;
 
   s = format (0, "SCRIPT: mpls_route_add_del ");
 
@@ -791,67 +761,21 @@ static void *vl_api_mpls_route_add_del_t_print
   else
     s = format (s, "del ");
 
-  s = format (s, "%d ", ntohl (mp->mr_label));
+  s = format (s, "table %d ", ntohl (mp->mr_route.mr_table_id));
+  s = format (s, "%d ", ntohl (mp->mr_route.mr_label));
 
-  if (mp->mr_eos)
+  if (mp->mr_route.mr_eos)
     s = format (s, "eos ");
   else
     s = format (s, "non-eos ");
 
+  if (mp->mr_route.mr_is_multicast)
+    s = format (s, "multicast ");
 
-  if (mp->mr_next_hop_proto == DPO_PROTO_IP4)
-    {
-      ip4_address_t ip4_null = {.as_u32 = 0, };
-      if (memcmp (mp->mr_next_hop, &ip4_null, sizeof (ip4_null)))
-       s = format (s, "via %U ", format_ip4_address, mp->mr_next_hop);
-      else
-       s = format (s, "via lookup-in-ip4-table %d ",
-                   ntohl (mp->mr_next_hop_table_id));
-    }
-  else if (mp->mr_next_hop_proto == DPO_PROTO_IP6)
-    {
-      ip6_address_t ip6_null = { {0}
-      };
-      if (memcmp (mp->mr_next_hop, &ip6_null, sizeof (ip6_null)))
-       s = format (s, "via %U ", format_ip6_address, mp->mr_next_hop);
-      else
-       s = format (s, "via lookup-in-ip6-table %d ",
-                   ntohl (mp->mr_next_hop_table_id));
-    }
-  else if (mp->mr_next_hop_proto == DPO_PROTO_ETHERNET)
-    {
-      s = format (s, "via l2-input-on ");
-    }
-  else if (mp->mr_next_hop_proto == DPO_PROTO_MPLS)
-    {
-      if (mp->mr_next_hop_via_label != htonl (MPLS_LABEL_INVALID))
-       s =
-         format (s, "via via-label %d ", ntohl (mp->mr_next_hop_via_label));
-      else
-       s = format (s, "via next-hop-table %d ",
-                   ntohl (mp->mr_next_hop_table_id));
-    }
-  if (mp->mr_next_hop_sw_if_index != ~0)
-    s = format (s, "sw_if_index %d ", ntohl (mp->mr_next_hop_sw_if_index));
+  for (p = 0; p < mp->mr_route.mr_n_paths; p++)
+    s =
+      format (s, " [%U]", format_vl_api_fib_path, &mp->mr_route.mr_paths[p]);
 
-  if (mp->mr_next_hop_weight != 1)
-    s = format (s, "weight %d ", (u32) mp->mr_next_hop_weight);
-
-  if (mp->mr_is_multipath)
-    s = format (s, "multipath ");
-
-  if (mp->mr_is_classify)
-    s = format (s, "classify %d", ntohl (mp->mr_classify_table_index));
-
-  if (mp->mr_next_hop_n_out_labels)
-    {
-      u8 i;
-      for (i = 0; i < mp->mr_next_hop_n_out_labels; i++)
-       {
-         s = format (s, "out-label %d ",
-                     ntohl (mp->mr_next_hop_out_label_stack[i].label));
-       }
-    }
 
   FINISH;
 }
@@ -866,9 +790,10 @@ static void *vl_api_ip_table_add_del_t_print
     s = format (s, "add ");
   else
     s = format (s, "del ");
-  if (mp->is_ipv6)
+  if (mp->table.is_ip6)
     s = format (s, "ip6 ");
-  s = format (s, "table %d ", ntohl (mp->table_id));
+  s = format (s, "table %d ", ntohl (mp->table.table_id));
+  s = format (s, "%s ", mp->table.name);
 
   FINISH;
 }
@@ -883,7 +808,7 @@ static void *vl_api_mpls_table_add_del_t_print
     s = format (s, "add ");
   else
     s = format (s, "del ");
-  s = format (s, "table %d ", ntohl (mp->mt_table_id));
+  s = format (s, "table %d ", ntohl (mp->mt_table.mt_table_id));
 
   FINISH;
 }
@@ -924,38 +849,27 @@ static void *vl_api_proxy_arp_intfc_enable_disable_t_print
 static void *vl_api_mpls_tunnel_add_del_t_print
   (vl_api_mpls_tunnel_add_del_t * mp, void *handle)
 {
-  u8 *s;
+  u8 *s, p;
 
   s = format (0, "SCRIPT: mpls_tunnel_add_del ");
 
   if (mp->mt_is_add == 0)
-    s = format (s, "del sw_if_index %d ", ntohl (mp->mt_sw_if_index));
-
-  mpls_label_t label = ntohl (mp->mt_next_hop_via_label);
-  if (label != MPLS_LABEL_INVALID)
-    s = format (s, "via-label %d ", label);
-  else if (mp->mt_next_hop_proto_is_ip4)
-    s = format (s, "via %U ", format_ip4_address, mp->mt_next_hop);
+    s =
+      format (s, "del sw_if_index %d ", ntohl (mp->mt_tunnel.mt_sw_if_index));
   else
-    s = format (s, "via %U ", format_ip6_address, mp->mt_next_hop);
+    s = format (s, "sw_if_index %d ", ntohl (mp->mt_tunnel.mt_sw_if_index));
 
-  if (mp->mt_next_hop_sw_if_index != ~0)
-    s = format (s, "sw_if_index %d ", ntohl (mp->mt_next_hop_sw_if_index));
-  else if (mp->mt_next_hop_table_id)
-    s = format (s, "next-hop-table %d ", ntohl (mp->mt_next_hop_table_id));
 
-  if (mp->mt_l2_only)
+  if (mp->mt_tunnel.mt_l2_only)
     s = format (s, "l2-only ");
+  if (mp->mt_tunnel.mt_is_multicast)
+    s = format (s, "multicast ");
+  if (mp->mt_tunnel.mt_tunnel_index)
+    s = format (s, "tunnel-index ");
 
-  if (mp->mt_next_hop_n_out_labels)
-    {
-      u8 i;
-      for (i = 0; i < mp->mt_next_hop_n_out_labels; i++)
-       {
-         s = format (s, "out-label %d ",
-                     ntohl (mp->mt_next_hop_out_label_stack[i].label));
-       }
-    }
+  for (p = 0; p < mp->mt_tunnel.mt_n_paths; p++)
+    s = format (s, " [%U]", format_vl_api_fib_path,
+               &mp->mt_tunnel.mt_paths[p]);
 
   FINISH;
 }
@@ -1057,15 +971,15 @@ static void *vl_api_create_vlan_subif_t_print
   FINISH;
 }
 
-#define foreach_create_subif_bit                \
-_(no_tags)                                      \
-_(one_tag)                                      \
-_(two_tags)                                     \
-_(dot1ad)                                       \
-_(exact_match)                                  \
-_(default_sub)                                  \
-_(outer_vlan_id_any)                            \
-_(inner_vlan_id_any)
+#define foreach_create_subif_flag              \
+_(0, "no_tags")                                        \
+_(1, "one_tag")                                        \
+_(2, "two_tags")                               \
+_(3, "dot1ad")                                 \
+_(4, "exact_match")                            \
+_(5, "default_sub")                            \
+_(6, "outer_vlan_id_any")                      \
+_(7, "inner_vlan_id_any")
 
 static void *vl_api_create_subif_t_print
   (vl_api_create_subif_t * mp, void *handle)
@@ -1084,8 +998,8 @@ static void *vl_api_create_subif_t_print
   if (mp->inner_vlan_id)
     s = format (s, "inner_vlan_id %d ", ntohs (mp->inner_vlan_id));
 
-#define _(a) if (mp->a) s = format (s, "%s ", #a);
-  foreach_create_subif_bit;
+#define _(a,b) if (mp->sub_if_flags & (1 << a)) s = format (s, "%s ", b);
+  foreach_create_subif_flag;
 #undef _
 
   FINISH;
@@ -1920,10 +1834,10 @@ static void *vl_api_gre_tunnel_add_del_t_print
 
   s = format (s, "instance %d ", ntohl (mp->tunnel.instance));
 
-  if (mp->tunnel.type == GRE_TUNNEL_TYPE_TEB)
+  if (mp->tunnel.type == GRE_API_TUNNEL_TYPE_TEB)
     s = format (s, "teb ");
 
-  if (mp->tunnel.type == GRE_TUNNEL_TYPE_ERSPAN)
+  if (mp->tunnel.type == GRE_API_TUNNEL_TYPE_ERSPAN)
     s = format (s, "erspan %d ", ntohs (mp->tunnel.session_id));
 
   if (mp->tunnel.outer_fib_id)
@@ -2007,6 +1921,8 @@ static void *vl_api_create_vhost_user_if_t_print
     s = format (s, "disable_indirect_desc ");
   if (mp->tag[0])
     s = format (s, "tag %s", mp->tag);
+  if (mp->enable_gso)
+    s = format (s, "gso");
 
   FINISH;
 }
@@ -2024,6 +1940,8 @@ static void *vl_api_modify_vhost_user_if_t_print
     s = format (s, "server ");
   if (mp->renumber)
     s = format (s, "renumber %d ", ntohl (mp->custom_dev_instance));
+  if (mp->enable_gso)
+    s = format (s, "gso");
 
   FINISH;
 }
@@ -2127,8 +2045,10 @@ static void *vl_api_memclnt_create_t_print
   (vl_api_memclnt_create_t * mp, void *handle)
 {
   u8 *s;
+  u8 *name = vl_api_from_api_to_vec (&mp->name);
 
-  s = format (0, "SCRIPT: memclnt_create name %s ", mp->name);
+  s = format (0, "SCRIPT: memclnt_create name %v ", name);
+  vec_free (name);
 
   FINISH;
 }
@@ -2137,9 +2057,11 @@ static void *vl_api_sockclnt_create_t_print
   (vl_api_sockclnt_create_t * mp, void *handle)
 {
   u8 *s;
+  u8 *name = vl_api_from_api_to_vec (&mp->name);
 
-  s = format (0, "SCRIPT: sockclnt_create name %s ", mp->name);
+  s = format (0, "SCRIPT: sockclnt_create name %s ", name);
 
+  vec_free (name);
   FINISH;
 }
 
@@ -2153,7 +2075,8 @@ static void *vl_api_show_version_t_print
   FINISH;
 }
 
-static void *vl_api_show_threads_t_print
+__clib_unused
+  static void *vl_api_show_threads_t_print
   (vl_api_show_threads_t * mp, void *handle)
 {
   u8 *s;
@@ -2614,38 +2537,47 @@ static void *vl_api_mpls_tunnel_dump_t_print
   u8 *s;
 
   s = format (0, "SCRIPT: mpls_tunnel_dump ");
-
   s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
 
   FINISH;
 }
 
-static void *vl_api_mpls_fib_dump_t_print
-  (vl_api_mpls_fib_dump_t * mp, void *handle)
+static void *vl_api_mpls_table_dump_t_print
+  (vl_api_mpls_table_dump_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: mpls_table_decap_dump ");
+
+  FINISH;
+}
+
+static void *vl_api_mpls_route_dump_t_print
+  (vl_api_mpls_route_dump_t * mp, void *handle)
 {
   u8 *s;
 
-  s = format (0, "SCRIPT: mpls_fib_decap_dump ");
+  s = format (0, "SCRIPT: mpls_route_decap_dump ");
 
   FINISH;
 }
 
-static void *vl_api_ip_fib_dump_t_print
-  (vl_api_ip_fib_dump_t * mp, void *handle)
+static void *vl_api_ip_table_dump_t_print
+  (vl_api_ip_table_dump_t * mp, void *handle)
 {
   u8 *s;
 
-  s = format (0, "SCRIPT: ip_fib_dump ");
+  s = format (0, "SCRIPT: ip_table_dump ");
 
   FINISH;
 }
 
-static void *vl_api_ip6_fib_dump_t_print
-  (vl_api_ip6_fib_dump_t * mp, void *handle)
+static void *vl_api_ip_route_dump_t_print
+  (vl_api_ip_route_dump_t * mp, void *handle)
 {
   u8 *s;
 
-  s = format (0, "SCRIPT: ip6_fib_dump ");
+  s = format (0, "SCRIPT: ip_route_dump ");
 
   FINISH;
 }
@@ -2838,6 +2770,8 @@ static void *vl_api_pg_create_interface_t_print
 
   s = format (0, "SCRIPT: pg_create_interface ");
   s = format (0, "if_id %d", ntohl (mp->interface_id));
+  s = format (0, "gso-enabled %u", mp->gso_enabled);
+  s = format (0, "gso-size %u", ntohl (mp->gso_size));
 
   FINISH;
 }
@@ -3324,40 +3258,156 @@ static void *vl_api_ipsec_tunnel_if_add_del_t_print
   FINISH;
 }
 
-static void *vl_api_ipsec_gre_tunnel_add_del_t_print
-  (vl_api_ipsec_gre_tunnel_add_del_t * mp, void *handle)
+static const char *policy_strs[] = {
+  "BYPASS",
+  "DISCARD",
+  "RESOLVE",
+  "PROTECT",
+};
+
+static const char *proto_strs[] = {
+  "ESP",
+  "AH",
+};
+
+static const char *algo_strs[] = {
+  "NONE",
+  "AES_CBC_128",
+  "AES_CBC_192",
+  "AES_CBC_256",
+  "AES_CTR_128",
+  "AES_CTR_192",
+  "AES_CTR_256",
+  "AES_GCM_128",
+  "AES_GCM_192",
+  "AES_GCM_256",
+  "DES_CBC",
+  "3DES_CBC",
+};
+
+
+static const char *integ_strs[] = {
+  "NONE",
+  "MD5_96",
+  "SHA1_96",
+  "SHA_256_96",
+  "SHA_256_128",
+  "SHA_384_192",
+  "SHA_512_256",
+};
+
+static void *vl_api_ipsec_spd_entry_add_del_t_print
+  (vl_api_ipsec_spd_entry_add_del_t * mp, void *handle)
 {
   u8 *s;
+  const char *str;
+  vl_api_ipsec_spd_entry_t *ep;
+  int policy_host_byte_order;
 
-  s = format (0, "SCRIPT: ipsec_gre_tunnel_add_del ");
+  ep = (vl_api_ipsec_spd_entry_t *) & mp->entry;
 
-  s = format (s, "dst %U ", format_vl_api_ip4_address, mp->tunnel.dst);
+  s = format (0, "SCRIPT: ipsec_spd_entry ");
+  s = format (s, "is_add %d spd_id %u priority %d is_outbound %d sa_id %u\n",
+             mp->is_add,
+             ntohl (ep->spd_id), ntohl (ep->priority), ep->is_outbound,
+             ntohl (ep->sa_id));
 
-  s = format (s, "src %U ", format_vl_api_ip4_address, mp->tunnel.src);
+  policy_host_byte_order = ntohl (ep->policy);
 
-  s = format (s, "local_sa %d ", ntohl (mp->tunnel.local_sa_id));
+  if (policy_host_byte_order < ARRAY_LEN (policy_strs))
+    str = policy_strs[policy_host_byte_order];
+  else
+    str = "BOGUS!";
 
-  s = format (s, "remote_sa %d ", ntohl (mp->tunnel.remote_sa_id));
+  s = format (s, "  policy: %s protocol %d\n", str, ep->protocol);
 
-  if (mp->is_add == 0)
-    s = format (s, "del ");
+  s = format (s, "  remote_address_start %U remote_address_stop %U\n",
+             format_vl_api_address,
+             &ep->remote_address_start,
+             format_vl_api_address, &ep->remote_address_stop);
+
+  s = format (s, "  local_address_start %U local_address_stop %U\n",
+             format_vl_api_address,
+             &ep->local_address_start,
+             format_vl_api_address, &ep->local_address_stop);
+
+  s = format (s, "  remote_port_start %d remote_port_stop %d\n",
+             ntohs (ep->remote_port_start), ntohs (ep->remote_port_stop));
+
+  s = format (s, "  local_port_start %d local_port_stop %d ",
+             ntohs (ep->local_port_start), ntohs (ep->local_port_stop));
 
   FINISH;
 }
 
-static void *vl_api_ipsec_gre_tunnel_dump_t_print
-  (vl_api_ipsec_gre_tunnel_dump_t * mp, void *handle)
+static void *vl_api_ipsec_interface_add_del_spd_t_print
+  (vl_api_ipsec_interface_add_del_spd_t * mp, void *handle)
 {
   u8 *s;
 
-  s = format (0, "SCRIPT: ipsec_gre_tunnel_dump ");
+  s = format (0, "SCRIPT: ipsec_interface_add_del_spd ");
+  s = format (s, "is_add %d sw_if_index %d spd_id %u ",
+             mp->is_add, ntohl (mp->sw_if_index), ntohl (mp->spd_id));
+  FINISH;
+}
 
-  if (mp->sw_if_index != ~0)
-    s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+static void *vl_api_ipsec_spd_add_del_t_print
+  (vl_api_ipsec_spd_add_del_t * mp, void *handle)
+{
+  u8 *s;
 
+  s = format (0, "SCRIPT: ipsec_spd_add_del ");
+  s = format (s, "spd_id %u is_add %d ", ntohl (mp->spd_id), mp->is_add);
   FINISH;
 }
 
+static void *vl_api_ipsec_sad_entry_add_del_t_print
+  (vl_api_ipsec_sad_entry_add_del_t * mp, void *handle)
+{
+  u8 *s;
+  int tmp;
+  vl_api_ipsec_sad_entry_t *ep;
+  const char *protocol_str, *algo_str, *integ_str;
+
+  protocol_str = "BOGUS protocol!";
+  algo_str = "BOGUS crypto_algorithm!";
+  integ_str = "BOGUS integrity_algorithm!";
+
+  ep = (vl_api_ipsec_sad_entry_t *) & mp->entry;
+
+  s = format (0, "SCRIPT: ipsec_sad_entry_add_del is_add ", mp->is_add);
+
+  tmp = ntohl (ep->protocol);
+  if (tmp < ARRAY_LEN (proto_strs))
+    protocol_str = proto_strs[tmp];
+
+  tmp = ntohl (ep->crypto_algorithm);
+  if (tmp < ARRAY_LEN (algo_strs))
+    algo_str = algo_strs[tmp];
+
+  tmp = ntohl (ep->integrity_algorithm);
+  if (tmp < ARRAY_LEN (integ_strs))
+    integ_str = integ_strs[tmp];
+
+  s = format (s, "proto %s crypto alg %s integ alg %s\n",
+             protocol_str, algo_str, integ_str);
+  s = format (s, " crypto_key len %d value %U\n",
+             ep->crypto_key.length, format_hex_bytes, ep->crypto_key.data,
+             (int) (ep->crypto_key.length));
+  s = format (s, " integ_key len %d value %U\n",
+             ep->integrity_key.length, format_hex_bytes,
+             ep->integrity_key.data, (int) (ep->integrity_key.length));
+  s = format (s, " flags 0x%x ", ntohl (ep->flags));
+
+  s = format (s, "tunnel_src %U tunnel_dst %U\n",
+             format_vl_api_address,
+             &ep->tunnel_src, format_vl_api_address, &ep->tunnel_dst);
+  s = format (s, " tx_table_id %u salt %u ",
+             ntohl (ep->tx_table_id), ntohl (ep->salt));
+  FINISH;
+}
+
+
 static void *vl_api_l2_interface_pbb_tag_rewrite_t_print
   (vl_api_l2_interface_pbb_tag_rewrite_t * mp, void *handle)
 {
@@ -3404,13 +3454,17 @@ vl_api_set_punt_t_print (vl_api_set_punt_t * mp, void *handle)
 
   s = format (0, "SCRIPT: punt ");
 
-  if (mp->punt.ipv != (u8) ~ 0)
-    s = format (s, "ip %d ", mp->punt.ipv);
+  switch (clib_net_to_host_u32 (mp->punt.type))
+    {
+    case PUNT_API_TYPE_L4:
+      s = format (s, "%U", format_vl_api_address_family, mp->punt.punt.l4.af);
 
-  s = format (s, "protocol %d ", mp->punt.l4_protocol);
+      s = format (s, "protocol %d ", mp->punt.punt.l4.protocol);
 
-  if (mp->punt.l4_port != (u16) ~ 0)
-    s = format (s, "port %d ", ntohs (mp->punt.l4_port));
+      if (mp->punt.punt.l4.port != (u16) ~ 0)
+       s = format (s, "port %d ", ntohs (mp->punt.punt.l4.port));
+      break;
+    }
 
   if (!mp->is_add)
     s = format (s, "del ");
@@ -3575,7 +3629,7 @@ static void *vl_api_tcp_configure_src_addresses_t_print
 static void *vl_api_app_namespace_add_del_t_print
   (vl_api_app_namespace_add_del_t * mp, void *handle)
 {
-  u8 *s, *ns_id = 0;
+  u8 *s;
   u8 len = clib_min (mp->namespace_id_len,
                     ARRAY_LEN (mp->namespace_id) - 1);
   mp->namespace_id[len] = 0;
@@ -3588,29 +3642,6 @@ static void *vl_api_app_namespace_add_del_t_print
   FINISH;
 }
 
-static void *vl_api_lldp_config_t_print
-  (vl_api_lldp_config_t * mp, void *handle)
-{
-  u8 *s;
-
-  s = format (0, "SCRIPT: lldp_config ");
-  s = format (s, "system_name %s ", mp->system_name);
-  s = format (s, "tx_hold %d ", ntohl (mp->tx_hold));
-  s = format (s, "tx_interval %d ", ntohl (mp->tx_interval));
-  FINISH;
-}
-
-static void *vl_api_dns_enable_disable_t_print
-  (vl_api_dns_enable_disable_t * mp, void *handle)
-{
-  u8 *s;
-
-  s = format (0, "SCRIPT: dns_enable_disable ");
-  s = format (s, "%s ", mp->enable ? "enable" : "disable");
-
-  FINISH;
-}
-
 static void *vl_api_sw_interface_set_lldp_t_print
   (vl_api_sw_interface_set_lldp_t * mp, void *handle)
 {
@@ -3640,45 +3671,15 @@ static void *vl_api_sw_interface_set_lldp_t_print
   FINISH;
 }
 
-static void *vl_api_dns_name_server_add_del_t_print
-  (vl_api_dns_name_server_add_del_t * mp, void *handle)
-{
-  u8 *s;
-
-  s = format (0, "SCRIPT: dns_name_server_add_del ");
-  if (mp->is_ip6)
-    s = format (s, "%U ", format_ip6_address,
-               (ip6_address_t *) mp->server_address);
-  else
-    s = format (s, "%U ", format_ip4_address,
-               (ip4_address_t *) mp->server_address);
-
-  if (mp->is_add == 0)
-    s = format (s, "del ");
-
-  FINISH;
-}
-
-static void *vl_api_dns_resolve_name_t_print
-  (vl_api_dns_resolve_name_t * mp, void *handle)
-{
-  u8 *s;
-
-  s = format (0, "SCRIPT: dns_resolve_name ");
-  s = format (s, "%s ", mp->name);
-  FINISH;
-}
-
-static void *vl_api_dns_resolve_ip_t_print
-  (vl_api_dns_resolve_ip_t * mp, void *handle)
+static void *vl_api_lldp_config_t_print
+  (vl_api_lldp_config_t * mp, void *handle)
 {
   u8 *s;
 
-  s = format (0, "SCRIPT: dns_resolve_ip ");
-  if (mp->is_ip6)
-    s = format (s, "%U ", format_ip6_address, mp->address);
-  else
-    s = format (s, "%U ", format_ip4_address, mp->address);
+  s = format (0, "SCRIPT: lldp_config ");
+  s = format (s, "system_name %s ", mp->system_name);
+  s = format (s, "tx_hold %d ", ntohl (mp->tx_hold));
+  s = format (s, "tx_interval %d ", ntohl (mp->tx_interval));
   FINISH;
 }
 
@@ -3704,7 +3705,8 @@ static void *vl_api_session_rule_add_del_t_print
   FINISH;
 }
 
-static void *vl_api_ip_container_proxy_add_del_t_print
+__clib_unused
+  static void *vl_api_ip_container_proxy_add_del_t_print
   (vl_api_ip_container_proxy_add_del_t * mp, void *handle)
 {
   u8 *s;
@@ -3721,9 +3723,9 @@ static void *vl_api_qos_record_enable_disable_t_print
   u8 *s;
 
   s = format (0, "SCRIPT: qos_record_enable_disable ");
-  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+  s = format (s, "sw_if_index %d ", ntohl (mp->record.sw_if_index));
   s = format (s, "input_source %U ", format_qos_source,
-             ntohl (mp->input_source));
+             mp->record.input_source);
 
   if (!mp->enable)
     s = format (s, "disable ");
@@ -3731,6 +3733,18 @@ static void *vl_api_qos_record_enable_disable_t_print
   FINISH;
 }
 
+#define foreach_no_print_function               \
+_(memclnt_keepalive_reply)
+
+#define _(f)                                    \
+static void * vl_api_ ## f ## _t_print          \
+  (vl_api_ ## f ## _t * mp, void * handle)      \
+{                                               \
+  return handle;                                \
+}
+foreach_no_print_function;
+#undef _
+
 #define foreach_custom_print_no_arg_function                            \
 _(lisp_eid_table_vni_dump)                                              \
 _(lisp_map_resolver_dump)                                               \
@@ -3747,7 +3761,7 @@ static void * vl_api_ ## f ## _t_print                                  \
   s = format (0, "SCRIPT: " #f );                                       \
   FINISH;                                                               \
 }
-foreach_custom_print_no_arg_function
+foreach_custom_print_no_arg_function;
 #undef _
 #define foreach_custom_print_function                                   \
 _(CREATE_LOOPBACK, create_loopback)                                     \
@@ -3764,13 +3778,16 @@ _(BOND_CREATE, bond_create)                                             \
 _(BOND_DELETE, bond_delete)                                             \
 _(BOND_ENSLAVE, bond_enslave)                                           \
 _(BOND_DETACH_SLAVE, bond_detach_slave)                                 \
+_(SW_INTERFACE_SLAVE_DUMP, sw_interface_slave_dump)                     \
+_(SW_INTERFACE_BOND_DUMP, sw_interface_bond_dump)                       \
+_(SW_INTERFACE_RX_PLACEMENT_DUMP, sw_interface_rx_placement_dump)       \
 _(TAP_CREATE_V2, tap_create_v2)                                         \
 _(TAP_DELETE_V2, tap_delete_v2)                                         \
 _(SW_INTERFACE_TAP_V2_DUMP, sw_interface_tap_v2_dump)                   \
-_(IP_ADD_DEL_ROUTE, ip_add_del_route)                                   \
 _(IP_TABLE_ADD_DEL, ip_table_add_del)                                   \
 _(MPLS_ROUTE_ADD_DEL, mpls_route_add_del)                               \
 _(MPLS_TABLE_ADD_DEL, mpls_table_add_del)                               \
+_(IP_ROUTE_ADD_DEL, ip_route_add_del)                                   \
 _(PROXY_ARP_ADD_DEL, proxy_arp_add_del)                                 \
 _(PROXY_ARP_INTFC_ENABLE_DISABLE, proxy_arp_intfc_enable_disable)       \
 _(MPLS_TUNNEL_ADD_DEL, mpls_tunnel_add_del)                            \
@@ -3861,7 +3878,8 @@ _(AF_PACKET_CREATE, af_packet_create)                                     \
 _(AF_PACKET_DELETE, af_packet_delete)                                  \
 _(AF_PACKET_DUMP, af_packet_dump)                                       \
 _(SW_INTERFACE_CLEAR_STATS, sw_interface_clear_stats)                   \
-_(MPLS_FIB_DUMP, mpls_fib_dump)                                         \
+_(MPLS_TABLE_DUMP, mpls_table_dump)                                     \
+_(MPLS_ROUTE_DUMP, mpls_route_dump)                                     \
 _(MPLS_TUNNEL_DUMP, mpls_tunnel_dump)                                   \
 _(CLASSIFY_TABLE_IDS,classify_table_ids)                                \
 _(CLASSIFY_TABLE_BY_INTERFACE, classify_table_by_interface)             \
@@ -3915,9 +3933,11 @@ _(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_INTERFACE_ADD_DEL_SPD, ipsec_interface_add_del_spd)            \
+_(IPSEC_SAD_ENTRY_ADD_DEL, ipsec_sad_entry_add_del)                    \
+_(IPSEC_SPD_ADD_DEL, ipsec_spd_add_del)                                        \
+_(IPSEC_SPD_ENTRY_ADD_DEL, ipsec_spd_entry_add_del)                    \
 _(IPSEC_TUNNEL_IF_ADD_DEL, ipsec_tunnel_if_add_del)                     \
-_(IPSEC_GRE_TUNNEL_ADD_DEL, ipsec_gre_tunnel_add_del)                   \
-_(IPSEC_GRE_TUNNEL_DUMP, ipsec_gre_tunnel_dump)                         \
 _(DELETE_SUBIF, delete_subif)                                           \
 _(L2_INTERFACE_PBB_TAG_REWRITE, l2_interface_pbb_tag_rewrite)           \
 _(SET_PUNT, set_punt)                                                   \
@@ -3926,8 +3946,8 @@ _(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)                                           \
+_(IP_TABLE_DUMP, ip_table_dump)                                         \
+_(IP_ROUTE_DUMP, ip_route_dump)                                         \
 _(FEATURE_ENABLE_DISABLE, feature_enable_disable)                      \
 _(SW_INTERFACE_TAG_ADD_DEL, sw_interface_tag_add_del)                  \
 _(HW_INTERFACE_SET_MTU, hw_interface_set_mtu)                           \
@@ -3937,14 +3957,12 @@ _(TCP_CONFIGURE_SRC_ADDRESSES, tcp_configure_src_addresses)             \
 _(APP_NAMESPACE_ADD_DEL, app_namespace_add_del)                         \
 _(LLDP_CONFIG, lldp_config)                                             \
 _(SW_INTERFACE_SET_LLDP, sw_interface_set_lldp)                                \
-_(DNS_ENABLE_DISABLE, dns_enable_disable)                               \
-_(DNS_NAME_SERVER_ADD_DEL, dns_name_server_add_del)                     \
-_(DNS_RESOLVE_NAME, dns_resolve_name)                                  \
-_(DNS_RESOLVE_IP, dns_resolve_ip)                                      \
 _(SESSION_RULE_ADD_DEL, session_rule_add_del)                           \
 _(OUTPUT_ACL_SET_INTERFACE, output_acl_set_interface)                   \
-_(QOS_RECORD_ENABLE_DISABLE, qos_record_enable_disable)
-  void
+_(QOS_RECORD_ENABLE_DISABLE, qos_record_enable_disable)                        \
+_(MEMCLNT_KEEPALIVE_REPLY, memclnt_keepalive_reply)
+
+void
 vl_msg_api_custom_dump_configure (api_main_t * am)
 {
 #define _(n,f) am->msg_print_handlers[VL_API_##n]       \
@@ -3956,5 +3974,7 @@ vl_msg_api_custom_dump_configure (api_main_t * am)
 /*
  * fd.io coding-style-patch-verification: ON
  *
- * Local Variables: eval: (c-set-style "gnu") End:
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
  */