mirror of
https://github.com/opnsense/src.git
synced 2026-06-14 19:20:18 -04:00
ddb: improve show tcpcb
Print the name of the TCP function block and the name of the congestion control algorithm. Furthermore, print some information related to Black Box Logging. Reviewed by: thj MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D50535
This commit is contained in:
parent
969f6c6353
commit
8d4f495df4
1 changed files with 52 additions and 0 deletions
|
|
@ -3045,6 +3045,43 @@ db_print_toobflags(char t_oobflags)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
db_print_bblog_state(int state)
|
||||
{
|
||||
switch (state) {
|
||||
case TCP_LOG_STATE_RATIO_OFF:
|
||||
db_printf("TCP_LOG_STATE_RATIO_OFF");
|
||||
break;
|
||||
case TCP_LOG_STATE_CLEAR:
|
||||
db_printf("TCP_LOG_STATE_CLEAR");
|
||||
break;
|
||||
case TCP_LOG_STATE_OFF:
|
||||
db_printf("TCP_LOG_STATE_OFF");
|
||||
break;
|
||||
case TCP_LOG_STATE_TAIL:
|
||||
db_printf("TCP_LOG_STATE_TAIL");
|
||||
break;
|
||||
case TCP_LOG_STATE_HEAD:
|
||||
db_printf("TCP_LOG_STATE_HEAD");
|
||||
break;
|
||||
case TCP_LOG_STATE_HEAD_AUTO:
|
||||
db_printf("TCP_LOG_STATE_HEAD_AUTO");
|
||||
break;
|
||||
case TCP_LOG_STATE_CONTINUAL:
|
||||
db_printf("TCP_LOG_STATE_CONTINUAL");
|
||||
break;
|
||||
case TCP_LOG_STATE_TAIL_AUTO:
|
||||
db_printf("TCP_LOG_STATE_TAIL_AUTO");
|
||||
break;
|
||||
case TCP_LOG_VIA_BBPOINTS:
|
||||
db_printf("TCP_LOG_STATE_BBPOINTS");
|
||||
break;
|
||||
default:
|
||||
db_printf("UNKNOWN(%d)", state);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
db_print_tcpcb(struct tcpcb *tp, const char *name, int indent)
|
||||
{
|
||||
|
|
@ -3156,6 +3193,21 @@ db_print_tcpcb(struct tcpcb *tp, const char *name, int indent)
|
|||
db_print_indent(indent);
|
||||
db_printf("t_rttlow: %d rfbuf_ts: %u rfbuf_cnt: %d\n",
|
||||
tp->t_rttlow, tp->rfbuf_ts, tp->rfbuf_cnt);
|
||||
|
||||
db_print_indent(indent);
|
||||
db_printf("t_fb.tfb_tcp_block_name: %s\n", tp->t_fb->tfb_tcp_block_name);
|
||||
|
||||
db_print_indent(indent);
|
||||
db_printf("t_cc.name: %s\n", tp->t_cc->name);
|
||||
|
||||
db_print_indent(indent);
|
||||
db_printf("_t_logstate: %d (", tp->_t_logstate);
|
||||
db_print_bblog_state(tp->_t_logstate);
|
||||
db_printf(")\n");
|
||||
|
||||
db_print_indent(indent);
|
||||
db_printf("t_lognum: %d t_loglimit: %d t_logsn: %u\n",
|
||||
tp->t_lognum, tp->t_loglimit, tp->t_logsn);
|
||||
}
|
||||
|
||||
DB_SHOW_COMMAND(tcpcb, db_show_tcpcb)
|
||||
|
|
|
|||
Loading…
Reference in a new issue