diff packages/redboot/current/src/net/enet.c @ 161:ac086aa3217e

Merge from eCos master repository on 2001-06-08-21:11:51-BST
author jlarmour
date Sun, 10 Jun 2001 19:35:23 +0000
parents f2545e5de153
children f62680ef1804
line wrap: on
line diff
--- a/packages/redboot/current/src/net/enet.c
+++ b/packages/redboot/current/src/net/enet.c
@@ -47,7 +47,7 @@
 #include <net/net.h>
 #include <eth_drv.h>       // Logical driver interfaces
 
-#define ENET_STATS 1
+//#define ENET_STATS 1
 
 #ifdef ENET_STATS
 static int num_ip = 0;
@@ -142,13 +142,13 @@ void
 
         if ((pkt->pkt_bytes = eth_drv_read((char *)&eth_hdr, (char *)pkt->buf,
                                            ETH_MAX_PKTLEN)) > 0) {
-#if ENET_STATS
+#ifdef ENET_STATS
             ++num_received;
 #endif
             switch (type = ntohs(eth_hdr.type)) {
 
             case ETH_TYPE_IP:
-#if ENET_STATS
+#ifdef ENET_STATS
                 ++num_ip;
 #endif
                 pkt->ip_hdr = (ip_header_t *)pkt->buf;
@@ -156,7 +156,7 @@ void
                 break;
 
             case ETH_TYPE_ARP:
-#if ENET_STATS
+#ifdef ENET_STATS
                 ++num_arp;
 #endif
                 pkt->arp_hdr = (arp_header_t *)pkt->buf;
@@ -165,7 +165,7 @@ void
 
 #ifdef NET_SUPPORT_RARP
             case ETH_TYPE_RARP:
-#if ENET_STATS
+#ifdef ENET_STATS
                 ++num_rarp;
 #endif
                 pkt->arp_hdr = (arp_header_t *)pkt->buf;
@@ -207,7 +207,7 @@ void
     eth_hdr.type = htons(eth_type);
 
     eth_drv_write((char *)&eth_hdr, (char *)pkt->buf, pkt->pkt_bytes);
-#if ENET_STATS
+#ifdef ENET_STATS
     ++num_transmitted;
 #endif
 }