From 6b60dc5be58a5781cacc4e6f238454d5e8421760 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 1 Feb 2016 19:24:38 +0100 Subject: extensions: rename xt_buf to xt_xlate Use a more generic name for this object to prepare the introduction of other translation specific fields. Signed-off-by: Pablo Neira Ayuso --- extensions/libipt_realm.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'extensions/libipt_realm.c') diff --git a/extensions/libipt_realm.c b/extensions/libipt_realm.c index d0160408..7dba93fe 100644 --- a/extensions/libipt_realm.c +++ b/extensions/libipt_realm.c @@ -110,27 +110,27 @@ static void realm_save(const void *ip, const struct xt_entry_match *match) static void print_realm_xlate(unsigned long id, unsigned long mask, - int numeric, struct xt_buf *buf, uint32_t op) + int numeric, struct xt_xlate *xl, uint32_t op) { const char *name = NULL; if (mask != 0xffffffff) - xt_buf_add(buf, " and 0x%lx %s 0x%lx ", id, + xt_xlate_add(xl, " and 0x%lx %s 0x%lx ", id, op == XT_OP_EQ ? "==" : "!=", mask); else { if (numeric == 0) name = xtables_lmap_id2name(realms, id); if (name) - xt_buf_add(buf, "%s%s ", + xt_xlate_add(xl, "%s%s ", op == XT_OP_EQ ? "" : "!= ", name); else - xt_buf_add(buf, " %s0x%lx ", + xt_xlate_add(xl, " %s0x%lx ", op == XT_OP_EQ ? "" : "!= ", id); } } static int realm_xlate(const struct xt_entry_match *match, - struct xt_buf *buf, int numeric) + struct xt_xlate *xl, int numeric) { const struct xt_realm_info *ri = (const void *)match->data; enum xt_op op = XT_OP_EQ; @@ -138,8 +138,8 @@ static int realm_xlate(const struct xt_entry_match *match, if (ri->invert) op = XT_OP_NEQ; - xt_buf_add(buf, "rtclassid"); - print_realm_xlate(ri->id, ri->mask, 0, buf, op); + xt_xlate_add(xl, "rtclassid"); + print_realm_xlate(ri->id, ri->mask, 0, xl, op); return 1; } -- cgit v1.2.3