--- /dev/null
+#ifndef _P2PKP_DEBUG_H_
+#define _P2PKP_DEBUG_H_
+
+//#include "linux/kernel.h"
+
+#ifndef P2PKP_DEBUG
+ /* uncomment to turn debugging off */
+ #define P2PKP_DEBUG yes
+#endif
+
+#ifdef P2PKP_DEBUG
+#define DEBUG(format, args...) \
+ do { \
+ printk(KERN_DEBUG "[%s:%d] " format "\n", __func__, __LINE__, ## args); \
+ } while (0)
+#else
+#define LOG(s) \
+ do {} while (0)
+#endif
+
+/* p2pkp error func */
+#define ERROR(format, args...) \
+ do { \
+ printk(KERN_ERR "[%s:%d] " format "\n", __func__, __LINE__, ## args); \
+ } while (0)
+
+#define print_sock_address(addr) \
+ do { \
+ printk(LOG_DEBUG "connection established to " \
+ NIPQUAD_FMT ":%d\n", \
+ NIPQUAD(addr.sin_addr.s_addr), \
+ ntohs(addr.sin_port)); \
+ } while (0)
+
+
+#endif /* _P2PKP_DEBUG_H_ */
+