diff options
author | Ahmed Abdelsalam <ahabdels@cisco.com> | 2020-11-10 17:19:12 +0000 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2020-11-13 09:54:13 +0000 |
commit | 80f0b88fc388c82627dafef19c01f4c4536bbfa2 (patch) | |
tree | fab49e442938c610d5bd2cfa49c2c16a14c04ad4 /src/vnet | |
parent | ccbb0665ae7e388e08390c8318a48a9f32659ecd (diff) |
sr: show the hop-limit value used for SRv6 encapsulation
Implements CLI to show the hop-limit value used for the
outer IPv6 header of the SRv6 encapsulation.
Type: feature
Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
Change-Id: I1f3d8f71fb94494ae6ab8104b9fcf989c5585d5c
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/srv6/sr_policy_rewrite.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/vnet/srv6/sr_policy_rewrite.c b/src/vnet/srv6/sr_policy_rewrite.c index 77e14853bfa..a0b151decdd 100644 --- a/src/vnet/srv6/sr_policy_rewrite.c +++ b/src/vnet/srv6/sr_policy_rewrite.c @@ -1189,6 +1189,27 @@ VLIB_CLI_COMMAND (show_sr_encaps_source_command, static) = { }; /* *INDENT-ON* */ +/** + * @brief CLI to display onscreen the hop-limit value used for SRv6 encapsulation + */ +static clib_error_t * +show_sr_encaps_hop_limit_command_fn (vlib_main_t * vm, + unformat_input_t * input, + vlib_cli_command_t * cmd) +{ + vlib_cli_output (vm, "SR encaps hop-limit = %u", sr_get_hop_limit ()); + + return 0; +} + +/* *INDENT-OFF* */ +VLIB_CLI_COMMAND (show_sr_encaps_hop_limit_command, static) = { + .path = "show sr encaps hop-limit", + .short_help = "show sr encaps hop-limit", + .function = show_sr_encaps_hop_limit_command_fn, +}; +/* *INDENT-ON* */ + /*************************** SR rewrite graph node ****************************/ /** * @brief Trace for the SR Policy Rewrite graph node |