*/
#include <linux/ip.h>
#include <linux/kernel.h>
+#include <linux/kmod.h>
#include <linux/list.h>
+#include <linux/module.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/version.h>
#include <linux/netfilter_arp.h>
#include <net/ip.h>
#include <net/route.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
+# include <linux/export.h>
+#endif
#include "compat_skbuff.h"
#include "compat_xtnu.h"
# define rt_dst(rt) (&(rt)->u.dst)
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
# define nf_nat_ipv4_multi_range_compat nf_nat_multi_range_compat
# define nf_nat_ipv4_range nf_nat_range
# define NF_NAT_RANGE_MAP_IPS IP_NAT_RANGE_MAP_IPS
#include <net/net_namespace.h>
#include <net/netns/generic.h>
#endif
-#include "xt_DNETMAP.h"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
+# include <net/netfilter/nf_nat.h>
+#else
+# include <linux/netfilter/nf_nat.h>
+#endif
#include "compat_xtables.h"
+#include "xt_DNETMAP.h"
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Marek Kierdelewicz <marek@koba.pl>");
};
struct xt_DNETMAP_tginfo {
+#ifdef __KERNEL__
struct nf_nat_ipv4_multi_range_compat prefix;
+#else
+ struct nf_nat_multi_range_compat prefix;
+#endif
__u8 flags;
__s16 ttl;
};
* written by Jan Engelhardt <jengelh [at] medozas de>, 2008 - 2009
* placed in the Public Domain
*/
+#include <linux/module.h>
#include <linux/netfilter.h>
#include <linux/skbuff.h>
#include "compat_xtables.h"
* version 2, as published by the Free Software Foundation.
*/
#include <linux/list.h>
+#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>