]>
git.ipfire.org Git - thirdparty/qemu.git/blob - slirp/src/debug.h
2e503ad7fa6b0fb83c76154707f2c3cfba2ee32d
1 /* SPDX-License-Identifier: BSD-3-Clause */
3 * Copyright (c) 1995 Danny Gasparovski.
5 * Please read the file COPYRIGHT for the
6 * terms and conditions of the copyright.
12 #define DBG_CALL (1 << 0)
13 #define DBG_MISC (1 << 1)
14 #define DBG_ERROR (1 << 2)
15 #define DBG_TFTP (1 << 3)
17 extern int slirp_debug
;
19 #define DEBUG_CALL(fmt, ...) do { \
20 if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \
21 g_debug(fmt "...", ##__VA_ARGS__); \
25 #define DEBUG_ARG(fmt, ...) do { \
26 if (G_UNLIKELY(slirp_debug & DBG_CALL)) { \
27 g_debug(" " fmt, ##__VA_ARGS__); \
31 #define DEBUG_MISC(fmt, ...) do { \
32 if (G_UNLIKELY(slirp_debug & DBG_MISC)) { \
33 g_debug(fmt, ##__VA_ARGS__); \
37 #define DEBUG_ERROR(fmt, ...) do { \
38 if (G_UNLIKELY(slirp_debug & DBG_ERROR)) { \
39 g_debug(fmt, ##__VA_ARGS__); \
43 #define DEBUG_TFTP(fmt, ...) do { \
44 if (G_UNLIKELY(slirp_debug & DBG_TFTP)) { \
45 g_debug(fmt, ##__VA_ARGS__); \