summary refs log tree commit diff stats
path: root/slirp/debug.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-06-24 14:42:29 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-29 08:52:46 -0500
commit6dbe553fe9ffdee008c1bbbe1af2d030e0f04aab (patch)
tree7dacffebeea9f5534cda6a19276e8a5da6c57344 /slirp/debug.c
parent4a82347a470eb087b2cb3075c506c42051d20230 (diff)
downloadfocaccia-qemu-6dbe553fe9ffdee008c1bbbe1af2d030e0f04aab.tar.gz
focaccia-qemu-6dbe553fe9ffdee008c1bbbe1af2d030e0f04aab.zip
slirp: Add info usernet for dumping connection states
Break out sockstats from the slirp statistics and present them under the
new info category "usernet". This patch also improves the current output
/wrt proper reporting connection source and destination.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'slirp/debug.c')
-rw-r--r--slirp/debug.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/slirp/debug.c b/slirp/debug.c
index bfef580694..ac856ca19b 100644
--- a/slirp/debug.c
+++ b/slirp/debug.c
@@ -291,47 +291,6 @@ mbufstats(void)
 	lprint("  %6d mbufs on used list\r\n",  i);
         lprint("  %6d mbufs queued as packets\r\n\r\n", if_queued);
 }
-
-static void
-sockstats(void)
-{
-	char buff[256];
-	int n;
-	struct socket *so;
-
-        lprint(" \r\n");
-
-	lprint(
-	   "Proto[state]     Sock     Local Address, Port  Remote Address, Port RecvQ SendQ\r\n");
-
-	for (so = tcb.so_next; so != &tcb; so = so->so_next) {
-
-		n = sprintf(buff, "tcp[%s]", so->so_tcpcb?tcpstates[so->so_tcpcb->t_state]:"NONE");
-		while (n < 17)
-		   buff[n++] = ' ';
-		buff[17] = 0;
-		lprint("%s %3d   %15s %5d ",
-				buff, so->s,
-				inet_ntoa(so->so_laddr), ntohs(so->so_lport));
-		lprint("%15s %5d %5d %5d\r\n",
-				inet_ntoa(so->so_faddr), ntohs(so->so_fport),
-				so->so_rcv.sb_cc, so->so_snd.sb_cc);
-	}
-
-	for (so = udb.so_next; so != &udb; so = so->so_next) {
-
-		n = sprintf(buff, "udp[%d sec]", (so->so_expire - curtime) / 1000);
-		while (n < 17)
-		   buff[n++] = ' ';
-		buff[17] = 0;
-		lprint("%s %3d  %15s %5d  ",
-				buff, so->s,
-				inet_ntoa(so->so_laddr), ntohs(so->so_lport));
-		lprint("%15s %5d %5d %5d\r\n",
-				inet_ntoa(so->so_faddr), ntohs(so->so_fport),
-				so->so_rcv.sb_cc, so->so_snd.sb_cc);
-	}
-}
 #endif
 
 #ifndef CONFIG_QEMU
@@ -386,7 +345,6 @@ slirp_stats(void)
     udpstats();
     icmpstats();
     mbufstats();
-    sockstats();
 #else
     lprint("SLIRP statistics code not compiled.\n");
 #endif