summaryrefslogtreecommitdiffstats
path: root/vpp/vpp-api/custom_dump.c
diff options
context:
space:
mode:
authorPavel Kotucek <pkotucek@cisco.com>2016-08-26 16:11:36 +0200
committerJohn Lo <loj@cisco.com>2016-10-04 17:15:16 +0000
commit95300d19152877dca8dfbd574dc6da50620125e8 (patch)
treee645d4dd4a83c37f7b407042132ebf4fbaf0582c /vpp/vpp-api/custom_dump.c
parentac09280947dcf035f51cb394b88de3c7b66a6320 (diff)
VPP-355: add PBB (802.1ah) tag rewrite
- new API/CLI to define pbb tag rewrite on interface - encapsulation/decapsulation of PBB tags - tracing of PBB header - PBB tag rewrite operations Change-Id: I538b3025a8b2e41cdeed9f10fea94bbcd28b5f5f Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
Diffstat (limited to 'vpp/vpp-api/custom_dump.c')
-rw-r--r--vpp/vpp-api/custom_dump.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/vpp/vpp-api/custom_dump.c b/vpp/vpp-api/custom_dump.c
index dc0dfa16..4689776a 100644
--- a/vpp/vpp-api/custom_dump.c
+++ b/vpp/vpp-api/custom_dump.c
@@ -2748,6 +2748,29 @@ static void *vl_api_ipsec_gre_tunnel_dump_t_print
FINISH;
}
+static void *vl_api_l2_interface_pbb_tag_rewrite_t_print
+ (vl_api_l2_interface_pbb_tag_rewrite_t * mp, void *handle)
+{
+ u8 *s;
+ u32 vtr_op = ntohl (mp->vtr_op);
+
+ s = format (0, "SCRIPT: l2_interface_pbb_tag_rewrite ");
+
+ s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+ s = format (s, "vtr_op %d ", vtr_op);
+ if (vtr_op != L2_VTR_DISABLED && vtr_op != L2_VTR_POP_2)
+ {
+ if (vtr_op == L2_VTR_TRANSLATE_2_2)
+ s = format (s, "%d ", ntohs (mp->outer_tag));
+ s = format (s, "dmac %U ", format_ethernet_address, &mp->b_dmac);
+ s = format (s, "smac %U ", format_ethernet_address, &mp->b_smac);
+ s = format (s, "sid %d ", ntohl (mp->i_sid));
+ s = format (s, "vlanid %d ", ntohs (mp->b_vlanid));
+ }
+
+ FINISH;
+}
+
#define foreach_custom_print_no_arg_function \
_(lisp_eid_table_vni_dump) \
_(lisp_map_resolver_dump) \
@@ -2908,7 +2931,8 @@ _(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump) \
_(LISP_LOCATOR_DUMP, lisp_locator_dump) \
_(IPSEC_GRE_ADD_DEL_TUNNEL, ipsec_gre_add_del_tunnel) \
_(IPSEC_GRE_TUNNEL_DUMP, ipsec_gre_tunnel_dump) \
-_(DELETE_SUBIF, delete_subif)
+_(DELETE_SUBIF, delete_subif) \
+_(L2_INTERFACE_PBB_TAG_REWRITE, l2_interface_pbb_tag_rewrite)
void
vl_msg_api_custom_dump_configure (api_main_t * am)
{