diff options
author | root <root@build-vm.(none)> | 2010-06-14 15:51:25 -0700 |
---|---|---|
committer | root <root@build-vm.(none)> | 2010-06-14 15:51:25 -0700 |
commit | c4414d9a8b31bedfb7471cd2365aaf5ea5cf55d5 (patch) | |
tree | 86ee5befd8195f56dcd91f9fd4e06368bf507a11 /include/debug.h | |
download | conntrack-tools-c4414d9a8b31bedfb7471cd2365aaf5ea5cf55d5.tar.gz conntrack-tools-c4414d9a8b31bedfb7471cd2365aaf5ea5cf55d5.zip |
debian conntrack 0.9.14-2
Diffstat (limited to 'include/debug.h')
-rw-r--r-- | include/debug.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/debug.h b/include/debug.h new file mode 100644 index 0000000..f205983 --- /dev/null +++ b/include/debug.h @@ -0,0 +1,21 @@ +#ifndef _DEBUG_H +#define _DEBUG_H + +#include <libnetfilter_conntrack/libnetfilter_conntrack.h> + +#undef DEBUG_CT + +#ifdef DEBUG_CT +#define debug_ct(ct, msg) \ +({ \ + char buf[1024]; \ + nfct_snprintf(buf, 1024, ct, NFCT_T_ALL, 0, 0); \ + printf("[%s]: %s\n", msg, buf); \ +}) +#define debug printf +#else +#define debug_ct(ct, msg) do {} while (0) +#define debug(...) do {} while (0) +#endif + +#endif |