aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-cp/one_cli.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2017-09-05 15:46:09 +0200
committerFlorin Coras <florin.coras@gmail.com>2017-09-19 16:00:51 +0000
commit058799951d062bbbe4df8df101b4db5bc7797b8f (patch)
treee723fcadfdfbf47d5887503843babe98779dd863 /src/vnet/lisp-cp/one_cli.c
parent02e14b526dc6f30c534e483c8e4a77678e27352e (diff)
LISP: support for neighbor discovery
Change-Id: I0f1a051dd3b5786dc7c457bc6fc7ce4fcd0f530c Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/lisp-cp/one_cli.c')
-rw-r--r--src/vnet/lisp-cp/one_cli.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/vnet/lisp-cp/one_cli.c b/src/vnet/lisp-cp/one_cli.c
index 3e0c4c0a3d7..1e52c9afadd 100644
--- a/src/vnet/lisp-cp/one_cli.c
+++ b/src/vnet/lisp-cp/one_cli.c
@@ -376,6 +376,42 @@ VLIB_CLI_COMMAND (one_show_l2_arp_entries_command) = {
};
/* *INDENT-ON* */
+static clib_error_t *
+lisp_show_ndp_entries_command_fn (vlib_main_t * vm,
+ unformat_input_t * input,
+ vlib_cli_command_t * cmd)
+{
+ u32 *ht = vnet_lisp_ndp_bds_get ();
+ lisp_api_ndp_entry_t *entries, *e;
+ hash_pair_t *p;
+
+ /* *INDENT-OFF* */
+ hash_foreach_pair (p, ht,
+ ({
+ entries = vnet_lisp_ndp_entries_get_by_bd (p->key);
+ vlib_cli_output (vm, "Table: %d", p->key);
+
+ vec_foreach (e, entries)
+ {
+ vlib_cli_output (vm, "\t%U -> %U", format_ip6_address, &e->ip6,
+ format_mac_address, e->mac);
+ }
+ vec_free (entries);
+ }));
+ /* *INDENT-ON* */
+
+ hash_free (ht);
+ return 0;
+}
+
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (one_show_ndp_entries_command) = {
+ .path = "show one ndp entries",
+ .short_help = "Show ONE NDP entries",
+ .function = lisp_show_ndp_entries_command_fn,
+};
+/* *INDENT-ON* */
+
/**
* Handler for add/del remote mapping CLI.
*