"Fossies" - the Fresh Open Source Software Archive 
Member "xtables-addons-3.13/extensions/compat_xtables.h" (20 Nov 2020, 1605 Bytes) of package /linux/privat/xtables-addons-3.13.tar.xz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "compat_xtables.h" see the
Fossies "Dox" file reference documentation and the latest
Fossies "Diffs" side-by-side code changes report:
3.12_vs_3.13.
1 #ifndef _XTABLES_COMPAT_H
2 #define _XTABLES_COMPAT_H 1
3
4 #include <linux/kernel.h>
5 #include <linux/version.h>
6 #include "compat_skbuff.h"
7 #include "compat_xtnu.h"
8
9 #define DEBUGP Use__pr_debug__instead
10
11 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
12 # warning Kernels below 4.15 not supported.
13 #endif
14
15 #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
16 # if !defined(CONFIG_NF_CONNTRACK_MARK)
17 # warning You have CONFIG_NF_CONNTRACK enabled, but CONFIG_NF_CONNTRACK_MARK is not (please enable).
18 # endif
19 # include <net/netfilter/nf_conntrack.h>
20 #else
21 # warning You need CONFIG_NF_CONNTRACK.
22 #endif
23
24 #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0) || \
25 LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 9) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0) || \
26 LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 78) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0) || \
27 LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 158) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0)
28 #else
29 # define ip_route_me_harder(xnet, xsk, xskb, xaddrtype) ip_route_me_harder((xnet), (xskb), (xaddrtype))
30 # define ip6_route_me_harder(xnet, xsk, xskb) ip6_route_me_harder((xnet), (xskb))
31 #endif
32
33 static inline struct net *par_net(const struct xt_action_param *par)
34 {
35 return par->state->net;
36 }
37
38 #ifndef NF_CT_ASSERT
39 # define NF_CT_ASSERT(x) WARN_ON(!(x))
40 #endif
41
42 #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
43 # define proc_ops file_operations
44 # define proc_open open
45 # define proc_read read
46 # define proc_write write
47 # define proc_lseek llseek
48 # define proc_release release
49 #endif
50
51 #endif /* _XTABLES_COMPAT_H */