From ef23c5a37590d7b444d9d6bdfd764cf9fbd4c308 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Thu, 11 Jul 2013 10:44:13 +0200 Subject: 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 --- include/libnftables/set.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/libnftables/set.h') diff --git a/include/libnftables/set.h b/include/libnftables/set.h index 5c77945..4a94a85 100644 --- a/include/libnftables/set.h +++ b/include/libnftables/set.h @@ -41,6 +41,7 @@ struct nft_set_list; struct nft_set_list *nft_set_list_alloc(void); void nft_set_list_free(struct nft_set_list *list); +int nft_set_list_is_empty(struct nft_set_list *list); void nft_set_list_add(struct nft_set *s, struct nft_set_list *list); int nft_set_list_foreach(struct nft_set_list *set_list, int (*cb)(struct nft_set *t, void *data), void *data); -- cgit v1.2.3