+static clib_error_t *
+ip6_show_ioam_summary_cmd_fn (vlib_main_t * vm,
+ unformat_input_t * input,
+ vlib_cli_command_t * cmd)
+{
+ ip6_hop_by_hop_ioam_main_t *hm = &ip6_hop_by_hop_ioam_main;
+ u8 *s = 0;
+
+
+ if (!is_zero_ip6_address(&hm->adj))
+ {
+ s = format(s, " REWRITE FLOW CONFIGS - \n");
+ s = format(s, " Destination Address : %U\n",
+ format_ip6_address, &hm->adj, sizeof(ip6_address_t));
+ s = format(s, " Flow operation : %d (%s)\n", hm->ioam_flag,
+ (hm->ioam_flag == IOAM_HBYH_ADD) ? "Add" :
+ ((hm->ioam_flag == IOAM_HBYH_MOD) ? "Mod" : "Pop"));
+ }
+ else
+ {
+ s = format(s, " REWRITE FLOW CONFIGS - Not configured\n");
+ }
+
+ if (hm->trace_option_elts)
+ {
+ s = format(s, " HOP BY HOP OPTIONS - TRACE CONFIG - \n");
+ s = format(s, " Trace Type : 0x%x (%d)\n",
+ hm->trace_type, hm->trace_type);
+ s = format(s, " Trace timestamp precision : %d (%s)\n", hm->trace_tsp,
+ (hm->trace_tsp == TSP_SECONDS) ? "Seconds" :
+ ((hm->trace_tsp == TSP_MILLISECONDS) ? "Milliseconds" :
+ (((hm->trace_tsp == TSP_MICROSECONDS) ? "Microseconds" : "Nanoseconds"))));
+ s = format(s, " Num of trace nodes : %d\n",
+ hm->trace_option_elts);
+ s = format(s, " Node-id : 0x%x (%d)\n",
+ hm->node_id, hm->node_id);
+ s = format(s, " App Data : 0x%x (%d)\n",
+ hm->app_data, hm->app_data);
+ }
+ else
+ {
+ s = format(s, " HOP BY HOP OPTIONS - TRACE CONFIG - Not configured\n");
+ }
+
+ s = format(s, " POT OPTION - %d (%s)\n",
+ hm->has_pot_option, (hm->has_pot_option?"Enabled":"Disabled"));
+ if (hm->has_pot_option)
+ s = format(s, "Try 'show ioam pot and show pot profile' for more information\n");
+
+ s = format(s, " EDGE TO EDGE - PPC OPTION - %d (%s)\n",
+ hm->has_ppc_option, ppc_state[hm->has_ppc_option]);
+ if (hm->has_ppc_option)
+ s = format(s, "Try 'show ioam ppc' for more information\n");
+
+ vlib_cli_output(vm, "%v", s);
+ vec_free(s);