path: root/include/libnftables/rule.h
diff options
authorArturo Borrero <>2013-07-11 10:44:13 +0200
committerPablo Neira Ayuso <>2013-07-15 13:09:11 +0200
commitef23c5a37590d7b444d9d6bdfd764cf9fbd4c308 (patch)
tree35801a12918f1aa8cc474f0eba033ee12ce22f28 /include/libnftables/rule.h
parentef8f2163fa30791c7561b958773d1aa6ebfb1469 (diff)
src: add nft_*_list_is_empty() functions
This functions check if a given nft_*_list is empty or not. I found this quite useful while working with a full ruleset. Signed-off-by: Arturo Borrero Gonzalez <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include/libnftables/rule.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libnftables/rule.h b/include/libnftables/rule.h
index 186c82c..cadd14d 100644
--- a/include/libnftables/rule.h
+++ b/include/libnftables/rule.h
@@ -73,6 +73,7 @@ struct nft_rule_list;
struct nft_rule_list *nft_rule_list_alloc(void);
void nft_rule_list_free(struct nft_rule_list *list);
+int nft_rule_list_is_empty(struct nft_rule_list *list);
void nft_rule_list_add(struct nft_rule *r, struct nft_rule_list *list);
int nft_rule_list_foreach(struct nft_rule_list *rule_list, int (*cb)(struct nft_rule *t, void *data), void *data);