summaryrefslogtreecommitdiff
path: root/slirp/ip_output.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-26 18:42:59 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-26 18:42:59 +0000
commit31a60e22752d3daaa248ca10930f3cf4bc5f02e8 (patch)
tree18f5bd36118d98e2004fc0e5af866a280667278c /slirp/ip_output.c
parent7d294b61edc6bd1be15739a11dce1414080dbb9b (diff)
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
Diffstat (limited to 'slirp/ip_output.c')
-rw-r--r--slirp/ip_output.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/slirp/ip_output.c b/slirp/ip_output.c
index b1a8484026..b41d0627c6 100644
--- a/slirp/ip_output.c
+++ b/slirp/ip_output.c
@@ -80,7 +80,7 @@ ip_output(so, m0)
ip->ip_off &= IP_DF;
ip->ip_id = htons(ip_id++);
ip->ip_hl = hlen >> 2;
- ipstat.ips_localout++;
+ STAT(ipstat.ips_localout++);
/*
* Verify that we have any chance at all of being able to queue
@@ -112,7 +112,7 @@ ip_output(so, m0)
*/
if (ip->ip_off & IP_DF) {
error = -1;
- ipstat.ips_cantfrag++;
+ STAT(ipstat.ips_cantfrag++);
goto bad;
}
@@ -137,7 +137,7 @@ ip_output(so, m0)
m = m_get();
if (m == 0) {
error = -1;
- ipstat.ips_odropped++;
+ STAT(ipstat.ips_odropped++);
goto sendorfree;
}
m->m_data += if_maxlinkhdr;
@@ -170,7 +170,7 @@ ip_output(so, m0)
mhip->ip_sum = cksum(m, mhlen);
*mnext = m;
mnext = &m->m_nextpkt;
- ipstat.ips_ofragments++;
+ STAT(ipstat.ips_ofragments++);
}
/*
* Update first fragment by trimming what's been copied out
@@ -193,7 +193,7 @@ sendorfree:
}
if (error == 0)
- ipstat.ips_fragmented++;
+ STAT(ipstat.ips_fragmented++);
}
done: