struct nftnl_expr;
struct rule_pp_ctx;
struct rule;
+struct output_ctx;
#ifdef HAVE_LIBXTABLES
-void xt_stmt_xlate(const struct stmt *stmt);
+void xt_stmt_xlate(const struct stmt *stmt, struct output_ctx *octx);
void xt_stmt_release(const struct stmt *stmt);
void netlink_parse_target(struct netlink_parse_ctx *ctx,
void stmt_xt_postprocess(struct rule_pp_ctx *rctx, struct stmt *stmt,
struct rule *rule);
#else
-static inline void xt_stmt_xlate(const struct stmt *stmt) {}
+static inline void xt_stmt_xlate(const struct stmt *stmt, struct output_ctx *octx) {}
static inline void xt_stmt_release(const struct stmt *stmt) {}
#include <erec.h>
static void xt_stmt_print(const struct stmt *stmt, struct output_ctx *octx)
{
- xt_stmt_xlate(stmt);
+ xt_stmt_xlate(stmt, octx);
}
static void xt_stmt_destroy(struct stmt *stmt)
#include <linux/netfilter_arp/arp_tables.h>
#include <linux/netfilter_bridge/ebtables.h>
-void xt_stmt_xlate(const struct stmt *stmt)
+void xt_stmt_xlate(const struct stmt *stmt, struct output_ctx *octx)
{
struct xt_xlate *xl = xt_xlate_alloc(10240);
};
stmt->xt.match->xlate(xl, ¶ms);
- printf("%s", xt_xlate_get(xl));
+ nft_print(octx, "%s", xt_xlate_get(xl));
} else if (stmt->xt.match->print) {
printf("#");
stmt->xt.match->print(&stmt->xt.entry,
};
stmt->xt.target->xlate(xl, ¶ms);
- printf("%s", xt_xlate_get(xl));
+ nft_print(octx, "%s", xt_xlate_get(xl));
} else if (stmt->xt.target->print) {
printf("#");
stmt->xt.target->print(NULL, stmt->xt.target->t, 0);