session tcp udp tls quic: improve cli formatting
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iae5dbb8aaaf82d8e95c2ee8bbbe6844c9dd49f80
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index a4599c2..0b3aeba 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -841,9 +841,10 @@
u32 __clib_unused thread_index = va_arg (*args, u32);
u32 verbose = va_arg (*args, u32);
tcp_connection_t *tc = tcp_listener_get (tci);
- s = format (s, "%-50U", format_tcp_connection_id, tc);
+ s = format (s, "%-" SESSION_CLI_ID_LEN "U", format_tcp_connection_id, tc);
if (verbose)
- s = format (s, "%-15U", format_tcp_state, tc->state);
+ s = format (s, "%-" SESSION_CLI_STATE_LEN "U", format_tcp_state,
+ tc->state);
return s;
}