diff options
author | marek zavodsky <mazavods@gmail.com> | 2016-06-21 05:35:16 +0200 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2016-06-23 14:22:12 +0000 |
commit | 2c21a9aa887d52840bfefe60ca36a4a6941217b0 (patch) | |
tree | 48f2223fd15e2e1823355482f4538c5ea96926bb /vnet | |
parent | 324112fad06e0461958f22827f944595466e1891 (diff) |
VPP-72 Added api call aquivalents to:
"show mpls fib" -> "mpls_fib_encap_dump" and "mpls_fib_decap_dump"
"show mpls tunnel" -> "mpls_eth_tunnel_dump [tunnel-index <tunnel-id>]" and
"mpls_gre_tunnel_dump [tunnel-index <tunnel-id>]"
Change-Id: I59699039392f06dc61f62a015d07186a91cfaf45
Signed-off-by: marek zavodsky <mazavods@gmail.com>
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/vnet/mpls-gre/mpls.c | 14 | ||||
-rw-r--r-- | vnet/vnet/mpls-gre/mpls.h | 17 |
2 files changed, 20 insertions, 11 deletions
diff --git a/vnet/vnet/mpls-gre/mpls.c b/vnet/vnet/mpls-gre/mpls.c index 067f799c611..4b36c5dc34d 100644 --- a/vnet/vnet/mpls-gre/mpls.c +++ b/vnet/vnet/mpls-gre/mpls.c @@ -577,15 +577,7 @@ VLIB_CLI_COMMAND (mpls_del_decap_command, static) = { .function = mpls_del_decap_command_fn, }; -typedef struct { - u32 fib_index; - u32 entry_index; - u32 dest; - u32 s_bit; - u32 label; -} show_mpls_fib_t; - -static int +int mpls_dest_cmp(void * a1, void * a2) { show_mpls_fib_t * r1 = a1; @@ -594,7 +586,7 @@ mpls_dest_cmp(void * a1, void * a2) return clib_net_to_host_u32(r1->dest) - clib_net_to_host_u32(r2->dest); } -static int +int mpls_fib_index_cmp(void * a1, void * a2) { show_mpls_fib_t * r1 = a1; @@ -603,7 +595,7 @@ mpls_fib_index_cmp(void * a1, void * a2) return r1->fib_index - r2->fib_index; } -static int +int mpls_label_cmp(void * a1, void * a2) { show_mpls_fib_t * r1 = a1; diff --git a/vnet/vnet/mpls-gre/mpls.h b/vnet/vnet/mpls-gre/mpls.h index cd487b2f59d..d8ffca22793 100644 --- a/vnet/vnet/mpls-gre/mpls.h +++ b/vnet/vnet/mpls-gre/mpls.h @@ -229,4 +229,21 @@ typedef struct { u8 * format_mpls_eth_tx_trace (u8 * s, va_list * args); +typedef struct { + u32 fib_index; + u32 entry_index; + u32 dest; + u32 s_bit; + u32 label; +} show_mpls_fib_t; + +int +mpls_dest_cmp(void * a1, void * a2); + +int +mpls_fib_index_cmp(void * a1, void * a2); + +int +mpls_label_cmp(void * a1, void * a2); + #endif /* included_vnet_mpls_gre_h */ |