Implemented IKEv2 initiator features:
[vpp.git] / src / vat / api_format.c
index 02987eb..3a40a55 100644 (file)
@@ -3843,6 +3843,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)                                 \
@@ -4076,6 +4084,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)                                   \
@@ -4608,7 +4624,7 @@ exec (vat_main_t * vam)
   pthread_mutex_unlock (&am->vlib_rp->mutex);
 
   mp->cmd_in_shmem = (u64) cmd;
-  S;
+  S (mp);
   timeout = vat_time_now (vam) + 10.0;
 
   while (vat_time_now (vam) < timeout)
@@ -4640,8 +4656,8 @@ static int
 exec_inband (vat_main_t * vam)
 {
   vl_api_cli_inband_t *mp;
-  f64 timeout;
   unformat_input_t *i = vam->input;
+  int ret;
 
   if (vec_len (i->buffer) == 0)
     return -1;
@@ -4667,8 +4683,9 @@ exec_inband (vat_main_t * vam)
   clib_memcpy (mp->cmd, vam->input->buffer, len);
   mp->length = htonl (len);
 
-  S;
-  W2 (print (vam->ofp, "%s", vam->cmd_reply));
+  S (mp);
+  W2 (ret, print (vam->ofp, "%s", vam->cmd_reply));
+  return ret;
 }
 
 static int
@@ -4676,9 +4693,9 @@ api_create_loopback (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_create_loopback_t *mp;
-  f64 timeout;
   u8 mac_address[6];
   u8 mac_set = 0;
+  int ret;
 
   memset (mac_address, 0, sizeof (mac_address));
 
@@ -4695,8 +4712,9 @@ api_create_loopback (vat_main_t * vam)
   if (mac_set)
     clib_memcpy (mp->mac_address, mac_address, sizeof (mac_address));
 
-  S;
-  W;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -4704,8 +4722,8 @@ api_delete_loopback (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_delete_loopback_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -4725,8 +4743,9 @@ api_delete_loopback (vat_main_t * vam)
   M (DELETE_LOOPBACK, mp);
   mp->sw_if_index = ntohl (sw_if_index);
 
-  S;
-  W;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -4734,8 +4753,8 @@ api_want_stats (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_want_stats_t *mp;
-  f64 timeout;
   int enable = -1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -4756,8 +4775,9 @@ api_want_stats (vat_main_t * vam)
   M (WANT_STATS, mp);
   mp->enable_disable = enable;
 
-  S;
-  W;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -4765,8 +4785,8 @@ api_want_interface_events (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_want_interface_events_t *mp;
-  f64 timeout;
   int enable = -1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -4789,8 +4809,9 @@ api_want_interface_events (vat_main_t * vam)
 
   vam->interface_event_display = enable;
 
-  S;
-  W;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 
@@ -4799,10 +4820,11 @@ int
 api_sw_interface_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_dump_t *mp;
-  f64 timeout;
+  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* */
@@ -4833,72 +4855,71 @@ api_sw_interface_dump (vat_main_t * vam)
   M (SW_INTERFACE_DUMP, mp);
   mp->name_filter_valid = 1;
   strncpy ((char *) mp->name_filter, "Ether", sizeof (mp->name_filter) - 1);
-  S;
+  S (mp);
 
   /* and local / loopback interfaces */
   M (SW_INTERFACE_DUMP, mp);
   mp->name_filter_valid = 1;
   strncpy ((char *) mp->name_filter, "lo", sizeof (mp->name_filter) - 1);
-  S;
+  S (mp);
 
   /* and packet-generator interfaces */
   M (SW_INTERFACE_DUMP, mp);
   mp->name_filter_valid = 1;
   strncpy ((char *) mp->name_filter, "pg", sizeof (mp->name_filter) - 1);
-  S;
+  S (mp);
 
   /* and vxlan-gpe tunnel interfaces */
   M (SW_INTERFACE_DUMP, mp);
   mp->name_filter_valid = 1;
   strncpy ((char *) mp->name_filter, "vxlan_gpe",
           sizeof (mp->name_filter) - 1);
-  S;
+  S (mp);
 
   /* and vxlan tunnel interfaces */
   M (SW_INTERFACE_DUMP, mp);
   mp->name_filter_valid = 1;
   strncpy ((char *) mp->name_filter, "vxlan", sizeof (mp->name_filter) - 1);
-  S;
+  S (mp);
 
   /* and host (af_packet) interfaces */
   M (SW_INTERFACE_DUMP, mp);
   mp->name_filter_valid = 1;
   strncpy ((char *) mp->name_filter, "host", sizeof (mp->name_filter) - 1);
-  S;
+  S (mp);
 
   /* and l2tpv3 tunnel interfaces */
   M (SW_INTERFACE_DUMP, mp);
   mp->name_filter_valid = 1;
   strncpy ((char *) mp->name_filter, "l2tpv3_tunnel",
           sizeof (mp->name_filter) - 1);
-  S;
+  S (mp);
 
   /* and GRE tunnel interfaces */
   M (SW_INTERFACE_DUMP, mp);
   mp->name_filter_valid = 1;
   strncpy ((char *) mp->name_filter, "gre", sizeof (mp->name_filter) - 1);
-  S;
+  S (mp);
 
   /* and LISP-GPE interfaces */
   M (SW_INTERFACE_DUMP, mp);
   mp->name_filter_valid = 1;
   strncpy ((char *) mp->name_filter, "lisp_gpe",
           sizeof (mp->name_filter) - 1);
-  S;
+  S (mp);
 
   /* and IPSEC tunnel interfaces */
   M (SW_INTERFACE_DUMP, mp);
   mp->name_filter_valid = 1;
   strncpy ((char *) mp->name_filter, "ipsec", sizeof (mp->name_filter) - 1);
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
@@ -4906,10 +4927,10 @@ api_sw_interface_set_flags (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_flags_t *mp;
-  f64 timeout;
   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)
@@ -4944,10 +4965,11 @@ api_sw_interface_set_flags (vat_main_t * vam)
   mp->link_up_down = link_up;
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply, return the good/bad news... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -4955,9 +4977,9 @@ api_sw_interface_clear_stats (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_clear_stats_t *mp;
-  f64 timeout;
   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)
@@ -4979,10 +5001,11 @@ api_sw_interface_clear_stats (vat_main_t * vam)
     mp->sw_if_index = ~0;
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply, return the good/bad news... */
-  W;
+  W (ret);
+  return ret;
 }
 
 #if DPDK >0
@@ -4991,7 +5014,6 @@ api_sw_interface_set_dpdk_hqos_pipe (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_dpdk_hqos_pipe_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u32 subport;
@@ -5000,6 +5022,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)
@@ -5053,10 +5076,9 @@ api_sw_interface_set_dpdk_hqos_pipe (vat_main_t * vam)
   mp->profile = ntohl (profile);
 
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5064,7 +5086,6 @@ api_sw_interface_set_dpdk_hqos_subport (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_dpdk_hqos_subport_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u32 subport;
@@ -5073,6 +5094,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)
@@ -5134,10 +5156,9 @@ api_sw_interface_set_dpdk_hqos_subport (vat_main_t * vam)
   mp->tc_rate[3] = ntohl (tc_rate[3]);
   mp->tc_period = ntohl (tc_period);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5145,13 +5166,13 @@ api_sw_interface_set_dpdk_hqos_tctbl (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_dpdk_hqos_tctbl_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 entry_set = 0;
   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)
@@ -5201,10 +5222,9 @@ api_sw_interface_set_dpdk_hqos_tctbl (vat_main_t * vam)
   mp->tc = ntohl (tc);
   mp->queue = ntohl (queue);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 #endif
 
@@ -5213,7 +5233,6 @@ api_sw_interface_add_del_address (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_add_del_address_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 is_add = 1, del_all = 0;
@@ -5222,6 +5241,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)
@@ -5279,10 +5299,11 @@ api_sw_interface_add_del_address (vat_main_t * vam)
   mp->address_length = address_length;
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5290,10 +5311,10 @@ api_sw_interface_set_mpls_enable (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_mpls_enable_t *mp;
-  f64 timeout;
   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)
@@ -5323,10 +5344,11 @@ api_sw_interface_set_mpls_enable (vat_main_t * vam)
   mp->enable = enable;
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5334,10 +5356,10 @@ api_sw_interface_set_table (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_table_t *mp;
-  f64 timeout;
   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)
@@ -5368,10 +5390,11 @@ api_sw_interface_set_table (vat_main_t * vam)
   mp->vrf_id = ntohl (vrf_id);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static void vl_api_sw_interface_get_table_reply_t_handler
@@ -5411,7 +5434,7 @@ api_sw_interface_get_table (vat_main_t * vam)
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 is_ipv6 = 0;
-  f64 timeout;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -5435,8 +5458,9 @@ api_sw_interface_get_table (vat_main_t * vam)
   mp->sw_if_index = htonl (sw_if_index);
   mp->is_ipv6 = is_ipv6;
 
-  S;
-  W;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5444,10 +5468,10 @@ api_sw_interface_set_vpath (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_vpath_t *mp;
-  f64 timeout;
   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)
@@ -5477,10 +5501,11 @@ api_sw_interface_set_vpath (vat_main_t * vam)
   mp->enable = is_enable;
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5488,11 +5513,11 @@ api_sw_interface_set_vxlan_bypass (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_vxlan_bypass_t *mp;
-  f64 timeout;
   u32 sw_if_index = 0;
   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)
@@ -5527,10 +5552,11 @@ api_sw_interface_set_vxlan_bypass (vat_main_t * vam)
   mp->is_ipv6 = is_ipv6;
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5538,12 +5564,12 @@ api_sw_interface_set_l2_xconnect (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_l2_xconnect_t *mp;
-  f64 timeout;
   u32 rx_sw_if_index;
   u8 rx_sw_if_index_set = 0;
   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)
@@ -5600,10 +5626,9 @@ api_sw_interface_set_l2_xconnect (vat_main_t * vam)
   mp->tx_sw_if_index = ntohl (tx_sw_if_index);
   mp->enable = enable;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5611,7 +5636,6 @@ api_sw_interface_set_l2_bridge (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_l2_bridge_t *mp;
-  f64 timeout;
   u32 rx_sw_if_index;
   u8 rx_sw_if_index_set = 0;
   u32 bd_id;
@@ -5619,6 +5643,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)
@@ -5663,10 +5688,9 @@ api_sw_interface_set_l2_bridge (vat_main_t * vam)
   mp->bvi = bvi;
   mp->enable = enable;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5674,8 +5698,9 @@ api_bridge_domain_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_bridge_domain_dump_t *mp;
-  f64 timeout;
+  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)
@@ -5688,18 +5713,14 @@ api_bridge_domain_dump (vat_main_t * vam)
 
   M (BRIDGE_DOMAIN_DUMP, mp);
   mp->bd_id = ntohl (bd_id);
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5707,11 +5728,11 @@ api_bridge_domain_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_bridge_domain_add_del_t *mp;
-  f64 timeout;
   u32 bd_id = ~0;
   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)
@@ -5762,10 +5783,9 @@ api_bridge_domain_add_del (vat_main_t * vam)
   mp->is_add = is_add;
   mp->mac_age = (u8) mac_age;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5871,19 +5891,19 @@ api_l2fib_add_del (vat_main_t * vam)
        }
       increment_mac_address (&mac);
       /* send it... */
-      S;
+      S (mp);
     }
 
   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;
+      M (CONTROL_PING, mp_ping);
+      S (mp_ping);
 
       timeout = vat_time_now (vam) + 1.0;
       while (vat_time_now (vam) < timeout)
@@ -5908,8 +5928,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);
@@ -5920,10 +5943,10 @@ api_l2_flags (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2_flags_t *mp;
-  f64 timeout;
   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)
@@ -5964,10 +5987,9 @@ api_l2_flags (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
   mp->feature_bitmap = ntohl (feature_bitmap);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -5975,11 +5997,11 @@ api_bridge_flags (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_bridge_flags_t *mp;
-  f64 timeout;
   u32 bd_id;
   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)
@@ -6016,10 +6038,9 @@ api_bridge_flags (vat_main_t * vam)
   mp->feature_bitmap = ntohl (flags);
   mp->is_set = is_set;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6027,7 +6048,6 @@ api_bd_ip_mac_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_bd_ip_mac_add_del_t *mp;
-  f64 timeout;
   u32 bd_id;
   u8 is_ipv6 = 0;
   u8 is_add = 1;
@@ -6037,6 +6057,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 */
@@ -6091,10 +6112,9 @@ api_bd_ip_mac_add_del (vat_main_t * vam)
   else
     clib_memcpy (mp->ip_address, &v4addr, sizeof (v4addr));
   clib_memcpy (mp->mac_address, macaddr, 6);
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6102,7 +6122,6 @@ api_tap_connect (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_tap_connect_t *mp;
-  f64 timeout;
   u8 mac_address[6];
   u8 random_mac = 1;
   u8 name_set = 0;
@@ -6114,6 +6133,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));
 
@@ -6184,10 +6204,11 @@ api_tap_connect (vat_main_t * vam)
   vec_free (tag);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6195,13 +6216,13 @@ api_tap_modify (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_tap_modify_t *mp;
-  f64 timeout;
   u8 mac_address[6];
   u8 random_mac = 1;
   u8 name_set = 0;
   u8 *tap_name;
   u32 sw_if_index = ~0;
   u8 sw_if_index_set = 0;
+  int ret;
 
   memset (mac_address, 0, sizeof (mac_address));
 
@@ -6250,10 +6271,11 @@ api_tap_modify (vat_main_t * vam)
   vec_free (tap_name);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6261,9 +6283,9 @@ api_tap_delete (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_tap_delete_t *mp;
-  f64 timeout;
   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)
@@ -6288,10 +6310,11 @@ api_tap_delete (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6299,7 +6322,6 @@ api_ip_add_del_route (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ip_add_del_route_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0, vrf_id = 0;
   u8 is_ipv6 = 0;
   u8 is_local = 0, is_drop = 0;
@@ -6538,7 +6560,7 @@ api_ip_add_del_route (vat_main_t * vam)
            increment_v4_address (&v4_dst_address);
        }
       /* send it... */
-      S;
+      S (mp);
       /* If we receive SIGTERM, stop now... */
       if (vam->do_exit)
        break;
@@ -6547,14 +6569,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;
+      M (CONTROL_PING, mp_ping);
+      S (mp_ping);
 
       timeout = vat_time_now (vam) + 1.0;
       while (vat_time_now (vam) < timeout)
@@ -6583,8 +6606,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 */
@@ -6596,7 +6622,6 @@ api_ip_mroute_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ip_mroute_add_del_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0, vrf_id = 0;
   u8 is_ipv6 = 0;
   u8 is_local = 0;
@@ -6608,6 +6633,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)
@@ -6703,9 +6729,10 @@ api_ip_mroute_add_del (vat_main_t * vam)
     }
 
   /* send it... */
-  S;
+  S (mp);
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -6713,7 +6740,6 @@ api_mpls_route_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_mpls_route_add_del_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0, table_id = 0;
   u8 create_table_if_needed = 0;
   u8 is_add = 1;
@@ -6876,7 +6902,7 @@ api_mpls_route_add_del (vat_main_t * vam)
       local_label++;
 
       /* send it... */
-      S;
+      S (mp);
       /* If we receive SIGTERM, stop now... */
       if (vam->do_exit)
        break;
@@ -6885,14 +6911,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;
+      M (CONTROL_PING, mp_ping);
+      S (mp_ping);
 
       timeout = vat_time_now (vam) + 1.0;
       while (vat_time_now (vam) < timeout)
@@ -6921,8 +6948,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 */
@@ -6934,7 +6964,6 @@ api_mpls_ip_bind_unbind (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_mpls_ip_bind_unbind_t *mp;
-  f64 timeout;
   u32 ip_table_id = 0;
   u8 create_table_if_needed = 0;
   u8 is_bind = 1;
@@ -6944,6 +6973,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)
@@ -7006,10 +7036,11 @@ api_mpls_ip_bind_unbind (vat_main_t * vam)
     clib_memcpy (mp->mb_address, &v6_address, sizeof (v6_address));
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7017,11 +7048,11 @@ api_proxy_arp_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_proxy_arp_add_del_t *mp;
-  f64 timeout;
   u32 vrf_id = 0;
   u8 is_add = 1;
   ip4_address_t lo, hi;
   u8 range_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7052,10 +7083,9 @@ api_proxy_arp_add_del (vat_main_t * vam)
   clib_memcpy (mp->low_address, &lo, sizeof (mp->low_address));
   clib_memcpy (mp->hi_address, &hi, sizeof (mp->hi_address));
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7063,10 +7093,10 @@ api_proxy_arp_intfc_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_proxy_arp_intfc_enable_disable_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 enable = 1;
   u8 sw_if_index_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7096,10 +7126,9 @@ api_proxy_arp_intfc_enable_disable (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
   mp->enable_disable = enable;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7107,7 +7136,6 @@ api_mpls_tunnel_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_mpls_tunnel_add_del_t *mp;
-  f64 timeout;
 
   u8 is_add = 1;
   u8 l2_only = 0;
@@ -7121,6 +7149,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)
     {
@@ -7182,10 +7211,9 @@ api_mpls_tunnel_add_del (vat_main_t * vam)
                   &v6_next_hop_address, sizeof (v6_next_hop_address));
     }
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7193,11 +7221,11 @@ api_sw_interface_set_unnumbered (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_unnumbered_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   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)
     {
@@ -7228,10 +7256,9 @@ api_sw_interface_set_unnumbered (vat_main_t * vam)
   mp->unnumbered_sw_if_index = ntohl (unnum_sw_index);
   mp->is_add = is_add;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7239,7 +7266,6 @@ api_ip_neighbor_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ip_neighbor_add_del_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u32 vrf_id = 0;
@@ -7251,6 +7277,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));
 
@@ -7320,13 +7347,11 @@ api_ip_neighbor_add_del (vat_main_t * vam)
     }
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7334,10 +7359,10 @@ api_reset_vrf (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_reset_vrf_t *mp;
-  f64 timeout;
   u32 vrf_id = 0;
   u8 is_ipv6 = 0;
   u8 vrf_id_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7363,10 +7388,9 @@ api_reset_vrf (vat_main_t * vam)
   mp->vrf_id = ntohl (vrf_id);
   mp->is_ipv6 = is_ipv6;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7374,11 +7398,11 @@ api_create_vlan_subif (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_create_vlan_subif_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   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)
     {
@@ -7412,10 +7436,9 @@ api_create_vlan_subif (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
   mp->vlan_id = ntohl (vlan_id);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 #define foreach_create_subif_bit                \
@@ -7433,7 +7456,6 @@ api_create_subif (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_create_subif_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u32 sub_id;
@@ -7449,6 +7471,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)
     {
@@ -7497,10 +7520,9 @@ api_create_subif (vat_main_t * vam)
   mp->outer_vlan_id = ntohs (outer_vlan_id);
   mp->inner_vlan_id = ntohs (inner_vlan_id);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7508,12 +7530,12 @@ api_oam_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_oam_add_del_t *mp;
-  f64 timeout;
   u32 vrf_id = 0;
   u8 is_add = 1;
   ip4_address_t src, dst;
   u8 src_set = 0;
   u8 dst_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -7551,10 +7573,9 @@ api_oam_add_del (vat_main_t * vam)
   clib_memcpy (mp->src_address, &src, sizeof (mp->src_address));
   clib_memcpy (mp->dst_address, &dst, sizeof (mp->dst_address));
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7562,11 +7583,11 @@ api_reset_fib (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_reset_fib_t *mp;
-  f64 timeout;
   u32 vrf_id = 0;
   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))
@@ -7591,10 +7612,9 @@ api_reset_fib (vat_main_t * vam)
   mp->vrf_id = ntohl (vrf_id);
   mp->is_ipv6 = is_ipv6;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7602,7 +7622,6 @@ api_dhcp_proxy_config (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_dhcp_proxy_config_t *mp;
-  f64 timeout;
   u32 vrf_id = 0;
   u8 is_add = 1;
   u8 insert_cid = 1;
@@ -7614,6 +7633,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)
@@ -7684,12 +7704,11 @@ api_dhcp_proxy_config (vat_main_t * vam)
     }
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7697,7 +7716,6 @@ api_dhcp_proxy_config_2 (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_dhcp_proxy_config_2_t *mp;
-  f64 timeout;
   u32 rx_vrf_id = 0;
   u32 server_vrf_id = 0;
   u8 is_add = 1;
@@ -7710,6 +7728,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)
@@ -7783,12 +7802,11 @@ api_dhcp_proxy_config_2 (vat_main_t * vam)
     }
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7796,7 +7814,6 @@ api_dhcp_proxy_set_vss (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_dhcp_proxy_set_vss_t *mp;
-  f64 timeout;
   u8 is_ipv6 = 0;
   u8 is_add = 1;
   u32 tbl_id;
@@ -7805,6 +7822,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)
     {
@@ -7849,10 +7867,9 @@ api_dhcp_proxy_set_vss (vat_main_t * vam)
   mp->is_ipv6 = is_ipv6;
   mp->is_add = is_add;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7860,12 +7877,12 @@ api_dhcp_client_config (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_dhcp_client_config_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   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)
@@ -7908,12 +7925,11 @@ api_dhcp_client_config (vat_main_t * vam)
   mp->pid = getpid ();
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7921,7 +7937,6 @@ api_set_ip_flow_hash (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_set_ip_flow_hash_t *mp;
-  f64 timeout;
   u32 vrf_id = 0;
   u8 is_ipv6 = 0;
   u8 vrf_id_set = 0;
@@ -7931,6 +7946,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)
     {
@@ -7974,10 +7990,9 @@ api_set_ip_flow_hash (vat_main_t * vam)
   mp->vrf_id = ntohl (vrf_id);
   mp->is_ipv6 = is_ipv6;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -7985,10 +8000,10 @@ api_sw_interface_ip6_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_ip6_enable_disable_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 enable = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -8018,10 +8033,9 @@ api_sw_interface_ip6_enable_disable (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
   mp->enable = enable;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8029,11 +8043,11 @@ api_sw_interface_ip6_set_link_local_address (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_ip6_set_link_local_address_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   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)
@@ -8066,13 +8080,11 @@ api_sw_interface_ip6_set_link_local_address (vat_main_t * vam)
   clib_memcpy (mp->address, &v6address, sizeof (v6address));
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 
@@ -8081,7 +8093,6 @@ api_sw_interface_ip6nd_ra_prefix (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_ip6nd_ra_prefix_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u32 address_length = 0;
@@ -8095,6 +8106,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)
@@ -8156,13 +8168,11 @@ api_sw_interface_ip6nd_ra_prefix (vat_main_t * vam)
   mp->pref_lifetime = ntohl (pref_lifetime);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8170,7 +8180,6 @@ api_sw_interface_ip6nd_ra_config (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_ip6nd_ra_config_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 suppress = 0;
@@ -8186,6 +8195,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 */
@@ -8253,13 +8263,11 @@ api_sw_interface_ip6nd_ra_config (vat_main_t * vam)
   mp->default_router = default_router;
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8267,10 +8275,10 @@ api_set_arp_neighbor_limit (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_set_arp_neighbor_limit_t *mp;
-  f64 timeout;
   u32 arp_nbr_limit;
   u8 limit_set = 0;
   u8 is_ipv6 = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -8296,10 +8304,9 @@ api_set_arp_neighbor_limit (vat_main_t * vam)
   mp->arp_neighbor_limit = ntohl (arp_nbr_limit);
   mp->is_ipv6 = is_ipv6;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8307,12 +8314,12 @@ api_l2_patch_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2_patch_add_del_t *mp;
-  f64 timeout;
   u32 rx_sw_if_index;
   u8 rx_sw_if_index_set = 0;
   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)
@@ -8367,10 +8374,9 @@ api_l2_patch_add_del (vat_main_t * vam)
   mp->tx_sw_if_index = ntohl (tx_sw_if_index);
   mp->is_add = is_add;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8378,12 +8384,12 @@ api_ioam_enable (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_ioam_enable_t *mp;
-  f64 timeout;
   u32 id = 0;
   int has_trace_option = 0;
   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)
     {
@@ -8405,11 +8411,9 @@ api_ioam_enable (vat_main_t * vam)
   mp->pot_enable = has_pot_option;
   mp->trace_enable = has_trace_option;
 
-  S;
-  W;
-
-  return (0);
-
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 
@@ -8417,12 +8421,12 @@ static int
 api_ioam_disable (vat_main_t * vam)
 {
   vl_api_ioam_disable_t *mp;
-  f64 timeout;
+  int ret;
 
   M (IOAM_DISABLE, mp);
-  S;
-  W;
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8430,7 +8434,6 @@ api_sr_tunnel_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sr_tunnel_add_del_t *mp;
-  f64 timeout;
   int is_del = 0;
   int pl_index;
   ip6_address_t src_address;
@@ -8448,6 +8451,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)
     {
@@ -8553,9 +8557,9 @@ api_sr_tunnel_add_del (vat_main_t * vam)
   vec_free (segments);
   vec_free (tags);
 
-  S;
-  W;
-  /* NOTREACHED */
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8563,7 +8567,6 @@ api_sr_policy_add_del (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_sr_policy_add_del_t *mp;
-  f64 timeout;
   int is_del = 0;
   u8 *name = 0;
   u8 *tunnel_name = 0;
@@ -8574,6 +8577,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)
     {
@@ -8637,9 +8641,9 @@ api_sr_policy_add_del (vat_main_t * vam)
   vec_free (tunnel_names);
   vec_free (tunnel_name);
 
-  S;
-  W;
-  /* NOTREACHED */
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -8647,11 +8651,11 @@ api_sr_multicast_map_add_del (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_sr_multicast_map_add_del_t *mp;
-  f64 timeout;
   int is_del = 0;
   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)
     {
@@ -8690,9 +8694,9 @@ api_sr_multicast_map_add_del (vat_main_t * vam)
 
   vec_free (policy_name);
 
-  S;
-  W;
-  /* NOTREACHED */
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 
@@ -9320,9 +9324,9 @@ api_classify_add_del_table (vat_main_t * vam)
   u32 miss_next_index = ~0;
   u32 memory_size = 32 << 20;
   u8 *mask = 0;
-  f64 timeout;
   u32 current_data_flag = 0;
   int current_data_offset = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -9406,9 +9410,9 @@ api_classify_add_del_table (vat_main_t * vam)
 
   vec_free (mask);
 
-  S;
-  W;
-  /* NOTREACHED */
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 uword
@@ -9858,11 +9862,11 @@ api_classify_add_del_session (vat_main_t * vam)
   u32 opaque_index = ~0;
   u8 *match = 0;
   i32 advance = 0;
-  f64 timeout;
   u32 skip_n_vectors = 0;
   u32 match_n_vectors = 0;
   u32 action = 0;
   u32 metadata = 0;
+  int ret;
 
   /*
    * Warning: you have to supply skip_n and match_n
@@ -9936,9 +9940,9 @@ api_classify_add_del_session (vat_main_t * vam)
   clib_memcpy (mp->match, match, vec_len (match));
   vec_free (match);
 
-  S;
-  W;
-  /* NOTREACHED */
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -9946,11 +9950,11 @@ api_classify_set_interface_ip_table (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_classify_set_interface_ip_table_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   int sw_if_index_set;
   u32 table_index = ~0;
   u8 is_ipv6 = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -9980,10 +9984,9 @@ api_classify_set_interface_ip_table (vat_main_t * vam)
   mp->table_index = ntohl (table_index);
   mp->is_ipv6 = is_ipv6;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -9991,13 +9994,13 @@ api_classify_set_interface_l2_tables (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_classify_set_interface_l2_tables_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   int sw_if_index_set;
   u32 ip4_table_index = ~0;
   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)
     {
@@ -10035,10 +10038,9 @@ api_classify_set_interface_l2_tables (vat_main_t * vam)
   mp->other_table_index = ntohl (other_table_index);
   mp->is_input = (u8) is_input;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10055,7 +10057,7 @@ api_set_ipfix_exporter (vat_main_t * vam)
   u32 path_mtu = ~0;
   u32 template_interval = ~0;
   u8 udp_checksum = 0;
-  f64 timeout;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10102,9 +10104,9 @@ api_set_ipfix_exporter (vat_main_t * vam)
   mp->template_interval = htonl (template_interval);
   mp->udp_checksum = udp_checksum;
 
-  S;
-  W;
-  /* NOTREACHED */
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10114,7 +10116,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;
-  f64 timeout;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10134,9 +10136,9 @@ api_set_ipfix_classify_stream (vat_main_t * vam)
   mp->domain_id = htonl (domain_id);
   mp->src_port = htons ((u16) src_port);
 
-  S;
-  W;
-  /* NOTREACHED */
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10148,7 +10150,7 @@ api_ipfix_classify_table_add_del (vat_main_t * vam)
   u32 classify_table_index = ~0;
   u8 ip_version = 0;
   u8 transport_protocol = 255;
-  f64 timeout;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10196,9 +10198,9 @@ api_ipfix_classify_table_add_del (vat_main_t * vam)
   mp->ip_version = ip_version;
   mp->transport_protocol = transport_protocol;
 
-  S;
-  W;
-  /* NOTREACHED */
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10206,8 +10208,8 @@ api_get_node_index (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_get_node_index_t *mp;
-  f64 timeout;
   u8 *name = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10231,10 +10233,9 @@ api_get_node_index (vat_main_t * vam)
   clib_memcpy (mp->node_name, name, vec_len (name));
   vec_free (name);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10242,8 +10243,8 @@ api_get_next_index (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_get_next_index_t *mp;
-  f64 timeout;
   u8 *node_name = 0, *next_node_name = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10281,10 +10282,9 @@ api_get_next_index (vat_main_t * vam)
   vec_free (node_name);
   vec_free (next_node_name);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10292,9 +10292,9 @@ api_add_node_next (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_add_node_next_t *mp;
-  f64 timeout;
   u8 *name = 0;
   u8 *next = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10332,10 +10332,9 @@ api_add_node_next (vat_main_t * vam)
   vec_free (name);
   vec_free (next);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10351,7 +10350,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;
-  f64 timeout;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10401,10 +10400,9 @@ api_l2tpv3_create_tunnel (vat_main_t * vam)
   mp->l2_sublayer_present = l2_sublayer_present;
   mp->is_ipv6 = 1;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10416,7 +10414,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;
-  f64 timeout;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10444,10 +10442,9 @@ api_l2tpv3_set_tunnel_cookies (vat_main_t * vam)
   mp->new_local_cookie = clib_host_to_net_u64 (new_local_cookie);
   mp->new_remote_cookie = clib_host_to_net_u64 (new_remote_cookie);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10455,10 +10452,10 @@ api_l2tpv3_interface_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2tpv3_interface_enable_disable_t *mp;
-  f64 timeout;
   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)
     {
@@ -10485,10 +10482,9 @@ api_l2tpv3_interface_enable_disable (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
   mp->enable_disable = enable_disable;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10496,8 +10492,8 @@ api_l2tpv3_set_lookup_key (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2tpv3_set_lookup_key_t *mp;
-  f64 timeout;
   u8 key = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -10521,10 +10517,9 @@ api_l2tpv3_set_lookup_key (vat_main_t * vam)
 
   mp->key = key;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static void vl_api_sw_if_l2tpv3_tunnel_details_t_handler
@@ -10594,19 +10589,19 @@ static int
 api_sw_if_l2tpv3_tunnel_dump (vat_main_t * vam)
 {
   vl_api_sw_if_l2tpv3_tunnel_dump_t *mp;
-  f64 timeout;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   /* Get list of l2tpv3-tunnel interfaces */
   M (SW_IF_L2TPV3_TUNNEL_DUMP, mp);
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 
@@ -10641,20 +10636,20 @@ static int
 api_sw_interface_tap_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_tap_dump_t *mp;
-  f64 timeout;
+  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 */
   M (SW_INTERFACE_TAP_DUMP, mp);
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static uword unformat_vxlan_decap_next
@@ -10677,7 +10672,6 @@ api_vxlan_add_del_tunnel (vat_main_t * vam)
 {
   unformat_input_t *line_input = vam->input;
   vl_api_vxlan_add_del_tunnel_t *mp;
-  f64 timeout;
   ip46_address_t src, dst;
   u8 is_add = 1;
   u8 ipv4_set = 0, ipv6_set = 0;
@@ -10688,6 +10682,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);
@@ -10823,10 +10818,9 @@ api_vxlan_add_del_tunnel (vat_main_t * vam)
   mp->is_add = is_add;
   mp->is_ipv6 = ipv6_set;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static void vl_api_vxlan_tunnel_details_t_handler
@@ -10894,9 +10888,10 @@ api_vxlan_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_vxlan_tunnel_dump_t *mp;
-  f64 timeout;
+  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)
@@ -10924,15 +10919,14 @@ api_vxlan_tunnel_dump (vat_main_t * vam)
 
   mp->sw_if_index = htonl (sw_if_index);
 
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
@@ -10940,13 +10934,13 @@ api_gre_add_del_tunnel (vat_main_t * vam)
 {
   unformat_input_t *line_input = vam->input;
   vl_api_gre_add_del_tunnel_t *mp;
-  f64 timeout;
   ip4_address_t src4, dst4;
   u8 is_add = 1;
   u8 teb = 0;
   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)
     {
@@ -10987,10 +10981,9 @@ api_gre_add_del_tunnel (vat_main_t * vam)
   mp->is_add = is_add;
   mp->teb = teb;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static void vl_api_gre_tunnel_details_t_handler
@@ -11034,9 +11027,10 @@ api_gre_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_gre_tunnel_dump_t *mp;
-  f64 timeout;
+  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)
@@ -11064,15 +11058,14 @@ api_gre_tunnel_dump (vat_main_t * vam)
 
   mp->sw_if_index = htonl (sw_if_index);
 
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11080,14 +11073,13 @@ api_l2_fib_clear_table (vat_main_t * vam)
 {
 //  unformat_input_t * i = vam->input;
   vl_api_l2_fib_clear_table_t *mp;
-  f64 timeout;
+  int ret;
 
   M (L2_FIB_CLEAR_TABLE, mp);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11095,10 +11087,10 @@ api_l2_interface_efp_filter (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2_interface_efp_filter_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 enable = 1;
   u8 sw_if_index_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11128,10 +11120,9 @@ api_l2_interface_efp_filter (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
   mp->enable_disable = enable;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 #define foreach_vtr_op                          \
@@ -11150,7 +11141,6 @@ api_l2_interface_vlan_tag_rewrite (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2_interface_vlan_tag_rewrite_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   u8 vtr_op_set = 0;
@@ -11158,6 +11148,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)
     {
@@ -11196,10 +11187,9 @@ api_l2_interface_vlan_tag_rewrite (vat_main_t * vam)
   mp->tag1 = ntohl (tag1);
   mp->tag2 = ntohl (tag2);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11207,7 +11197,6 @@ api_create_vhost_user_if (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_create_vhost_user_if_t *mp;
-  f64 timeout;
   u8 *file_name;
   u8 is_server = 0;
   u8 file_name_set = 0;
@@ -11215,6 +11204,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));
@@ -11266,10 +11256,9 @@ api_create_vhost_user_if (vat_main_t * vam)
     strncpy ((char *) mp->tag, (char *) tag, ARRAY_LEN (mp->tag) - 1);
   vec_free (tag);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11277,13 +11266,13 @@ api_modify_vhost_user_if (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_modify_vhost_user_if_t *mp;
-  f64 timeout;
   u8 *file_name;
   u8 is_server = 0;
   u8 file_name_set = 0;
   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)
     {
@@ -11334,10 +11323,9 @@ api_modify_vhost_user_if (vat_main_t * vam)
       mp->custom_dev_instance = ntohl (custom_dev_instance);
     }
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11345,9 +11333,9 @@ api_delete_vhost_user_if (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_delete_vhost_user_if_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
   u8 sw_if_index_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11370,10 +11358,9 @@ api_delete_vhost_user_if (vat_main_t * vam)
 
   mp->sw_if_index = ntohl (sw_if_index);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static void vl_api_sw_interface_vhost_user_details_t_handler
@@ -11420,35 +11407,34 @@ static int
 api_sw_interface_vhost_user_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_vhost_user_dump_t *mp;
-  f64 timeout;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
   print (vam->ofp,
         "Interface name           idx hdr_sz features server regions filename");
 
   /* Get list of vhost-user interfaces */
   M (SW_INTERFACE_VHOST_USER_DUMP, mp);
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  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;
-  f64 timeout;
+  int ret;
 
   M (SHOW_VERSION, mp);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 
@@ -11457,7 +11443,6 @@ api_vxlan_gpe_add_del_tunnel (vat_main_t * vam)
 {
   unformat_input_t *line_input = vam->input;
   vl_api_vxlan_gpe_add_del_tunnel_t *mp;
-  f64 timeout;
   ip4_address_t local4, remote4;
   ip6_address_t local6, remote6;
   u8 is_add = 1;
@@ -11469,6 +11454,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)
     {
@@ -11562,10 +11548,9 @@ api_vxlan_gpe_add_del_tunnel (vat_main_t * vam)
   mp->is_add = is_add;
   mp->is_ipv6 = ipv6_set;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static void vl_api_vxlan_gpe_tunnel_details_t_handler
@@ -11625,9 +11610,10 @@ api_vxlan_gpe_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_vxlan_gpe_tunnel_dump_t *mp;
-  f64 timeout;
+  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)
@@ -11655,15 +11641,14 @@ api_vxlan_gpe_tunnel_dump (vat_main_t * vam)
 
   mp->sw_if_index = htonl (sw_if_index);
 
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 u8 *
@@ -11714,9 +11699,10 @@ api_l2_fib_table_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2_fib_table_dump_t *mp;
-  f64 timeout;
+  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)
@@ -11739,15 +11725,14 @@ api_l2_fib_table_dump (vat_main_t * vam)
   M (L2_FIB_TABLE_DUMP, mp);
 
   mp->bd_id = ntohl (bd_id);
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 
@@ -11757,8 +11742,8 @@ api_interface_name_renumber (vat_main_t * vam)
   unformat_input_t *line_input = vam->input;
   vl_api_interface_name_renumber_t *mp;
   u32 sw_if_index = ~0;
-  f64 timeout;
   u32 new_show_dev_instance = ~0;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -11791,8 +11776,9 @@ api_interface_name_renumber (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
   mp->new_show_dev_instance = ntohl (new_show_dev_instance);
 
-  S;
-  W;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11800,10 +11786,10 @@ api_want_ip4_arp_events (vat_main_t * vam)
 {
   unformat_input_t *line_input = vam->input;
   vl_api_want_ip4_arp_events_t *mp;
-  f64 timeout;
   ip4_address_t address;
   int address_set = 0;
   u32 enable_disable = 1;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -11826,8 +11812,9 @@ api_want_ip4_arp_events (vat_main_t * vam)
   mp->pid = getpid ();
   mp->address = address.as_u32;
 
-  S;
-  W;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11835,10 +11822,10 @@ api_want_ip6_nd_events (vat_main_t * vam)
 {
   unformat_input_t *line_input = vam->input;
   vl_api_want_ip6_nd_events_t *mp;
-  f64 timeout;
   ip6_address_t address;
   int address_set = 0;
   u32 enable_disable = 1;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -11861,8 +11848,9 @@ api_want_ip6_nd_events (vat_main_t * vam)
   mp->pid = getpid ();
   clib_memcpy (mp->address, &address, sizeof (ip6_address_t));
 
-  S;
-  W;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11870,13 +11858,13 @@ api_input_acl_set_interface (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_input_acl_set_interface_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   int sw_if_index_set;
   u32 ip4_table_index = ~0;
   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)
     {
@@ -11913,10 +11901,9 @@ api_input_acl_set_interface (vat_main_t * vam)
   mp->l2_table_index = ntohl (l2_table_index);
   mp->is_add = is_add;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -11924,11 +11911,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;
-  f64 timeout;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -11969,27 +11957,27 @@ api_ip_address_dump (vat_main_t * vam)
   M (IP_ADDRESS_DUMP, mp);
   mp->sw_if_index = ntohl (sw_if_index);
   mp->is_ipv6 = ipv6_set;
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  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;
-  f64 timeout;
   int i;
+  int ret;
 
   while (unformat_check_input (in) != UNFORMAT_END_OF_INPUT)
     {
@@ -12025,15 +12013,14 @@ api_ip_dump (vat_main_t * vam)
 
   M (IP_DUMP, mp);
   mp->is_ipv6 = ipv6_set;
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12041,9 +12028,9 @@ api_ipsec_spd_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_spd_add_del_t *mp;
-  f64 timeout;
   u32 spd_id = ~0;
   u8 is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12068,10 +12055,9 @@ api_ipsec_spd_add_del (vat_main_t * vam)
   mp->spd_id = ntohl (spd_id);
   mp->is_add = is_add;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12079,11 +12065,11 @@ api_ipsec_interface_add_del_spd (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_interface_add_del_spd_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   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)
     {
@@ -12122,10 +12108,9 @@ api_ipsec_interface_add_del_spd (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
   mp->is_add = is_add;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12133,7 +12118,6 @@ api_ipsec_spd_add_del_entry (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_spd_add_del_entry_t *mp;
-  f64 timeout;
   u8 is_add = 1, is_outbound = 0, is_ipv6 = 0, is_ip_any = 1;
   u32 spd_id = 0, sa_id = 0, protocol = 0, policy = 0;
   i32 priority = 0;
@@ -12141,6 +12125,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;
@@ -12280,10 +12265,9 @@ api_ipsec_spd_add_del_entry (vat_main_t * vam)
   mp->sa_id = ntohl (sa_id);
   mp->is_add = is_add;
   mp->is_ip_any = is_ip_any;
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12291,7 +12275,6 @@ api_ipsec_sad_add_del_entry (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_sad_add_del_entry_t *mp;
-  f64 timeout;
   u32 sad_id = 0, spi = 0;
   u8 *ck = 0, *ik = 0;
   u8 is_add = 1;
@@ -12303,6 +12286,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)
     {
@@ -12412,10 +12396,9 @@ api_ipsec_sad_add_del_entry (vat_main_t * vam)
        }
     }
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12423,9 +12406,9 @@ api_ipsec_sa_set_key (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_sa_set_key_t *mp;
-  f64 timeout;
   u32 sa_id;
   u8 *ck = 0, *ik = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12459,10 +12442,9 @@ api_ipsec_sa_set_key (vat_main_t * vam)
   if (ik)
     clib_memcpy (mp->integrity_key, ik, mp->integrity_key_length);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12470,9 +12452,9 @@ api_ikev2_profile_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ikev2_profile_add_del_t *mp;
-  f64 timeout;
   u8 is_add = 1;
   u8 *name = 0;
+  int ret;
 
   const char *valid_chars = "a-zA-Z0-9_";
 
@@ -12507,10 +12489,9 @@ api_ikev2_profile_add_del (vat_main_t * vam)
   mp->is_add = is_add;
   vec_free (name);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12518,11 +12499,11 @@ api_ikev2_profile_set_auth (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ikev2_profile_set_auth_t *mp;
-  f64 timeout;
   u8 *name = 0;
   u8 *data = 0;
   u32 auth_method = 0;
   u8 is_hex = 0;
+  int ret;
 
   const char *valid_chars = "a-zA-Z0-9_";
 
@@ -12578,10 +12559,9 @@ api_ikev2_profile_set_auth (vat_main_t * vam)
   vec_free (name);
   vec_free (data);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12589,12 +12569,12 @@ api_ikev2_profile_set_id (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ikev2_profile_set_id_t *mp;
-  f64 timeout;
   u8 *name = 0;
   u8 *data = 0;
   u8 is_local = 0;
   u32 id_type = 0;
   ip4_address_t ip4;
+  int ret;
 
   const char *valid_chars = "a-zA-Z0-9_";
 
@@ -12658,10 +12638,9 @@ api_ikev2_profile_set_id (vat_main_t * vam)
   vec_free (name);
   vec_free (data);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12669,13 +12648,13 @@ api_ikev2_profile_set_ts (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ikev2_profile_set_ts_t *mp;
-  f64 timeout;
   u8 *name = 0;
   u8 is_local = 0;
   u32 proto = 0, start_port = 0, end_port = (u32) ~ 0;
   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;
@@ -12729,10 +12708,9 @@ api_ikev2_profile_set_ts (vat_main_t * vam)
   clib_memcpy (mp->name, name, vec_len (name));
   vec_free (name);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12740,8 +12718,8 @@ api_ikev2_set_local_key (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ikev2_set_local_key_t *mp;
-  f64 timeout;
   u8 *file = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12771,10 +12749,339 @@ api_ikev2_set_local_key (vat_main_t * vam)
   clib_memcpy (mp->key_file, file, vec_len (file));
   vec_free (file);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
+}
+
+static int
+api_ikev2_set_responder (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_ikev2_set_responder_t *mp;
+  int ret;
+  u8 *name = 0;
+  u32 sw_if_index = ~0;
+  ip4_address_t address;
+
+  const char *valid_chars = "a-zA-Z0-9_";
+
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      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
+       {
+         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_RESPONDER, mp);
+
+  clib_memcpy (mp->name, name, vec_len (name));
+  vec_free (name);
+
+  mp->sw_if_index = sw_if_index;
+  clib_memcpy (mp->address, &address, sizeof (address));
+
+  S (mp);
+  W (ret);
+  return ret;
+}
+
+static int
+api_ikev2_set_ike_transforms (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_ikev2_set_ike_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_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;
 }
 
 /*
@@ -12785,7 +13092,6 @@ api_map_add_domain (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_map_add_domain_t *mp;
-  f64 timeout;
 
   ip4_address_t ip4_prefix;
   ip6_address_t ip6_prefix;
@@ -12796,6 +13102,7 @@ api_map_add_domain (vat_main_t * vam)
   u8 is_translation = 0;
   u32 mtu = 0;
   u32 ip6_src_len = 128;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12854,10 +13161,11 @@ api_map_add_domain (vat_main_t * vam)
   mp->mtu = htons (mtu);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12865,10 +13173,10 @@ api_map_del_domain (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_map_del_domain_t *mp;
-  f64 timeout;
 
   u32 num_m_args = 0;
   u32 index;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12893,10 +13201,11 @@ api_map_del_domain (vat_main_t * vam)
   mp->index = ntohl (index);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply, return good/bad news  */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12904,10 +13213,10 @@ api_map_add_del_rule (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_map_add_del_rule_t *mp;
-  f64 timeout;
   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)
     {
@@ -12937,31 +13246,32 @@ api_map_add_del_rule (vat_main_t * vam)
   mp->psid = ntohs (psid);
 
   /* send it... */
-  S;
+  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;
-  f64 timeout;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   /* Construct the API message */
   M (MAP_DOMAIN_DUMP, mp);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
@@ -12969,8 +13279,9 @@ api_map_rule_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_map_rule_dump_t *mp;
-  f64 timeout;
+  vl_api_control_ping_t *mp_ping;
   u32 domain_index = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -12992,15 +13303,14 @@ api_map_rule_dump (vat_main_t * vam)
   mp->domain_index = htonl (domain_index);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static void vl_api_map_add_domain_reply_t_handler
@@ -13041,10 +13351,10 @@ static int
 api_get_first_msg_id (vat_main_t * vam)
 {
   vl_api_get_first_msg_id_t *mp;
-  f64 timeout;
   unformat_input_t *i = vam->input;
   u8 *name;
   u8 name_set = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -13069,10 +13379,9 @@ api_get_first_msg_id (vat_main_t * vam)
 
   M (GET_FIRST_MSG_ID, mp);
   clib_memcpy (mp->name, name, vec_len (name));
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13080,9 +13389,9 @@ api_cop_interface_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *line_input = vam->input;
   vl_api_cop_interface_enable_disable_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
   u8 enable_disable = 1;
+  int ret;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
@@ -13111,9 +13420,10 @@ api_cop_interface_enable_disable (vat_main_t * vam)
   mp->enable_disable = enable_disable;
 
   /* send it... */
-  S;
+  S (mp);
   /* Wait for the reply */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13121,10 +13431,10 @@ api_cop_whitelist_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *line_input = vam->input;
   vl_api_cop_whitelist_enable_disable_t *mp;
-  f64 timeout;
   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)
     {
@@ -13160,23 +13470,25 @@ api_cop_whitelist_enable_disable (vat_main_t * vam)
   mp->default_cop = default_cop;
 
   /* send it... */
-  S;
+  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;
-  f64 timeout;
+  int ret;
 
   M (GET_NODE_GRAPH, mp);
 
   /* send it... */
-  S;
+  S (mp);
   /* Wait for the reply */
-  W;
+  W (ret);
+  return ret;
 }
 
 /* *INDENT-OFF* */
@@ -13246,7 +13558,6 @@ api_lisp_add_del_locator_set (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_locator_set_t *mp;
-  f64 timeout = ~0;
   u8 is_add = 1;
   u8 *locator_set_name = NULL;
   u8 locator_set_name_set = 0;
@@ -13254,6 +13565,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)
     {
@@ -13319,13 +13631,11 @@ api_lisp_add_del_locator_set (vat_main_t * vam)
   vec_free (locators);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13333,7 +13643,6 @@ api_lisp_add_del_locator (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_locator_t *mp;
-  f64 timeout = ~0;
   u32 tmp_if_index = ~0;
   u32 sw_if_index = ~0;
   u8 sw_if_index_set = 0;
@@ -13345,6 +13654,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)
@@ -13434,13 +13744,11 @@ api_lisp_add_del_locator (vat_main_t * vam)
   vec_free (locator_set_name);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 uword
@@ -13473,7 +13781,6 @@ api_lisp_add_del_local_eid (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_local_eid_t *mp;
-  f64 timeout = ~0;
   u8 is_add = 1;
   u8 eid_set = 0;
   lisp_eid_vat_t _eid, *eid = &_eid;
@@ -13482,6 +13789,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)
@@ -13561,13 +13869,11 @@ api_lisp_add_del_local_eid (vat_main_t * vam)
   vec_free (key);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /* *INDENT-OFF* */
@@ -13587,7 +13893,6 @@ 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;
-  f64 timeout = ~0;
   u8 is_add = 1;
   lisp_eid_vat_t _rmt_eid, *rmt_eid = &_rmt_eid;
   lisp_eid_vat_t _lcl_eid, *lcl_eid = &_lcl_eid;
@@ -13597,6 +13902,7 @@ api_lisp_gpe_add_del_fwd_entry (vat_main_t * vam)
   ip6_address_t rmt_rloc6, lcl_rloc6;
   vl_api_lisp_gpe_locator_t *rmt_locs = 0, *lcl_locs = 0, rloc, *curr_rloc =
     0;
+  int ret;
 
   memset (&rloc, 0, sizeof (rloc));
 
@@ -13714,13 +14020,11 @@ api_lisp_gpe_add_del_fwd_entry (vat_main_t * vam)
   vec_free (rmt_locs);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13728,12 +14032,12 @@ api_lisp_add_del_map_server (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_map_server_t *mp;
-  f64 timeout = ~0;
   u8 is_add = 1;
   u8 ipv4_set = 0;
   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)
@@ -13782,13 +14086,11 @@ api_lisp_add_del_map_server (vat_main_t * vam)
     }
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13796,12 +14098,12 @@ api_lisp_add_del_map_resolver (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_map_resolver_t *mp;
-  f64 timeout = ~0;
   u8 is_add = 1;
   u8 ipv4_set = 0;
   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)
@@ -13850,13 +14152,11 @@ api_lisp_add_del_map_resolver (vat_main_t * vam)
     }
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13864,9 +14164,9 @@ api_lisp_gpe_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_gpe_enable_disable_t *mp;
-  f64 timeout = ~0;
   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)
@@ -13897,13 +14197,11 @@ api_lisp_gpe_enable_disable (vat_main_t * vam)
   mp->is_en = is_en;
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13911,9 +14209,9 @@ api_lisp_rloc_probe_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_rloc_probe_enable_disable_t *mp;
-  f64 timeout = ~0;
   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)
@@ -13941,13 +14239,11 @@ api_lisp_rloc_probe_enable_disable (vat_main_t * vam)
   mp->is_enabled = is_en;
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13955,9 +14251,9 @@ api_lisp_map_register_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_map_register_enable_disable_t *mp;
-  f64 timeout = ~0;
   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)
@@ -13985,13 +14281,11 @@ api_lisp_map_register_enable_disable (vat_main_t * vam)
   mp->is_enabled = is_en;
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -13999,9 +14293,9 @@ api_lisp_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_enable_disable_t *mp;
-  f64 timeout = ~0;
   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)
@@ -14031,73 +14325,68 @@ api_lisp_enable_disable (vat_main_t * vam)
   mp->is_en = is_en;
 
   /* send it... */
-  S;
+  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)
 {
-  f64 timeout = ~0;
   vl_api_show_lisp_map_register_state_t *mp;
+  int ret;
 
   M (SHOW_LISP_MAP_REGISTER_STATE, mp);
 
   /* send */
-  S;
+  S (mp);
 
   /* wait for reply */
-  W;
-
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_show_lisp_rloc_probe_state (vat_main_t * vam)
 {
-  f64 timeout = ~0;
   vl_api_show_lisp_rloc_probe_state_t *mp;
+  int ret;
 
   M (SHOW_LISP_RLOC_PROBE_STATE, mp);
 
   /* send */
-  S;
+  S (mp);
 
   /* wait for reply */
-  W;
-
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_show_lisp_map_request_mode (vat_main_t * vam)
 {
-  f64 timeout = ~0;
   vl_api_show_lisp_map_request_mode_t *mp;
+  int ret;
 
   M (SHOW_LISP_MAP_REQUEST_MODE, mp);
 
   /* send */
-  S;
+  S (mp);
 
   /* wait for reply */
-  W;
-
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
 api_lisp_map_request_mode (vat_main_t * vam)
 {
-  f64 timeout = ~0;
   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)
@@ -14118,13 +14407,11 @@ api_lisp_map_request_mode (vat_main_t * vam)
   mp->mode = mode;
 
   /* send */
-  S;
+  S (mp);
 
   /* wait for reply */
-  W;
-
-  /* notreached */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /**
@@ -14136,12 +14423,12 @@ api_lisp_map_request_mode (vat_main_t * vam)
 static int
 api_lisp_pitr_set_locator_set (vat_main_t * vam)
 {
-  f64 timeout = ~0;
   u8 ls_name_set = 0;
   unformat_input_t *input = vam->input;
   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)
@@ -14170,20 +14457,18 @@ api_lisp_pitr_set_locator_set (vat_main_t * vam)
   vec_free (ls_name);
 
   /* send */
-  S;
+  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;
-  f64 timeout = ~0;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -14192,13 +14477,11 @@ api_show_lisp_pitr (vat_main_t * vam)
 
   M (SHOW_LISP_PITR, mp);
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /**
@@ -14207,11 +14490,11 @@ api_show_lisp_pitr (vat_main_t * vam)
 static int
 api_lisp_eid_table_add_del_map (vat_main_t * vam)
 {
-  f64 timeout = ~0;
   unformat_input_t *input = vam->input;
   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)
@@ -14248,13 +14531,11 @@ api_lisp_eid_table_add_del_map (vat_main_t * vam)
   mp->is_l2 = bd_index_set;
 
   /* send */
-  S;
+  S (mp);
 
   /* wait for reply */
-  W;
-
-  /* notreached */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 uword
@@ -14297,7 +14578,6 @@ api_lisp_add_del_remote_mapping (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_remote_mapping_t *mp;
-  f64 timeout = ~0;
   u32 vni = 0;
   lisp_eid_vat_t _eid, *eid = &_eid;
   lisp_eid_vat_t _seid, *seid = &_seid;
@@ -14306,6 +14586,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));
 
@@ -14403,13 +14684,11 @@ api_lisp_add_del_remote_mapping (vat_main_t * vam)
   vec_free (rlocs);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /**
@@ -14424,7 +14703,6 @@ api_lisp_add_del_adjacency (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_adjacency_t *mp;
-  f64 timeout = ~0;
   u32 vni = 0;
   ip4_address_t leid4, reid4;
   ip6_address_t leid6, reid6;
@@ -14433,6 +14711,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;
 
@@ -14531,13 +14810,11 @@ api_lisp_add_del_adjacency (vat_main_t * vam)
     }
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -14545,9 +14822,9 @@ 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;
-  f64 timeout = ~0;
   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)
@@ -14599,13 +14876,11 @@ api_lisp_gpe_add_del_iface (vat_main_t * vam)
   mp->vni = vni;
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 /**
@@ -14619,10 +14894,10 @@ api_lisp_add_del_map_request_itr_rlocs (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_add_del_map_request_itr_rlocs_t *mp;
-  f64 timeout = ~0;
   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)
@@ -14669,13 +14944,11 @@ api_lisp_add_del_map_request_itr_rlocs (vat_main_t * vam)
   vec_free (locator_set_name);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -14683,10 +14956,11 @@ api_lisp_locator_dump (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_locator_dump_t *mp;
-  f64 timeout = ~0;
+  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)
@@ -14742,28 +15016,25 @@ api_lisp_locator_dump (vat_main_t * vam)
     }
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  /* 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;
-  f64 timeout = ~0;
   u8 filter = 0;
+  int ret;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -14793,19 +15064,15 @@ api_lisp_locator_set_dump (vat_main_t * vam)
   mp->filter = filter;
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  /* 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
@@ -14815,7 +15082,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;
-  f64 timeout = ~0;
+  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)
@@ -14852,26 +15120,23 @@ api_lisp_eid_table_map_dump (vat_main_t * vam)
   mp->is_l2 = is_l2;
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  /* 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;
-  f64 timeout = ~0;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -14881,19 +15146,15 @@ api_lisp_eid_table_vni_dump (vat_main_t * vam)
   M (LISP_EID_TABLE_VNI_DUMP, mp);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  /* 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
@@ -14901,13 +15162,14 @@ api_lisp_eid_table_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_lisp_eid_table_dump_t *mp;
-  f64 timeout = ~0;
+  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)
     {
@@ -14981,20 +15243,15 @@ api_lisp_eid_table_dump (vat_main_t * vam)
     }
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15002,9 +15259,9 @@ 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;
-  f64 timeout = ~0;
   u8 vni_set = 0;
   u32 vni = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15035,13 +15292,11 @@ api_lisp_gpe_fwd_entries_get (vat_main_t * vam)
   mp->vni = clib_host_to_net_u32 (vni);
 
   /* send it... */
-  S;
+  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
@@ -15054,9 +15309,9 @@ api_lisp_adjacencies_get (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_lisp_adjacencies_get_t *mp;
-  f64 timeout = ~0;
   u8 vni_set = 0;
   u32 vni = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15086,20 +15341,19 @@ api_lisp_adjacencies_get (vat_main_t * vam)
   mp->vni = clib_host_to_net_u32 (vni);
 
   /* send it... */
-  S;
+  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;
-  f64 timeout = ~0;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -15108,26 +15362,23 @@ api_lisp_map_server_dump (vat_main_t * vam)
 
   M (LISP_MAP_SERVER_DUMP, mp);
   /* send it... */
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  /* 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;
-  f64 timeout = ~0;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -15136,26 +15387,22 @@ api_lisp_map_resolver_dump (vat_main_t * vam)
 
   M (LISP_MAP_RESOLVER_DUMP, mp);
   /* send it... */
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  /* 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;
-  f64 timeout = ~0;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -15164,21 +15411,20 @@ api_show_lisp_status (vat_main_t * vam)
 
   M (SHOW_LISP_STATUS, mp);
   /* send it... */
-  S;
+  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;
-  f64 timeout = ~0;
+  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)
     {
@@ -15202,25 +15448,21 @@ api_lisp_gpe_fwd_entry_path_dump (vat_main_t * vam)
   M (LISP_GPE_FWD_ENTRY_PATH_DUMP, mp);
 
   /* send it... */
-  S;
+  S (mp);
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  /* 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;
-  f64 timeout = ~0;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -15229,12 +15471,10 @@ api_lisp_get_map_request_itr_rlocs (vat_main_t * vam)
 
   M (LISP_GET_MAP_REQUEST_ITR_RLOCS, mp);
   /* send it... */
-  S;
+  S (mp);
   /* Wait for a reply... */
-  W;
-
-  /* NOTREACHED */
-  return 0;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15242,10 +15482,10 @@ api_af_packet_create (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_af_packet_create_t *mp;
-  f64 timeout;
   u8 *host_if_name = 0;
   u8 hw_addr[6];
   u8 random_hw_addr = 1;
+  int ret;
 
   memset (hw_addr, 0, sizeof (hw_addr));
 
@@ -15278,10 +15518,9 @@ api_af_packet_create (vat_main_t * vam)
   mp->use_random_hw_addr = random_hw_addr;
   vec_free (host_if_name);
 
-  S;
-  W2 (fprintf (vam->ofp, " new sw_if_index = %d ", vam->sw_if_index));
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W2 (ret, fprintf (vam->ofp, " new sw_if_index = %d ", vam->sw_if_index));
+  return ret;
 }
 
 static int
@@ -15289,8 +15528,8 @@ api_af_packet_delete (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_af_packet_delete_t *mp;
-  f64 timeout;
   u8 *host_if_name = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15317,10 +15556,9 @@ api_af_packet_delete (vat_main_t * vam)
   clib_memcpy (mp->host_if_name, host_if_name, vec_len (host_if_name));
   vec_free (host_if_name);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15328,7 +15566,6 @@ api_policer_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_policer_add_del_t *mp;
-  f64 timeout;
   u8 is_add = 1;
   u8 *name = 0;
   u32 cir = 0;
@@ -15340,6 +15577,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;
@@ -15417,10 +15655,9 @@ api_policer_add_del (vat_main_t * vam)
   mp->violate_dscp = violate_action.dscp;
   mp->color_aware = color_aware;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15428,9 +15665,10 @@ api_policer_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_policer_dump_t *mp;
-  f64 timeout = ~0;
+  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)
     {
@@ -15448,19 +15686,15 @@ api_policer_dump (vat_main_t * vam)
   clib_memcpy (mp->match_name, match_name, vec_len (match_name));
   vec_free (match_name);
   /* send it... */
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  /* 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
@@ -15468,13 +15702,13 @@ api_policer_classify_set_interface (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_policer_classify_set_interface_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   int sw_if_index_set;
   u32 ip4_table_index = ~0;
   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)
     {
@@ -15511,10 +15745,9 @@ api_policer_classify_set_interface (vat_main_t * vam)
   mp->l2_table_index = ntohl (l2_table_index);
   mp->is_add = is_add;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15522,8 +15755,9 @@ api_policer_classify_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_policer_classify_dump_t *mp;
-  f64 timeout = ~0;
+  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))
     ;
@@ -15541,19 +15775,15 @@ api_policer_classify_dump (vat_main_t * vam)
   M (POLICER_CLASSIFY_DUMP, mp);
   mp->type = type;
   /* send it... */
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  /* 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
@@ -15561,12 +15791,12 @@ api_netmap_create (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_netmap_create_t *mp;
-  f64 timeout;
   u8 *if_name = 0;
   u8 hw_addr[6];
   u8 random_hw_addr = 1;
   u8 is_pipe = 0;
   u8 is_master = 0;
+  int ret;
 
   memset (hw_addr, 0, sizeof (hw_addr));
 
@@ -15607,10 +15837,9 @@ api_netmap_create (vat_main_t * vam)
   mp->is_master = is_master;
   vec_free (if_name);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -15618,8 +15847,8 @@ api_netmap_delete (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_netmap_delete_t *mp;
-  f64 timeout;
   u8 *if_name = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -15646,10 +15875,9 @@ api_netmap_delete (vat_main_t * vam)
   clib_memcpy (mp->netmap_if_name, if_name, vec_len (if_name));
   vec_free (if_name);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static void vl_api_mpls_tunnel_details_t_handler
@@ -15705,8 +15933,9 @@ static int
 api_mpls_tunnel_dump (vat_main_t * vam)
 {
   vl_api_mpls_tunnel_dump_t *mp;
-  f64 timeout;
+  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)
@@ -15722,15 +15951,14 @@ api_mpls_tunnel_dump (vat_main_t * vam)
 
   M (MPLS_TUNNEL_DUMP, mp);
   mp->tunnel_index = htonl (index);
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 #define vl_api_mpls_fib_details_t_endian vl_noop_handler
@@ -15818,18 +16046,18 @@ static int
 api_mpls_fib_dump (vat_main_t * vam)
 {
   vl_api_mpls_fib_dump_t *mp;
-  f64 timeout;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   M (MPLS_FIB_DUMP, mp);
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 #define vl_api_ip_fib_details_t_endian vl_noop_handler
@@ -15919,18 +16147,18 @@ static int
 api_ip_fib_dump (vat_main_t * vam)
 {
   vl_api_ip_fib_dump_t *mp;
-  f64 timeout;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   M (IP_FIB_DUMP, mp);
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static void vl_api_ip_neighbor_details_t_handler
@@ -15987,9 +16215,10 @@ api_ip_neighbor_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ip_neighbor_dump_t *mp;
-  f64 timeout;
+  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)
@@ -16013,15 +16242,14 @@ api_ip_neighbor_dump (vat_main_t * vam)
   M (IP_NEIGHBOR_DUMP, mp);
   mp->is_ipv6 = (u8) is_ipv6;
   mp->sw_if_index = ntohl (sw_if_index);
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 #define vl_api_ip6_fib_details_t_endian vl_noop_handler
@@ -16111,34 +16339,33 @@ static int
 api_ip6_fib_dump (vat_main_t * vam)
 {
   vl_api_ip6_fib_dump_t *mp;
-  f64 timeout;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   M (IP6_FIB_DUMP, mp);
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  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;
-  f64 timeout;
+  int ret;
 
   /* Construct the API message */
   M (CLASSIFY_TABLE_IDS, mp);
   mp->context = 0;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 int
@@ -16146,9 +16373,9 @@ api_classify_table_by_interface (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_classify_table_by_interface_t *mp;
-  f64 timeout;
 
   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))
@@ -16169,10 +16396,9 @@ api_classify_table_by_interface (vat_main_t * vam)
   mp->context = 0;
   mp->sw_if_index = ntohl (sw_if_index);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 int
@@ -16180,9 +16406,9 @@ api_classify_table_info (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_classify_table_info_t *mp;
-  f64 timeout;
 
   u32 table_id = ~0;
+  int ret;
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (input, "table_id %d", &table_id))
@@ -16201,10 +16427,9 @@ api_classify_table_info (vat_main_t * vam)
   mp->context = 0;
   mp->table_id = ntohl (table_id);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 int
@@ -16212,9 +16437,10 @@ api_classify_session_dump (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_classify_session_dump_t *mp;
-  f64 timeout;
+  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))
@@ -16232,17 +16458,14 @@ api_classify_session_dump (vat_main_t * vam)
   M (CLASSIFY_SESSION_DUMP, mp);
   mp->context = 0;
   mp->table_id = ntohl (table_id);
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
-  /* NOTREACHED */
-  return 0;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static void
@@ -16296,30 +16519,30 @@ int
 api_ipfix_exporter_dump (vat_main_t * vam)
 {
   vl_api_ipfix_exporter_dump_t *mp;
-  f64 timeout;
+  int ret;
 
   /* Construct the API message */
   M (IPFIX_EXPORTER_DUMP, mp);
   mp->context = 0;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
 api_ipfix_classify_stream_dump (vat_main_t * vam)
 {
   vl_api_ipfix_classify_stream_dump_t *mp;
-  f64 timeout;
+  int ret;
 
   /* Construct the API message */
   M (IPFIX_CLASSIFY_STREAM_DUMP, mp);
   mp->context = 0;
 
-  S;
-  W;
+  S (mp);
+  W (ret);
+  return ret;
   /* NOTREACHED */
   return 0;
 }
@@ -16356,7 +16579,8 @@ static int
 api_ipfix_classify_table_dump (vat_main_t * vam)
 {
   vl_api_ipfix_classify_table_dump_t *mp;
-  f64 timeout;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -16368,15 +16592,14 @@ api_ipfix_classify_table_dump (vat_main_t * vam)
   M (IPFIX_CLASSIFY_TABLE_DUMP, mp);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static void
@@ -16415,10 +16638,10 @@ api_sw_interface_span_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_span_enable_disable_t *mp;
-  f64 timeout;
   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)
     {
@@ -16451,10 +16674,9 @@ api_sw_interface_span_enable_disable (vat_main_t * vam)
   mp->sw_if_index_to = htonl (dst_sw_if_index);
   mp->state = state;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static void
@@ -16542,18 +16764,18 @@ static int
 api_sw_interface_span_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_span_dump_t *mp;
-  f64 timeout;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   M (SW_INTERFACE_SPAN_DUMP, mp);
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 int
@@ -16561,9 +16783,9 @@ api_pg_create_interface (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_pg_create_interface_t *mp;
-  f64 timeout;
 
   u32 if_id = ~0;
+  int ret;
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (input, "if_id %d", &if_id))
@@ -16582,10 +16804,9 @@ api_pg_create_interface (vat_main_t * vam)
   mp->context = 0;
   mp->interface_id = ntohl (if_id);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 int
@@ -16593,13 +16814,13 @@ api_pg_capture (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_pg_capture_t *mp;
-  f64 timeout;
 
   u32 if_id = ~0;
   u8 enable = 1;
   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))
@@ -16641,10 +16862,9 @@ api_pg_capture (vat_main_t * vam)
     }
   vec_free (pcap_file);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 int
@@ -16652,11 +16872,11 @@ api_pg_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_pg_enable_disable_t *mp;
-  f64 timeout;
 
   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))
@@ -16688,10 +16908,9 @@ api_pg_enable_disable (vat_main_t * vam)
     }
   vec_free (stream_name);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 int
@@ -16699,7 +16918,6 @@ api_ip_source_and_port_range_check_add_del (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_ip_source_and_port_range_check_add_del_t *mp;
-  f64 timeout;
 
   u16 *low_ports = 0;
   u16 *high_ports = 0;
@@ -16713,6 +16931,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)
     {
@@ -16819,10 +17038,9 @@ api_ip_source_and_port_range_check_add_del (vat_main_t * vam)
 
   mp->vrf_id = ntohl (vrf_id);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 int
@@ -16830,12 +17048,12 @@ api_ip_source_and_port_range_check_interface_add_del (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_ip_source_and_port_range_check_interface_add_del_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
   int vrf_set = 0;
   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)
     {
@@ -16888,10 +17106,11 @@ api_ip_source_and_port_range_check_interface_add_del (vat_main_t * vam)
   mp->udp_in_vrf_id = ntohl (udp_in_vrf_id);
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
-  W;
+  W (ret);
+  return ret;
 }
 
 static int
@@ -16899,12 +17118,12 @@ api_ipsec_gre_add_del_tunnel (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_gre_add_del_tunnel_t *mp;
-  f64 timeout;
   u32 local_sa_id = 0;
   u32 remote_sa_id = 0;
   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)
     {
@@ -16933,10 +17152,9 @@ api_ipsec_gre_add_del_tunnel (vat_main_t * vam)
   clib_memcpy (mp->dst_address, &dst_address, sizeof (dst_address));
   mp->is_add = is_add;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -16944,11 +17162,11 @@ api_punt (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_punt_t *mp;
-  f64 timeout;
   u32 ipv = ~0;
   u32 protocol = ~0;
   u32 port = ~0;
   int is_add = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -16974,10 +17192,9 @@ api_punt (vat_main_t * vam)
   mp->l4_protocol = (u8) protocol;
   mp->l4_port = htons ((u16) port);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static void vl_api_ipsec_gre_tunnel_details_t_handler
@@ -17021,9 +17238,10 @@ api_ipsec_gre_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_gre_tunnel_dump_t *mp;
-  f64 timeout;
+  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)
@@ -17051,15 +17269,14 @@ api_ipsec_gre_tunnel_dump (vat_main_t * vam)
 
   mp->sw_if_index = htonl (sw_if_index);
 
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17067,8 +17284,8 @@ api_delete_subif (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_delete_subif_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -17090,8 +17307,9 @@ api_delete_subif (vat_main_t * vam)
   M (DELETE_SUBIF, mp);
   mp->sw_if_index = ntohl (sw_if_index);
 
-  S;
-  W;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 #define foreach_pbb_vtr_op      \
@@ -17104,7 +17322,6 @@ api_l2_interface_pbb_tag_rewrite (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2_interface_pbb_tag_rewrite_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0, vtr_op = ~0;
   u16 outer_tag = ~0;
   u8 dmac[6], smac[6];
@@ -17112,6 +17329,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));
@@ -17179,10 +17397,9 @@ api_l2_interface_pbb_tag_rewrite (vat_main_t * vam)
   mp->b_vlanid = ntohs (vlanid);
   mp->i_sid = ntohl (sid);
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17190,12 +17407,12 @@ api_flow_classify_set_interface (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_flow_classify_set_interface_t *mp;
-  f64 timeout;
   u32 sw_if_index;
   int sw_if_index_set;
   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)
     {
@@ -17229,10 +17446,9 @@ api_flow_classify_set_interface (vat_main_t * vam)
   mp->ip6_table_index = ntohl (ip6_table_index);
   mp->is_add = is_add;
 
-  S;
-  W;
-  /* NOTREACHED */
-  return 0;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17240,8 +17456,9 @@ api_flow_classify_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_flow_classify_dump_t *mp;
-  f64 timeout = ~0;
+  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))
     ;
@@ -17259,19 +17476,15 @@ api_flow_classify_dump (vat_main_t * vam)
   M (FLOW_CLASSIFY_DUMP, mp);
   mp->type = type;
   /* send it... */
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  /* 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
@@ -17279,11 +17492,11 @@ api_feature_enable_disable (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_feature_enable_disable_t *mp;
-  f64 timeout;
   u8 *arc_name = 0;
   u8 *feature_name = 0;
   u32 sw_if_index = ~0;
   u8 enable = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -17337,8 +17550,9 @@ api_feature_enable_disable (vat_main_t * vam)
   vec_free (arc_name);
   vec_free (feature_name);
 
-  S;
-  W;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17346,10 +17560,10 @@ api_sw_interface_tag_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_tag_add_del_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
   u8 *tag = 0;
   u8 enable = 1;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -17385,8 +17599,9 @@ api_sw_interface_tag_add_del (vat_main_t * vam)
     strncpy ((char *) mp->tag, (char *) tag, ARRAY_LEN (mp->tag) - 1);
   vec_free (tag);
 
-  S;
-  W;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 static void vl_api_l2_xconnect_details_t_handler
@@ -17422,7 +17637,8 @@ static int
 api_l2_xconnect_dump (vat_main_t * vam)
 {
   vl_api_l2_xconnect_dump_t *mp;
-  f64 timeout;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
 
   if (!vam->json_output)
     {
@@ -17431,15 +17647,14 @@ api_l2_xconnect_dump (vat_main_t * vam)
 
   M (L2_XCONNECT_DUMP, mp);
 
-  S;
+  S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S;
-  }
-  W;
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
 }
 
 static int
@@ -17447,9 +17662,9 @@ api_sw_interface_set_mtu (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_sw_interface_set_mtu_t *mp;
-  f64 timeout;
   u32 sw_if_index = ~0;
   u32 mtu = 0;
+  int ret;
 
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
     {
@@ -17480,8 +17695,9 @@ api_sw_interface_set_mtu (vat_main_t * vam)
   mp->sw_if_index = ntohl (sw_if_index);
   mp->mtu = ntohs ((u16) mtu);
 
-  S;
-  W;
+  S (mp);
+  W (ret);
+  return ret;
 }
 
 
@@ -18044,6 +18260,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,                                                       \