diff --git a/src/vnet/session/session_cli.c b/src/vnet/session/session_cli.c
index 57f3d3a..6ca090a 100755
--- a/src/vnet/session/session_cli.c
+++ b/src/vnet/session/session_cli.c
@@ -16,7 +16,7 @@
 #include <vnet/session/session.h>
 
 u8 *
-format_stream_session_fifos (u8 * s, va_list * args)
+format_session_fifos (u8 * s, va_list * args)
 {
   stream_session_t *ss = va_arg (*args, stream_session_t *);
   int verbose = va_arg (*args, int);
@@ -58,36 +58,34 @@
 {
   stream_session_t *ss = va_arg (*args, stream_session_t *);
   int verbose = va_arg (*args, int);
-  transport_proto_vft_t *tp_vft;
+  u32 tp = session_get_transport_proto (ss);
   u8 *str = 0;
-  tp_vft = transport_protocol_get_vft (session_get_transport_proto (ss));
 
   if (verbose == 1 && ss->session_state >= SESSION_STATE_ACCEPTING)
-    str = format (0, "%-10u%-10u%-10lld",
+    str = format (0, "%-10u%-10u",
 		  svm_fifo_max_dequeue (ss->server_rx_fifo),
-		  svm_fifo_max_enqueue (ss->server_tx_fifo),
-		  session_get_index (ss));
+		  svm_fifo_max_dequeue (ss->server_tx_fifo));
 
   if (ss->session_state >= SESSION_STATE_ACCEPTING)
     {
-      s = format (s, "%U", tp_vft->format_connection, ss->connection_index,
-		  ss->thread_index, verbose);
+      s = format (s, "%U", format_transport_connection, tp,
+		  ss->connection_index, ss->thread_index, verbose);
       if (verbose == 1)
 	s = format (s, "%v", str);
       if (verbose > 1)
-	s = format (s, "%U", format_stream_session_fifos, ss, verbose);
+	s = format (s, "%U", format_session_fifos, ss, verbose);
     }
   else if (ss->session_state == SESSION_STATE_LISTENING)
     {
-      s = format (s, "%-40U%v", tp_vft->format_listener, ss->connection_index,
-		  str);
+      s = format (s, "%-40U%v", format_transport_listen_connection,
+		  tp, ss->connection_index, str);
       if (verbose > 1)
-	s = format (s, "\n%U", format_stream_session_fifos, ss, verbose);
+	s = format (s, "\n%U", format_session_fifos, ss, verbose);
     }
   else if (ss->session_state == SESSION_STATE_CONNECTING)
     {
-      s = format (s, "%-40U%v", tp_vft->format_half_open,
-		  ss->connection_index, str);
+      s = format (s, "%-40U%v", format_transport_half_open_connection,
+		  tp, ss->connection_index, str);
     }
   else
     {
@@ -244,15 +242,15 @@
   if (do_listeners)
     {
       sst = session_type_from_proto_and_ip (transport_proto, 1);
-      vlib_cli_output (vm, "%-40s%-24s%-10s", "Listener", "App", "S-idx");
+      vlib_cli_output (vm, "%-40s%-24s", "Listener", "App");
       /* *INDENT-OFF* */
       pool_foreach (s, smm->sessions[0], ({
 	if (s->session_state != SESSION_STATE_LISTENING
 	    || s->session_type != sst)
 	  continue;
 	app_name = application_name_from_index (s->app_wrk_index);
-	vlib_cli_output (vm, "%U%-25v%-10u", format_stream_session, s, 1,
-			 app_name, s->session_index);
+	vlib_cli_output (vm, "%U%-25v%", format_stream_session, s, 1,
+			 app_name);
 	vec_free (app_name);
       }));
       /* *INDENT-ON* */
@@ -275,9 +273,8 @@
 	    {
 	      if (once_per_pool && verbose == 1)
 		{
-		  str = format (str, "%-50s%-15s%-10s%-10s%-10s",
-				"Connection", "State", "Rx-f", "Tx-f",
-				"S-idx");
+		  str = format (str, "%-50s%-15s%-10s%-10s",
+				"Connection", "State", "Rx-f", "Tx-f");
 		  vlib_cli_output (vm, "%v", str);
 		  vec_reset_length (str);
 		  once_per_pool = 0;
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index c333c41..8cbad0d 100644
--- a/src/vnet/session/transport.c
+++ b/src/vnet/session/transport.c
@@ -93,6 +93,63 @@
   return s;
 }
 
+u8 *
+format_transport_connection (u8 * s, va_list * args)
+{
+  u32 transport_proto = va_arg (*args, u32);
+  u32 conn_index = va_arg (*args, u32);
+  u32 thread_index = va_arg (*args, u32);
+  u32 verbose = va_arg (*args, u32);
+  transport_proto_vft_t *tp_vft;
+  transport_connection_t *tc;
+  u32 indent;
+
+  tp_vft = transport_protocol_get_vft (transport_proto);
+  if (!tp_vft)
+    return s;
+
+  s = format (s, "%U", tp_vft->format_connection, conn_index, thread_index,
+	      verbose);
+  tc = tp_vft->get_connection (conn_index, thread_index);
+  if (tc && transport_connection_is_tx_paced (tc) && verbose > 1)
+    {
+      indent = format_get_indent (s) + 1;
+      s = format (s, "%Upacer: %U\n", format_white_space, indent,
+		  format_transport_pacer, &tc->pacer);
+    }
+  return s;
+}
+
+u8 *
+format_transport_listen_connection (u8 * s, va_list * args)
+{
+  u32 transport_proto = va_arg (*args, u32);
+  u32 listen_index = va_arg (*args, u32);
+  transport_proto_vft_t *tp_vft;
+
+  tp_vft = transport_protocol_get_vft (transport_proto);
+  if (!tp_vft)
+    return s;
+
+  s = format (s, "%U", tp_vft->format_listener, listen_index);
+  return s;
+}
+
+u8 *
+format_transport_half_open_connection (u8 * s, va_list * args)
+{
+  u32 transport_proto = va_arg (*args, u32);
+  u32 listen_index = va_arg (*args, u32);
+  transport_proto_vft_t *tp_vft;
+
+  tp_vft = transport_protocol_get_vft (transport_proto);
+  if (!tp_vft)
+    return s;
+
+  s = format (s, "%U", tp_vft->format_half_open, listen_index);
+  return s;
+}
+
 uword
 unformat_transport_proto (unformat_input_t * input, va_list * args)
 {
diff --git a/src/vnet/session/transport.h b/src/vnet/session/transport.h
index 0736669..a4f26a4 100644
--- a/src/vnet/session/transport.h
+++ b/src/vnet/session/transport.h
@@ -20,9 +20,6 @@
 #include <vnet/ip/ip.h>
 #include <vnet/tcp/tcp_debug.h>
 
-/*
- * Protocol independent transport properties associated to a session
- */
 typedef struct _transport_stats
 {
   u64 tx_bytes;
@@ -36,6 +33,9 @@
   u64 last_update;
 } spacer_t;
 
+/*
+ * Protocol independent transport properties associated to a session
+ */
 typedef struct _transport_connection
 {
   /** Connection ID */
@@ -116,6 +116,10 @@
 
 u8 *format_transport_proto (u8 * s, va_list * args);
 u8 *format_transport_proto_short (u8 * s, va_list * args);
+u8 *format_transport_connection (u8 * s, va_list * args);
+u8 *format_transport_listen_connection (u8 * s, va_list * args);
+u8 *format_transport_half_open_connection (u8 * s, va_list * args);
+
 uword unformat_transport_proto (unformat_input_t * input, va_list * args);
 
 #define foreach_transport_connection_fields				\
diff --git a/src/vnet/session/transport_interface.h b/src/vnet/session/transport_interface.h
index ec9bd43..a96c5e1 100644
--- a/src/vnet/session/transport_interface.h
+++ b/src/vnet/session/transport_interface.h
@@ -89,7 +89,7 @@
 #define transport_proto_foreach(VAR, BODY)			\
 do {								\
     for (VAR = 0; VAR < vec_len (tp_vfts); VAR++)		\
-      if (tp_vfts[VAR].push_header != 0)				\
+      if (tp_vfts[VAR].push_header != 0)			\
 	do { BODY; } while (0);					\
 } while (0)
 
