Rename LISP GPE API to GPE
[vpp.git] / src / vat / api_format.c
index 8caa94f..11e6821 100644 (file)
@@ -914,6 +914,19 @@ static void vl_api_sw_interface_details_t_handler_json
                            ntohl (mp->vtr_push_dot1q));
   vat_json_object_add_uint (node, "vtr_tag1", ntohl (mp->vtr_tag1));
   vat_json_object_add_uint (node, "vtr_tag2", ntohl (mp->vtr_tag2));
+  if (mp->sub_dot1ah)
+    {
+      vat_json_object_add_string_copy (node, "pbb_vtr_dmac",
+                                      format (0, "%U",
+                                              format_ethernet_address,
+                                              &mp->b_dmac));
+      vat_json_object_add_string_copy (node, "pbb_vtr_smac",
+                                      format (0, "%U",
+                                              format_ethernet_address,
+                                              &mp->b_smac));
+      vat_json_object_add_uint (node, "pbb_vtr_b_vlanid", mp->b_vlanid);
+      vat_json_object_add_uint (node, "pbb_vtr_i_sid", mp->i_sid);
+    }
 }
 
 static void vl_api_sw_interface_set_flags_t_handler
@@ -2683,28 +2696,28 @@ static void
 }
 
 static void
-api_lisp_gpe_fwd_entry_net_to_host (vl_api_lisp_gpe_fwd_entry_t * e)
+api_gpe_fwd_entry_net_to_host (vl_api_gpe_fwd_entry_t * e)
 {
   e->dp_table = clib_net_to_host_u32 (e->dp_table);
   e->fwd_entry_index = clib_net_to_host_u32 (e->fwd_entry_index);
 }
 
 static void
-  lisp_gpe_fwd_entries_get_reply_t_net_to_host
-  (vl_api_lisp_gpe_fwd_entries_get_reply_t * mp)
+  gpe_fwd_entries_get_reply_t_net_to_host
+  (vl_api_gpe_fwd_entries_get_reply_t * mp)
 {
   u32 i;
 
   mp->count = clib_net_to_host_u32 (mp->count);
   for (i = 0; i < mp->count; i++)
     {
-      api_lisp_gpe_fwd_entry_net_to_host (&mp->entries[i]);
+      api_gpe_fwd_entry_net_to_host (&mp->entries[i]);
     }
 }
 
 static void
-  vl_api_lisp_gpe_fwd_entry_path_details_t_handler
-  (vl_api_lisp_gpe_fwd_entry_path_details_t * mp)
+  vl_api_gpe_fwd_entry_path_details_t_handler
+  (vl_api_gpe_fwd_entry_path_details_t * mp)
 {
   vat_main_t *vam = &vat_main;
   u8 *(*format_ip_address_fcn) (u8 *, va_list *) = 0;
@@ -2720,7 +2733,7 @@ static void
 }
 
 static void
-lisp_fill_locator_node (vat_json_node_t * n, vl_api_lisp_gpe_locator_t * loc)
+lisp_fill_locator_node (vat_json_node_t * n, vl_api_gpe_locator_t * loc)
 {
   struct in6_addr ip6;
   struct in_addr ip4;
@@ -2739,8 +2752,8 @@ lisp_fill_locator_node (vat_json_node_t * n, vl_api_lisp_gpe_locator_t * loc)
 }
 
 static void
-  vl_api_lisp_gpe_fwd_entry_path_details_t_handler_json
-  (vl_api_lisp_gpe_fwd_entry_path_details_t * mp)
+  vl_api_gpe_fwd_entry_path_details_t_handler_json
+  (vl_api_gpe_fwd_entry_path_details_t * mp)
 {
   vat_main_t *vam = &vat_main;
   vat_json_node_t *node = NULL;
@@ -2764,18 +2777,18 @@ static void
 }
 
 static void
-  vl_api_lisp_gpe_fwd_entries_get_reply_t_handler
-  (vl_api_lisp_gpe_fwd_entries_get_reply_t * mp)
+  vl_api_gpe_fwd_entries_get_reply_t_handler
+  (vl_api_gpe_fwd_entries_get_reply_t * mp)
 {
   vat_main_t *vam = &vat_main;
   u32 i;
   int retval = clib_net_to_host_u32 (mp->retval);
-  vl_api_lisp_gpe_fwd_entry_t *e;
+  vl_api_gpe_fwd_entry_t *e;
 
   if (retval)
     goto end;
 
-  lisp_gpe_fwd_entries_get_reply_t_net_to_host (mp);
+  gpe_fwd_entries_get_reply_t_net_to_host (mp);
 
   for (i = 0; i < mp->count; i++)
     {
@@ -2791,20 +2804,20 @@ end:
 }
 
 static void
-  vl_api_lisp_gpe_fwd_entries_get_reply_t_handler_json
-  (vl_api_lisp_gpe_fwd_entries_get_reply_t * mp)
+  vl_api_gpe_fwd_entries_get_reply_t_handler_json
+  (vl_api_gpe_fwd_entries_get_reply_t * mp)
 {
   u8 *s = 0;
   vat_main_t *vam = &vat_main;
   vat_json_node_t *e = 0, root;
   u32 i;
   int retval = clib_net_to_host_u32 (mp->retval);
-  vl_api_lisp_gpe_fwd_entry_t *fwd;
+  vl_api_gpe_fwd_entry_t *fwd;
 
   if (retval)
     goto end;
 
-  lisp_gpe_fwd_entries_get_reply_t_net_to_host (mp);
+  gpe_fwd_entries_get_reply_t_net_to_host (mp);
   vat_json_init_array (&root);
 
   for (i = 0; i < mp->count; i++)
@@ -3843,6 +3856,14 @@ _(ikev2_profile_set_auth_reply)                         \
 _(ikev2_profile_set_id_reply)                           \
 _(ikev2_profile_set_ts_reply)                           \
 _(ikev2_set_local_key_reply)                            \
+_(ikev2_set_responder_reply)                            \
+_(ikev2_set_ike_transforms_reply)                       \
+_(ikev2_set_esp_transforms_reply)                       \
+_(ikev2_set_sa_lifetime_reply)                          \
+_(ikev2_initiate_sa_init_reply)                         \
+_(ikev2_initiate_del_ike_sa_reply)                      \
+_(ikev2_initiate_del_child_sa_reply)                    \
+_(ikev2_initiate_rekey_child_sa_reply)                  \
 _(delete_loopback_reply)                                \
 _(bd_ip_mac_add_del_reply)                              \
 _(map_del_domain_reply)                                 \
@@ -3858,11 +3879,11 @@ _(lisp_add_del_locator_reply)                           \
 _(lisp_add_del_local_eid_reply)                         \
 _(lisp_add_del_remote_mapping_reply)                    \
 _(lisp_add_del_adjacency_reply)                         \
-_(lisp_gpe_add_del_fwd_entry_reply)                     \
+_(gpe_add_del_fwd_entry_reply)                          \
 _(lisp_add_del_map_resolver_reply)                      \
 _(lisp_add_del_map_server_reply)                        \
-_(lisp_gpe_enable_disable_reply)                        \
-_(lisp_gpe_add_del_iface_reply)                         \
+_(gpe_enable_disable_reply)                             \
+_(gpe_add_del_iface_reply)                              \
 _(lisp_enable_disable_reply)                            \
 _(lisp_rloc_probe_enable_disable_reply)                 \
 _(lisp_map_register_enable_disable_reply)               \
@@ -4076,6 +4097,14 @@ _(IKEV2_PROFILE_SET_AUTH_REPLY, ikev2_profile_set_auth_reply)           \
 _(IKEV2_PROFILE_SET_ID_REPLY, ikev2_profile_set_id_reply)               \
 _(IKEV2_PROFILE_SET_TS_REPLY, ikev2_profile_set_ts_reply)               \
 _(IKEV2_SET_LOCAL_KEY_REPLY, ikev2_set_local_key_reply)                 \
+_(IKEV2_SET_RESPONDER_REPLY, ikev2_set_responder_reply)                 \
+_(IKEV2_SET_IKE_TRANSFORMS_REPLY, ikev2_set_ike_transforms_reply)       \
+_(IKEV2_SET_ESP_TRANSFORMS_REPLY, ikev2_set_esp_transforms_reply)       \
+_(IKEV2_SET_SA_LIFETIME_REPLY, ikev2_set_sa_lifetime_reply)             \
+_(IKEV2_INITIATE_SA_INIT_REPLY, ikev2_initiate_sa_init_reply)           \
+_(IKEV2_INITIATE_DEL_IKE_SA_REPLY, ikev2_initiate_del_ike_sa_reply)     \
+_(IKEV2_INITIATE_DEL_CHILD_SA_REPLY, ikev2_initiate_del_child_sa_reply) \
+_(IKEV2_INITIATE_REKEY_CHILD_SA_REPLY, ikev2_initiate_rekey_child_sa_reply) \
 _(DELETE_LOOPBACK_REPLY, delete_loopback_reply)                         \
 _(BD_IP_MAC_ADD_DEL_REPLY, bd_ip_mac_add_del_reply)                     \
 _(DHCP_COMPL_EVENT, dhcp_compl_event)                                   \
@@ -4103,10 +4132,10 @@ _(LISP_ADD_DEL_LOCATOR_REPLY, lisp_add_del_locator_reply)               \
 _(LISP_ADD_DEL_LOCAL_EID_REPLY, lisp_add_del_local_eid_reply)           \
 _(LISP_ADD_DEL_REMOTE_MAPPING_REPLY, lisp_add_del_remote_mapping_reply) \
 _(LISP_ADD_DEL_ADJACENCY_REPLY, lisp_add_del_adjacency_reply)           \
-_(LISP_GPE_ADD_DEL_FWD_ENTRY_REPLY, lisp_gpe_add_del_fwd_entry_reply)   \
+_(GPE_ADD_DEL_FWD_ENTRY_REPLY, gpe_add_del_fwd_entry_reply)             \
 _(LISP_ADD_DEL_MAP_RESOLVER_REPLY, lisp_add_del_map_resolver_reply)     \
 _(LISP_ADD_DEL_MAP_SERVER_REPLY, lisp_add_del_map_server_reply)         \
-_(LISP_GPE_ENABLE_DISABLE_REPLY, lisp_gpe_enable_disable_reply)         \
+_(GPE_ENABLE_DISABLE_REPLY, gpe_enable_disable_reply)                   \
 _(LISP_ENABLE_DISABLE_REPLY, lisp_enable_disable_reply)                 \
 _(LISP_MAP_REGISTER_ENABLE_DISABLE_REPLY,                               \
   lisp_map_register_enable_disable_reply)                               \
@@ -4115,7 +4144,7 @@ _(LISP_RLOC_PROBE_ENABLE_DISABLE_REPLY,                                 \
 _(LISP_PITR_SET_LOCATOR_SET_REPLY, lisp_pitr_set_locator_set_reply)     \
 _(LISP_MAP_REQUEST_MODE_REPLY, lisp_map_request_mode_reply)             \
 _(LISP_EID_TABLE_ADD_DEL_MAP_REPLY, lisp_eid_table_add_del_map_reply)   \
-_(LISP_GPE_ADD_DEL_IFACE_REPLY, lisp_gpe_add_del_iface_reply)           \
+_(GPE_ADD_DEL_IFACE_REPLY, gpe_add_del_iface_reply)                     \
 _(LISP_LOCATOR_SET_DETAILS, lisp_locator_set_details)                   \
 _(LISP_LOCATOR_DETAILS, lisp_locator_details)                           \
 _(LISP_EID_TABLE_DETAILS, lisp_eid_table_details)                       \
@@ -4124,9 +4153,9 @@ _(LISP_EID_TABLE_VNI_DETAILS, lisp_eid_table_vni_details)               \
 _(LISP_MAP_RESOLVER_DETAILS, lisp_map_resolver_details)                 \
 _(LISP_MAP_SERVER_DETAILS, lisp_map_server_details)                     \
 _(LISP_ADJACENCIES_GET_REPLY, lisp_adjacencies_get_reply)               \
-_(LISP_GPE_FWD_ENTRIES_GET_REPLY, lisp_gpe_fwd_entries_get_reply)       \
-_(LISP_GPE_FWD_ENTRY_PATH_DETAILS,                                      \
-  lisp_gpe_fwd_entry_path_details)                                      \
+_(GPE_FWD_ENTRIES_GET_REPLY, gpe_fwd_entries_get_reply)                 \
+_(GPE_FWD_ENTRY_PATH_DETAILS,                                           \
+  gpe_fwd_entry_path_details)                                           \
 _(SHOW_LISP_STATUS_REPLY, show_lisp_status_reply)                       \
 _(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS_REPLY,                             \
   lisp_add_del_map_request_itr_rlocs_reply)                             \
@@ -4641,6 +4670,7 @@ exec_inband (vat_main_t * vam)
 {
   vl_api_cli_inband_t *mp;
   unformat_input_t *i = vam->input;
+  int ret;
 
   if (vec_len (i->buffer) == 0)
     return -1;
@@ -4667,7 +4697,8 @@ exec_inband (vat_main_t * vam)
   mp->length = htonl (len);
 
   S (mp);
-  W2 (print (vam->ofp, "%s", vam->cmd_reply));
+  W2 (ret, print (vam->ofp, "%s", vam->cmd_reply));
+  return ret;
 }
 
 static int
@@ -4677,6 +4708,7 @@ api_create_loopback (vat_main_t * vam)
   vl_api_create_loopback_t *mp;
   u8 mac_address[6];
   u8 mac_set = 0;
+  int ret;
 
   memset (mac_address, 0, sizeof (mac_address));
 
@@ -4694,7 +4726,8 @@ api_create_loopback (vat_main_t * vam)
     clib_memcpy (mp->mac_address, mac_address, sizeof (mac_address));
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -4703,6 +4736,7 @@ api_delete_loopback (vat_main_t * vam)
   unformat_input_t *i = vam->input;
   vl_api_delete_loopback_t *mp;
   u32 sw_if_index = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -4723,7 +4757,8 @@ api_delete_loopback (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -4732,6 +4767,7 @@ api_want_stats (vat_main_t * vam)
   unformat_input_t *i = vam->input;
   vl_api_want_stats_t *mp;
   int enable = -1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -4753,7 +4789,8 @@ api_want_stats (vat_main_t * vam)
   mp->enable_disable = enable;
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -4762,6 +4799,7 @@ api_want_interface_events (vat_main_t * vam)
   unformat_input_t *i = vam->input;
   vl_api_want_interface_events_t *mp;
   int enable = -1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -4785,7 +4823,8 @@ api_want_interface_events (vat_main_t * vam)
   vam->interface_event_display = enable;
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 
@@ -4794,9 +4833,11 @@ int
 api_sw_interface_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   hash_pair_t *p;
   name_sort_t *nses = 0, *ns;
   sw_interface_subif_t *sub = NULL;
+  int ret;
 
   /* Toss the old name table */
   /* *INDENT-OFF* */
@@ -4887,12 +4928,11 @@ api_sw_interface_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
@@ -4903,6 +4943,7 @@ api_sw_interface_set_flags (vat_main_t * vam)
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 admin_up = 0, link_up = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -4940,7 +4981,8 @@ api_sw_interface_set_flags (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return the good/bad news... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -4950,6 +4992,7 @@ api_sw_interface_clear_stats (vat_main_t * vam)
   vl_api_sw_interface_clear_stats_t *mp;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -4974,7 +5017,8 @@ api_sw_interface_clear_stats (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return the good/bad news... */
-  W;
+  W (ret);
+  return ret;
 }
 
 #if DPDK >0
@@ -4991,6 +5035,7 @@ api_sw_interface_set_dpdk_hqos_pipe (vat_main_t * vam)
   u8 pipe_set = 0;
   u32 profile;
   u8 profile_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5045,9 +5090,8 @@ api_sw_interface_set_dpdk_hqos_pipe (vat_main_t * vam)
 
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5063,6 +5107,7 @@ api_sw_interface_set_dpdk_hqos_subport (vat_main_t * vam)
   u32 tb_size = 1000000;
   u32 tc_rate[] = { 1250000000, 1250000000, 1250000000, 1250000000 };
   u32 tc_period = 10;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5125,9 +5170,8 @@ api_sw_interface_set_dpdk_hqos_subport (vat_main_t * vam)
   mp->tc_period = ntohl (tc_period);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5141,6 +5185,7 @@ api_sw_interface_set_dpdk_hqos_tctbl (vat_main_t * vam)
   u8 tc_set = 0;
   u8 queue_set = 0;
   u32 entry, tc, queue;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5191,9 +5236,8 @@ api_sw_interface_set_dpdk_hqos_tctbl (vat_main_t * vam)
   mp->queue = ntohl (queue);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 #endif
 
@@ -5210,6 +5254,7 @@ api_sw_interface_add_del_address (vat_main_t * vam)
   u8 v6_address_set = 0;
   ip4_address_t v4address;
   ip6_address_t v6address;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5270,7 +5315,8 @@ api_sw_interface_add_del_address (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5281,6 +5327,7 @@ api_sw_interface_set_mpls_enable (vat_main_t * vam)
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 enable = 1;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5313,7 +5360,8 @@ api_sw_interface_set_mpls_enable (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5324,6 +5372,7 @@ api_sw_interface_set_table (vat_main_t * vam)
   u32 sw_if_index, vrf_id = 0;
   u8 sw_if_index_set = 0;
   u8 is_ipv6 = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5357,7 +5406,8 @@ api_sw_interface_set_table (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_sw_interface_get_table_reply_t_handler
@@ -5397,6 +5447,7 @@ api_sw_interface_get_table (vat_main_t * vam)
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 is_ipv6 = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -5421,7 +5472,8 @@ api_sw_interface_get_table (vat_main_t * vam)
   mp->is_ipv6 = is_ipv6;
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5432,6 +5484,7 @@ api_sw_interface_set_vpath (vat_main_t * vam)
   u32 sw_if_index = 0;
   u8 sw_if_index_set = 0;
   u8 is_enable = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5464,7 +5517,8 @@ api_sw_interface_set_vpath (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5476,6 +5530,7 @@ api_sw_interface_set_vxlan_bypass (vat_main_t * vam)
   u8 sw_if_index_set = 0;
   u8 is_enable = 1;
   u8 is_ipv6 = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5513,7 +5568,8 @@ api_sw_interface_set_vxlan_bypass (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5526,6 +5582,7 @@ api_sw_interface_set_l2_xconnect (vat_main_t * vam)
   u32 tx_sw_if_index;
   u8 tx_sw_if_index_set = 0;
   u8 enable = 1;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5583,9 +5640,8 @@ api_sw_interface_set_l2_xconnect (vat_main_t * vam)
   mp->enable = enable;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5600,6 +5656,7 @@ api_sw_interface_set_l2_bridge (vat_main_t * vam)
   u8 bvi = 0;
   u32 shg = 0;
   u8 enable = 1;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5645,9 +5702,8 @@ api_sw_interface_set_l2_bridge (vat_main_t * vam)
   mp->enable = enable;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5655,7 +5711,9 @@ api_bridge_domain_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_bridge_domain_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u32 bd_id = ~0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5671,15 +5729,11 @@ api_bridge_domain_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5691,6 +5745,7 @@ api_bridge_domain_add_del (vat_main_t * vam)
   u8 is_add = 1;
   u32 flood = 1, forward = 1, learn = 1, uu_flood = 1, arp_term = 0;
   u32 mac_age = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5742,9 +5797,8 @@ api_bridge_domain_add_del (vat_main_t * vam)
   mp->mac_age = (u8) mac_age;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5855,14 +5909,14 @@ api_l2fib_add_del (vat_main_t * vam)
 
   if (count > 1)
     {
-      vl_api_control_ping_t *mp;
+      vl_api_control_ping_t *mp_ping;
       f64 after;
 
       /* Shut off async mode */
       vam->async_mode = 0;
 
-      M (CONTROL_PING, mp);
-      S (mp);
+      M (CONTROL_PING, mp_ping);
+      S (mp_ping);
 
       timeout = vat_time_now (vam) + 1.0;
       while (vat_time_now (vam) < timeout)
@@ -5887,8 +5941,11 @@ api_l2fib_add_del (vat_main_t * vam)
     }
   else
     {
+      int ret;
+
       /* Wait for a reply... */
-      W;
+      W (ret);
+      return ret;
     }
   /* Return the good/bad news */
   return (vam->retval);
@@ -5902,6 +5959,7 @@ api_l2_flags (vat_main_t * vam)
   u32 sw_if_index;
   u32 feature_bitmap = 0;
   u8 sw_if_index_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5943,9 +6001,8 @@ api_l2_flags (vat_main_t * vam)
   mp->feature_bitmap = ntohl (feature_bitmap);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5957,6 +6014,7 @@ api_bridge_flags (vat_main_t * vam)
   u8 bd_id_set = 0;
   u8 is_set = 1;
   u32 flags = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5994,9 +6052,8 @@ api_bridge_flags (vat_main_t * vam)
   mp->is_set = is_set;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6013,6 +6070,7 @@ api_bd_ip_mac_add_del (vat_main_t * vam)
   ip4_address_t v4addr;
   ip6_address_t v6addr;
   u8 macaddr[6];
+  int ret;
 
 
   /* Parse args required to build the message */
@@ -6068,9 +6126,8 @@ api_bd_ip_mac_add_del (vat_main_t * vam)
     clib_memcpy (mp->ip_address, &v4addr, sizeof (v4addr));
   clib_memcpy (mp->mac_address, macaddr, 6);
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6089,6 +6146,7 @@ api_tap_connect (vat_main_t * vam)
   ip6_address_t ip6_address;
   u32 ip6_mask_width;
   int ip6_address_set = 0;
+  int ret;
 
   memset (mac_address, 0, sizeof (mac_address));
 
@@ -6162,7 +6220,8 @@ api_tap_connect (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6176,6 +6235,7 @@ api_tap_modify (vat_main_t * vam)
   u8 *tap_name;
   u32 sw_if_index = ~0;
   u8 sw_if_index_set = 0;
+  int ret;
 
   memset (mac_address, 0, sizeof (mac_address));
 
@@ -6227,7 +6287,8 @@ api_tap_modify (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6237,6 +6298,7 @@ api_tap_delete (vat_main_t * vam)
   vl_api_tap_delete_t *mp;
   u32 sw_if_index = ~0;
   u8 sw_if_index_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -6264,7 +6326,8 @@ api_tap_delete (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6519,15 +6582,15 @@ api_ip_add_del_route (vat_main_t * vam)
   /* When testing multiple add/del ops, use a control-ping to sync */
   if (count > 1)
     {
-      vl_api_control_ping_t *mp;
+      vl_api_control_ping_t *mp_ping;
       f64 after;
       f64 timeout;
 
       /* Shut off async mode */
       vam->async_mode = 0;
 
-      M (CONTROL_PING, mp);
-      S (mp);
+      M (CONTROL_PING, mp_ping);
+      S (mp_ping);
 
       timeout = vat_time_now (vam) + 1.0;
       while (vat_time_now (vam) < timeout)
@@ -6556,8 +6619,11 @@ api_ip_add_del_route (vat_main_t * vam)
     }
   else
     {
+      int ret;
+
       /* Wait for a reply... */
-      W;
+      W (ret);
+      return ret;
     }
 
   /* Return the good/bad news */
@@ -6580,6 +6646,7 @@ api_ip_mroute_add_del (vat_main_t * vam)
   ip6_address_t v6_grp_address, v6_src_address;
   mfib_itf_flags_t iflags = 0;
   mfib_entry_flags_t eflags = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -6677,7 +6744,8 @@ api_ip_mroute_add_del (vat_main_t * vam)
   /* send it... */
   S (mp);
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6856,15 +6924,15 @@ api_mpls_route_add_del (vat_main_t * vam)
   /* When testing multiple add/del ops, use a control-ping to sync */
   if (count > 1)
     {
-      vl_api_control_ping_t *mp;
+      vl_api_control_ping_t *mp_ping;
       f64 after;
       f64 timeout;
 
       /* Shut off async mode */
       vam->async_mode = 0;
 
-      M (CONTROL_PING, mp);
-      S (mp);
+      M (CONTROL_PING, mp_ping);
+      S (mp_ping);
 
       timeout = vat_time_now (vam) + 1.0;
       while (vat_time_now (vam) < timeout)
@@ -6893,8 +6961,11 @@ api_mpls_route_add_del (vat_main_t * vam)
     }
   else
     {
+      int ret;
+
       /* Wait for a reply... */
-      W;
+      W (ret);
+      return ret;
     }
 
   /* Return the good/bad news */
@@ -6915,6 +6986,7 @@ api_mpls_ip_bind_unbind (vat_main_t * vam)
   u32 address_length;
   u8 address_set = 0;
   mpls_label_t local_label = MPLS_LABEL_INVALID;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -6980,7 +7052,8 @@ api_mpls_ip_bind_unbind (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6992,6 +7065,7 @@ api_proxy_arp_add_del (vat_main_t * vam)
   u8 is_add = 1;
   ip4_address_t lo, hi;
   u8 range_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7023,9 +7097,8 @@ api_proxy_arp_add_del (vat_main_t * vam)
   clib_memcpy (mp->hi_address, &hi, sizeof (mp->hi_address));
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7036,6 +7109,7 @@ api_proxy_arp_intfc_enable_disable (vat_main_t * vam)
   u32 sw_if_index;
   u8 enable = 1;
   u8 sw_if_index_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7066,9 +7140,8 @@ api_proxy_arp_intfc_enable_disable (vat_main_t * vam)
   mp->enable_disable = enable;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7089,6 +7162,7 @@ api_mpls_tunnel_add_del (vat_main_t * vam)
   };
   ip6_address_t v6_next_hop_address = { {0} };
   mpls_label_t next_hop_out_label = MPLS_LABEL_INVALID, *labels = NULL;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7151,9 +7225,8 @@ api_mpls_tunnel_add_del (vat_main_t * vam)
     }
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7165,6 +7238,7 @@ api_sw_interface_set_unnumbered (vat_main_t * vam)
   u32 unnum_sw_index = ~0;
   u8 is_add = 1;
   u8 sw_if_index_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7196,9 +7270,8 @@ api_sw_interface_set_unnumbered (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7217,6 +7290,7 @@ api_ip_neighbor_add_del (vat_main_t * vam)
   u8 v6_address_set = 0;
   ip4_address_t v4address;
   ip6_address_t v6address;
+  int ret;
 
   memset (mac_address, 0, sizeof (mac_address));
 
@@ -7289,10 +7363,8 @@ api_ip_neighbor_add_del (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7303,6 +7375,7 @@ api_reset_vrf (vat_main_t * vam)
   u32 vrf_id = 0;
   u8 is_ipv6 = 0;
   u8 vrf_id_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7329,9 +7402,8 @@ api_reset_vrf (vat_main_t * vam)
   mp->is_ipv6 = is_ipv6;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7343,6 +7415,7 @@ api_create_vlan_subif (vat_main_t * vam)
   u8 sw_if_index_set = 0;
   u32 vlan_id;
   u8 vlan_id_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7377,9 +7450,8 @@ api_create_vlan_subif (vat_main_t * vam)
   mp->vlan_id = ntohl (vlan_id);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 #define foreach_create_subif_bit                \
@@ -7412,6 +7484,7 @@ api_create_subif (vat_main_t * vam)
   u32 tmp;
   u16 outer_vlan_id = 0;
   u16 inner_vlan_id = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7461,9 +7534,8 @@ api_create_subif (vat_main_t * vam)
   mp->inner_vlan_id = ntohs (inner_vlan_id);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7476,6 +7548,7 @@ api_oam_add_del (vat_main_t * vam)
   ip4_address_t src, dst;
   u8 src_set = 0;
   u8 dst_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7514,9 +7587,8 @@ api_oam_add_del (vat_main_t * vam)
   clib_memcpy (mp->dst_address, &dst, sizeof (mp->dst_address));
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7528,6 +7600,7 @@ api_reset_fib (vat_main_t * vam)
   u8 is_ipv6 = 0;
   u8 vrf_id_set = 0;
 
+  int ret;
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (i, "vrf %d", &vrf_id))
@@ -7553,9 +7626,8 @@ api_reset_fib (vat_main_t * vam)
   mp->is_ipv6 = is_ipv6;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7574,6 +7646,7 @@ api_dhcp_proxy_config (vat_main_t * vam)
   u8 v6_src_address_set = 0;
   ip4_address_t v4srcaddress;
   ip6_address_t v6srcaddress;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -7647,9 +7720,8 @@ api_dhcp_proxy_config (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7669,6 +7741,7 @@ api_dhcp_proxy_config_2 (vat_main_t * vam)
   u8 v6_src_address_set = 0;
   ip4_address_t v4srcaddress;
   ip6_address_t v6srcaddress;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -7745,9 +7818,8 @@ api_dhcp_proxy_config_2 (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7763,6 +7835,7 @@ api_dhcp_proxy_set_vss (vat_main_t * vam)
   u8 oui_set = 0;
   u32 fib_id;
   u8 fib_id_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7808,9 +7881,8 @@ api_dhcp_proxy_set_vss (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7823,6 +7895,7 @@ api_dhcp_client_config (vat_main_t * vam)
   u8 is_add = 1;
   u8 *hostname = 0;
   u8 disable_event = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -7868,9 +7941,8 @@ api_dhcp_client_config (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7887,6 +7959,7 @@ api_set_ip_flow_hash (vat_main_t * vam)
   u8 dport = 0;
   u8 proto = 0;
   u8 reverse = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7931,9 +8004,8 @@ api_set_ip_flow_hash (vat_main_t * vam)
   mp->is_ipv6 = is_ipv6;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7944,6 +8016,7 @@ api_sw_interface_ip6_enable_disable (vat_main_t * vam)
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 enable = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7974,9 +8047,8 @@ api_sw_interface_ip6_enable_disable (vat_main_t * vam)
   mp->enable = enable;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7988,6 +8060,7 @@ api_sw_interface_ip6_set_link_local_address (vat_main_t * vam)
   u8 sw_if_index_set = 0;
   u8 v6_address_set = 0;
   ip6_address_t v6address;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -8023,10 +8096,8 @@ api_sw_interface_ip6_set_link_local_address (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 
@@ -8048,6 +8119,7 @@ api_sw_interface_ip6nd_ra_prefix (vat_main_t * vam)
   u8 is_no = 0;
   u32 val_lifetime = 0;
   u32 pref_lifetime = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -8112,10 +8184,8 @@ api_sw_interface_ip6nd_ra_prefix (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8138,6 +8208,7 @@ api_sw_interface_ip6nd_ra_config (vat_main_t * vam)
   u32 lifetime = 0;
   u32 initial_count = 0;
   u32 initial_interval = 0;
+  int ret;
 
 
   /* Parse args required to build the message */
@@ -8208,10 +8279,8 @@ api_sw_interface_ip6nd_ra_config (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8222,6 +8291,7 @@ api_set_arp_neighbor_limit (vat_main_t * vam)
   u32 arp_nbr_limit;
   u8 limit_set = 0;
   u8 is_ipv6 = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -8248,9 +8318,8 @@ api_set_arp_neighbor_limit (vat_main_t * vam)
   mp->is_ipv6 = is_ipv6;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8263,6 +8332,7 @@ api_l2_patch_add_del (vat_main_t * vam)
   u32 tx_sw_if_index;
   u8 tx_sw_if_index_set = 0;
   u8 is_add = 1;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -8318,9 +8388,8 @@ api_l2_patch_add_del (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8333,6 +8402,7 @@ api_ioam_enable (vat_main_t * vam)
   int has_pot_option = 0;
   int has_seqno_option = 0;
   int has_analyse_option = 0;
+  int ret;
 
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
@@ -8355,10 +8425,8 @@ api_ioam_enable (vat_main_t * vam)
   mp->trace_enable = has_trace_option;
 
   S (mp);
-  W;
-
-  return (0);
-
+  W (ret);
+  return ret;
 }
 
 
@@ -8366,11 +8434,12 @@ static int
 api_ioam_disable (vat_main_t * vam)
 {
   vl_api_ioam_disable_t *mp;
+  int ret;
 
   M (IOAM_DISABLE, mp);
   S (mp);
-  W;
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8395,6 +8464,7 @@ api_sr_tunnel_add_del (vat_main_t * vam)
   ip6_address_t next_address, tag;
   u8 *name = 0;
   u8 *policy_name = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -8501,8 +8571,8 @@ api_sr_tunnel_add_del (vat_main_t * vam)
   vec_free (tags);
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8520,6 +8590,7 @@ api_sr_policy_add_del (vat_main_t * vam)
   int j = 0;
   int tunnel_names_length = 1; // Init to 1 to offset the #tunnel_names counter byte
   int tun_name_len = 0;                // Different naming convention used as confusing these would be "bad" (TM)
+  int ret;
 
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
@@ -8584,8 +8655,8 @@ api_sr_policy_add_del (vat_main_t * vam)
   vec_free (tunnel_name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8597,6 +8668,7 @@ api_sr_multicast_map_add_del (vat_main_t * vam)
   ip6_address_t multicast_address;
   u8 *policy_name = 0;
   int multicast_address_set = 0;
+  int ret;
 
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
@@ -8636,8 +8708,8 @@ api_sr_multicast_map_add_del (vat_main_t * vam)
   vec_free (policy_name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 
@@ -9267,6 +9339,7 @@ api_classify_add_del_table (vat_main_t * vam)
   u8 *mask = 0;
   u32 current_data_flag = 0;
   int current_data_offset = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -9351,8 +9424,8 @@ api_classify_add_del_table (vat_main_t * vam)
   vec_free (mask);
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 uword
@@ -9806,6 +9879,7 @@ api_classify_add_del_session (vat_main_t * vam)
   u32 match_n_vectors = 0;
   u32 action = 0;
   u32 metadata = 0;
+  int ret;
 
   /*
    * Warning: you have to supply skip_n and match_n
@@ -9880,8 +9954,8 @@ api_classify_add_del_session (vat_main_t * vam)
   vec_free (match);
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -9893,6 +9967,7 @@ api_classify_set_interface_ip_table (vat_main_t * vam)
   int sw_if_index_set;
   u32 table_index = ~0;
   u8 is_ipv6 = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -9923,9 +9998,8 @@ api_classify_set_interface_ip_table (vat_main_t * vam)
   mp->is_ipv6 = is_ipv6;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -9939,6 +10013,7 @@ api_classify_set_interface_l2_tables (vat_main_t * vam)
   u32 ip6_table_index = ~0;
   u32 other_table_index = ~0;
   u32 is_input = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -9977,9 +10052,8 @@ api_classify_set_interface_l2_tables (vat_main_t * vam)
   mp->is_input = (u8) is_input;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -9996,6 +10070,7 @@ api_set_ipfix_exporter (vat_main_t * vam)
   u32 path_mtu = ~0;
   u32 template_interval = ~0;
   u8 udp_checksum = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10043,8 +10118,8 @@ api_set_ipfix_exporter (vat_main_t * vam)
   mp->udp_checksum = udp_checksum;
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10054,6 +10129,7 @@ api_set_ipfix_classify_stream (vat_main_t * vam)
   vl_api_set_ipfix_classify_stream_t *mp;
   u32 domain_id = 0;
   u32 src_port = UDP_DST_PORT_ipfix;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10074,8 +10150,8 @@ api_set_ipfix_classify_stream (vat_main_t * vam)
   mp->src_port = htons ((u16) src_port);
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10087,6 +10163,7 @@ api_ipfix_classify_table_add_del (vat_main_t * vam)
   u32 classify_table_index = ~0;
   u8 ip_version = 0;
   u8 transport_protocol = 255;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10135,8 +10212,8 @@ api_ipfix_classify_table_add_del (vat_main_t * vam)
   mp->transport_protocol = transport_protocol;
 
   S (mp);
-  W;
-  /* NOTREACHED */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10145,6 +10222,7 @@ api_get_node_index (vat_main_t * vam)
   unformat_input_t *i = vam->input;
   vl_api_get_node_index_t *mp;
   u8 *name = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10169,9 +10247,8 @@ api_get_node_index (vat_main_t * vam)
   vec_free (name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10180,6 +10257,7 @@ api_get_next_index (vat_main_t * vam)
   unformat_input_t *i = vam->input;
   vl_api_get_next_index_t *mp;
   u8 *node_name = 0, *next_node_name = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10218,9 +10296,8 @@ api_get_next_index (vat_main_t * vam)
   vec_free (next_node_name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10230,6 +10307,7 @@ api_add_node_next (vat_main_t * vam)
   vl_api_add_node_next_t *mp;
   u8 *name = 0;
   u8 *next = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10268,9 +10346,8 @@ api_add_node_next (vat_main_t * vam)
   vec_free (next);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10286,6 +10363,7 @@ api_l2tpv3_create_tunnel (vat_main_t * vam)
   u64 remote_cookie = 0;
   u8 l2_sublayer_present = 0;
   vl_api_l2tpv3_create_tunnel_t *mp;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10336,9 +10414,8 @@ api_l2tpv3_create_tunnel (vat_main_t * vam)
   mp->is_ipv6 = 1;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10350,6 +10427,7 @@ api_l2tpv3_set_tunnel_cookies (vat_main_t * vam)
   u64 new_local_cookie = 0;
   u64 new_remote_cookie = 0;
   vl_api_l2tpv3_set_tunnel_cookies_t *mp;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10378,9 +10456,8 @@ api_l2tpv3_set_tunnel_cookies (vat_main_t * vam)
   mp->new_remote_cookie = clib_host_to_net_u64 (new_remote_cookie);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10391,6 +10468,7 @@ api_l2tpv3_interface_enable_disable (vat_main_t * vam)
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 enable_disable = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10418,9 +10496,8 @@ api_l2tpv3_interface_enable_disable (vat_main_t * vam)
   mp->enable_disable = enable_disable;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10429,6 +10506,7 @@ api_l2tpv3_set_lookup_key (vat_main_t * vam)
   unformat_input_t *i = vam->input;
   vl_api_l2tpv3_set_lookup_key_t *mp;
   u8 key = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10453,9 +10531,8 @@ api_l2tpv3_set_lookup_key (vat_main_t * vam)
   mp->key = key;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_sw_if_l2tpv3_tunnel_details_t_handler
@@ -10525,18 +10602,19 @@ static int
 api_sw_if_l2tpv3_tunnel_dump (vat_main_t * vam)
 {
   vl_api_sw_if_l2tpv3_tunnel_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   /* Get list of l2tpv3-tunnel interfaces */
   M (SW_IF_L2TPV3_TUNNEL_DUMP, mp);
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 
@@ -10571,6 +10649,8 @@ static int
 api_sw_interface_tap_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_tap_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   print (vam->ofp, "\n%-16s %s", "dev_name", "sw_if_index");
   /* Get list of tap interfaces */
@@ -10578,12 +10658,11 @@ api_sw_interface_tap_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static uword unformat_vxlan_decap_next
@@ -10616,6 +10695,7 @@ api_vxlan_add_del_tunnel (vat_main_t * vam)
   u32 encap_vrf_id = 0;
   u32 decap_next_index = ~0;
   u32 vni = 0;
+  int ret;
 
   /* Can't "universally zero init" (={0}) due to GCC bug 53119 */
   memset (&src, 0, sizeof src);
@@ -10752,9 +10832,8 @@ api_vxlan_add_del_tunnel (vat_main_t * vam)
   mp->is_ipv6 = ipv6_set;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_vxlan_tunnel_details_t_handler
@@ -10822,8 +10901,10 @@ api_vxlan_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_vxlan_tunnel_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -10854,12 +10935,11 @@ api_vxlan_tunnel_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10873,6 +10953,7 @@ api_gre_add_del_tunnel (vat_main_t * vam)
   u8 src_set = 0;
   u8 dst_set = 0;
   u32 outer_fib_id = 0;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -10914,9 +10995,8 @@ api_gre_add_del_tunnel (vat_main_t * vam)
   mp->teb = teb;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_gre_tunnel_details_t_handler
@@ -10960,8 +11040,10 @@ api_gre_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_gre_tunnel_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -10992,12 +11074,11 @@ api_gre_tunnel_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11005,13 +11086,13 @@ api_l2_fib_clear_table (vat_main_t * vam)
 {
 //  unformat_input_t * i = vam->input;
   vl_api_l2_fib_clear_table_t *mp;
+  int ret;
 
   M (L2_FIB_CLEAR_TABLE, mp);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11022,6 +11103,7 @@ api_l2_interface_efp_filter (vat_main_t * vam)
   u32 sw_if_index;
   u8 enable = 1;
   u8 sw_if_index_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11052,9 +11134,8 @@ api_l2_interface_efp_filter (vat_main_t * vam)
   mp->enable_disable = enable;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 #define foreach_vtr_op                          \
@@ -11080,6 +11161,7 @@ api_l2_interface_vlan_tag_rewrite (vat_main_t * vam)
   u32 push_dot1q = 1;
   u32 tag1 = ~0;
   u32 tag2 = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11119,9 +11201,8 @@ api_l2_interface_vlan_tag_rewrite (vat_main_t * vam)
   mp->tag2 = ntohl (tag2);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11136,6 +11217,7 @@ api_create_vhost_user_if (vat_main_t * vam)
   u8 hwaddr[6];
   u8 use_custom_mac = 0;
   u8 *tag = 0;
+  int ret;
 
   /* Shut up coverity */
   memset (hwaddr, 0, sizeof (hwaddr));
@@ -11188,9 +11270,8 @@ api_create_vhost_user_if (vat_main_t * vam)
   vec_free (tag);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11204,6 +11285,7 @@ api_modify_vhost_user_if (vat_main_t * vam)
   u32 custom_dev_instance = ~0;
   u8 sw_if_index_set = 0;
   u32 sw_if_index = (u32) ~ 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11255,9 +11337,8 @@ api_modify_vhost_user_if (vat_main_t * vam)
     }
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11267,6 +11348,7 @@ api_delete_vhost_user_if (vat_main_t * vam)
   vl_api_delete_vhost_user_if_t *mp;
   u32 sw_if_index = ~0;
   u8 sw_if_index_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11290,9 +11372,8 @@ api_delete_vhost_user_if (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_sw_interface_vhost_user_details_t_handler
@@ -11339,6 +11420,8 @@ static int
 api_sw_interface_vhost_user_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_vhost_user_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
   print (vam->ofp,
         "Interface name           idx hdr_sz features server regions filename");
 
@@ -11347,25 +11430,24 @@ api_sw_interface_vhost_user_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
 api_show_version (vat_main_t * vam)
 {
   vl_api_show_version_t *mp;
+  int ret;
 
   M (SHOW_VERSION, mp);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 
@@ -11385,6 +11467,7 @@ api_vxlan_gpe_add_del_tunnel (vat_main_t * vam)
   u8 protocol = ~0;
   u32 vni;
   u8 vni_set = 0;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -11479,9 +11562,8 @@ api_vxlan_gpe_add_del_tunnel (vat_main_t * vam)
   mp->is_ipv6 = ipv6_set;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_vxlan_gpe_tunnel_details_t_handler
@@ -11541,8 +11623,10 @@ api_vxlan_gpe_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_vxlan_gpe_tunnel_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -11573,12 +11657,11 @@ api_vxlan_gpe_tunnel_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 u8 *
@@ -11629,8 +11712,10 @@ api_l2_fib_table_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2_fib_table_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u32 bd_id;
   u8 bd_id_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -11656,12 +11741,11 @@ api_l2_fib_table_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 
@@ -11672,6 +11756,7 @@ api_interface_name_renumber (vat_main_t * vam)
   vl_api_interface_name_renumber_t *mp;
   u32 sw_if_index = ~0;
   u32 new_show_dev_instance = ~0;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -11705,7 +11790,8 @@ api_interface_name_renumber (vat_main_t * vam)
   mp->new_show_dev_instance = ntohl (new_show_dev_instance);
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11716,6 +11802,7 @@ api_want_ip4_arp_events (vat_main_t * vam)
   ip4_address_t address;
   int address_set = 0;
   u32 enable_disable = 1;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -11739,7 +11826,8 @@ api_want_ip4_arp_events (vat_main_t * vam)
   mp->address = address.as_u32;
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11750,6 +11838,7 @@ api_want_ip6_nd_events (vat_main_t * vam)
   ip6_address_t address;
   int address_set = 0;
   u32 enable_disable = 1;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -11773,7 +11862,8 @@ api_want_ip6_nd_events (vat_main_t * vam)
   clib_memcpy (mp->address, &address, sizeof (ip6_address_t));
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11787,6 +11877,7 @@ api_input_acl_set_interface (vat_main_t * vam)
   u32 ip6_table_index = ~0;
   u32 l2_table_index = ~0;
   u8 is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11824,9 +11915,8 @@ api_input_acl_set_interface (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11834,10 +11924,12 @@ api_ip_address_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ip_address_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u32 sw_if_index = ~0;
   u8 sw_if_index_set = 0;
   u8 ipv4_set = 0;
   u8 ipv6_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11881,23 +11973,24 @@ api_ip_address_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
 api_ip_dump (vat_main_t * vam)
 {
   vl_api_ip_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   unformat_input_t *in = vam->input;
   int ipv4_set = 0;
   int ipv6_set = 0;
   int is_ipv6;
   int i;
+  int ret;
 
   while (unformat_check_input (in) != UNFORMAT_END_OF_INPUT)
     {
@@ -11936,12 +12029,11 @@ api_ip_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11951,6 +12043,7 @@ api_ipsec_spd_add_del (vat_main_t * vam)
   vl_api_ipsec_spd_add_del_t *mp;
   u32 spd_id = ~0;
   u8 is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11976,9 +12069,8 @@ api_ipsec_spd_add_del (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11990,6 +12082,7 @@ api_ipsec_interface_add_del_spd (vat_main_t * vam)
   u8 sw_if_index_set = 0;
   u32 spd_id = (u32) ~ 0;
   u8 is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12029,9 +12122,8 @@ api_ipsec_interface_add_del_spd (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12046,6 +12138,7 @@ api_ipsec_spd_add_del_entry (vat_main_t * vam)
   u32 lport_start = 0, lport_stop = (u32) ~ 0;
   ip4_address_t laddr4_start, laddr4_stop, raddr4_start, raddr4_stop;
   ip6_address_t laddr6_start, laddr6_stop, raddr6_start, raddr6_stop;
+  int ret;
 
   laddr4_start.as_u32 = raddr4_start.as_u32 = 0;
   laddr4_stop.as_u32 = raddr4_stop.as_u32 = (u32) ~ 0;
@@ -12186,9 +12279,8 @@ api_ipsec_spd_add_del_entry (vat_main_t * vam)
   mp->is_add = is_add;
   mp->is_ip_any = is_ip_any;
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12207,6 +12299,7 @@ api_ipsec_sad_add_del_entry (vat_main_t * vam)
   ip4_address_t tun_dst4;
   ip6_address_t tun_src6;
   ip6_address_t tun_dst6;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12317,9 +12410,8 @@ api_ipsec_sad_add_del_entry (vat_main_t * vam)
     }
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12329,6 +12421,7 @@ api_ipsec_sa_set_key (vat_main_t * vam)
   vl_api_ipsec_sa_set_key_t *mp;
   u32 sa_id;
   u8 *ck = 0, *ik = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12363,9 +12456,8 @@ api_ipsec_sa_set_key (vat_main_t * vam)
     clib_memcpy (mp->integrity_key, ik, mp->integrity_key_length);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12375,6 +12467,7 @@ api_ikev2_profile_add_del (vat_main_t * vam)
   vl_api_ikev2_profile_add_del_t *mp;
   u8 is_add = 1;
   u8 *name = 0;
+  int ret;
 
   const char *valid_chars = "a-zA-Z0-9_";
 
@@ -12410,9 +12503,8 @@ api_ikev2_profile_add_del (vat_main_t * vam)
   vec_free (name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12424,6 +12516,7 @@ api_ikev2_profile_set_auth (vat_main_t * vam)
   u8 *data = 0;
   u32 auth_method = 0;
   u8 is_hex = 0;
+  int ret;
 
   const char *valid_chars = "a-zA-Z0-9_";
 
@@ -12480,9 +12573,8 @@ api_ikev2_profile_set_auth (vat_main_t * vam)
   vec_free (data);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12495,6 +12587,7 @@ api_ikev2_profile_set_id (vat_main_t * vam)
   u8 is_local = 0;
   u32 id_type = 0;
   ip4_address_t ip4;
+  int ret;
 
   const char *valid_chars = "a-zA-Z0-9_";
 
@@ -12559,9 +12652,8 @@ api_ikev2_profile_set_id (vat_main_t * vam)
   vec_free (data);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12575,6 +12667,7 @@ api_ikev2_profile_set_ts (vat_main_t * vam)
   ip4_address_t start_addr, end_addr;
 
   const char *valid_chars = "a-zA-Z0-9_";
+  int ret;
 
   start_addr.as_u32 = 0;
   end_addr.as_u32 = (u32) ~ 0;
@@ -12629,9 +12722,8 @@ api_ikev2_profile_set_ts (vat_main_t * vam)
   vec_free (name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12640,6 +12732,7 @@ api_ikev2_set_local_key (vat_main_t * vam)
   unformat_input_t *i = vam->input;
   vl_api_ikev2_set_local_key_t *mp;
   u8 *file = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12670,101 +12763,433 @@ api_ikev2_set_local_key (vat_main_t * vam)
   vec_free (file);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
-/*
- * MAP
- */
 static int
-api_map_add_domain (vat_main_t * vam)
+api_ikev2_set_responder (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
-  vl_api_map_add_domain_t *mp;
+  vl_api_ikev2_set_responder_t *mp;
+  int ret;
+  u8 *name = 0;
+  u32 sw_if_index = ~0;
+  ip4_address_t address;
 
-  ip4_address_t ip4_prefix;
-  ip6_address_t ip6_prefix;
-  ip6_address_t ip6_src;
-  u32 num_m_args = 0;
-  u32 ip6_prefix_len = 0, ip4_prefix_len = 0, ea_bits_len = 0, psid_offset =
-    0, psid_length = 0;
-  u8 is_translation = 0;
-  u32 mtu = 0;
-  u32 ip6_src_len = 128;
+  const char *valid_chars = "a-zA-Z0-9_";
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
-      if (unformat (i, "ip4-pfx %U/%d", unformat_ip4_address,
-                   &ip4_prefix, &ip4_prefix_len))
-       num_m_args++;
-      else if (unformat (i, "ip6-pfx %U/%d", unformat_ip6_address,
-                        &ip6_prefix, &ip6_prefix_len))
-       num_m_args++;
-      else
-       if (unformat
-           (i, "ip6-src %U/%d", unformat_ip6_address, &ip6_src,
-            &ip6_src_len))
-       num_m_args++;
-      else if (unformat (i, "ip6-src %U", unformat_ip6_address, &ip6_src))
-       num_m_args++;
-      else if (unformat (i, "ea-bits-len %d", &ea_bits_len))
-       num_m_args++;
-      else if (unformat (i, "psid-offset %d", &psid_offset))
-       num_m_args++;
-      else if (unformat (i, "psid-len %d", &psid_length))
-       num_m_args++;
-      else if (unformat (i, "mtu %d", &mtu))
-       num_m_args++;
-      else if (unformat (i, "map-t"))
-       is_translation = 1;
+      if (unformat
+         (i, "%U interface %d address %U", unformat_token, valid_chars,
+          &name, &sw_if_index, unformat_ip4_address, &address))
+       vec_add1 (name, 0);
       else
        {
-         clib_warning ("parse error '%U'", format_unformat_error, i);
+         errmsg ("parse error '%U'", format_unformat_error, i);
          return -99;
        }
     }
 
-  if (num_m_args < 3)
+  if (!vec_len (name))
     {
-      errmsg ("mandatory argument(s) missing");
+      errmsg ("profile name must be specified");
       return -99;
     }
 
-  /* Construct the API message */
-  M (MAP_ADD_DOMAIN, mp);
-
-  clib_memcpy (mp->ip4_prefix, &ip4_prefix, sizeof (ip4_prefix));
-  mp->ip4_prefix_len = ip4_prefix_len;
+  if (vec_len (name) > 64)
+    {
+      errmsg ("profile name too long");
+      return -99;
+    }
 
-  clib_memcpy (mp->ip6_prefix, &ip6_prefix, sizeof (ip6_prefix));
-  mp->ip6_prefix_len = ip6_prefix_len;
+  M (IKEV2_SET_RESPONDER, mp);
 
-  clib_memcpy (mp->ip6_src, &ip6_src, sizeof (ip6_src));
-  mp->ip6_src_prefix_len = ip6_src_len;
+  clib_memcpy (mp->name, name, vec_len (name));
+  vec_free (name);
 
-  mp->ea_bits_len = ea_bits_len;
-  mp->psid_offset = psid_offset;
-  mp->psid_length = psid_length;
-  mp->is_translation = is_translation;
-  mp->mtu = htons (mtu);
+  mp->sw_if_index = sw_if_index;
+  clib_memcpy (mp->address, &address, sizeof (address));
 
-  /* send it... */
   S (mp);
-
-  /* Wait for a reply, return good/bad news  */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
-api_map_del_domain (vat_main_t * vam)
+api_ikev2_set_ike_transforms (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
-  vl_api_map_del_domain_t *mp;
+  vl_api_ikev2_set_ike_transforms_t *mp;
+  int ret;
+  u8 *name = 0;
+  u32 crypto_alg, crypto_key_size, integ_alg, dh_group;
 
-  u32 num_m_args = 0;
-  u32 index;
+  const char *valid_chars = "a-zA-Z0-9_";
+
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "%U %d %d %d %d", unformat_token, valid_chars, &name,
+                   &crypto_alg, &crypto_key_size, &integ_alg, &dh_group))
+       vec_add1 (name, 0);
+      else
+       {
+         errmsg ("parse error '%U'", format_unformat_error, i);
+         return -99;
+       }
+    }
+
+  if (!vec_len (name))
+    {
+      errmsg ("profile name must be specified");
+      return -99;
+    }
+
+  if (vec_len (name) > 64)
+    {
+      errmsg ("profile name too long");
+      return -99;
+    }
+
+  M (IKEV2_SET_IKE_TRANSFORMS, mp);
+
+  clib_memcpy (mp->name, name, vec_len (name));
+  vec_free (name);
+  mp->crypto_alg = crypto_alg;
+  mp->crypto_key_size = crypto_key_size;
+  mp->integ_alg = integ_alg;
+  mp->dh_group = dh_group;
+
+  S (mp);
+  W (ret);
+  return ret;
+}
+
+
+static int
+api_ikev2_set_esp_transforms (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_ikev2_set_esp_transforms_t *mp;
+  int ret;
+  u8 *name = 0;
+  u32 crypto_alg, crypto_key_size, integ_alg, dh_group;
+
+  const char *valid_chars = "a-zA-Z0-9_";
+
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "%U %d %d %d %d", unformat_token, valid_chars, &name,
+                   &crypto_alg, &crypto_key_size, &integ_alg, &dh_group))
+       vec_add1 (name, 0);
+      else
+       {
+         errmsg ("parse error '%U'", format_unformat_error, i);
+         return -99;
+       }
+    }
+
+  if (!vec_len (name))
+    {
+      errmsg ("profile name must be specified");
+      return -99;
+    }
+
+  if (vec_len (name) > 64)
+    {
+      errmsg ("profile name too long");
+      return -99;
+    }
+
+  M (IKEV2_SET_ESP_TRANSFORMS, mp);
+
+  clib_memcpy (mp->name, name, vec_len (name));
+  vec_free (name);
+  mp->crypto_alg = crypto_alg;
+  mp->crypto_key_size = crypto_key_size;
+  mp->integ_alg = integ_alg;
+  mp->dh_group = dh_group;
+
+  S (mp);
+  W (ret);
+  return ret;
+}
+
+static int
+api_ikev2_set_sa_lifetime (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_ikev2_set_sa_lifetime_t *mp;
+  int ret;
+  u8 *name = 0;
+  u64 lifetime, lifetime_maxdata;
+  u32 lifetime_jitter, handover;
+
+  const char *valid_chars = "a-zA-Z0-9_";
+
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "%U %lu %u %u %lu", unformat_token, valid_chars, &name,
+                   &lifetime, &lifetime_jitter, &handover,
+                   &lifetime_maxdata))
+       vec_add1 (name, 0);
+      else
+       {
+         errmsg ("parse error '%U'", format_unformat_error, i);
+         return -99;
+       }
+    }
+
+  if (!vec_len (name))
+    {
+      errmsg ("profile name must be specified");
+      return -99;
+    }
+
+  if (vec_len (name) > 64)
+    {
+      errmsg ("profile name too long");
+      return -99;
+    }
+
+  M (IKEV2_SET_SA_LIFETIME, mp);
+
+  clib_memcpy (mp->name, name, vec_len (name));
+  vec_free (name);
+  mp->lifetime = lifetime;
+  mp->lifetime_jitter = lifetime_jitter;
+  mp->handover = handover;
+  mp->lifetime_maxdata = lifetime_maxdata;
+
+  S (mp);
+  W (ret);
+  return ret;
+}
+
+static int
+api_ikev2_initiate_sa_init (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_ikev2_initiate_sa_init_t *mp;
+  int ret;
+  u8 *name = 0;
+
+  const char *valid_chars = "a-zA-Z0-9_";
+
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "%U", unformat_token, valid_chars, &name))
+       vec_add1 (name, 0);
+      else
+       {
+         errmsg ("parse error '%U'", format_unformat_error, i);
+         return -99;
+       }
+    }
+
+  if (!vec_len (name))
+    {
+      errmsg ("profile name must be specified");
+      return -99;
+    }
+
+  if (vec_len (name) > 64)
+    {
+      errmsg ("profile name too long");
+      return -99;
+    }
+
+  M (IKEV2_INITIATE_SA_INIT, mp);
+
+  clib_memcpy (mp->name, name, vec_len (name));
+  vec_free (name);
+
+  S (mp);
+  W (ret);
+  return ret;
+}
+
+static int
+api_ikev2_initiate_del_ike_sa (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_ikev2_initiate_del_ike_sa_t *mp;
+  int ret;
+  u64 ispi;
+
+
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "%lx", &ispi))
+       ;
+      else
+       {
+         errmsg ("parse error '%U'", format_unformat_error, i);
+         return -99;
+       }
+    }
+
+  M (IKEV2_INITIATE_DEL_IKE_SA, mp);
+
+  mp->ispi = ispi;
+
+  S (mp);
+  W (ret);
+  return ret;
+}
+
+static int
+api_ikev2_initiate_del_child_sa (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_ikev2_initiate_del_child_sa_t *mp;
+  int ret;
+  u32 ispi;
+
+
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "%x", &ispi))
+       ;
+      else
+       {
+         errmsg ("parse error '%U'", format_unformat_error, i);
+         return -99;
+       }
+    }
+
+  M (IKEV2_INITIATE_DEL_CHILD_SA, mp);
+
+  mp->ispi = ispi;
+
+  S (mp);
+  W (ret);
+  return ret;
+}
+
+static int
+api_ikev2_initiate_rekey_child_sa (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_ikev2_initiate_rekey_child_sa_t *mp;
+  int ret;
+  u32 ispi;
+
+
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "%x", &ispi))
+       ;
+      else
+       {
+         errmsg ("parse error '%U'", format_unformat_error, i);
+         return -99;
+       }
+    }
+
+  M (IKEV2_INITIATE_REKEY_CHILD_SA, mp);
+
+  mp->ispi = ispi;
+
+  S (mp);
+  W (ret);
+  return ret;
+}
+
+/*
+ * MAP
+ */
+static int
+api_map_add_domain (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_map_add_domain_t *mp;
+
+  ip4_address_t ip4_prefix;
+  ip6_address_t ip6_prefix;
+  ip6_address_t ip6_src;
+  u32 num_m_args = 0;
+  u32 ip6_prefix_len = 0, ip4_prefix_len = 0, ea_bits_len = 0, psid_offset =
+    0, psid_length = 0;
+  u8 is_translation = 0;
+  u32 mtu = 0;
+  u32 ip6_src_len = 128;
+  int ret;
+
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "ip4-pfx %U/%d", unformat_ip4_address,
+                   &ip4_prefix, &ip4_prefix_len))
+       num_m_args++;
+      else if (unformat (i, "ip6-pfx %U/%d", unformat_ip6_address,
+                        &ip6_prefix, &ip6_prefix_len))
+       num_m_args++;
+      else
+       if (unformat
+           (i, "ip6-src %U/%d", unformat_ip6_address, &ip6_src,
+            &ip6_src_len))
+       num_m_args++;
+      else if (unformat (i, "ip6-src %U", unformat_ip6_address, &ip6_src))
+       num_m_args++;
+      else if (unformat (i, "ea-bits-len %d", &ea_bits_len))
+       num_m_args++;
+      else if (unformat (i, "psid-offset %d", &psid_offset))
+       num_m_args++;
+      else if (unformat (i, "psid-len %d", &psid_length))
+       num_m_args++;
+      else if (unformat (i, "mtu %d", &mtu))
+       num_m_args++;
+      else if (unformat (i, "map-t"))
+       is_translation = 1;
+      else
+       {
+         clib_warning ("parse error '%U'", format_unformat_error, i);
+         return -99;
+       }
+    }
+
+  if (num_m_args < 3)
+    {
+      errmsg ("mandatory argument(s) missing");
+      return -99;
+    }
+
+  /* Construct the API message */
+  M (MAP_ADD_DOMAIN, mp);
+
+  clib_memcpy (mp->ip4_prefix, &ip4_prefix, sizeof (ip4_prefix));
+  mp->ip4_prefix_len = ip4_prefix_len;
+
+  clib_memcpy (mp->ip6_prefix, &ip6_prefix, sizeof (ip6_prefix));
+  mp->ip6_prefix_len = ip6_prefix_len;
+
+  clib_memcpy (mp->ip6_src, &ip6_src, sizeof (ip6_src));
+  mp->ip6_src_prefix_len = ip6_src_len;
+
+  mp->ea_bits_len = ea_bits_len;
+  mp->psid_offset = psid_offset;
+  mp->psid_length = psid_length;
+  mp->is_translation = is_translation;
+  mp->mtu = htons (mtu);
+
+  /* send it... */
+  S (mp);
+
+  /* Wait for a reply, return good/bad news  */
+  W (ret);
+  return ret;
+}
+
+static int
+api_map_del_domain (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_map_del_domain_t *mp;
+
+  u32 num_m_args = 0;
+  u32 index;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12792,7 +13217,8 @@ api_map_del_domain (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12803,6 +13229,7 @@ api_map_add_del_rule (vat_main_t * vam)
   u8 is_add = 1;
   ip6_address_t ip6_dst;
   u32 num_m_args = 0, index, psid = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12835,13 +13262,16 @@ api_map_add_del_rule (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
 api_map_domain_dump (vat_main_t * vam)
 {
   vl_api_map_domain_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   /* Construct the API message */
   M (MAP_DOMAIN_DUMP, mp);
@@ -12850,12 +13280,11 @@ api_map_domain_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12863,7 +13292,9 @@ api_map_rule_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_map_rule_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u32 domain_index = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12888,12 +13319,11 @@ api_map_rule_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static void vl_api_map_add_domain_reply_t_handler
@@ -12937,6 +13367,7 @@ api_get_first_msg_id (vat_main_t * vam)
   unformat_input_t *i = vam->input;
   u8 *name;
   u8 name_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12962,9 +13393,8 @@ api_get_first_msg_id (vat_main_t * vam)
   M (GET_FIRST_MSG_ID, mp);
   clib_memcpy (mp->name, name, vec_len (name));
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12974,6 +13404,7 @@ api_cop_interface_enable_disable (vat_main_t * vam)
   vl_api_cop_interface_enable_disable_t *mp;
   u32 sw_if_index = ~0;
   u8 enable_disable = 1;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -13004,7 +13435,8 @@ api_cop_interface_enable_disable (vat_main_t * vam)
   /* send it... */
   S (mp);
   /* Wait for the reply */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13015,6 +13447,7 @@ api_cop_whitelist_enable_disable (vat_main_t * vam)
   u32 sw_if_index = ~0;
   u8 ip4 = 0, ip6 = 0, default_cop = 0;
   u32 fib_id = 0;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -13052,20 +13485,23 @@ api_cop_whitelist_enable_disable (vat_main_t * vam)
   /* send it... */
   S (mp);
   /* Wait for the reply */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
 api_get_node_graph (vat_main_t * vam)
 {
   vl_api_get_node_graph_t *mp;
+  int ret;
 
   M (GET_NODE_GRAPH, mp);
 
   /* send it... */
   S (mp);
   /* Wait for the reply */
-  W;
+  W (ret);
+  return ret;
 }
 
 /* *INDENT-OFF* */
@@ -13142,6 +13578,7 @@ api_lisp_add_del_locator_set (vat_main_t * vam)
   u32 sw_if_index, priority, weight;
   u32 data_len = 0;
 
+  int ret;
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
@@ -13210,10 +13647,8 @@ api_lisp_add_del_locator_set (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13232,6 +13667,7 @@ api_lisp_add_del_locator (vat_main_t * vam)
   u8 is_add = 1;
   u8 *locator_set_name = NULL;
   u8 locator_set_name_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13324,10 +13760,8 @@ api_lisp_add_del_locator (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 uword
@@ -13368,6 +13802,7 @@ api_lisp_add_del_local_eid (vat_main_t * vam)
   u32 vni = 0;
   u16 key_id = 0;
   u8 *key = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13450,10 +13885,8 @@ api_lisp_add_del_local_eid (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /* *INDENT-OFF* */
@@ -13472,7 +13905,7 @@ api_lisp_gpe_add_del_fwd_entry (vat_main_t * vam)
 {
   u32 dp_table = 0, vni = 0;;
   unformat_input_t *input = vam->input;
-  vl_api_lisp_gpe_add_del_fwd_entry_t *mp;
+  vl_api_gpe_add_del_fwd_entry_t *mp;
   u8 is_add = 1;
   lisp_eid_vat_t _rmt_eid, *rmt_eid = &_rmt_eid;
   lisp_eid_vat_t _lcl_eid, *lcl_eid = &_lcl_eid;
@@ -13480,8 +13913,8 @@ api_lisp_gpe_add_del_fwd_entry (vat_main_t * vam)
   u32 action = ~0, w;
   ip4_address_t rmt_rloc4, lcl_rloc4;
   ip6_address_t rmt_rloc6, lcl_rloc6;
-  vl_api_lisp_gpe_locator_t *rmt_locs = 0, *lcl_locs = 0, rloc, *curr_rloc =
-    0;
+  vl_api_gpe_locator_t *rmt_locs = 0, *lcl_locs = 0, rloc, *curr_rloc = 0;
+  int ret;
 
   memset (&rloc, 0, sizeof (rloc));
 
@@ -13572,8 +14005,8 @@ api_lisp_gpe_add_del_fwd_entry (vat_main_t * vam)
     }
 
   /* Construct the API message */
-  M2 (LISP_GPE_ADD_DEL_FWD_ENTRY, mp,
-      sizeof (vl_api_lisp_gpe_locator_t) * vec_len (rmt_locs) * 2);
+  M2 (GPE_ADD_DEL_FWD_ENTRY, mp,
+      sizeof (vl_api_gpe_locator_t) * vec_len (rmt_locs) * 2);
 
   mp->is_add = is_add;
   lisp_eid_put_vat (mp->rmt_eid, rmt_eid->addr, rmt_eid->type);
@@ -13589,11 +14022,11 @@ api_lisp_gpe_add_del_fwd_entry (vat_main_t * vam)
     {
       mp->loc_num = clib_host_to_net_u32 (vec_len (rmt_locs) * 2);
       clib_memcpy (mp->locs, lcl_locs,
-                  (sizeof (vl_api_lisp_gpe_locator_t) * vec_len (lcl_locs)));
+                  (sizeof (vl_api_gpe_locator_t) * vec_len (lcl_locs)));
 
-      u32 offset = sizeof (vl_api_lisp_gpe_locator_t) * vec_len (lcl_locs);
+      u32 offset = sizeof (vl_api_gpe_locator_t) * vec_len (lcl_locs);
       clib_memcpy (((u8 *) mp->locs) + offset, rmt_locs,
-                  (sizeof (vl_api_lisp_gpe_locator_t) * vec_len (rmt_locs)));
+                  (sizeof (vl_api_gpe_locator_t) * vec_len (rmt_locs)));
     }
   vec_free (lcl_locs);
   vec_free (rmt_locs);
@@ -13602,10 +14035,8 @@ api_lisp_gpe_add_del_fwd_entry (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13618,6 +14049,7 @@ api_lisp_add_del_map_server (vat_main_t * vam)
   u8 ipv6_set = 0;
   ip4_address_t ipv4;
   ip6_address_t ipv6;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13669,10 +14101,8 @@ api_lisp_add_del_map_server (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13685,6 +14115,7 @@ api_lisp_add_del_map_resolver (vat_main_t * vam)
   u8 ipv6_set = 0;
   ip4_address_t ipv4;
   ip6_address_t ipv6;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13736,19 +14167,18 @@ api_lisp_add_del_map_resolver (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_gpe_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
-  vl_api_lisp_gpe_enable_disable_t *mp;
+  vl_api_gpe_enable_disable_t *mp;
   u8 is_set = 0;
   u8 is_en = 1;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13774,7 +14204,7 @@ api_lisp_gpe_enable_disable (vat_main_t * vam)
     }
 
   /* Construct the API message */
-  M (LISP_GPE_ENABLE_DISABLE, mp);
+  M (GPE_ENABLE_DISABLE, mp);
 
   mp->is_en = is_en;
 
@@ -13782,10 +14212,8 @@ api_lisp_gpe_enable_disable (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13795,6 +14223,7 @@ api_lisp_rloc_probe_enable_disable (vat_main_t * vam)
   vl_api_lisp_rloc_probe_enable_disable_t *mp;
   u8 is_set = 0;
   u8 is_en = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13825,10 +14254,8 @@ api_lisp_rloc_probe_enable_disable (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13838,6 +14265,7 @@ api_lisp_map_register_enable_disable (vat_main_t * vam)
   vl_api_lisp_map_register_enable_disable_t *mp;
   u8 is_set = 0;
   u8 is_en = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13868,10 +14296,8 @@ api_lisp_map_register_enable_disable (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13881,6 +14307,7 @@ api_lisp_enable_disable (vat_main_t * vam)
   vl_api_lisp_enable_disable_t *mp;
   u8 is_set = 0;
   u8 is_en = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13913,16 +14340,15 @@ api_lisp_enable_disable (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_show_lisp_map_register_state (vat_main_t * vam)
 {
   vl_api_show_lisp_map_register_state_t *mp;
+  int ret;
 
   M (SHOW_LISP_MAP_REGISTER_STATE, mp);
 
@@ -13930,15 +14356,15 @@ api_show_lisp_map_register_state (vat_main_t * vam)
   S (mp);
 
   /* wait for reply */
-  W;
-
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_show_lisp_rloc_probe_state (vat_main_t * vam)
 {
   vl_api_show_lisp_rloc_probe_state_t *mp;
+  int ret;
 
   M (SHOW_LISP_RLOC_PROBE_STATE, mp);
 
@@ -13946,15 +14372,15 @@ api_show_lisp_rloc_probe_state (vat_main_t * vam)
   S (mp);
 
   /* wait for reply */
-  W;
-
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_show_lisp_map_request_mode (vat_main_t * vam)
 {
   vl_api_show_lisp_map_request_mode_t *mp;
+  int ret;
 
   M (SHOW_LISP_MAP_REQUEST_MODE, mp);
 
@@ -13962,9 +14388,8 @@ api_show_lisp_map_request_mode (vat_main_t * vam)
   S (mp);
 
   /* wait for reply */
-  W;
-
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13973,6 +14398,7 @@ api_lisp_map_request_mode (vat_main_t * vam)
   unformat_input_t *input = vam->input;
   vl_api_lisp_map_request_mode_t *mp;
   u8 mode = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -13996,10 +14422,8 @@ api_lisp_map_request_mode (vat_main_t * vam)
   S (mp);
 
   /* wait for reply */
-  W;
-
-  /* notreached */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /**
@@ -14016,6 +14440,7 @@ api_lisp_pitr_set_locator_set (vat_main_t * vam)
   vl_api_lisp_pitr_set_locator_set_t *mp;
   u8 is_add = 1;
   u8 *ls_name = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14047,16 +14472,15 @@ api_lisp_pitr_set_locator_set (vat_main_t * vam)
   S (mp);
 
   /* wait for reply */
-  W;
-
-  /* notreached */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_show_lisp_pitr (vat_main_t * vam)
 {
   vl_api_show_lisp_pitr_t *mp;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -14068,10 +14492,8 @@ api_show_lisp_pitr (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /**
@@ -14084,6 +14506,7 @@ api_lisp_eid_table_add_del_map (vat_main_t * vam)
   vl_api_lisp_eid_table_add_del_map_t *mp;
   u8 is_add = 1, vni_set = 0, vrf_set = 0, bd_index_set = 0;
   u32 vni, vrf, bd_index;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14123,10 +14546,8 @@ api_lisp_eid_table_add_del_map (vat_main_t * vam)
   S (mp);
 
   /* wait for reply */
-  W;
-
-  /* notreached */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 uword
@@ -14177,6 +14598,7 @@ api_lisp_add_del_remote_mapping (vat_main_t * vam)
   ip4_address_t rloc4;
   ip6_address_t rloc6;
   vl_api_remote_locator_t *rlocs = 0, rloc, *curr_rloc = 0;
+  int ret;
 
   memset (&rloc, 0, sizeof (rloc));
 
@@ -14277,10 +14699,8 @@ api_lisp_add_del_remote_mapping (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /**
@@ -14303,6 +14723,7 @@ api_lisp_add_del_adjacency (vat_main_t * vam)
   u8 reid_type, leid_type;
   u32 leid_len = 0, reid_len = 0, len;
   u8 is_add = 1;
+  int ret;
 
   leid_type = reid_type = (u8) ~ 0;
 
@@ -14404,19 +14825,18 @@ api_lisp_add_del_adjacency (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_gpe_add_del_iface (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
-  vl_api_lisp_gpe_add_del_iface_t *mp;
+  vl_api_gpe_add_del_iface_t *mp;
   u8 action_set = 0, is_add = 1, is_l2 = 0, dp_table_set = 0, vni_set = 0;
   u32 dp_table = 0, vni = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14460,7 +14880,7 @@ api_lisp_gpe_add_del_iface (vat_main_t * vam)
     }
 
   /* Construct the API message */
-  M (LISP_GPE_ADD_DEL_IFACE, mp);
+  M (GPE_ADD_DEL_IFACE, mp);
 
   mp->is_add = is_add;
   mp->dp_table = dp_table;
@@ -14471,10 +14891,8 @@ api_lisp_gpe_add_del_iface (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /**
@@ -14491,6 +14909,7 @@ api_lisp_add_del_map_request_itr_rlocs (vat_main_t * vam)
   u8 *locator_set_name = 0;
   u8 locator_set_name_set = 0;
   u8 is_add = 1;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14540,10 +14959,8 @@ api_lisp_add_del_map_request_itr_rlocs (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -14551,9 +14968,11 @@ api_lisp_locator_dump (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_locator_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u8 is_index_set = 0, is_name_set = 0;
   u8 *ls_name = 0;
   u32 ls_index = ~0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14612,24 +15031,22 @@ api_lisp_locator_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  /* Wait for a reply... */
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
-  /* NOTREACHED */
-  return 0;
+  /* Wait for a reply... */
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_locator_set_dump (vat_main_t * vam)
 {
   vl_api_lisp_locator_set_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   unformat_input_t *input = vam->input;
   u8 filter = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14662,16 +15079,12 @@ api_lisp_locator_set_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  /* Wait for a reply... */
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
-  /* NOTREACHED */
-  return 0;
+  /* Wait for a reply... */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -14681,6 +15094,8 @@ api_lisp_eid_table_map_dump (vat_main_t * vam)
   u8 mode_set = 0;
   unformat_input_t *input = vam->input;
   vl_api_lisp_eid_table_map_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14720,22 +15135,20 @@ api_lisp_eid_table_map_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  /* Wait for a reply... */
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
-  /* NOTREACHED */
-  return 0;
+  /* Wait for a reply... */
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_eid_table_vni_dump (vat_main_t * vam)
 {
   vl_api_lisp_eid_table_vni_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -14748,16 +15161,12 @@ api_lisp_eid_table_vni_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  /* Wait for a reply... */
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
-  /* NOTREACHED */
-  return 0;
+  /* Wait for a reply... */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -14765,12 +15174,14 @@ api_lisp_eid_table_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_lisp_eid_table_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   struct in_addr ip4;
   struct in6_addr ip6;
   u8 mac[6];
   u8 eid_type = ~0, eid_set = 0;
   u32 prefix_length = ~0, t, vni = 0;
   u8 filter = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -14847,26 +15258,22 @@ api_lisp_eid_table_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_gpe_fwd_entries_get (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
-  vl_api_lisp_gpe_fwd_entries_get_t *mp;
+  vl_api_gpe_fwd_entries_get_t *mp;
   u8 vni_set = 0;
   u32 vni = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -14893,23 +15300,21 @@ api_lisp_gpe_fwd_entries_get (vat_main_t * vam)
             "leid", "reid");
     }
 
-  M (LISP_GPE_FWD_ENTRIES_GET, mp);
+  M (GPE_FWD_ENTRIES_GET, mp);
   mp->vni = clib_host_to_net_u32 (vni);
 
   /* send it... */
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
-#define vl_api_lisp_gpe_fwd_entries_get_reply_t_endian vl_noop_handler
-#define vl_api_lisp_gpe_fwd_entries_get_reply_t_print vl_noop_handler
-#define vl_api_lisp_gpe_fwd_entry_path_details_t_endian vl_noop_handler
-#define vl_api_lisp_gpe_fwd_entry_path_details_t_print vl_noop_handler
+#define vl_api_gpe_fwd_entries_get_reply_t_endian vl_noop_handler
+#define vl_api_gpe_fwd_entries_get_reply_t_print vl_noop_handler
+#define vl_api_gpe_fwd_entry_path_details_t_endian vl_noop_handler
+#define vl_api_gpe_fwd_entry_path_details_t_print vl_noop_handler
 
 static int
 api_lisp_adjacencies_get (vat_main_t * vam)
@@ -14918,6 +15323,7 @@ api_lisp_adjacencies_get (vat_main_t * vam)
   vl_api_lisp_adjacencies_get_t *mp;
   u8 vni_set = 0;
   u32 vni = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -14950,16 +15356,16 @@ api_lisp_adjacencies_get (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_map_server_dump (vat_main_t * vam)
 {
   vl_api_lisp_map_server_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -14971,22 +15377,20 @@ api_lisp_map_server_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  /* Wait for a reply... */
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
-  /* NOTREACHED */
-  return 0;
+  /* Wait for a reply... */
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_map_resolver_dump (vat_main_t * vam)
 {
   vl_api_lisp_map_resolver_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -14998,22 +15402,19 @@ api_lisp_map_resolver_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  /* Wait for a reply... */
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
-  /* NOTREACHED */
-  return 0;
+  /* Wait for a reply... */
+  W (ret);
+  return ret;
 }
 
 static int
 api_show_lisp_status (vat_main_t * vam)
 {
   vl_api_show_lisp_status_t *mp;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -15024,18 +15425,18 @@ api_show_lisp_status (vat_main_t * vam)
   /* send it... */
   S (mp);
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_gpe_fwd_entry_path_dump (vat_main_t * vam)
 {
-  vl_api_lisp_gpe_fwd_entry_path_dump_t *mp;
+  vl_api_gpe_fwd_entry_path_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   unformat_input_t *i = vam->input;
   u32 fwd_entry_index = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15056,27 +15457,24 @@ api_lisp_gpe_fwd_entry_path_dump (vat_main_t * vam)
       print (vam->ofp, "first line");
     }
 
-  M (LISP_GPE_FWD_ENTRY_PATH_DUMP, mp);
+  M (GPE_FWD_ENTRY_PATH_DUMP, mp);
 
   /* send it... */
   S (mp);
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  /* Wait for a reply... */
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
-  /* NOTREACHED */
-  return 0;
+  /* Wait for a reply... */
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_get_map_request_itr_rlocs (vat_main_t * vam)
 {
   vl_api_lisp_get_map_request_itr_rlocs_t *mp;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -15087,10 +15485,8 @@ api_lisp_get_map_request_itr_rlocs (vat_main_t * vam)
   /* send it... */
   S (mp);
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15101,6 +15497,7 @@ api_af_packet_create (vat_main_t * vam)
   u8 *host_if_name = 0;
   u8 hw_addr[6];
   u8 random_hw_addr = 1;
+  int ret;
 
   memset (hw_addr, 0, sizeof (hw_addr));
 
@@ -15134,9 +15531,8 @@ api_af_packet_create (vat_main_t * vam)
   vec_free (host_if_name);
 
   S (mp);
-  W2 (fprintf (vam->ofp, " new sw_if_index = %d ", vam->sw_if_index));
-  /* NOTREACHED */
-  return 0;
+  W2 (ret, fprintf (vam->ofp, " new sw_if_index = %d ", vam->sw_if_index));
+  return ret;
 }
 
 static int
@@ -15145,6 +15541,7 @@ api_af_packet_delete (vat_main_t * vam)
   unformat_input_t *i = vam->input;
   vl_api_af_packet_delete_t *mp;
   u8 *host_if_name = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15172,9 +15569,8 @@ api_af_packet_delete (vat_main_t * vam)
   vec_free (host_if_name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15193,6 +15589,7 @@ api_policer_add_del (vat_main_t * vam)
   u8 type = 0;
   u8 color_aware = 0;
   sse2_qos_pol_action_params_st conform_action, exceed_action, violate_action;
+  int ret;
 
   conform_action.action_type = SSE2_QOS_ACTION_TRANSMIT;
   conform_action.dscp = 0;
@@ -15271,9 +15668,8 @@ api_policer_add_del (vat_main_t * vam)
   mp->color_aware = color_aware;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15281,8 +15677,10 @@ api_policer_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_policer_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u8 *match_name = 0;
   u8 match_name_valid = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15303,16 +15701,12 @@ api_policer_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  /* Wait for a reply... */
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
-  /* NOTREACHED */
-  return 0;
+  /* Wait for a reply... */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15326,6 +15720,7 @@ api_policer_classify_set_interface (vat_main_t * vam)
   u32 ip6_table_index = ~0;
   u32 l2_table_index = ~0;
   u8 is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15363,9 +15758,8 @@ api_policer_classify_set_interface (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15373,7 +15767,9 @@ api_policer_classify_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_policer_classify_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u8 type = POLICER_CLASSIFY_N_TABLES;
+  int ret;
 
   if (unformat (i, "type %U", unformat_policer_classify_table_type, &type))
     ;
@@ -15394,16 +15790,12 @@ api_policer_classify_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  /* Wait for a reply... */
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
-  /* NOTREACHED */
-  return 0;
+  /* Wait for a reply... */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15416,6 +15808,7 @@ api_netmap_create (vat_main_t * vam)
   u8 random_hw_addr = 1;
   u8 is_pipe = 0;
   u8 is_master = 0;
+  int ret;
 
   memset (hw_addr, 0, sizeof (hw_addr));
 
@@ -15457,9 +15850,8 @@ api_netmap_create (vat_main_t * vam)
   vec_free (if_name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15468,6 +15860,7 @@ api_netmap_delete (vat_main_t * vam)
   unformat_input_t *i = vam->input;
   vl_api_netmap_delete_t *mp;
   u8 *if_name = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15495,9 +15888,8 @@ api_netmap_delete (vat_main_t * vam)
   vec_free (if_name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_mpls_tunnel_details_t_handler
@@ -15553,7 +15945,9 @@ static int
 api_mpls_tunnel_dump (vat_main_t * vam)
 {
   vl_api_mpls_tunnel_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   i32 index = -1;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (vam->input) != UNFORMAT_END_OF_INPUT)
@@ -15572,12 +15966,11 @@ api_mpls_tunnel_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 #define vl_api_mpls_fib_details_t_endian vl_noop_handler
@@ -15665,17 +16058,18 @@ static int
 api_mpls_fib_dump (vat_main_t * vam)
 {
   vl_api_mpls_fib_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   M (MPLS_FIB_DUMP, mp);
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 #define vl_api_ip_fib_details_t_endian vl_noop_handler
@@ -15765,17 +16159,36 @@ static int
 api_ip_fib_dump (vat_main_t * vam)
 {
   vl_api_ip_fib_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   M (IP_FIB_DUMP, mp);
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
+}
+
+static int
+api_ip_mfib_dump (vat_main_t * vam)
+{
+  vl_api_ip_mfib_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
+
+  M (IP_MFIB_DUMP, mp);
+  S (mp);
+
+  /* Use a control ping for synchronization */
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static void vl_api_ip_neighbor_details_t_handler
@@ -15832,8 +16245,10 @@ api_ip_neighbor_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ip_neighbor_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u8 is_ipv6 = 0;
   u32 sw_if_index = ~0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -15860,12 +16275,11 @@ api_ip_neighbor_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 #define vl_api_ip6_fib_details_t_endian vl_noop_handler
@@ -15955,32 +16369,51 @@ static int
 api_ip6_fib_dump (vat_main_t * vam)
 {
   vl_api_ip6_fib_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   M (IP6_FIB_DUMP, mp);
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
+}
+
+static int
+api_ip6_mfib_dump (vat_main_t * vam)
+{
+  vl_api_ip6_mfib_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
+
+  M (IP6_MFIB_DUMP, mp);
+  S (mp);
+
+  /* Use a control ping for synchronization */
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 int
 api_classify_table_ids (vat_main_t * vam)
 {
   vl_api_classify_table_ids_t *mp;
+  int ret;
 
   /* Construct the API message */
   M (CLASSIFY_TABLE_IDS, mp);
   mp->context = 0;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 int
@@ -15990,6 +16423,7 @@ api_classify_table_by_interface (vat_main_t * vam)
   vl_api_classify_table_by_interface_t *mp;
 
   u32 sw_if_index = ~0;
+  int ret;
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (input, "%U", api_unformat_sw_if_index, vam, &sw_if_index))
@@ -16011,9 +16445,8 @@ api_classify_table_by_interface (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 int
@@ -16023,6 +16456,7 @@ api_classify_table_info (vat_main_t * vam)
   vl_api_classify_table_info_t *mp;
 
   u32 table_id = ~0;
+  int ret;
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (input, "table_id %d", &table_id))
@@ -16042,9 +16476,8 @@ api_classify_table_info (vat_main_t * vam)
   mp->table_id = ntohl (table_id);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 int
@@ -16052,8 +16485,10 @@ api_classify_session_dump (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_classify_session_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
 
   u32 table_id = ~0;
+  int ret;
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (input, "table_id %d", &table_id))
@@ -16074,14 +16509,11 @@ api_classify_session_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
-  /* NOTREACHED */
-  return 0;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static void
@@ -16135,28 +16567,30 @@ int
 api_ipfix_exporter_dump (vat_main_t * vam)
 {
   vl_api_ipfix_exporter_dump_t *mp;
+  int ret;
 
   /* Construct the API message */
   M (IPFIX_EXPORTER_DUMP, mp);
   mp->context = 0;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_ipfix_classify_stream_dump (vat_main_t * vam)
 {
   vl_api_ipfix_classify_stream_dump_t *mp;
+  int ret;
 
   /* Construct the API message */
   M (IPFIX_CLASSIFY_STREAM_DUMP, mp);
   mp->context = 0;
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
   /* NOTREACHED */
   return 0;
 }
@@ -16193,6 +16627,8 @@ static int
 api_ipfix_classify_table_dump (vat_main_t * vam)
 {
   vl_api_ipfix_classify_table_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -16207,12 +16643,11 @@ api_ipfix_classify_table_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static void
@@ -16254,6 +16689,7 @@ api_sw_interface_span_enable_disable (vat_main_t * vam)
   u32 src_sw_if_index = ~0;
   u32 dst_sw_if_index = ~0;
   u8 state = 3;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -16287,9 +16723,8 @@ api_sw_interface_span_enable_disable (vat_main_t * vam)
   mp->state = state;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void
@@ -16377,17 +16812,18 @@ static int
 api_sw_interface_span_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_span_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   M (SW_INTERFACE_SPAN_DUMP, mp);
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 int
@@ -16397,6 +16833,7 @@ api_pg_create_interface (vat_main_t * vam)
   vl_api_pg_create_interface_t *mp;
 
   u32 if_id = ~0;
+  int ret;
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (input, "if_id %d", &if_id))
@@ -16416,9 +16853,8 @@ api_pg_create_interface (vat_main_t * vam)
   mp->interface_id = ntohl (if_id);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 int
@@ -16432,6 +16868,7 @@ api_pg_capture (vat_main_t * vam)
   u32 count = 1;
   u8 pcap_file_set = 0;
   u8 *pcap_file = 0;
+  int ret;
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (input, "if_id %d", &if_id))
@@ -16474,9 +16911,8 @@ api_pg_capture (vat_main_t * vam)
   vec_free (pcap_file);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 int
@@ -16488,6 +16924,7 @@ api_pg_enable_disable (vat_main_t * vam)
   u8 enable = 1;
   u8 stream_name_set = 0;
   u8 *stream_name = 0;
+  int ret;
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (input, "stream %s", &stream_name))
@@ -16520,9 +16957,8 @@ api_pg_enable_disable (vat_main_t * vam)
   vec_free (stream_name);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 int
@@ -16543,6 +16979,7 @@ api_ip_source_and_port_range_check_add_del (vat_main_t * vam)
   u32 vrf_id = ~0;
   u8 is_add = 1;
   u8 is_ipv6 = 0;
+  int ret;
 
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
@@ -16650,9 +17087,8 @@ api_ip_source_and_port_range_check_add_del (vat_main_t * vam)
   mp->vrf_id = ntohl (vrf_id);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 int
@@ -16665,6 +17101,7 @@ api_ip_source_and_port_range_check_interface_add_del (vat_main_t * vam)
   u32 tcp_out_vrf_id = ~0, udp_out_vrf_id = ~0;
   u32 tcp_in_vrf_id = ~0, udp_in_vrf_id = ~0;
   u8 is_add = 1;
+  int ret;
 
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
@@ -16720,7 +17157,8 @@ api_ip_source_and_port_range_check_interface_add_del (vat_main_t * vam)
   S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -16733,6 +17171,7 @@ api_ipsec_gre_add_del_tunnel (vat_main_t * vam)
   ip4_address_t src_address;
   ip4_address_t dst_address;
   u8 is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -16762,9 +17201,8 @@ api_ipsec_gre_add_del_tunnel (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -16776,6 +17214,7 @@ api_punt (vat_main_t * vam)
   u32 protocol = ~0;
   u32 port = ~0;
   int is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -16802,9 +17241,8 @@ api_punt (vat_main_t * vam)
   mp->l4_port = htons ((u16) port);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_ipsec_gre_tunnel_details_t_handler
@@ -16848,8 +17286,10 @@ api_ipsec_gre_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_gre_tunnel_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -16880,12 +17320,11 @@ api_ipsec_gre_tunnel_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
@@ -16894,6 +17333,7 @@ api_delete_subif (vat_main_t * vam)
   unformat_input_t *i = vam->input;
   vl_api_delete_subif_t *mp;
   u32 sw_if_index = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -16916,7 +17356,8 @@ api_delete_subif (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 #define foreach_pbb_vtr_op      \
@@ -16936,6 +17377,7 @@ api_l2_interface_pbb_tag_rewrite (vat_main_t * vam)
   u16 vlanid = 0;
   u32 sid = ~0;
   u32 tmp;
+  int ret;
 
   /* Shut up coverity */
   memset (dmac, 0, sizeof (dmac));
@@ -17004,9 +17446,8 @@ api_l2_interface_pbb_tag_rewrite (vat_main_t * vam)
   mp->i_sid = ntohl (sid);
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17019,6 +17460,7 @@ api_flow_classify_set_interface (vat_main_t * vam)
   u32 ip4_table_index = ~0;
   u32 ip6_table_index = ~0;
   u8 is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -17053,9 +17495,8 @@ api_flow_classify_set_interface (vat_main_t * vam)
   mp->is_add = is_add;
 
   S (mp);
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17063,7 +17504,9 @@ api_flow_classify_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_flow_classify_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u8 type = FLOW_CLASSIFY_N_TABLES;
+  int ret;
 
   if (unformat (i, "type %U", unformat_flow_classify_table_type, &type))
     ;
@@ -17084,16 +17527,12 @@ api_flow_classify_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  /* Wait for a reply... */
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
-  /* NOTREACHED */
-  return 0;
+  /* Wait for a reply... */
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17105,6 +17544,7 @@ api_feature_enable_disable (vat_main_t * vam)
   u8 *feature_name = 0;
   u32 sw_if_index = ~0;
   u8 enable = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -17159,7 +17599,8 @@ api_feature_enable_disable (vat_main_t * vam)
   vec_free (feature_name);
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17170,6 +17611,7 @@ api_sw_interface_tag_add_del (vat_main_t * vam)
   u32 sw_if_index = ~0;
   u8 *tag = 0;
   u8 enable = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -17206,7 +17648,8 @@ api_sw_interface_tag_add_del (vat_main_t * vam)
   vec_free (tag);
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_l2_xconnect_details_t_handler
@@ -17242,6 +17685,8 @@ static int
 api_l2_xconnect_dump (vat_main_t * vam)
 {
   vl_api_l2_xconnect_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -17253,12 +17698,11 @@ api_l2_xconnect_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17268,6 +17712,7 @@ api_sw_interface_set_mtu (vat_main_t * vam)
   vl_api_sw_interface_set_mtu_t *mp;
   u32 sw_if_index = ~0;
   u32 mtu = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -17299,7 +17744,8 @@ api_sw_interface_set_mtu (vat_main_t * vam)
   mp->mtu = ntohs ((u16) mtu);
 
   S (mp);
-  W;
+  W (ret);
+  return ret;
 }
 
 
@@ -17862,6 +18308,14 @@ _(ikev2_profile_set_ts, "name <profile_name> protocol <proto>\n"        \
   "start_port <port> end_port <port> start_addr <ip4> end_addr <ip4>\n" \
   "(local|remote)")                                                     \
 _(ikev2_set_local_key, "file <absolute_file_path>")                     \
+_(ikev2_set_responder, "<profile_name> interface <interface> address <addr>") \
+_(ikev2_set_ike_transforms, "<profile_name> <crypto alg> <key size> <integrity alg> <DH group>") \
+_(ikev2_set_esp_transforms, "<profile_name> <crypto alg> <key size> <integrity alg> <DH group>") \
+_(ikev2_set_sa_lifetime, "<profile_name> <seconds> <jitter> <handover> <max bytes>") \
+_(ikev2_initiate_sa_init, "<profile_name>")                             \
+_(ikev2_initiate_del_ike_sa, "<ispi>")                                  \
+_(ikev2_initiate_del_child_sa, "<ispi>")                                \
+_(ikev2_initiate_rekey_child_sa, "<ispi>")                              \
 _(delete_loopback,"sw_if_index <nn>")                                   \
 _(bd_ip_mac_add_del, "bd_id <bridge-domain-id> <ip4/6-addr> <mac-addr> [del]") \
 _(map_add_domain,                                                       \
@@ -17893,15 +18347,11 @@ _(lisp_add_del_local_eid,"vni <vni> eid "                               \
                          "<ipv4|ipv6>/<prefix> | <L2 address> "         \
                          "locator-set <locator_name> [del]"             \
                          "[key-id sha1|sha256 secret-key <secret-key>]") \
-_(lisp_gpe_add_del_fwd_entry, "reid <eid> [leid <eid>] vni <vni>"       \
-  "vrf/bd <dp_table> loc-pair <lcl_loc> <rmt_loc> w <weight>... [del]") \
 _(lisp_add_del_map_resolver, "<ip4|6-addr> [del]")                      \
 _(lisp_add_del_map_server, "<ip4|6-addr> [del]")                        \
-_(lisp_gpe_enable_disable, "enable|disable")                            \
 _(lisp_enable_disable, "enable|disable")                                \
 _(lisp_map_register_enable_disable, "enable|disable")                   \
 _(lisp_rloc_probe_enable_disable, "enable|disable")                     \
-_(lisp_gpe_add_del_iface, "up|down")                                    \
 _(lisp_add_del_remote_mapping, "add|del vni <vni> eid <dest-eid> "      \
                                "[seid <seid>] "                         \
                                "rloc <locator> p <prio> "               \
@@ -17924,6 +18374,10 @@ _(lisp_map_server_dump, "")                                             \
 _(lisp_adjacencies_get, "vni <vni>")                                    \
 _(lisp_gpe_fwd_entries_get, "vni <vni>")                                \
 _(lisp_gpe_fwd_entry_path_dump, "index <fwd_entry_index>")              \
+_(lisp_gpe_add_del_iface, "up|down")                                    \
+_(lisp_gpe_enable_disable, "enable|disable")                            \
+_(lisp_gpe_add_del_fwd_entry, "reid <eid> [leid <eid>] vni <vni>"       \
+  "vrf/bd <dp_table> loc-pair <lcl_loc> <rmt_loc> w <weight>... [del]") \
 _(show_lisp_rloc_probe_state, "")                                       \
 _(show_lisp_map_register_state, "")                                     \
 _(show_lisp_status, "")                                                 \
@@ -17979,7 +18433,9 @@ _(flow_classify_set_interface,                                          \
   "<intfc> | sw_if_index <nn> [ip4-table <nn>] [ip6-table <nn>] [del]") \
 _(flow_classify_dump, "type [ip4|ip6]")                                 \
 _(ip_fib_dump, "")                                                      \
+_(ip_mfib_dump, "")                                                     \
 _(ip6_fib_dump, "")                                                     \
+_(ip6_mfib_dump, "")                                                    \
 _(feature_enable_disable, "arc_name <arc_name> "                        \
   "feature_name <feature_name> <intfc> | sw_if_index <nn> [disable]")  \
 _(sw_interface_tag_add_del, "<intfc> | sw_if_index <nn> tag <text>"    \