From d6ed28a3b3d96965dcf67656e8321f8835c0aa05 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 10 Oct 2018 14:17:44 +0200 Subject: mnl: remove alloc_nftnl_set() We can remove alloc_nftnl_set() and consolidate infrastructure in the src/mnl.c file. Signed-off-by: Pablo Neira Ayuso --- include/mnl.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'include/mnl.h') diff --git a/include/mnl.h b/include/mnl.h index c5fcb4cd..3ddc82a0 100644 --- a/include/mnl.h +++ b/include/mnl.h @@ -51,19 +51,17 @@ int mnl_nft_table_del(struct netlink_ctx *ctx, const struct cmd *cmd); struct nftnl_table_list *mnl_nft_table_dump(struct netlink_ctx *ctx, int family); -int mnl_nft_set_batch_add(struct nftnl_set *nls, struct nftnl_batch *batch, - unsigned int flags, uint32_t seqnum); -int mnl_nft_set_batch_del(struct nftnl_set *nls, struct nftnl_batch *batch, - unsigned int flags, uint32_t seqnum); +int mnl_nft_set_add(struct netlink_ctx *ctx, const struct cmd *cmd, + unsigned int flags); +int mnl_nft_set_del(struct netlink_ctx *ctx, const struct cmd *cmd); + struct nftnl_set_list *mnl_nft_set_dump(struct netlink_ctx *ctx, int family, const char *table); -int mnl_nft_setelem_batch_add(struct nftnl_set *nls, struct nftnl_batch *batch, - unsigned int flags, uint32_t seqnum); -int mnl_nft_setelem_batch_del(struct nftnl_set *nls, struct nftnl_batch *batch, - unsigned int flags, uint32_t seqnum); -int mnl_nft_setelem_batch_flush(struct nftnl_set *nls, struct nftnl_batch *batch, - unsigned int flags, uint32_t seqnum); +int mnl_nft_setelem_add(struct netlink_ctx *ctx, const struct set *set, + const struct expr *expr, unsigned int flags); +int mnl_nft_setelem_del(struct netlink_ctx *ctx, const struct cmd *cmd); +int mnl_nft_setelem_flush(struct netlink_ctx *ctx, const struct cmd *cmd); int mnl_nft_setelem_get(struct netlink_ctx *ctx, struct nftnl_set *nls); struct nftnl_set *mnl_nft_setelem_get_one(struct netlink_ctx *ctx, struct nftnl_set *nls); -- cgit v1.2.3