]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
extensions: remove unused code from compat_xtnu.h
authorJan Engelhardt <jengelh@inai.de>
Sat, 17 Jul 2021 09:34:34 +0000 (11:34 +0200)
committerJan Engelhardt <jengelh@inai.de>
Sat, 17 Jul 2021 09:34:34 +0000 (11:34 +0200)
extensions/compat_xtables.c
extensions/compat_xtables.h
extensions/compat_xtnu.h [deleted file]

index d3312d515bc60562cc7b05489c0e3a1f52dd11c8..1051204ec9aad552f1b70ad78ef2b02b6ae25f20 100644 (file)
@@ -23,7 +23,6 @@
 #include <net/route.h>
 #include <linux/export.h>
 #include "compat_skbuff.h"
-#include "compat_xtnu.h"
 #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
 #      define WITH_IPV6 1
 #endif
index a97dd104ae1415777930be87c5af0c32a7be8149..44ea7d3c9cd7d1d3a71b24f0e7ecf55719c2f739 100644 (file)
@@ -2,7 +2,6 @@
 #include <linux/kernel.h>
 #include <linux/version.h>
 #include "compat_skbuff.h"
-#include "compat_xtnu.h"
 
 #define DEBUGP Use__pr_debug__instead
 
@@ -45,3 +44,5 @@ static inline struct net *par_net(const struct xt_action_param *par)
 #      define proc_lseek llseek
 #      define proc_release release
 #endif
+
+extern void *HX_memmem(const void *, size_t, const void *, size_t);
diff --git a/extensions/compat_xtnu.h b/extensions/compat_xtnu.h
deleted file mode 100644 (file)
index a2c1e5c..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#pragma once
-#include <linux/netfilter/x_tables.h>
-
-struct module;
-struct sk_buff;
-
-struct xtnu_match {
-       /*
-        * Making it smaller by sizeof(void *) on purpose to catch
-        * lossy translation, if any.
-        */
-       char name[sizeof(((struct xt_match *)NULL)->name) - 1 - sizeof(void *)];
-       uint8_t revision;
-       bool (*match)(const struct sk_buff *, struct xt_action_param *);
-       int (*checkentry)(const struct xt_mtchk_param *);
-       void (*destroy)(const struct xt_mtdtor_param *);
-       struct module *me;
-       const char *table;
-       unsigned int matchsize, hooks;
-       unsigned short proto, family;
-
-       void *__compat_match;
-};
-
-struct xtnu_target {
-       char name[sizeof(((struct xt_target *)NULL)->name) - 1 - sizeof(void *)];
-       uint8_t revision;
-       unsigned int (*target)(struct sk_buff **,
-               const struct xt_action_param *);
-       int (*checkentry)(const struct xt_tgchk_param *);
-       void (*destroy)(const struct xt_tgdtor_param *);
-       struct module *me;
-       const char *table;
-       unsigned int targetsize, hooks;
-       unsigned short proto, family;
-
-       void *__compat_target;
-};
-
-static inline struct xtnu_match *xtcompat_numatch(const struct xt_match *m)
-{
-       void *q;
-       memcpy(&q, m->name + sizeof(m->name) - sizeof(void *), sizeof(void *));
-       return q;
-}
-
-static inline struct xtnu_target *xtcompat_nutarget(const struct xt_target *t)
-{
-       void *q;
-       memcpy(&q, t->name + sizeof(t->name) - sizeof(void *), sizeof(void *));
-       return q;
-}
-
-extern int xtnu_register_match(struct xtnu_match *);
-extern void xtnu_unregister_match(struct xtnu_match *);
-extern int xtnu_register_matches(struct xtnu_match *, unsigned int);
-extern void xtnu_unregister_matches(struct xtnu_match *, unsigned int);
-extern int xtnu_register_target(struct xtnu_target *);
-extern void xtnu_unregister_target(struct xtnu_target *);
-extern int xtnu_register_targets(struct xtnu_target *, unsigned int);
-extern void xtnu_unregister_targets(struct xtnu_target *, unsigned int);
-
-extern void *HX_memmem(const void *, size_t, const void *, size_t);