loadlwipv6 inlined
[vde.git] / vde-2 / src / slirpvde / debug.h
blob38aab0ce14ee32cb9440ade53acd76aef71294bd
1 /*
2 * Copyright (c) 1995 Danny Gasparovski.
3 *
4 * Please read the file COPYRIGHT for the
5 * terms and conditions of the copyright.
6 */
8 #ifndef SLIRP_DEBUG_H_
9 #define SLIRP_DEBUG_H_
11 #define PRN_STDERR 1
12 #define PRN_SPRINTF 2
14 extern FILE *dfd;
15 extern FILE *lfd;
16 extern int dostats;
17 extern int slirp_debug;
19 #define DBG_CALL 0x1
20 #define DBG_MISC 0x2
21 #define DBG_ERROR 0x4
22 #define DEBUG_DEFAULT DBG_CALL|DBG_MISC|DBG_ERROR
24 #ifdef DEBUG
25 #define DEBUG_CALL(x) if (slirp_debug & DBG_CALL) { fprintf(dfd, "%s...\n", x); fflush(dfd); }
26 #define DEBUG_ARG(x, y) if (slirp_debug & DBG_CALL) { fputc(' ', dfd); fprintf(dfd, x, y); fputc('\n', dfd); fflush(dfd); }
27 #define DEBUG_ARGS(x) if (slirp_debug & DBG_CALL) { fprintf x ; fflush(dfd); }
28 #define DEBUG_MISC(x) if (slirp_debug & DBG_MISC) { fprintf x ; fflush(dfd); }
29 #define DEBUG_ERROR(x) if (slirp_debug & DBG_ERROR) {fprintf x ; fflush(dfd); }
32 #else
34 #define DEBUG_CALL(x)
35 #define DEBUG_ARG(x, y)
36 #define DEBUG_ARGS(x)
37 #define DEBUG_MISC(x)
38 #define DEBUG_ERROR(x)
40 #endif
42 void debug_init _P((char *, int));
43 //void ttystats _P((struct ttys *));
44 void allttystats _P((void));
45 void ipstats _P((void));
46 void vjstats _P((void));
47 void tcpstats _P((void));
48 void udpstats _P((void));
49 void icmpstats _P((void));
50 void mbufstats _P((void));
51 void sockstats _P((void));
52 void slirp_exit _P((int));
54 #endif