aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat/api_format.c
diff options
context:
space:
mode:
authorPavel Kotucek <pkotucek@cisco.com>2017-01-16 17:01:56 +0100
committerJohn Lo <loj@cisco.com>2017-02-21 00:00:12 +0000
commit65e845785f21e6b43c026f092e982171eec1f641 (patch)
treeb0fed4d7d055d61e1c659030eef8950ab8460151 /src/vat/api_format.c
parent9745aceb240d4586c47869203f48479c58e0f86e (diff)
VPP-540 : pbb tag rewrite details
Extended sw_interface_dump to provide 802.1ah (pbb) tag rewrite info if present. Extended log "l2-output" to provide raw data to display result of prospetive pbb tag rewrite. Tracing is moved after l2output_vtr to show these changes. Change-Id: I8b7cb865dc67ce21afab402cc086dac35f7c0f07 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
Diffstat (limited to 'src/vat/api_format.c')
-rw-r--r--src/vat/api_format.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index e3d8ab48eb9..0f03527913d 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -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