Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
folium-app
GitHub Repository: folium-app/Folium
Path: blob/a-new-beginning/SharedDependencies/Sources/libslirp/include/debug.h
2 views
1
/* SPDX-License-Identifier: BSD-3-Clause */
2
/*
3
* Copyright (c) 1995 Danny Gasparovski.
4
*/
5
6
#ifndef DEBUG_H_
7
#define DEBUG_H_
8
9
#define DBG_CALL (1 << 0)
10
#define DBG_MISC (1 << 1)
11
#define DBG_ERROR (1 << 2)
12
#define DBG_TFTP (1 << 3)
13
#define DBG_VERBOSE_CALL (1 << 4)
14
15
extern int slirp_debug;
16
17
#define DEBUG_CALL(name) \
18
do { \
19
if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \
20
g_debug(name "..."); \
21
} \
22
} while (0)
23
24
#define DEBUG_VERBOSE_CALL(name) \
25
do { \
26
if (G_UNLIKELY(slirp_debug & DBG_VERBOSE_CALL)) { \
27
g_debug(name "..."); \
28
} \
29
} while (0)
30
31
#define DEBUG_RAW_CALL(...) \
32
do { \
33
if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \
34
g_debug(__VA_ARGS__); \
35
} \
36
} while (0)
37
38
#define DEBUG_ARG(...) \
39
do { \
40
if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \
41
g_debug(" " __VA_ARGS__); \
42
} \
43
} while (0)
44
45
#define DEBUG_MISC(...) \
46
do { \
47
if (G_UNLIKELY(slirp_debug & DBG_MISC)) { \
48
g_debug(__VA_ARGS__); \
49
} \
50
} while (0)
51
52
#define DEBUG_ERROR(...) \
53
do { \
54
if (G_UNLIKELY(slirp_debug & DBG_ERROR)) { \
55
g_debug(__VA_ARGS__); \
56
} \
57
} while (0)
58
59
#define DEBUG_TFTP(...) \
60
do { \
61
if (G_UNLIKELY(slirp_debug & DBG_TFTP)) { \
62
g_debug(__VA_ARGS__); \
63
} \
64
} while (0)
65
66
#endif /* DEBUG_H_ */
67
68