VirtualBox

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

Last change on this file since 22873 was 22873, checked in by vboxsync, 15 years ago

NAT: stdio -> IPRT/fileio

  • Property svn:eol-style set to native
File size: 1.7 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
13
14#define DBG_CALL 0x1
15#define DBG_MISC 0x2
16#define DBG_ERROR 0x4
17#define DEBUG_DEFAULT DBG_CALL|DBG_MISC|DBG_ERROR
18
19#include <VBox/log.h>
20/* we've excluded stdio.h */
21# define FILE void
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
64int debug_init (void);
65void ipstats (PNATState);
66void tcpstats (PNATState);
67void udpstats (PNATState);
68void icmpstats (PNATState);
69void mbufstats (PNATState);
70void sockstats (PNATState);
71
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