diff options
author | 2016-06-07 14:44:26 +0200 | |
---|---|---|
committer | 2016-06-27 13:47:34 +0000 | |
commit | 20c90f765dd0350892421e1dea544752108f4ce9 (patch) | |
tree | bc90a2cba4f365ec31b7db144412dd85fcd31147 /vpp/api/custom_dump.c | |
parent | 8e39bb402afd5908f5b2747bcbb0cc5ffd06bacf (diff) |
VPP-108 : API calls to read classify table and sessions
Added new API calls to read
- classify table ids as array
- classify table ids for specified interface
- classsify table info
and to dump sessions of specified classify table.
Change-Id: I089604fa98eea92866495089d76c2330ae7d850c
Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
Diffstat (limited to 'vpp/api/custom_dump.c')
-rw-r--r-- | vpp/api/custom_dump.c | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/vpp/api/custom_dump.c b/vpp/api/custom_dump.c index fa9dce6e..123883fb 100644 --- a/vpp/api/custom_dump.c +++ b/vpp/api/custom_dump.c @@ -1799,6 +1799,52 @@ static void *vl_api_mpls_fib_decap_dump_t_print FINISH; } +static void *vl_api_classify_table_ids_t_print +(vl_api_classify_table_ids_t * mp, void *handle) +{ + u8 * s; + + s = format (0, "SCRIPT: classify_table_ids "); + + FINISH; +} + +static void *vl_api_classify_table_by_interface_t_print +(vl_api_classify_table_by_interface_t * mp, void *handle) +{ + u8 * s; + + s = format (0, "SCRIPT: classify_table_by_interface "); + if (mp->sw_if_index != ~0) + s = format (s, "sw_if_index %d ", ntohl(mp->sw_if_index)); + + FINISH; +} + +static void *vl_api_classify_table_info_t_print +(vl_api_classify_table_info_t * mp, void *handle) +{ + u8 * s; + + s = format (0, "SCRIPT: classify_table_info "); + if (mp->table_id != ~0) + s = format (s, "table_id %d ", ntohl(mp->table_id)); + + FINISH; +} + +static void *vl_api_classify_session_dump_t_print +(vl_api_classify_session_dump_t * mp, void *handle) +{ + u8 * s; + + s = format (0, "SCRIPT: classify_session_dump "); + if (mp->table_id != ~0) + s = format (s, "table_id %d ", ntohl(mp->table_id)); + + FINISH; +} + #define foreach_custom_print_function \ _(CREATE_LOOPBACK, create_loopback) \ _(SW_INTERFACE_SET_FLAGS, sw_interface_set_flags) \ @@ -1890,7 +1936,11 @@ _(SW_INTERFACE_CLEAR_STATS, sw_interface_clear_stats) \ _(MPLS_GRE_TUNNEL_DUMP, mpls_gre_tunnel_dump) \ _(MPLS_ETH_TUNNEL_DUMP, mpls_eth_tunnel_dump) \ _(MPLS_FIB_ENCAP_DUMP, mpls_fib_encap_dump) \ -_(MPLS_FIB_DECAP_DUMP, mpls_fib_decap_dump) +_(MPLS_FIB_DECAP_DUMP, mpls_fib_decap_dump) \ +_(CLASSIFY_TABLE_IDS,classify_table_ids) \ +_(CLASSIFY_TABLE_BY_INTERFACE, classify_table_by_interface) \ +_(CLASSIFY_TABLE_INFO,classify_table_info) \ +_(CLASSIFY_SESSION_DUMP,classify_session_dump) void vl_msg_api_custom_dump_configure (api_main_t *am) { |