Patchwork [1/4] iptables: Introduce header for keeping debug and trace entities

login
register
mail settings
Submitter Alexey Perevalov
Date July 25, 2013, 9:23 a.m.
Message ID <1374744229-5427-2-git-send-email-a.perevalov@samsung.com>
Download mbox | patch
Permalink /patch/261644/
State Not Applicable
Headers show

Comments

Alexey Perevalov - July 25, 2013, 9:23 a.m.
Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
---
 include/trace.h |   14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 include/trace.h

Patch

diff --git a/include/trace.h b/include/trace.h
new file mode 100644
index 0000000..4711171
--- /dev/null
+++ b/include/trace.h
@@ -0,0 +1,14 @@ 
+#ifndef _IPTABLES_TRACE_H
+#define _IPTABLES_TRACE_H
+
+#ifdef DEBUG
+#include <fcntl.h>
+#define DEBUGP(x, args...)      fprintf(stderr, "%s: " x, __FUNCTION__, ## args)
+#define DEBUGP_C(x, args...)    fprintf(stderr, x, ## args)
+#else
+#define DEBUGP(x, args...)
+#define DEBUGP_C(x, args...)
+#endif
+
+#endif /* _IPTABLES_TRACE_H */
+