X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=slirp%2Fdebug.h;h=6cfa61edb32ff30c688eee7b18cb3a24f80933e3;hb=2191dffcf6ba7df884ac902e829415d55a0b2b68;hp=fa62cb9fe93953408154e9c0a1799cf036aabbef;hpb=5fafdf24ef2c090c164d4dc89684b3f379dbdd87;p=qemu diff --git a/slirp/debug.h b/slirp/debug.h index fa62cb9..6cfa61e 100644 --- a/slirp/debug.h +++ b/slirp/debug.h @@ -5,27 +5,24 @@ * terms and conditions of the copyright. */ -#define PRN_STDERR 1 -#define PRN_SPRINTF 2 +//#define DEBUG 1 -extern FILE *dfd; -extern FILE *lfd; -extern int dostats; -extern int slirp_debug; +#ifdef DEBUG #define DBG_CALL 0x1 #define DBG_MISC 0x2 #define DBG_ERROR 0x4 -#define DEBUG_DEFAULT DBG_CALL|DBG_MISC|DBG_ERROR -#ifdef DEBUG +#define dfd stderr + +extern int slirp_debug; + #define DEBUG_CALL(x) if (slirp_debug & DBG_CALL) { fprintf(dfd, "%s...\n", x); fflush(dfd); } #define DEBUG_ARG(x, y) if (slirp_debug & DBG_CALL) { fputc(' ', dfd); fprintf(dfd, x, y); fputc('\n', dfd); fflush(dfd); } #define DEBUG_ARGS(x) if (slirp_debug & DBG_CALL) { fprintf x ; fflush(dfd); } #define DEBUG_MISC(x) if (slirp_debug & DBG_MISC) { fprintf x ; fflush(dfd); } #define DEBUG_ERROR(x) if (slirp_debug & DBG_ERROR) {fprintf x ; fflush(dfd); } - #else #define DEBUG_CALL(x) @@ -35,16 +32,3 @@ extern int slirp_debug; #define DEBUG_ERROR(x) #endif - -void debug_init _P((char *, int)); -//void ttystats _P((struct ttys *)); -void allttystats _P((void)); -void ipstats _P((void)); -void vjstats _P((void)); -void tcpstats _P((void)); -void udpstats _P((void)); -void icmpstats _P((void)); -void mbufstats _P((void)); -void sockstats _P((void)); -void slirp_exit _P((int)); -