From 7a0992da44cfb6cab0ccd1beadcf326df8773552 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 24 Jul 2016 12:45:53 +0200 Subject: 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 --- extensions/libxt_TEE.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'extensions/libxt_TEE.c') diff --git a/extensions/libxt_TEE.c b/extensions/libxt_TEE.c index 5044a34c..4676e33b 100644 --- a/extensions/libxt_TEE.c +++ b/extensions/libxt_TEE.c @@ -92,13 +92,12 @@ static void tee_tg6_save(const void *ip, const struct xt_entry_target *target) printf(" --oif %s", info->oif); } -static int tee_tg_xlate(const void *ip, const struct xt_entry_target *target, - struct xt_xlate *xl, int numeric) +static int tee_tg_xlate(struct xt_xlate *xl, + const struct xt_xlate_tg_params *params) { - const struct xt_tee_tginfo *info = - (const void *)target->data; + const struct xt_tee_tginfo *info = (const void *)params->target->data; - if (numeric) + if (params->numeric) xt_xlate_add(xl, "dup to %s", xtables_ipaddr_to_numeric(&info->gw.in)); else @@ -110,12 +109,12 @@ static int tee_tg_xlate(const void *ip, const struct xt_entry_target *target, return 1; } -static int tee_tg6_xlate(const void *ip, const struct xt_entry_target *target, - struct xt_xlate *xl, int numeric) +static int tee_tg6_xlate(struct xt_xlate *xl, + const struct xt_xlate_tg_params *params) { - const struct xt_tee_tginfo *info = (const void *)target->data; + const struct xt_tee_tginfo *info = (const void *)params->target->data; - if (numeric) + if (params->numeric) xt_xlate_add(xl, "dup to %s", xtables_ip6addr_to_numeric(&info->gw.in6)); else -- cgit v1.2.3