File: debug.h

package info (click to toggle)
conntrack-tools 1%3A1.4.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,580 kB
  • sloc: ansic: 20,447; sh: 6,209; yacc: 1,480; makefile: 194; lex: 181; python: 176
file content (21 lines) | stat: -rw-r--r-- 408 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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