From c5c6bf14aa53bd16e66fcd281374faa66b3293f8 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 9 Aug 2017 13:16:41 +0200 Subject: netlink: Pass nlmsg flags from rule.c There is no point in checking value of excl in each called function. Just do it in a single spot and pass resulting flags. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- include/netlink.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/netlink.h b/include/netlink.h index 7865186b..ffbc51d3 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -124,7 +124,7 @@ extern int netlink_replace_rule_batch(struct netlink_ctx *ctx, extern int netlink_add_chain(struct netlink_ctx *ctx, const struct handle *h, const struct location *loc, - const struct chain *chain, bool excl); + const struct chain *chain, uint32_t flags); extern int netlink_rename_chain(struct netlink_ctx *ctx, const struct handle *h, const struct location *loc, const char *name); extern int netlink_delete_chain(struct netlink_ctx *ctx, const struct handle *h, @@ -140,7 +140,7 @@ extern int netlink_flush_chain(struct netlink_ctx *ctx, const struct handle *h, extern int netlink_add_table(struct netlink_ctx *ctx, const struct handle *h, const struct location *loc, - const struct table *table, bool excl); + const struct table *table, uint32_t flags); extern int netlink_delete_table(struct netlink_ctx *ctx, const struct handle *h, const struct location *loc); extern int netlink_list_tables(struct netlink_ctx *ctx, const struct handle *h, @@ -153,7 +153,7 @@ extern int netlink_flush_table(struct netlink_ctx *ctx, const struct handle *h, const struct location *loc); extern int netlink_add_set(struct netlink_ctx *ctx, const struct handle *h, - struct set *set, bool excl); + struct set *set, uint32_t flags); extern int netlink_delete_set(struct netlink_ctx *ctx, const struct handle *h, const struct location *loc); extern int netlink_list_sets(struct netlink_ctx *ctx, const struct handle *h, @@ -165,7 +165,7 @@ extern struct stmt *netlink_parse_set_expr(const struct set *set, const struct nftnl_expr *nle); extern int netlink_add_setelems(struct netlink_ctx *ctx, const struct handle *h, - const struct expr *expr, bool excl); + const struct expr *expr, uint32_t flags); extern int netlink_delete_setelems(struct netlink_ctx *ctx, const struct handle *h, const struct expr *expr); extern int netlink_get_setelems(struct netlink_ctx *ctx, const struct handle *h, @@ -179,7 +179,7 @@ extern int netlink_reset_objs(struct netlink_ctx *ctx, const struct handle *h, const struct location *loc, uint32_t type, bool dump); extern int netlink_add_obj(struct netlink_ctx *ctx, const struct handle *h, - struct obj *obj, bool excl); + struct obj *obj, uint32_t flags); extern int netlink_delete_obj(struct netlink_ctx *ctx, const struct handle *h, struct location *loc, uint32_t type); -- cgit v1.2.3