diff --git a/src/core/stats.c b/src/core/stats.c index f479fedc..02ff1a6d 100644 --- a/src/core/stats.c +++ b/src/core/stats.c @@ -47,7 +47,7 @@ stats_init(void) { memset(&lwip_stats, 0, sizeof(struct stats_)); } - +#if LWIP_STATS_DISPLAY void stats_display_proto(struct stats_proto *proto, char *name) { @@ -109,6 +109,6 @@ stats_display(void) } } - +#endif /* LWIP_STATS_DISPLAY */ #endif /* LWIP_STATS */ diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 31dcb0cb..30fc5d24 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -356,6 +356,10 @@ a lot of data that needs to be copied, this should be set high. */ #if LWIP_STATS +#ifndef LWIP_STATS_DISPLAY +#define LWIP_STATS_DISPLAY 0 +#endif + #ifndef LINK_STATS #define LINK_STATS 1 #endif diff --git a/src/include/lwip/stats.h b/src/include/lwip/stats.h index 105def97..bd2c7bc0 100644 --- a/src/include/lwip/stats.h +++ b/src/include/lwip/stats.h @@ -144,6 +144,11 @@ void stats_init(void); #define LINK_STATS_INC(x) #endif +/* Display of statistics */ +#if LWIP_STATS_DISPLAY +void stats_display(void); +#endif + #endif /* __LWIP_STATS_H__ */