[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC][PATCH 03/15] virtproxy: add debug functions for virtp
From: |
Michael Roth |
Subject: |
[Qemu-devel] [RFC][PATCH 03/15] virtproxy: add debug functions for virtproxy core |
Date: |
Fri, 22 Oct 2010 13:43:19 -0500 |
Signed-off-by: Michael Roth <address@hidden>
---
virtproxy.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/virtproxy.c b/virtproxy.c
index f30b859..2f8996c 100644
--- a/virtproxy.c
+++ b/virtproxy.c
@@ -13,6 +13,23 @@
#include "virtproxy.h"
+#define DEBUG_VP
+
+#ifdef DEBUG_VP
+#define TRACE(msg, ...) do { \
+ fprintf(stderr, "%s:%s():L%d: " msg "\n", \
+ __FILE__, __FUNCTION__, __LINE__, ## __VA_ARGS__); \
+} while(0)
+#else
+#define TRACE(msg, ...) \
+ do { } while (0)
+#endif
+
+#define LOG(msg, ...) do { \
+ fprintf(stderr, "%s:%s(): " msg "\n", \
+ __FILE__, __FUNCTION__, ## __VA_ARGS__); \
+} while(0)
+
#define VP_SERVICE_ID_LEN 32 /* max length of service id string */
#define VP_PKT_DATA_LEN 1024 /* max proxied bytes per VPPacket */
#define VP_CONN_DATA_LEN 1024 /* max bytes conns can send at a time */
--
1.7.0.4
- [Qemu-devel] [RFC][PATCH 00/15] virtproxy: host/guest communication layer, Michael Roth, 2010/10/22
- [Qemu-devel] [RFC][PATCH 06/15] virtproxy: add read handler for communication channel, Michael Roth, 2010/10/22
- [Qemu-devel] [RFC][PATCH 02/15] virtproxy: qemu-vp, standalone daemon skeleton, Michael Roth, 2010/10/22
- [Qemu-devel] [RFC][PATCH 07/15] virtproxy: add vp_new() VPDriver constructor, Michael Roth, 2010/10/22
- [Qemu-devel] [RFC][PATCH 03/15] virtproxy: add debug functions for virtproxy core,
Michael Roth <=
- [Qemu-devel] [RFC][PATCH 08/15] virtproxy: interfaces to set/remove/handle VPOForwards, Michael Roth, 2010/10/22
- [Qemu-devel] [RFC][PATCH 09/15] virtproxy: add handler for data packets, Michael Roth, 2010/10/22
- [Qemu-devel] [RFC][PATCH 10/15] virtproxy: add handler for control packet, Michael Roth, 2010/10/22
- [Qemu-devel] [RFC][PATCH 11/15] virtproxy: add vp_handle_packet(), Michael Roth, 2010/10/22
- [Qemu-devel] [RFC][PATCH 12/15] virtproxy: interfaces to set/remove VPIForwards, Michael Roth, 2010/10/22
- [Qemu-devel] [RFC][PATCH 01/15] virtproxy: base data structures and constants, Michael Roth, 2010/10/22
- [Qemu-devel] [RFC][PATCH 13/15] virtproxy: add read handler for proxied connections, Michael Roth, 2010/10/22
- [Qemu-devel] [RFC][PATCH 15/15] virtproxy: qemu-vp, main logic, Michael Roth, 2010/10/22
- [Qemu-devel] [RFC][PATCH 04/15] virtproxy: list look-up functions conns/oforwards/iforwards, Michael Roth, 2010/10/22
- [Qemu-devel] [RFC][PATCH 14/15] virtproxy: Makefile/configure changes to build qemu-vp, Michael Roth, 2010/10/22