table: add nft_table_list_del function
PATCH 1/1 table: add nft_table_list_del function
This patch adds the function nft_table_list_del(), that allows to delete elements from a struct nft_table_list.
---
0 files changed
include/libnftables/table.h +1 -0
@@ -59,6 +59,7 @@ int nft_table_list_foreach(struct nft_table_list *table_list, int (*cb)(struct nvoid nft_table_list_add (struct nft_table *r,struct nft_table_list *list);void nft_table_list_add_tail (struct nft_table *r,struct nft_table_list *list); +void nft_table_list_del (struct nft_table *t);struct nft_table_list_iter ;
src/libnftables.map +1 -0
@@ -21,6 +21,7 @@ global: nft_table_list_foreach; nft_table_list_add; nft_table_list_add_tail; + nft_table_list_del; nft_table_list_iter_create; nft_table_list_iter_next; nft_table_list_iter_destroy;
src/table.c +6 -0
@@ -486,6 +486,12 @@ void nft_table_list_add_tail(struct nft_table *r, struct nft_table_list *list) }EXPORT_SYMBOL (nft_table_list_add_tail); +void nft_table_list_del (struct nft_table *t) +{ +list_del (&t->head); +} +EXPORT_SYMBOL (nft_table_list_del); +int nft_table_list_foreach (struct nft_table_list *table_list,int (*cb)(struct nft_table *t,void *data),void *data)
Pablo Neira Ayuso
maintainerHi Arturo,
Quoted 2 lines · Arturo Borrero Gonzalez
This patch adds the function
nft_table_list_del(), that allows to delete elements from a structnft_table_list.
Do you need this? Otherwise, you know that I'm reticent to add new interfaces that we don't need at this moment.
If you indeed need it, please add it to other objects as well. Thanks.
Quoted 10 lines · Pablo Neira Ayuso
Hi Arturo,
Quoted 2 lines · Arturo Borrero Gonzalez
This patch adds the function
nft_table_list_del(), that allows to delete elements from a structnft_table_list.Do you need this? Otherwise, you know that I'm reticent to add new interfaces that we don't need at this moment.
If you indeed need it, please add it to other objects as well. Thanks.
Yes, I'm using this in an incoming example for libnftables.
Signature · 5 lines
Arturo Borrero González -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html