VirtualBox

source: vbox/trunk/src/VBox/Devices/Network/slirp/debug.h@ 14329

Last change on this file since 14329 was 1076, checked in by vboxsync, 18 years ago

Removed tons of ifdef VBOX conditionals to make slirp readable again

  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1/*
2 * Copyright (c) 1995 Danny Gasparovski.
3 *
4 * Please read the file COPYRIGHT for the
5 * terms and conditions of the copyright.
6 */
7
8#define PRN_STDERR 1
9#define PRN_SPRINTF 2
10
11/* Unused anyway, using VBox Log facility. */
12#define dfd NULL
13extern int dostats;
14extern int slirp_debug;
15
16#define DBG_CALL 0x1
17#define DBG_MISC 0x2
18#define DBG_ERROR 0x4
19#define DEBUG_DEFAULT DBG_CALL|DBG_MISC|DBG_ERROR
20
21#include <VBox/log.h>
22
23#ifdef LOG_ENABLED
24#define DEBUG_CALL(x) LogFlow(("%s:\n", x))
25#define DEBUG_ARG(x, y) do { LogFlow((x, y)); LogFlow(("\n")); } while (0)
26#define DEBUG_ARGS(x) __debug_flow x
27#define DEBUG_MISC(x) __debug_log2 x
28#define DEBUG_ERROR(x) __debug_log x
29
30DECLINLINE(void) __debug_flow(FILE *pIgnore, const char *pszFormat, ...)
31{
32 va_list args;
33 va_start(args, pszFormat);
34 LogFlow(("%Nv\n", pszFormat, &args));
35 va_end(args);
36}
37
38DECLINLINE(void) __debug_log2(FILE *pIgnore, const char *pszFormat, ...)
39{
40 va_list args;
41 va_start(args, pszFormat);
42 Log2(("%Nv\n", pszFormat, &args));
43 va_end(args);
44}
45
46DECLINLINE(void) __debug_log(FILE *pIgnore, const char *pszFormat, ...)
47{
48 va_list args;
49 va_start(args, pszFormat);
50 Log(("%Nv\n", pszFormat, &args));
51 va_end(args);
52}
53
54#else /* !LOG_ENABLED */
55
56#define DEBUG_CALL(x) do {} while (0)
57#define DEBUG_ARG(x, y) do {} while (0)
58#define DEBUG_ARGS(x) do {} while (0)
59#define DEBUG_MISC(x) do {} while (0)
60#define DEBUG_ERROR(x) do {} while (0)
61
62#endif /* !LOG_ENABLED */
63
64void debug_init _P((char *, int));
65/*void ttystats _P((struct ttys *)); */
66void allttystats _P((void));
67void ipstats _P((PNATState));
68void tcpstats _P((PNATState));
69void udpstats _P((PNATState));
70void icmpstats _P((PNATState));
71void mbufstats _P((PNATState));
72void sockstats _P((PNATState));
73
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette