typedef uint16_t u16_t;
#define STAT_COUNTER u16_t
struct stats_proto {
STAT_COUNTER xmit;
STAT_COUNTER recv;
STAT_COUNTER fw;
STAT_COUNTER drop;
STAT_COUNTER chkerr;
STAT_COUNTER lenerr;
STAT_COUNTER memerr;
STAT_COUNTER rterr;
STAT_COUNTER proterr;
STAT_COUNTER opterr;
STAT_COUNTER err;
STAT_COUNTER cachehit;
};
struct stats_ {
#if LINK_STATS
struct stats_proto link;
#endif
#if ETHARP_STATS
struct stats_proto etharp;
#endif
#if IPFRAG_STATS
struct stats_proto ip_frag;
#endif
#if IP_STATS
struct stats_proto ip;
#endif
#if ICMP_STATS
struct stats_proto icmp;
#endif
#if IGMP_STATS
struct stats_igmp igmp;
#endif
#if UDP_STATS
struct stats_proto udp;
#endif
#if TCP_STATS
struct stats_proto tcp;
#endif
#if MEM_STATS
struct stats_mem mem;
#endif
#if MEMP_STATS
struct stats_mem *memp[MEMP_MAX];
#endif
#if SYS_STATS
struct stats_sys sys;
#endif
#if IP6_STATS
struct stats_proto ip6;
#endif
#if ICMP6_STATS
struct stats_proto icmp6;
#endif
#if IP6_FRAG_STATS
struct stats_proto ip6_frag;
#endif
#if MLD6_STATS
struct stats_igmp mld6;
#endif
#if ND6_STATS
struct stats_proto nd6;
#endif
#if MIB2_STATS
struct stats_mib2 mib2;
#endif
};
struct stats_ lwip_stats;
#define STATS_INC(x) ++lwip_stats.x
#define UDP_STATS_INC(x) STATS_INC(x)
UDP_STATS_INC(udp.cachehit);