Sfoglia il codice sorgente

More Linux Kernel Detections

Valeska 10 anni fa
parent
commit
ea6f5248d4
1 ha cambiato i file con 38 aggiunte e 2 eliminazioni
  1. 38
    2
      src/mark.h

+ 38
- 2
src/mark.h Vedi File

@@ -1,6 +1,42 @@
1 1
 #ifndef MARK_H
2 2
 #define MARK_H
3 3
 
4
+#include <linux/version.h>
5
+
6
+//original inclusions
7
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 7, 0)
8
+#if 0
9
+  #include "libiptc/libiptc.h"
10
+ #include <linux/netfilter_ipv4/ip_conntrack.h>
11
+ #include <linux/netfilter_ipv4/ip_conntrack_tuple.h>
12
+ #include "libiptc/ipt_conntrack.h"
13
+ #include "libiptc/ipt_connmark.h"
14
+ #include "libiptc/ipt_CONNMARK.h"
15
+ #endif
16
+
17
+ #if 1
18
+ #include "libiptc/libiptc.h"
19
+ #if 1
20
+  #include <linux/netfilter/nf_conntrack_common.h>
21
+ #endif
22
+ #if 0
23
+ #include <linux/netfilter_ipv4/ipt_conntrack_tuple.h>
24
+ #endif
25
+#include "libiptc/ipt_conntrack.h"
26
+#include "libiptc/ipt_connmark.h"
27
+#include "libiptc/ipt_CONNMARK.h"
28
+ #endif
29
+
30
+ /* 2010 fixes for debian package */
31
+ #if 0
32
+ #include "libiptc/libiptc.h"
33
+ #include <linux/netfilter/nf_conntrack_common.h>
34
+ #include <linux/netfilter_ipv4/ipt_conntrack.h>
35
+ #include <linux/netfilter_ipv4/ipt_connmark.h>
36
+ #include <linux/netfilter_ipv4/ipt_CONNMARK.h>
37
+ #endif
38
+#endif
39
+
4 40
 #include "libiptc/libiptc.h"
5 41
 #include <linux/netfilter/nf_conntrack_common.h>
6 42
 #include "libiptc/ipt_conntrack.h"
@@ -32,13 +68,13 @@
32 68
 #define MATCH_SZ		IPT_ENTRY_MATCH_SZ+IPT_CT_INFO_SZ
33 69
 #define TARGET_SZ		IPT_ENTRY_TARGET_SZ+IPT_CM_TARGET_INFO_SZ
34 70
 
35
-#define RESTORE_OUTPUT_RULE_SZ	IPT_ENTRY_SZ+MATCH_SZ+TARGET_SZ	
71
+#define RESTORE_OUTPUT_RULE_SZ	IPT_ENTRY_SZ+MATCH_SZ+TARGET_SZ
36 72
 
37 73
 #define OFFSET_MATCH		IPT_ENTRY_SZ
38 74
 #define OFFSET_MATCH_INFO	OFFSET_MATCH+IPT_ENTRY_MATCH_SZ
39 75
 #define OFFSET_TARGET		OFFSET_MATCH_INFO+IPT_CT_INFO_SZ
40 76
 #define OFFSET_TARGET_INFO	OFFSET_TARGET+IPT_ENTRY_TARGET_SZ
41
-		
77
+
42 78
 #define MARK_RULE_SZ		IPT_ENTRY_SZ+TARGET_SZ
43 79
 #define MAX_MARK_RULES		100
44 80
 

Loading…
Annulla
Salva