VPP-540 : pbb tag rewrite details
[vpp.git] / src / vat / api_format.c
index 3a40a55..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
@@ -16161,6 +16174,24 @@ api_ip_fib_dump (vat_main_t * vam)
   return ret;
 }
 
+static int
+api_ip_mfib_dump (vat_main_t * vam)
+{
+  vl_api_ip_mfib_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
+
+  M (IP_MFIB_DUMP, mp);
+  S (mp);
+
+  /* Use a control ping for synchronization */
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
+}
+
 static void vl_api_ip_neighbor_details_t_handler
   (vl_api_ip_neighbor_details_t * mp)
 {
@@ -16353,6 +16384,24 @@ api_ip6_fib_dump (vat_main_t * vam)
   return ret;
 }
 
+static int
+api_ip6_mfib_dump (vat_main_t * vam)
+{
+  vl_api_ip6_mfib_dump_t *mp;
+  vl_api_control_ping_t *mp_ping;
+  int ret;
+
+  M (IP6_MFIB_DUMP, mp);
+  S (mp);
+
+  /* Use a control ping for synchronization */
+  M (CONTROL_PING, mp_ping);
+  S (mp_ping);
+
+  W (ret);
+  return ret;
+}
+
 int
 api_classify_table_ids (vat_main_t * vam)
 {
@@ -18385,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>"    \