+
+#ifdef __KERNEL__
+#include "ipsec_kversion.h"
-+
++#include <linux/ip.h> /* struct iphdr */
+/* Set number of ipsecX virtual devices here. */
+/* This must be < exp(field width of IPSEC_DEV_FORMAT) */
+/* It must also be reasonable so as not to overload the memory and CPU */
+#ifdef CONFIG_KLIPS_DEBUG
+extern void ipsec_print_ip(struct iphdr *ip);
+
-+ #define KLIPS_PRINT(flag, format, args...) \
++# define KLIPS_PRINT(flag, format, args...) \
+ ((flag) ? printk(KERN_INFO format , ## args) : 0)
-+ #define KLIPS_PRINTMORE(flag, format, args...) \
++# define KLIPS_PRINTMORE(flag, format, args...) \
+ ((flag) ? printk(format , ## args) : 0)
-+ #define KLIPS_IP_PRINT(flag, ip) \
++# define KLIPS_IP_PRINT(flag, ip) \
+ ((flag) ? ipsec_print_ip(ip) : 0)
+#else /* CONFIG_KLIPS_DEBUG */
-+ #define KLIPS_PRINT(flag, format, args...) do ; while(0)
-+ #define KLIPS_PRINTMORE(flag, format, args...) do ; while(0)
-+ #define KLIPS_IP_PRINT(flag, ip) do ; while(0)
++# define KLIPS_PRINT(flag, format, args...) do ; while(0)
++# define KLIPS_PRINTMORE(flag, format, args...) do ; while(0)
++# define KLIPS_IP_PRINT(flag, ip) do ; while(0)
+#endif /* CONFIG_KLIPS_DEBUG */
+
+