renamed (hopefully everywhere) stats to lwip_stats.closes bug #1901

This commit is contained in:
jani
2002-12-18 12:49:01 +00:00
parent 51006824f9
commit ef68392388
21 changed files with 137 additions and 134 deletions

View File

@@ -53,7 +53,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
#ifdef ICMP_STATS
++stats.icmp.recv;
++lwip_stats.icmp.recv;
#endif /* ICMP_STATS */
type = ((char *)p->payload)[0];
@@ -67,7 +67,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
pbuf_free(p);
#ifdef ICMP_STATS
++stats.icmp.lenerr;
++lwip_stats.icmp.lenerr;
#endif /* ICMP_STATS */
return;
@@ -78,7 +78,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo (%x)\n", inet_chksum_pseudo(p, &(iphdr->src), &(iphdr->dest), IP_PROTO_ICMP, p->tot_len)));
#ifdef ICMP_STATS
++stats.icmp.chkerr;
++lwip_stats.icmp.chkerr;
#endif /* ICMP_STATS */
/* return;*/
}
@@ -95,7 +95,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
}
DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo (%x)\n", inet_chksum_pseudo(p, &(iphdr->src), &(iphdr->dest), IP_PROTO_ICMP, p->tot_len)));
#ifdef ICMP_STATS
++stats.icmp.xmit;
++lwip_stats.icmp.xmit;
#endif /* ICMP_STATS */
/* DEBUGF("icmp: p->len %d p->tot_len %d\n", p->len, p->tot_len);*/
@@ -106,8 +106,8 @@ icmp_input(struct pbuf *p, struct netif *inp)
DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type not supported.\n"));
#ifdef ICMP_STATS
++stats.icmp.proterr;
++stats.icmp.drop;
++lwip_stats.icmp.proterr;
++lwip_stats.icmp.drop;
#endif /* ICMP_STATS */
}
@@ -136,7 +136,7 @@ icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t)
idur->chksum = 0;
idur->chksum = inet_chksum(idur, q->len);
#ifdef ICMP_STATS
++stats.icmp.xmit;
++lwip_stats.icmp.xmit;
#endif /* ICMP_STATS */
ip_output(q, NULL,
@@ -168,7 +168,7 @@ icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t)
tehdr->chksum = 0;
tehdr->chksum = inet_chksum(tehdr, q->len);
#ifdef ICMP_STATS
++stats.icmp.xmit;
++lwip_stats.icmp.xmit;
#endif /* ICMP_STATS */
ip_output(q, NULL,
(struct ip_addr *)&(iphdr->src), ICMP_TTL, IP_PROTO_ICMP);

View File

@@ -134,8 +134,8 @@ ip_forward(struct pbuf *p, struct ip_hdr *iphdr)
DEBUGF(IP_DEBUG, ("\n"));
#ifdef IP_STATS
++stats.ip.fw;
++stats.ip.xmit;
++lwip_stats.ip.fw;
++lwip_stats.ip.xmit;
#endif /* IP_STATS */
PERF_STOP("ip_forward");
@@ -167,7 +167,7 @@ ip_input(struct pbuf *p, struct netif *inp) {
#ifdef IP_STATS
++stats.ip.recv;
++lwip_stats.ip.recv;
#endif /* IP_STATS */
/* identify the IP header */
@@ -181,8 +181,8 @@ ip_input(struct pbuf *p, struct netif *inp) {
#endif /* IP_DEBUG */
pbuf_free(p);
#ifdef IP_STATS
++stats.ip.err;
++stats.ip.drop;
++lwip_stats.ip.err;
++lwip_stats.ip.drop;
#endif /* IP_STATS */
return;
}
@@ -241,8 +241,8 @@ ip_input(struct pbuf *p, struct netif *inp) {
iphdr->nexthdr));
#ifdef IP_STATS
++stats.ip.proterr;
++stats.ip.drop;
++lwip_stats.ip.proterr;
++lwip_stats.ip.drop;
#endif /* IP_STATS */
}
@@ -270,7 +270,7 @@ ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
if(pbuf_header(p, IP_HLEN)) {
DEBUGF(IP_DEBUG, ("ip_output: not enough room for IP header in pbuf\n"));
#ifdef IP_STATS
++stats.ip.err;
++lwip_stats.ip.err;
#endif /* IP_STATS */
return ERR_BUF;
@@ -300,7 +300,7 @@ ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
}
#ifdef IP_STATS
++stats.ip.xmit;
++lwip_stats.ip.xmit;
#endif /* IP_STATS */
DEBUGF(IP_DEBUG, ("ip_output_if: %c%c (len %d)\n", netif->name[0], netif->name[1], p->tot_len));
@@ -326,7 +326,7 @@ ip_output(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
if((netif = ip_route(dest)) == NULL) {
DEBUGF(IP_DEBUG, ("ip_output: No route to 0x%lx\n", dest->addr));
#ifdef IP_STATS
++stats.ip.rterr;
++lwip_stats.ip.rterr;
#endif /* IP_STATS */
return ERR_RTE;
}