From 79dd3eac447f00edbe9b4dfa9c9367e5303a8dd0 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 23 Oct 2018 18:59:07 +0200 Subject: mnl: remove alloc_nftnl_obj() We can remove alloc_nftnl_obj() and consolidate infrastructure in the src/mnl.c file. Signed-off-by: Pablo Neira Ayuso --- include/mnl.h | 7 +++---- include/netlink.h | 4 ---- 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/mnl.h b/include/mnl.h index 676030e6..457dd2ed 100644 --- a/include/mnl.h +++ b/include/mnl.h @@ -70,10 +70,9 @@ struct nftnl_obj_list *mnl_nft_obj_dump(struct netlink_ctx *ctx, int family, const char *table, const char *name, uint32_t type, bool dump, bool reset); -int mnl_nft_obj_batch_add(struct nftnl_obj *nln, struct nftnl_batch *batch, - unsigned int flags, uint32_t seqnum); -int mnl_nft_obj_batch_del(struct nftnl_obj *nln, struct nftnl_batch *batch, - unsigned int flags, uint32_t seqnum); +int mnl_nft_obj_add(struct netlink_ctx *ctx, const struct cmd *cmd, + unsigned int flags); +int mnl_nft_obj_del(struct netlink_ctx *ctx, const struct cmd *cmd, int type); struct nftnl_flowtable_list * mnl_nft_flowtable_dump(struct netlink_ctx *ctx, int family, const char *table); diff --git a/include/netlink.h b/include/netlink.h index af9313d5..b82ca727 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -131,10 +131,6 @@ extern int netlink_delinearize_setelem(struct nftnl_set_elem *nlse, extern int netlink_list_objs(struct netlink_ctx *ctx, const struct handle *h); extern int netlink_reset_objs(struct netlink_ctx *ctx, const struct cmd *cmd, uint32_t type, bool dump); -extern int netlink_add_obj(struct netlink_ctx *ctx, const struct cmd *cmd, - uint32_t flags); -extern int netlink_delete_obj(struct netlink_ctx *ctx, const struct cmd *cmd, - uint32_t type); extern struct obj *netlink_delinearize_obj(struct netlink_ctx *ctx, struct nftnl_obj *nlo); -- cgit v1.2.3