summaryrefslogtreecommitdiffstats
path: root/include/xtables.h.in
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2011-02-10 16:57:37 +0100
committerJan Engelhardt <jengelh@medozas.de>2011-04-06 12:54:22 +0200
commit3af739b0e7c3b6dcc986645c57c982d0add5006b (patch)
treecc77bbebbe47e2f6162549dc59e96513701f708b /include/xtables.h.in
parent9c5c10554c61f0b22cbc65b27b765fa8172040f7 (diff)
libxtables: provide better final_check
This passes the per-extension data block to the new x6_fcheck function pointer, which can then do last alterations without using hacks like global variables (think libxt_statistic). Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'include/xtables.h.in')
-rw-r--r--include/xtables.h.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/xtables.h.in b/include/xtables.h.in
index 928f465c..c281fed7 100644
--- a/include/xtables.h.in
+++ b/include/xtables.h.in
@@ -103,6 +103,17 @@ struct xt_option_call {
} val;
};
+/**
+ * @ext_name: name of extension currently being processed
+ * @data: per-extension data block
+ * @xflags: options of the extension that have been used
+ */
+struct xt_fcheck_call {
+ const char *ext_name;
+ void *data;
+ unsigned int xflags;
+};
+
/* Include file for additions: new matches and targets. */
struct xtables_match
{
@@ -157,6 +168,7 @@ struct xtables_match
/* New parser */
void (*x6_parse)(struct xt_option_call *);
+ void (*x6_fcheck)(struct xt_fcheck_call *);
const struct xt_option_entry *x6_options;
/* Ignore these men behind the curtain: */
@@ -220,6 +232,7 @@ struct xtables_target
/* New parser */
void (*x6_parse)(struct xt_option_call *);
+ void (*x6_fcheck)(struct xt_fcheck_call *);
const struct xt_option_entry *x6_options;
/* Ignore these men behind the curtain: */
@@ -380,6 +393,8 @@ extern void xtables_option_tpcall(unsigned int, char **, bool,
struct xtables_target *, void *);
extern void xtables_option_mpcall(unsigned int, char **, bool,
struct xtables_match *, void *);
+extern void xtables_option_tfcall(struct xtables_target *);
+extern void xtables_option_mfcall(struct xtables_match *);
extern void xtables_options_fcheck(const char *, unsigned int,
const struct xt_option_entry *);