VPP-540 : pbb tag rewrite details
[vpp.git] / src / vat / api_format.c
index db5478c..0f03527 100644 (file)
@@ -914,6 +914,19 @@ static void vl_api_sw_interface_details_t_handler_json
                            ntohl (mp->vtr_push_dot1q));
   vat_json_object_add_uint (node, "vtr_tag1", ntohl (mp->vtr_tag1));
   vat_json_object_add_uint (node, "vtr_tag2", ntohl (mp->vtr_tag2));
+  if (mp->sub_dot1ah)
+    {
+      vat_json_object_add_string_copy (node, "pbb_vtr_dmac",
+                                      format (0, "%U",
+                                              format_ethernet_address,
+                                              &mp->b_dmac));
+      vat_json_object_add_string_copy (node, "pbb_vtr_smac",
+                                      format (0, "%U",
+                                              format_ethernet_address,
+                                              &mp->b_smac));
+      vat_json_object_add_uint (node, "pbb_vtr_b_vlanid", mp->b_vlanid);
+      vat_json_object_add_uint (node, "pbb_vtr_i_sid", mp->i_sid);
+    }
 }
 
 static void vl_api_sw_interface_set_flags_t_handler
@@ -3843,6 +3856,14 @@ _(ikev2_profile_set_auth_reply)                         \
 _(ikev2_profile_set_id_reply)                           \
 _(ikev2_profile_set_ts_reply)                           \
 _(ikev2_set_local_key_reply)                            \
+_(ikev2_set_responder_reply)                            \
+_(ikev2_set_ike_transforms_reply)                       \
+_(ikev2_set_esp_transforms_reply)                       \
+_(ikev2_set_sa_lifetime_reply)                          \
+_(ikev2_initiate_sa_init_reply)                         \
+_(ikev2_initiate_del_ike_sa_reply)                      \
+_(ikev2_initiate_del_child_sa_reply)                    \
+_(ikev2_initiate_rekey_child_sa_reply)                  \
 _(delete_loopback_reply)                                \
 _(bd_ip_mac_add_del_reply)                              \
 _(map_del_domain_reply)                                 \
@@ -4076,6 +4097,14 @@ _(IKEV2_PROFILE_SET_AUTH_REPLY, ikev2_profile_set_auth_reply)           \
 _(IKEV2_PROFILE_SET_ID_REPLY, ikev2_profile_set_id_reply)               \
 _(IKEV2_PROFILE_SET_TS_REPLY, ikev2_profile_set_ts_reply)               \
 _(IKEV2_SET_LOCAL_KEY_REPLY, ikev2_set_local_key_reply)                 \
+_(IKEV2_SET_RESPONDER_REPLY, ikev2_set_responder_reply)                 \
+_(IKEV2_SET_IKE_TRANSFORMS_REPLY, ikev2_set_ike_transforms_reply)       \
+_(IKEV2_SET_ESP_TRANSFORMS_REPLY, ikev2_set_esp_transforms_reply)       \
+_(IKEV2_SET_SA_LIFETIME_REPLY, ikev2_set_sa_lifetime_reply)             \
+_(IKEV2_INITIATE_SA_INIT_REPLY, ikev2_initiate_sa_init_reply)           \
+_(IKEV2_INITIATE_DEL_IKE_SA_REPLY, ikev2_initiate_del_ike_sa_reply)     \
+_(IKEV2_INITIATE_DEL_CHILD_SA_REPLY, ikev2_initiate_del_child_sa_reply) \
+_(IKEV2_INITIATE_REKEY_CHILD_SA_REPLY, ikev2_initiate_rekey_child_sa_reply) \
 _(DELETE_LOOPBACK_REPLY, delete_loopback_reply)                         \
 _(BD_IP_MAC_ADD_DEL_REPLY, bd_ip_mac_add_del_reply)                     \
 _(DHCP_COMPL_EVENT, dhcp_compl_event)                                   \
@@ -4804,6 +4833,7 @@ int
 api_sw_interface_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   hash_pair_t *p;
   name_sort_t *nses = 0, *ns;
   sw_interface_subif_t *sub = NULL;
@@ -4898,11 +4928,9 @@ api_sw_interface_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -5683,6 +5711,7 @@ api_bridge_domain_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_bridge_domain_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u32 bd_id = ~0;
   int ret;
 
@@ -5700,11 +5729,8 @@ api_bridge_domain_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
   W (ret);
   return ret;
@@ -5883,14 +5909,14 @@ api_l2fib_add_del (vat_main_t * vam)
 
   if (count > 1)
     {
-      vl_api_control_ping_t *mp;
+      vl_api_control_ping_t *mp_ping;
       f64 after;
 
       /* Shut off async mode */
       vam->async_mode = 0;
 
-      M (CONTROL_PING, mp);
-      S (mp);
+      M (CONTROL_PING, mp_ping);
+      S (mp_ping);
 
       timeout = vat_time_now (vam) + 1.0;
       while (vat_time_now (vam) < timeout)
@@ -6556,15 +6582,15 @@ api_ip_add_del_route (vat_main_t * vam)
   /* When testing multiple add/del ops, use a control-ping to sync */
   if (count > 1)
     {
-      vl_api_control_ping_t *mp;
+      vl_api_control_ping_t *mp_ping;
       f64 after;
       f64 timeout;
 
       /* Shut off async mode */
       vam->async_mode = 0;
 
-      M (CONTROL_PING, mp);
-      S (mp);
+      M (CONTROL_PING, mp_ping);
+      S (mp_ping);
 
       timeout = vat_time_now (vam) + 1.0;
       while (vat_time_now (vam) < timeout)
@@ -6898,15 +6924,15 @@ api_mpls_route_add_del (vat_main_t * vam)
   /* When testing multiple add/del ops, use a control-ping to sync */
   if (count > 1)
     {
-      vl_api_control_ping_t *mp;
+      vl_api_control_ping_t *mp_ping;
       f64 after;
       f64 timeout;
 
       /* Shut off async mode */
       vam->async_mode = 0;
 
-      M (CONTROL_PING, mp);
-      S (mp);
+      M (CONTROL_PING, mp_ping);
+      S (mp_ping);
 
       timeout = vat_time_now (vam) + 1.0;
       while (vat_time_now (vam) < timeout)
@@ -10576,6 +10602,7 @@ static int
 api_sw_if_l2tpv3_tunnel_dump (vat_main_t * vam)
 {
   vl_api_sw_if_l2tpv3_tunnel_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   int ret;
 
   /* Get list of l2tpv3-tunnel interfaces */
@@ -10583,11 +10610,9 @@ api_sw_if_l2tpv3_tunnel_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -10624,6 +10649,7 @@ static int
 api_sw_interface_tap_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_tap_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   int ret;
 
   print (vam->ofp, "\n%-16s %s", "dev_name", "sw_if_index");
@@ -10632,11 +10658,9 @@ api_sw_interface_tap_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -10877,6 +10901,7 @@ api_vxlan_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_vxlan_tunnel_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   int ret;
@@ -10910,11 +10935,9 @@ api_vxlan_tunnel_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -11017,6 +11040,7 @@ api_gre_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_gre_tunnel_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   int ret;
@@ -11050,11 +11074,9 @@ api_gre_tunnel_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -11398,6 +11420,7 @@ static int
 api_sw_interface_vhost_user_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_vhost_user_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   int ret;
   print (vam->ofp,
         "Interface name           idx hdr_sz features server regions filename");
@@ -11407,11 +11430,9 @@ api_sw_interface_vhost_user_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -11602,6 +11623,7 @@ api_vxlan_gpe_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_vxlan_gpe_tunnel_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   int ret;
@@ -11635,11 +11657,9 @@ api_vxlan_gpe_tunnel_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -11692,6 +11712,7 @@ api_l2_fib_table_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_l2_fib_table_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u32 bd_id;
   u8 bd_id_set = 0;
   int ret;
@@ -11720,11 +11741,9 @@ api_l2_fib_table_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -11905,6 +11924,7 @@ 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;
@@ -11953,11 +11973,9 @@ api_ip_address_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -11966,6 +11984,7 @@ 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;
@@ -12010,11 +12029,9 @@ api_ip_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -12750,6 +12767,336 @@ api_ikev2_set_local_key (vat_main_t * vam)
   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;
+}
+
 /*
  * MAP
  */
@@ -12923,6 +13270,7 @@ static int
 api_map_domain_dump (vat_main_t * vam)
 {
   vl_api_map_domain_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   int ret;
 
   /* Construct the API message */
@@ -12932,11 +13280,9 @@ api_map_domain_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -12946,6 +13292,7 @@ api_map_rule_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_map_rule_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u32 domain_index = ~0;
   int ret;
 
@@ -12972,11 +13319,9 @@ api_map_rule_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -14624,6 +14969,7 @@ api_lisp_locator_dump (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_lisp_locator_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u8 is_index_set = 0, is_name_set = 0;
   u8 *ls_name = 0;
   u32 ls_index = ~0;
@@ -14686,11 +15032,9 @@ api_lisp_locator_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   /* Wait for a reply... */
   W (ret);
   return ret;
@@ -14700,6 +15044,7 @@ static int
 api_lisp_locator_set_dump (vat_main_t * vam)
 {
   vl_api_lisp_locator_set_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   unformat_input_t *input = vam->input;
   u8 filter = 0;
   int ret;
@@ -14735,11 +15080,9 @@ api_lisp_locator_set_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   /* Wait for a reply... */
   W (ret);
   return ret;
@@ -14752,6 +15095,7 @@ api_lisp_eid_table_map_dump (vat_main_t * vam)
   u8 mode_set = 0;
   unformat_input_t *input = vam->input;
   vl_api_lisp_eid_table_map_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   int ret;
 
   /* Parse args required to build the message */
@@ -14792,11 +15136,9 @@ api_lisp_eid_table_map_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   /* Wait for a reply... */
   W (ret);
   return ret;
@@ -14806,6 +15148,7 @@ static int
 api_lisp_eid_table_vni_dump (vat_main_t * vam)
 {
   vl_api_lisp_eid_table_vni_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   int ret;
 
   if (!vam->json_output)
@@ -14819,11 +15162,9 @@ api_lisp_eid_table_vni_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   /* Wait for a reply... */
   W (ret);
   return ret;
@@ -14834,6 +15175,7 @@ api_lisp_eid_table_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_lisp_eid_table_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   struct in_addr ip4;
   struct in6_addr ip6;
   u8 mac[6];
@@ -14917,11 +15259,8 @@ api_lisp_eid_table_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
 
   /* Wait for a reply... */
   W (ret);
@@ -15026,6 +15365,7 @@ static int
 api_lisp_map_server_dump (vat_main_t * vam)
 {
   vl_api_lisp_map_server_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   int ret;
 
   if (!vam->json_output)
@@ -15038,11 +15378,9 @@ api_lisp_map_server_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   /* Wait for a reply... */
   W (ret);
   return ret;
@@ -15052,6 +15390,7 @@ static int
 api_lisp_map_resolver_dump (vat_main_t * vam)
 {
   vl_api_lisp_map_resolver_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   int ret;
 
   if (!vam->json_output)
@@ -15064,11 +15403,9 @@ api_lisp_map_resolver_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   /* Wait for a reply... */
   W (ret);
   return ret;
@@ -15097,6 +15434,7 @@ static int
 api_lisp_gpe_fwd_entry_path_dump (vat_main_t * vam)
 {
   vl_api_lisp_gpe_fwd_entry_path_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   unformat_input_t *i = vam->input;
   u32 fwd_entry_index = ~0;
   int ret;
@@ -15125,11 +15463,9 @@ api_lisp_gpe_fwd_entry_path_dump (vat_main_t * vam)
   /* send it... */
   S (mp);
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   /* Wait for a reply... */
   W (ret);
   return ret;
@@ -15342,6 +15678,7 @@ api_policer_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_policer_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u8 *match_name = 0;
   u8 match_name_valid = 0;
   int ret;
@@ -15365,11 +15702,9 @@ api_policer_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   /* Wait for a reply... */
   W (ret);
   return ret;
@@ -15433,6 +15768,7 @@ api_policer_classify_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_policer_classify_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u8 type = POLICER_CLASSIFY_N_TABLES;
   int ret;
 
@@ -15455,11 +15791,9 @@ api_policer_classify_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   /* Wait for a reply... */
   W (ret);
   return ret;
@@ -15612,6 +15946,7 @@ static int
 api_mpls_tunnel_dump (vat_main_t * vam)
 {
   vl_api_mpls_tunnel_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   i32 index = -1;
   int ret;
 
@@ -15632,11 +15967,9 @@ api_mpls_tunnel_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -15726,17 +16059,16 @@ static int
 api_mpls_fib_dump (vat_main_t * vam)
 {
   vl_api_mpls_fib_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   int ret;
 
   M (MPLS_FIB_DUMP, mp);
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -15828,17 +16160,34 @@ static int
 api_ip_fib_dump (vat_main_t * vam)
 {
   vl_api_ip_fib_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   int ret;
 
   M (IP_FIB_DUMP, mp);
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
+}
+
+static int
+api_ip_mfib_dump (vat_main_t * vam)
+{
+  vl_api_ip_mfib_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
+
+  M (IP_MFIB_DUMP, mp);
+  S (mp);
+
+  /* Use a control ping for synchronization */
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -15897,6 +16246,7 @@ api_ip_neighbor_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ip_neighbor_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u8 is_ipv6 = 0;
   u32 sw_if_index = ~0;
   int ret;
@@ -15926,11 +16276,9 @@ api_ip_neighbor_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -16022,17 +16370,34 @@ static int
 api_ip6_fib_dump (vat_main_t * vam)
 {
   vl_api_ip6_fib_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   int ret;
 
   M (IP6_FIB_DUMP, mp);
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
+}
+
+static int
+api_ip6_mfib_dump (vat_main_t * vam)
+{
+  vl_api_ip6_mfib_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
+
+  M (IP6_MFIB_DUMP, mp);
+  S (mp);
+
+  /* Use a control ping for synchronization */
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -16121,6 +16486,7 @@ api_classify_session_dump (vat_main_t * vam)
 {
   unformat_input_t *input = vam->input;
   vl_api_classify_session_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
 
   u32 table_id = ~0;
   int ret;
@@ -16144,11 +16510,9 @@ api_classify_session_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -16264,6 +16628,7 @@ static int
 api_ipfix_classify_table_dump (vat_main_t * vam)
 {
   vl_api_ipfix_classify_table_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   int ret;
 
   if (!vam->json_output)
@@ -16279,11 +16644,9 @@ api_ipfix_classify_table_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -16450,17 +16813,16 @@ static int
 api_sw_interface_span_dump (vat_main_t * vam)
 {
   vl_api_sw_interface_span_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   int ret;
 
   M (SW_INTERFACE_SPAN_DUMP, mp);
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -16925,6 +17287,7 @@ api_ipsec_gre_tunnel_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_ipsec_gre_tunnel_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u32 sw_if_index;
   u8 sw_if_index_set = 0;
   int ret;
@@ -16958,11 +17321,9 @@ api_ipsec_gre_tunnel_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -17144,6 +17505,7 @@ api_flow_classify_dump (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
   vl_api_flow_classify_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   u8 type = FLOW_CLASSIFY_N_TABLES;
   int ret;
 
@@ -17166,11 +17528,9 @@ api_flow_classify_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   /* Wait for a reply... */
   W (ret);
   return ret;
@@ -17326,6 +17686,7 @@ static int
 api_l2_xconnect_dump (vat_main_t * vam)
 {
   vl_api_l2_xconnect_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
   int ret;
 
   if (!vam->json_output)
@@ -17338,11 +17699,9 @@ api_l2_xconnect_dump (vat_main_t * vam)
   S (mp);
 
   /* Use a control ping for synchronization */
-  {
-    vl_api_control_ping_t *mp;
-    M (CONTROL_PING, mp);
-    S (mp);
-  }
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
   W (ret);
   return ret;
 }
@@ -17950,6 +18309,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,                                                       \
@@ -18067,7 +18434,9 @@ _(flow_classify_set_interface,                                          \
   "<intfc> | sw_if_index <nn> [ip4-table <nn>] [ip6-table <nn>] [del]") \
 _(flow_classify_dump, "type [ip4|ip6]")                                 \
 _(ip_fib_dump, "")                                                      \
+_(ip_mfib_dump, "")                                                     \
 _(ip6_fib_dump, "")                                                     \
+_(ip6_mfib_dump, "")                                                    \
 _(feature_enable_disable, "arc_name <arc_name> "                        \
   "feature_name <feature_name> <intfc> | sw_if_index <nn> [disable]")  \
 _(sw_interface_tag_add_del, "<intfc> | sw_if_index <nn> tag <text>"    \