diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-10-10 14:17:44 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-10-10 15:06:41 +0200 |
commit | d6ed28a3b3d96965dcf67656e8321f8835c0aa05 (patch) | |
tree | 292efdd1020b2faba5fbc65b6bdcd95505a507c4 /include/mnl.h | |
parent | f354d6d24809f2ef520f6566b8f0e7095e76995d (diff) |
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 <pablo@netfilter.org>
Diffstat (limited to 'include/mnl.h')
-rw-r--r-- | include/mnl.h | 18 |
1 files changed, 8 insertions, 10 deletions
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); |