VirtualBox

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

最後變更 在這個檔案從28023是 22873,由 vboxsync 提交於 15 年 前

NAT: stdio -> IPRT/fileio

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.7 KB
 
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
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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