Microchip® Advanced Software Framework

stats.h File Reference
#include "lwip/opt.h"
#include "lwip/mem.h"
#include "lwip/memp.h"

Data Structures

struct  stats_
 
struct  stats_igmp
 
struct  stats_mem
 
struct  stats_proto
 
struct  stats_sys
 
struct  stats_syselem
 

Macros

#define ETHARP_STATS_DISPLAY()
 
#define ETHARP_STATS_INC(x)
 
#define ICMP_STATS_DISPLAY()
 
#define ICMP_STATS_INC(x)
 
#define IGMP_STATS_DISPLAY()
 
#define IGMP_STATS_INC(x)
 
#define IP_STATS_DISPLAY()   stats_display_proto(&lwip_stats.ip, "IP")
 
#define IP_STATS_INC(x)   STATS_INC(x)
 
#define IPFRAG_STATS_DISPLAY()
 
#define IPFRAG_STATS_INC(x)
 
#define LINK_STATS_DISPLAY()   stats_display_proto(&lwip_stats.link, "LINK")
 
#define LINK_STATS_INC(x)   STATS_INC(x)
 
#define MEM_STATS_AVAIL(x, y)   lwip_stats.mem.x = y
 
#define MEM_STATS_DEC_USED(x, y)   lwip_stats.mem.x -= y
 
#define MEM_STATS_DISPLAY()   stats_display_mem(&lwip_stats.mem, "HEAP")
 
#define MEM_STATS_INC(x)   STATS_INC(mem.x)
 
#define MEM_STATS_INC_USED(x, y)   STATS_INC_USED(mem, y)
 
#define MEMP_STATS_AVAIL(x, i, y)   lwip_stats.memp[i].x = y
 
#define MEMP_STATS_DEC(x, i)   STATS_DEC(memp[i].x)
 
#define MEMP_STATS_DISPLAY(i)   stats_display_memp(&lwip_stats.memp[i], i)
 
#define MEMP_STATS_INC(x, i)   STATS_INC(memp[i].x)
 
#define MEMP_STATS_INC_USED(x, i)   STATS_INC_USED(memp[i], 1)
 
#define STAT_COUNTER   u32_t
 
#define STAT_COUNTER_F   U32_F
 
#define STATS_DEC(x)   --lwip_stats.x
 
#define STATS_INC(x)   ++lwip_stats.x
 
#define STATS_INC_USED(x, y)
 
#define SYS_STATS_DEC(x)   STATS_DEC(sys.x)
 
#define SYS_STATS_DISPLAY()   stats_display_sys(&lwip_stats.sys)
 
#define SYS_STATS_INC(x)   STATS_INC(sys.x)
 
#define SYS_STATS_INC_USED(x)   STATS_INC_USED(sys.x, 1)
 
#define TCP_STATS_DISPLAY()   stats_display_proto(&lwip_stats.tcp, "TCP")
 
#define TCP_STATS_INC(x)   STATS_INC(x)
 
#define UDP_STATS_DISPLAY()
 
#define UDP_STATS_INC(x)
 

Functions

void stats_display (void)
 
void stats_display_igmp (struct stats_igmp *igmp)
 
void stats_display_mem (struct stats_mem *mem, const char *name)
 
void stats_display_memp (struct stats_mem *mem, int index)
 
void stats_display_proto (struct stats_proto *proto, const char *name)
 
void stats_display_sys (struct stats_sys *sys)
 
void stats_init (void)
 

Variables

struct stats_ lwip_stats
 

#define ETHARP_STATS_DISPLAY ( )

Referenced by stats_display().

#define ETHARP_STATS_INC (   x)
#define ICMP_STATS_DISPLAY ( )

Referenced by stats_display().

#define ICMP_STATS_INC (   x)

Referenced by icmp_input(), and icmp_send_response().

#define IGMP_STATS_DISPLAY ( )

Referenced by stats_display().

#define IGMP_STATS_INC (   x)
#define IP_STATS_DISPLAY ( )    stats_display_proto(&lwip_stats.ip, "IP")

Referenced by stats_display().

#define IP_STATS_INC (   x)    STATS_INC(x)

Referenced by ip_input(), ip_output(), and ip_route().

#define IPFRAG_STATS_DISPLAY ( )

Referenced by stats_display().

#define IPFRAG_STATS_INC (   x)
#define LINK_STATS_DISPLAY ( )    stats_display_proto(&lwip_stats.link, "LINK")

Referenced by stats_display().

#define LINK_STATS_INC (   x)    STATS_INC(x)
#define MEM_STATS_AVAIL (   x,
 
)    lwip_stats.mem.x = y

Referenced by mem_init().

#define MEM_STATS_DEC_USED (   x,
 
)    lwip_stats.mem.x -= y

Referenced by mem_free(), and mem_trim().

#define MEM_STATS_DISPLAY ( )    stats_display_mem(&lwip_stats.mem, "HEAP")

Referenced by stats_display().

#define MEM_STATS_INC (   x)    STATS_INC(mem.x)

Referenced by mem_free(), mem_malloc(), and mem_trim().

#define MEM_STATS_INC_USED (   x,
 
)    STATS_INC_USED(mem, y)

Referenced by mem_malloc().

#define MEMP_STATS_AVAIL (   x,
  i,
 
)    lwip_stats.memp[i].x = y

Referenced by memp_init().

#define MEMP_STATS_DEC (   x,
 
)    STATS_DEC(memp[i].x)

Referenced by memp_free(), and tcp_alloc().

#define MEMP_STATS_DISPLAY (   i)    stats_display_memp(&lwip_stats.memp[i], i)

Referenced by stats_display().

#define MEMP_STATS_INC (   x,
 
)    STATS_INC(memp[i].x)
#define MEMP_STATS_INC_USED (   x,
 
)    STATS_INC_USED(memp[i], 1)

Referenced by if().

#define STAT_COUNTER   u32_t
#define STAT_COUNTER_F   U32_F

Referenced by stats_display_proto().

#define STATS_DEC (   x)    --lwip_stats.x
#define STATS_INC (   x)    ++lwip_stats.x
#define STATS_INC_USED (   x,
 
)
Value:
do { lwip_stats.x.used += y; \
if (lwip_stats.x.max < lwip_stats.x.used) { \
lwip_stats.x.max = lwip_stats.x.used; \
} \
} while(0)
if(timeout==NULL)
Definition: lwip_timers_141.c:274
struct stats_ lwip_stats
Definition: stats.c:49
#define SYS_STATS_DEC (   x)    STATS_DEC(sys.x)
#define SYS_STATS_DISPLAY ( )    stats_display_sys(&lwip_stats.sys)

Referenced by stats_display().

#define SYS_STATS_INC (   x)    STATS_INC(sys.x)
#define SYS_STATS_INC_USED (   x)    STATS_INC_USED(sys.x, 1)
#define TCP_STATS_DISPLAY ( )    stats_display_proto(&lwip_stats.tcp, "TCP")

Referenced by stats_display().

#define UDP_STATS_DISPLAY ( )

Referenced by stats_display().

#define UDP_STATS_INC (   x)

Referenced by udp_connect(), and udp_input().

void stats_display_igmp ( struct stats_igmp igmp)
void stats_display_mem ( struct stats_mem mem,
const char *  name 
)
void stats_display_memp ( struct stats_mem mem,
int  index 
)

References MEMP_MAX, and stats_display_mem().

void stats_init ( void  )

References lwip_stats, stats_::mem, stats_::memp, and MEMP_MAX.

Referenced by lwip_init().