69 struct stats_ lwip_stats;
76 lwip_stats.mem.name =
"MEM";
81 #if LWIP_STATS_DISPLAY 83 stats_display_proto(
struct stats_proto *proto,
const char *name)
85 LWIP_PLATFORM_DIAG((
"\n%s\n\t", name));
86 LWIP_PLATFORM_DIAG((
"xmit: %"STAT_COUNTER_F
"\n\t", proto->xmit));
87 LWIP_PLATFORM_DIAG((
"recv: %"STAT_COUNTER_F
"\n\t", proto->recv));
88 LWIP_PLATFORM_DIAG((
"fw: %"STAT_COUNTER_F
"\n\t", proto->fw));
89 LWIP_PLATFORM_DIAG((
"drop: %"STAT_COUNTER_F
"\n\t", proto->drop));
90 LWIP_PLATFORM_DIAG((
"chkerr: %"STAT_COUNTER_F
"\n\t", proto->chkerr));
91 LWIP_PLATFORM_DIAG((
"lenerr: %"STAT_COUNTER_F
"\n\t", proto->lenerr));
92 LWIP_PLATFORM_DIAG((
"memerr: %"STAT_COUNTER_F
"\n\t", proto->memerr));
93 LWIP_PLATFORM_DIAG((
"rterr: %"STAT_COUNTER_F
"\n\t", proto->rterr));
94 LWIP_PLATFORM_DIAG((
"proterr: %"STAT_COUNTER_F
"\n\t", proto->proterr));
95 LWIP_PLATFORM_DIAG((
"opterr: %"STAT_COUNTER_F
"\n\t", proto->opterr));
96 LWIP_PLATFORM_DIAG((
"err: %"STAT_COUNTER_F
"\n\t", proto->err));
97 LWIP_PLATFORM_DIAG((
"cachehit: %"STAT_COUNTER_F
"\n", proto->cachehit));
100 #if IGMP_STATS || MLD6_STATS 102 stats_display_igmp(
struct stats_igmp *igmp,
const char *name)
104 LWIP_PLATFORM_DIAG((
"\n%s\n\t", name));
105 LWIP_PLATFORM_DIAG((
"xmit: %"STAT_COUNTER_F
"\n\t", igmp->xmit));
106 LWIP_PLATFORM_DIAG((
"recv: %"STAT_COUNTER_F
"\n\t", igmp->recv));
107 LWIP_PLATFORM_DIAG((
"drop: %"STAT_COUNTER_F
"\n\t", igmp->drop));
108 LWIP_PLATFORM_DIAG((
"chkerr: %"STAT_COUNTER_F
"\n\t", igmp->chkerr));
109 LWIP_PLATFORM_DIAG((
"lenerr: %"STAT_COUNTER_F
"\n\t", igmp->lenerr));
110 LWIP_PLATFORM_DIAG((
"memerr: %"STAT_COUNTER_F
"\n\t", igmp->memerr));
111 LWIP_PLATFORM_DIAG((
"proterr: %"STAT_COUNTER_F
"\n\t", igmp->proterr));
112 LWIP_PLATFORM_DIAG((
"rx_v1: %"STAT_COUNTER_F
"\n\t", igmp->rx_v1));
113 LWIP_PLATFORM_DIAG((
"rx_group: %"STAT_COUNTER_F
"\n\t", igmp->rx_group));
114 LWIP_PLATFORM_DIAG((
"rx_general: %"STAT_COUNTER_F
"\n\t", igmp->rx_general));
115 LWIP_PLATFORM_DIAG((
"rx_report: %"STAT_COUNTER_F
"\n\t", igmp->rx_report));
116 LWIP_PLATFORM_DIAG((
"tx_join: %"STAT_COUNTER_F
"\n\t", igmp->tx_join));
117 LWIP_PLATFORM_DIAG((
"tx_leave: %"STAT_COUNTER_F
"\n\t", igmp->tx_leave));
118 LWIP_PLATFORM_DIAG((
"tx_report: %"STAT_COUNTER_F
"\n", igmp->tx_report));
122 #if MEM_STATS || MEMP_STATS 124 stats_display_mem(
struct stats_mem *
mem,
const char *name)
126 LWIP_PLATFORM_DIAG((
"\nMEM %s\n\t", name));
127 LWIP_PLATFORM_DIAG((
"avail: %"U32_F
"\n\t", (u32_t)mem->avail));
128 LWIP_PLATFORM_DIAG((
"used: %"U32_F
"\n\t", (u32_t)mem->used));
129 LWIP_PLATFORM_DIAG((
"max: %"U32_F
"\n\t", (u32_t)mem->max));
130 LWIP_PLATFORM_DIAG((
"err: %"U32_F
"\n", (u32_t)mem->err));
135 stats_display_memp(
struct stats_mem *mem,
int index)
137 if (index < MEMP_MAX) {
138 stats_display_mem(mem, mem->name);
146 stats_display_sys(
struct stats_sys *sys)
148 LWIP_PLATFORM_DIAG((
"\nSYS\n\t"));
149 LWIP_PLATFORM_DIAG((
"sem.used: %"U32_F
"\n\t", (u32_t)sys->sem.used));
150 LWIP_PLATFORM_DIAG((
"sem.max: %"U32_F
"\n\t", (u32_t)sys->sem.max));
151 LWIP_PLATFORM_DIAG((
"sem.err: %"U32_F
"\n\t", (u32_t)sys->sem.err));
152 LWIP_PLATFORM_DIAG((
"mutex.used: %"U32_F
"\n\t", (u32_t)sys->mutex.used));
153 LWIP_PLATFORM_DIAG((
"mutex.max: %"U32_F
"\n\t", (u32_t)sys->mutex.max));
154 LWIP_PLATFORM_DIAG((
"mutex.err: %"U32_F
"\n\t", (u32_t)sys->mutex.err));
155 LWIP_PLATFORM_DIAG((
"mbox.used: %"U32_F
"\n\t", (u32_t)sys->mbox.used));
156 LWIP_PLATFORM_DIAG((
"mbox.max: %"U32_F
"\n\t", (u32_t)sys->mbox.max));
157 LWIP_PLATFORM_DIAG((
"mbox.err: %"U32_F
"\n", (u32_t)sys->mbox.err));
166 LINK_STATS_DISPLAY();
167 ETHARP_STATS_DISPLAY();
168 IPFRAG_STATS_DISPLAY();
169 IP6_FRAG_STATS_DISPLAY();
173 IGMP_STATS_DISPLAY();
174 MLD6_STATS_DISPLAY();
175 ICMP_STATS_DISPLAY();
176 ICMP6_STATS_DISPLAY();
180 for (i = 0; i < MEMP_MAX; i++) {
181 MEMP_STATS_DISPLAY(i);