mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-30 22:03:54 -06:00
Make Slirp statistics gathering and output conditional to LOG_ENABLED
Add 'info slirp' command to monitor to display statistics Disable Slirp debugging code by default git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3451 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
7d294b61ed
commit
31a60e2275
22 changed files with 203 additions and 125 deletions
|
@ -255,9 +255,9 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err)
|
|||
if (TCPS_HAVERCVDSYN(tp->t_state)) {
|
||||
tp->t_state = TCPS_CLOSED;
|
||||
(void) tcp_output(tp);
|
||||
tcpstat.tcps_drops++;
|
||||
STAT(tcpstat.tcps_drops++);
|
||||
} else
|
||||
tcpstat.tcps_conndrops++;
|
||||
STAT(tcpstat.tcps_conndrops++);
|
||||
/* if (errno == ETIMEDOUT && tp->t_softerror)
|
||||
* errno = tp->t_softerror;
|
||||
*/
|
||||
|
@ -305,7 +305,7 @@ tcp_close(tp)
|
|||
sbfree(&so->so_rcv);
|
||||
sbfree(&so->so_snd);
|
||||
sofree(so);
|
||||
tcpstat.tcps_closed++;
|
||||
STAT(tcpstat.tcps_closed++);
|
||||
return ((struct tcpcb *)0);
|
||||
}
|
||||
|
||||
|
@ -528,7 +528,7 @@ tcp_connect(inso)
|
|||
*/
|
||||
|
||||
/* soisconnecting(so); */ /* NOFDREF used instead */
|
||||
tcpstat.tcps_connattempt++;
|
||||
STAT(tcpstat.tcps_connattempt++);
|
||||
|
||||
tp->t_state = TCPS_SYN_SENT;
|
||||
tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT;
|
||||
|
@ -857,7 +857,7 @@ tcp_emu(so, m)
|
|||
|
||||
/*soisfconnecting(ns);*/
|
||||
|
||||
tcpstat.tcps_connattempt++;
|
||||
STAT(tcpstat.tcps_connattempt++);
|
||||
|
||||
tp->t_state = TCPS_SYN_SENT;
|
||||
tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue