summaryrefslogtreecommitdiffstats
path: root/iptables
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2014-10-23 12:53:59 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2014-10-24 12:18:43 +0200
commit63f1391a5441bb092f7a1a4023e2f158ee9231a2 (patch)
tree02be4db2c7f704332234d2de07a79ab9c6d3d297 /iptables
parentb06fcdb858deefe35baaaf2f2f912616fb38644b (diff)
iptables-compat: statify unused built-in table/chain functions
The functions that allows you to create built-in table and chains are required out of the scope of nft.c Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables')
-rw-r--r--iptables/nft.c16
-rw-r--r--iptables/nft.h5
2 files changed, 8 insertions, 13 deletions
diff --git a/iptables/nft.c b/iptables/nft.c
index b68b2754..3521fad5 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -518,7 +518,7 @@ static int nft_table_builtin_add(struct nft_handle *h,
return ret;
}
-struct nft_chain *
+static struct nft_chain *
nft_chain_builtin_alloc(struct builtin_table *table,
struct builtin_chain *chain, int policy)
{
@@ -561,8 +561,9 @@ int nft_chain_add(struct nft_handle *h, struct nft_chain *c, uint16_t flags)
return mnl_talk(h, nlh, NULL, NULL);
}
-void nft_chain_builtin_add(struct nft_handle *h, struct builtin_table *table,
- struct builtin_chain *chain, int policy)
+static void nft_chain_builtin_add(struct nft_handle *h,
+ struct builtin_table *table,
+ struct builtin_chain *chain, int policy)
{
struct nft_chain *c;
@@ -577,7 +578,7 @@ void nft_chain_builtin_add(struct nft_handle *h, struct builtin_table *table,
}
/* find if built-in table already exists */
-struct builtin_table *
+static struct builtin_table *
nft_table_builtin_find(struct nft_handle *h, const char *table)
{
int i;
@@ -598,7 +599,7 @@ nft_table_builtin_find(struct nft_handle *h, const char *table)
}
/* find if built-in chain already exists */
-struct builtin_chain *
+static struct builtin_chain *
nft_chain_builtin_find(struct builtin_table *t, const char *chain)
{
int i;
@@ -643,9 +644,8 @@ __nft_chain_builtin_init(struct nft_handle *h,
nft_chain_list_free(list);
}
-int
-nft_chain_builtin_init(struct nft_handle *h, const char *table,
- const char *chain, int policy)
+static int nft_chain_builtin_init(struct nft_handle *h, const char *table,
+ const char *chain, int policy)
{
int ret = 0;
struct builtin_table *t;
diff --git a/iptables/nft.h b/iptables/nft.h
index 339d7bcd..0db2ed6c 100644
--- a/iptables/nft.h
+++ b/iptables/nft.h
@@ -54,7 +54,6 @@ void nft_fini(struct nft_handle *h);
struct nft_table;
struct nft_chain_list;
-struct builtin_table *nft_table_builtin_find(struct nft_handle *h, const char *table);
int nft_table_add(struct nft_handle *h, struct nft_table *t, uint16_t flags);
int nft_for_each_table(struct nft_handle *h, int (*func)(struct nft_handle *h, const char *tablename, bool counters), bool counters);
bool nft_table_find(struct nft_handle *h, const char *tablename);
@@ -65,10 +64,6 @@ int nft_table_purge_chains(struct nft_handle *h, const char *table, struct nft_c
*/
struct nft_chain;
-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_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_chain_add(struct nft_handle *h, struct nft_chain *c, uint16_t flags);
int nft_chain_set(struct nft_handle *h, const char *table, const char *chain, const char *policy, const struct xt_counters *counters);
struct nft_chain_list *nft_chain_dump(struct nft_handle *h);