mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
17th October 2004 Leon Woestenberg <leon.woestenberg@gmx.net>
ethernetif.c: Fix lwip/stats.h support, reported by Andrew McGeachie.
This commit is contained in:
parent
eb99d21022
commit
99e3fe9ae1
@ -42,6 +42,7 @@
|
|||||||
#include "lwip/mem.h"
|
#include "lwip/mem.h"
|
||||||
#include "lwip/pbuf.h"
|
#include "lwip/pbuf.h"
|
||||||
#include "lwip/sys.h"
|
#include "lwip/sys.h"
|
||||||
|
#include <lwip/stats.h>
|
||||||
|
|
||||||
#include "netif/etharp.h"
|
#include "netif/etharp.h"
|
||||||
|
|
||||||
@ -117,7 +118,7 @@ low_level_output(struct netif *netif, struct pbuf *p)
|
|||||||
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
|
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LINK_STATS
|
#if LINK_STATS
|
||||||
lwip_stats.link.xmit++;
|
lwip_stats.link.xmit++;
|
||||||
#endif /* LINK_STATS */
|
#endif /* LINK_STATS */
|
||||||
|
|
||||||
@ -170,12 +171,12 @@ low_level_input(struct netif *netif)
|
|||||||
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
|
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LINK_STATS
|
#if LINK_STATS
|
||||||
lwip_stats.link.recv++;
|
lwip_stats.link.recv++;
|
||||||
#endif /* LINK_STATS */
|
#endif /* LINK_STATS */
|
||||||
} else {
|
} else {
|
||||||
drop packet();
|
drop packet();
|
||||||
#ifdef LINK_STATS
|
#if LINK_STATS
|
||||||
lwip_stats.link.memerr++;
|
lwip_stats.link.memerr++;
|
||||||
lwip_stats.link.drop++;
|
lwip_stats.link.drop++;
|
||||||
#endif /* LINK_STATS */
|
#endif /* LINK_STATS */
|
||||||
@ -229,7 +230,7 @@ ethernetif_input(struct netif *netif)
|
|||||||
/* points to packet payload, which starts with an Ethernet header */
|
/* points to packet payload, which starts with an Ethernet header */
|
||||||
ethhdr = p->payload;
|
ethhdr = p->payload;
|
||||||
|
|
||||||
#ifdef LINK_STATS
|
#if LINK_STATS
|
||||||
lwip_stats.link.recv++;
|
lwip_stats.link.recv++;
|
||||||
#endif /* LINK_STATS */
|
#endif /* LINK_STATS */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user