From f747cd8b9b9ded4864539edb98c04397852199c5 Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Thu, 26 May 2016 16:47:11 +0200 Subject: Add show command for LISP map resolvers Change-Id: I3ed6269f9a307b50b56ce04defc2576a139c6add Signed-off-by: Filip Tehlar --- vnet/vnet/lisp-cp/control.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/vnet/vnet/lisp-cp/control.c b/vnet/vnet/lisp-cp/control.c index 6a9e2ed5..419b745a 100644 --- a/vnet/vnet/lisp-cp/control.c +++ b/vnet/vnet/lisp-cp/control.c @@ -610,6 +610,27 @@ VLIB_CLI_COMMAND (lisp_add_del_remote_mapping_command) = { .function = lisp_add_del_remote_mapping_command_fn, }; +static clib_error_t * +lisp_show_map_resolvers_command_fn (vlib_main_t * vm, + unformat_input_t * input, + vlib_cli_command_t * cmd) +{ + ip_address_t * addr; + lisp_cp_main_t * lcm = vnet_lisp_cp_get_main (); + + vec_foreach (addr, lcm->map_resolvers) + { + vlib_cli_output (vm, "%U", format_ip_address, addr); + } + return 0; +} + +VLIB_CLI_COMMAND (lisp_show_map_resolvers_command) = { + .path = "show lisp map-resolvers", + .short_help = "show lisp map-resolvers", + .function = lisp_show_map_resolvers_command_fn, +}; + int vnet_lisp_pitr_set_locator_set (u8 * locator_set_name, u8 is_add) { -- cgit 1.2.3-korg