summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-10-10 13:30:12 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-10-10 13:58:09 +0200
commitf354d6d24809f2ef520f6566b8f0e7095e76995d (patch)
treea65a4e52a5a8f3b9879763ab1c5c6d30bbca0069 /include
parent1494cc26fe524f25d3984b20938b51ce681cb44d (diff)
mnl: remove alloc_nftnl_rule()
We can remove alloc_nftnl_rule() and consolidate infrastructure in the src/mnl.c file. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/mnl.h11
-rw-r--r--include/netlink.h9
2 files changed, 5 insertions, 15 deletions
diff --git a/include/mnl.h b/include/mnl.h
index 96bf4b03..c5fcb4cd 100644
--- a/include/mnl.h
+++ b/include/mnl.h
@@ -26,12 +26,11 @@ void mnl_batch_reset(struct nftnl_batch *batch);
uint32_t mnl_batch_begin(struct nftnl_batch *batch, uint32_t seqnum);
void mnl_batch_end(struct nftnl_batch *batch, uint32_t seqnum);
int mnl_batch_talk(struct netlink_ctx *ctx, struct list_head *err_list);
-int mnl_nft_rule_batch_add(struct nftnl_rule *nlr, struct nftnl_batch *batch,
- unsigned int flags, uint32_t seqnum);
-int mnl_nft_rule_batch_del(struct nftnl_rule *nlr, struct nftnl_batch *batch,
- unsigned int flags, uint32_t seqnum);
-int mnl_nft_rule_batch_replace(struct nftnl_rule *nlr, struct nftnl_batch *batch,
- unsigned int flags, uint32_t seqnum);
+
+int mnl_nft_rule_add(struct netlink_ctx *ctx, const struct cmd *cmd,
+ unsigned int flags);
+int mnl_nft_rule_del(struct netlink_ctx *ctx, const struct cmd *cmd);
+int mnl_nft_rule_replace(struct netlink_ctx *ctx, const struct cmd *cmd);
struct nftnl_rule_list *mnl_nft_rule_dump(struct netlink_ctx *ctx,
int family);
diff --git a/include/netlink.h b/include/netlink.h
index 4de4a09d..36a89b9b 100644
--- a/include/netlink.h
+++ b/include/netlink.h
@@ -57,7 +57,6 @@ struct netlink_ctx {
struct nft_cache *cache;
};
-extern struct nftnl_rule *alloc_nftnl_rule(const struct handle *h);
extern struct nftnl_expr *alloc_nft_expr(const char *name);
extern struct nftnl_set *alloc_nftnl_set(const struct handle *h);
@@ -108,14 +107,6 @@ extern void netlink_linearize_rule(struct netlink_ctx *ctx,
extern struct rule *netlink_delinearize_rule(struct netlink_ctx *ctx,
struct nftnl_rule *r);
-extern int netlink_add_rule_batch(struct netlink_ctx *ctx,
- const struct cmd *cmd,
- uint32_t flags);
-extern int netlink_del_rule_batch(struct netlink_ctx *ctx,
- const struct cmd *cmd);
-extern int netlink_replace_rule_batch(struct netlink_ctx *ctx,
- const struct cmd *cmd);
-
extern int netlink_list_chains(struct netlink_ctx *ctx, const struct handle *h);
extern int netlink_flush_chain(struct netlink_ctx *ctx, const struct cmd *cmd);
extern struct chain *netlink_delinearize_chain(struct netlink_ctx *ctx,