Fix coding style (use #if and not #ifdef) for IPv6

This commit is contained in:
fbernon 2007-08-28 16:03:53 +00:00
parent 54c1025ec0
commit d7da390ae9
2 changed files with 15 additions and 15 deletions

View File

@ -51,7 +51,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
struct ip_hdr *iphdr;
struct ip_addr tmpaddr;
#ifdef ICMP_STATS
#if ICMP_STATS
++lwip_stats.icmp.recv;
#endif /* ICMP_STATS */
@ -67,7 +67,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: bad ICMP echo received\n"));
pbuf_free(p);
#ifdef ICMP_STATS
#if ICMP_STATS
++lwip_stats.icmp.lenerr;
#endif /* ICMP_STATS */
@ -78,7 +78,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
if (inet_chksum_pbuf(p) != 0) {
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo (%"X16_F")\n", inet_chksum_pseudo(p, &(iphdr->src), &(iphdr->dest), IP_PROTO_ICMP, p->tot_len)));
#ifdef ICMP_STATS
#if ICMP_STATS
++lwip_stats.icmp.chkerr;
#endif /* ICMP_STATS */
/* return;*/
@ -95,7 +95,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
iecho->chksum += htons(ICMP6_ECHO << 8);
}
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo (%"X16_F")\n", inet_chksum_pseudo(p, &(iphdr->src), &(iphdr->dest), IP_PROTO_ICMP, p->tot_len)));
#ifdef ICMP_STATS
#if ICMP_STATS
++lwip_stats.icmp.xmit;
#endif /* ICMP_STATS */
@ -105,7 +105,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
break;
default:
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" not supported.\n", (s16_t)type));
#ifdef ICMP_STATS
#if ICMP_STATS
++lwip_stats.icmp.proterr;
++lwip_stats.icmp.drop;
#endif /* ICMP_STATS */
@ -143,7 +143,7 @@ icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t)
/* calculate checksum */
idur->chksum = 0;
idur->chksum = inet_chksum(idur, q->len);
#ifdef ICMP_STATS
#if ICMP_STATS
++lwip_stats.icmp.xmit;
#endif /* ICMP_STATS */
@ -184,7 +184,7 @@ icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t)
/* calculate checksum */
tehdr->chksum = 0;
tehdr->chksum = inet_chksum(tehdr, q->len);
#ifdef ICMP_STATS
#if ICMP_STATS
++lwip_stats.icmp.xmit;
#endif /* ICMP_STATS */
ip_output(q, NULL,

View File

@ -133,7 +133,7 @@ ip_forward(struct pbuf *p, struct ip_hdr *iphdr)
#endif /* IP_DEBUG */
LWIP_DEBUGF(IP_DEBUG, ("\n"));
#ifdef IP_STATS
#if IP_STATS
++lwip_stats.ip.fw;
++lwip_stats.ip.xmit;
#endif /* IP_STATS */
@ -166,7 +166,7 @@ ip_input(struct pbuf *p, struct netif *inp) {
#endif /* IP_DEBUG */
#ifdef IP_STATS
#if IP_STATS
++lwip_stats.ip.recv;
#endif /* IP_STATS */
@ -180,7 +180,7 @@ ip_input(struct pbuf *p, struct netif *inp) {
ip_debug_print(p);
#endif /* IP_DEBUG */
pbuf_free(p);
#ifdef IP_STATS
#if IP_STATS
++lwip_stats.ip.err;
++lwip_stats.ip.drop;
#endif /* IP_STATS */
@ -204,7 +204,7 @@ ip_input(struct pbuf *p, struct netif *inp) {
if (netif == NULL) {
/* packet not for us, route or discard */
#ifdef IP_FORWARD
#if IP_FORWARD
ip_forward(p, iphdr);
#endif
pbuf_free(p);
@ -242,7 +242,7 @@ ip_input(struct pbuf *p, struct netif *inp) {
LWIP_DEBUGF(IP_DEBUG, ("Unsupported transport protocol %"U16_F"\n",
iphdr->nexthdr));
#ifdef IP_STATS
#if IP_STATS
++lwip_stats.ip.proterr;
++lwip_stats.ip.drop;
#endif /* IP_STATS */
@ -271,7 +271,7 @@ ip_output_if (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
LWIP_DEBUGF(IP_DEBUG, ("len %"U16_F" tot_len %"U16_F"\n", p->len, p->tot_len));
if (pbuf_header(p, IP_HLEN)) {
LWIP_DEBUGF(IP_DEBUG, ("ip_output: not enough room for IP header in pbuf\n"));
#ifdef IP_STATS
#if IP_STATS
++lwip_stats.ip.err;
#endif /* IP_STATS */
@ -301,7 +301,7 @@ ip_output_if (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
dest = &(iphdr->dest);
}
#ifdef IP_STATS
#if IP_STATS
++lwip_stats.ip.xmit;
#endif /* IP_STATS */
@ -327,7 +327,7 @@ ip_output(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
struct netif *netif;
if ((netif = ip_route(dest)) == NULL) {
LWIP_DEBUGF(IP_DEBUG, ("ip_output: No route to 0x%"X32_F"\n", dest->addr));
#ifdef IP_STATS
#if IP_STATS
++lwip_stats.ip.rterr;
#endif /* IP_STATS */
return ERR_RTE;