diff options
author | Aritra Basu <aritrbas@cisco.com> | 2024-07-26 09:36:55 -0700 |
---|---|---|
committer | Aritra Basu <aritrbas@cisco.com> | 2024-07-26 15:13:27 -0700 |
commit | e30f7122b7a52294ae801fe2d0812f4d26588d6f (patch) | |
tree | 03e89b1aba867d746349965ee0fd479fad104db0 /src/vnet/tcp | |
parent | 6a8f26c3abed7a3c26d4ac3b88b80f08966fb3e0 (diff) |
tcp: improve tcp listener CLI
Type: improvement
Change-Id: I11dc43bdf65cecfa5c48ac734a4727b377023c80
Signed-off-by: Aritra Basu <aritrbas@cisco.com>
Diffstat (limited to 'src/vnet/tcp')
-rw-r--r-- | src/vnet/tcp/tcp.c | 2 | ||||
-rw-r--r-- | src/vnet/tcp/tcp.h | 1 | ||||
-rw-r--r-- | src/vnet/tcp/tcp_cli.c | 15 |
3 files changed, 18 insertions, 0 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index 1d164f236a1..1afc07918b7 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -879,6 +879,8 @@ format_tcp_listener_session (u8 * s, va_list * args) if (verbose) s = format (s, "%-" SESSION_CLI_STATE_LEN "U", format_tcp_state, tc->state); + if (verbose == 2) + s = format (s, "\n%U", format_tcp_listener_connection, tc); return s; } diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h index 3d678006f70..d032a3dc749 100644 --- a/src/vnet/tcp/tcp.h +++ b/src/vnet/tcp/tcp.h @@ -357,6 +357,7 @@ format_function_t format_tcp_flags; format_function_t format_tcp_sacks; format_function_t format_tcp_rcv_sacks; format_function_t format_tcp_connection; +format_function_t format_tcp_listener_connection; format_function_t format_tcp_connection_id; #define tcp_validate_txf_size(_tc, _a) \ diff --git a/src/vnet/tcp/tcp_cli.c b/src/vnet/tcp/tcp_cli.c index e26488342d2..16b88586535 100644 --- a/src/vnet/tcp/tcp_cli.c +++ b/src/vnet/tcp/tcp_cli.c @@ -250,6 +250,21 @@ format_tcp_connection_id (u8 * s, va_list * args) } u8 * +format_tcp_listener_connection (u8 *s, va_list *args) +{ + tcp_connection_t *tc = va_arg (*args, tcp_connection_t *); + + s = format (s, " index: %u cfg_flags: %U cong_algo: %s snd_mss: %u\n", + tc->c_c_index, format_tcp_cfg_flags, tc, tc->cc_algo->name, + tc->snd_mss); + s = format (s, " next_node %u opaque 0x%x fib_index %u sw_if_index %d", + tc->next_node_index, tc->next_node_opaque, tc->c_fib_index, + tc->sw_if_index); + + return s; +} + +u8 * format_tcp_connection (u8 * s, va_list * args) { tcp_connection_t *tc = va_arg (*args, tcp_connection_t *); |