+static u8 *
+format_ipip_tunnel_key (u8 *s, va_list *args)
+{
+ ipip_tunnel_key_t *t = va_arg(*args, ipip_tunnel_key_t *);
+
+ s = format (s, "src:%U dst:%U fib:%d transport:%d mode:%d",
+ format_ip46_address, &t->src, IP46_TYPE_ANY,
+ format_ip46_address, &t->dst, IP46_TYPE_ANY,
+ t->fib_index, t->transport, t->mode);
+
+ return (s);
+}
+
+static clib_error_t *
+ipip_tunnel_hash_show (vlib_main_t * vm,
+ unformat_input_t * input,
+ vlib_cli_command_t * cmd)
+{
+ ipip_main_t *im = &ipip_main;
+ ipip_tunnel_key_t *key;
+ u32 index;
+
+ /* *INDENT-OFF* */
+ hash_foreach(key, index, im->tunnel_by_key,
+ ({
+ vlib_cli_output (vm, " %U -> %d", format_ipip_tunnel_key, key, index);
+ }));
+ /* *INDENT-ON* */
+
+ return NULL;
+}
+
+/**
+ * show IPSEC tunnel protection hash tables
+ */
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (ipip_tunnel_hash_show_node, static) =
+{
+ .path = "show ipip tunnel-hash",
+ .function = ipip_tunnel_hash_show,
+ .short_help = "show ipip tunnel-hash",
+};
+/* *INDENT-ON* */
+