diff options
author | Phil Sutter <phil@nwl.cc> | 2017-08-09 13:16:41 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-08-14 11:32:20 +0200 |
commit | c5c6bf14aa53bd16e66fcd281374faa66b3293f8 (patch) | |
tree | 9b0204e86863f4ce0b642cf8aaecc37d0120b66d /include | |
parent | d4227cd205308293ca291d94e7e83069aaf15733 (diff) |
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 <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/netlink.h | 10 |
1 files changed, 5 insertions, 5 deletions
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); |