summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ip6tables.h11
-rw-r--r--include/iptables.h11
-rw-r--r--include/iptables/internal.h.in13
-rw-r--r--include/xtables.h.in7
-rw-r--r--include/xtables/internal.h.in17
5 files changed, 21 insertions, 38 deletions
diff --git a/include/ip6tables.h b/include/ip6tables.h
index 1956cf06..86587e6f 100644
--- a/include/ip6tables.h
+++ b/include/ip6tables.h
@@ -4,16 +4,7 @@
#include <netinet/ip.h>
#include <xtables.h>
#include <libiptc/libip6tc.h>
-
-#ifndef IP6T_SO_GET_REVISION_MATCH /* Old kernel source. */
-#define IP6T_SO_GET_REVISION_MATCH 68
-#define IP6T_SO_GET_REVISION_TARGET 69
-#endif /* IP6T_SO_GET_REVISION_MATCH Old kernel source */
-
-#define ip6tables_rule_match xtables_rule_match
-#define ip6t_tryload xt_tryload
-
-extern int line;
+#include <iptables/internal.h>
/* Your shared library should call one of these. */
extern int do_command6(int argc, char *argv[], char **table,
diff --git a/include/iptables.h b/include/iptables.h
index f7ae0cc5..f0aa3455 100644
--- a/include/iptables.h
+++ b/include/iptables.h
@@ -4,16 +4,7 @@
#include <netinet/ip.h>
#include <xtables.h>
#include <libiptc/libiptc.h>
-
-#ifndef IPT_SO_GET_REVISION_MATCH /* Old kernel source. */
-#define IPT_SO_GET_REVISION_MATCH (IPT_BASE_CTL + 2)
-#define IPT_SO_GET_REVISION_TARGET (IPT_BASE_CTL + 3)
-#endif /* IPT_SO_GET_REVISION_MATCH Old kernel source */
-
-#define iptables_rule_match xtables_rule_match
-#define ipt_tryload xt_tryload
-
-extern int line;
+#include <iptables/internal.h>
/* Your shared library should call one of these. */
extern int do_command(int argc, char *argv[], char **table,
diff --git a/include/iptables/internal.h.in b/include/iptables/internal.h.in
new file mode 100644
index 00000000..8568e581
--- /dev/null
+++ b/include/iptables/internal.h.in
@@ -0,0 +1,13 @@
+#ifndef IPTABLES_INTERNAL_H
+#define IPTABLES_INTERNAL_H 1
+
+#define IPTABLES_VERSION "@PACKAGE_VERSION@"
+
+/**
+ * Program's own name and version.
+ */
+extern const char *program_name, *program_version;
+
+extern int line;
+
+#endif /* IPTABLES_INTERNAL_H */
diff --git a/include/xtables.h.in b/include/xtables.h.in
index da7ee6b9..6712aac0 100644
--- a/include/xtables.h.in
+++ b/include/xtables.h.in
@@ -269,10 +269,15 @@ extern const struct xtables_pprot xtables_chain_protos[];
extern u_int16_t xtables_parse_protocol(const char *s);
#ifdef XTABLES_INTERNAL
+
+/* Shipped modules rely on this... */
+
# ifndef ARRAY_SIZE
# define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
# endif
-# include <xtables/internal.h>
+
+extern void _init(void);
+
#endif
#endif /* _XTABLES_H */
diff --git a/include/xtables/internal.h.in b/include/xtables/internal.h.in
deleted file mode 100644
index 81ddb48a..00000000
--- a/include/xtables/internal.h.in
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef _XTABLES_INTERNAL_H
-#define _XTABLES_INTERNAL_H 1
-
-#define IPTABLES_VERSION "@PACKAGE_VERSION@"
-
-#ifndef XT_LIB_DIR
-# define XT_LIB_DIR "/usr/local/lib/iptables"
-#endif
-
-/**
- * Program's own name and version.
- */
-extern const char *program_name, *program_version;
-
-extern void _init(void);
-
-#endif /* _XTABLES_INTERNAL_H */