summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_conntrack.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_conntrack.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_conntrack.c')
-rw-r--r--extensions/libxt_conntrack.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/extensions/libxt_conntrack.c b/extensions/libxt_conntrack.c
index 4c5b6e91..7f66895d 100644
--- a/extensions/libxt_conntrack.c
+++ b/extensions/libxt_conntrack.c
@@ -1156,41 +1156,41 @@ static void state_save(const void *ip, const struct xt_entry_match *match)
state_print_state(sinfo->statemask);
}
-static void state_xlate_print(struct xt_buf *buf, unsigned int statemask)
+static void state_xlate_print(struct xt_xlate *xl, unsigned int statemask)
{
const char *sep = "";
if (statemask & XT_CONNTRACK_STATE_INVALID) {
- xt_buf_add(buf, "%s%s", sep, "invalid");
+ xt_xlate_add(xl, "%s%s", sep, "invalid");
sep = ",";
}
if (statemask & XT_CONNTRACK_STATE_BIT(IP_CT_NEW)) {
- xt_buf_add(buf, "%s%s", sep, "new");
+ xt_xlate_add(xl, "%s%s", sep, "new");
sep = ",";
}
if (statemask & XT_CONNTRACK_STATE_BIT(IP_CT_RELATED)) {
- xt_buf_add(buf, "%s%s", sep, "related");
+ xt_xlate_add(xl, "%s%s", sep, "related");
sep = ",";
}
if (statemask & XT_CONNTRACK_STATE_BIT(IP_CT_ESTABLISHED)) {
- xt_buf_add(buf, "%s%s", sep, "established");
+ xt_xlate_add(xl, "%s%s", sep, "established");
sep = ",";
}
if (statemask & XT_CONNTRACK_STATE_UNTRACKED) {
- xt_buf_add(buf, "%s%s", sep, "untracked");
+ xt_xlate_add(xl, "%s%s", sep, "untracked");
sep = ",";
}
}
-static int state_xlate(const struct xt_entry_match *match, struct xt_buf *buf,
+static int state_xlate(const struct xt_entry_match *match, struct xt_xlate *xl,
int numeric)
{
const struct xt_conntrack_mtinfo3 *sinfo = (const void *)match->data;
- xt_buf_add(buf, "ct state %s", sinfo->invert_flags & XT_CONNTRACK_STATE ?
+ xt_xlate_add(xl, "ct state %s", sinfo->invert_flags & XT_CONNTRACK_STATE ?
"!= " : "");
- state_xlate_print(buf, sinfo->state_mask);
- xt_buf_add(buf, " ");
+ state_xlate_print(xl, sinfo->state_mask);
+ xt_xlate_add(xl, " ");
return 1;
}