From: Giuseppe Longo <giuseppelng@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: [xtables-arptables PATCH 4/4] nft: make functions public
Date: Wed, 17 Jul 2013 00:31:04 +0200 [thread overview]
Message-ID: <20130716223104.13253.37312.stgit@nftables> (raw)
In-Reply-To: <20130716222925.13253.93123.stgit@nftables>
Signed-off-by: Giuseppe Longo <giuseppelng@gmail.com>
---
iptables/nft.c | 18 +++++++++---------
iptables/nft.h | 22 ++++++++++++++++++++++
2 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/iptables/nft.c b/iptables/nft.c
index 198c41e..7224273 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -53,9 +53,9 @@
static void *nft_fn;
-static int mnl_talk(struct nft_handle *h, struct nlmsghdr *nlh,
- int (*cb)(const struct nlmsghdr *nlh, void *data),
- void *data)
+int mnl_talk(struct nft_handle *h, struct nlmsghdr *nlh,
+ int (*cb)(const struct nlmsghdr *nlh, void *data),
+ void *data)
{
int ret;
char buf[MNL_SOCKET_BUFFER_SIZE];
@@ -210,7 +210,7 @@ static struct builtin_table tables[TABLES_MAX] = {
},
};
-static int
+int
nft_table_builtin_add(struct nft_handle *h, struct builtin_table *_t,
bool dormant)
{
@@ -242,7 +242,7 @@ nft_table_builtin_add(struct nft_handle *h, struct builtin_table *_t,
return ret;
}
-static struct nft_chain *
+struct nft_chain *
nft_chain_builtin_alloc(struct builtin_table *table,
struct builtin_chain *chain, int policy)
{
@@ -262,7 +262,7 @@ nft_chain_builtin_alloc(struct builtin_table *table,
return c;
}
-static void
+void
nft_chain_builtin_add(struct nft_handle *h, struct builtin_table *table,
struct builtin_chain *chain, int policy)
{
@@ -288,7 +288,7 @@ nft_chain_builtin_add(struct nft_handle *h, struct builtin_table *table,
}
/* find if built-in table already exists */
-static struct builtin_table *
+struct builtin_table *
nft_table_builtin_find(struct nft_handle *h, const char *table)
{
int i;
@@ -306,7 +306,7 @@ nft_table_builtin_find(struct nft_handle *h, const char *table)
}
/* find if built-in chain already exists */
-static struct builtin_chain *
+struct builtin_chain *
nft_chain_builtin_find(struct builtin_table *t, const char *chain)
{
int i;
@@ -343,7 +343,7 @@ __nft_chain_builtin_init(struct nft_handle *h,
}
}
-static int
+int
nft_chain_builtin_init(struct nft_handle *h, const char *table,
const char *chain, int policy)
{
diff --git a/iptables/nft.h b/iptables/nft.h
index 39ed7c0..3c52b3b 100644
--- a/iptables/nft.h
+++ b/iptables/nft.h
@@ -33,6 +33,28 @@ struct nft_handle {
struct builtin_table *tables;
};
+int mnl_talk(struct nft_handle *h, struct nlmsghdr *nlh,
+ int (*cb)(const struct nlmsghdr *nlh, void *data),
+ void *data);
+
+int nft_table_builtin_add(struct nft_handle *h, struct builtin_table *_t,
+ bool dormant);
+
+struct nft_chain *nft_chain_builtin_alloc(struct builtin_table *table,
+ struct builtin_chain *chain, int policy);
+
+void nft_chain_builtin_add(struct nft_handle *h, struct builtin_table *table,
+ struct builtin_chain *chain, int policy);
+
+struct builtin_table *nft_table_builtin_find(struct nft_handle *h,
+ const char *table);
+
+struct builtin_chain *nft_chain_builtin_find(struct builtin_table *t,
+ const char *chain);
+
+int nft_chain_builtin_init(struct nft_handle *h, const char *table,
+ const char *chain, int policy);
+
int nft_init(struct nft_handle *h);
void nft_fini(struct nft_handle *h);
next prev parent reply other threads:[~2013-07-22 14:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-16 22:30 [xtables-arptables PATCH 0/4] nft changes for xtables-arptables Giuseppe Longo
2013-07-16 22:30 ` [xtables-arptables PATCH 1/4] nft: add builtin_table pointer Giuseppe Longo
2013-07-16 22:30 ` [xtables-arptables PATCH 2/4] nft: search builtin tables via nft_handle tables pointer Giuseppe Longo
2013-07-16 22:30 ` [xtables-arptables PATCH 3/4] nft: nft_xtables_config_load() called only in nft_init() Giuseppe Longo
2013-07-22 15:35 ` Tomasz Bursztyka
2013-07-22 15:41 ` Tomasz Bursztyka
2013-07-16 22:31 ` Giuseppe Longo [this message]
2013-07-22 15:43 ` [xtables-arptables PATCH 0/4] nft changes for xtables-arptables Tomasz Bursztyka
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=20130716223104.13253.37312.stgit@nftables \
--to=giuseppelng@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.