From 2c666689c1b29d8c3353698224eddea5f09186a8 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Mon, 14 Apr 2014 12:17:08 +0200 Subject: 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 --- include/rule.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') 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 -- cgit v1.2.3