- vlib_cli_output (vm, "There are %d active %U listeners",
- pool_elts (smm->listen_sessions[sst]),
- format_transport_proto, transport_proto);
- if (verbose)
- {
- vlib_cli_output (vm, "%-40s%-24s%-10s", "Listener", "App", "S-idx");
- /* *INDENT-OFF* */
- pool_foreach (s, smm->listen_sessions[sst], ({
- app_name = application_name_from_index (s->app_index);
- vlib_cli_output (vm, "%U%-25v%-10u", format_stream_session, s, 1,
- app_name, s->session_index);
- vec_free (app_name);
- }));
- /* *INDENT-ON* */
- }
+ vlib_cli_output (vm, "%-40s%-24s", "Listener", "App");
+ /* *INDENT-OFF* */
+ pool_foreach (s, smm->wrk[0].sessions, ({
+ if (s->session_state != SESSION_STATE_LISTENING
+ || s->session_type != sst)
+ continue;
+ app_wrk = app_worker_get (s->app_wrk_index);
+ app_name = application_name_from_index (app_wrk->app_index);
+ vlib_cli_output (vm, "%U%-25v%", format_stream_session, s, 1,
+ app_name);
+ }));
+ /* *INDENT-ON* */