From: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: [libnftables PATCH] table: add nft_table_list_del function
Date: Thu, 01 Aug 2013 14:45:46 +0200 [thread overview]
Message-ID: <20130801124546.13382.18859.stgit@nfdev.cica.es> (raw)
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)
next reply other threads:[~2013-08-01 12:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-01 12:45 Arturo Borrero Gonzalez [this message]
2013-08-07 9:44 ` [libnftables PATCH] table: add nft_table_list_del function Pablo Neira Ayuso
2013-08-07 9:55 ` Arturo Borrero Gonzalez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130801124546.13382.18859.stgit@nfdev.cica.es \
--to=arturo.borrero.glez@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.