path: root/include
diff options
authorArturo Borrero <>2014-04-14 12:17:08 +0200
committerPablo Neira Ayuso <>2014-04-25 17:45:32 +0200
commit2c666689c1b29d8c3353698224eddea5f09186a8 (patch)
tree4aba634f03b80b4608fd86e6ecdc3491766b0bc4 /include
parent275e3f55e20c82a944e3edadb26dba0fcc1f5d97 (diff)
rule: allow to print sets in plain format
Allow to print sets with or without format. This is useful in situations where we want to print more or less the same the user typed (IOW, in one single line, and with family/table info). While at it, make family2str() function public, so it can be used in other places. Signed-off-by: Arturo Borrero Gonzalez <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include')
1 files changed, 3 insertions, 0 deletions
diff --git a/include/rule.h b/include/rule.h
index ecf801fb..072cff81 100644
--- a/include/rule.h
+++ b/include/rule.h
@@ -127,6 +127,8 @@ extern void chain_add_hash(struct chain *chain, struct table *table);
extern struct chain *chain_lookup(const struct table *table,
const struct handle *h);
+extern const char *family2str(unsigned int family);
* struct rule - nftables rule
@@ -195,6 +197,7 @@ extern void set_free(struct set *set);
extern void set_add_hash(struct set *set, struct table *table);
extern struct set *set_lookup(const struct table *table, const char *name);
extern void set_print(const struct set *set);
+extern void set_print_plain(const struct set *s);
* enum cmd_ops - command operations