diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-07-24 12:45:53 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-07-25 17:24:55 +0200 |
commit | 7a0992da44cfb6cab0ccd1beadcf326df8773552 (patch) | |
tree | 121e927b4171f4aacfafc268fb4104ab90b4ea2a /include | |
parent | d89e5c0c84778a4effa40f69dbd3a68d0ec284fc (diff) |
src: introduce struct xt_xlate_{mt,tg}_params
This structure is an extensible containers of parameters, so we don't
need to propagate interface updates in every extension file in case
we need to add new parameters in the future.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/xtables.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/include/xtables.h b/include/xtables.h index 48be5140..9701612a 100644 --- a/include/xtables.h +++ b/include/xtables.h @@ -207,6 +207,18 @@ enum xtables_ext_flags { struct xt_xlate; +struct xt_xlate_mt_params { + const void *ip; + const struct xt_entry_match *match; + int numeric; +}; + +struct xt_xlate_tg_params { + const void *ip; + const struct xt_entry_target *target; + int numeric; +}; + /* Include file for additions: new matches and targets. */ struct xtables_match { @@ -272,8 +284,8 @@ struct xtables_match const struct xt_option_entry *x6_options; /* Translate iptables to nft */ - int (*xlate)(const void *ip, const struct xt_entry_match *match, - struct xt_xlate *xl, int numeric); + int (*xlate)(struct xt_xlate *xl, + const struct xt_xlate_mt_params *params); /* Size of per-extension instance extra "global" scratch space */ size_t udata_size; @@ -353,8 +365,8 @@ struct xtables_target const struct xt_option_entry *x6_options; /* Translate iptables to nft */ - int (*xlate)(const void *ip, const struct xt_entry_target *target, - struct xt_xlate *xl, int numeric); + int (*xlate)(struct xt_xlate *xl, + const struct xt_xlate_tg_params *params); size_t udata_size; |