mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-25 15:42:56 +00:00
rename STATS to LWIP_STATS and make it checked by #if not #ifdef.The rest of the _STATS defines should follow
This commit is contained in:
parent
441e9b8431
commit
0846206bc0
@ -39,15 +39,13 @@
|
|||||||
#include "lwip/mem.h"
|
#include "lwip/mem.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef STATS
|
#if LWIP_STATS
|
||||||
struct stats_ lwip_stats;
|
struct stats_ lwip_stats;
|
||||||
#endif /* STATS */
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
stats_init(void)
|
stats_init(void)
|
||||||
{
|
{
|
||||||
#ifdef STATS
|
|
||||||
memset(&lwip_stats, 0, sizeof(struct stats_));
|
memset(&lwip_stats, 0, sizeof(struct stats_));
|
||||||
#endif /* STATS */
|
|
||||||
}
|
}
|
||||||
|
#endif /* LWIP_STATS */
|
||||||
/*-----------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
@ -87,9 +87,6 @@ PACK_STRUCT_END
|
|||||||
# include "arch/epstruct.h"
|
# include "arch/epstruct.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Declare here to avoid including netif.h creating a circular dependency */
|
|
||||||
//struct netif;
|
|
||||||
|
|
||||||
/** start DHCP configuration */
|
/** start DHCP configuration */
|
||||||
err_t dhcp_start(struct netif *netif);
|
err_t dhcp_start(struct netif *netif);
|
||||||
/** stop DHCP configuration */
|
/** stop DHCP configuration */
|
||||||
|
@ -297,9 +297,12 @@ a lot of data that needs to be copied, this should be set high. */
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ---------- Statistics options ---------- */
|
/* ---------- Statistics options ---------- */
|
||||||
#define STATS
|
#ifndef LWIP_STATS
|
||||||
|
#define LWIP_STATS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LWIP_STATS
|
||||||
|
|
||||||
#ifdef STATS
|
|
||||||
#define LINK_STATS
|
#define LINK_STATS
|
||||||
#define IP_STATS
|
#define IP_STATS
|
||||||
#define ICMP_STATS
|
#define ICMP_STATS
|
||||||
@ -309,7 +312,8 @@ a lot of data that needs to be copied, this should be set high. */
|
|||||||
#define MEMP_STATS
|
#define MEMP_STATS
|
||||||
#define PBUF_STATS
|
#define PBUF_STATS
|
||||||
#define SYS_STATS
|
#define SYS_STATS
|
||||||
#endif /* STATS */
|
|
||||||
|
#endif /* LWIP_STATS */
|
||||||
|
|
||||||
/* Debugging options all default to off */
|
/* Debugging options all default to off */
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include "lwip/mem.h"
|
#include "lwip/mem.h"
|
||||||
#include "lwip/memp.h"
|
#include "lwip/memp.h"
|
||||||
|
|
||||||
#ifdef STATS
|
#if LWIP_STATS
|
||||||
|
|
||||||
struct stats_proto {
|
struct stats_proto {
|
||||||
u16_t xmit; /* Transmitted packets. */
|
u16_t xmit; /* Transmitted packets. */
|
||||||
@ -99,9 +99,11 @@ struct stats_ {
|
|||||||
|
|
||||||
extern struct stats_ lwip_stats;
|
extern struct stats_ lwip_stats;
|
||||||
|
|
||||||
#endif /* STATS */
|
|
||||||
|
|
||||||
void stats_init(void);
|
void stats_init(void);
|
||||||
|
#else
|
||||||
|
#define stats_init()
|
||||||
|
#endif /* LWIP_STATS */
|
||||||
#endif /* __LWIP_STATS_H__ */
|
#endif /* __LWIP_STATS_H__ */
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user