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()   stats_display_proto(&lwip_stats.etharp, "ETHARP")
 
#define ETHARP_STATS_INC(x)   STATS_INC(x)
 
#define ICMP6_STATS_DISPLAY()   stats_display_proto(&lwip_stats.icmp6, "ICMPv6")
 
#define ICMP6_STATS_INC(x)   STATS_INC(x)
 
#define ICMP_STATS_DISPLAY()   stats_display_proto(&lwip_stats.icmp, "ICMP")
 
#define ICMP_STATS_INC(x)   STATS_INC(x)
 
#define IGMP_STATS_DISPLAY()
 
#define IGMP_STATS_INC(x)
 
#define IP6_FRAG_STATS_DISPLAY()   stats_display_proto(&lwip_stats.ip6_frag, "IPv6 FRAG")
 
#define IP6_FRAG_STATS_INC(x)   STATS_INC(x)
 
#define IP6_STATS_DISPLAY()   stats_display_proto(&lwip_stats.ip6, "IPv6")
 
#define IP6_STATS_INC(x)   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()   stats_display_proto(&lwip_stats.ip_frag, "IP_FRAG")
 
#define IPFRAG_STATS_INC(x)   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 MLD6_STATS_DISPLAY()   stats_display_igmp(&lwip_stats.mld6, "MLDv1")
 
#define MLD6_STATS_INC(x)   STATS_INC(x)
 
#define ND6_STATS_DISPLAY()   stats_display_proto(&lwip_stats.nd6, "ND")
 
#define ND6_STATS_INC(x)   STATS_INC(x)
 
#define STAT_COUNTER   u32_t
 
#define STAT_COUNTER_F   U32_F
 
#define STATS_DEC(x)   --lwip_stats.x
 
#define stats_display()
 
#define stats_display_igmp(igmp, name)
 
#define stats_display_mem(mem, name)
 
#define stats_display_memp(mem, index)
 
#define stats_display_proto(proto, name)
 
#define stats_display_sys(sys)
 
#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()   stats_display_proto(&lwip_stats.udp, "UDP")
 
#define UDP_STATS_INC(x)   STATS_INC(x)
 

Functions

void stats_init (void)
 

Variables

struct stats_ lwip_stats
 

#define ETHARP_STATS_DISPLAY ( )    stats_display_proto(&lwip_stats.etharp, "ETHARP")
#define ETHARP_STATS_INC (   x)    STATS_INC(x)
#define ICMP6_STATS_DISPLAY ( )    stats_display_proto(&lwip_stats.icmp6, "ICMPv6")
#define ICMP6_STATS_INC (   x)    STATS_INC(x)

Referenced by icmp6_input(), and icmp6_send_response().

#define ICMP_STATS_DISPLAY ( )    stats_display_proto(&lwip_stats.icmp, "ICMP")
#define ICMP_STATS_INC (   x)    STATS_INC(x)

Referenced by icmp_input(), and icmp_send_response().

#define IGMP_STATS_DISPLAY ( )
#define IGMP_STATS_INC (   x)
#define IP6_FRAG_STATS_DISPLAY ( )    stats_display_proto(&lwip_stats.ip6_frag, "IPv6 FRAG")
#define IP6_FRAG_STATS_INC (   x)    STATS_INC(x)

Referenced by ip6_input(), and ip6_reass().

#define IP6_STATS_DISPLAY ( )    stats_display_proto(&lwip_stats.ip6, "IPv6")
#define IP6_STATS_INC (   x)    STATS_INC(x)
#define IP_STATS_DISPLAY ( )    stats_display_proto(&lwip_stats.ip, "IP")
#define IP_STATS_INC (   x)    STATS_INC(x)

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

#define IPFRAG_STATS_DISPLAY ( )    stats_display_proto(&lwip_stats.ip_frag, "IP_FRAG")
#define IPFRAG_STATS_INC (   x)    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,
 
)    lwip_stats.mem.x = y
#define MEM_STATS_DEC_USED (   x,
 
)    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,
 
)    STATS_INC_USED(mem, y)
#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)
#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 MLD6_STATS_DISPLAY ( )    stats_display_igmp(&lwip_stats.mld6, "MLDv1")
#define MLD6_STATS_INC (   x)    STATS_INC(x)
#define ND6_STATS_DISPLAY ( )    stats_display_proto(&lwip_stats.nd6, "ND")
#define ND6_STATS_INC (   x)    STATS_INC(x)
#define STAT_COUNTER   u32_t
#define STAT_COUNTER_F   U32_F
#define STATS_DEC (   x)    --lwip_stats.x
#define stats_display ( )
#define stats_display_igmp (   igmp,
  name 
)
#define stats_display_mem (   mem,
  name 
)
#define stats_display_memp (   mem,
  index 
)
#define stats_display_proto (   proto,
  name 
)
#define stats_display_sys (   sys)
#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(memp!=NULL)
Definition: memp.c:426
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)
#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 UDP_STATS_DISPLAY ( )    stats_display_proto(&lwip_stats.udp, "UDP")
#define UDP_STATS_INC (   x)    STATS_INC(x)

Referenced by udp_connect(), and udp_input().

void stats_init ( void  )

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

Referenced by lwip_init().