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/chain.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/libnftables/chain.h') diff --git a/include/libnftables/chain.h b/include/libnftables/chain.h index 29f7bc7..0eceda1 100644 --- a/include/libnftables/chain.h +++ b/include/libnftables/chain.h @@ -65,6 +65,7 @@ struct nft_chain_list; struct nft_chain_list *nft_chain_list_alloc(void); void nft_chain_list_free(struct nft_chain_list *list); +int nft_chain_list_is_empty(struct nft_chain_list *list); int nft_chain_list_foreach(struct nft_chain_list *chain_list, int (*cb)(struct nft_chain *t, void *data), void *data); void nft_chain_list_add(struct nft_chain *r, struct nft_chain_list *list); -- cgit v1.2.3