* [libnftables PATCH] table: add nft_table_list_del function
@ 2013-08-01 12:45 Arturo Borrero Gonzalez
2013-08-07 9:44 ` Pablo Neira Ayuso
0 siblings, 1 reply; 3+ messages in thread
From: Arturo Borrero Gonzalez @ 2013-08-01 12:45 UTC (permalink / raw)
To: netfilter-devel
This patch adds the function nft_table_list_del(), that allows to delete
elements from a struct nft_table_list.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
0 files changed
diff --git a/include/libnftables/table.h b/include/libnftables/table.h
index 24ca374..a2882c2 100644
--- a/include/libnftables/table.h
+++ b/include/libnftables/table.h
@@ -59,6 +59,7 @@ int nft_table_list_foreach(struct nft_table_list *table_list, int (*cb)(struct n
void 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;
diff --git a/src/libnftables.map b/src/libnftables.map
index 614c705..012184e 100644
--- a/src/libnftables.map
+++ b/src/libnftables.map
@@ -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;
diff --git a/src/table.c b/src/table.c
index 1d17d3b..30ca0c0 100644
--- a/src/table.c
+++ b/src/table.c
@@ -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)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [libnftables PATCH] table: add nft_table_list_del function
2013-08-01 12:45 [libnftables PATCH] table: add nft_table_list_del function Arturo Borrero Gonzalez
@ 2013-08-07 9:44 ` Pablo Neira Ayuso
2013-08-07 9:55 ` Arturo Borrero Gonzalez
0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2013-08-07 9:44 UTC (permalink / raw)
To: Arturo Borrero Gonzalez; +Cc: netfilter-devel
Hi Arturo,
On Thu, Aug 01, 2013 at 02:45:46PM +0200, Arturo Borrero Gonzalez wrote:
> This patch adds the function nft_table_list_del(), that allows to delete
> elements from a struct nft_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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [libnftables PATCH] table: add nft_table_list_del function
2013-08-07 9:44 ` Pablo Neira Ayuso
@ 2013-08-07 9:55 ` Arturo Borrero Gonzalez
0 siblings, 0 replies; 3+ messages in thread
From: Arturo Borrero Gonzalez @ 2013-08-07 9:55 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: Netfilter Development Mailing list
On 7 August 2013 11:44, Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> Hi Arturo,
>
> On Thu, Aug 01, 2013 at 02:45:46PM +0200, Arturo Borrero Gonzalez wrote:
>> This patch adds the function nft_table_list_del(), that allows to delete
>> elements from a struct nft_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.
--
Arturo Borrero González
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-07 9:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-01 12:45 [libnftables PATCH] table: add nft_table_list_del function Arturo Borrero Gonzalez
2013-08-07 9:44 ` Pablo Neira Ayuso
2013-08-07 9:55 ` Arturo Borrero Gonzalez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).