path: root/include/
diff options
authorJan Engelhardt <>2011-09-03 14:27:55 +0200
committerJan Engelhardt <>2011-09-03 14:27:55 +0200
commitf56b8a8bf4b1041cb875fd8439778f35276bdb30 (patch)
tree493341214fb88c923f3d44bb78aa13a0e860a449 /include/
parent751da923262746bf8fd3195e178504fb18c37dc5 (diff)
iptables: move kernel version find routing into libxtables
That way, the remaining unreferenced symbols that do appear in libipt_DNAT and libipt_SNAT as part of the new check can be resolved, and the ugly -rdynamic hack can finally be removed. Signed-off-by: Jan Engelhardt <>
Diffstat (limited to 'include/')
1 files changed, 8 insertions, 0 deletions
diff --git a/include/ b/include/
index d50df79a..28e29337 100644
--- a/include/
+++ b/include/
@@ -477,6 +477,14 @@ extern void xtables_save_string(const char *value);
extern const struct xtables_pprot xtables_chain_protos[];
extern u_int16_t xtables_parse_protocol(const char *s);
+/* kernel revision handling */
+extern int kernel_version;
+extern void get_kernel_version(void);
+#define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z)
+#define LINUX_VERSION_MAJOR(x) (((x)>>16) & 0xFF)
+#define LINUX_VERSION_MINOR(x) (((x)>> 8) & 0xFF)
+#define LINUX_VERSION_PATCH(x) ( (x) & 0xFF)
/* xtoptions.c */
extern void xtables_option_metavalidate(const char *,
const struct xt_option_entry *);