From f354d6d24809f2ef520f6566b8f0e7095e76995d Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 10 Oct 2018 13:30:12 +0200 Subject: 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 --- include/mnl.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'include/mnl.h') 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); -- cgit v1.2.3