aboutsummaryrefslogtreecommitdiff
path: root/helper
diff options
context:
space:
mode:
authorJere Leppänen <jere.leppanen@nokia.com>2021-04-29 20:27:20 +0300
committerPetri Savolainen <petri.savolainen@nokia.com>2021-05-07 14:04:49 +0300
commit341ebb9fcfb54a09bbad60eafb9c29b8473d2a08 (patch)
treed74e949db987f17bd709a0e0cb21caaab74b011c /helper
parentfd93e9806862f6168f2665521f207beec46a3355 (diff)
helper: cli: add command "call odp_cls_print_all"
Add a CLI command, which calls the new odp_cls_print_all() API function. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'helper')
-rw-r--r--helper/cli.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/helper/cli.c b/helper/cli.c
index abd3be8b8..14f9d57b8 100644
--- a/helper/cli.c
+++ b/helper/cli.c
@@ -67,6 +67,18 @@ static int check_num_args(struct cli_def *cli, int argc, int req_argc)
return 0;
}
+static int cmd_call_odp_cls_print_all(struct cli_def *cli,
+ const char *command ODP_UNUSED,
+ char *argv[] ODP_UNUSED, int argc)
+{
+ if (check_num_args(cli, argc, 0))
+ return CLI_ERROR;
+
+ odp_cls_print_all();
+
+ return CLI_OK;
+}
+
static int cmd_call_odp_ipsec_print(struct cli_def *cli,
const char *command ODP_UNUSED,
char *argv[] ODP_UNUSED, int argc)
@@ -203,6 +215,9 @@ static struct cli_def *create_cli(void)
c = cli_register_command(cli, NULL, "call", NULL,
PRIVILEGE_UNPRIVILEGED, MODE_EXEC,
"Call ODP API function.");
+ cli_register_command(cli, c, "odp_cls_print_all",
+ cmd_call_odp_cls_print_all,
+ PRIVILEGE_UNPRIVILEGED, MODE_EXEC, NULL);
cli_register_command(cli, c, "odp_ipsec_print",
cmd_call_odp_ipsec_print,
PRIVILEGE_UNPRIVILEGED, MODE_EXEC, NULL);