]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libiptc: combine common types
authorJan Engelhardt <jengelh@medozas.de>
Sat, 27 Aug 2011 09:12:49 +0000 (11:12 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Sun, 11 Sep 2011 15:31:34 +0000 (17:31 +0200)
Make an xt_chainlabel type out of ipt_chainlabel and ip6t_chainlabel,
and add backward-API #defines. The ABI naturally does not change
either, so no soversion bump.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
include/Makefile.am
include/libiptc/libip6tc.h
include/libiptc/libiptc.h
include/libiptc/xtcshared.h [new file with mode: 0644]

index 0a1abea433b4b7b68f97a9708ea06666082faa5e..6f7da5984fe656575451c029834405956df7c2b2 100644 (file)
@@ -9,4 +9,4 @@ endif
 
 nobase_include_HEADERS += \
        libiptc/ipt_kernel_headers.h libiptc/libiptc.h \
-       libiptc/libip6tc.h libiptc/libxtc.h
+       libiptc/libip6tc.h libiptc/libxtc.h libiptc/xtcshared.h
index 4f2d1f878955e13cb0e296846d9082a89656d067..55e0bfc9972b6ac8412425a180f48c706f8e1222 100644 (file)
 #      include <limits.h> /* INT_MAX in ip6_tables.h */
 #endif
 #include <linux/netfilter_ipv6/ip6_tables.h>
+#include <libiptc/xtcshared.h>
 
 struct ip6tc_handle;
 
-typedef char ip6t_chainlabel[32];
+#define ip6t_chainlabel xt_chainlabel
 
 #define IP6TC_LABEL_ACCEPT "ACCEPT"
 #define IP6TC_LABEL_DROP "DROP"
index 3497d6aedc4eb8daa3611fb9b99ec870e8aed985..ccbf6bfffc29bfd68c84b8919f0d9fd547a16478 100644 (file)
@@ -10,6 +10,7 @@
 #      include <limits.h> /* INT_MAX in ip_tables.h */
 #endif
 #include <linux/netfilter_ipv4/ip_tables.h>
+#include <libiptc/xtcshared.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -17,7 +18,7 @@ extern "C" {
 
 struct iptc_handle;
 
-typedef char ipt_chainlabel[32];
+#define ipt_chainlabel xt_chainlabel
 
 #define IPTC_LABEL_ACCEPT  "ACCEPT"
 #define IPTC_LABEL_DROP    "DROP"
diff --git a/include/libiptc/xtcshared.h b/include/libiptc/xtcshared.h
new file mode 100644 (file)
index 0000000..aaf87a4
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _LIBXTC_SHARED_H
+#define _LIBXTC_SHARED_H 1
+
+typedef char xt_chainlabel[32];
+
+#endif /* _LIBXTC_SHARED_H */