summaryrefslogtreecommitdiffstats
path: root/src/plugins/tracedump/tracedump_test.c
diff options
context:
space:
mode:
authorMohammed Hawari <mohammed@hawari.fr>2023-05-26 14:52:50 +0200
committerDamjan Marion <dmarion@0xa5.net>2023-06-30 11:35:44 +0000
commit52fa5f21b911aaf1c50feb560dd3683b83625d2f (patch)
treef29e6ba9e62b6102284988d5bde7494c93e23407 /src/plugins/tracedump/tracedump_test.c
parent60527bd6df4772bb4215403f2eea1b61b8b10157 (diff)
vlib: introduce trace filter functions
Change-Id: I7a988fafe98599e4fcf7cdaa307a69b9d76650f0 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: improvement
Diffstat (limited to 'src/plugins/tracedump/tracedump_test.c')
-rw-r--r--src/plugins/tracedump/tracedump_test.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/plugins/tracedump/tracedump_test.c b/src/plugins/tracedump/tracedump_test.c
index 97fd4092d89..b813acc3ecc 100644
--- a/src/plugins/tracedump/tracedump_test.c
+++ b/src/plugins/tracedump/tracedump_test.c
@@ -274,6 +274,38 @@ api_trace_clear_cache (vat_main_t *vam)
return ret;
}
+static int
+api_trace_set_filter_function (vat_main_t *vam)
+{
+ vl_api_trace_set_filter_function_t *mp;
+ int ret;
+
+ M (TRACE_SET_FILTER_FUNCTION, mp);
+ S (mp);
+ W (ret);
+ return ret;
+}
+
+static int
+api_trace_filter_function_dump (vat_main_t *vam)
+{
+ vl_api_trace_filter_function_dump_t *mp;
+ int ret;
+
+ M (TRACE_FILTER_FUNCTION_DUMP, mp);
+ S (mp);
+ W (ret);
+ return ret;
+}
+
+static void
+vl_api_trace_filter_function_details_t_handler (
+ vl_api_trace_filter_function_details_t *dmp)
+{
+ fformat (stdout, "name: %U, selected: %u\n\n", vl_api_format_string,
+ &dmp->name, dmp->selected);
+}
+
#define vl_endianfun
#include <tracedump/tracedump.api.h>
#undef vl_endianfun