1 #ifndef _P2PKP_DEBUG_H_
2 #define _P2PKP_DEBUG_H_
4 //#include "linux/kernel.h"
7 /* uncomment to turn debugging off */
8 #define P2PKP_DEBUG yes
12 #define DEBUG(format, args...) \
14 printk(KERN_DEBUG "[%s:%d] " format "\n", __func__, __LINE__, ## args); \
21 /* p2pkp error func */
22 #define ERROR(format, args...) \
24 printk(KERN_ERR "[%s:%d] " format "\n", __func__, __LINE__, ## args); \
27 #define print_sock_address(addr) \
29 printk(LOG_DEBUG "connection established to " \
30 NIPQUAD_FMT ":%d\n", \
31 NIPQUAD(addr.sin_addr.s_addr), \
32 ntohs(addr.sin_port)); \
36 #endif /* _P2PKP_DEBUG_H_ */