diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-02-01 19:24:38 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-02-16 19:30:25 +0100 |
commit | 6b60dc5be58a5781cacc4e6f238454d5e8421760 (patch) | |
tree | be23e91f26e5295c12cd69ee5091454345cfaa6b /extensions/libxt_limit.c | |
parent | ca9a1a6a9f64ee5d94038abb451b27cc9581c81b (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_limit.c')
-rw-r--r-- | extensions/libxt_limit.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/extensions/libxt_limit.c b/extensions/libxt_limit.c index a018f87b..9ad00c14 100644 --- a/extensions/libxt_limit.c +++ b/extensions/libxt_limit.c @@ -159,12 +159,12 @@ static const struct rates rates_xlate[] = { { "second", XT_LIMIT_SCALE } }; -static void print_rate_xlate(uint32_t period, struct xt_buf *buf) +static void print_rate_xlate(uint32_t period, struct xt_xlate *xl) { unsigned int i; if (period == 0) { - xt_buf_add(buf, " %f ", INFINITY); + xt_xlate_add(xl, " %f ", INFINITY); return; } @@ -173,19 +173,19 @@ static void print_rate_xlate(uint32_t period, struct xt_buf *buf) rates_xlate[i].mult / period < rates_xlate[i].mult % period) break; - xt_buf_add(buf, " %u/%s ", rates_xlate[i - 1].mult / period, + xt_xlate_add(xl, " %u/%s ", rates_xlate[i - 1].mult / period, rates_xlate[i - 1].name); } static int limit_xlate(const struct xt_entry_match *match, - struct xt_buf *buf, int numeric) + struct xt_xlate *xl, int numeric) { const struct xt_rateinfo *r = (const void *)match->data; - xt_buf_add(buf, "limit rate"); - print_rate_xlate(r->avg, buf); + xt_xlate_add(xl, "limit rate"); + print_rate_xlate(r->avg, xl); if (r->burst != XT_LIMIT_BURST) - xt_buf_add(buf, "burst %u packets ", r->burst); + xt_xlate_add(xl, "burst %u packets ", r->burst); return 1; } |