diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-02-19 14:35:21 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-02-19 17:29:30 +0100 |
commit | 086ec6f30c96e9a920baf22ba700ea1ee0363df7 (patch) | |
tree | a0293c3ce4465410e54fc0d6754bf6f0112e063b /include | |
parent | 3a0e07106f666df82925aa3fb2eb5937245c9819 (diff) |
mnl: extended error support for create command
# nft create table x
Error: Could not process rule: File exists
create table x
^
# nft create chain x y
Error: Could not process rule: File exists
create chain x y
^
# nft create set x y { typeof ip saddr\; }
Error: Could not process rule: File exists
create set x y { typeof ip saddr; }
^
# nft create counter x y
Error: Could not process rule: File exists
create counter x y
^
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/mnl.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/mnl.h b/include/mnl.h index 07669957..6d247cca 100644 --- a/include/mnl.h +++ b/include/mnl.h @@ -37,7 +37,7 @@ int mnl_nft_rule_replace(struct netlink_ctx *ctx, const struct cmd *cmd); struct nftnl_rule_list *mnl_nft_rule_dump(struct netlink_ctx *ctx, int family); -int mnl_nft_chain_add(struct netlink_ctx *ctx, const struct cmd *cmd, +int mnl_nft_chain_add(struct netlink_ctx *ctx, struct cmd *cmd, unsigned int flags); int mnl_nft_chain_del(struct netlink_ctx *ctx, struct cmd *cmd); int mnl_nft_chain_rename(struct netlink_ctx *ctx, const struct cmd *cmd, @@ -46,14 +46,14 @@ int mnl_nft_chain_rename(struct netlink_ctx *ctx, const struct cmd *cmd, struct nftnl_chain_list *mnl_nft_chain_dump(struct netlink_ctx *ctx, int family); -int mnl_nft_table_add(struct netlink_ctx *ctx, const struct cmd *cmd, +int mnl_nft_table_add(struct netlink_ctx *ctx, struct cmd *cmd, unsigned int flags); int mnl_nft_table_del(struct netlink_ctx *ctx, struct cmd *cmd); struct nftnl_table_list *mnl_nft_table_dump(struct netlink_ctx *ctx, int family); -int mnl_nft_set_add(struct netlink_ctx *ctx, const struct cmd *cmd, +int mnl_nft_set_add(struct netlink_ctx *ctx, struct cmd *cmd, unsigned int flags); int mnl_nft_set_del(struct netlink_ctx *ctx, struct cmd *cmd); @@ -72,14 +72,14 @@ 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_add(struct netlink_ctx *ctx, const struct cmd *cmd, +int mnl_nft_obj_add(struct netlink_ctx *ctx, struct cmd *cmd, unsigned int flags); int mnl_nft_obj_del(struct netlink_ctx *ctx, struct cmd *cmd, int type); struct nftnl_flowtable_list * mnl_nft_flowtable_dump(struct netlink_ctx *ctx, int family, const char *table); -int mnl_nft_flowtable_add(struct netlink_ctx *ctx, const struct cmd *cmd, +int mnl_nft_flowtable_add(struct netlink_ctx *ctx, struct cmd *cmd, unsigned int flags); int mnl_nft_flowtable_del(struct netlink_ctx *ctx, struct cmd *cmd); |