summary refs log tree commit diff stats
path: root/slirp/ip_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'slirp/ip_input.c')
-rw-r--r--slirp/ip_input.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/slirp/ip_input.c b/slirp/ip_input.c
index 1fdd8d6bdc..0356eb587b 100644
--- a/slirp/ip_input.c
+++ b/slirp/ip_input.c
@@ -42,10 +42,6 @@
 #include <osdep.h>
 #include "ip_icmp.h"
 
-#ifdef LOG_ENABLED
-struct ipstat ipstat;
-#endif
-
 struct ipq ipq;
 
 static struct ip *ip_reass(register struct ip *ip,
@@ -82,24 +78,19 @@ ip_input(struct mbuf *m)
 	DEBUG_ARG("m = %lx", (long)m);
 	DEBUG_ARG("m_len = %d", m->m_len);
 
-	STAT(ipstat.ips_total++);
-
 	if (m->m_len < sizeof (struct ip)) {
-		STAT(ipstat.ips_toosmall++);
 		return;
 	}
 
 	ip = mtod(m, struct ip *);
 
 	if (ip->ip_v != IPVERSION) {
-		STAT(ipstat.ips_badvers++);
 		goto bad;
 	}
 
 	hlen = ip->ip_hl << 2;
 	if (hlen<sizeof(struct ip ) || hlen>m->m_len) {/* min header length */
-	  STAT(ipstat.ips_badhlen++);                     /* or packet too short */
-	  goto bad;
+	  goto bad;                                  /* or packet too short */
 	}
 
         /* keep ip header intact for ICMP reply
@@ -107,7 +98,6 @@ ip_input(struct mbuf *m)
 	 * if (ip->ip_sum) {
 	 */
 	if(cksum(m,hlen)) {
-	  STAT(ipstat.ips_badsum++);
 	  goto bad;
 	}
 
@@ -116,7 +106,6 @@ ip_input(struct mbuf *m)
 	 */
 	NTOHS(ip->ip_len);
 	if (ip->ip_len < hlen) {
-		STAT(ipstat.ips_badlen++);
 		goto bad;
 	}
 	NTOHS(ip->ip_id);
@@ -129,7 +118,6 @@ ip_input(struct mbuf *m)
 	 * Drop packet if shorter than we expect.
 	 */
 	if (m->m_len < ip->ip_len) {
-		STAT(ipstat.ips_tooshort++);
 		goto bad;
 	}
 
@@ -210,11 +198,9 @@ ip_input(struct mbuf *m)
 		 * attempt reassembly; if it succeeds, proceed.
 		 */
 		if (ip->ip_tos & 1 || ip->ip_off) {
-			STAT(ipstat.ips_fragments++);
 			ip = ip_reass(ip, fp);
                         if (ip == NULL)
 				return;
-			STAT(ipstat.ips_reassembled++);
 			m = dtom(ip);
 		} else
 			if (fp)
@@ -226,7 +212,6 @@ ip_input(struct mbuf *m)
 	/*
 	 * Switch out to protocol's input routine.
 	 */
-	STAT(ipstat.ips_delivered++);
 	switch (ip->ip_p) {
 	 case IPPROTO_TCP:
 		tcp_input(m, hlen, (struct socket *)NULL);
@@ -238,7 +223,6 @@ ip_input(struct mbuf *m)
 		icmp_input(m, hlen);
 		break;
 	 default:
-		STAT(ipstat.ips_noproto++);
 		m_free(m);
 	}
 	return;
@@ -399,7 +383,6 @@ insert:
 	return ip;
 
 dropfrag:
-	STAT(ipstat.ips_fragdropped++);
 	m_freem(m);
         return NULL;
 }
@@ -468,7 +451,6 @@ ip_slowtimo(void)
         struct ipq *fp = container_of(l, struct ipq, ip_link);
         l = l->next;
 		if (--fp->ipq_ttl == 0) {
-			STAT(ipstat.ips_fragtimeout++);
 			ip_freef(fp);
 		}
 	}
@@ -671,7 +653,6 @@ typedef u_int32_t n_time;
 bad:
  	icmp_error(m, type, code, 0, 0);
 
-	STAT(ipstat.ips_badoptions++);
 	return (1);
 }