Revision 31a60e22 slirp/debug.c
b/slirp/debug.c | ||
---|---|---|
20 | 20 |
|
21 | 21 |
/* Carry over one item from main.c so that the tty's restored. |
22 | 22 |
* Only done when the tty being used is /dev/tty --RedWolf */ |
23 |
#ifndef CONFIG_QEMU |
|
23 | 24 |
extern struct termios slirp_tty_settings; |
24 | 25 |
extern int slirp_tty_restore; |
25 | 26 |
|
... | ... | |
70 | 71 |
} |
71 | 72 |
} |
72 | 73 |
#endif |
74 |
#endif |
|
73 | 75 |
|
76 |
#ifdef LOG_ENABLED |
|
74 | 77 |
#if 0 |
75 | 78 |
/* |
76 | 79 |
* Statistic routines |
... | ... | |
80 | 83 |
* the link as well. |
81 | 84 |
*/ |
82 | 85 |
|
83 |
void |
|
86 |
static void
|
|
84 | 87 |
ttystats(ttyp) |
85 | 88 |
struct ttys *ttyp; |
86 | 89 |
{ |
... | ... | |
119 | 122 |
lprint(" %6d bad input packets\r\n", is->in_mbad); |
120 | 123 |
} |
121 | 124 |
|
122 |
void |
|
123 |
allttystats() |
|
125 |
static void
|
|
126 |
allttystats(void)
|
|
124 | 127 |
{ |
125 | 128 |
struct ttys *ttyp; |
126 | 129 |
|
... | ... | |
129 | 132 |
} |
130 | 133 |
#endif |
131 | 134 |
|
132 |
void |
|
133 |
ipstats() |
|
135 |
static void
|
|
136 |
ipstats(void)
|
|
134 | 137 |
{ |
135 | 138 |
lprint(" \r\n"); |
136 | 139 |
|
... | ... | |
153 | 156 |
lprint(" %6d total packets delivered\r\n", ipstat.ips_delivered); |
154 | 157 |
} |
155 | 158 |
|
156 |
#if 0
|
|
157 |
void |
|
158 |
vjstats() |
|
159 |
#ifndef CONFIG_QEMU
|
|
160 |
static void
|
|
161 |
vjstats(void)
|
|
159 | 162 |
{ |
160 | 163 |
lprint(" \r\n"); |
161 | 164 |
|
... | ... | |
172 | 175 |
} |
173 | 176 |
#endif |
174 | 177 |
|
175 |
void |
|
176 |
tcpstats() |
|
178 |
static void
|
|
179 |
tcpstats(void)
|
|
177 | 180 |
{ |
178 | 181 |
lprint(" \r\n"); |
179 | 182 |
|
... | ... | |
240 | 243 |
|
241 | 244 |
} |
242 | 245 |
|
243 |
void |
|
244 |
udpstats() |
|
246 |
static void
|
|
247 |
udpstats(void)
|
|
245 | 248 |
{ |
246 | 249 |
lprint(" \r\n"); |
247 | 250 |
|
... | ... | |
254 | 257 |
lprint(" %6d datagrams sent\r\n", udpstat.udps_opackets); |
255 | 258 |
} |
256 | 259 |
|
257 |
void |
|
258 |
icmpstats() |
|
260 |
static void
|
|
261 |
icmpstats(void)
|
|
259 | 262 |
{ |
260 | 263 |
lprint(" \r\n"); |
261 | 264 |
lprint("ICMP stats:\r\n"); |
... | ... | |
267 | 270 |
lprint(" %6d ICMP packets sent in reply\r\n", icmpstat.icps_reflect); |
268 | 271 |
} |
269 | 272 |
|
270 |
void |
|
271 |
mbufstats() |
|
273 |
static void
|
|
274 |
mbufstats(void)
|
|
272 | 275 |
{ |
273 | 276 |
struct mbuf *m; |
274 | 277 |
int i; |
... | ... | |
291 | 294 |
lprint(" %6d mbufs queued as packets\r\n\r\n", if_queued); |
292 | 295 |
} |
293 | 296 |
|
294 |
void |
|
295 |
sockstats() |
|
297 |
static void
|
|
298 |
sockstats(void)
|
|
296 | 299 |
{ |
297 | 300 |
char buff[256]; |
298 | 301 |
int n; |
... | ... | |
331 | 334 |
so->so_rcv.sb_cc, so->so_snd.sb_cc); |
332 | 335 |
} |
333 | 336 |
} |
337 |
#endif |
|
334 | 338 |
|
335 |
#if 0
|
|
339 |
#ifndef CONFIG_QEMU
|
|
336 | 340 |
void |
337 | 341 |
slirp_exit(exit_status) |
338 | 342 |
int exit_status; |
... | ... | |
374 | 378 |
exit(exit_status); |
375 | 379 |
} |
376 | 380 |
#endif |
381 |
|
|
382 |
void |
|
383 |
slirp_stats(void) |
|
384 |
{ |
|
385 |
#ifdef LOG_ENABLED |
|
386 |
ipstats(); |
|
387 |
tcpstats(); |
|
388 |
udpstats(); |
|
389 |
icmpstats(); |
|
390 |
mbufstats(); |
|
391 |
sockstats(); |
|
392 |
#else |
|
393 |
lprint("SLIRP statistics code not compiled.\n"); |
|
394 |
#endif |
|
395 |
} |
Also available in: Unified diff