summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_mac.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-02-01 19:24:38 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-02-16 19:30:25 +0100
commit6b60dc5be58a5781cacc4e6f238454d5e8421760 (patch)
treebe23e91f26e5295c12cd69ee5091454345cfaa6b /extensions/libxt_mac.c
parentca9a1a6a9f64ee5d94038abb451b27cc9581c81b (diff)
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 <pablo@netfilter.org>
Diffstat (limited to 'extensions/libxt_mac.c')
-rw-r--r--extensions/libxt_mac.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/extensions/libxt_mac.c b/extensions/libxt_mac.c
index d7303440..85ed1b5b 100644
--- a/extensions/libxt_mac.c
+++ b/extensions/libxt_mac.c
@@ -71,23 +71,23 @@ static void mac_save(const void *ip, const struct xt_entry_match *match)
}
static void print_mac_xlate(const unsigned char *macaddress,
- struct xt_buf *buf)
+ struct xt_xlate *xl)
{
unsigned int i;
- xt_buf_add(buf, "%02x", macaddress[0]);
+ xt_xlate_add(xl, "%02x", macaddress[0]);
for (i = 1; i < ETH_ALEN; ++i)
- xt_buf_add(buf, ":%02x", macaddress[i]);
- xt_buf_add(buf, " ");
+ xt_xlate_add(xl, ":%02x", macaddress[i]);
+ xt_xlate_add(xl, " ");
}
static int mac_xlate(const struct xt_entry_match *match,
- struct xt_buf *buf, int numeric)
+ struct xt_xlate *xl, int numeric)
{
const struct xt_mac_info *info = (void *)match->data;
- xt_buf_add(buf, "ether saddr%s ", info->invert ? " !=" : "");
- print_mac_xlate(info->srcaddr, buf);
+ xt_xlate_add(xl, "ether saddr%s ", info->invert ? " !=" : "");
+ print_mac_xlate(info->srcaddr, xl);
return 1;
}