From 3389dd2aaa3a5e68f808cece114ae8fe05edb3cc Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Fri, 1 Feb 2019 18:00:05 -0800 Subject: session: improve show session cli Change-Id: If30cea80058752cedcc6ecc38e90bef8732c83d3 Signed-off-by: Florin Coras --- src/vnet/tcp/tcp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/vnet/tcp') diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index 037abdc652d..99b015ba3d8 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -920,8 +920,12 @@ static u8 * format_tcp_listener_session (u8 * s, va_list * args) { u32 tci = va_arg (*args, u32); + u32 verbose = va_arg (*args, u32); tcp_connection_t *tc = tcp_listener_get (tci); - return format (s, "%U", format_tcp_connection_id, tc); + s = format (s, "%-50U", format_tcp_connection_id, tc); + if (verbose) + s = format (s, "%-15U", format_tcp_state, tc->state); + return s; } static u8 * -- cgit 1.2.3-korg