SNMP agent attached to SPI slave

Dependencies:   mbed

Committer:
lorcansmith
Date:
Mon Aug 13 15:07:40 2012 +0000
Revision:
0:2a53a4c3238c
v1.1 release includes ioAlarm traps

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lorcansmith 0:2a53a4c3238c 1 /*
lorcansmith 0:2a53a4c3238c 2 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
lorcansmith 0:2a53a4c3238c 3 * All rights reserved.
lorcansmith 0:2a53a4c3238c 4 *
lorcansmith 0:2a53a4c3238c 5 * Redistribution and use in source and binary forms, with or without modification,
lorcansmith 0:2a53a4c3238c 6 * are permitted provided that the following conditions are met:
lorcansmith 0:2a53a4c3238c 7 *
lorcansmith 0:2a53a4c3238c 8 * 1. Redistributions of source code must retain the above copyright notice,
lorcansmith 0:2a53a4c3238c 9 * this list of conditions and the following disclaimer.
lorcansmith 0:2a53a4c3238c 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
lorcansmith 0:2a53a4c3238c 11 * this list of conditions and the following disclaimer in the documentation
lorcansmith 0:2a53a4c3238c 12 * and/or other materials provided with the distribution.
lorcansmith 0:2a53a4c3238c 13 * 3. The name of the author may not be used to endorse or promote products
lorcansmith 0:2a53a4c3238c 14 * derived from this software without specific prior written permission.
lorcansmith 0:2a53a4c3238c 15 *
lorcansmith 0:2a53a4c3238c 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
lorcansmith 0:2a53a4c3238c 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
lorcansmith 0:2a53a4c3238c 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
lorcansmith 0:2a53a4c3238c 19 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
lorcansmith 0:2a53a4c3238c 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
lorcansmith 0:2a53a4c3238c 21 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
lorcansmith 0:2a53a4c3238c 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
lorcansmith 0:2a53a4c3238c 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
lorcansmith 0:2a53a4c3238c 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
lorcansmith 0:2a53a4c3238c 25 * OF SUCH DAMAGE.
lorcansmith 0:2a53a4c3238c 26 *
lorcansmith 0:2a53a4c3238c 27 * This file is part of the lwIP TCP/IP stack.
lorcansmith 0:2a53a4c3238c 28 *
lorcansmith 0:2a53a4c3238c 29 * Author: Adam Dunkels <adam@sics.se>
lorcansmith 0:2a53a4c3238c 30 *
lorcansmith 0:2a53a4c3238c 31 */
lorcansmith 0:2a53a4c3238c 32 #ifndef __LWIP_STATS_H__
lorcansmith 0:2a53a4c3238c 33 #define __LWIP_STATS_H__
lorcansmith 0:2a53a4c3238c 34
lorcansmith 0:2a53a4c3238c 35 #include "lwip/opt.h"
lorcansmith 0:2a53a4c3238c 36
lorcansmith 0:2a53a4c3238c 37 #include "lwip/mem.h"
lorcansmith 0:2a53a4c3238c 38 #include "lwip/memp.h"
lorcansmith 0:2a53a4c3238c 39
lorcansmith 0:2a53a4c3238c 40 #ifdef __cplusplus
lorcansmith 0:2a53a4c3238c 41 extern "C" {
lorcansmith 0:2a53a4c3238c 42 #endif
lorcansmith 0:2a53a4c3238c 43
lorcansmith 0:2a53a4c3238c 44 #if LWIP_STATS
lorcansmith 0:2a53a4c3238c 45
lorcansmith 0:2a53a4c3238c 46 #ifndef LWIP_STATS_LARGE
lorcansmith 0:2a53a4c3238c 47 #define LWIP_STATS_LARGE 0
lorcansmith 0:2a53a4c3238c 48 #endif
lorcansmith 0:2a53a4c3238c 49
lorcansmith 0:2a53a4c3238c 50 #if LWIP_STATS_LARGE
lorcansmith 0:2a53a4c3238c 51 #define STAT_COUNTER u32_t
lorcansmith 0:2a53a4c3238c 52 #define STAT_COUNTER_F U32_F
lorcansmith 0:2a53a4c3238c 53 #else
lorcansmith 0:2a53a4c3238c 54 #define STAT_COUNTER u16_t
lorcansmith 0:2a53a4c3238c 55 #define STAT_COUNTER_F U16_F
lorcansmith 0:2a53a4c3238c 56 #endif
lorcansmith 0:2a53a4c3238c 57
lorcansmith 0:2a53a4c3238c 58 struct stats_proto {
lorcansmith 0:2a53a4c3238c 59 STAT_COUNTER xmit; /* Transmitted packets. */
lorcansmith 0:2a53a4c3238c 60 STAT_COUNTER recv; /* Received packets. */
lorcansmith 0:2a53a4c3238c 61 STAT_COUNTER fw; /* Forwarded packets. */
lorcansmith 0:2a53a4c3238c 62 STAT_COUNTER drop; /* Dropped packets. */
lorcansmith 0:2a53a4c3238c 63 STAT_COUNTER chkerr; /* Checksum error. */
lorcansmith 0:2a53a4c3238c 64 STAT_COUNTER lenerr; /* Invalid length error. */
lorcansmith 0:2a53a4c3238c 65 STAT_COUNTER memerr; /* Out of memory error. */
lorcansmith 0:2a53a4c3238c 66 STAT_COUNTER rterr; /* Routing error. */
lorcansmith 0:2a53a4c3238c 67 STAT_COUNTER proterr; /* Protocol error. */
lorcansmith 0:2a53a4c3238c 68 STAT_COUNTER opterr; /* Error in options. */
lorcansmith 0:2a53a4c3238c 69 STAT_COUNTER err; /* Misc error. */
lorcansmith 0:2a53a4c3238c 70 STAT_COUNTER cachehit;
lorcansmith 0:2a53a4c3238c 71 };
lorcansmith 0:2a53a4c3238c 72
lorcansmith 0:2a53a4c3238c 73 struct stats_igmp {
lorcansmith 0:2a53a4c3238c 74 STAT_COUNTER xmit; /* Transmitted packets. */
lorcansmith 0:2a53a4c3238c 75 STAT_COUNTER recv; /* Received packets. */
lorcansmith 0:2a53a4c3238c 76 STAT_COUNTER drop; /* Dropped packets. */
lorcansmith 0:2a53a4c3238c 77 STAT_COUNTER chkerr; /* Checksum error. */
lorcansmith 0:2a53a4c3238c 78 STAT_COUNTER lenerr; /* Invalid length error. */
lorcansmith 0:2a53a4c3238c 79 STAT_COUNTER memerr; /* Out of memory error. */
lorcansmith 0:2a53a4c3238c 80 STAT_COUNTER proterr; /* Protocol error. */
lorcansmith 0:2a53a4c3238c 81 STAT_COUNTER rx_v1; /* Received v1 frames. */
lorcansmith 0:2a53a4c3238c 82 STAT_COUNTER rx_group; /* Received group-specific queries. */
lorcansmith 0:2a53a4c3238c 83 STAT_COUNTER rx_general; /* Received general queries. */
lorcansmith 0:2a53a4c3238c 84 STAT_COUNTER rx_report; /* Received reports. */
lorcansmith 0:2a53a4c3238c 85 STAT_COUNTER tx_join; /* Sent joins. */
lorcansmith 0:2a53a4c3238c 86 STAT_COUNTER tx_leave; /* Sent leaves. */
lorcansmith 0:2a53a4c3238c 87 STAT_COUNTER tx_report; /* Sent reports. */
lorcansmith 0:2a53a4c3238c 88 };
lorcansmith 0:2a53a4c3238c 89
lorcansmith 0:2a53a4c3238c 90 struct stats_mem {
lorcansmith 0:2a53a4c3238c 91 #ifdef LWIP_DEBUG
lorcansmith 0:2a53a4c3238c 92 const char *name;
lorcansmith 0:2a53a4c3238c 93 #endif /* LWIP_DEBUG */
lorcansmith 0:2a53a4c3238c 94 mem_size_t avail;
lorcansmith 0:2a53a4c3238c 95 mem_size_t used;
lorcansmith 0:2a53a4c3238c 96 mem_size_t max;
lorcansmith 0:2a53a4c3238c 97 STAT_COUNTER err;
lorcansmith 0:2a53a4c3238c 98 STAT_COUNTER illegal;
lorcansmith 0:2a53a4c3238c 99 };
lorcansmith 0:2a53a4c3238c 100
lorcansmith 0:2a53a4c3238c 101 struct stats_syselem {
lorcansmith 0:2a53a4c3238c 102 STAT_COUNTER used;
lorcansmith 0:2a53a4c3238c 103 STAT_COUNTER max;
lorcansmith 0:2a53a4c3238c 104 STAT_COUNTER err;
lorcansmith 0:2a53a4c3238c 105 };
lorcansmith 0:2a53a4c3238c 106
lorcansmith 0:2a53a4c3238c 107 struct stats_sys {
lorcansmith 0:2a53a4c3238c 108 struct stats_syselem sem;
lorcansmith 0:2a53a4c3238c 109 struct stats_syselem mutex;
lorcansmith 0:2a53a4c3238c 110 struct stats_syselem mbox;
lorcansmith 0:2a53a4c3238c 111 };
lorcansmith 0:2a53a4c3238c 112
lorcansmith 0:2a53a4c3238c 113 struct stats_ {
lorcansmith 0:2a53a4c3238c 114 #if LINK_STATS
lorcansmith 0:2a53a4c3238c 115 struct stats_proto link;
lorcansmith 0:2a53a4c3238c 116 #endif
lorcansmith 0:2a53a4c3238c 117 #if ETHARP_STATS
lorcansmith 0:2a53a4c3238c 118 struct stats_proto etharp;
lorcansmith 0:2a53a4c3238c 119 #endif
lorcansmith 0:2a53a4c3238c 120 #if IPFRAG_STATS
lorcansmith 0:2a53a4c3238c 121 struct stats_proto ip_frag;
lorcansmith 0:2a53a4c3238c 122 #endif
lorcansmith 0:2a53a4c3238c 123 #if IP_STATS
lorcansmith 0:2a53a4c3238c 124 struct stats_proto ip;
lorcansmith 0:2a53a4c3238c 125 #endif
lorcansmith 0:2a53a4c3238c 126 #if ICMP_STATS
lorcansmith 0:2a53a4c3238c 127 struct stats_proto icmp;
lorcansmith 0:2a53a4c3238c 128 #endif
lorcansmith 0:2a53a4c3238c 129 #if IGMP_STATS
lorcansmith 0:2a53a4c3238c 130 struct stats_igmp igmp;
lorcansmith 0:2a53a4c3238c 131 #endif
lorcansmith 0:2a53a4c3238c 132 #if UDP_STATS
lorcansmith 0:2a53a4c3238c 133 struct stats_proto udp;
lorcansmith 0:2a53a4c3238c 134 #endif
lorcansmith 0:2a53a4c3238c 135 #if TCP_STATS
lorcansmith 0:2a53a4c3238c 136 struct stats_proto tcp;
lorcansmith 0:2a53a4c3238c 137 #endif
lorcansmith 0:2a53a4c3238c 138 #if MEM_STATS
lorcansmith 0:2a53a4c3238c 139 struct stats_mem mem;
lorcansmith 0:2a53a4c3238c 140 #endif
lorcansmith 0:2a53a4c3238c 141 #if MEMP_STATS
lorcansmith 0:2a53a4c3238c 142 struct stats_mem memp[MEMP_MAX];
lorcansmith 0:2a53a4c3238c 143 #endif
lorcansmith 0:2a53a4c3238c 144 #if SYS_STATS
lorcansmith 0:2a53a4c3238c 145 struct stats_sys sys;
lorcansmith 0:2a53a4c3238c 146 #endif
lorcansmith 0:2a53a4c3238c 147 };
lorcansmith 0:2a53a4c3238c 148
lorcansmith 0:2a53a4c3238c 149 extern struct stats_ lwip_stats;
lorcansmith 0:2a53a4c3238c 150
lorcansmith 0:2a53a4c3238c 151 void stats_init(void);
lorcansmith 0:2a53a4c3238c 152
lorcansmith 0:2a53a4c3238c 153 #define STATS_INC(x) ++lwip_stats.x
lorcansmith 0:2a53a4c3238c 154 #define STATS_DEC(x) --lwip_stats.x
lorcansmith 0:2a53a4c3238c 155 #define STATS_INC_USED(x, y) do { lwip_stats.x.used += y; \
lorcansmith 0:2a53a4c3238c 156 if (lwip_stats.x.max < lwip_stats.x.used) { \
lorcansmith 0:2a53a4c3238c 157 lwip_stats.x.max = lwip_stats.x.used; \
lorcansmith 0:2a53a4c3238c 158 } \
lorcansmith 0:2a53a4c3238c 159 } while(0)
lorcansmith 0:2a53a4c3238c 160 #else /* LWIP_STATS */
lorcansmith 0:2a53a4c3238c 161 #define stats_init()
lorcansmith 0:2a53a4c3238c 162 #define STATS_INC(x)
lorcansmith 0:2a53a4c3238c 163 #define STATS_DEC(x)
lorcansmith 0:2a53a4c3238c 164 #define STATS_INC_USED(x)
lorcansmith 0:2a53a4c3238c 165 #endif /* LWIP_STATS */
lorcansmith 0:2a53a4c3238c 166
lorcansmith 0:2a53a4c3238c 167 #if TCP_STATS
lorcansmith 0:2a53a4c3238c 168 #define TCP_STATS_INC(x) STATS_INC(x)
lorcansmith 0:2a53a4c3238c 169 #define TCP_STATS_DISPLAY() stats_display_proto(&lwip_stats.tcp, "TCP")
lorcansmith 0:2a53a4c3238c 170 #else
lorcansmith 0:2a53a4c3238c 171 #define TCP_STATS_INC(x)
lorcansmith 0:2a53a4c3238c 172 #define TCP_STATS_DISPLAY()
lorcansmith 0:2a53a4c3238c 173 #endif
lorcansmith 0:2a53a4c3238c 174
lorcansmith 0:2a53a4c3238c 175 #if UDP_STATS
lorcansmith 0:2a53a4c3238c 176 #define UDP_STATS_INC(x) STATS_INC(x)
lorcansmith 0:2a53a4c3238c 177 #define UDP_STATS_DISPLAY() stats_display_proto(&lwip_stats.udp, "UDP")
lorcansmith 0:2a53a4c3238c 178 #else
lorcansmith 0:2a53a4c3238c 179 #define UDP_STATS_INC(x)
lorcansmith 0:2a53a4c3238c 180 #define UDP_STATS_DISPLAY()
lorcansmith 0:2a53a4c3238c 181 #endif
lorcansmith 0:2a53a4c3238c 182
lorcansmith 0:2a53a4c3238c 183 #if ICMP_STATS
lorcansmith 0:2a53a4c3238c 184 #define ICMP_STATS_INC(x) STATS_INC(x)
lorcansmith 0:2a53a4c3238c 185 #define ICMP_STATS_DISPLAY() stats_display_proto(&lwip_stats.icmp, "ICMP")
lorcansmith 0:2a53a4c3238c 186 #else
lorcansmith 0:2a53a4c3238c 187 #define ICMP_STATS_INC(x)
lorcansmith 0:2a53a4c3238c 188 #define ICMP_STATS_DISPLAY()
lorcansmith 0:2a53a4c3238c 189 #endif
lorcansmith 0:2a53a4c3238c 190
lorcansmith 0:2a53a4c3238c 191 #if IGMP_STATS
lorcansmith 0:2a53a4c3238c 192 #define IGMP_STATS_INC(x) STATS_INC(x)
lorcansmith 0:2a53a4c3238c 193 #define IGMP_STATS_DISPLAY() stats_display_igmp(&lwip_stats.igmp)
lorcansmith 0:2a53a4c3238c 194 #else
lorcansmith 0:2a53a4c3238c 195 #define IGMP_STATS_INC(x)
lorcansmith 0:2a53a4c3238c 196 #define IGMP_STATS_DISPLAY()
lorcansmith 0:2a53a4c3238c 197 #endif
lorcansmith 0:2a53a4c3238c 198
lorcansmith 0:2a53a4c3238c 199 #if IP_STATS
lorcansmith 0:2a53a4c3238c 200 #define IP_STATS_INC(x) STATS_INC(x)
lorcansmith 0:2a53a4c3238c 201 #define IP_STATS_DISPLAY() stats_display_proto(&lwip_stats.ip, "IP")
lorcansmith 0:2a53a4c3238c 202 #else
lorcansmith 0:2a53a4c3238c 203 #define IP_STATS_INC(x)
lorcansmith 0:2a53a4c3238c 204 #define IP_STATS_DISPLAY()
lorcansmith 0:2a53a4c3238c 205 #endif
lorcansmith 0:2a53a4c3238c 206
lorcansmith 0:2a53a4c3238c 207 #if IPFRAG_STATS
lorcansmith 0:2a53a4c3238c 208 #define IPFRAG_STATS_INC(x) STATS_INC(x)
lorcansmith 0:2a53a4c3238c 209 #define IPFRAG_STATS_DISPLAY() stats_display_proto(&lwip_stats.ip_frag, "IP_FRAG")
lorcansmith 0:2a53a4c3238c 210 #else
lorcansmith 0:2a53a4c3238c 211 #define IPFRAG_STATS_INC(x)
lorcansmith 0:2a53a4c3238c 212 #define IPFRAG_STATS_DISPLAY()
lorcansmith 0:2a53a4c3238c 213 #endif
lorcansmith 0:2a53a4c3238c 214
lorcansmith 0:2a53a4c3238c 215 #if ETHARP_STATS
lorcansmith 0:2a53a4c3238c 216 #define ETHARP_STATS_INC(x) STATS_INC(x)
lorcansmith 0:2a53a4c3238c 217 #define ETHARP_STATS_DISPLAY() stats_display_proto(&lwip_stats.etharp, "ETHARP")
lorcansmith 0:2a53a4c3238c 218 #else
lorcansmith 0:2a53a4c3238c 219 #define ETHARP_STATS_INC(x)
lorcansmith 0:2a53a4c3238c 220 #define ETHARP_STATS_DISPLAY()
lorcansmith 0:2a53a4c3238c 221 #endif
lorcansmith 0:2a53a4c3238c 222
lorcansmith 0:2a53a4c3238c 223 #if LINK_STATS
lorcansmith 0:2a53a4c3238c 224 #define LINK_STATS_INC(x) STATS_INC(x)
lorcansmith 0:2a53a4c3238c 225 #define LINK_STATS_DISPLAY() stats_display_proto(&lwip_stats.link, "LINK")
lorcansmith 0:2a53a4c3238c 226 #else
lorcansmith 0:2a53a4c3238c 227 #define LINK_STATS_INC(x)
lorcansmith 0:2a53a4c3238c 228 #define LINK_STATS_DISPLAY()
lorcansmith 0:2a53a4c3238c 229 #endif
lorcansmith 0:2a53a4c3238c 230
lorcansmith 0:2a53a4c3238c 231 #if MEM_STATS
lorcansmith 0:2a53a4c3238c 232 #define MEM_STATS_AVAIL(x, y) lwip_stats.mem.x = y
lorcansmith 0:2a53a4c3238c 233 #define MEM_STATS_INC(x) STATS_INC(mem.x)
lorcansmith 0:2a53a4c3238c 234 #define MEM_STATS_INC_USED(x, y) STATS_INC_USED(mem, y)
lorcansmith 0:2a53a4c3238c 235 #define MEM_STATS_DEC_USED(x, y) lwip_stats.mem.x -= y
lorcansmith 0:2a53a4c3238c 236 #define MEM_STATS_DISPLAY() stats_display_mem(&lwip_stats.mem, "HEAP")
lorcansmith 0:2a53a4c3238c 237 #else
lorcansmith 0:2a53a4c3238c 238 #define MEM_STATS_AVAIL(x, y)
lorcansmith 0:2a53a4c3238c 239 #define MEM_STATS_INC(x)
lorcansmith 0:2a53a4c3238c 240 #define MEM_STATS_INC_USED(x, y)
lorcansmith 0:2a53a4c3238c 241 #define MEM_STATS_DEC_USED(x, y)
lorcansmith 0:2a53a4c3238c 242 #define MEM_STATS_DISPLAY()
lorcansmith 0:2a53a4c3238c 243 #endif
lorcansmith 0:2a53a4c3238c 244
lorcansmith 0:2a53a4c3238c 245 #if MEMP_STATS
lorcansmith 0:2a53a4c3238c 246 #define MEMP_STATS_AVAIL(x, i, y) lwip_stats.memp[i].x = y
lorcansmith 0:2a53a4c3238c 247 #define MEMP_STATS_INC(x, i) STATS_INC(memp[i].x)
lorcansmith 0:2a53a4c3238c 248 #define MEMP_STATS_DEC(x, i) STATS_DEC(memp[i].x)
lorcansmith 0:2a53a4c3238c 249 #define MEMP_STATS_INC_USED(x, i) STATS_INC_USED(memp[i], 1)
lorcansmith 0:2a53a4c3238c 250 #define MEMP_STATS_DISPLAY(i) stats_display_memp(&lwip_stats.memp[i], i)
lorcansmith 0:2a53a4c3238c 251 #else
lorcansmith 0:2a53a4c3238c 252 #define MEMP_STATS_AVAIL(x, i, y)
lorcansmith 0:2a53a4c3238c 253 #define MEMP_STATS_INC(x, i)
lorcansmith 0:2a53a4c3238c 254 #define MEMP_STATS_DEC(x, i)
lorcansmith 0:2a53a4c3238c 255 #define MEMP_STATS_INC_USED(x, i)
lorcansmith 0:2a53a4c3238c 256 #define MEMP_STATS_DISPLAY(i)
lorcansmith 0:2a53a4c3238c 257 #endif
lorcansmith 0:2a53a4c3238c 258
lorcansmith 0:2a53a4c3238c 259 #if SYS_STATS
lorcansmith 0:2a53a4c3238c 260 #define SYS_STATS_INC(x) STATS_INC(sys.x)
lorcansmith 0:2a53a4c3238c 261 #define SYS_STATS_DEC(x) STATS_DEC(sys.x)
lorcansmith 0:2a53a4c3238c 262 #define SYS_STATS_INC_USED(x) STATS_INC_USED(sys.x, 1)
lorcansmith 0:2a53a4c3238c 263 #define SYS_STATS_DISPLAY() stats_display_sys(&lwip_stats.sys)
lorcansmith 0:2a53a4c3238c 264 #else
lorcansmith 0:2a53a4c3238c 265 #define SYS_STATS_INC(x)
lorcansmith 0:2a53a4c3238c 266 #define SYS_STATS_DEC(x)
lorcansmith 0:2a53a4c3238c 267 #define SYS_STATS_INC_USED(x)
lorcansmith 0:2a53a4c3238c 268 #define SYS_STATS_DISPLAY()
lorcansmith 0:2a53a4c3238c 269 #endif
lorcansmith 0:2a53a4c3238c 270
lorcansmith 0:2a53a4c3238c 271 /* Display of statistics */
lorcansmith 0:2a53a4c3238c 272 #if LWIP_STATS_DISPLAY
lorcansmith 0:2a53a4c3238c 273 void stats_display(void);
lorcansmith 0:2a53a4c3238c 274 void stats_display_proto(struct stats_proto *proto, char *name);
lorcansmith 0:2a53a4c3238c 275 void stats_display_igmp(struct stats_igmp *igmp);
lorcansmith 0:2a53a4c3238c 276 void stats_display_mem(struct stats_mem *mem, char *name);
lorcansmith 0:2a53a4c3238c 277 void stats_display_memp(struct stats_mem *mem, int index);
lorcansmith 0:2a53a4c3238c 278 void stats_display_sys(struct stats_sys *sys);
lorcansmith 0:2a53a4c3238c 279 #else /* LWIP_STATS_DISPLAY */
lorcansmith 0:2a53a4c3238c 280 #define stats_display()
lorcansmith 0:2a53a4c3238c 281 #define stats_display_proto(proto, name)
lorcansmith 0:2a53a4c3238c 282 #define stats_display_igmp(igmp)
lorcansmith 0:2a53a4c3238c 283 #define stats_display_mem(mem, name)
lorcansmith 0:2a53a4c3238c 284 #define stats_display_memp(mem, index)
lorcansmith 0:2a53a4c3238c 285 #define stats_display_sys(sys)
lorcansmith 0:2a53a4c3238c 286 #endif /* LWIP_STATS_DISPLAY */
lorcansmith 0:2a53a4c3238c 287
lorcansmith 0:2a53a4c3238c 288 #ifdef __cplusplus
lorcansmith 0:2a53a4c3238c 289 }
lorcansmith 0:2a53a4c3238c 290 #endif
lorcansmith 0:2a53a4c3238c 291
lorcansmith 0:2a53a4c3238c 292 #endif /* __LWIP_STATS_H__ */