X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Facl%2Facl.c;h=a8699961b478685865e83935f62c449b37618c2c;hb=74579f44a7f8e9df1a3715c82b700551cc06e8aa;hp=286b2e96d1e2f0f7f588fc3f04ff72938f609ed3;hpb=55d03788290d51c79686218ef5de2be8ff6ce976;p=vpp.git diff --git a/src/plugins/acl/acl.c b/src/plugins/acl/acl.c index 286b2e96d1e..a8699961b47 100644 --- a/src/plugins/acl/acl.c +++ b/src/plugins/acl/acl.c @@ -2821,6 +2821,26 @@ acl_plugin_show_interface (acl_main_t * am, u32 sw_if_index, int show_acl) } + +static clib_error_t * +acl_show_aclplugin_decode_5tuple_fn (vlib_main_t * vm, + unformat_input_t * input, + vlib_cli_command_t * cmd) +{ + clib_error_t *error = 0; + u64 five_tuple[6] = { 0, 0, 0, 0, 0, 0 }; + + if (unformat + (input, "%llx %llx %llx %llx %llx %llx", &five_tuple[0], &five_tuple[1], + &five_tuple[2], &five_tuple[3], &five_tuple[4], &five_tuple[5])) + vlib_cli_output (vm, "5-tuple structure decode: %U\n\n", + format_acl_plugin_5tuple, five_tuple); + else + error = clib_error_return (0, "expecting 6 hex integers"); + return error; +} + + static clib_error_t * acl_show_aclplugin_interface_fn (vlib_main_t * vm, unformat_input_t * input, @@ -3241,6 +3261,12 @@ VLIB_CLI_COMMAND (aclplugin_show_acl_command, static) = { .function = acl_show_aclplugin_acl_fn, }; +VLIB_CLI_COMMAND (aclplugin_show_decode_5tuple_command, static) = { + .path = "show acl-plugin decode 5tuple", + .short_help = "show acl-plugin decode 5tuple XXXX XXXX XXXX XXXX XXXX XXXX", + .function = acl_show_aclplugin_decode_5tuple_fn, +}; + VLIB_CLI_COMMAND (aclplugin_show_interface_command, static) = { .path = "show acl-plugin interface", .short_help = "show acl-plugin interface [sw_if_index N] [acl]",