From b6601f3a4f65d0956dd829b63c503875b10d5c74 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 10 Feb 2009 10:25:08 +0100 Subject: libxtables: remove unused XT_LIB_DIR macro Signed-off-by: Jan Engelhardt --- include/xtables/internal.h.in | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/xtables/internal.h.in b/include/xtables/internal.h.in index 81ddb48a..5e34694a 100644 --- a/include/xtables/internal.h.in +++ b/include/xtables/internal.h.in @@ -3,10 +3,6 @@ #define IPTABLES_VERSION "@PACKAGE_VERSION@" -#ifndef XT_LIB_DIR -# define XT_LIB_DIR "/usr/local/lib/iptables" -#endif - /** * Program's own name and version. */ -- cgit v1.2.3 From c02e80878979d2205f3d89d05548397871e598e9 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 10 Feb 2009 10:40:15 +0100 Subject: libxtables: decouple non-xtables parts from header Signed-off-by: Jan Engelhardt --- include/ip6tables.h | 1 + include/iptables.h | 1 + include/iptables/internal.h.in | 11 +++++++++++ include/xtables.h.in | 7 ++++++- include/xtables/internal.h.in | 13 ------------- 5 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 include/iptables/internal.h.in delete mode 100644 include/xtables/internal.h.in (limited to 'include') diff --git a/include/ip6tables.h b/include/ip6tables.h index 1956cf06..663da9ca 100644 --- a/include/ip6tables.h +++ b/include/ip6tables.h @@ -4,6 +4,7 @@ #include #include #include +#include #ifndef IP6T_SO_GET_REVISION_MATCH /* Old kernel source. */ #define IP6T_SO_GET_REVISION_MATCH 68 diff --git a/include/iptables.h b/include/iptables.h index f7ae0cc5..ee769a58 100644 --- a/include/iptables.h +++ b/include/iptables.h @@ -4,6 +4,7 @@ #include #include #include +#include #ifndef IPT_SO_GET_REVISION_MATCH /* Old kernel source. */ #define IPT_SO_GET_REVISION_MATCH (IPT_BASE_CTL + 2) diff --git a/include/iptables/internal.h.in b/include/iptables/internal.h.in new file mode 100644 index 00000000..849e1722 --- /dev/null +++ b/include/iptables/internal.h.in @@ -0,0 +1,11 @@ +#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; + +#endif /* IPTABLES_INTERNAL_H */ diff --git a/include/xtables.h.in b/include/xtables.h.in index 02750fb9..1455e9cd 100644 --- a/include/xtables.h.in +++ b/include/xtables.h.in @@ -258,10 +258,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 + +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 5e34694a..00000000 --- a/include/xtables/internal.h.in +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _XTABLES_INTERNAL_H -#define _XTABLES_INTERNAL_H 1 - -#define IPTABLES_VERSION "@PACKAGE_VERSION@" - -/** - * Program's own name and version. - */ -extern const char *program_name, *program_version; - -extern void _init(void); - -#endif /* _XTABLES_INTERNAL_H */ -- cgit v1.2.3 From 395e441e20ea9ab7f37122bcfd76fec527fa447b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 10 Feb 2009 10:43:08 +0100 Subject: src: remove iptables_rule_match indirection macro Signed-off-by: Jan Engelhardt --- include/ip6tables.h | 1 - include/iptables.h | 1 - 2 files changed, 2 deletions(-) (limited to 'include') diff --git a/include/ip6tables.h b/include/ip6tables.h index 663da9ca..52e290c7 100644 --- a/include/ip6tables.h +++ b/include/ip6tables.h @@ -11,7 +11,6 @@ #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; diff --git a/include/iptables.h b/include/iptables.h index ee769a58..74b244ed 100644 --- a/include/iptables.h +++ b/include/iptables.h @@ -11,7 +11,6 @@ #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; -- cgit v1.2.3 From ea955480a8ae43aa956ac62e1aab3f9670529819 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 10 Feb 2009 10:43:42 +0100 Subject: src: remove unused ipt_tryload macro Signed-off-by: Jan Engelhardt --- include/ip6tables.h | 2 -- include/iptables.h | 2 -- 2 files changed, 4 deletions(-) (limited to 'include') diff --git a/include/ip6tables.h b/include/ip6tables.h index 52e290c7..b8478d40 100644 --- a/include/ip6tables.h +++ b/include/ip6tables.h @@ -11,8 +11,6 @@ #define IP6T_SO_GET_REVISION_TARGET 69 #endif /* IP6T_SO_GET_REVISION_MATCH Old kernel source */ -#define ip6t_tryload xt_tryload - extern int line; /* Your shared library should call one of these. */ diff --git a/include/iptables.h b/include/iptables.h index 74b244ed..963905aa 100644 --- a/include/iptables.h +++ b/include/iptables.h @@ -11,8 +11,6 @@ #define IPT_SO_GET_REVISION_TARGET (IPT_BASE_CTL + 3) #endif /* IPT_SO_GET_REVISION_MATCH Old kernel source */ -#define ipt_tryload xt_tryload - extern int line; /* Your shared library should call one of these. */ -- cgit v1.2.3 From c31870f9bebb3d4d082016fcfaf8c2177ae32eb2 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 10 Feb 2009 10:48:28 +0100 Subject: libxtables: move compat defines to xtables.c Addendum to commit v1.4.3-rc1-41-g77f48c2 where the macro users got moved. Signed-off-by: Jan Engelhardt --- include/ip6tables.h | 5 ----- include/iptables.h | 5 ----- 2 files changed, 10 deletions(-) (limited to 'include') diff --git a/include/ip6tables.h b/include/ip6tables.h index b8478d40..98f2da5c 100644 --- a/include/ip6tables.h +++ b/include/ip6tables.h @@ -6,11 +6,6 @@ #include #include -#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 */ - extern int line; /* Your shared library should call one of these. */ diff --git a/include/iptables.h b/include/iptables.h index 963905aa..d309059e 100644 --- a/include/iptables.h +++ b/include/iptables.h @@ -6,11 +6,6 @@ #include #include -#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 */ - extern int line; /* Your shared library should call one of these. */ -- cgit v1.2.3 From 47a6fd9ec9891a8040eb8fd6db3c5012c1056061 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 10 Feb 2009 10:51:25 +0100 Subject: src: consolidate duplicate code in iptables/internal.h Signed-off-by: Jan Engelhardt --- include/ip6tables.h | 2 -- include/iptables.h | 2 -- include/iptables/internal.h.in | 2 ++ 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/ip6tables.h b/include/ip6tables.h index 98f2da5c..86587e6f 100644 --- a/include/ip6tables.h +++ b/include/ip6tables.h @@ -6,8 +6,6 @@ #include #include -extern int line; - /* Your shared library should call one of these. */ extern int do_command6(int argc, char *argv[], char **table, struct ip6tc_handle **handle); diff --git a/include/iptables.h b/include/iptables.h index d309059e..f0aa3455 100644 --- a/include/iptables.h +++ b/include/iptables.h @@ -6,8 +6,6 @@ #include #include -extern int line; - /* Your shared library should call one of these. */ extern int do_command(int argc, char *argv[], char **table, struct iptc_handle **handle); diff --git a/include/iptables/internal.h.in b/include/iptables/internal.h.in index 849e1722..8568e581 100644 --- a/include/iptables/internal.h.in +++ b/include/iptables/internal.h.in @@ -8,4 +8,6 @@ */ extern const char *program_name, *program_version; +extern int line; + #endif /* IPTABLES_INTERNAL_H */ -- cgit v1.2.3